@txgw/payout-components 1.0.3 → 1.1.2
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/dist/{AMIS-BpATHKnv.js → AMIS-DZNF-wN5.js} +1 -1
- package/dist/Action-Bs-w39w3.js +1 -0
- package/dist/{Alert-DwWdKr12.js → Alert-DUrQKj62.js} +1 -1
- package/dist/{AnchorNav-DRGjEF5J.js → AnchorNav-DwqO5tOJ.js} +1 -1
- package/dist/{App-DxKgyXV1.js → App-XGojn9ib.js} +1 -1
- package/dist/{Audio-BoaWMJHA.js → Audio-DgzkufkL.js} +1 -1
- package/dist/{Avatar-B2lZKPPh.js → Avatar-DqhjWFEd.js} +1 -1
- package/dist/BarCode-BvXPpsQD.js +1 -0
- package/dist/{BarCode-dEGhm4u6.js → BarCode-tjp-bkz9.js} +1 -1
- package/dist/{Breadcrumb-BHzIF2Vg.js → Breadcrumb-oAm7DyFM.js} +1 -1
- package/dist/ButtonGroup-DhxYojgw.js +1 -0
- package/dist/ButtonGroupSelect-BSiLinwi.js +1 -0
- package/dist/{ButtonToolbar-CYZ0LWsz.js → ButtonToolbar-DreDDViU.js} +1 -1
- package/dist/{CRUD-BDeg8xZI.js → CRUD-DOweSvNT.js} +1 -1
- package/dist/{CRUD2-DrE-2JU3.js → CRUD2-vQ4diTWc.js} +1 -1
- package/dist/Calendar-BiO6uAcc.js +1 -0
- package/dist/Card-BIz3TQnU.js +1 -0
- package/dist/{Card2-Dyl0FIVL.js → Card2-7Wp2CxXC.js} +1 -1
- package/dist/{Cards-DlMpwNSr.js → Cards-D4nSx5vL.js} +1 -1
- package/dist/{Carousel-CXMYZL8H.js → Carousel-h335GVnQ.js} +1 -1
- package/dist/{ChainedSelect-BQK0j-pA.js → ChainedSelect-CgA7EAnm.js} +1 -1
- package/dist/{Chart-uJ8v1OSG.js → Chart-3iqLVLt0.js} +1 -1
- package/dist/{ChartRadios-C9Ov2SCd.js → ChartRadios-B6Ot4z4V.js} +1 -1
- package/dist/Checkbox-Dmf4DD3L.js +1 -0
- package/dist/{Checkboxes-wud_gmq3.js → Checkboxes-B57EyVvD.js} +1 -1
- package/dist/{Code-VjDT2QOS.js → Code-73HoywPD.js} +1 -1
- package/dist/Collapse-Of0m7uH6.js +1 -0
- package/dist/{CollapseGroup-DkMS5MXZ.js → CollapseGroup-BdfCeJXB.js} +1 -1
- package/dist/{Color-CZV84qNC.js → Color-Dex4BTai.js} +1 -1
- package/dist/{ColorPicker-R5D1ZNwb.js → ColorPicker-CaZhySp2.js} +1 -1
- package/dist/{ColumnToggler-D98cb4XS.js → ColumnToggler-BT4N08pI.js} +1 -1
- package/dist/{ColumnToggler-BxHry8EL.js → ColumnToggler-DCYiE7t2.js} +1 -1
- package/dist/Combo-DhX7fDDG.js +1 -0
- package/dist/{ConditionBuilder-DFF8QBcW.js → ConditionBuilder-DlYCpqot.js} +1 -1
- package/dist/{Container-f-JHe2WE.js → Container-Cjl-6k2g.js} +1 -1
- package/dist/{Control-dOQnC26j.js → Control-D0yxiOHV.js} +1 -1
- package/dist/{Custom-CqKL8xv_.js → Custom-DYfrc-91.js} +1 -1
- package/dist/{Date-BcRD4sv_.js → Date-D_v0tbK0.js} +1 -1
- package/dist/{DateRange-BkGu5vJl.js → DateRange-DM7ZQogY.js} +1 -1
- package/dist/{Dialog-CQSNeqgY.js → Dialog-D4mabE0H.js} +1 -1
- package/dist/{DiffEditor-DU9deT5c.js → DiffEditor-3RFnxnVZ.js} +1 -1
- package/dist/{Divider-CYwXWwc5.js → Divider-X0wd4qMm.js} +1 -1
- package/dist/{Drawer-DmUqxMKd.js → Drawer-CmNhH-X1.js} +1 -1
- package/dist/{DropDownButton-C0e2mksC.js → DropDownButton-3OqKMh9I.js} +1 -1
- package/dist/{Each-Bnhdfx44.js → Each-CUEt_Fp0.js} +1 -1
- package/dist/FieldSet-xMpwZk45.js +1 -0
- package/dist/{Flex-C0c49ZMP.js → Flex-vXjawllk.js} +1 -1
- package/dist/{Formula-C82aVdAD.js → Formula-td5jVfJP.js} +1 -1
- package/dist/{Grid2D-BJPrAz8w.js → Grid2D-B94XWGD9.js} +1 -1
- package/dist/{GridNav-DCCBgvz1.js → GridNav-CjBc3KU2.js} +1 -1
- package/dist/{Group-D_2Fn4zB.js → Group-BZ4Pg7AG.js} +1 -1
- package/dist/HBox-mmIRGeNY.js +1 -0
- package/dist/{Hidden-SaNCTMlZ.js → Hidden-BscLTSvF.js} +1 -1
- package/dist/{IFrame-2LIicqpq.js → IFrame-DGSX6045.js} +1 -1
- package/dist/{Icon-3_vNko-P.js → Icon-iZCnbbZJ.js} +1 -1
- package/dist/{IconPicker-DAMClR_z.js → IconPicker-C-73qGJr.js} +1 -1
- package/dist/{IconSelect-CHM0oHqd.js → IconSelect-BPcOP4a-.js} +1 -1
- package/dist/{IconSelectStore-MNwivoh-.js → IconSelectStore-CfOI4fPx.js} +1 -1
- package/dist/Image-B_euCBkp.js +1 -0
- package/dist/{Images-ZGJfaN-q.js → Images-NpK2jr8S.js} +1 -1
- package/dist/{InputArray-D3y772RO.js → InputArray-D_C7sc2K.js} +1 -1
- package/dist/InputCity-DjTVJMDf.js +1 -0
- package/dist/{InputColor-CYmzXu5I.js → InputColor-Cxs2k3zC.js} +1 -1
- package/dist/{InputDate-BldJd84x.js → InputDate-D0ayUi_W.js} +1 -1
- package/dist/{InputDateRange-KzSlI2fv.js → InputDateRange-D5xZLZ87.js} +1 -1
- package/dist/{InputExcel-CJZWvZFT.js → InputExcel-DJwiAPrG.js} +1 -1
- package/dist/InputFile-CLgy5Kwa.js +1 -0
- package/dist/{InputFormula-BKxq41uR.js → InputFormula-CiNEZ27E.js} +1 -1
- package/dist/{InputGroup-wvaymJ-V.js → InputGroup-BeE8skgC.js} +1 -1
- package/dist/InputImage-IH9vczM1.js +1 -0
- package/dist/InputMonthRange-IwvyjfHM.js +1 -0
- package/dist/{InputNumber-BjzsM73z.js → InputNumber-CwgWdQv0.js} +1 -1
- package/dist/{InputQuarterRange-DQuiFCOb.js → InputQuarterRange-KVLnwl5Z.js} +1 -1
- package/dist/{InputRange-C97bKrW6.js → InputRange-DuQrlfhv.js} +1 -1
- package/dist/{InputRating-CpFNTZKA.js → InputRating-dpD8uqWr.js} +1 -1
- package/dist/{InputRepeat-CN2KxX7g.js → InputRepeat-40A83-CG.js} +1 -1
- package/dist/InputRichText-CPs8s7sR.js +1 -0
- package/dist/{InputSignature-CsxuK757.js → InputSignature-BixhxEHC.js} +1 -1
- package/dist/InputSubForm-DY7gjGCI.js +1 -0
- package/dist/{InputTable-Bt8U_tyA.js → InputTable-KQY600uO.js} +1 -1
- package/dist/{InputTag-kg2v747D.js → InputTag-COBAcy-D.js} +1 -1
- package/dist/{InputText-bKR0VgA6.js → InputText-DMKOqEA5.js} +1 -1
- package/dist/{InputTree-DbdS4b2m.js → InputTree-C5ku3s07.js} +1 -1
- package/dist/{InputVerificationCode-DcFJRWeR.js → InputVerificationCode-BG75Q7R0.js} +1 -1
- package/dist/{InputYearRange-ChXlMgCi.js → InputYearRange-BOCyFqVY.js} +1 -1
- package/dist/{JSONSchema-C_VjFVVN.js → JSONSchema-DPtkw1sK.js} +1 -1
- package/dist/{JSONSchemaEditor-CEgywCvJ.js → JSONSchemaEditor--MtYcADt.js} +1 -1
- package/dist/{Json-DqjhkjHF.js → Json-DzE3RuEL.js} +1 -1
- package/dist/{Link-9hUnE5FW.js → Link-CYr-HaE7.js} +1 -1
- package/dist/List-CsbZFLho.js +1 -0
- package/dist/{ListSelect-lX84FGAP.js → ListSelect-Bqcz5Vsf.js} +1 -1
- package/dist/{LocationPicker-DnA8QpYh.js → LocationPicker-DmgXW4e_.js} +1 -1
- package/dist/Log-htr4zYhI.js +1 -0
- package/dist/{Mapping-X2IRbppi.js → Mapping-Dp7GXGk0.js} +1 -1
- package/dist/{Markdown-ByuMaB2P.js → Markdown-CRTswpVP.js} +1 -1
- package/dist/{Markdown-BlxcmdTl.js → Markdown-DQXPWcZy.js} +1 -1
- package/dist/{MatrixCheckboxes-BvBU1E-4.js → MatrixCheckboxes-CrC-0KV5.js} +1 -1
- package/dist/{MultilineText-BmbIytvk.js → MultilineText-pqUIIh-i.js} +1 -1
- package/dist/{Nav-BxS7kBh9.js → Nav-C7Q5NTyJ.js} +1 -1
- package/dist/{NestedSelect-CbWnin5b.js → NestedSelect-cGzGDu2x.js} +1 -1
- package/dist/{Number-CGYpvopX.js → Number-HvZgu-Ps.js} +1 -1
- package/dist/{OfficeViewer-DBFFaH5P.js → OfficeViewer-BwHQtXDM.js} +1 -1
- package/dist/{Operation-j5yIUDkZ.js → Operation-BlB9BgWJ.js} +1 -1
- package/dist/{Page-CJ2gK3vA.js → Page-DFGe-1EJ.js} +1 -1
- package/dist/{Pagination-BDEmomCQ.js → Pagination-BPnTFeYa.js} +1 -1
- package/dist/{PaginationWrapper-Bnsk8oIg.js → PaginationWrapper-Cc_ArWYp.js} +1 -1
- package/dist/{Panel-DKpM1Qfc.js → Panel-YID5Pd0p.js} +1 -1
- package/dist/{Password-CzHAzi8M.js → Password-CQvFKTlR.js} +1 -1
- package/dist/{Picker-D5WVPGTg.js → Picker-Bd08LYGS.js} +1 -1
- package/dist/{Plain-oyGNzh1N.js → Plain-BXvSUnJt.js} +1 -1
- package/dist/PopUp-DTLG0S4M.js +104 -0
- package/dist/{Portlet-dA2P7U6i.js → Portlet-tFR4gBDB.js} +1 -1
- package/dist/{Progress-D2LXKzUA.js → Progress-BsjTAFle.js} +1 -1
- package/dist/{Property-CekATdUy.js → Property-DczjnSg8.js} +1 -1
- package/dist/{QRCode-DPoyEXK3.js → QRCode-B3Jistsv.js} +1 -1
- package/dist/{Radio-HhPQKIKk.js → Radio-D9rpSDB1.js} +1 -1
- package/dist/{Radios-DVzovX2u.js → Radios-BAkviIMB.js} +1 -1
- package/dist/Remark-2nq87f0j.js +1 -0
- package/dist/{RichText-wfPXQmb8.js → RichText-D9hUcBuE.js} +1 -1
- package/dist/{SearchBox-Jlwq8w3o.js → SearchBox-BlOWBFmf.js} +1 -1
- package/dist/{Select-DCB0i1Ga.js → Select-CNRCEqfS.js} +1 -1
- package/dist/{Service-Bmfl8VSD.js → Service-B3evLOnD.js} +1 -1
- package/dist/{Shape-5ZBBe1x0.js → Shape-oNfw1JQb.js} +1 -1
- package/dist/{Slider-pb5I0Xb2.js → Slider-BkAJVHJv.js} +1 -1
- package/dist/{SparkLine-C4x34-6K.js → SparkLine-BHo-1vXu.js} +1 -1
- package/dist/{Spinner-SR1wYU_1.js → Spinner-C6lWc4OM.js} +1 -1
- package/dist/{StaticHoc-DVc-5HZA.js → StaticHoc-BGJCCg4f.js} +1 -1
- package/dist/{Status-7D4DBjk6.js → Status-DplNkt0Z.js} +1 -1
- package/dist/{Steps-Dd_3MM0y.js → Steps-DfFUvz_A.js} +1 -1
- package/dist/{Switch-CZqzJH45.js → Switch-BVSzVpRN.js} +1 -1
- package/dist/{SwitchContainer-L7IwrheV.js → SwitchContainer-CFA12Afc.js} +1 -1
- package/dist/Table-efibISgA.js +1 -0
- package/dist/{Table2-CIZ93hrj.js → Table2-C-el0Wqe.js} +1 -1
- package/dist/{TableView-CigjcDJc.js → TableView-CTG5hc3H.js} +1 -1
- package/dist/{Tabs-Cljj-nTv.js → Tabs-D_H_s_Lo.js} +1 -1
- package/dist/{TabsTransfer-BXwrW4NX.js → TabsTransfer-CtbMgGeJ.js} +1 -1
- package/dist/{TabsTransferPicker-DB005nER.js → TabsTransferPicker-L3HKNnXE.js} +1 -1
- package/dist/{Tag-CcfwT8FM.js → Tag-VPoGNvKr.js} +1 -1
- package/dist/{Tasks-DeVW2Tdg.js → Tasks-DfnQ6J5i.js} +1 -1
- package/dist/{Textarea-zsHcK0rZ.js → Textarea-Dxd2ut9C.js} +1 -1
- package/dist/{Timeline-D_3FRzUa.js → Timeline-PSktc7Gj.js} +1 -1
- package/dist/{TooltipWrapper-BElQhX67.js → TooltipWrapper-BMLQMhlo.js} +1 -1
- package/dist/{Tpl-OPfW08Kh.js → Tpl-D-0fwqIo.js} +1 -1
- package/dist/Transfer-U4V9M4hb.js +1 -0
- package/dist/{TransferPicker-xlJfwHxP.js → TransferPicker-4u_PHlo2.js} +1 -1
- package/dist/{TreeSelect-BTKg9Ldf.js → TreeSelect-xFIc1kbp.js} +1 -1
- package/dist/{UUID-BkwpeiT9.js → UUID-z-38LjnX.js} +1 -1
- package/dist/{UserSelect-CsY5PQp9.js → UserSelect-kZxushLL.js} +1 -1
- package/dist/{VBox-Ca4DBR6-.js → VBox-Wx0Hae1x.js} +1 -1
- package/dist/Video-DpUxYlrI.js +1 -0
- package/dist/{WebComponent-DYxJeu6a.js → WebComponent-qVXehLOT.js} +1 -1
- package/dist/{Wizard-fqzq2OCn.js → Wizard-CgWXlbIW.js} +1 -1
- package/dist/{Words-V70QrARW.js → Words-BcH_hUuO.js} +1 -1
- package/dist/{Wrapper-BtFbBBXy.js → Wrapper-goADT8nB.js} +1 -1
- package/dist/_getTag-DrfNFMjn.js +1 -0
- package/dist/beneficiary-form-BjZ_GGCu.js +10 -0
- package/dist/{client-BoE-UyzU.js → client-vLe_PnLn.js} +1 -1
- package/dist/{crypto-js-Cv2Y8hvs.js → crypto-js-DfHtkI6b.js} +1 -1
- package/dist/{doc-CmSOujco.js → doc-CxGb1TfN.js} +1 -1
- package/dist/es-CEgI316R.js +1 -0
- package/dist/esm-CMljH72G.js +1 -0
- package/dist/esm-D3qvBzlk.js +4 -0
- package/dist/esm-DdEfrmRq.js +27 -0
- package/dist/{function-C8ta9DKb.js → function-CrEuBBd9.js} +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1 -1
- package/dist/isEqual-DiNKNUz9.js +1 -0
- package/dist/{main-CLaM-mkN.js → main-C5HXsudB.js} +1 -1
- package/dist/mi18n-react.esm-CNXlHzVT.js +1 -0
- package/dist/{objectSpread2-BCtAXXta.js → objectSpread2-CaisYh-T.js} +1 -1
- package/dist/{omitBy-NMzUUhXs.js → omitBy-CXOTk7kv.js} +1 -1
- package/dist/{papaparse.min-CU0u_rom.js → papaparse.min-PX0bGR45.js} +1 -1
- package/dist/{react-BW4ssgUo.js → react-COOgDf_T.js} +1 -1
- package/dist/{react-cropper.es-zEJdZmmN.js → react-cropper.es-DzdYLVvj.js} +1 -1
- package/dist/react-dom-D_0O8_TK.js +1 -0
- package/dist/rolldown-runtime-Cmsah3SL.js +1 -0
- package/dist/xor-6sD3W2X_.js +1 -0
- package/package.json +10 -9
- package/dist/Action-B0KUcn27.js +0 -1
- package/dist/Action-CzJ_r33l.js +0 -1
- package/dist/BarCode-BnchzdIg.js +0 -1
- package/dist/ButtonGroup-BMvNPoKc.js +0 -1
- package/dist/ButtonGroupSelect-BmQIuhWU.js +0 -1
- package/dist/ButtonGroupSelect-CfNu0OBj.js +0 -1
- package/dist/Calendar-DkEUJJQW.js +0 -1
- package/dist/Card-BVUWwkgm.js +0 -1
- package/dist/Card-IZbcizfw.js +0 -1
- package/dist/Checkbox-DAq7LXTe.js +0 -1
- package/dist/Checkbox-DbHhD7iK.js +0 -1
- package/dist/Collapse-CRIu-D5O.js +0 -1
- package/dist/Collapse-CknZKNKz.js +0 -1
- package/dist/Combo-BUD7tb8b.js +0 -1
- package/dist/FieldSet-BRfWbiPG.js +0 -1
- package/dist/FieldSet-f-m_bp4h.js +0 -1
- package/dist/HBox-CG3Ad5us.js +0 -1
- package/dist/HBox-CRrACS8I.js +0 -1
- package/dist/Image-Br7JbiAF.js +0 -1
- package/dist/Image-hHgZkb5C.js +0 -1
- package/dist/InputCity-CF6mEwuH.js +0 -1
- package/dist/InputFile-C0FUNeFM.js +0 -1
- package/dist/InputFile-DFjvYmV3.js +0 -1
- package/dist/InputImage-CLuXGhoy.js +0 -1
- package/dist/InputImage-DasZBpb-.js +0 -1
- package/dist/InputMonthRange-DVRnBZ4I.js +0 -1
- package/dist/InputRichText-BXjRSQFh.js +0 -1
- package/dist/InputRichText-DdyJFH82.js +0 -1
- package/dist/InputSubForm-Ddweo6dR.js +0 -1
- package/dist/List-BBntusL0.js +0 -1
- package/dist/List-C8nPjG1-.js +0 -1
- package/dist/Log-CRxPlj86.js +0 -1
- package/dist/PopUp-DaheG-Vv.js +0 -104
- package/dist/Remark-CHTOdmdn.js +0 -1
- package/dist/Remark-bXVj7ffU.js +0 -1
- package/dist/Table-CYUuVDxA.js +0 -1
- package/dist/Table-D-9NfAqg.js +0 -1
- package/dist/Transfer-Cx1Ijzfh.js +0 -1
- package/dist/Transfer-DboPBh8V.js +0 -1
- package/dist/Video-CXzxq3vU.js +0 -1
- package/dist/_getTag-x788Ng9o.js +0 -1
- package/dist/beneficiary-form-BmmdIRc0.js +0 -10
- package/dist/es-DY5--nMG.js +0 -1
- package/dist/esm-BMvKJM5q.js +0 -4
- package/dist/esm-BbZME5Ac.js +0 -28
- package/dist/esm-DyRrwLZv.js +0 -1
- package/dist/isEqual-BxlJ5vH7.js +0 -1
- package/dist/mi18n-react.esm-BFa-Q7wX.js +0 -1
- package/dist/react-dom-DmgFzc6z.js +0 -1
- package/dist/rolldown-runtime-DcYi-9oA.js +0 -1
- package/dist/xor-CSkTraTY.js +0 -1
- /package/dist/{IconPickerIcons-DN0pqJHt.js → IconPickerIcons-Do_R6nIG.js} +0 -0
- /package/dist/{tslib.es6-C2q27PUR.js → tslib.es6-TRdqp4ac.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";var t=/* @__PURE__ */e(n());function a(e){return Boolean(e&&"function"==typeof e.then)}function i(e,n){return a(e)?Promise.resolve(e).then(n):n(e)}function o(e){const n=(Array.isArray(e)?e:[e]).map(e=>`'${e}'`),t=n.slice(-2).join(" or ");return`Mi18n: You need to specify ${[...n.slice(0,-2),t].join(", ")} option`}function r(e){return"string"==typeof e?[e]:Array.isArray(e)?e:void 0}function s(e){return r(e)||[]}function c(e,n){return"object"!=typeof(t=n)||Array.isArray(t)||null===t?s(n):s(null==n?void 0:n[e]);var t}function g(e){return Array.from(new Set(e))}function u(e){return e?e.replace(/\/+$/,""):e}var l=(e,n)=>fetch(e,n),d=(e=l)=>(n,t)=>e(n,Object.assign(Object.assign({},t),{headers:Object.assign({"X-Mi18n-SDK-Type":"JS","X-Mi18n-SDK-Version":"5.16.2"},null==t?void 0:t.headers)}));function p(e){let n=[];return Object.freeze({listen(e){const t=n=>{e(n)};return n.push(t),{unsubscribe(){n=n.filter(e=>t!==e)}}},emit(t){e()&&n.forEach(e=>e({value:t}))}})}function f(e,n,t){const a=/* @__PURE__ */new Set,i=/* @__PURE__ */new Set;let o=[];function r(){if(0===o.length)return;const e=o;o=[],a.forEach(e=>{e({value:void 0})});let t=/* @__PURE__ */new Set;e.forEach(e=>{void 0===e?t=void 0:void 0!==t&&e.forEach(e=>t.add(e))}),function(e){const t=new Set(n());i.forEach(n=>{void 0!==e&&-1===(null==e?void 0:e.findIndex(e=>t.has(e)||n.namespaces.has(e)))||n.fn({value:void 0})})}(t?Array.from(t.keys()):void 0)}return Object.freeze({emit(n,t){e()&&(o.push(n),t?setTimeout(r,0):r())},listen:e=>(a.add(e),{unsubscribe:()=>{a.delete(e)}}),listenSome(e){const n={fn:n=>{e(n)},namespaces:/* @__PURE__ */new Set};i.add(n);const a={unsubscribe:()=>{i.delete(n)},subscribeNs:e=>(s(e).forEach(e=>n.namespaces.add(e)),void 0===e&&n.namespaces.add(t()),a)};return a}})}var v=e=>{const n=/* @__PURE__ */new Map;return Object.entries(e).forEach(([e,t])=>{null!=t&&("object"!=typeof t?n.set(e,t):v(t).forEach((t,a)=>{n.set(e+"."+a,t)}))}),n},m=e=>{const[n,...t]=e.split(":");return{language:n,namespace:t.join(":")||""}},h=({language:e,namespace:n})=>n?`${e}:${n}`:e;function b(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t}var y="invalid",L={defaultNs:"",observerOptions:{tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%mi18n:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},observerType:"invisible",onFormatError:y,apiUrl:"https://admin.midasbuy.com/i18n/api",fetch:d()},O=(...e)=>{let n={};return e.forEach(e=>{n=Object.assign(Object.assign(Object.assign({},n),e),{observerOptions:Object.assign(Object.assign({},n.observerOptions),null==e?void 0:e.observerOptions)})}),n};function j(e,n){const t=O(L,null==n?void 0:n.initialOptions,e);return t.apiUrl=u(t.apiUrl),(null==e?void 0:e.fetch)&&(t.fetch=d(e.fetch)),{initialOptions:t,activeNamespaces:(null==n?void 0:n.activeNamespaces)||/* @__PURE__ */new Map,language:null==n?void 0:n.language,pendingLanguage:null==n?void 0:n.language,isInitialLoading:!1,isRunning:!1}}var w=(e,n,t)=>{let a=e;return Object.freeze({init(e){a=e},notify(){const e=n();a!==e&&t(e),a=e}})},k=(e,...n)=>{let t,a={};return"object"==typeof e?a=e:(a.key=e,"string"==typeof n[0]?(a.defaultValue=n[0],t=n[1]):"object"==typeof n[0]&&(t=n[0])),t&&(a=Object.assign(Object.assign({},function(e){var{ns:n,noWrap:t,orEmpty:a,params:i,language:o}=e,r=b(e,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:n,noWrap:t,orEmpty:a,language:o}),{params:Object.assign({},r)})}(t)),a)),a},E=class extends Error{constructor(e,n,t){let a;a=0===e?"Empty parameter":1===e?"Unexpected character":"Unexpected end",super(`Mi18n parser: ${a} at ${n} in "${t}"`),this.code=e,this.index=n}};function R(e){return/\s/.test(e)}var N=new Set([2,1,0]),S=new Set(["{","}","'"]),I=()=>(e,n)=>(n.setFinalFormatter({format:({translation:e,params:n})=>function(e,n){const[t,a]=function(e){let n=0,t="",a="",i="";const o=[],r=[];let s=0;function c(n){throw new E(n,s,e)}const g=()=>{o.push(t),t=""},u=()=>{/[0-9a-zA-Z_]/.test(i)||c(1),a+=i},l=()=>{""===a&&c(0),r.push(a),a=""};for(s=0;s<e.length;s++)switch(i=e[s],n){case 0:"'"===i?(t+=i,n=1):"{"===i?(g(),n=3):(t+=i,n=0);break;case 1:S.has(i)?(t=t.slice(0,-1)+i,n=2):(t+=i,n=0);break;case 2:"'"===i?n=0:(t+=i,n=2);break;case 3:"}"===i?(l(),n=0):R(i)?""!==a&&(l(),n=4):(u(),n=3);break;case 4:"}"==i?n=0:R(i)?n=4:c(1)}return N.has(n)||c(2),g(),[o,r]}(e),i=[t[0]];for(let o=1;o<t.length;o++){const r=null==n?void 0:n[a[o-1]];if(void 0===r)throw new Error(`Missing parameter "${a[o-1]}" in "${e}"`);i.push(String(r)),i.push(t[o])}return i.join("")}(e,n)}),e);function D(e){if(void 0===(null===(t=null===(n=globalThis.window)||void 0===n?void 0:n.document)||void 0===t?void 0:t.createElement))throw new Error(`${e}: Can't run on the server`);var n,t}String(Number.MAX_SAFE_INTEGER),RegExp(`([${["",""].join("")}]{9})+`,"gu");var C=e=>(n,t)=>(t.setDevBackend(function(e){const n=(null==e?void 0:e.host)||"pagedoo.midasbuy.com",t=(null==e?void 0:e.pathTemplate)||"/i18n/project-export/{env}/{projectId}/{language}.json",a=(null==e?void 0:e.env)||"release";return{getRecord:({language:e,fetch:i,projectId:o,apiKey:r})=>i(`https://${n}${t.replace("{projectId}",`${o}`).replace("{language}",e).replace("{env}",a)}`,{headers:{"X-API-Key":r||"","Content-Type":"application/json"}}).then(e=>{if(e.ok)return e.json();throw new Error(e.statusText)})}}(e)),n),P=null,A="__mi18n_apiKey",F="__mi18n_apiUrl";function T(){const e=sessionStorage.getItem(A)||void 0,n=sessionStorage.getItem(F)||void 0;if(e&&n)return{apiKey:e,apiUrl:n}}function U(){sessionStorage.removeItem(A),sessionStorage.removeItem(F)}var x=()=>e=>e;(()=>{if("undefined"==typeof window)return!1;try{return"undefined"!=typeof sessionStorage&&sessionStorage}catch(e){return console.error("sessionStorage not available",e),!1}})()&&(x=()=>e=>{const n=function(){let e;return{update:async function(n){null==e||e();const{cancel:t,promise:a}=function({message:e,recievingMessage:n,data:t,attempts:a=1,timeout:i=300}){let o=!1;const r=()=>new Promise((a,o)=>{const r=function(e){const n=n=>{var t,i;e.includes(null===(t=n.data)||void 0===t?void 0:t.type)&&function(e){clearTimeout(s),c(),a(e)}(null===(i=n.data)||void 0===i?void 0:i.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}(n);window.postMessage({type:e,data:t},window.origin);const s=setTimeout(function(){c(),o()},i);function c(){r.unsubscribe()}});return{cancel(){o=!0},promise:(async()=>{for(let n=0;n<a;n++){if(o)return new Promise(()=>{});try{return await r()}catch(e){continue}}if(!o)throw`Didn't recieve ${n.join(" or ")} in time.`;return new Promise(()=>{})})()}}({message:"MI18N_READY",recievingMessage:["MI18N_PLUGIN_READY","MI18N_PLUGIN_UPDATED"],data:n,attempts:4});return e=t,a}}}();return e.on("running",({value:t})=>{var a;t&&(a=()=>{n.update({uiPresent:!0,uiVersion:void 0,mode:e.isDev()?"development":"production",config:{apiUrl:e.getInitialOptions().apiUrl||"",apiKey:e.getInitialOptions().apiKey||""}}).catch(U)},"loading"!==document.readyState?Promise.resolve().then(()=>{a()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",a))}),T()&&(async()=>{const e=await(P||(P=new Promise((e,n)=>{const t=document.createElement("script");t.src="https://cdn.jsdelivr.net/npm/@mi18n/web/dist/mi18n-in-context-tools.umd.min.js",t.addEventListener("load",()=>e()),t.addEventListener("error",e=>n(e.error)),document.body.appendChild(t)}).then(()=>window["@mi18n/in-context-tools"].InContextTools)),P);return n=>{const t=T();return n.addPlugin(e({credentials:t})),n}})().then(n=>{e.addPlugin(n)}).catch(e=>{console.error("Mi18n: Failed to load in-context tools"),console.error(e)}),e});var B="__mi18n_currentLanguage",M=()=>localStorage.getItem(B),K=()=>(e,n)=>(n.setLanguageStorage({getLanguage:()=>(D("LanguageStorage"),localStorage.getItem(B)||void 0),setLanguage(e){D("LanguageStorage"),localStorage.setItem(B,e)}}),e),$=()=>(e,n)=>(n.setLanguageDetector({getLanguage({availableLanguages:e}){D("LanguageDetector");const n=window.navigator.language,t=e.find(e=>e===n);if(t)return t;const a=e=>e.replace(/^(.+?)(-.*)?$/,"$1"),i=a(window.navigator.language);return e.find(e=>a(e)===i)||void 0}}),e);function _(){return(()=>{const e={plugins:[],options:{}},n=Object.freeze({use:t=>(e.plugins.push(t),n),updateDefaults:t=>(e.options=O(e.options,t),n),init(n){const t=function(e){const n=function({options:e}){const n=function(e,n){let t=!0;function a(){return t}const i=Object.freeze({onPendingLanguageChange:p(a),onLanguageChange:p(a),onLoadingChange:p(a),onFetchingChange:p(a),onInitialLoaded:p(a),onRunningChange:p(a),onCacheChange:p(a),onUpdate:f(a,e,n),onPermanentChange:p(a),setEmitterActive(e){t=e},on:(e,n)=>{switch(e){case"pendingLanguage":return i.onPendingLanguageChange.listen(n);case"language":return i.onLanguageChange.listen(n);case"loading":return i.onLoadingChange.listen(n);case"fetching":return i.onFetchingChange.listen(n);case"initialLoad":return i.onInitialLoaded.listen(n);case"running":return i.onRunningChange.listen(n);case"cache":return i.onCacheChange.listen(n);case"update":return i.onUpdate.listen(n);case"permanentChange":return i.onPermanentChange.listen(n)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:e})=>i.onUpdate.emit([e.namespace],!0)),i}(E,R),t=w(!1,()=>L.isFetching(),n.onFetchingChange.emit),r=w(!1,()=>F.isLoading(),n.onLoadingChange.emit),l=function(e,n,t){let a,i=j();const o=Object.freeze({init(e){i=j(e,i)},isRunning:()=>i.isRunning,setRunning(e){i.isRunning!==e&&(i.isRunning=e,t.emit(e))},isInitialLoading:()=>i.isInitialLoading,setInitialLoading(e){i.isInitialLoading=e},getLanguage:()=>i.language||i.initialOptions.language,setLanguage(n){i.language!==n&&(i.language=n,e.emit(n))},getPendingLanguage:()=>i.pendingLanguage||o.getLanguage(),setPendingLanguage(e){i.pendingLanguage!==e&&(i.pendingLanguage=e,n.emit(e))},getInitialOptions:()=>Object.assign(Object.assign({},i.initialOptions),a),addActiveNs(e){s(e).forEach(e=>{const n=i.activeNamespaces.get(e);void 0!==n?i.activeNamespaces.set(e,n+1):i.activeNamespaces.set(e,1)})},removeActiveNs(e){s(e).forEach(e=>{const n=i.activeNamespaces.get(e);void 0!==n&&n>1?i.activeNamespaces.set(e,n-1):i.activeNamespaces.delete(e)})},getRequiredNamespaces:()=>g([...i.initialOptions.ns||[i.initialOptions.defaultNs],...s(i.initialOptions.fallbackNs),...i.activeNamespaces.keys()]),getFallbackLangs(e){const n=e||o.getLanguage();return n?g([n,...c(n,i.initialOptions.fallbackLanguage)]):[]},getFallbackNs:()=>s(i.initialOptions.fallbackNs),getDefaultNs:e=>void 0===e?i.initialOptions.defaultNs:e,getAvailableLanguages(){if(i.initialOptions.availableLanguages)return i.initialOptions.availableLanguages;if(i.initialOptions.staticData){const e=Object.keys(i.initialOptions.staticData).map(e=>m(e).language);return Array.from(new Set(e))}},withDefaultNs:e=>({namespace:void 0===e.namespace?o.getInitialOptions().defaultNs:e.namespace,language:e.language}),overrideCredentials(e){a=e?Object.assign(Object.assign({},e),{apiUrl:u(e.apiUrl)}):void 0}});return o}(n.onLanguageChange,n.onPendingLanguageChange,n.onRunningChange),d=function(e,n,t,o,r,s,c,g){const u={ui:void 0},l={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},d=async({keysAndDefaults:e,event:n})=>{var t;const a=e.map(({key:e,ns:n,defaultValue:t})=>{const{translation:a}=s({key:e,ns:n});return{key:e,defaultValue:t,fallbackNamespaces:o(n),namespace:r({key:e,ns:n})[0],translation:a}});null===(t=l.ui)||void 0===t||t.handleElementClick(a,n)},p=(e,n)=>{var t;return(null===(t=l.observer)||void 0===t?void 0:t.findPositions(e,n))||[]};function f(e){const{translation:n}=s({key:e.key,ns:e.ns});return S.formatTranslation(Object.assign(Object.assign({},e),{translation:n,formatEnabled:!0}))}function v(){return{fetch:n().fetch}}function m(e){l.observer=null==e?void 0:e()}function h(){return Boolean(l.observer)}function L(e){e&&l.formatters.push(e)}function O(e){l.finalFormatter=e}function j(e){u.ui=e}function w(){return Boolean(u.ui)}function k(e){l.languageStorage=e}function E(e){l.languageDetector=e}function R(e){e&&l.backends.push(e)}function N(e){l.devBackend=e}const S=Object.freeze({addPlugin:function(e,n){n(e,Object.freeze({setFinalFormatter:O,addFormatter:L,setObserver:m,hasObserver:h,setUi:j,hasUi:w,setDevBackend:N,addBackend:R,setLanguageDetector:E,setLanguageStorage:k}))},run(){var e,t;const{apiKey:a,apiUrl:i,projectId:o,observerOptions:r}=n();l.ui=null===(e=u.ui)||void 0===e?void 0:e.call(u,{apiKey:a,apiUrl:i,projectId:o,highlight:S.highlight,changeTranslation:c,findPositions:p,onPermanentChange:g}),null===(t=l.observer)||void 0===t||t.run({mouseHighlight:!0,options:r,translate:f,onClick:d})},stop(){var e;l.ui=void 0,null===(e=l.observer)||void 0===e||e.stop()},getLanguageStorage:()=>l.languageStorage,getInitialLanguage(){var e;const n=t();return i(null===(e=l.languageStorage)||void 0===e?void 0:e.getLanguage(v()),e=>n&&!n.includes(e)||!e?function(){if(!l.languageDetector)return;const e=t();return l.languageDetector.getLanguage(Object.assign({availableLanguages:e},v()))}():e)},setStoredLanguage(e){var n;null===(n=l.languageStorage)||void 0===n||n.setLanguage(e,v())},getDevBackend:()=>l.devBackend,getBackendRecord:({language:e,namespace:n})=>{for(const t of l.backends){const i=t.getRecord(Object.assign({language:e,namespace:n},v()));if(a(i))return null==i?void 0:i.catch(e=>(console.error(e),{}));if(void 0!==i)return i}},getBackendDevRecord:({language:e,namespace:t})=>{var a;const{apiKey:i,apiUrl:o,projectId:r}=n();return null===(a=l.devBackend)||void 0===a?void 0:a.getRecord(Object.assign({apiKey:i,apiUrl:o,projectId:r,language:e,namespace:t},v()))},getLanguageDetector:()=>l.languageDetector,retranslate(){var e;null===(e=l.observer)||void 0===e||e.retranslate()},highlight:(e,n)=>{var t,a;return(null===(a=null===(t=l.observer)||void 0===t?void 0:t.highlight)||void 0===a?void 0:a.call(t,e,n))||{unhighlight(){}}},unwrap(e){var n;return l.observer?null===(n=l.observer)||void 0===n?void 0:n.unwrap(e):{text:e,keys:[]}},wrap(e){var n;return l.observer?null===(n=l.observer)||void 0===n?void 0:n.wrap(e):e.translation},hasDevBackend:()=>Boolean(S.getDevBackend()),formatTranslation(t){var a,{formatEnabled:i}=t,o=b(t,["formatEnabled"]);const{key:r,translation:s,defaultValue:c,noWrap:g,params:u,orEmpty:d,ns:p}=o,f=s||c||(d?"":r);let v=f||(d?"":r);const m=e(),h=i||!(null===(a=l.observer)||void 0===a?void 0:a.outputNotFormattable),L=e=>l.observer&&!g?l.observer.wrap({key:r,translation:e,defaultValue:c,params:u,ns:p}):e;v=L(v);try{if(f&&m&&h)for(const e of l.formatters)v=e.format({translation:v,language:m,params:u});l.finalFormatter&&f&&m&&h&&(v=l.finalFormatter.format({translation:v,language:m,params:u}))}catch(j){console.error(j);const e=("string"==typeof(O=j)?O:"string"==typeof(null==O?void 0:O.message)?O.message:void 0)||y,t=n().onFormatError,a=typeof t;v="string"===a?t:"function"===a?t(e,o):y,v=L(v)}var O;return v}});return S}(l.getLanguage,l.getInitialOptions,l.getAvailableLanguages,N,P,A,I,function(e){n.onPermanentChange.emit({key:e.key,namespace:e.namespace})}),L=function(e,n,t,a,i,o,r){const c=/* @__PURE__ */new Map,u=/* @__PURE__ */new Map;let l={},d=0;function p(n,t,a){const i=h(n);u.set(i,{data:v(t),version:a}),e.emit(n)}function f(e){let t;if(!t){const n=l[h(e)];"function"==typeof n&&(t=n())}return t||(t=n(e)),t}const b=Object.freeze({addStaticData(e){e&&(l=Object.assign(Object.assign({},l),e),Object.entries(e).forEach(([e,n])=>{if("function"!=typeof n){const t=m(e),a=u.get(e);a&&0!==a.version||(p(t,n,0),b.addNamespaceRecord(t,n,0))}}))},invalidate(){c.clear(),d+=1},addNamespaceRecord(e,n,t){!e.namespace&&Object.values(n).some(e=>"object"==typeof e&&e)&&Object.entries(n).forEach(([n,a])=>{"object"==typeof a&&a&&p(Object.assign(Object.assign({},e),{namespace:n}),a,t)})},addRecord(e,n){p(e,n,d),b.addNamespaceRecord(e,n,d)},exists(e,n=!1){const t=u.get(h(e));return t&&n?t.version===d:Boolean(t)},getRecord(e){var n;return null===(n=u.get(h(a(e))))||void 0===n?void 0:n.data},getTranslation(e,n){var t;return null===(t=u.get(h(e)))||void 0===t?void 0:t.data.get(n)},getTranslationNs(e,n,t){var a;for(const i of e)for(const e of n)if(null!=(null===(a=u.get(h({language:e,namespace:i})))||void 0===a?void 0:a.data.get(t)))return[i];return g(e)},getTranslationFallback(e,n,t){var a;for(const i of e)for(const e of n){const n=null===(a=u.get(h({language:e,namespace:i})))||void 0===a?void 0:a.data.get(t);if(null!=n)return{translation:n,namespace:i}}return{translation:void 0,namespace:e[0]}},changeTranslation(n,t,a){var i;const o=null===(i=u.get(h(n)))||void 0===i?void 0:i.data;null==o||o.set(t,a),e.emit(Object.assign(Object.assign({},n),{key:t}))},isFetching(e){if(i())return!0;if(void 0===e)return c.size>0;const n=s(e);return Boolean(Array.from(c.keys()).find(e=>n.includes(m(e).namespace)))},isLoading(e,n){const t=s(n);return Boolean(i()||Array.from(c.keys()).find(n=>{const a=m(n);return(!t.length||t.includes(a.namespace))&&!b.exists({namespace:a.namespace,language:e})}))},async loadRecords(e,n){const i=e.map(e=>{const i=a(e),o=h(i),r=c.get(o);if(r)return{new:!1,promise:r,keyObject:i,cacheKey:o};const s=function(e,n){var a;let i;return n&&(i=null===(a=t(e))||void 0===a?void 0:a.catch(()=>(console.warn("Mi18n: Failed to fetch data from dev backend"),f(e)))),i||(i=f(e)),i}(i,n)||Promise.resolve(void 0);return c.set(o,s),{new:!0,promise:s,keyObject:i,cacheKey:o}});o.notify(),r.notify();const s=await Promise.all(i.map(e=>e.promise));return i.forEach((e,n)=>{const t=c.get(e.cacheKey)!==e.promise;if(e.new&&!t){c.delete(e.cacheKey);const t=s[n];t?b.addRecord(e.keyObject,t):b.getRecord(e.keyObject)||b.addRecord(e.keyObject,{})}}),o.notify(),r.notify(),i.map(e=>b.getRecord(e.keyObject))},getAllRecords:()=>Array.from(u.entries()).map(([e,n])=>Object.assign(Object.assign({},m(e)),{data:n.data}))});return b}(n.onCacheChange,d.getBackendRecord,d.getBackendDevRecord,l.withDefaultNs,l.isInitialLoading,t,r);let O;function E(){return l.getFallbackNs()}function R(e){return l.getDefaultNs(e)}function N(e){return[...s(R(e)),...E()]}function S(e){return[...s(null!=e?e:R()),...l.getRequiredNamespaces()]}function I(e,n,t){const a=l.withDefaultNs(e),i=L.getTranslation(a,n);return L.changeTranslation(a,n,t),{revert(){L.changeTranslation(a,n,i)}}}function D(e){l.init(e),L.addStaticData(l.getInitialOptions().staticData)}function C(e,n){const t=function(e,n){const t=l.getFallbackLangs(e),a=S(n),i=[];return t.forEach(e=>{a.forEach(n=>{L.exists({language:e,namespace:n},!0)||i.push({language:e,namespace:n})})}),i}(e,n);if(t.length)return i(F.loadRecords(t),()=>{})}function P({key:e,ns:n}){const t=l.getFallbackLangs(),a=N(null!=n?n:void 0);return L.getTranslationNs(a,t,e)}function A({key:e,ns:n,language:t}){const a=N(null!=n?n:void 0),i=l.getFallbackLangs(t);return L.getTranslationFallback(a,i,e)}e&&D(e),n.onUpdate.listen(()=>{l.isRunning()&&d.retranslate()});const F=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),l),d),L),{init:D,getTranslation:A,changeTranslation:I,getTranslationNs:P,getDefaultAndFallbackNs:N,async changeLanguage(e){l.getPendingLanguage()===e&&l.getLanguage()===e||(l.setPendingLanguage(e),l.isRunning()&&await C(e),e===l.getPendingLanguage()&&(l.setLanguage(e),d.setStoredLanguage(e)))},async addActiveNs(e,n){n||l.addActiveNs(e),l.isRunning()&&await C(void 0,e)},loadRecords:e=>L.loadRecords(e,F.isDev()),loadRecord:async e=>(await F.loadRecords([e]))[0],isLoading:e=>L.isLoading(l.getLanguage(),e),isLoaded(e){const n=l.getLanguage();if(!n)return!1;const t=l.getFallbackLangs(n),a=S(e),i=[];return t.forEach(e=>{a.forEach(n=>{L.exists({language:e,namespace:n})||i.push({language:e,namespace:n})})}),0===i.length},t:(...e)=>{const n=k(...e),{translation:t,namespace:a}=A(n);return d.formatTranslation(Object.assign(Object.assign({},n),{translation:t,ns:a}))},isDev:()=>Boolean(l.getInitialOptions().apiKey&&l.getInitialOptions().apiUrl),run:()=>(function(){if((d.getLanguageDetector()||d.getLanguageStorage())&&!l.getAvailableLanguages())throw new Error(o("availableLanguages"));if(!l.getLanguage()&&!l.getInitialOptions().defaultLanguage)throw new Error(o(["defaultLanguage","language"]))}(),l.isRunning()||(l.setRunning(!0),d.run(),O=function(){const e=i(function(){if(!l.getLanguage())return i(d.getInitialLanguage(),e=>{const n=e||l.getInitialOptions().defaultLanguage;n&&l.setLanguage(n)})}(),()=>C());if(a(e))return l.setInitialLoading(!0),t.notify(),r.notify(),Promise.resolve(e).then(()=>{l.setInitialLoading(!1),t.notify(),r.notify(),n.onInitialLoaded.emit()});n.onInitialLoaded.emit()}()),Promise.resolve(O)),stop(){l.isRunning()&&(d.stop(),l.setRunning(!1))}}));return F}({options:e});function t(e){const t=n.isRunning();t&&n.stop(),e(),n.isDev()&&n.invalidate(),t&&n.run()}n.isDev()&&n.invalidate();const r=Object.freeze({on:n.on,onNsUpdate:n.onUpdate.listenSome,setEmitterActive:n.setEmitterActive,getLanguage:n.getLanguage,getPendingLanguage:n.getPendingLanguage,changeLanguage:n.changeLanguage,changeTranslation:n.changeTranslation,addActiveNs:n.addActiveNs,removeActiveNs:n.removeActiveNs,loadRecords:n.loadRecords,loadRecord:n.loadRecord,addStaticData:n.addStaticData,getRecord:n.getRecord,getAllRecords:n.getAllRecords,isLoaded:n.isLoaded,isInitialLoading:n.isInitialLoading,isLoading:n.isLoading,isFetching:n.isFetching,isRunning:n.isRunning,run:n.run,stop:n.stop,t:n.t,highlight:n.highlight,getInitialOptions:n.getInitialOptions,isDev:n.isDev,wrap:n.wrap,unwrap:n.unwrap,overrideCredentials(e){t(()=>n.overrideCredentials(e))},addPlugin(e){e&&t(()=>n.addPlugin(r,e))},updateOptions(e){e&&t(()=>n.init(e))}});return r}(O(e.options,n));return e.plugins.forEach(t.addPlugin),t}});return n})().use(x())}var z,V={useSuspense:!0},W=()=>(z||(z=t.createContext(void 0)),z),X=({mi18n:e,options:n,children:a,fallback:i})=>{const[o,r]=(0,t.useState)(!e.isLoaded());(0,t.useEffect)(()=>{e.run().catch(e=>{console.error(e)}).finally(()=>{r(!1)})},[e]);const s=Object.assign(Object.assign({},V),n),c=W();return s.useSuspense?t.createElement(c.Provider,{value:{mi18n:e,options:s}},o?i:t.createElement(t.Suspense,{fallback:i||null},a)):t.createElement(c.Provider,{value:{mi18n:e,options:s}},o?i:a)},G=()=>{const e=(0,t.useContext)(W())||void 0;if(!e)throw new Error("Couldn't find mi18n instance, did you forgot to use `Mi18nProvider`?");return e},Y=()=>{const[e,n]=(0,t.useState)(0);return{instance:e,rerender:(0,t.useCallback)(()=>{n(e=>e+1)},[n])}},q=(e,n)=>{const{t:a,isLoading:i}=((e,n)=>{const{mi18n:a,options:i}=G(),o=r(e),c=s(o).join(":"),g=Object.assign(Object.assign({},i),n),{rerender:u,instance:l}=Y(),d=(0,t.useRef)(),p=(0,t.useRef)([]);p.current=[];const f=a.isLoaded(o);(0,t.useEffect)(()=>{const e=a.onNsUpdate(u);return d.current=e,e.subscribeNs(o),p.current.forEach(n=>{e.subscribeNs(n)}),()=>{e.unsubscribe()}},[c,a]),(0,t.useEffect)(()=>(a.addActiveNs(o),()=>a.removeActiveNs(o)),[c,a]);const v=(0,t.useCallback)(e=>{var n;const t=null!==(n=e.ns)&&void 0!==n?n:null==o?void 0:o[0];return(e=>{var n;p.current.push(e),null===(n=d.current)||void 0===n||n.subscribeNs(e)})(t),a.t(Object.assign(Object.assign({},e),{ns:t}))},[a,l]);if(g.useSuspense&&!f)throw a.addActiveNs(o,!0);return{t:v,isLoading:!f}})(e,n);return{t:(0,t.useCallback)((...e)=>a(k(...e)),[a]),isLoading:i}},H=e=>{const{mi18n:n}=G(),{rerender:a}=Y();return(0,t.useEffect)(()=>{const t=null==e?void 0:e.map(e=>n.on(e,a));return()=>{null==t||t.forEach(e=>e.unsubscribe())}},[null==e?void 0:e.join(":")]),n};export{I as a,_ as c,C as i,M as l,H as n,$ as o,q as r,K as s,X as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as r}from"./rolldown-runtime-
|
|
1
|
+
import{n as r}from"./rolldown-runtime-Cmsah3SL.js";import{Ai as e,ji as t}from"./esm-D3qvBzlk.js";function o(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),t.push.apply(t,o)}return t}function n(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){e(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var c=r(()=>{t()});export{c as n,n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r}from"./rolldown-runtime-
|
|
1
|
+
import{t as r}from"./rolldown-runtime-Cmsah3SL.js";import{F as t,d as n}from"./function-CrEuBBd9.js";import{At as e,Sn as o}from"./esm-D3qvBzlk.js";var s=/* @__PURE__ */r((r,s)=>{var a=t(),u=n(),i=e(),c=o();s.exports=function(r,t){if(null==r)return{};var n=a(c(r),function(r){return[r]});return t=u(t),i(r,n,function(r,n){return t(r,n[0])})}}),a=/* @__PURE__ */r((r,t)=>{t.exports=function(r){if("function"!=typeof r)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!r.call(this);case 1:return!r.call(this,t[0]);case 2:return!r.call(this,t[0],t[1]);case 3:return!r.call(this,t[0],t[1],t[2])}return!r.apply(this,t)}}}),u=/* @__PURE__ */r((r,t)=>{var e=n(),o=a(),u=s();t.exports=function(r,t){return u(r,o(e(t)))}});export{s as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DcYi-9oA.js";var t=/* @__PURE__ */e((e,t)=>{var i,r;i=e,r=function e(){var t,i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,s={},a=0,o={};function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new c(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(s=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,s)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&w(this._config.beforeFirstChunk)&&void 0!==(s=this._config.beforeFirstChunk(e))&&(e=s),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var s=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=s.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),s&&s.data&&(this._rowCount+=s.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,n)i.postMessage({results:s,workerId:o.WORKER_ID,finished:r});else if(w(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):n&&this._config.error&&i.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),h.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,i=this._config.downloadRequestHeaders;for(e in i)t.setRequestHeader(e,i[e])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(new Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),h.call(this,e);var t,i,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,n=(this._config.chunkSize&&(n=Math.min(this._start+this._config.chunkSize,this._input.size),e=i.call(e,this._start,n)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;h.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,i;if(!this._finished)return e=this._config.chunkSize,t=e?(i=t.substring(0,e),t.substring(e)):(i=t,""),this._finished=!t,this.parseChunk(i)}}function l(e){h.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t,i,r,n,s=Math.pow(2,53),a=-s,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,l=0,c=!1,_=!1,m=[],y={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(y&&r&&(R("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!v(e)})),b()){if(y)if(Array.isArray(y.data[0])){for(var t=0;b()&&t<y.data.length;t++)y.data[t].forEach(d);y.data.splice(0,1)}else y.data.forEach(d);function d(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),m.push(t)}}function i(t,i){for(var r=e.header?{}:[],n=0;n<t.length;n++){var o=n,d=t[n];d=((t,i)=>(t=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&((e=>{if(h.test(e)&&(e=parseFloat(e),a<e&&e<s))return 1})(i)?parseFloat(i):u.test(i)?new Date(i):""===i?null:i):i)(o=e.header?n>=m.length?"__parsed_extra":m[n]:o,d=e.transform?e.transform(d,o):d),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(d)):r[o]=d}return e.header&&(n>m.length?R("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,l+i):n<m.length&&R("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,l+i)),r}var n;y&&(e.header||e.dynamicTyping||e.transform)&&(n=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),n=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=m),l+=n)}function b(){return e.header&&0===m.length}function R(e,t,i,r){e={type:e,code:t,message:i},void 0!==r&&(e.row=r),y.errors.push(e)}w(e.step)&&(n=e.step,e.step=function(t){y=t,b()?E():(E(),0!==y.data.length&&(f+=t.data.length,e.preview&&f>e.preview?i.abort():(y.data=y.data[0],n(y,d))))}),this.parse=function(n,s,a){var h=e.quoteChar||'"';return e.newline||(e.newline=this.guessLineEndings(n,h)),r=!1,e.delimiter?w(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter):((h=((t,i,r,n,s)=>{var a,h,u,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<s.length;f++){for(var l,c=s[f],p=0,_=0,m=0,y=(u=void 0,new g({comments:n,delimiter:c,newline:i,preview:10}).parse(t)),k=0;k<y.data.length;k++)r&&v(y.data[k])?m++:(_+=l=y.data[k].length,void 0===u?u=l:0<l&&(p+=Math.abs(l-u),u=l));0<y.data.length&&(_/=y.data.length-m),(void 0===h||p<=h)&&(void 0===d||d<_)&&1.99<_&&(h=p,a=c,d=_)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=h.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),h=k(e),e.preview&&e.header&&h.preview++,t=n,i=new g(h),y=i.parse(t,s,a),E(),c?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(c=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,i.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=new RegExp(p(t)+"([^]*?)"+p(t),"gm");var i=(e=e.replace(t,"")).split("\r");if(e=1<(t=e.split("\n")).length&&t[0].length<i[0].length,1===i.length||e)return"\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,i=e.newline,r=e.comments,n=e.step,s=e.preview,a=e.fastMode,h=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<o.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var l=0,c=!1;this.parse=function(o,g,_){if("string"!=typeof o)throw new Error("Input must be a string");var m=o.length,y=t.length,k=i.length,v=r.length,E=w(n),b=[],R=[],C=[],S=l=0;if(!o)return P();if(a||!1!==a&&-1===o.indexOf(d)){for(var O=o.split(i),x=0;x<O.length;x++){if(C=O[x],l+=C.length,x!==O.length-1)l+=i.length;else if(_)return P();if(!r||C.substring(0,v)!==r){if(E){if(b=[],F(C.split(t)),U(),c)return P()}else F(C.split(t));if(s&&s<=x)return b=b.slice(0,s),P(!0)}}return P()}for(var I=o.indexOf(t,l),A=o.indexOf(i,l),T=new RegExp(p(f)+p(d),"g"),D=o.indexOf(d,l);;)if(o[l]===d)for(D=l,l++;;){if(-1===(D=o.indexOf(d,D+1)))return _||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),z();if(D===m-1)return z(o.substring(l,D).replace(T,d));if(d===f&&o[D+1]===f)D++;else if(d===f||0===D||o[D-1]!==f){-1!==I&&I<D+1&&(I=o.indexOf(t,D+1));var L=j(-1===(A=-1!==A&&A<D+1?o.indexOf(i,D+1):A)?I:Math.min(I,A));if(o.substr(D+1+L,y)===t){C.push(o.substring(l,D).replace(T,d)),o[l=D+1+L+y]!==d&&(D=o.indexOf(d,l)),I=o.indexOf(t,l),A=o.indexOf(i,l);break}if(L=j(A),o.substring(D+1+L,D+1+L+k)===i){if(C.push(o.substring(l,D).replace(T,d)),M(D+1+L+k),I=o.indexOf(t,l),D=o.indexOf(d,l),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),D++}}else if(r&&0===C.length&&o.substring(l,l+v)===r){if(-1===A)return P();l=A+k,A=o.indexOf(i,l),I=o.indexOf(t,l)}else if(-1!==I&&(I<A||-1===A))C.push(o.substring(l,I)),l=I+y,I=o.indexOf(t,l);else{if(-1===A)break;if(C.push(o.substring(l,A)),M(A+k),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0)}return z();function F(e){b.push(e),S=l}function j(e){return-1!==e&&(e=o.substring(D+1,e))&&""===e.trim()?e.length:0}function z(e){return _||(void 0===e&&(e=o.substring(l)),C.push(e),l=m,F(C),E&&U()),P()}function M(e){l=e,F(C),C=[],A=o.indexOf(i,l)}function P(r){if(e.header&&!g&&b.length&&!u){var n=b[0],s=Object.create(null),a=new Set(n);let t=!1;for(let i=0;i<n.length;i++){let r=n[i];if(s[r=w(e.transformHeader)?e.transformHeader(r,i):r]){let e,o=s[r];for(;e=r+"_"+o,o++,a.has(e););a.add(e),n[i]=e,s[r]++,t=!0,(h=null===h?{}:h)[e]=r}else s[r]=1,n[i]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:b,errors:R,meta:{delimiter:t,linebreak:i,aborted:c,truncated:!!r,cursor:S+(g||0),renamedHeaders:h}}}function U(){n(P()),b=[],R=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function _(e){var t=e.data,i=s[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!r);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=s[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete s[e]}function y(){throw new Error("Not implemented.")}function k(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=k(e[t]);return i}function v(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return o.parse=function(t,r){var n=(r=r||{}).dynamicTyping||!1;if(w(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!w(r.transform)&&r.transform,!r.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(t),n=new(r.download?u:f)(r)):!0===t.readable&&w(t.read)&&w(t.on)?n=new l(r):(i.File&&t instanceof File||t instanceof Object)&&(n=new d(r)),n.stream(t);(n=(()=>{var t;return!!o.WORKERS_SUPPORTED&&(t=(()=>{var t=i.URL||i.webkitURL||null,r=e.toString();return o.BLOB_URL||(o.BLOB_URL=t.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))})(),(t=new i.Worker(t)).onmessage=_,t.id=a++,s[t.id]=t)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,n.postMessage({input:t,config:r,workerId:n.id})},o.unparse=function(e,t){var i=!1,r=!0,n=",",s="\r\n",a='"',h=a+a,u=!1,d=null,f=!1,l=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(h=t.escapeChar+a),t.escapeFormulae instanceof RegExp?f=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(f=/^[=+\-@\t\r].*$/)}})(),new RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return c(null,e,u);if("object"==typeof e[0])return c(d||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),c(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function c(e,t,i){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),h=!Array.isArray(t[0]);if(o&&r){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var f=(o?e:t[d]).length,l=!1,c=o?0===Object.keys(t[d]).length:0===t[d].length;if(i&&!o&&(l="greedy"===i?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===i&&o){for(var p=[],_=0;_<f;_++){var m=h?e[_]:_;p.push(t[d][m])}l=""===p.join("").trim()}if(!l){for(var y=0;y<f;y++){0<y&&!c&&(a+=n);var k=o&&h?e[y]:y;a+=g(t[d][k],y)}d<t.length-1&&(!i||0<f&&!c)&&(a+=s)}}return a}function g(e,t){var r,s;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(s=!1,f&&"string"==typeof e&&f.test(e)&&(e="'"+e,s=!0),r=e.toString().replace(l,h),(s=s||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1})(r,o.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!r&&!!i.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=c,o.NetworkStreamer=u,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=l,i.jQuery&&((t=i.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(e){if("INPUT"!==t(this).prop("tagName").toUpperCase()||"file"!==t(this).attr("type").toLowerCase()||!i.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)n.push({file:this.files[s],inputElem:this,instanceConfig:t.extend({},r)})}),s(),this;function s(){if(0===n.length)w(e.complete)&&e.complete();else{var i,r,s,h=n[0];if(w(e.before)){var u=e.before(h.file,h.inputElem);if("object"==typeof u){if("abort"===u.action)return i=h.file,r=h.inputElem,s=u.reason,void(w(e.error)&&e.error({name:"AbortError"},i,r,s));if("skip"===u.action)return void a();"object"==typeof u.config&&(h.instanceConfig=t.extend(h.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=h.instanceConfig.complete;h.instanceConfig.complete=function(e){w(d)&&d(e,h.file,h.inputElem),a()},o.parse(h.file,h.instanceConfig)}}function a(){n.splice(0,1),s()}}),n&&(i.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?i.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(i.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&i.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(h.prototype)).constructor=u,(d.prototype=Object.create(h.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(l.prototype=Object.create(h.prototype)).constructor=l,o},"function"==typeof define&&define.amd?define([],r):"object"==typeof t&&void 0!==e?t.exports=r():i.Papa=r()});export default t();
|
|
1
|
+
import{t as e}from"./rolldown-runtime-Cmsah3SL.js";var t=/* @__PURE__ */e((e,t)=>{var i,r;i=e,r=function e(){var t,i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,s={},a=0,o={};function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new c(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(s=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,s)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&w(this._config.beforeFirstChunk)&&void 0!==(s=this._config.beforeFirstChunk(e))&&(e=s),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var s=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=s.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),s&&s.data&&(this._rowCount+=s.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,n)i.postMessage({results:s,workerId:o.WORKER_ID,finished:r});else if(w(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):n&&this._config.error&&i.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),h.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,i=this._config.downloadRequestHeaders;for(e in i)t.setRequestHeader(e,i[e])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(new Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),h.call(this,e);var t,i,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,n=(this._config.chunkSize&&(n=Math.min(this._start+this._config.chunkSize,this._input.size),e=i.call(e,this._start,n)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;h.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,i;if(!this._finished)return e=this._config.chunkSize,t=e?(i=t.substring(0,e),t.substring(e)):(i=t,""),this._finished=!t,this.parseChunk(i)}}function l(e){h.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t,i,r,n,s=Math.pow(2,53),a=-s,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,l=0,c=!1,_=!1,m=[],y={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(y&&r&&(R("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!v(e)})),b()){if(y)if(Array.isArray(y.data[0])){for(var t=0;b()&&t<y.data.length;t++)y.data[t].forEach(d);y.data.splice(0,1)}else y.data.forEach(d);function d(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),m.push(t)}}function i(t,i){for(var r=e.header?{}:[],n=0;n<t.length;n++){var o=n,d=t[n];d=((t,i)=>(t=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&((e=>{if(h.test(e)&&(e=parseFloat(e),a<e&&e<s))return 1})(i)?parseFloat(i):u.test(i)?new Date(i):""===i?null:i):i)(o=e.header?n>=m.length?"__parsed_extra":m[n]:o,d=e.transform?e.transform(d,o):d),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(d)):r[o]=d}return e.header&&(n>m.length?R("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,l+i):n<m.length&&R("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,l+i)),r}var n;y&&(e.header||e.dynamicTyping||e.transform)&&(n=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),n=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=m),l+=n)}function b(){return e.header&&0===m.length}function R(e,t,i,r){e={type:e,code:t,message:i},void 0!==r&&(e.row=r),y.errors.push(e)}w(e.step)&&(n=e.step,e.step=function(t){y=t,b()?E():(E(),0!==y.data.length&&(f+=t.data.length,e.preview&&f>e.preview?i.abort():(y.data=y.data[0],n(y,d))))}),this.parse=function(n,s,a){var h=e.quoteChar||'"';return e.newline||(e.newline=this.guessLineEndings(n,h)),r=!1,e.delimiter?w(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter):((h=((t,i,r,n,s)=>{var a,h,u,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<s.length;f++){for(var l,c=s[f],p=0,_=0,m=0,y=(u=void 0,new g({comments:n,delimiter:c,newline:i,preview:10}).parse(t)),k=0;k<y.data.length;k++)r&&v(y.data[k])?m++:(_+=l=y.data[k].length,void 0===u?u=l:0<l&&(p+=Math.abs(l-u),u=l));0<y.data.length&&(_/=y.data.length-m),(void 0===h||p<=h)&&(void 0===d||d<_)&&1.99<_&&(h=p,a=c,d=_)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=h.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),h=k(e),e.preview&&e.header&&h.preview++,t=n,i=new g(h),y=i.parse(t,s,a),E(),c?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(c=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,i.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=new RegExp(p(t)+"([^]*?)"+p(t),"gm");var i=(e=e.replace(t,"")).split("\r");if(e=1<(t=e.split("\n")).length&&t[0].length<i[0].length,1===i.length||e)return"\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,i=e.newline,r=e.comments,n=e.step,s=e.preview,a=e.fastMode,h=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<o.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var l=0,c=!1;this.parse=function(o,g,_){if("string"!=typeof o)throw new Error("Input must be a string");var m=o.length,y=t.length,k=i.length,v=r.length,E=w(n),b=[],R=[],C=[],S=l=0;if(!o)return P();if(a||!1!==a&&-1===o.indexOf(d)){for(var O=o.split(i),x=0;x<O.length;x++){if(C=O[x],l+=C.length,x!==O.length-1)l+=i.length;else if(_)return P();if(!r||C.substring(0,v)!==r){if(E){if(b=[],F(C.split(t)),U(),c)return P()}else F(C.split(t));if(s&&s<=x)return b=b.slice(0,s),P(!0)}}return P()}for(var I=o.indexOf(t,l),A=o.indexOf(i,l),T=new RegExp(p(f)+p(d),"g"),D=o.indexOf(d,l);;)if(o[l]===d)for(D=l,l++;;){if(-1===(D=o.indexOf(d,D+1)))return _||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),z();if(D===m-1)return z(o.substring(l,D).replace(T,d));if(d===f&&o[D+1]===f)D++;else if(d===f||0===D||o[D-1]!==f){-1!==I&&I<D+1&&(I=o.indexOf(t,D+1));var L=j(-1===(A=-1!==A&&A<D+1?o.indexOf(i,D+1):A)?I:Math.min(I,A));if(o.substr(D+1+L,y)===t){C.push(o.substring(l,D).replace(T,d)),o[l=D+1+L+y]!==d&&(D=o.indexOf(d,l)),I=o.indexOf(t,l),A=o.indexOf(i,l);break}if(L=j(A),o.substring(D+1+L,D+1+L+k)===i){if(C.push(o.substring(l,D).replace(T,d)),M(D+1+L+k),I=o.indexOf(t,l),D=o.indexOf(d,l),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),D++}}else if(r&&0===C.length&&o.substring(l,l+v)===r){if(-1===A)return P();l=A+k,A=o.indexOf(i,l),I=o.indexOf(t,l)}else if(-1!==I&&(I<A||-1===A))C.push(o.substring(l,I)),l=I+y,I=o.indexOf(t,l);else{if(-1===A)break;if(C.push(o.substring(l,A)),M(A+k),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0)}return z();function F(e){b.push(e),S=l}function j(e){return-1!==e&&(e=o.substring(D+1,e))&&""===e.trim()?e.length:0}function z(e){return _||(void 0===e&&(e=o.substring(l)),C.push(e),l=m,F(C),E&&U()),P()}function M(e){l=e,F(C),C=[],A=o.indexOf(i,l)}function P(r){if(e.header&&!g&&b.length&&!u){var n=b[0],s=Object.create(null),a=new Set(n);let t=!1;for(let i=0;i<n.length;i++){let r=n[i];if(s[r=w(e.transformHeader)?e.transformHeader(r,i):r]){let e,o=s[r];for(;e=r+"_"+o,o++,a.has(e););a.add(e),n[i]=e,s[r]++,t=!0,(h=null===h?{}:h)[e]=r}else s[r]=1,n[i]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:b,errors:R,meta:{delimiter:t,linebreak:i,aborted:c,truncated:!!r,cursor:S+(g||0),renamedHeaders:h}}}function U(){n(P()),b=[],R=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function _(e){var t=e.data,i=s[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!r);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=s[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete s[e]}function y(){throw new Error("Not implemented.")}function k(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=k(e[t]);return i}function v(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return o.parse=function(t,r){var n=(r=r||{}).dynamicTyping||!1;if(w(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!w(r.transform)&&r.transform,!r.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(t),n=new(r.download?u:f)(r)):!0===t.readable&&w(t.read)&&w(t.on)?n=new l(r):(i.File&&t instanceof File||t instanceof Object)&&(n=new d(r)),n.stream(t);(n=(()=>{var t;return!!o.WORKERS_SUPPORTED&&(t=(()=>{var t=i.URL||i.webkitURL||null,r=e.toString();return o.BLOB_URL||(o.BLOB_URL=t.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))})(),(t=new i.Worker(t)).onmessage=_,t.id=a++,s[t.id]=t)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,n.postMessage({input:t,config:r,workerId:n.id})},o.unparse=function(e,t){var i=!1,r=!0,n=",",s="\r\n",a='"',h=a+a,u=!1,d=null,f=!1,l=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(h=t.escapeChar+a),t.escapeFormulae instanceof RegExp?f=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(f=/^[=+\-@\t\r].*$/)}})(),new RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return c(null,e,u);if("object"==typeof e[0])return c(d||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),c(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function c(e,t,i){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),h=!Array.isArray(t[0]);if(o&&r){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var f=(o?e:t[d]).length,l=!1,c=o?0===Object.keys(t[d]).length:0===t[d].length;if(i&&!o&&(l="greedy"===i?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===i&&o){for(var p=[],_=0;_<f;_++){var m=h?e[_]:_;p.push(t[d][m])}l=""===p.join("").trim()}if(!l){for(var y=0;y<f;y++){0<y&&!c&&(a+=n);var k=o&&h?e[y]:y;a+=g(t[d][k],y)}d<t.length-1&&(!i||0<f&&!c)&&(a+=s)}}return a}function g(e,t){var r,s;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(s=!1,f&&"string"==typeof e&&f.test(e)&&(e="'"+e,s=!0),r=e.toString().replace(l,h),(s=s||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1})(r,o.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!r&&!!i.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=c,o.NetworkStreamer=u,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=l,i.jQuery&&((t=i.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(e){if("INPUT"!==t(this).prop("tagName").toUpperCase()||"file"!==t(this).attr("type").toLowerCase()||!i.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)n.push({file:this.files[s],inputElem:this,instanceConfig:t.extend({},r)})}),s(),this;function s(){if(0===n.length)w(e.complete)&&e.complete();else{var i,r,s,h=n[0];if(w(e.before)){var u=e.before(h.file,h.inputElem);if("object"==typeof u){if("abort"===u.action)return i=h.file,r=h.inputElem,s=u.reason,void(w(e.error)&&e.error({name:"AbortError"},i,r,s));if("skip"===u.action)return void a();"object"==typeof u.config&&(h.instanceConfig=t.extend(h.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=h.instanceConfig.complete;h.instanceConfig.complete=function(e){w(d)&&d(e,h.file,h.inputElem),a()},o.parse(h.file,h.instanceConfig)}}function a(){n.splice(0,1),s()}}),n&&(i.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?i.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(i.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&i.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(h.prototype)).constructor=u,(d.prototype=Object.create(h.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(l.prototype=Object.create(h.prototype)).constructor=l,o},"function"==typeof define&&define.amd?define([],r):"object"==typeof t&&void 0!==e?t.exports=r():i.Papa=r()});export default t();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DcYi-9oA.js";var t=/* @__PURE__ */e(e=>{var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,m={};function h(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||d}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=h.prototype;var g=b.prototype=new v;g.constructor=b,y(g,h.prototype),g.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function C(e,r,n){var o,a={},u=null,i=null;if(null!=r)for(o in void 0!==r.ref&&(i=r.ref),void 0!==r.key&&(u=""+r.key),r)w.call(r,o)&&!k.hasOwnProperty(o)&&(a[o]=r[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:t,type:e,key:u,ref:i,props:a,_owner:S.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var O=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function j(e,n,o,a,u){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c=!1;if(null===e)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case t:case r:c=!0}}if(c)return u=u(c=e),e=""===a?"."+E(c,0):a,_(u)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),j(u,n,o,"",function(e){return e})):null!=u&&(R(u)&&(u=function(e,r){return{$$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}(u,o+(!u.key||c&&c.key===u.key?"":(""+u.key).replace(O,"$&/")+"/")+e)),n.push(u)),1;if(c=0,a=""===a?".":a+":",_(e))for(var s=0;s<e.length;s++){var l=a+E(i=e[s],s);c+=j(i,n,o,l,u)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)c+=j(i=i.value,n,o,l=a+E(i,s++),u);else if("object"===i)throw n=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return c}function P(e,t,r){if(null==e)return e;var n=[],o=0;return j(e,n,"","",function(e){return t.call(r,e,o++)}),n}function $(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T={current:null},x={transition:null},D={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:x,ReactCurrentOwner:S};function I(){throw Error("act(...) is not supported in production builds of React.")}e.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=h,e.Fragment=n,e.Profiler=a,e.PureComponent=b,e.StrictMode=o,e.Suspense=s,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,e.act=I,e.cloneElement=function(e,r,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=y({},e.props),a=e.key,u=e.ref,i=e._owner;if(null!=r){if(void 0!==r.ref&&(u=r.ref,i=S.current),void 0!==r.key&&(a=""+r.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in r)w.call(r,s)&&!k.hasOwnProperty(s)&&(o[s]=void 0===r[s]&&void 0!==c?c[s]:r[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:t,type:e.type,key:a,ref:u,props:o,_owner:i}},e.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},e.createElement=C,e.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=R,e.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:$}},e.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=x.transition;x.transition={};try{e()}finally{x.transition=t}},e.unstable_act=I,e.useCallback=function(e,t){return T.current.useCallback(e,t)},e.useContext=function(e){return T.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return T.current.useDeferredValue(e)},e.useEffect=function(e,t){return T.current.useEffect(e,t)},e.useId=function(){return T.current.useId()},e.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.current.useMemo(e,t)},e.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},e.useRef=function(e){return T.current.useRef(e)},e.useState=function(e){return T.current.useState(e)},e.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},e.useTransition=function(){return T.current.useTransition()},e.version="18.3.1"}),r=/* @__PURE__ */e((e,t)=>{"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */new Error);var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator;function h(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}var v={current:null},b={transition:null},g={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},_={current:null},w={},S=null;function k(e){S=e}w.setExtraStackFrame=function(e){S=e},w.getCurrentStack=null,w.getStackAddendum=function(){var e="";S&&(e+=S);var t=w.getCurrentStack;return t&&(e+=t()||""),e};var C={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:b,ReactCurrentOwner:_};function R(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];E("warn",e,r)}function O(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];E("error",e,r)}function E(e,t,r){var n=C.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map(function(e){return String(e)});o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}C.ReactDebugCurrentFrame=w,C.ReactCurrentActQueue=g;var j={};function P(e,t){var r=e.constructor,n=r&&(r.displayName||r.name)||"ReactClass",o=n+"."+t;j[o]||(O("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,n),j[o]=!0)}var $={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){P(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){P(e,"replaceState")},enqueueSetState:function(e,t,r,n){P(e,"setState")}},T=Object.assign,x={};function D(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||$}Object.freeze(x),D.prototype.isReactComponent={},D.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},D.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var I={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},L=function(e,t){Object.defineProperty(D.prototype,e,{get:function(){R("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var N in I)I.hasOwnProperty(N)&&L(N,I[N]);function A(){}function F(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||$}A.prototype=D.prototype;var M=F.prototype=new A;M.constructor=F,T(M,D.prototype),M.isPureReactComponent=!0;var V=Array.isArray;function U(e){return V(e)}function z(e){return""+e}function q(e){if(function(e){try{return z(e),!1}catch(t){return!0}}(e))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),z(e)}function B(e){return e.displayName||"Context"}function Y(e){if(null==e)return null;if("number"==typeof e.tag&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case u:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return B(e)+".Consumer";case i:return B(e._context)+".Provider";case s:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:Y(e.type)||"Memo";case d:var r=e,y=r._payload,m=r._init;try{return Y(m(y))}catch(h){return null}}return null}var H,W,G=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0},J={};function X(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function Q(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var Z=function(e,t,n,o,a,u,i){var c={$$typeof:r,type:e,key:t,ref:n,props:i,_owner:u,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function ee(e,t,r){var n,o={},a=null,u=null,i=null,c=null;if(null!=t)for(n in X(t)&&(u=t.ref,function(e){if("string"==typeof e.ref&&_.current&&e.__self&&_.current.stateNode!==e.__self){var t=Y(_.current.type);J[t]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),J[t]=!0)}}(t)),Q(t)&&(q(t.key),a=""+t.key),i=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source,t)G.call(t,n)&&!K.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(1===s)o.children=r;else if(s>1){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];Object.freeze&&Object.freeze(l),o.children=l}if(e&&e.defaultProps){var p=e.defaultProps;for(n in p)void 0===o[n]&&(o[n]=p[n])}if(a||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var r=function(){H||(H=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,d),u&&function(e,t){var r=function(){W||(W=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(o,d)}return Z(e,a,u,i,c,_.current,o)}function te(e,t,r){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,a=T({},e.props),u=e.key,i=e.ref,c=e._self,s=e._source,l=e._owner;if(null!=t)for(n in X(t)&&(i=t.ref,l=_.current),Q(t)&&(q(t.key),u=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)G.call(t,n)&&!K.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?a[n]=o[n]:a[n]=t[n]);var f=arguments.length-2;if(1===f)a.children=r;else if(f>1){for(var p=Array(f),d=0;d<f;d++)p[d]=arguments[d+2];a.children=p}return Z(e.type,u,i,c,s,l,a)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var ne=!1,oe=/\/+/g;function ae(e){return e.replace(oe,"$&/")}function ue(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(q(e.key),r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function ie(e,t,o,a,u){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c,s,l,f=!1;if(null===e)f=!0;else switch(i){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case r:case n:f=!0}}if(f){var p=e,d=u(p),y=""===a?"."+ue(p,0):a;if(U(d)){var m="";null!=y&&(m=ae(y)+"/"),ie(d,t,m,"",function(e){return e})}else null!=d&&(re(d)&&(!d.key||p&&p.key===d.key||q(d.key),c=d,s=o+(!d.key||p&&p.key===d.key?"":ae(""+d.key)+"/")+y,d=Z(c.type,s,c.ref,c._self,c._source,c._owner,c.props)),t.push(d));return 1}var v=0,b=""===a?".":a+":";if(U(e))for(var g=0;g<e.length;g++)v+=ie(l=e[g],t,o,b+ue(l,g),u);else{var _=h(e);if("function"==typeof _){var w=e;_===w.entries&&(ne||R("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ne=!0);for(var S,k=_.call(w),C=0;!(S=k.next()).done;)v+=ie(l=S.value,t,o,b+ue(l,C++),u)}else if("object"===i){var O=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===O?"object with keys {"+Object.keys(e).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}}return v}function ce(e,t,r){if(null==e)return e;var n=[],o=0;return ie(e,n,"","",function(e){return t.call(r,e,o++)}),n}function se(e){if(-1===e._status){var t=(0,e._result)();if(t.then(function(t){if(0===e._status||-1===e._status){var r=e;r._status=1,r._result=t}},function(t){if(0===e._status||-1===e._status){var r=e;r._status=2,r._result=t}}),-1===e._status){var r=e;r._status=0,r._result=t}}if(1===e._status){var n=e._result;return void 0===n&&O("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",n),"default"in n||O("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",n),n.default}throw e._result}var le=Symbol.for("react.module.reference");function fe(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===a||e===l||e===f||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===i||e.$$typeof===c||e.$$typeof===s||e.$$typeof===le||void 0!==e.getModuleId)}function pe(){var e=v.current;return null===e&&O("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}var de,ye,me,he,ve,be,ge,_e=0;function we(){}we.__reactDisabledLog=!0;var Se,ke=C.ReactCurrentDispatcher;function Ce(e,t,r){if(void 0===Se)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Se=n&&n[1]||""}return"\n"+Se+e}var Re=!1,Oe=new("function"==typeof WeakMap?WeakMap:Map);function Ee(e,t){if(!e||Re)return"";var r,n=Oe.get(e);if(void 0!==n)return n;Re=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a=ke.current;ke.current=null,function(){if(0===_e){de=console.log,ye=console.info,me=console.warn,he=console.error,ve=console.group,be=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_e++}();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(u,[])}catch(y){r=y}Reflect.construct(e,[],u)}else{try{u.call()}catch(y){r=y}e.call(u.prototype)}}else{try{throw Error()}catch(y){r=y}e()}}catch(m){if(m&&r&&"string"==typeof m.stack){for(var i=m.stack.split("\n"),c=r.stack.split("\n"),s=i.length-1,l=c.length-1;s>=1&&l>=0&&i[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(i[s]!==c[l]){if(1!==s||1!==l)do{if(s--,--l<0||i[s]!==c[l]){var f="\n"+i[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Oe.set(e,f),f}}while(s>=1&&l>=0);break}}}finally{Re=!1,ke.current=a,function(){if(0===--_e){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:de}),info:T({},e,{value:ye}),warn:T({},e,{value:me}),error:T({},e,{value:he}),group:T({},e,{value:ve}),groupCollapsed:T({},e,{value:be}),groupEnd:T({},e,{value:ge})})}_e<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var p=e?e.displayName||e.name:"",d=p?Ce(p):"";return"function"==typeof e&&Oe.set(e,d),d}function je(e,t,r){if(null==e)return"";if("function"==typeof e)return Ee(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ce(e);switch(e){case l:return Ce("Suspense");case f:return Ce("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case s:return Ee(e.render,!1);case p:return je(e.type,t,r);case d:var n=e,o=n._payload,a=n._init;try{return je(a(o),t,r)}catch(u){}}return""}var Pe={},$e=C.ReactDebugCurrentFrame;function Te(e){if(e){var t=e._owner,r=je(e.type,e._source,t?t.type:null);$e.setExtraStackFrame(r)}else $e.setExtraStackFrame(null)}function xe(e){if(e){var t=e._owner;k(je(e.type,e._source,t?t.type:null))}else k(null)}var De=!1;function Ie(){if(_.current){var e=Y(_.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var Le={};function Ne(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=Ie();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!Le[r]){Le[r]=!0;var n="";e&&e._owner&&e._owner!==_.current&&(n=" It was passed a child from "+Y(e._owner.type)+"."),xe(e),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),xe(null)}}}function Ae(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];re(n)&&Ne(n,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=h(e);if("function"==typeof o&&o!==e.entries)for(var a,u=o.call(e);!(a=u.next()).done;)re(a.value)&&Ne(a.value,t)}}function Fe(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r;if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==s&&t.$$typeof!==p)return;r=t.propTypes}if(r){var n=Y(t);!function(e,t,r,n,o){var a=Function.call.bind(G);for(var u in e)if(a(e,u)){var i=void 0;try{if("function"!=typeof e[u]){var c=Error((n||"React class")+": "+r+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}i=e[u](t,u,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){i=s}!i||i instanceof Error||(Te(o),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,u,typeof i),Te(null)),i instanceof Error&&!(i.message in Pe)&&(Pe[i.message]=!0,Te(o),O("Failed %s type: %s",r,i.message),Te(null))}}(r,e.props,"prop",n,e)}else void 0===t.PropTypes||De||(De=!0,O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y(t)||"Unknown"));"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Me(e,t,n){var a,u,i=fe(e);if(!i){var c,s="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),s+=(null!=(a=t)&&void 0!==(u=a.__source)?"\n\nCheck your code at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+".":"")||Ie(),null===e?c="null":U(e)?c="array":void 0!==e&&e.$$typeof===r?(c="<"+(Y(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,O("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,s)}var l=ee.apply(this,arguments);if(null==l)return l;if(i)for(var f=2;f<arguments.length;f++)Ae(arguments[f],e);return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){xe(e),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),xe(null);break}}null!==e.ref&&(xe(e),O("Invalid attribute `ref` supplied to `React.Fragment`."),xe(null))}(l):Fe(l),l}var Ve=!1,Ue=!1,ze=null,qe=0,Be=!1;function Ye(e){var t=qe;qe++,null===g.current&&(g.current=[]);var r,n=g.isBatchingLegacy;try{if(g.isBatchingLegacy=!0,r=e(),!n&&g.didScheduleLegacyUpdate){var o=g.current;null!==o&&(g.didScheduleLegacyUpdate=!1,Ke(o))}}catch(O){throw He(t),O}finally{g.isBatchingLegacy=n}if(null!==r&&"object"==typeof r&&"function"==typeof r.then){var a=r,u=!1,i={then:function(e,r){u=!0,a.then(function(n){He(t),0===qe?We(n,e,r):e(n)},function(e){He(t),r(e)})}};return Be||"undefined"==typeof Promise||Promise.resolve().then(function(){}).then(function(){u||(Be=!0,O("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),i}var c=r;if(He(t),0===qe){var s=g.current;return null!==s&&(Ke(s),g.current=null),{then:function(e,t){null===g.current?(g.current=[],We(c,e,t)):e(c)}}}return{then:function(e,t){e(c)}}}function He(e){e!==qe-1&&O("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),qe=e}function We(e,r,n){var o=g.current;if(null!==o)try{Ke(o),function(){if(null===ze)try{var a=("require"+Math.random()).slice(0,7);ze=(t&&t[a]).call(t,"timers").setImmediate}catch(u){ze=function(e){!1===Ue&&(Ue=!0,"undefined"==typeof MessageChannel&&O("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}ze(function(){0===o.length?(g.current=null,r(e)):We(e,r,n)})}()}catch(O){n(O)}else r(e)}var Ge=!1;function Ke(e){if(!Ge){Ge=!0;var t=0;try{for(;t<e.length;t++){var r=e[t];do{r=r(!0)}while(null!==r)}e.length=0}catch(O){throw e=e.slice(t+1),O}finally{Ge=!1}}}var Je=Me,Xe={map:ce,forEach:function(e,t,r){ce(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ce(e,function(){t++}),t},toArray:function(e){return ce(e,function(e){return e})||[]},only:function(e){if(!re(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};e.Children=Xe,e.Component=D,e.Fragment=o,e.Profiler=u,e.PureComponent=F,e.StrictMode=a,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,e.act=Ye,e.cloneElement=function(e,t,r){for(var n=te.apply(this,arguments),o=2;o<arguments.length;o++)Ae(arguments[o],n.type);return Fe(n),n},e.createContext=function(e){var t={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:i,_context:t};var r=!1,n=!1,o=!1,a={$$typeof:c,_context:t};return Object.defineProperties(a,{Provider:{get:function(){return n||(n=!0,O("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return r||(r=!0,O("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){o||(R("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),o=!0)}}}),t.Consumer=a,t._currentRenderer=null,t._currentRenderer2=null,t},e.createElement=Je,e.createFactory=function(e){var t=Me.bind(null,e);return t.type=e,Ve||(Ve=!0,R("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return R("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){null!=e&&e.$$typeof===p?O("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?O("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&O("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||O("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,r={$$typeof:s,render:e};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(r){t=r,e.name||e.displayName||(e.displayName=r)}}),r},e.isValidElement=re,e.lazy=function(e){var t,r,n={$$typeof:d,_payload:{_status:-1,_result:e},_init:se};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){O("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){O("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},e.memo=function(e,t){fe(e)||O("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var r,n={$$typeof:p,type:e,compare:void 0===t?null:t};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(t){r=t,e.name||e.displayName||(e.displayName=t)}}),n},e.startTransition=function(e,t){var r=b.transition;b.transition={};var n=b.transition;b.transition._updatedFibers=/* @__PURE__ */new Set;try{e()}finally{b.transition=r,null===r&&n._updatedFibers&&(n._updatedFibers.size>10&&R("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),n._updatedFibers.clear())}},e.unstable_act=Ye,e.useCallback=function(e,t){return pe().useCallback(e,t)},e.useContext=function(e){var t=pe();if(void 0!==e._context){var r=e._context;r.Consumer===e?O("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&O("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},e.useDebugValue=function(e,t){return pe().useDebugValue(e,t)},e.useDeferredValue=function(e){return pe().useDeferredValue(e)},e.useEffect=function(e,t){return pe().useEffect(e,t)},e.useId=function(){return pe().useId()},e.useImperativeHandle=function(e,t,r){return pe().useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return pe().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return pe().useLayoutEffect(e,t)},e.useMemo=function(e,t){return pe().useMemo(e,t)},e.useReducer=function(e,t,r){return pe().useReducer(e,t,r)},e.useRef=function(e){return pe().useRef(e)},e.useState=function(e){return pe().useState(e)},e.useSyncExternalStore=function(e,t,r){return pe().useSyncExternalStore(e,t,r)},e.useTransition=function(){return pe().useTransition()},e.version="18.3.1","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */new Error)}()}),n=/* @__PURE__ */e((e,n)=>{"production"===process.env.NODE_ENV?n.exports=t():n.exports=r()});export{n as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-Cmsah3SL.js";var t=/* @__PURE__ */e(e=>{var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,m={};function h(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||d}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=h.prototype;var g=b.prototype=new v;g.constructor=b,y(g,h.prototype),g.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function C(e,r,n){var o,a={},u=null,i=null;if(null!=r)for(o in void 0!==r.ref&&(i=r.ref),void 0!==r.key&&(u=""+r.key),r)w.call(r,o)&&!k.hasOwnProperty(o)&&(a[o]=r[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:t,type:e,key:u,ref:i,props:a,_owner:S.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var O=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function j(e,n,o,a,u){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c=!1;if(null===e)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case t:case r:c=!0}}if(c)return u=u(c=e),e=""===a?"."+E(c,0):a,_(u)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),j(u,n,o,"",function(e){return e})):null!=u&&(R(u)&&(u=function(e,r){return{$$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}(u,o+(!u.key||c&&c.key===u.key?"":(""+u.key).replace(O,"$&/")+"/")+e)),n.push(u)),1;if(c=0,a=""===a?".":a+":",_(e))for(var s=0;s<e.length;s++){var l=a+E(i=e[s],s);c+=j(i,n,o,l,u)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)c+=j(i=i.value,n,o,l=a+E(i,s++),u);else if("object"===i)throw n=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return c}function P(e,t,r){if(null==e)return e;var n=[],o=0;return j(e,n,"","",function(e){return t.call(r,e,o++)}),n}function $(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T={current:null},x={transition:null},D={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:x,ReactCurrentOwner:S};function I(){throw Error("act(...) is not supported in production builds of React.")}e.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=h,e.Fragment=n,e.Profiler=a,e.PureComponent=b,e.StrictMode=o,e.Suspense=s,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,e.act=I,e.cloneElement=function(e,r,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=y({},e.props),a=e.key,u=e.ref,i=e._owner;if(null!=r){if(void 0!==r.ref&&(u=r.ref,i=S.current),void 0!==r.key&&(a=""+r.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in r)w.call(r,s)&&!k.hasOwnProperty(s)&&(o[s]=void 0===r[s]&&void 0!==c?c[s]:r[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:t,type:e.type,key:a,ref:u,props:o,_owner:i}},e.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},e.createElement=C,e.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=R,e.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:$}},e.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=x.transition;x.transition={};try{e()}finally{x.transition=t}},e.unstable_act=I,e.useCallback=function(e,t){return T.current.useCallback(e,t)},e.useContext=function(e){return T.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return T.current.useDeferredValue(e)},e.useEffect=function(e,t){return T.current.useEffect(e,t)},e.useId=function(){return T.current.useId()},e.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.current.useMemo(e,t)},e.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},e.useRef=function(e){return T.current.useRef(e)},e.useState=function(e){return T.current.useState(e)},e.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},e.useTransition=function(){return T.current.useTransition()},e.version="18.3.1"}),r=/* @__PURE__ */e((e,t)=>{"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */new Error);var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator;function h(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}var v={current:null},b={transition:null},g={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},_={current:null},w={},S=null;function k(e){S=e}w.setExtraStackFrame=function(e){S=e},w.getCurrentStack=null,w.getStackAddendum=function(){var e="";S&&(e+=S);var t=w.getCurrentStack;return t&&(e+=t()||""),e};var C={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:b,ReactCurrentOwner:_};function R(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];E("warn",e,r)}function O(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];E("error",e,r)}function E(e,t,r){var n=C.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map(function(e){return String(e)});o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}C.ReactDebugCurrentFrame=w,C.ReactCurrentActQueue=g;var j={};function P(e,t){var r=e.constructor,n=r&&(r.displayName||r.name)||"ReactClass",o=n+"."+t;j[o]||(O("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,n),j[o]=!0)}var $={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){P(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){P(e,"replaceState")},enqueueSetState:function(e,t,r,n){P(e,"setState")}},T=Object.assign,x={};function D(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||$}Object.freeze(x),D.prototype.isReactComponent={},D.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},D.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var I={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},L=function(e,t){Object.defineProperty(D.prototype,e,{get:function(){R("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var N in I)I.hasOwnProperty(N)&&L(N,I[N]);function A(){}function F(e,t,r){this.props=e,this.context=t,this.refs=x,this.updater=r||$}A.prototype=D.prototype;var M=F.prototype=new A;M.constructor=F,T(M,D.prototype),M.isPureReactComponent=!0;var V=Array.isArray;function U(e){return V(e)}function z(e){return""+e}function q(e){if(function(e){try{return z(e),!1}catch(t){return!0}}(e))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),z(e)}function B(e){return e.displayName||"Context"}function Y(e){if(null==e)return null;if("number"==typeof e.tag&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case u:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return B(e)+".Consumer";case i:return B(e._context)+".Provider";case s:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:Y(e.type)||"Memo";case d:var r=e,y=r._payload,m=r._init;try{return Y(m(y))}catch(h){return null}}return null}var H,W,G=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0},J={};function X(e){if(G.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function Q(e){if(G.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var Z=function(e,t,n,o,a,u,i){var c={$$typeof:r,type:e,key:t,ref:n,props:i,_owner:u,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function ee(e,t,r){var n,o={},a=null,u=null,i=null,c=null;if(null!=t)for(n in X(t)&&(u=t.ref,function(e){if("string"==typeof e.ref&&_.current&&e.__self&&_.current.stateNode!==e.__self){var t=Y(_.current.type);J[t]||(O('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),J[t]=!0)}}(t)),Q(t)&&(q(t.key),a=""+t.key),i=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source,t)G.call(t,n)&&!K.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(1===s)o.children=r;else if(s>1){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];Object.freeze&&Object.freeze(l),o.children=l}if(e&&e.defaultProps){var p=e.defaultProps;for(n in p)void 0===o[n]&&(o[n]=p[n])}if(a||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var r=function(){H||(H=!0,O("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,d),u&&function(e,t){var r=function(){W||(W=!0,O("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(o,d)}return Z(e,a,u,i,c,_.current,o)}function te(e,t,r){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,o,a=T({},e.props),u=e.key,i=e.ref,c=e._self,s=e._source,l=e._owner;if(null!=t)for(n in X(t)&&(i=t.ref,l=_.current),Q(t)&&(q(t.key),u=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)G.call(t,n)&&!K.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==o?a[n]=o[n]:a[n]=t[n]);var f=arguments.length-2;if(1===f)a.children=r;else if(f>1){for(var p=Array(f),d=0;d<f;d++)p[d]=arguments[d+2];a.children=p}return Z(e.type,u,i,c,s,l,a)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var ne=!1,oe=/\/+/g;function ae(e){return e.replace(oe,"$&/")}function ue(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(q(e.key),r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function ie(e,t,o,a,u){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c,s,l,f=!1;if(null===e)f=!0;else switch(i){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case r:case n:f=!0}}if(f){var p=e,d=u(p),y=""===a?"."+ue(p,0):a;if(U(d)){var m="";null!=y&&(m=ae(y)+"/"),ie(d,t,m,"",function(e){return e})}else null!=d&&(re(d)&&(!d.key||p&&p.key===d.key||q(d.key),c=d,s=o+(!d.key||p&&p.key===d.key?"":ae(""+d.key)+"/")+y,d=Z(c.type,s,c.ref,c._self,c._source,c._owner,c.props)),t.push(d));return 1}var v=0,b=""===a?".":a+":";if(U(e))for(var g=0;g<e.length;g++)v+=ie(l=e[g],t,o,b+ue(l,g),u);else{var _=h(e);if("function"==typeof _){var w=e;_===w.entries&&(ne||R("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ne=!0);for(var S,k=_.call(w),C=0;!(S=k.next()).done;)v+=ie(l=S.value,t,o,b+ue(l,C++),u)}else if("object"===i){var O=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===O?"object with keys {"+Object.keys(e).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}}return v}function ce(e,t,r){if(null==e)return e;var n=[],o=0;return ie(e,n,"","",function(e){return t.call(r,e,o++)}),n}function se(e){if(-1===e._status){var t=(0,e._result)();if(t.then(function(t){if(0===e._status||-1===e._status){var r=e;r._status=1,r._result=t}},function(t){if(0===e._status||-1===e._status){var r=e;r._status=2,r._result=t}}),-1===e._status){var r=e;r._status=0,r._result=t}}if(1===e._status){var n=e._result;return void 0===n&&O("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",n),"default"in n||O("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",n),n.default}throw e._result}var le=Symbol.for("react.module.reference");function fe(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===a||e===l||e===f||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===i||e.$$typeof===c||e.$$typeof===s||e.$$typeof===le||void 0!==e.getModuleId)}function pe(){var e=v.current;return null===e&&O("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}var de,ye,me,he,ve,be,ge,_e=0;function we(){}we.__reactDisabledLog=!0;var Se,ke=C.ReactCurrentDispatcher;function Ce(e,t,r){if(void 0===Se)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Se=n&&n[1]||""}return"\n"+Se+e}var Re=!1,Oe=new("function"==typeof WeakMap?WeakMap:Map);function Ee(e,t){if(!e||Re)return"";var r,n=Oe.get(e);if(void 0!==n)return n;Re=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a=ke.current;ke.current=null,function(){if(0===_e){de=console.log,ye=console.info,me=console.warn,he=console.error,ve=console.group,be=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_e++}();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(u,[])}catch(y){r=y}Reflect.construct(e,[],u)}else{try{u.call()}catch(y){r=y}e.call(u.prototype)}}else{try{throw Error()}catch(y){r=y}e()}}catch(m){if(m&&r&&"string"==typeof m.stack){for(var i=m.stack.split("\n"),c=r.stack.split("\n"),s=i.length-1,l=c.length-1;s>=1&&l>=0&&i[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(i[s]!==c[l]){if(1!==s||1!==l)do{if(s--,--l<0||i[s]!==c[l]){var f="\n"+i[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&Oe.set(e,f),f}}while(s>=1&&l>=0);break}}}finally{Re=!1,ke.current=a,function(){if(0===--_e){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:de}),info:T({},e,{value:ye}),warn:T({},e,{value:me}),error:T({},e,{value:he}),group:T({},e,{value:ve}),groupCollapsed:T({},e,{value:be}),groupEnd:T({},e,{value:ge})})}_e<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var p=e?e.displayName||e.name:"",d=p?Ce(p):"";return"function"==typeof e&&Oe.set(e,d),d}function je(e,t,r){if(null==e)return"";if("function"==typeof e)return Ee(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ce(e);switch(e){case l:return Ce("Suspense");case f:return Ce("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case s:return Ee(e.render,!1);case p:return je(e.type,t,r);case d:var n=e,o=n._payload,a=n._init;try{return je(a(o),t,r)}catch(u){}}return""}var Pe={},$e=C.ReactDebugCurrentFrame;function Te(e){if(e){var t=e._owner,r=je(e.type,e._source,t?t.type:null);$e.setExtraStackFrame(r)}else $e.setExtraStackFrame(null)}function xe(e){if(e){var t=e._owner;k(je(e.type,e._source,t?t.type:null))}else k(null)}var De=!1;function Ie(){if(_.current){var e=Y(_.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var Le={};function Ne(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=Ie();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!Le[r]){Le[r]=!0;var n="";e&&e._owner&&e._owner!==_.current&&(n=" It was passed a child from "+Y(e._owner.type)+"."),xe(e),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),xe(null)}}}function Ae(e,t){if("object"==typeof e)if(U(e))for(var r=0;r<e.length;r++){var n=e[r];re(n)&&Ne(n,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=h(e);if("function"==typeof o&&o!==e.entries)for(var a,u=o.call(e);!(a=u.next()).done;)re(a.value)&&Ne(a.value,t)}}function Fe(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r;if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==s&&t.$$typeof!==p)return;r=t.propTypes}if(r){var n=Y(t);!function(e,t,r,n,o){var a=Function.call.bind(G);for(var u in e)if(a(e,u)){var i=void 0;try{if("function"!=typeof e[u]){var c=Error((n||"React class")+": "+r+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}i=e[u](t,u,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){i=s}!i||i instanceof Error||(Te(o),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,u,typeof i),Te(null)),i instanceof Error&&!(i.message in Pe)&&(Pe[i.message]=!0,Te(o),O("Failed %s type: %s",r,i.message),Te(null))}}(r,e.props,"prop",n,e)}else void 0===t.PropTypes||De||(De=!0,O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y(t)||"Unknown"));"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Me(e,t,n){var a,u,i=fe(e);if(!i){var c,s="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),s+=(null!=(a=t)&&void 0!==(u=a.__source)?"\n\nCheck your code at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+".":"")||Ie(),null===e?c="null":U(e)?c="array":void 0!==e&&e.$$typeof===r?(c="<"+(Y(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,O("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,s)}var l=ee.apply(this,arguments);if(null==l)return l;if(i)for(var f=2;f<arguments.length;f++)Ae(arguments[f],e);return e===o?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){xe(e),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),xe(null);break}}null!==e.ref&&(xe(e),O("Invalid attribute `ref` supplied to `React.Fragment`."),xe(null))}(l):Fe(l),l}var Ve=!1,Ue=!1,ze=null,qe=0,Be=!1;function Ye(e){var t=qe;qe++,null===g.current&&(g.current=[]);var r,n=g.isBatchingLegacy;try{if(g.isBatchingLegacy=!0,r=e(),!n&&g.didScheduleLegacyUpdate){var o=g.current;null!==o&&(g.didScheduleLegacyUpdate=!1,Ke(o))}}catch(O){throw He(t),O}finally{g.isBatchingLegacy=n}if(null!==r&&"object"==typeof r&&"function"==typeof r.then){var a=r,u=!1,i={then:function(e,r){u=!0,a.then(function(n){He(t),0===qe?We(n,e,r):e(n)},function(e){He(t),r(e)})}};return Be||"undefined"==typeof Promise||Promise.resolve().then(function(){}).then(function(){u||(Be=!0,O("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),i}var c=r;if(He(t),0===qe){var s=g.current;return null!==s&&(Ke(s),g.current=null),{then:function(e,t){null===g.current?(g.current=[],We(c,e,t)):e(c)}}}return{then:function(e,t){e(c)}}}function He(e){e!==qe-1&&O("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),qe=e}function We(e,r,n){var o=g.current;if(null!==o)try{Ke(o),function(){if(null===ze)try{var a=("require"+Math.random()).slice(0,7);ze=(t&&t[a]).call(t,"timers").setImmediate}catch(u){ze=function(e){!1===Ue&&(Ue=!0,"undefined"==typeof MessageChannel&&O("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}ze(function(){0===o.length?(g.current=null,r(e)):We(e,r,n)})}()}catch(O){n(O)}else r(e)}var Ge=!1;function Ke(e){if(!Ge){Ge=!0;var t=0;try{for(;t<e.length;t++){var r=e[t];do{r=r(!0)}while(null!==r)}e.length=0}catch(O){throw e=e.slice(t+1),O}finally{Ge=!1}}}var Je=Me,Xe={map:ce,forEach:function(e,t,r){ce(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ce(e,function(){t++}),t},toArray:function(e){return ce(e,function(e){return e})||[]},only:function(e){if(!re(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};e.Children=Xe,e.Component=D,e.Fragment=o,e.Profiler=u,e.PureComponent=F,e.StrictMode=a,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,e.act=Ye,e.cloneElement=function(e,t,r){for(var n=te.apply(this,arguments),o=2;o<arguments.length;o++)Ae(arguments[o],n.type);return Fe(n),n},e.createContext=function(e){var t={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:i,_context:t};var r=!1,n=!1,o=!1,a={$$typeof:c,_context:t};return Object.defineProperties(a,{Provider:{get:function(){return n||(n=!0,O("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return r||(r=!0,O("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){o||(R("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),o=!0)}}}),t.Consumer=a,t._currentRenderer=null,t._currentRenderer2=null,t},e.createElement=Je,e.createFactory=function(e){var t=Me.bind(null,e);return t.type=e,Ve||(Ve=!0,R("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return R("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){null!=e&&e.$$typeof===p?O("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?O("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&O("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||O("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,r={$$typeof:s,render:e};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(r){t=r,e.name||e.displayName||(e.displayName=r)}}),r},e.isValidElement=re,e.lazy=function(e){var t,r,n={$$typeof:d,_payload:{_status:-1,_result:e},_init:se};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){O("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){O("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},e.memo=function(e,t){fe(e)||O("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var r,n={$$typeof:p,type:e,compare:void 0===t?null:t};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(t){r=t,e.name||e.displayName||(e.displayName=t)}}),n},e.startTransition=function(e,t){var r=b.transition;b.transition={};var n=b.transition;b.transition._updatedFibers=/* @__PURE__ */new Set;try{e()}finally{b.transition=r,null===r&&n._updatedFibers&&(n._updatedFibers.size>10&&R("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),n._updatedFibers.clear())}},e.unstable_act=Ye,e.useCallback=function(e,t){return pe().useCallback(e,t)},e.useContext=function(e){var t=pe();if(void 0!==e._context){var r=e._context;r.Consumer===e?O("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&O("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},e.useDebugValue=function(e,t){return pe().useDebugValue(e,t)},e.useDeferredValue=function(e){return pe().useDeferredValue(e)},e.useEffect=function(e,t){return pe().useEffect(e,t)},e.useId=function(){return pe().useId()},e.useImperativeHandle=function(e,t,r){return pe().useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return pe().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return pe().useLayoutEffect(e,t)},e.useMemo=function(e,t){return pe().useMemo(e,t)},e.useReducer=function(e,t,r){return pe().useReducer(e,t,r)},e.useRef=function(e){return pe().useRef(e)},e.useState=function(e){return pe().useState(e)},e.useSyncExternalStore=function(e,t,r){return pe().useSyncExternalStore(e,t,r)},e.useTransition=function(){return pe().useTransition()},e.version="18.3.1","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */new Error)}()}),n=/* @__PURE__ */e((e,n)=>{"production"===process.env.NODE_ENV?n.exports=t():n.exports=r()});export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t,t as e}from"./rolldown-runtime-DcYi-9oA.js";import{t as i}from"./react-BW4ssgUo.js";var a=/* @__PURE__ */e((t,e)=>{var i,a;i=t,a=function(){function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function e(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?t(Object(n),!0).forEach(function(t){var a,o,r;a=e,o=t,r=n[t],(o=i(o))in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var h="undefined"!=typeof window&&void 0!==window.document,s=h?window:{},c=!(!h||!s.document.documentElement)&&"ontouchstart"in s.document.documentElement,l=!!h&&"PointerEvent"in s,d="cropper",p="all",u="crop",m="move",g="zoom",f="e",v="w",w="s",b="n",y="ne",x="nw",M="se",C="sw",D="".concat(d,"-crop"),O="".concat(d,"-disabled"),T="".concat(d,"-hidden"),B="".concat(d,"-hide"),k="".concat(d,"-invisible"),E="".concat(d,"-modal"),W="".concat(d,"-move"),z="".concat(d,"Action"),H="".concat(d,"Preview"),N="crop",R="move",Y="none",L="crop",X="cropend",j="cropmove",S="cropstart",A="dblclick",P=l?"pointerdown":c?"touchstart":"mousedown",I=l?"pointermove":c?"touchmove":"mousemove",U=l?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",$="resize",Q="wheel",Z="zoom",K="image/jpeg",G=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,F=/^data:image\/jpeg;base64,/,J=/^img|canvas$/i,_={viewMode:0,dragMode:N,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||s.isNaN;function et(t){return"number"==typeof t&&!tt(t)}var it=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function nt(t){return"object"===a(t)&&null!==t}var ot=Object.prototype.hasOwnProperty;function rt(t){if(!nt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ot.call(i,"isPrototypeOf")}catch(a){return!1}}function ht(t){return"function"==typeof t}var st=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):st.call(t)}function lt(t,e){return t&&ht(e)&&(Array.isArray(t)||et(t.length)?ct(t).forEach(function(i,a){e.call(t,i,a,t)}):nt(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return nt(t)&&i.length>0&&i.forEach(function(e){nt(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},pt=/\.\d*(?:0|9){12}\d*$/;function ut(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return pt.test(t)?Math.round(t*e)/e:t}var mt=/^width|height|left|top|marginLeft|marginTop$/;function gt(t,e){var i=t.style;lt(e,function(t,e){mt.test(e)&&et(t)&&(t="".concat(t,"px")),i[e]=t})}function ft(t,e){if(e)if(et(t.length))lt(t,function(t){ft(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function vt(t,e){e&&(et(t.length)?lt(t,function(t){vt(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function wt(t,e,i){e&&(et(t.length)?lt(t,function(t){wt(t,e,i)}):i?ft(t,e):vt(t,e))}var bt=/([a-z\d])([A-Z])/g;function yt(t){return t.replace(bt,"$1-$2").toLowerCase()}function xt(t,e){return nt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(yt(e)))}function Mt(t,e,i){nt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(yt(e)),i)}var Ct=/\s\s*/,Dt=function(){var t=!1;if(h){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});s.addEventListener("test",i,a),s.removeEventListener("test",i,a)}return t}();function Ot(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(!Dt){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)})}function Tt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(a.once&&!Dt){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)})}function Bt(t,e,i){var a;return ht(Event)&&ht(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function kt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Et=s.location,Wt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function zt(t){var e=t.match(Wt);return null!==e&&(e[1]!==Et.protocol||e[2]!==Et.hostname||e[3]!==Et.port)}function Ht(t){var e="timestamp=".concat(/* @__PURE__ */(new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Nt(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];et(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),et(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),et(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),et(i)&&1!==i&&r.push("scaleX(".concat(i,")")),et(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Rt(t,i){var a=t.pageX,n=t.pageY,o={endX:a,endY:n};return i?o:e({startX:a,startY:n},o)}function Yt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=it(a),r=it(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Lt=String.fromCharCode,Xt=/^data:.*,/,jt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),o=Number(e.minContainerHeight);ft(a,T),vt(t,T);var r={width:Math.max(i.offsetWidth,n>=0?n:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,gt(a,{width:r.width,height:r.height}),ft(t,T),vt(a,T)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=dt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=Yt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,gt(this.canvas,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);dt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),gt(this.image,dt({width:i.width,height:i.height},Nt(dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=dt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Mt(this.face,z,i.width>=e.width&&i.height>=e.height?m:p),gt(this.cropBox,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,L,this.getData())}},St={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,lt(r,function(t){var i=document.createElement("img");Mt(t,H,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)})}},resetPreview:function(){lt(this.previews,function(t){var e=xt(t,H);gt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(nt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(yt(e)))}(t,H)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(gt(this.viewBoxImage,dt({width:o,height:r},Nt(dt({translateX:-h,translateY:-s},t)))),lt(this.previews,function(e){var i=xt(e,H),c=i.width,l=i.height,d=c,p=l,u=1;a&&(p=n*(u=c/a)),n&&p>l&&(d=a*(u=l/n),p=l),gt(e,{width:d,height:p}),gt(e.getElementsByTagName("img")[0],dt({width:o*u,height:r*u},Nt(dt({translateX:-h*u,translateY:-s*u},t))))}))}},At={bind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Tt(t,S,e.cropstart),ht(e.cropmove)&&Tt(t,j,e.cropmove),ht(e.cropend)&&Tt(t,X,e.cropend),ht(e.crop)&&Tt(t,L,e.crop),ht(e.zoom)&&Tt(t,Z,e.zoom),Tt(i,P,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Tt(i,Q,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Tt(i,A,this.onDblclick=this.dblclick.bind(this)),Tt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),Tt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Tt(window,$,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Ot(t,S,e.cropstart),ht(e.cropmove)&&Ot(t,j,e.cropmove),ht(e.cropend)&&Ot(t,X,e.cropend),ht(e.crop)&&Ot(t,L,e.crop),ht(e.zoom)&&Ot(t,Z,e.zoom),Ot(i,P,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Ot(i,Q,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ot(i,A,this.onDblclick),Ot(t.ownerDocument,I,this.onCropMove),Ot(t.ownerDocument,U,this.onCropEnd),e.responsive&&Ot(window,$,this.onResize)}},Pt={resize:function(){if(!this.disabled){var t,e,i=this.options,a=this.container,n=this.containerData,o=a.offsetWidth/n.width,r=a.offsetHeight/n.height,h=Math.abs(o-1)>Math.abs(r-1)?o:r;1!==h&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(lt(t,function(e,i){t[i]=e*h})),this.setCropBoxData(lt(e,function(t,i){e[i]=t*h}))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===Y||this.setDragMode((t=this.dragBox,e=D,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?R:N))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(et(e)&&1!==e||et(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){o[t.identifier]=Rt(t)}):o[t.pointerId||0]=Rt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?g:xt(t.target,z),G.test(a)&&!1!==Bt(this.element,S,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===u&&(this.cropping=!0,ft(this.dragBox,E)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Bt(this.element,j,{originalEvent:t,action:e})&&(t.changedTouches?lt(t.changedTouches,function(t){dt(i[t.identifier]||{},Rt(t,!0))}):dt(i[t.pointerId||0]||{},Rt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,E,this.cropped&&this.options.modal)),Bt(this.element,X,{originalEvent:t,action:e}))}}},It={change:function(t){var i,a=this.options,n=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=a.aspectRatio,l=r.left,d=r.top,D=r.width,O=r.height,B=l+D,k=d+O,E=0,W=0,z=o.width,H=o.height,N=!0;!c&&t.shiftKey&&(c=D&&O?D/O:1),this.limited&&(E=r.minLeft,W=r.minTop,z=E+Math.min(o.width,n.width,n.left+n.width),H=W+Math.min(o.height,n.height,n.top+n.height));var R=h[Object.keys(h)[0]],Y={x:R.endX-R.startX,y:R.endY-R.startY},L=function(t){switch(t){case f:B+Y.x>z&&(Y.x=z-B);break;case v:l+Y.x<E&&(Y.x=E-l);break;case b:d+Y.y<W&&(Y.y=W-d);break;case w:k+Y.y>H&&(Y.y=H-k)}};switch(s){case p:l+=Y.x,d+=Y.y;break;case f:if(Y.x>=0&&(B>=z||c&&(d<=W||k>=H))){N=!1;break}L(f),(D+=Y.x)<0&&(s=v,l-=D=-D),c&&(O=D/c,d+=(r.height-O)/2);break;case b:if(Y.y<=0&&(d<=W||c&&(l<=E||B>=z))){N=!1;break}L(b),O-=Y.y,d+=Y.y,O<0&&(s=w,d-=O=-O),c&&(D=O*c,l+=(r.width-D)/2);break;case v:if(Y.x<=0&&(l<=E||c&&(d<=W||k>=H))){N=!1;break}L(v),D-=Y.x,l+=Y.x,D<0&&(s=f,l-=D=-D),c&&(O=D/c,d+=(r.height-O)/2);break;case w:if(Y.y>=0&&(k>=H||c&&(l<=E||B>=z))){N=!1;break}L(w),(O+=Y.y)<0&&(s=b,d-=O=-O),c&&(D=O*c,l+=(r.width-D)/2);break;case y:if(c){if(Y.y<=0&&(d<=W||B>=z)){N=!1;break}L(b),O-=Y.y,d+=Y.y,D=O*c}else L(b),L(f),Y.x>=0?B<z?D+=Y.x:Y.y<=0&&d<=W&&(N=!1):D+=Y.x,Y.y<=0?d>W&&(O-=Y.y,d+=Y.y):(O-=Y.y,d+=Y.y);D<0&&O<0?(s=C,d-=O=-O,l-=D=-D):D<0?(s=x,l-=D=-D):O<0&&(s=M,d-=O=-O);break;case x:if(c){if(Y.y<=0&&(d<=W||l<=E)){N=!1;break}L(b),O-=Y.y,d+=Y.y,D=O*c,l+=r.width-D}else L(b),L(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&d<=W&&(N=!1):(D-=Y.x,l+=Y.x),Y.y<=0?d>W&&(O-=Y.y,d+=Y.y):(O-=Y.y,d+=Y.y);D<0&&O<0?(s=M,d-=O=-O,l-=D=-D):D<0?(s=y,l-=D=-D):O<0&&(s=C,d-=O=-O);break;case C:if(c){if(Y.x<=0&&(l<=E||k>=H)){N=!1;break}L(v),D-=Y.x,l+=Y.x,O=D/c}else L(w),L(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&k>=H&&(N=!1):(D-=Y.x,l+=Y.x),Y.y>=0?k<H&&(O+=Y.y):O+=Y.y;D<0&&O<0?(s=y,d-=O=-O,l-=D=-D):D<0?(s=M,l-=D=-D):O<0&&(s=x,d-=O=-O);break;case M:if(c){if(Y.x>=0&&(B>=z||k>=H)){N=!1;break}L(f),O=(D+=Y.x)/c}else L(w),L(f),Y.x>=0?B<z?D+=Y.x:Y.y>=0&&k>=H&&(N=!1):D+=Y.x,Y.y>=0?k<H&&(O+=Y.y):O+=Y.y;D<0&&O<0?(s=x,d-=O=-O,l-=D=-D):D<0?(s=C,l-=D=-D):O<0&&(s=y,d-=O=-O);break;case m:this.move(Y.x,Y.y),N=!1;break;case g:this.zoom(function(t){var i=e({},t),a=0;return lt(t,function(t,e){delete i[e],lt(i,function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;Math.abs(s)>Math.abs(a)&&(a=s)})}),a}(h),t),N=!1;break;case u:if(!Y.x||!Y.y){N=!1;break}i=kt(this.cropper),l=R.startX-i.left,d=R.startY-i.top,D=r.minWidth,O=r.minHeight,Y.x>0?s=Y.y>0?M:y:Y.x<0&&(l-=D,s=Y.y>0?C:x),Y.y<0&&(d-=O),this.cropped||(vt(this.cropBox,T),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}N&&(r.width=D,r.height=O,r.left=l,r.top=d,this.action=s,this.renderCropBox()),lt(h,function(t){t.startX=t.endX,t.startY=t.endY})}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ft(this.dragBox,E),vt(this.cropBox,T),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=dt({},this.initialImageData),this.canvasData=dt({},this.initialCanvasData),this.cropBoxData=dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),vt(this.dragBox,E),ft(this.cropBox,T)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,lt(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,vt(this.cropper,O)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ft(this.cropper,O)),this},destroy:function(){var t=this.element;return t[d]?(t[d]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(at(t)?t:a+Number(t),at(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(et(t)&&(i.left=t,a=!0),et(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Bt(this.element,Z,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=kt(this.cropper),u=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return lt(t,function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1}),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((u.pageX-p.left-n.left)/o),n.top-=(l-r)*((u.pageY-p.top-n.top)/r)}else rt(e)&&et(e.x)&&et(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return et(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,et(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(et(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(et(t)&&(i.scaleX=t,a=!0),et(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(lt(t,function(e,i){t[i]=e/r}),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&rt(t)){var o=!1;e.rotatable&&et(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(et(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),et(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;et(t.x)&&(n.left=t.x*r+a.left),et(t.y)&&(n.top=t.y*r+a.top),et(t.width)&&(n.width=t.width*r),et(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?dt({},this.containerData):{}},getImageData:function(){return this.sized?dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&<(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(et(t.left)&&(e.left=t.left),et(t.top)&&(e.top=t.top),et(t.width)?(e.width=t.width,e.height=t.width/i):et(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(et(t.left)&&(a.left=t.left),et(t.top)&&(a.top=t.top),et(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),et(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,y=void 0===b||b,x=a.imageSmoothingQuality,M=void 0===x?"low":x,C=a.maxWidth,D=void 0===C?1/0:C,O=a.maxHeight,T=void 0===O?1/0:O,B=a.minWidth,k=void 0===B?0:B,E=a.minHeight,W=void 0===E?0:E,z=document.createElement("canvas"),H=z.getContext("2d"),N=Yt({aspectRatio:m,width:D,height:T}),R=Yt({aspectRatio:m,width:k,height:W},"cover"),Y=Math.min(N.width,Math.max(R.width,g)),L=Math.min(N.height,Math.max(R.height,f)),X=Yt({aspectRatio:n,width:D,height:T}),j=Yt({aspectRatio:n,width:k,height:W},"cover"),S=Math.min(X.width,Math.max(j.width,r)),A=Math.min(X.height,Math.max(j.height,h)),P=[-S/2,-A/2,S,A];return z.width=ut(Y),z.height=ut(L),H.fillStyle=w,H.fillRect(0,0,Y,L),H.save(),H.translate(Y/2,L/2),H.rotate(c*Math.PI/180),H.scale(d,u),H.imageSmoothingEnabled=y,H.imageSmoothingQuality=M,H.drawImage.apply(H,[t].concat(o(P.map(function(t){return Math.floor(ut(t))})))),H.restore(),z}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(t.rounded),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=Yt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Yt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Yt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),m=u.width,g=u.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=ut(m),f.height=ut(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,M,C,D,O,T,B=i.width,k=i.height,E=n,W=r;E<=-h||E>B?(E=0,x=0,C=0,O=0):E<=0?(C=-E,E=0,O=x=Math.min(B,h+E)):E<=B&&(C=0,O=x=Math.min(h,B-E)),x<=0||W<=-s||W>k?(W=0,M=0,D=0,T=0):W<=0?(D=-W,W=0,T=M=Math.min(k,s+W)):W<=k&&(D=0,T=M=Math.min(s,k-W));var z=[E,W,x,M];if(O>0&&T>0){var H=m/h;z.push(C*H,D*H,O*H,T*H)}return v.drawImage.apply(v,[i].concat(o(z.map(function(t){return Math.floor(ut(t))})))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||at(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===N,o=e.movable&&t===R;t=n||o?t:Y,e.dragMode=t,Mt(i,z,t),wt(i,D,n),wt(i,W,o),e.cropBoxMovable||(Mt(a,z,t),wt(a,D,n),wt(a,W,o))}return this}},qt=s.Cropper,$t=/* @__PURE__ */function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!J.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=dt({},_,rt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return e=t,i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[d]){if(e[d]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(V.test(t))F.test(t)?this.read((n=t.replace(Xt,""),o=atob(n),r=new ArrayBuffer(o.length),lt(h=new Uint8Array(r),function(t,e){h[e]=o.charCodeAt(e)}),r)):this.clone();else{var n,o,r,h,s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==K&&s.abort()},s.onload=function(){e.read(s.response)},s.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&zt(t)&&i.crossOrigin&&(t=Ht(t)),s.open("GET",t,!0),s.responseType="arraybuffer",s.withCredentials="use-credentials"===i.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=function(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Lt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(m){e=1}return e}(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Lt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,K);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&zt(e)&&(i||(i="anonymous"),a=Ht(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),ft(n,B),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(s.navigator.userAgent),a=function(e,i){dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(d,"-container")),r=o.querySelector(".".concat(d,"-canvas")),h=o.querySelector(".".concat(d,"-drag-box")),s=o.querySelector(".".concat(d,"-crop-box")),c=s.querySelector(".".concat(d,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(d,"-view-box")),this.face=c,r.appendChild(i),ft(t,T),a.insertBefore(o,t.nextSibling),vt(i,B),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,ft(s,T),e.guides||ft(s.getElementsByClassName("".concat(d,"-dashed")),T),e.center||ft(s.getElementsByClassName("".concat(d,"-center")),T),e.background&&ft(o,"".concat(d,"-bg")),e.highlight||ft(c,k),e.cropBoxMovable&&(ft(c,W),Mt(c,z,p)),e.cropBoxResizable||(ft(s.getElementsByClassName("".concat(d,"-line")),T),ft(s.getElementsByClassName("".concat(d,"-point")),T)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),ht(e.ready)&&Tt(t,q,e.ready,{once:!0}),Bt(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),vt(this.element,T)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],a=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){dt(_,rt(t)&&t)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();return dt($t.prototype,jt,St,At,Pt,It,Ut),$t},"object"==typeof t&&void 0!==e?e.exports=a():"function"==typeof define&&define.amd?define(a):(i="undefined"!=typeof globalThis?globalThis:i||self).Cropper=a()}),n=/* @__PURE__ */t(i()),o=/* @__PURE__ */t(a()),r=function(){return r=Object.assign||function(t){for(var e,i=1,a=arguments.length;i<a;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)};function h(t,e){var i={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(t);n<a.length;n++)e.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(i[a[n]]=t[a[n]])}return i}var s=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],c={opacity:0,maxWidth:"100%"},l=n.forwardRef(function(t,e){var i=h(t,[]),a=i.dragMode,l=void 0===a?"crop":a,d=i.src,p=i.style,u=i.className,m=i.crossOrigin,g=i.scaleX,f=i.scaleY,v=i.enable,w=i.zoomTo,b=i.rotateTo,y=i.alt,x=void 0===y?"picture":y,M=i.ready,C=i.onInitialized,D=h(i,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),O={scaleY:f,scaleX:g,enable:v,zoomTo:w,rotateTo:b},T=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=(0,n.useRef)(null);return n.useEffect(function(){t.forEach(function(t){t&&("function"==typeof t?t(i.current):t.current=i.current)})},[t]),i}(e,(0,n.useRef)(null));(0,n.useEffect)(function(){var t;null!==(t=T.current)&&void 0!==t&&t.cropper&&"number"==typeof w&&T.current.cropper.zoomTo(w)},[i.zoomTo]),(0,n.useEffect)(function(){var t;null!==(t=T.current)&&void 0!==t&&t.cropper&&void 0!==d&&T.current.cropper.reset().clear().replace(d)},[d]),(0,n.useEffect)(function(){if(null!==T.current){var t=new o.default(T.current,r(r({dragMode:l},D),{ready:function(t){null!==t.currentTarget&&function(t,e){void 0===e&&(e={});var i=e.enable,a=void 0===i||i,n=e.scaleX,o=void 0===n?1:n,r=e.scaleY,h=void 0===r?1:r,s=e.zoomTo,c=void 0===s?0:s,l=e.rotateTo;a?t.enable():t.disable(),t.scaleX(o),t.scaleY(h),void 0!==l&&t.rotateTo(l),c>0&&t.zoomTo(c)}(t.currentTarget.cropper,O),M&&M(t)}}));C&&C(t)}return function(){var t,e;null===(e=null===(t=T.current)||void 0===t?void 0:t.cropper)||void 0===e||e.destroy()}},[T]);var B,k=(B=r(r({},D),{crossOrigin:m,src:d,alt:x}),s.reduce(function(t,e){var i=t,a=e;return i[a],h(i,["symbol"==typeof a?a:a+""])},B));return n.createElement("div",{style:p,className:u},n.createElement("img",r({},k,{style:c,ref:T})))});export{l as Cropper,l as default};
|
|
1
|
+
import{o as t,t as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as i}from"./react-COOgDf_T.js";var a=/* @__PURE__ */e((t,e)=>{var i,a;i=t,a=function(){function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function e(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?t(Object(n),!0).forEach(function(t){var a,o,r;a=e,o=t,r=n[t],(o=i(o))in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var h="undefined"!=typeof window&&void 0!==window.document,s=h?window:{},c=!(!h||!s.document.documentElement)&&"ontouchstart"in s.document.documentElement,l=!!h&&"PointerEvent"in s,d="cropper",p="all",u="crop",m="move",g="zoom",f="e",v="w",w="s",b="n",y="ne",x="nw",M="se",C="sw",D="".concat(d,"-crop"),O="".concat(d,"-disabled"),T="".concat(d,"-hidden"),B="".concat(d,"-hide"),k="".concat(d,"-invisible"),E="".concat(d,"-modal"),W="".concat(d,"-move"),z="".concat(d,"Action"),H="".concat(d,"Preview"),N="crop",R="move",Y="none",L="crop",X="cropend",j="cropmove",S="cropstart",A="dblclick",P=l?"pointerdown":c?"touchstart":"mousedown",I=l?"pointermove":c?"touchmove":"mousemove",U=l?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",$="resize",Q="wheel",Z="zoom",K="image/jpeg",G=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,F=/^data:image\/jpeg;base64,/,J=/^img|canvas$/i,_={viewMode:0,dragMode:N,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||s.isNaN;function et(t){return"number"==typeof t&&!tt(t)}var it=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function nt(t){return"object"===a(t)&&null!==t}var ot=Object.prototype.hasOwnProperty;function rt(t){if(!nt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ot.call(i,"isPrototypeOf")}catch(a){return!1}}function ht(t){return"function"==typeof t}var st=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):st.call(t)}function lt(t,e){return t&&ht(e)&&(Array.isArray(t)||et(t.length)?ct(t).forEach(function(i,a){e.call(t,i,a,t)}):nt(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return nt(t)&&i.length>0&&i.forEach(function(e){nt(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},pt=/\.\d*(?:0|9){12}\d*$/;function ut(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return pt.test(t)?Math.round(t*e)/e:t}var mt=/^width|height|left|top|marginLeft|marginTop$/;function gt(t,e){var i=t.style;lt(e,function(t,e){mt.test(e)&&et(t)&&(t="".concat(t,"px")),i[e]=t})}function ft(t,e){if(e)if(et(t.length))lt(t,function(t){ft(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function vt(t,e){e&&(et(t.length)?lt(t,function(t){vt(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function wt(t,e,i){e&&(et(t.length)?lt(t,function(t){wt(t,e,i)}):i?ft(t,e):vt(t,e))}var bt=/([a-z\d])([A-Z])/g;function yt(t){return t.replace(bt,"$1-$2").toLowerCase()}function xt(t,e){return nt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(yt(e)))}function Mt(t,e,i){nt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(yt(e)),i)}var Ct=/\s\s*/,Dt=function(){var t=!1;if(h){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});s.addEventListener("test",i,a),s.removeEventListener("test",i,a)}return t}();function Ot(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(!Dt){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)})}function Tt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(a.once&&!Dt){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)})}function Bt(t,e,i){var a;return ht(Event)&&ht(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function kt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Et=s.location,Wt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function zt(t){var e=t.match(Wt);return null!==e&&(e[1]!==Et.protocol||e[2]!==Et.hostname||e[3]!==Et.port)}function Ht(t){var e="timestamp=".concat(/* @__PURE__ */(new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Nt(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];et(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),et(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),et(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),et(i)&&1!==i&&r.push("scaleX(".concat(i,")")),et(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Rt(t,i){var a=t.pageX,n=t.pageY,o={endX:a,endY:n};return i?o:e({startX:a,startY:n},o)}function Yt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=it(a),r=it(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Lt=String.fromCharCode,Xt=/^data:.*,/,jt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),o=Number(e.minContainerHeight);ft(a,T),vt(t,T);var r={width:Math.max(i.offsetWidth,n>=0?n:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,gt(a,{width:r.width,height:r.height}),ft(t,T),vt(a,T)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=dt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=Yt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,gt(this.canvas,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);dt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),gt(this.image,dt({width:i.width,height:i.height},Nt(dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=dt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Mt(this.face,z,i.width>=e.width&&i.height>=e.height?m:p),gt(this.cropBox,dt({width:i.width,height:i.height},Nt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,L,this.getData())}},St={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,lt(r,function(t){var i=document.createElement("img");Mt(t,H,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)})}},resetPreview:function(){lt(this.previews,function(t){var e=xt(t,H);gt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(nt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(yt(e)))}(t,H)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(gt(this.viewBoxImage,dt({width:o,height:r},Nt(dt({translateX:-h,translateY:-s},t)))),lt(this.previews,function(e){var i=xt(e,H),c=i.width,l=i.height,d=c,p=l,u=1;a&&(p=n*(u=c/a)),n&&p>l&&(d=a*(u=l/n),p=l),gt(e,{width:d,height:p}),gt(e.getElementsByTagName("img")[0],dt({width:o*u,height:r*u},Nt(dt({translateX:-h*u,translateY:-s*u},t))))}))}},At={bind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Tt(t,S,e.cropstart),ht(e.cropmove)&&Tt(t,j,e.cropmove),ht(e.cropend)&&Tt(t,X,e.cropend),ht(e.crop)&&Tt(t,L,e.crop),ht(e.zoom)&&Tt(t,Z,e.zoom),Tt(i,P,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Tt(i,Q,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Tt(i,A,this.onDblclick=this.dblclick.bind(this)),Tt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),Tt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Tt(window,$,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Ot(t,S,e.cropstart),ht(e.cropmove)&&Ot(t,j,e.cropmove),ht(e.cropend)&&Ot(t,X,e.cropend),ht(e.crop)&&Ot(t,L,e.crop),ht(e.zoom)&&Ot(t,Z,e.zoom),Ot(i,P,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Ot(i,Q,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ot(i,A,this.onDblclick),Ot(t.ownerDocument,I,this.onCropMove),Ot(t.ownerDocument,U,this.onCropEnd),e.responsive&&Ot(window,$,this.onResize)}},Pt={resize:function(){if(!this.disabled){var t,e,i=this.options,a=this.container,n=this.containerData,o=a.offsetWidth/n.width,r=a.offsetHeight/n.height,h=Math.abs(o-1)>Math.abs(r-1)?o:r;1!==h&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(lt(t,function(e,i){t[i]=e*h})),this.setCropBoxData(lt(e,function(t,i){e[i]=t*h}))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===Y||this.setDragMode((t=this.dragBox,e=D,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?R:N))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(et(e)&&1!==e||et(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){o[t.identifier]=Rt(t)}):o[t.pointerId||0]=Rt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?g:xt(t.target,z),G.test(a)&&!1!==Bt(this.element,S,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===u&&(this.cropping=!0,ft(this.dragBox,E)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Bt(this.element,j,{originalEvent:t,action:e})&&(t.changedTouches?lt(t.changedTouches,function(t){dt(i[t.identifier]||{},Rt(t,!0))}):dt(i[t.pointerId||0]||{},Rt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,E,this.cropped&&this.options.modal)),Bt(this.element,X,{originalEvent:t,action:e}))}}},It={change:function(t){var i,a=this.options,n=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=a.aspectRatio,l=r.left,d=r.top,D=r.width,O=r.height,B=l+D,k=d+O,E=0,W=0,z=o.width,H=o.height,N=!0;!c&&t.shiftKey&&(c=D&&O?D/O:1),this.limited&&(E=r.minLeft,W=r.minTop,z=E+Math.min(o.width,n.width,n.left+n.width),H=W+Math.min(o.height,n.height,n.top+n.height));var R=h[Object.keys(h)[0]],Y={x:R.endX-R.startX,y:R.endY-R.startY},L=function(t){switch(t){case f:B+Y.x>z&&(Y.x=z-B);break;case v:l+Y.x<E&&(Y.x=E-l);break;case b:d+Y.y<W&&(Y.y=W-d);break;case w:k+Y.y>H&&(Y.y=H-k)}};switch(s){case p:l+=Y.x,d+=Y.y;break;case f:if(Y.x>=0&&(B>=z||c&&(d<=W||k>=H))){N=!1;break}L(f),(D+=Y.x)<0&&(s=v,l-=D=-D),c&&(O=D/c,d+=(r.height-O)/2);break;case b:if(Y.y<=0&&(d<=W||c&&(l<=E||B>=z))){N=!1;break}L(b),O-=Y.y,d+=Y.y,O<0&&(s=w,d-=O=-O),c&&(D=O*c,l+=(r.width-D)/2);break;case v:if(Y.x<=0&&(l<=E||c&&(d<=W||k>=H))){N=!1;break}L(v),D-=Y.x,l+=Y.x,D<0&&(s=f,l-=D=-D),c&&(O=D/c,d+=(r.height-O)/2);break;case w:if(Y.y>=0&&(k>=H||c&&(l<=E||B>=z))){N=!1;break}L(w),(O+=Y.y)<0&&(s=b,d-=O=-O),c&&(D=O*c,l+=(r.width-D)/2);break;case y:if(c){if(Y.y<=0&&(d<=W||B>=z)){N=!1;break}L(b),O-=Y.y,d+=Y.y,D=O*c}else L(b),L(f),Y.x>=0?B<z?D+=Y.x:Y.y<=0&&d<=W&&(N=!1):D+=Y.x,Y.y<=0?d>W&&(O-=Y.y,d+=Y.y):(O-=Y.y,d+=Y.y);D<0&&O<0?(s=C,d-=O=-O,l-=D=-D):D<0?(s=x,l-=D=-D):O<0&&(s=M,d-=O=-O);break;case x:if(c){if(Y.y<=0&&(d<=W||l<=E)){N=!1;break}L(b),O-=Y.y,d+=Y.y,D=O*c,l+=r.width-D}else L(b),L(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&d<=W&&(N=!1):(D-=Y.x,l+=Y.x),Y.y<=0?d>W&&(O-=Y.y,d+=Y.y):(O-=Y.y,d+=Y.y);D<0&&O<0?(s=M,d-=O=-O,l-=D=-D):D<0?(s=y,l-=D=-D):O<0&&(s=C,d-=O=-O);break;case C:if(c){if(Y.x<=0&&(l<=E||k>=H)){N=!1;break}L(v),D-=Y.x,l+=Y.x,O=D/c}else L(w),L(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&k>=H&&(N=!1):(D-=Y.x,l+=Y.x),Y.y>=0?k<H&&(O+=Y.y):O+=Y.y;D<0&&O<0?(s=y,d-=O=-O,l-=D=-D):D<0?(s=M,l-=D=-D):O<0&&(s=x,d-=O=-O);break;case M:if(c){if(Y.x>=0&&(B>=z||k>=H)){N=!1;break}L(f),O=(D+=Y.x)/c}else L(w),L(f),Y.x>=0?B<z?D+=Y.x:Y.y>=0&&k>=H&&(N=!1):D+=Y.x,Y.y>=0?k<H&&(O+=Y.y):O+=Y.y;D<0&&O<0?(s=x,d-=O=-O,l-=D=-D):D<0?(s=C,l-=D=-D):O<0&&(s=y,d-=O=-O);break;case m:this.move(Y.x,Y.y),N=!1;break;case g:this.zoom(function(t){var i=e({},t),a=0;return lt(t,function(t,e){delete i[e],lt(i,function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;Math.abs(s)>Math.abs(a)&&(a=s)})}),a}(h),t),N=!1;break;case u:if(!Y.x||!Y.y){N=!1;break}i=kt(this.cropper),l=R.startX-i.left,d=R.startY-i.top,D=r.minWidth,O=r.minHeight,Y.x>0?s=Y.y>0?M:y:Y.x<0&&(l-=D,s=Y.y>0?C:x),Y.y<0&&(d-=O),this.cropped||(vt(this.cropBox,T),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}N&&(r.width=D,r.height=O,r.left=l,r.top=d,this.action=s,this.renderCropBox()),lt(h,function(t){t.startX=t.endX,t.startY=t.endY})}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ft(this.dragBox,E),vt(this.cropBox,T),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=dt({},this.initialImageData),this.canvasData=dt({},this.initialCanvasData),this.cropBoxData=dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),vt(this.dragBox,E),ft(this.cropBox,T)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,lt(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,vt(this.cropper,O)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ft(this.cropper,O)),this},destroy:function(){var t=this.element;return t[d]?(t[d]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(at(t)?t:a+Number(t),at(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(et(t)&&(i.left=t,a=!0),et(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Bt(this.element,Z,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=kt(this.cropper),u=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return lt(t,function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1}),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((u.pageX-p.left-n.left)/o),n.top-=(l-r)*((u.pageY-p.top-n.top)/r)}else rt(e)&&et(e.x)&&et(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return et(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,et(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(et(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(et(t)&&(i.scaleX=t,a=!0),et(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(lt(t,function(e,i){t[i]=e/r}),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&rt(t)){var o=!1;e.rotatable&&et(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(et(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),et(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;et(t.x)&&(n.left=t.x*r+a.left),et(t.y)&&(n.top=t.y*r+a.top),et(t.width)&&(n.width=t.width*r),et(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?dt({},this.containerData):{}},getImageData:function(){return this.sized?dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&<(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(et(t.left)&&(e.left=t.left),et(t.top)&&(e.top=t.top),et(t.width)?(e.width=t.width,e.height=t.width/i):et(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(et(t.left)&&(a.left=t.left),et(t.top)&&(a.top=t.top),et(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),et(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,y=void 0===b||b,x=a.imageSmoothingQuality,M=void 0===x?"low":x,C=a.maxWidth,D=void 0===C?1/0:C,O=a.maxHeight,T=void 0===O?1/0:O,B=a.minWidth,k=void 0===B?0:B,E=a.minHeight,W=void 0===E?0:E,z=document.createElement("canvas"),H=z.getContext("2d"),N=Yt({aspectRatio:m,width:D,height:T}),R=Yt({aspectRatio:m,width:k,height:W},"cover"),Y=Math.min(N.width,Math.max(R.width,g)),L=Math.min(N.height,Math.max(R.height,f)),X=Yt({aspectRatio:n,width:D,height:T}),j=Yt({aspectRatio:n,width:k,height:W},"cover"),S=Math.min(X.width,Math.max(j.width,r)),A=Math.min(X.height,Math.max(j.height,h)),P=[-S/2,-A/2,S,A];return z.width=ut(Y),z.height=ut(L),H.fillStyle=w,H.fillRect(0,0,Y,L),H.save(),H.translate(Y/2,L/2),H.rotate(c*Math.PI/180),H.scale(d,u),H.imageSmoothingEnabled=y,H.imageSmoothingQuality=M,H.drawImage.apply(H,[t].concat(o(P.map(function(t){return Math.floor(ut(t))})))),H.restore(),z}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(t.rounded),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=Yt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Yt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Yt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),m=u.width,g=u.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=ut(m),f.height=ut(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,M,C,D,O,T,B=i.width,k=i.height,E=n,W=r;E<=-h||E>B?(E=0,x=0,C=0,O=0):E<=0?(C=-E,E=0,O=x=Math.min(B,h+E)):E<=B&&(C=0,O=x=Math.min(h,B-E)),x<=0||W<=-s||W>k?(W=0,M=0,D=0,T=0):W<=0?(D=-W,W=0,T=M=Math.min(k,s+W)):W<=k&&(D=0,T=M=Math.min(s,k-W));var z=[E,W,x,M];if(O>0&&T>0){var H=m/h;z.push(C*H,D*H,O*H,T*H)}return v.drawImage.apply(v,[i].concat(o(z.map(function(t){return Math.floor(ut(t))})))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||at(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===N,o=e.movable&&t===R;t=n||o?t:Y,e.dragMode=t,Mt(i,z,t),wt(i,D,n),wt(i,W,o),e.cropBoxMovable||(Mt(a,z,t),wt(a,D,n),wt(a,W,o))}return this}},qt=s.Cropper,$t=/*#__PURE__*/function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!J.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=dt({},_,rt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return e=t,i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[d]){if(e[d]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(V.test(t))F.test(t)?this.read((n=t.replace(Xt,""),o=atob(n),r=new ArrayBuffer(o.length),lt(h=new Uint8Array(r),function(t,e){h[e]=o.charCodeAt(e)}),r)):this.clone();else{var n,o,r,h,s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==K&&s.abort()},s.onload=function(){e.read(s.response)},s.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&zt(t)&&i.crossOrigin&&(t=Ht(t)),s.open("GET",t,!0),s.responseType="arraybuffer",s.withCredentials="use-credentials"===i.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=function(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Lt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(m){e=1}return e}(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Lt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,K);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&zt(e)&&(i||(i="anonymous"),a=Ht(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),ft(n,B),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(s.navigator.userAgent),a=function(e,i){dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(d,"-container")),r=o.querySelector(".".concat(d,"-canvas")),h=o.querySelector(".".concat(d,"-drag-box")),s=o.querySelector(".".concat(d,"-crop-box")),c=s.querySelector(".".concat(d,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(d,"-view-box")),this.face=c,r.appendChild(i),ft(t,T),a.insertBefore(o,t.nextSibling),vt(i,B),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,ft(s,T),e.guides||ft(s.getElementsByClassName("".concat(d,"-dashed")),T),e.center||ft(s.getElementsByClassName("".concat(d,"-center")),T),e.background&&ft(o,"".concat(d,"-bg")),e.highlight||ft(c,k),e.cropBoxMovable&&(ft(c,W),Mt(c,z,p)),e.cropBoxResizable||(ft(s.getElementsByClassName("".concat(d,"-line")),T),ft(s.getElementsByClassName("".concat(d,"-point")),T)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),ht(e.ready)&&Tt(t,q,e.ready,{once:!0}),Bt(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),vt(this.element,T)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],a=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){dt(_,rt(t)&&t)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();return dt($t.prototype,jt,St,At,Pt,It,Ut),$t},"object"==typeof t&&void 0!==e?e.exports=a():"function"==typeof define&&define.amd?define(a):(i="undefined"!=typeof globalThis?globalThis:i||self).Cropper=a()}),n=/* @__PURE__ */t(i()),o=/* @__PURE__ */t(a()),r=function(){return r=Object.assign||function(t){for(var e,i=1,a=arguments.length;i<a;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)};function h(t,e){var i={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(i[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(t);n<a.length;n++)e.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(t,a[n])&&(i[a[n]]=t[a[n]])}return i}var s=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],c={opacity:0,maxWidth:"100%"},l=n.forwardRef(function(t,e){var i=h(t,[]),a=i.dragMode,l=void 0===a?"crop":a,d=i.src,p=i.style,u=i.className,m=i.crossOrigin,g=i.scaleX,f=i.scaleY,v=i.enable,w=i.zoomTo,b=i.rotateTo,y=i.alt,x=void 0===y?"picture":y,M=i.ready,C=i.onInitialized,D=h(i,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),O={scaleY:f,scaleX:g,enable:v,zoomTo:w,rotateTo:b},T=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=(0,n.useRef)(null);return n.useEffect(function(){t.forEach(function(t){t&&("function"==typeof t?t(i.current):t.current=i.current)})},[t]),i}(e,(0,n.useRef)(null));(0,n.useEffect)(function(){var t;null!==(t=T.current)&&void 0!==t&&t.cropper&&"number"==typeof w&&T.current.cropper.zoomTo(w)},[i.zoomTo]),(0,n.useEffect)(function(){var t;null!==(t=T.current)&&void 0!==t&&t.cropper&&void 0!==d&&T.current.cropper.reset().clear().replace(d)},[d]),(0,n.useEffect)(function(){if(null!==T.current){var t=new o.default(T.current,r(r({dragMode:l},D),{ready:function(t){null!==t.currentTarget&&function(t,e){void 0===e&&(e={});var i=e.enable,a=void 0===i||i,n=e.scaleX,o=void 0===n?1:n,r=e.scaleY,h=void 0===r?1:r,s=e.zoomTo,c=void 0===s?0:s,l=e.rotateTo;a?t.enable():t.disable(),t.scaleX(o),t.scaleY(h),void 0!==l&&t.rotateTo(l),c>0&&t.zoomTo(c)}(t.currentTarget.cropper,O),M&&M(t)}}));C&&C(t)}return function(){var t,e;null===(e=null===(t=T.current)||void 0===t?void 0:t.cropper)||void 0===e||e.destroy()}},[T]);var B,k=(B=r(r({},D),{crossOrigin:m,src:d,alt:x}),s.reduce(function(t,e){var i=t,a=e;return i[a],h(i,["symbol"==typeof a?a:a+""])},B));return n.createElement("div",{style:p,className:u},n.createElement("img",r({},k,{style:c,ref:T})))});export{l as Cropper,l as default};
|