@dwelle/excalidraw 0.3.78 → 0.4.0-08c4fac
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/CHANGELOG.md +102 -754
- package/README.md +94 -26
- package/dist/excalidraw-assets/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets/vendor-2002fe1b8862917b36c1.js +2 -0
- package/dist/excalidraw-assets/vendor-2002fe1b8862917b36c1.js.LICENSE.txt +12 -0
- package/dist/excalidraw-assets-dev/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/vendor-e6df8519da951026ff69.js +98 -0
- package/dist/excalidraw.development.js +1323 -1074
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +2 -0
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +314 -311
- package/types/actions/actionAlign.d.ts +103 -91
- package/types/actions/actionBoundText.d.ts +129 -128
- package/types/actions/actionCanvas.d.ts +923 -901
- package/types/actions/actionClipboard.d.ts +595 -589
- package/types/actions/actionDeleteSelected.d.ts +345 -339
- package/types/actions/actionDistribute.d.ts +37 -33
- package/types/actions/actionDuplicateSelection.d.ts +24 -22
- package/types/actions/actionExport.d.ts +1025 -1000
- package/types/actions/actionFinalize.d.ts +220 -216
- package/types/actions/actionFlip.d.ts +35 -35
- package/types/actions/actionGroup.d.ts +49 -45
- package/types/actions/actionHistory.d.ts +6 -6
- package/types/actions/actionLinearEditor.d.ts +115 -0
- package/types/actions/actionMenu.d.ts +358 -349
- package/types/actions/actionNavigate.d.ts +15 -13
- package/types/actions/actionProperties.d.ts +1493 -1454
- package/types/actions/actionSelectAll.d.ts +16 -16
- package/types/actions/actionStyles.d.ts +130 -129
- package/types/actions/actionToggleGridMode.d.ts +117 -116
- package/types/actions/actionToggleLock.d.ts +116 -115
- package/types/actions/actionToggleStats.d.ts +115 -114
- package/types/actions/actionToggleViewMode.d.ts +116 -115
- package/types/actions/actionToggleZenMode.d.ts +116 -115
- package/types/actions/actionZindex.d.ts +75 -67
- package/types/actions/index.d.ts +24 -23
- package/types/actions/manager.d.ts +20 -20
- package/types/actions/register.d.ts +5 -5
- package/types/actions/shortcuts.d.ts +3 -3
- package/types/actions/types.d.ts +42 -40
- package/types/align.d.ts +6 -6
- package/types/analytics.d.ts +1 -1
- package/types/appState.d.ts +77 -76
- package/types/charts.d.ts +27 -27
- package/types/clients.d.ts +6 -6
- package/types/clipboard.d.ts +20 -20
- package/types/colors.d.ts +6 -6
- package/types/components/Actions.d.ts +35 -23
- package/types/components/ActiveFile.d.ts +7 -7
- package/types/components/App.d.ts +420 -368
- package/types/components/Avatar.d.ts +11 -11
- package/types/components/ButtonIconSelect.d.ts +11 -11
- package/types/components/CheckboxItem.d.ts +8 -8
- package/types/components/ClearCanvas.d.ts +4 -4
- package/types/components/CollabButton.d.ts +6 -7
- package/types/components/ColorPicker.d.ts +14 -14
- package/types/components/ConfirmDialog.d.ts +10 -10
- package/types/components/ContextMenu.d.ts +28 -28
- package/types/components/DarkModeToggle.d.ts +7 -7
- package/types/components/Dialog.d.ts +14 -14
- package/types/components/DialogActionButton.d.ts +10 -0
- package/types/components/ErrorDialog.d.ts +4 -4
- package/types/components/FixedSideContainer.d.ts +9 -9
- package/types/components/Footer.d.ts +10 -0
- package/types/components/HelpButton.d.ts +8 -0
- package/types/components/HelpDialog.d.ts +4 -4
- package/types/components/HintViewer.d.ts +11 -10
- package/types/components/HomeButton.d.ts +5 -0
- package/types/components/IconPicker.d.ts +13 -13
- package/types/components/ImageExportDialog.d.ts +18 -16
- package/types/components/InitializeApp.d.ts +10 -8
- package/types/components/Island.d.ts +10 -10
- package/types/components/JSONExportDialog.d.ts +13 -13
- package/types/components/LayerUI.d.ts +40 -38
- package/types/components/LibraryButton.d.ts +8 -7
- package/types/components/LibraryMenu.d.ts +25 -17
- package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +12 -0
- package/types/components/LibraryMenuItems.d.ts +15 -24
- package/types/components/LibraryUnit.d.ts +11 -12
- package/types/components/LoadingMessage.d.ts +6 -4
- package/types/components/LockButton.d.ts +11 -11
- package/types/components/MenuItem.d.ts +11 -0
- package/types/components/MenuUtils.d.ts +1 -0
- package/types/components/MobileMenu.d.ts +30 -29
- package/types/components/Modal.d.ts +12 -12
- package/types/components/PasteChartDialog.d.ts +9 -9
- package/types/components/PenModeButton.d.ts +12 -12
- package/types/components/Popover.d.ts +15 -15
- package/types/components/ProjectName.d.ts +10 -10
- package/types/components/PublishLibrary.d.ts +16 -16
- package/types/components/Section.d.ts +6 -6
- package/types/components/Sidebar/Sidebar.d.ts +73 -0
- package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
- package/types/components/Sidebar/common.d.ts +16 -0
- package/types/components/SingleLibraryItem.d.ts +10 -10
- package/types/components/Spinner.d.ts +6 -6
- package/types/components/Stack.d.ts +15 -15
- package/types/components/Stats.d.ts +11 -11
- package/types/components/Toast.d.ts +7 -7
- package/types/components/ToolButton.d.ts +46 -46
- package/types/components/Tooltip.d.ts +17 -17
- package/types/components/UserList.d.ts +10 -11
- package/types/components/WelcomeScreen.d.ts +8 -0
- package/types/components/WelcomeScreenDecor.d.ts +6 -0
- package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
- package/types/components/icons.d.ts +139 -180
- package/types/constants.d.ts +157 -149
- package/types/data/blob.d.ts +47 -47
- package/types/data/encode.d.ts +53 -53
- package/types/data/encryption.d.ts +9 -9
- package/types/data/filesystem.d.ts +18 -18
- package/types/data/image.d.ts +15 -15
- package/types/data/index.d.ts +13 -13
- package/types/data/json.d.ts +16 -16
- package/types/data/library.d.ts +96 -96
- package/types/data/resave.d.ts +5 -5
- package/types/data/restore.d.ts +15 -15
- package/types/data/types.d.ts +47 -32
- package/types/distribute.d.ts +6 -6
- package/types/element/Hyperlink.d.ts +138 -136
- package/types/element/binding.d.ts +33 -33
- package/types/element/bounds.d.ts +27 -27
- package/types/element/collision.d.ts +21 -21
- package/types/element/dragElements.d.ts +5 -5
- package/types/element/image.d.ts +22 -22
- package/types/element/index.d.ts +20 -20
- package/types/element/linearElementEditor.d.ts +223 -203
- package/types/element/mutateElement.d.ts +11 -11
- package/types/element/newElement.d.ts +63 -50
- package/types/element/resizeElements.d.ts +9 -9
- package/types/element/resizeTest.d.ts +13 -13
- package/types/element/showSelectedShapeActions.d.ts +3 -3
- package/types/element/sizeHelpers.d.ts +21 -21
- package/types/element/textElement.d.ts +30 -26
- package/types/element/textWysiwyg.d.ts +16 -16
- package/types/element/transformHandles.d.ts +29 -28
- package/types/element/typeChecks.d.ts +17 -17
- package/types/element/types.d.ts +134 -133
- package/types/emitter.d.ts +21 -21
- package/types/errors.d.ts +8 -8
- package/types/ga.d.ts +63 -63
- package/types/gadirections.d.ts +8 -8
- package/types/galines.d.ts +22 -22
- package/types/gapoints.d.ts +7 -7
- package/types/gatransforms.d.ts +10 -10
- package/types/gesture.d.ts +6 -6
- package/types/groups.d.ts +27 -27
- package/types/history.d.ts +52 -52
- package/types/hooks/useCallbackRefState.d.ts +1 -1
- package/types/hooks/useOutsideClick.d.ts +2 -0
- package/types/i18n.d.ts +15 -15
- package/types/jotai.d.ts +122 -122
- package/types/keys.d.ts +68 -68
- package/types/math.d.ts +27 -20
- package/types/packages/excalidraw/dist/{excalidraw-assets-dev/image-469d5bd946743969995a.d.ts → excalidraw-assets/vendor-2002fe1b8862917b36c1.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/{image-028ba554a42cc8a4995a.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw.development.d.ts +2 -2
- package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +1 -5
- package/types/packages/excalidraw/entry.d.ts +1 -1
- package/types/packages/excalidraw/env.d.ts +1 -1
- package/types/packages/excalidraw/example/App.d.ts +8 -7
- package/types/packages/excalidraw/example/index.d.ts +1 -1
- package/types/packages/excalidraw/example/initialData.d.ts +172 -172
- package/types/packages/excalidraw/example/sidebar/{Sidebar.d.ts → ExampleSidebar.d.ts} +5 -5
- package/types/packages/excalidraw/index.d.ts +19 -18
- package/types/packages/excalidraw/main.d.ts +2 -2
- package/types/packages/excalidraw/publicPath.d.ts +1 -1
- package/types/packages/excalidraw/webpack.dev-server.config.d.ts +19 -19
- package/types/packages/excalidraw/webpack.dev.config.d.ts +79 -79
- package/types/packages/excalidraw/webpack.prod.config.d.ts +92 -92
- package/types/packages/utils.d.ts +35 -32
- package/types/points.d.ts +7 -6
- package/types/polyfill.d.ts +2 -0
- package/types/random.d.ts +3 -3
- package/types/renderer/renderElement.d.ts +35 -35
- package/types/renderer/renderScene.d.ts +41 -25
- package/types/renderer/roundRect.d.ts +11 -11
- package/types/scene/Scene.d.ts +25 -25
- package/types/scene/comparisons.d.ts +11 -11
- package/types/scene/export.d.ts +20 -20
- package/types/scene/index.d.ts +5 -5
- package/types/scene/scroll.d.ts +17 -17
- package/types/scene/scrollbars.d.ts +16 -16
- package/types/scene/selection.d.ts +11 -11
- package/types/scene/types.d.ts +59 -58
- package/types/scene/zoom.d.ts +13 -13
- package/types/shapes.d.ts +52 -38
- package/types/types.d.ts +399 -393
- package/types/utils.d.ts +136 -136
- package/types/zindex.d.ts +6 -6
- package/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.js +0 -2
- package/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.js.LICENSE.txt +0 -6
- package/dist/excalidraw-assets-dev/vendor-33bd21df77fc9cda16d2.js +0 -98
- package/types/actions/actionUnbindText.d.ts +0 -11
- package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -9
- package/types/components/Card.d.ts +0 -7
- package/types/components/HelpIcon.d.ts +0 -8
- package/types/components/SidebarLockButton.d.ts +0 -8
- package/types/disitrubte.d.ts +0 -6
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ar-SA-json-9a3fdf94110439c2826a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ar-SA-json-efd63375f9605b72c4af.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bg-BG-json-047db6df7a74c0298938.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bg-BG-json-35c0e8b92b0dba8a4e6d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ca-ES-json-6acefe26cfe1d2f12349.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ca-ES-json-9924fbd53652d5f15134.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-cs-CZ-json-85a469d813bb069829e7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-de-DE-json-a52c17c4bd1b1db22464.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-de-DE-json-f85a8a52534c04c3f3b8.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-el-GR-json-060595a09e0004e33936.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-el-GR-json-3b209ec86ca2ce69bdfa.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-es-ES-json-32dc3bf0f789ef18e65d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-es-ES-json-af5c541f9ac1526a9eb7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fa-IR-json-7ee232d4ef08da0903f6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fa-IR-json-c732ff7772327332c259.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fi-FI-json-46abeda8d809d4091924.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fi-FI-json-c1d5c5510660a11a428e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fr-FR-json-6a418571305eecefe9bc.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fr-FR-json-79fa555bfea0a356f393.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-he-IL-json-157ae036fcf470528687.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-he-IL-json-d006423b531ab062bb85.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hi-IN-json-3035c3b3ab3ce981dbc7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hi-IN-json-d959b869453c591a8861.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hu-HU-json-50a13e322a60bb701615.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hu-HU-json-a366989217753fe3d02b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-id-ID-json-87212daac6113b5bf808.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-id-ID-json-8d13d29ee41be15a1f99.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-it-IT-json-59f2e9d3dac07f3264cb.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-it-IT-json-90283cd2809f4165506b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ja-JP-json-9e0a78ddb43d5709fb29.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ja-JP-json-ccb5ffd0f8a0980c2ec0.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kab-KAB-json-d9acc7b8ee952e356d06.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kab-KAB-json-dac787e0446cdb747fe1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ko-KR-json-d61af373bea59d1ff4c6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ko-KR-json-e42ededaa35032a201b9.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lv-LV-json-07f6bffcb44fdd9aad4f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lv-LV-json-7eea5c4054f8418fdd10.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-my-MM-json-26d1e27bab3b8ac4a3e6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-my-MM-json-a8f9bb37a7b947e9dfba.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nb-NO-json-8ce0749d46f0b4a8defb.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nb-NO-json-c01fab8602e1b658d5d1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nl-NL-json-23fdfd9f11bc8efbaf56.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nl-NL-json-cf922daa828029c1aff5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nn-NO-json-b5931de6e1ed336bf087.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nn-NO-json-d363be6b3dcdbf3a868a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-oc-FR-json-29d6193adb907d4f5890.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-oc-FR-json-c6414107ad634b113aba.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pa-IN-json-27063e4865142ac11b1a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pa-IN-json-f0c779291da384fb5173.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pl-PL-json-16af1b83ac16af57ad07.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pl-PL-json-a4a5c6e0a9877c43476a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-BR-json-03a046855063512eb9ff.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-BR-json-db86828d6e3ced9f9854.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-PT-json-7ed352e9de6dc74ef503.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-PT-json-bc0cd589bd87a3079407.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ro-RO-json-75692b7a0166d6ad27a4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ro-RO-json-f13a2e7b7a63fbfb6ae7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ru-RU-json-69b1a919b7f42adfd6ec.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ru-RU-json-7c2a2061d0ca99cf7007.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sk-SK-json-0ef09f90308059d22ae8.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sk-SK-json-4757551ceb15fa0a29a9.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sv-SE-json-dc7718d79b9bf93a4ba4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sv-SE-json-fa5bd09f128972b13ac2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-tr-TR-json-b574833ee1c2f58fd24e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-tr-TR-json-cba7e62d9610795a5ac3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-uk-UA-json-a9a8ea7adb95c0a03680.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-uk-UA-json-f0cab296bdc4089ffa77.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-CN-json-45da9983459601b845e8.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-CN-json-94f562845a945a45e385.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-TW-json-0e77c896018bcd221bf6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-TW-json-7dd3d9ba72493687c286.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-02a1f3ecd6baf42daaa6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-0db17e06143a31f9772b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-2be1c869cd5bacebdc3c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-46f5e8e621bfedbf6d91.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-6f8d3b9873832b5f7a67.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-8e0c265e832504f62477.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-9592159c56d563857679.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-98a7b39bd21998c69c4b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-a26261fb8a718f15853e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-a97adda58b4c4d8d0107.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-af02967a8a4c328f2713.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-bd5991c772b4867c8d27.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-c198828284ec0dba28dc.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-eac20119cbc2ceb81523.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-eafab0c39ce13f7fea67.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-0e2ecbd1f46fc190ec01.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-1018b0a7e7e60d808384.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-405364e1fdefedf5d3d7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-448ccb79e58765b61834.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-585a4c89d479fd91edeb.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-64ea3ed78bc76a895e61.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-6644c8f79d52085cf653.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-807e23d7531555236936.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-8698157b56eb5e0ee549.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-b088910ac1ba8853a571.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-cb708a4580b007d81177.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-ce466849186c701b6c48.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-e5c6cd57013e8e575a61.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-664005f0b02c93342b89.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-73be8b3c1837ea26950c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-821afe7d20de2d2ca898.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-8825d180ee32659f8996.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-89cddf27ef982ca154dc.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-9f771c114a0a3ad7b334.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-a98d24ea9aa42940a0df.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-b2befe1e2a0424a41fb3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-cacb3d0c02eb2e346ecc.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-d7e941a51c2e0a7b3c23.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-e50a452aa26d28419e39.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-eddc6ed66acd3a3f3d46.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-f696fa36e3535df5e97a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-0454f90696ac835aeb45.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-1bc8ceaafd8623c96dd4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-26ccabf52930f0ce0ffd.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-33bd21df77fc9cda16d2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-4534d6e506404cef7a9e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-5d1c4700bd0fa2109ab5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-7664c12c379862ed98a5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-7fcb99cece261da4983f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-86b56a69e7dddcf8f70d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-a449655791956f151f51.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-bb07a412033591d5470d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-ec7db14ff9ba640888c4.d.ts +0 -0
- package/types/renderer/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -376,13 +376,17 @@ Most notably, you can customize the primary colors, by overriding these variable
|
|
|
376
376
|
|
|
377
377
|
For a complete list of variables, check [theme.scss](https://github.com/excalidraw/excalidraw/blob/master/src/css/theme.scss), though most of them will not make sense to override.
|
|
378
378
|
|
|
379
|
+
### Does this package support collaboration ?
|
|
380
|
+
|
|
381
|
+
No, Excalidraw package doesn't come with collaboration built in, since the implementation is specific to each host app. We expose APIs which you can use to communicate with Excalidraw which you can use to implement it. You can check our own implementation [here](https://github.com/excalidraw/excalidraw/blob/master/src/excalidraw-app/index.tsx).
|
|
382
|
+
|
|
379
383
|
### Props
|
|
380
384
|
|
|
381
385
|
| Name | Type | Default | Description |
|
|
382
386
|
| --- | --- | --- | --- |
|
|
383
387
|
| [`onChange`](#onChange) | Function | | This callback is triggered whenever the component updates due to any change. This callback will receive the excalidraw elements and the current app state. |
|
|
384
|
-
| [`initialData`](#initialData) | <
|
|
385
|
-
| [`ref`](#ref) | [`createRef`](https://reactjs.org/docs/refs-and-the-dom.html#creating-refs) | [`useRef`](https://reactjs.org/docs/hooks-reference.html#useref) | [`callbackRef`](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) | <
|
|
388
|
+
| [`initialData`](#initialData) | <code>{elements?: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L106">ExcalidrawElement[]</a>, appState?: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L79">AppState<a> } </code> | null | The initial data with which app loads. |
|
|
389
|
+
| [`ref`](#ref) | [`createRef`](https://reactjs.org/docs/refs-and-the-dom.html#creating-refs) | [`useRef`](https://reactjs.org/docs/hooks-reference.html#useref) | [`callbackRef`](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) | <code>{ current: { readyPromise: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/utils.ts#L317">resolvablePromise</a> } }</code> | | Ref to be passed to Excalidraw |
|
|
386
390
|
| [`onCollabButtonClick`](#onCollabButtonClick) | Function | | Callback to be triggered when the collab button is clicked |
|
|
387
391
|
| [`isCollaborating`](#isCollaborating) | `boolean` | | This implies if the app is in collaboration mode |
|
|
388
392
|
| [`onPointerUpdate`](#onPointerUpdate) | Function | | Callback triggered when mouse pointer is updated. |
|
|
@@ -390,22 +394,23 @@ For a complete list of variables, check [theme.scss](https://github.com/excalidr
|
|
|
390
394
|
| [`renderTopRightUI`](#renderTopRightUI) | Function | | Function that renders custom UI in top right corner |
|
|
391
395
|
| [`renderFooter `](#renderFooter) | Function | | Function that renders custom UI footer |
|
|
392
396
|
| [`renderCustomStats`](#renderCustomStats) | Function | | Function that can be used to render custom stats on the stats dialog. |
|
|
397
|
+
| [`renderSIdebar`](#renderSIdebar) | Function | | Render function that renders custom sidebar. |
|
|
393
398
|
| [`viewModeEnabled`](#viewModeEnabled) | boolean | | This implies if the app is in view mode. |
|
|
394
399
|
| [`zenModeEnabled`](#zenModeEnabled) | boolean | | This implies if the zen mode is enabled |
|
|
395
400
|
| [`gridModeEnabled`](#gridModeEnabled) | boolean | | This implies if the grid mode is enabled |
|
|
396
401
|
| [`libraryReturnUrl`](#libraryReturnUrl) | string | | What URL should [libraries.excalidraw.com](https://libraries.excalidraw.com) be installed to |
|
|
397
|
-
| [`theme`](#theme) | [THEME.LIGHT](#THEME-1) | [THEME.
|
|
402
|
+
| [`theme`](#theme) | [THEME.LIGHT](#THEME-1) | [THEME.DARK](#THEME-1) | [THEME.LIGHT](#THEME-1) | The theme of the Excalidraw component |
|
|
398
403
|
| [`name`](#name) | string | | Name of the drawing |
|
|
399
|
-
| [`UIOptions`](#UIOptions) | <
|
|
400
|
-
| [`onPaste`](#onPaste) | <
|
|
404
|
+
| [`UIOptions`](#UIOptions) | <code>{ canvasActions: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L208"> CanvasActions<a/> }</code> | [DEFAULT UI OPTIONS](https://github.com/excalidraw/excalidraw/blob/master/src/constants.ts#L129) | To customise UI options. Currently we support customising [`canvas actions`](#canvasActions) |
|
|
405
|
+
| [`onPaste`](#onPaste) | <code>(data: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/clipboard.ts#L21">ClipboardData</a>, event: ClipboardEvent | null) => boolean</code> | | Callback to be triggered if passed when the something is pasted in to the scene |
|
|
401
406
|
| [`detectScroll`](#detectScroll) | boolean | true | Indicates whether to update the offsets when nearest ancestor is scrolled. |
|
|
402
407
|
| [`handleKeyboardGlobally`](#handleKeyboardGlobally) | boolean | false | Indicates whether to bind the keyboard events to document. |
|
|
403
|
-
| [`onLibraryChange`](#onLibraryChange) | <
|
|
408
|
+
| [`onLibraryChange`](#onLibraryChange) | <code>(items: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L200">LibraryItems</a>) => void | Promise<any> </code> | | The callback if supplied is triggered when the library is updated and receives the library items. |
|
|
404
409
|
| [`autoFocus`](#autoFocus) | boolean | false | Implies whether to focus the Excalidraw component on page load |
|
|
405
410
|
| [`generateIdForFile`](#generateIdForFile) | `(file: File) => string | Promise<string>` | Allows you to override `id` generation for files added on canvas |
|
|
406
|
-
| [`onLinkOpen`](#onLinkOpen) | <
|
|
407
|
-
| [`onPointerDown`](#onPointerDown) | <
|
|
408
|
-
| [`onScrollChange`](#onScrollChange) | (scrollX: number, scrollY: number) | | This prop if passed gets triggered when scrolling the canvas. |
|
|
411
|
+
| [`onLinkOpen`](#onLinkOpen) | <code>(element: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L106">NonDeletedExcalidrawElement</a>, event: CustomEvent) </code> | | This prop if passed will be triggered when link of an element is clicked. |
|
|
412
|
+
| [`onPointerDown`](#onPointerDown) | <code>(activeTool: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L93"> AppState["activeTool"]</a>, pointerDownState: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L365">PointerDownState</a>) => void</code> | | This prop if passed gets triggered on pointer down evenets |
|
|
413
|
+
| [`onScrollChange`](#onScrollChange) | <code>(scrollX: number, scrollY: number)</code> | | This prop if passed gets triggered when scrolling the canvas. |
|
|
409
414
|
|
|
410
415
|
### Dimensions of Excalidraw
|
|
411
416
|
|
|
@@ -470,12 +475,20 @@ This helps to load Excalidraw with `initialData`. It must be an object or a [pro
|
|
|
470
475
|
|
|
471
476
|
You might want to use this when you want to load excalidraw with some initial elements and app state.
|
|
472
477
|
|
|
478
|
+
#### Storing custom data on Excalidraw elements
|
|
479
|
+
|
|
480
|
+
Beyond attributes that Excalidraw elements already support, you can store custom data on each element in a `customData` object. The type of the attribute is [`Record<string, any>`](https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L59) and is optional.
|
|
481
|
+
|
|
482
|
+
You can use this to add any extra information you need to keep track of.
|
|
483
|
+
|
|
484
|
+
You can add `customData` to elements when passing them as `initialData`, or using [`updateScene`](#updateScene)/[`updateLibrary`](#updateLibrary) afterwards.
|
|
485
|
+
|
|
473
486
|
#### `ref`
|
|
474
487
|
|
|
475
488
|
You can pass a `ref` when you want to access some excalidraw APIs. We expose the below APIs:
|
|
476
489
|
|
|
477
|
-
| API |
|
|
478
|
-
| --- | --- | --- |
|
|
490
|
+
| API | Signature | Usage |
|
|
491
|
+
| --- | --- | --- |
|
|
479
492
|
| ready | `boolean` | This is set to true once Excalidraw is rendered |
|
|
480
493
|
| readyPromise | [resolvablePromise](https://github.com/excalidraw/excalidraw/blob/master/src/utils.ts#L317) | This promise will be resolved with the api once excalidraw has rendered. This will be helpful when you want do some action on the host app once this promise resolves. For this to work you will have to pass ref as shown [here](#readyPromise) |
|
|
481
494
|
| [updateScene](#updateScene) | <code>(scene: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L207">sceneData</a>) => void </code> | updates the scene with the sceneData |
|
|
@@ -488,13 +501,14 @@ You can pass a `ref` when you want to access some excalidraw APIs. We expose the
|
|
|
488
501
|
| history | `{ clear: () => void }` | This is the history API. `history.clear()` will clear the history |
|
|
489
502
|
| scrollToContent | <code> (target?: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L106">ExcalidrawElement</a> | <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L106">ExcalidrawElement</a>[]) => void </code> | Scroll the nearest element out of the elements supplied to the center. Defaults to the elements on the scene. |
|
|
490
503
|
| refresh | `() => void` | Updates the offsets for the Excalidraw component so that the coordinates are computed correctly (for example the cursor position). You don't have to call this when the position is changed on page scroll or when the excalidraw container resizes (we handle that ourselves). For any other cases if the position of excalidraw is updated (example due to scroll on parent container and not page scroll) you should call this API. |
|
|
491
|
-
| [importLibrary](#importlibrary) |
|
|
492
|
-
| [setToast](#setToast) |
|
|
504
|
+
| [importLibrary](#importlibrary) | <code>(url: string, token?: string) => void</code> | Imports library from given URL |
|
|
505
|
+
| [setToast](#setToast) | <code>({ message: string, closable?:boolean, duration?:number } | null) => void</code> | This API can be used to show the toast with custom message. |
|
|
493
506
|
| [id](#id) | string | Unique ID for the excalidraw component. |
|
|
494
507
|
| [getFiles](#getFiles) | <code>() => <a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L64">files</a> </code> | This API can be used to get the files present in the scene. It may contain files that aren't referenced by any element, so if you're persisting the files to a storage, you should compare them against stored elements. |
|
|
495
|
-
| [setActiveTool](#setActiveTool) | <code>(tool: { type: typeof <a href="https://github.com/excalidraw/excalidraw/blob/master/src/shapes.tsx#L4">SHAPES</a>[number]["value"]
|
|
508
|
+
| [setActiveTool](#setActiveTool) | <code>(tool: { type: typeof <a href="https://github.com/excalidraw/excalidraw/blob/master/src/shapes.tsx#L4">SHAPES</a> [number]["value"]| "eraser" } | { type: "custom"; customType: string }) => void</code> | This API can be used to set the active tool |
|
|
496
509
|
| [setCursor](#setCursor) | <code>(cursor: string) => void </code> | This API can be used to set customise the mouse cursor on the canvas |
|
|
497
510
|
| [resetCursor](#resetCursor) | <code>() => void </code> | This API can be used to reset to default mouse cursor on the canvas |
|
|
511
|
+
| [toggleMenu](#toggleMenu) | <code>(type: string, force?: boolean) => boolean</code> | Toggles specific menus on/off |
|
|
498
512
|
|
|
499
513
|
#### `readyPromise`
|
|
500
514
|
|
|
@@ -611,6 +625,38 @@ A function returning JSX to render custom UI footer. For example, you can use th
|
|
|
611
625
|
|
|
612
626
|
A function that can be used to render custom stats (returns JSX) in the nerd stats dialog. For example you can use this prop to render the size of the elements in the storage.
|
|
613
627
|
|
|
628
|
+
#### `renderSidebar`
|
|
629
|
+
|
|
630
|
+
<pre>
|
|
631
|
+
() => JSX | null
|
|
632
|
+
</pre>
|
|
633
|
+
|
|
634
|
+
Optional function that can render custom sidebar. This sidebar is the same that the library menu sidebar is using, and can be used for any purposes your app needs. The render function should return a `<Sidebar>` instance — a component that is exported from the Excalidraw package. It accepts `children` which can be any content you like to render inside.
|
|
635
|
+
|
|
636
|
+
The `<Sidebar>` component takes these props (all are optional except `children`):
|
|
637
|
+
|
|
638
|
+
| name | type | description |
|
|
639
|
+
| --- | --- | --- |
|
|
640
|
+
| className | string |
|
|
641
|
+
| children | <pre>React.ReactNode</pre> | Content you want to render inside the sidebar. |
|
|
642
|
+
| onClose | <pre>() => void</pre> | Invoked when the component is closed (by user, or the editor). No need to act on this event, as the editor manages the sidebar open state on its own. |
|
|
643
|
+
| onDock | <pre>(isDocked: boolean) => void</pre> | Invoked when the user toggles the dock button. |
|
|
644
|
+
| docked | boolean | Indicates whether the sidebar is docked. By default, the sidebar is undocked. If passed, the docking becomes controlled, and you are responsible for updating the `docked` state by listening on `onDock` callback. See [here](#dockedSidebarBreakpoint) for more info docking. |
|
|
645
|
+
| dockable | boolean | Indicates whether the sidebar can be docked by user (=the dock button is shown). If `false`, you can still dock programmatically by passing `docked=true` |
|
|
646
|
+
|
|
647
|
+
The sidebar will always include a header with close/dock buttons (when applicable).
|
|
648
|
+
|
|
649
|
+
You can also add custom content to the header, by rendering `<Sidebar.Header>` as a child of the `<Sidebar>` component. Note that the custom header will still include the default buttons.
|
|
650
|
+
|
|
651
|
+
The `<Sidebar.Header>` component takes these props children (all are optional):
|
|
652
|
+
|
|
653
|
+
| name | type | description |
|
|
654
|
+
| --- | --- | --- |
|
|
655
|
+
| className | string |
|
|
656
|
+
| children | <pre>React.ReactNode</pre> | Content you want to render inside the sidebar header, sibling of the header buttons. |
|
|
657
|
+
|
|
658
|
+
For example code, see the example [`App.tsx`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/example/App.tsx#L524) file.
|
|
659
|
+
|
|
614
660
|
#### `viewModeEnabled`
|
|
615
661
|
|
|
616
662
|
This prop indicates whether the app is in `view mode`. When supplied, the value takes precedence over `intialData.appState.viewModeEnabled`, the `view mode` will be fully controlled by the host app, and users won't be able to toggle it from within the app.
|
|
@@ -629,7 +675,9 @@ If supplied, this URL will be used when user tries to install a library from [li
|
|
|
629
675
|
|
|
630
676
|
#### `theme`
|
|
631
677
|
|
|
632
|
-
This prop controls Excalidraw's theme. When supplied, the value takes precedence over `intialData.appState.theme`, the theme will be fully controlled by the host app, and users won't be able to toggle it from within the app.
|
|
678
|
+
This prop controls Excalidraw's theme. When supplied, the value takes precedence over `intialData.appState.theme`, the theme will be fully controlled by the host app, and users won't be able to toggle it from within the app unless `UIOptions.canvasActions.toggleTheme` is set to `true`, in which case the `theme` prop will control Excalidraw's default theme with ability to allow theme switching (you must take care of updating the `theme` prop when you detect a change to `appState.theme` from the [onChange](#onChange) callback).
|
|
679
|
+
|
|
680
|
+
You can use [`THEME`](#THEME-1) to specify the theme.
|
|
633
681
|
|
|
634
682
|
#### `name`
|
|
635
683
|
|
|
@@ -652,7 +700,7 @@ This prop can be used to customise UI of Excalidraw. Currently we support custom
|
|
|
652
700
|
| `export` | false | [exportOpts](#exportOpts) | <pre>{ saveFileToDisk: true }</pre> | This prop allows to customize the UI inside the export dialog. By default it shows the "saveFileToDisk". If this prop is `false` the export button will not be rendered. For more details visit [`exportOpts`](#exportOpts). |
|
|
653
701
|
| `loadScene` | boolean | true | Implies whether to show `Load button` |
|
|
654
702
|
| `saveToActiveFile` | boolean | true | Implies whether to show `Save button` to save to current file |
|
|
655
|
-
| `
|
|
703
|
+
| `toggleTheme` | boolean | null | null | Implies whether to show `Theme toggle`. When defined as `boolean`, takes precedence over [`props.theme`](#theme) to show `Theme toggle` |
|
|
656
704
|
| `saveAsImage` | boolean | true | Implies whether to show `Save as image button` |
|
|
657
705
|
|
|
658
706
|
##### `dockedSidebarBreakpoint`
|
|
@@ -743,6 +791,16 @@ This API can be used to customise the mouse cursor on the canvas and has the bel
|
|
|
743
791
|
(cursor: string) => void
|
|
744
792
|
</pre>
|
|
745
793
|
|
|
794
|
+
#### `toggleMenu`
|
|
795
|
+
|
|
796
|
+
<pre>
|
|
797
|
+
(type: "library" | "customSidebar", force?: boolean) => boolean
|
|
798
|
+
</pre>
|
|
799
|
+
|
|
800
|
+
This API can be used to toggle a specific menu (currently only the sidebars), and returns whether the menu was toggled on or off. If the `force` flag passed, it will force the menu to be toggled either on/off based on the boolean passed.
|
|
801
|
+
|
|
802
|
+
This API is especially useful when you render a custom sidebar using [`renderSidebar`](#renderSidebar) prop, and you want to toggle it from your app based on a user action.
|
|
803
|
+
|
|
746
804
|
#### `resetCursor`
|
|
747
805
|
|
|
748
806
|
This API can be used to reset to default mouse cursor.
|
|
@@ -832,10 +890,6 @@ This prop if passed will be triggered when canvas is scrolled and has the below
|
|
|
832
890
|
(scrollX: number, scrollY: number) => void
|
|
833
891
|
```
|
|
834
892
|
|
|
835
|
-
### Does it support collaboration ?
|
|
836
|
-
|
|
837
|
-
No, Excalidraw package doesn't come with collaboration built in, since the implementation is specific to each host app. We expose APIs which you can use to communicate with Excalidraw which you can use to implement it. You can check our own implementation [here](https://github.com/excalidraw/excalidraw/blob/master/src/excalidraw-app/index.tsx).
|
|
838
|
-
|
|
839
893
|
### Restore utilities
|
|
840
894
|
|
|
841
895
|
#### `restoreAppState`
|
|
@@ -861,7 +915,11 @@ When `localAppState` is supplied, it's used in place of values that are missing
|
|
|
861
915
|
**_Signature_**
|
|
862
916
|
|
|
863
917
|
<pre>
|
|
864
|
-
restoreElements(
|
|
918
|
+
restoreElements(
|
|
919
|
+
elements: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/data/types.ts#L16">ImportedDataState["elements"]</a>,
|
|
920
|
+
localElements: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/data/types.ts#L16">ExcalidrawElement[]</a> | null | undefined): <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L106">ExcalidrawElement[]</a>,
|
|
921
|
+
refreshDimensions: boolean
|
|
922
|
+
)
|
|
865
923
|
</pre>
|
|
866
924
|
|
|
867
925
|
**_How to use_**
|
|
@@ -874,12 +932,18 @@ This function will make sure all properties of element is correctly set and if a
|
|
|
874
932
|
|
|
875
933
|
When `localElements` are supplied, they are used to ensure that existing restored elements reuse `version` (and increment it), and regenerate `versionNonce`. Use this when you import elements which may already be present in the scene to ensure that you do not disregard the newly imported elements if you're using element version to detect the updates.
|
|
876
934
|
|
|
935
|
+
Parameter `refreshDimensions` indicates whether we should also recalculate text element dimensions. Defaults to `true`, but since this is a potentially costly operation, you may want to disable it if you restore elements in tight loops, such as during collaboration.
|
|
936
|
+
|
|
877
937
|
#### `restore`
|
|
878
938
|
|
|
879
939
|
**_Signature_**
|
|
880
940
|
|
|
881
941
|
<pre>
|
|
882
|
-
restoreElements(
|
|
942
|
+
restoreElements(
|
|
943
|
+
data: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/data/types.ts#L12">ImportedDataState</a>,
|
|
944
|
+
localAppState: Partial<<a href="https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L79">AppState</a>> | null | undefined,
|
|
945
|
+
localElements: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/data/types.ts#L16">ExcalidrawElement[]</a> | null | undefined): <a href="https://github.com/excalidraw/excalidraw/blob/master/src/data/types.ts#L4">DataState</a>
|
|
946
|
+
)
|
|
883
947
|
</pre>
|
|
884
948
|
|
|
885
949
|
See [`restoreAppState()`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#restoreAppState) about `localAppState`, and [`restoreElements()`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#restoreElements) about `localElements`.
|
|
@@ -921,7 +985,8 @@ This function normalizes library items elements, adding missing values when need
|
|
|
921
985
|
elements,
|
|
922
986
|
appState
|
|
923
987
|
getDimensions,
|
|
924
|
-
files
|
|
988
|
+
files,
|
|
989
|
+
exportPadding?: number;
|
|
925
990
|
}: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/packages/utils.ts#L12">ExportOpts</a>
|
|
926
991
|
</pre>
|
|
927
992
|
|
|
@@ -932,6 +997,7 @@ This function normalizes library items elements, adding missing values when need
|
|
|
932
997
|
| getDimensions | `(width: number, height: number) => { width: number, height: number, scale?: number }` | undefined | A function which returns the `width`, `height`, and optionally `scale` (defaults `1`), with which canvas is to be exported. |
|
|
933
998
|
| maxWidthOrHeight | `number` | undefined | The maximum width or height of the exported image. If provided, `getDimensions` is ignored. |
|
|
934
999
|
| files | [BinaryFiles](The [`BinaryFiles`](<[BinaryFiles](https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L64)>) | undefined | The files added to the scene. |
|
|
1000
|
+
| exportPadding | number | 10 | The padding to be added on canvas |
|
|
935
1001
|
|
|
936
1002
|
**How to use**
|
|
937
1003
|
|
|
@@ -949,7 +1015,8 @@ This function returns the canvas with the exported elements, appState and dimens
|
|
|
949
1015
|
exportToBlob(
|
|
950
1016
|
opts: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/packages/utils.ts#L14">ExportOpts</a> & {
|
|
951
1017
|
mimeType?: string,
|
|
952
|
-
quality?: number
|
|
1018
|
+
quality?: number,
|
|
1019
|
+
exportPadding?: number;
|
|
953
1020
|
})
|
|
954
1021
|
</pre>
|
|
955
1022
|
|
|
@@ -958,6 +1025,7 @@ exportToBlob(
|
|
|
958
1025
|
| opts | | | This param is passed to `exportToCanvas`. You can refer to [`exportToCanvas`](#exportToCanvas) |
|
|
959
1026
|
| mimeType | string | "image/png" | Indicates the image format |
|
|
960
1027
|
| quality | number | 0.92 | A value between 0 and 1 indicating the [image quality](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#parameters). Applies only to `image/jpeg`/`image/webp` MIME types. |
|
|
1028
|
+
| exportPadding | number | 10 | The padding to be added on canvas |
|
|
961
1029
|
|
|
962
1030
|
**How to use**
|
|
963
1031
|
|
|
@@ -1093,10 +1161,10 @@ import { loadLibraryFromBlob } from "@excalidraw/excalidraw";
|
|
|
1093
1161
|
**_Signature_**
|
|
1094
1162
|
|
|
1095
1163
|
<pre>
|
|
1096
|
-
loadLibraryFromBlob(blob: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob</a
|
|
1164
|
+
loadLibraryFromBlob(blob: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob</a>, defaultStatus: "published" | "unpublished")
|
|
1097
1165
|
</pre>
|
|
1098
1166
|
|
|
1099
|
-
This function loads the library from the blob.
|
|
1167
|
+
This function loads the library from the blob. Additonally takes `defaultStatus` param which sets the default status for library item if not present, defaults to `unpublished`.
|
|
1100
1168
|
|
|
1101
1169
|
#### `loadFromBlob`
|
|
1102
1170
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see vendor-2002fe1b8862917b36c1.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[]).push([[736],{4881:function(t){t.exports=function(){function t(e,r,n){function i(o,A){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o<n.length;o++)i(n[o]);return i}return t}()({1:[function(t,e,r){"use strict";var n=t("inherits"),i=t("multimath"),a=t("./mm_unsharp_mask"),o=t("./mm_resize");function A(t){var e=t||[],r={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};i.call(this,r),this.features={js:r.js,wasm:r.wasm&&this.has_wasm()},this.use(a),this.use(o)}n(A,i),A.prototype.resizeAndUnsharp=function(t,e){var r=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(r,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),r},e.exports=A},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){"use strict";function n(t){return t<0?0:t>255?255:t}function i(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}function a(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}e.exports={convolveHorizontally:i,convolveVertically:a}},{}],3:[function(t,e,r){"use strict";e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){"use strict";e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,r){"use strict";var n=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,a=t("./convolve").convolveVertically;function o(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}e.exports=function(t){var e=t.src,r=t.width,A=t.height,s=t.toWidth,u=t.toHeight,c=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,f=t.offsetX||0,l=t.offsetY||0,g=t.dest||new Uint8Array(s*u*4),p=void 0===t.quality?3:t.quality,d=t.alpha||!1,m=n(p,r,s,c,f),w=n(p,A,u,h,l),_=new Uint8Array(s*A*4);return i(e,_,r,A,s,m),a(_,g,A,s,u,w),d||o(g,s,u),g}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){"use strict";var n=t("./resize_filter_info"),i=14;function a(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,r,i,o){var A,s,u,c,h,f,l,g,p,d,m,w,_,I,v,b,y,B=n[t].filter,E=1/i,C=Math.min(1,i),Q=n[t].win/C,x=Math.floor(2*(Q+1)),M=new Int16Array((x+2)*r),D=0,k=!M.subarray||!M.set;for(A=0;A<r;A++){for(s=(A+.5)*E+o,u=Math.max(0,Math.floor(s-Q)),h=(c=Math.min(e-1,Math.ceil(s+Q)))-u+1,f=new Float32Array(h),l=new Int16Array(h),g=0,p=u,d=0;p<=c;p++,d++)g+=m=B((p+.5-s)*C),f[d]=m;for(w=0,d=0;d<f.length;d++)w+=_=f[d]/g,l[d]=a(_);for(l[r>>1]+=a(1-w),I=0;I<l.length&&0===l[I];)I++;if(I<l.length){for(v=l.length-1;v>0&&0===l[v];)v--;if(b=u+I,y=v-I+1,M[D++]=b,M[D++]=y,k)for(d=I;d<=v;d++)M[D++]=l[d];else M.set(l.subarray(I,v+1),D),D+=y}else M[D++]=0,M[D++]=0}return M}},{"./resize_filter_info":7}],7:[function(t,e,r){"use strict";e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,r){"use strict";var n=t("./resize_filter_gen");function i(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}function a(t){return new Uint8Array(t.buffer,0,t.byteLength)}var o=!0;try{o=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(t){}function A(t,e,r){if(o)e.set(a(t),r);else for(var n=r,i=0;i<t.length;i++){var A=t[i];e[n++]=255&A,e[n++]=A>>8&255}}e.exports=function(t){var e=t.src,r=t.width,a=t.height,o=t.toWidth,s=t.toHeight,u=t.scaleX||t.toWidth/t.width,c=t.scaleY||t.toHeight/t.height,h=t.offsetX||0,f=t.offsetY||0,l=t.dest||new Uint8Array(o*s*4),g=void 0===t.quality?3:t.quality,p=t.alpha||!1,d=n(g,r,o,u,h),m=n(g,a,s,c,f),w=0,_=this.__align(w+Math.max(e.byteLength,l.byteLength)),I=this.__align(_+a*o*4),v=this.__align(I+d.byteLength),b=v+m.byteLength,y=this.__instance("resize",b),B=new Uint8Array(this.__memory.buffer),E=new Uint32Array(this.__memory.buffer),C=new Uint32Array(e.buffer);return E.set(C),A(d,B,I),A(m,B,v),(y.exports.convolveHV||y.exports._convolveHV)(I,v,_,r,a,o,s),new Uint32Array(l.buffer).set(new Uint32Array(this.__memory.buffer,0,s*o)),p||i(l,o,s),l}},{"./resize_filter_gen":6}],9:[function(t,e,r){"use strict";e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,r){"use strict";var n=t("glur/mono16");function i(t,e,r){for(var n,i,a,o,A=e*r,s=new Uint16Array(A),u=0;u<A;u++)n=t[4*u],i=t[4*u+1],a=t[4*u+2],o=n>=i&&n>=a?n:i>=a&&i>=n?i:a,s[u]=o<<8;return s}e.exports=function(t,e,r,a,o,A){var s,u,c,h,f;if(!(0===a||o<.5)){o>2&&(o=2);var l=i(t,e,r),g=new Uint16Array(l);n(g,e,r,o);for(var p=a/100*4096+.5|0,d=A<<8,m=e*r,w=0;w<m;w++)h=(s=l[w])-g[w],Math.abs(h)>=d&&(c=((u=(u=(u=s+(p*h+2048>>12))>65280?65280:u)<0?0:u)<<12)/(s=0!==s?s:1)|0,t[f=4*w]=t[f]*c+2048>>12,t[f+1]=t[f+1]*c+2048>>12,t[f+2]=t[f+2]*c+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a){if(!(0===n||i<.5)){i>2&&(i=2);var o=e*r,A=4*o,s=2*o,u=2*o,c=4*Math.max(e,r),h=32,f=0,l=A,g=l+s,p=g+u,d=p+u,m=d+c,w=this.__instance("unsharp_mask",A+s+2*u+c+h,{exp:Math.exp}),_=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(_);var I=w.exports.hsv_v16||w.exports._hsv_v16;I(f,l,e,r),(I=w.exports.blurMono16||w.exports._blurMono16)(l,g,p,d,m,e,r,i),(I=w.exports.unsharp||w.exports._unsharp)(f,f,l,g,e,r,n,a),_.set(new Uint32Array(this.__memory.buffer,0,o))}}},{}],12:[function(t,e,r){"use strict";e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(t,e,r){"use strict";var n=100;function i(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}i.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},i.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},i.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(r){return!(e-r.lastUsed>t.idle&&(r.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=i},{}],14:[function(t,e,r){"use strict";var n=2;e.exports=function(t,e,r,i,a,o){var A=r/t,s=i/e,u=(2*o+n+1)/a;if(u>.5)return[[r,i]];var c=Math.ceil(Math.log(Math.min(A,s))/Math.log(u));if(c<=1)return[[r,i]];for(var h=[],f=0;f<c;f++){var l=Math.round(Math.pow(Math.pow(t,c-f-1)*Math.pow(r,f+1),1/c)),g=Math.round(Math.pow(Math.pow(e,c-f-1)*Math.pow(i,f+1),1/c));h.push([l,g])}return h}},{}],15:[function(t,e,r){"use strict";var n=1e-5;function i(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.floor(t)}function a(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.ceil(t)}e.exports=function(t){var e,r,n,o,A,s,u=t.toWidth/t.width,c=t.toHeight/t.height,h=i(t.srcTileSize*u)-2*t.destTileBorder,f=i(t.srcTileSize*c)-2*t.destTileBorder;if(h<1||f<1)throw new Error("Internal error in pica: target tile width/height is too small.");var l,g=[];for(o=0;o<t.toHeight;o+=f)for(n=0;n<t.toWidth;n+=h)(e=n-t.destTileBorder)<0&&(e=0),e+(A=n+h+t.destTileBorder-e)>=t.toWidth&&(A=t.toWidth-e),(r=o-t.destTileBorder)<0&&(r=0),r+(s=o+f+t.destTileBorder-r)>=t.toHeight&&(s=t.toHeight-r),l={toX:e,toY:r,toWidth:A,toHeight:s,toInnerX:n,toInnerY:o,toInnerWidth:h,toInnerHeight:f,offsetX:e/u-i(e/u),offsetY:r/c-i(r/c),scaleX:u,scaleY:c,x:i(e/u),y:i(r/c),width:a(A/u),height:a(s/c)},g.push(l);return g}},{}],16:[function(t,e,r){"use strict";function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===n(t)},e.exports.limiter=function(t){var e=0,r=[];function n(){e<t&&r.length&&(e++,r.shift()())}return function(t){return new Promise((function(i,a){r.push((function(){t().then((function(t){i(t),e--,n()}),(function(t){a(t),e--,n()}))})),n()}))}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then((function(){if("undefined"==typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then((function(t){var r=10===t.width;return t.close(),e=null,r}))})).catch((function(){return!1}))},e.exports.worker_offscreen_canvas_support=function(){return new Promise((function(t,e){if("undefined"!=typeof OffscreenCanvas){var r=btoa("(".concat(i.toString(),")(self);")),n=new Worker("data:text/javascript;base64,".concat(r));n.onmessage=function(e){return t(e.data)},n.onerror=e}else t(!1);function i(t){"undefined"!=typeof createImageBitmap?Promise.resolve().then((function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)})).then((function(){return t.postMessage(!0)}),(function(){return t.postMessage(!1)})):t.postMessage(!1)}})).then((function(t){return t}),(function(){return!1}))},e.exports.can_use_canvas=function(t){var e=!1;try{var r=t(2,1).getContext("2d"),n=r.createImageData(2,1);n.data[0]=12,n.data[1]=23,n.data[2]=34,n.data[3]=255,n.data[4]=45,n.data[5]=56,n.data[6]=67,n.data[7]=255,r.putImageData(n,0,0),n=null,12===(n=r.getImageData(0,0,2,1)).data[0]&&23===n.data[1]&&34===n.data[2]&&255===n.data[3]&&45===n.data[4]&&56===n.data[5]&&67===n.data[6]&&255===n.data[7]&&(e=!0)}catch(t){}return e},e.exports.cib_can_use_region=function(){return new Promise((function(t){if("undefined"!=typeof createImageBitmap){var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then((function(r){r.width===e.width&&r.height===e.height?t(!0):t(!1)}),(function(){return t(!1)}))},e.onerror=function(){return t(!1)}}else t(!1)}))}},{}],17:[function(t,e,r){"use strict";e.exports=function(){var e,r=t("./mathlib");onmessage=function(t){var n=t.data.opts,i=!1;if(!n.src&&n.srcBitmap){var a=new OffscreenCanvas(n.width,n.height),o=a.getContext("2d",{alpha:Boolean(n.alpha)});o.drawImage(n.srcBitmap,0,0),n.src=o.getImageData(0,0,n.width,n.height).data,a.width=a.height=0,a=null,n.srcBitmap.close(),n.srcBitmap=null}e||(e=new r(t.data.features));var A=e.resizeAndUnsharp(n);if(i){var s=new ImageData(new Uint8ClampedArray(A),n.toWidth,n.toHeight),u=new OffscreenCanvas(n.toWidth,n.toHeight);u.getContext("2d",{alpha:Boolean(n.alpha)}).putImageData(s,0,0),createImageBitmap(u).then((function(t){postMessage({bitmap:t},[t])}))}else postMessage({data:A},[A.buffer])}}},{"./mathlib":1}],18:[function(t,e,r){var n,i,a,o,A,s;function u(t){t<.5&&(t=.5);var e=Math.exp(.527076)/t,r=Math.exp(-e),u=Math.exp(-2*e),c=(1-r)*(1-r)/(1+2*e*r-u);return n=c,i=c*(e-1)*r,a=c*(e+1)*r,o=-c*u,A=2*r,s=-u,new Float32Array([n,i,a,o,A,s,(n+i)/(1-A-s),(a+o)/(1-A-s)])}function c(t,e,r,n,i,a){var o,A,s,u,c,h,f,l,g,p,d,m,w,_;for(g=0;g<a;g++){for(f=g,l=0,u=c=(o=t[h=g*i])*n[6],d=n[0],m=n[1],w=n[4],_=n[5],p=0;p<i;p++)s=(A=t[h])*d+o*m+u*w+c*_,c=u,u=s,o=A,r[l]=u,l++,h++;for(l--,f+=a*(i-1),u=c=(o=t[--h])*n[7],A=o,d=n[2],m=n[3],p=i-1;p>=0;p--)s=A*d+o*m+u*w+c*_,c=u,u=s,o=A,A=t[h],e[f]=r[l]+u,h--,l--,f-=a}}function h(t,e,r,n){if(n){var i=new Uint16Array(t.length),a=new Float32Array(Math.max(e,r)),o=u(n);c(t,i,a,o,e,r,n),c(i,t,a,o,r,e,n)}}e.exports=h},{}],19:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],20:[function(t,e,r){"use strict";var n=t("object-assign"),i=t("./lib/base64decode"),a=t("./lib/wa_detect"),o={js:!0,wasm:!0};function A(t){if(!(this instanceof A))return new A(t);var e=n({},o,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}A.prototype.has_wasm=a,A.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},A.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var r=t.__modules[e];return t.options.wasm&&t.has_wasm()&&r.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(r.wasm_src)).then((function(r){t.__wasm[e]=r})):null}))).then((function(){return t})),this.__init_promise},A.prototype.__base64decode=i,A.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},A.prototype.__instance=function(t,e,r){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var a={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:n(a,r||{})})}return this.__cache[t]},A.prototype.__align=function(t,e){var r=t%(e=e||8);return t+(r?e-r:0)},e.exports=A},{"./lib/base64decode":21,"./lib/wa_detect":22,"object-assign":23}],21:[function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=new Uint8Array(3*r>>2),a=0,o=0,A=0;A<r;A++)A%4==0&&A&&(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a),a=a<<6|n.indexOf(e.charAt(A));var s=r%4*6;return 0===s?(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a):18===s?(i[o++]=a>>10&255,i[o++]=a>>2&255):12===s&&(i[o++]=a>>4&255),i}},{}],22:[function(t,e,r){"use strict";var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(t){}return n}},{}],23:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function A(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}e.exports=A()?Object.assign:function(t,e){for(var r,A,s=o(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(s[c]=r[c]);if(n){A=n(r);for(var h=0;h<A.length;h++)a.call(r,A[h])&&(s[A[h]]=r[A[h]])}}return s}},{}],24:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){for(var r,A=Object.keys(a),s=0,u=A.length;s<u;s++){var c=A[s],h=a[c].exports;if(h===t||h&&h.default===t){r=c;break}}if(!r){r=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(s=0,u=A.length;s<u;s++)f[c=A[s]]=c;i[r]=["function(require,module,exports){"+t+"(self); }",f]}var l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[r]=r,i[l]=["function(require,module,exports){var f = require("+o(r)+");(f.default ? f.default : f)(self);}",g];var p={};function d(t){for(var e in p[t]=!0,i[t][1]){var r=i[t][1][e];p[r]||d(r)}}d(l);var m="("+n+")({"+Object.keys(p).map((function(t){return o(t)+":["+i[t][0]+","+o(i[t][1])+"]"})).join(",")+"},{},["+o(l)+"])",w=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([m],{type:"text/javascript"});if(e&&e.bare)return _;var I=w.createObjectURL(_),v=new Worker(I);return v.objectURL=I,v}},{}],"/index.js":[function(t,e,r){"use strict";function n(t,e){return s(t)||A(t,e)||a(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a=[],o=!0,A=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){A=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(A)throw i}}return a}}function s(t){if(Array.isArray(t))return t}var u=t("object-assign"),c=t("webworkify"),h=t("./lib/mathlib"),f=t("./lib/pool"),l=t("./lib/utils"),g=t("./lib/worker"),p=t("./lib/stepper"),d=t("./lib/tiler"),m={},w=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(w=navigator.userAgent.indexOf("Safari")>=0)}catch(t){}var _=1;"undefined"!=typeof navigator&&(_=Math.min(navigator.hardwareConcurrency||1,4));var I={tile:1024,concurrency:_,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}},v={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},b=!1,y=!1,B=!1,E=!1,C=!1;function Q(){return{value:c(g),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function x(t){if(!(this instanceof x))return new x(t);this.options=u({},I,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=m[e]||l.limiter(this.options.concurrency),m[e]||(m[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}x.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if("undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),b=!0}catch(t){}"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?y=!0:this.debug("ImageBitmap does not support .close(), disabled"));var r=this.options.features.slice();if(r.indexOf("all")>=0&&(r=["cib","wasm","js","ww"]),this.__requested_features=r,this.__mathlib=new h(r),r.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));m[n]?this.__workersPool=m[n]:(this.__workersPool=new f(Q,this.options.idle),m[n]=this.__workersPool)}catch(t){}var i,a,o=this.__mathlib.init().then((function(t){u(e.features,t.features)}));i=y?l.cib_support(this.options.createCanvas).then((function(t){e.features.cib&&r.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):r.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),B=l.can_use_canvas(this.options.createCanvas),a=(a=y&&b&&-1!==r.indexOf("ww")?l.worker_offscreen_canvas_support():Promise.resolve(!1)).then((function(t){E=t}));var A=l.cib_can_use_region().then((function(t){C=t}));return this.__initPromise=Promise.all([o,i,a,A]).then((function(){return e})),this.__initPromise},x.prototype.__invokeResize=function(t,e){var r=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then((function(){return r.features.ww?new Promise((function(n,i){var a=r.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch((function(t){return i(t)})),a.value.onmessage=function(t){a.release(),t.data.err?i(t.data.err):n(t.data)};var o=[];t.src&&o.push(t.src.buffer),t.srcBitmap&&o.push(t.srcBitmap),a.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},o)})):{data:r.__mathlib.resizeAndUnsharp(t,e.__mathCache)}}))},x.prototype.__extractTileData=function(t,e,r,n,i){if(this.features.ww&&E&&(l.isCanvas(e)||C))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(n.srcImageBitmap||e,t.x,t.y,t.width,t.height).then((function(t){return i.srcBitmap=t,i}));if(l.isCanvas(e))return n.srcCtx||(n.srcCtx=e.getContext("2d",{alpha:Boolean(r.alpha)})),this.debug("Get tile pixel data"),i.src=n.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var a=this.options.createCanvas(t.width,t.height),o=a.getContext("2d",{alpha:Boolean(r.alpha)});return o.globalCompositeOperation="copy",o.drawImage(n.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=o.getImageData(0,0,t.width,t.height).data,a.width=a.height=0,i},x.prototype.__landTileData=function(t,e,r){var n;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return r.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(b)n=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((n=r.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)n.data.set(e.data);else for(var i=n.data.length-1;i>=0;i--)n.data[i]=e.data[i];return this.debug("Draw tile"),w?r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},x.prototype.__tileAndResize=function(t,e,r){var n=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},a=function(e){return n.__limit((function(){if(r.canceled)return r.cancelToken;var a={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:r.quality,alpha:r.alpha,unsharpAmount:r.unsharpAmount,unsharpRadius:r.unsharpRadius,unsharpThreshold:r.unsharpThreshold};return n.debug("Invoke resize math"),Promise.resolve(a).then((function(a){return n.__extractTileData(e,t,r,i,a)})).then((function(t){return n.debug("Invoke resize math"),n.__invokeResize(t,r)})).then((function(t){return r.canceled?r.cancelToken:(i.srcImageData=null,n.__landTileData(e,t,i))}))}))};return Promise.resolve().then((function(){if(i.toCtx=e.getContext("2d",{alpha:Boolean(r.alpha)}),l.isCanvas(t))return null;if(l.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(l.isImage(t))return y?(n.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){i.srcImageBitmap=t})).catch((function(t){return null}))):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')})).then((function(){if(r.canceled)return r.cancelToken;n.debug("Calculate tiles");var t=d({width:r.width,height:r.height,srcTileSize:n.options.tile,toWidth:r.toWidth,toHeight:r.toHeight,destTileBorder:r.__destTileBorder}).map((function(t){return a(t)}));function o(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return n.debug("Process tiles"),Promise.all(t).then((function(){return n.debug("Finished!"),o(i),e}),(function(t){throw o(i),t}))}))},x.prototype.__processStages=function(t,e,r,i){var a=this;if(i.canceled)return i.cancelToken;var o,A=n(t.shift(),2),s=A[0],c=A[1],h=0===t.length;return i=u({},i,{toWidth:s,toHeight:c,quality:h?i.quality:Math.min(1,i.quality)}),h||(o=this.options.createCanvas(s,c)),this.__tileAndResize(e,h?r:o,i).then((function(){return h?r:(i.width=s,i.height=c,a.__processStages(t,o,r,i))})).then((function(t){return o&&(o.width=o.height=0),t}))},x.prototype.__resizeViaCreateImageBitmap=function(t,e,r){var n=this,i=e.getContext("2d",{alpha:Boolean(r.alpha)});return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:l.cib_quality_name(r.quality)}).then((function(t){if(r.canceled)return r.cancelToken;if(!r.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,n.debug("Finished!"),e;n.debug("Unsharp result");var a=n.options.createCanvas(r.toWidth,r.toHeight),o=a.getContext("2d",{alpha:Boolean(r.alpha)});o.drawImage(t,0,0),t.close();var A=o.getImageData(0,0,r.toWidth,r.toHeight);return n.__mathlib.unsharp_mask(A.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(A,0,0),a.width=a.height=0,A=o=a=i=null,n.debug("Finished!"),e}))},x.prototype.resize=function(t,e,r){var n=this;this.debug("Start resize...");var i=u({},v);if(isNaN(r)?r&&(i=u(i,r)):i=u(i,{quality:r}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2),i.canceled=!1,i.cancelToken&&(i.cancelToken=i.cancelToken.then((function(t){throw i.canceled=!0,t}),(function(t){throw i.canceled=!0,t})));var a=3;return i.__destTileBorder=Math.ceil(Math.max(a,2.5*i.unsharpRadius|0)),this.init().then((function(){if(i.canceled)return i.cancelToken;if(n.features.cib)return n.__resizeViaCreateImageBitmap(t,e,i);if(!B){var r=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw r.code="ERR_GET_IMAGE_DATA",r}var a=p(i.width,i.height,i.toWidth,i.toHeight,n.options.tile,i.__destTileBorder);return n.__processStages(a,t,e,i)}))},x.prototype.resizeBuffer=function(t){var e=this,r=u({},v,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(r)}))},x.prototype.toBlob=function(t,e,r){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,r);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:r}));else{for(var i=atob(t.toDataURL(e,r).split(",")[1]),a=i.length,o=new Uint8Array(a),A=0;A<a;A++)o[A]=i.charCodeAt(A);n(new Blob([o],{type:e}))}}))},x.prototype.debug=function(){},e.exports=x},{"./lib/mathlib":1,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":23,webworkify:24}]},{},[])("/index.js")},100:function(t,e,r){"use strict";r.r(e);function n(t,e){var r={};return e.forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])})),r}var i={assign:function(t){for(var e,r=1;r<arguments.length;r++)for(var n in e=Object(arguments[r]))Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},pick:n,pick_pica_resize_options:function(t){return n(t,["alpha","unsharpAmount","unsharpRadius","unsharpThreshold","cancelToken"])}};function a(t){var e={exports:{}};return t(e,e.exports),e.exports}function o(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var A=a((function(t,e){t.exports=function(){function t(e,r,n){function i(A,s){if(!r[A]){if(!e[A]){if(!s&&o)return o(A);if(a)return a(A,!0);var u=new Error("Cannot find module '"+A+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[A]={exports:{}};e[A][0].call(c.exports,(function(t){return i(e[A][1][t]||t)}),c,c.exports,t,e,r,n)}return r[A].exports}for(var a=o,A=0;A<n.length;A++)i(n[A]);return i}return t}()({1:[function(t,e,r){var n=t("inherits"),i=t("multimath"),a=t("./mm_unsharp_mask"),o=t("./mm_resize");function A(t){var e=t||[],r={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};i.call(this,r),this.features={js:r.js,wasm:r.wasm&&this.has_wasm()},this.use(a),this.use(o)}n(A,i),A.prototype.resizeAndUnsharp=function(t,e){var r=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(r,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),r},e.exports=A},{"./mm_resize":4,"./mm_unsharp_mask":9,inherits:19,multimath:20}],2:[function(t,e,r){function n(t){return t<0?0:t>255?255:t}function i(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}function a(t,e,r,i,a,o){var A,s,u,c,h,f,l,g,p,d,m,w=0,_=0;for(p=0;p<i;p++){for(h=0,d=0;d<a;d++){for(f=o[h++],l=o[h++],g=w+4*f|0,A=s=u=c=0;l>0;l--)c=c+(m=o[h++])*t[g+3]|0,u=u+m*t[g+2]|0,s=s+m*t[g+1]|0,A=A+m*t[g]|0,g=g+4|0;e[_+3]=n(c+8192>>14),e[_+2]=n(u+8192>>14),e[_+1]=n(s+8192>>14),e[_]=n(A+8192>>14),_=_+4*i|0}_=4*(p+1)|0,w=(p+1)*r*4|0}}e.exports={convolveHorizontally:i,convolveVertically:a}},{}],3:[function(t,e,r){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs="},{}],4:[function(t,e,r){e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,r){var n=t("./resize_filter_gen"),i=t("./convolve").convolveHorizontally,a=t("./convolve").convolveVertically;function o(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}e.exports=function(t){var e=t.src,r=t.width,A=t.height,s=t.toWidth,u=t.toHeight,c=t.scaleX||t.toWidth/t.width,h=t.scaleY||t.toHeight/t.height,f=t.offsetX||0,l=t.offsetY||0,g=t.dest||new Uint8Array(s*u*4),p=void 0===t.quality?3:t.quality,d=t.alpha||!1,m=n(p,r,s,c,f),w=n(p,A,u,h,l),_=new Uint8Array(s*A*4);return i(e,_,r,A,s,m),a(_,g,A,s,u,w),d||o(g,s,u),g}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,r){var n=t("./resize_filter_info"),i=14;function a(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,r,i,o){var A,s,u,c,h,f,l,g,p,d,m,w,_,I,v,b,y,B=n[t].filter,E=1/i,C=Math.min(1,i),Q=n[t].win/C,x=Math.floor(2*(Q+1)),M=new Int16Array((x+2)*r),D=0,k=!M.subarray||!M.set;for(A=0;A<r;A++){for(s=(A+.5)*E+o,u=Math.max(0,Math.floor(s-Q)),h=(c=Math.min(e-1,Math.ceil(s+Q)))-u+1,f=new Float32Array(h),l=new Int16Array(h),g=0,p=u,d=0;p<=c;p++,d++)g+=m=B((p+.5-s)*C),f[d]=m;for(w=0,d=0;d<f.length;d++)w+=_=f[d]/g,l[d]=a(_);for(l[r>>1]+=a(1-w),I=0;I<l.length&&0===l[I];)I++;if(I<l.length){for(v=l.length-1;v>0&&0===l[v];)v--;if(b=u+I,y=v-I+1,M[D++]=b,M[D++]=y,k)for(d=I;d<=v;d++)M[D++]=l[d];else M.set(l.subarray(I,v+1),D),D+=y}else M[D++]=0,M[D++]=0}return M}},{"./resize_filter_info":7}],7:[function(t,e,r){e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,r){var n=t("./resize_filter_gen");function i(t,e,r){for(var n=3,i=e*r*4|0;n<i;)t[n]=255,n=n+4|0}function a(t){return new Uint8Array(t.buffer,0,t.byteLength)}var o=!0;try{o=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(t){}function A(t,e,r){if(o)e.set(a(t),r);else for(var n=r,i=0;i<t.length;i++){var A=t[i];e[n++]=255&A,e[n++]=A>>8&255}}e.exports=function(t){var e=t.src,r=t.width,a=t.height,o=t.toWidth,s=t.toHeight,u=t.scaleX||t.toWidth/t.width,c=t.scaleY||t.toHeight/t.height,h=t.offsetX||0,f=t.offsetY||0,l=t.dest||new Uint8Array(o*s*4),g=void 0===t.quality?3:t.quality,p=t.alpha||!1,d=n(g,r,o,u,h),m=n(g,a,s,c,f),w=0,_=this.__align(w+Math.max(e.byteLength,l.byteLength)),I=this.__align(_+a*o*4),v=this.__align(I+d.byteLength),b=v+m.byteLength,y=this.__instance("resize",b),B=new Uint8Array(this.__memory.buffer),E=new Uint32Array(this.__memory.buffer),C=new Uint32Array(e.buffer);return E.set(C),A(d,B,I),A(m,B,v),(y.exports.convolveHV||y.exports._convolveHV)(I,v,_,r,a,o,s),new Uint32Array(l.buffer).set(new Uint32Array(this.__memory.buffer,0,s*o)),p||i(l,o,s),l}},{"./resize_filter_gen":6}],9:[function(t,e,r){e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,r){var n=t("glur/mono16");function i(t,e,r){for(var n,i,a,o,A=e*r,s=new Uint16Array(A),u=0;u<A;u++)n=t[4*u],i=t[4*u+1],a=t[4*u+2],o=n>=i&&n>=a?n:i>=a&&i>=n?i:a,s[u]=o<<8;return s}e.exports=function(t,e,r,a,o,A){var s,u,c,h,f;if(!(0===a||o<.5)){o>2&&(o=2);var l=i(t,e,r),g=new Uint16Array(l);n(g,e,r,o);for(var p=a/100*4096+.5|0,d=A<<8,m=e*r,w=0;w<m;w++)h=(s=l[w])-g[w],Math.abs(h)>=d&&(c=((u=(u=(u=s+(p*h+2048>>12))>65280?65280:u)<0?0:u)<<12)/(s=0!==s?s:1)|0,t[f=4*w]=t[f]*c+2048>>12,t[f+1]=t[f+1]*c+2048>>12,t[f+2]=t[f+2]*c+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,r){e.exports=function(t,e,r,n,i,a){if(!(0===n||i<.5)){i>2&&(i=2);var o=e*r,A=4*o,s=2*o,u=2*o,c=4*Math.max(e,r),h=32,f=0,l=A,g=l+s,p=g+u,d=p+u,m=d+c,w=this.__instance("unsharp_mask",A+s+2*u+c+h,{exp:Math.exp}),_=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(_);var I=w.exports.hsv_v16||w.exports._hsv_v16;I(f,l,e,r),(I=w.exports.blurMono16||w.exports._blurMono16)(l,g,p,d,m,e,r,i),(I=w.exports.unsharp||w.exports._unsharp)(f,f,l,g,e,r,n,a),_.set(new Uint32Array(this.__memory.buffer,0,o))}}},{}],12:[function(t,e,r){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(t,e,r){var n=100;function i(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}i.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},i.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},i.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(r){return!(e-r.lastUsed>t.idle&&(r.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=i},{}],14:[function(t,e,r){var n=2;e.exports=function(t,e,r,i,a,o){var A=r/t,s=i/e,u=(2*o+n+1)/a;if(u>.5)return[[r,i]];var c=Math.ceil(Math.log(Math.min(A,s))/Math.log(u));if(c<=1)return[[r,i]];for(var h=[],f=0;f<c;f++){var l=Math.round(Math.pow(Math.pow(t,c-f-1)*Math.pow(r,f+1),1/c)),g=Math.round(Math.pow(Math.pow(e,c-f-1)*Math.pow(i,f+1),1/c));h.push([l,g])}return h}},{}],15:[function(t,e,r){var n=1e-5;function i(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.floor(t)}function a(t){var e=Math.round(t);return Math.abs(t-e)<n?e:Math.ceil(t)}e.exports=function(t){var e,r,n,o,A,s,u=t.toWidth/t.width,c=t.toHeight/t.height,h=i(t.srcTileSize*u)-2*t.destTileBorder,f=i(t.srcTileSize*c)-2*t.destTileBorder;if(h<1||f<1)throw new Error("Internal error in pica: target tile width/height is too small.");var l,g=[];for(o=0;o<t.toHeight;o+=f)for(n=0;n<t.toWidth;n+=h)(e=n-t.destTileBorder)<0&&(e=0),e+(A=n+h+t.destTileBorder-e)>=t.toWidth&&(A=t.toWidth-e),(r=o-t.destTileBorder)<0&&(r=0),r+(s=o+f+t.destTileBorder-r)>=t.toHeight&&(s=t.toHeight-r),l={toX:e,toY:r,toWidth:A,toHeight:s,toInnerX:n,toInnerY:o,toInnerWidth:h,toInnerHeight:f,offsetX:e/u-i(e/u),offsetY:r/c-i(r/c),scaleX:u,scaleY:c,x:i(e/u),y:i(r/c),width:a(A/u),height:a(s/c)},g.push(l);return g}},{}],16:[function(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===n(t)},e.exports.limiter=function(t){var e=0,r=[];function n(){e<t&&r.length&&(e++,r.shift()())}return function(t){return new Promise((function(i,a){r.push((function(){t().then((function(t){i(t),e--,n()}),(function(t){a(t),e--,n()}))})),n()}))}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then((function(){if("undefined"==typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then((function(t){var r=10===t.width;return t.close(),e=null,r}))})).catch((function(){return!1}))},e.exports.worker_offscreen_canvas_support=function(){return new Promise((function(t,e){if("undefined"!=typeof OffscreenCanvas){var r=btoa("(".concat(i.toString(),")(self);")),n=new Worker("data:text/javascript;base64,".concat(r));n.onmessage=function(e){return t(e.data)},n.onerror=e}else t(!1);function i(t){"undefined"!=typeof createImageBitmap?Promise.resolve().then((function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)})).then((function(){return t.postMessage(!0)}),(function(){return t.postMessage(!1)})):t.postMessage(!1)}})).then((function(t){return t}),(function(){return!1}))},e.exports.can_use_canvas=function(t){var e=!1;try{var r=t(2,1).getContext("2d"),n=r.createImageData(2,1);n.data[0]=12,n.data[1]=23,n.data[2]=34,n.data[3]=255,n.data[4]=45,n.data[5]=56,n.data[6]=67,n.data[7]=255,r.putImageData(n,0,0),n=null,12===(n=r.getImageData(0,0,2,1)).data[0]&&23===n.data[1]&&34===n.data[2]&&255===n.data[3]&&45===n.data[4]&&56===n.data[5]&&67===n.data[6]&&255===n.data[7]&&(e=!0)}catch(t){}return e},e.exports.cib_can_use_region=function(){return new Promise((function(t){if("undefined"!=typeof createImageBitmap){var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then((function(r){r.width===e.width&&r.height===e.height?t(!0):t(!1)}),(function(){return t(!1)}))},e.onerror=function(){return t(!1)}}else t(!1)}))}},{}],17:[function(t,e,r){e.exports=function(){var e,r=t("./mathlib");onmessage=function(t){var n=t.data.opts,i=!1;if(!n.src&&n.srcBitmap){var a=new OffscreenCanvas(n.width,n.height),o=a.getContext("2d",{alpha:Boolean(n.alpha)});o.drawImage(n.srcBitmap,0,0),n.src=o.getImageData(0,0,n.width,n.height).data,a.width=a.height=0,a=null,n.srcBitmap.close(),n.srcBitmap=null,i=!0}e||(e=new r(t.data.features));var A=e.resizeAndUnsharp(n);if(i){var s=new ImageData(new Uint8ClampedArray(A),n.toWidth,n.toHeight),u=new OffscreenCanvas(n.toWidth,n.toHeight);u.getContext("2d",{alpha:Boolean(n.alpha)}).putImageData(s,0,0),createImageBitmap(u).then((function(t){postMessage({bitmap:t},[t])}))}else postMessage({data:A},[A.buffer])}}},{"./mathlib":1}],18:[function(t,e,r){var n,i,a,o,A,s;function u(t){t<.5&&(t=.5);var e=Math.exp(.527076)/t,r=Math.exp(-e),u=Math.exp(-2*e),c=(1-r)*(1-r)/(1+2*e*r-u);return n=c,i=c*(e-1)*r,a=c*(e+1)*r,o=-c*u,A=2*r,s=-u,new Float32Array([n,i,a,o,A,s,(n+i)/(1-A-s),(a+o)/(1-A-s)])}function c(t,e,r,n,i,a){var o,A,s,u,c,h,f,l,g,p,d,m,w,_;for(g=0;g<a;g++){for(f=g,l=0,u=c=(o=t[h=g*i])*n[6],d=n[0],m=n[1],w=n[4],_=n[5],p=0;p<i;p++)s=(A=t[h])*d+o*m+u*w+c*_,c=u,u=s,o=A,r[l]=u,l++,h++;for(l--,f+=a*(i-1),u=c=(o=t[--h])*n[7],A=o,d=n[2],m=n[3],p=i-1;p>=0;p--)s=A*d+o*m+u*w+c*_,c=u,u=s,o=A,A=t[h],e[f]=r[l]+u,h--,l--,f-=a}}function h(t,e,r,n){if(n){var i=new Uint16Array(t.length),a=new Float32Array(Math.max(e,r)),o=u(n);c(t,i,a,o,e,r),c(i,t,a,o,r,e)}}e.exports=h},{}],19:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],20:[function(t,e,r){var n=t("object-assign"),i=t("./lib/base64decode"),a=t("./lib/wa_detect"),o={js:!0,wasm:!0};function A(t){if(!(this instanceof A))return new A(t);var e=n({},o,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}A.prototype.has_wasm=a,A.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},A.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var r=t.__modules[e];return t.options.wasm&&t.has_wasm()&&r.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(r.wasm_src)).then((function(r){t.__wasm[e]=r})):null}))).then((function(){return t})),this.__init_promise},A.prototype.__base64decode=i,A.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},A.prototype.__instance=function(t,e,r){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var a={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:n(a,r||{})})}return this.__cache[t]},A.prototype.__align=function(t,e){var r=t%(e=e||8);return t+(r?e-r:0)},e.exports=A},{"./lib/base64decode":21,"./lib/wa_detect":22,"object-assign":23}],21:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=new Uint8Array(3*r>>2),a=0,o=0,A=0;A<r;A++)A%4==0&&A&&(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a),a=a<<6|n.indexOf(e.charAt(A));var s=r%4*6;return 0===s?(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a):18===s?(i[o++]=a>>10&255,i[o++]=a>>2&255):12===s&&(i[o++]=a>>4&255),i}},{}],22:[function(t,e,r){var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(t){}return n}},{}],23:[function(t,e,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function A(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}e.exports=A()?Object.assign:function(t,e){for(var r,A,s=o(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(s[c]=r[c]);if(n){A=n(r);for(var h=0;h<A.length;h++)a.call(r,A[h])&&(s[A[h]]=r[A[h]])}}return s}},{}],24:[function(t,e,r){var n=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){for(var r,A=Object.keys(a),s=0,u=A.length;s<u;s++){var c=A[s],h=a[c].exports;if(h===t||h&&h.default===t){r=c;break}}if(!r){r=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(s=0,u=A.length;s<u;s++)f[c=A[s]]=c;i[r]=["function(require,module,exports){"+t+"(self); }",f]}var l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[r]=r,i[l]=["function(require,module,exports){var f = require("+o(r)+");(f.default ? f.default : f)(self);}",g];var p={};function d(t){for(var e in p[t]=!0,i[t][1]){var r=i[t][1][e];p[r]||d(r)}}d(l);var m="("+n+")({"+Object.keys(p).map((function(t){return o(t)+":["+i[t][0]+","+o(i[t][1])+"]"})).join(",")+"},{},["+o(l)+"])",w=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([m],{type:"text/javascript"});if(e&&e.bare)return _;var I=w.createObjectURL(_),v=new Worker(I);return v.objectURL=I,v}},{}],"/index.js":[function(t,e,r){function n(t,e){return s(t)||A(t,e)||a(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a=[],o=!0,A=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){A=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(A)throw i}}return a}}function s(t){if(Array.isArray(t))return t}var u=t("object-assign"),c=t("webworkify"),h=t("./lib/mathlib"),f=t("./lib/pool"),l=t("./lib/utils"),g=t("./lib/worker"),p=t("./lib/stepper"),d=t("./lib/tiler"),m={},w=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(w=navigator.userAgent.indexOf("Safari")>=0)}catch(t){}var _=1;"undefined"!=typeof navigator&&(_=Math.min(navigator.hardwareConcurrency||1,4));var I={tile:1024,concurrency:_,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}},v={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},b=!1,y=!1,B=!1,E=!1,C=!1;function Q(){return{value:c(g),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function x(t){if(!(this instanceof x))return new x(t);this.options=u({},I,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=m[e]||l.limiter(this.options.concurrency),m[e]||(m[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}x.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if("undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),b=!0}catch(t){}"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?y=!0:this.debug("ImageBitmap does not support .close(), disabled"));var r=this.options.features.slice();if(r.indexOf("all")>=0&&(r=["cib","wasm","js","ww"]),this.__requested_features=r,this.__mathlib=new h(r),r.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));m[n]?this.__workersPool=m[n]:(this.__workersPool=new f(Q,this.options.idle),m[n]=this.__workersPool)}catch(t){}var i,a,o=this.__mathlib.init().then((function(t){u(e.features,t.features)}));i=y?l.cib_support(this.options.createCanvas).then((function(t){e.features.cib&&r.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):r.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),B=l.can_use_canvas(this.options.createCanvas),a=(a=y&&b&&-1!==r.indexOf("ww")?l.worker_offscreen_canvas_support():Promise.resolve(!1)).then((function(t){E=t}));var A=l.cib_can_use_region().then((function(t){C=t}));return this.__initPromise=Promise.all([o,i,a,A]).then((function(){return e})),this.__initPromise},x.prototype.__invokeResize=function(t,e){var r=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then((function(){return r.features.ww?new Promise((function(n,i){var a=r.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch((function(t){return i(t)})),a.value.onmessage=function(t){a.release(),t.data.err?i(t.data.err):n(t.data)};var o=[];t.src&&o.push(t.src.buffer),t.srcBitmap&&o.push(t.srcBitmap),a.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},o)})):{data:r.__mathlib.resizeAndUnsharp(t,e.__mathCache)}}))},x.prototype.__extractTileData=function(t,e,r,n,i){if(this.features.ww&&E&&(l.isCanvas(e)||C))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(n.srcImageBitmap||e,t.x,t.y,t.width,t.height).then((function(t){return i.srcBitmap=t,i}));if(l.isCanvas(e))return n.srcCtx||(n.srcCtx=e.getContext("2d",{alpha:Boolean(r.alpha)})),this.debug("Get tile pixel data"),i.src=n.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var a=this.options.createCanvas(t.width,t.height),o=a.getContext("2d",{alpha:Boolean(r.alpha)});return o.globalCompositeOperation="copy",o.drawImage(n.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=o.getImageData(0,0,t.width,t.height).data,a.width=a.height=0,i},x.prototype.__landTileData=function(t,e,r){var n;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return r.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(b)n=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((n=r.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)n.data.set(e.data);else for(var i=n.data.length-1;i>=0;i--)n.data[i]=e.data[i];return this.debug("Draw tile"),w?r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):r.toCtx.putImageData(n,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},x.prototype.__tileAndResize=function(t,e,r){var n=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},a=function(e){return n.__limit((function(){if(r.canceled)return r.cancelToken;var a={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:r.quality,alpha:r.alpha,unsharpAmount:r.unsharpAmount,unsharpRadius:r.unsharpRadius,unsharpThreshold:r.unsharpThreshold};return n.debug("Invoke resize math"),Promise.resolve(a).then((function(a){return n.__extractTileData(e,t,r,i,a)})).then((function(t){return n.debug("Invoke resize math"),n.__invokeResize(t,r)})).then((function(t){return r.canceled?r.cancelToken:(i.srcImageData=null,n.__landTileData(e,t,i))}))}))};return Promise.resolve().then((function(){if(i.toCtx=e.getContext("2d",{alpha:Boolean(r.alpha)}),l.isCanvas(t))return null;if(l.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(l.isImage(t))return y?(n.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){i.srcImageBitmap=t})).catch((function(t){return null}))):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')})).then((function(){if(r.canceled)return r.cancelToken;n.debug("Calculate tiles");var t=d({width:r.width,height:r.height,srcTileSize:n.options.tile,toWidth:r.toWidth,toHeight:r.toHeight,destTileBorder:r.__destTileBorder}).map((function(t){return a(t)}));function o(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return n.debug("Process tiles"),Promise.all(t).then((function(){return n.debug("Finished!"),o(i),e}),(function(t){throw o(i),t}))}))},x.prototype.__processStages=function(t,e,r,i){var a=this;if(i.canceled)return i.cancelToken;var o,A=n(t.shift(),2),s=A[0],c=A[1],h=0===t.length;return i=u({},i,{toWidth:s,toHeight:c,quality:h?i.quality:Math.min(1,i.quality)}),h||(o=this.options.createCanvas(s,c)),this.__tileAndResize(e,h?r:o,i).then((function(){return h?r:(i.width=s,i.height=c,a.__processStages(t,o,r,i))})).then((function(t){return o&&(o.width=o.height=0),t}))},x.prototype.__resizeViaCreateImageBitmap=function(t,e,r){var n=this,i=e.getContext("2d",{alpha:Boolean(r.alpha)});return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:r.toWidth,resizeHeight:r.toHeight,resizeQuality:l.cib_quality_name(r.quality)}).then((function(t){if(r.canceled)return r.cancelToken;if(!r.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,n.debug("Finished!"),e;n.debug("Unsharp result");var a=n.options.createCanvas(r.toWidth,r.toHeight),o=a.getContext("2d",{alpha:Boolean(r.alpha)});o.drawImage(t,0,0),t.close();var A=o.getImageData(0,0,r.toWidth,r.toHeight);return n.__mathlib.unsharp_mask(A.data,r.toWidth,r.toHeight,r.unsharpAmount,r.unsharpRadius,r.unsharpThreshold),i.putImageData(A,0,0),a.width=a.height=0,A=o=a=i=null,n.debug("Finished!"),e}))},x.prototype.resize=function(t,e,r){var n=this;this.debug("Start resize...");var i=u({},v);if(isNaN(r)?r&&(i=u(i,r)):i=u(i,{quality:r}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2),i.canceled=!1,i.cancelToken&&(i.cancelToken=i.cancelToken.then((function(t){throw i.canceled=!0,t}),(function(t){throw i.canceled=!0,t})));var a=3;return i.__destTileBorder=Math.ceil(Math.max(a,2.5*i.unsharpRadius|0)),this.init().then((function(){if(i.canceled)return i.cancelToken;if(n.features.cib)return n.__resizeViaCreateImageBitmap(t,e,i);if(!B){var r=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw r.code="ERR_GET_IMAGE_DATA",r}var a=p(i.width,i.height,i.toWidth,i.toHeight,n.options.tile,i.__destTileBorder);return n.__processStages(a,t,e,i)}))},x.prototype.resizeBuffer=function(t){var e=this,r=u({},v,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(r)}))},x.prototype.toBlob=function(t,e,r){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,r);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:r}));else{for(var i=atob(t.toDataURL(e,r).split(",")[1]),a=i.length,o=new Uint8Array(a),A=0;A<a;A++)o[A]=i.charCodeAt(A);n(new Blob([o],{type:e}))}}))},x.prototype.debug=function(){},e.exports=x},{"./lib/mathlib":1,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":23,webworkify:24}]},{},[])("/index.js")})),s=a((function(t){function e(t,e){var r=new Error(t);return r.code=e,r}function r(t){for(var e=t.toString(16).toUpperCase(),r=2-e.length;r>0;r--)e="0"+e;return"0x"+e}function n(t){try{return decodeURIComponent(escape(t))}catch(e){return t}}function i(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function a(t,r,n){this.input=t.subarray(r,n),this.start=r;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==i&&"MM\0*"!==i)throw e("invalid TIFF signature","EBADDATA");this.big_endian="M"===i[0]}a.prototype.each=function(t){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.filter=function(t){var r={ifd0:{id:0,entries:[]}};this.each((function(e){(!1!==t(e)||e.is_subifd_link)&&(e.is_subifd_link&&1!==e.count&&4!==e.format||(r["ifd"+e.ifd]||(r["ifd"+e.ifd]={id:e.ifd,entries:[]}),r["ifd"+e.ifd].entries.push(e)))})),delete r.ifd1;var n=8;Object.keys(r).forEach((function(t){n+=2,r[t].entries.forEach((function(t){n+=12+(t.data_length>4?2*Math.ceil(t.data_length/2):0)})),n+=4})),this.output=new Uint8Array(n),this.output[0]=this.output[1]=(this.big_endian?"M":"I").charCodeAt(0),this.write_uint16(2,42);var i=8,a=this;if(this.write_uint32(4,i),Object.keys(r).forEach((function(t){r[t].written_offset=i;var e=i,n=e+2+12*r[t].entries.length+4;i=n,a.write_uint16(e,r[t].entries.length),r[t].entries.sort((function(t,e){return t.tag-e.tag})).forEach((function(t,n){var o=e+2+12*n;a.write_uint16(o,t.tag),a.write_uint16(o+2,t.format),a.write_uint32(o+4,t.count),t.is_subifd_link?r["ifd"+t.tag]&&(r["ifd"+t.tag].link_offset=o+8):t.data_length<=4?a.output.set(a.input.subarray(t.data_offset-a.start,t.data_offset-a.start+4),o+8):(a.write_uint32(o+8,i),a.output.set(a.input.subarray(t.data_offset-a.start,t.data_offset-a.start+t.data_length),i),i+=2*Math.ceil(t.data_length/2))}));var o=r["ifd"+(r[t].id+1)];o&&(o.link_offset=n-4)})),Object.keys(r).forEach((function(t){r[t].written_offset&&r[t].link_offset&&a.write_uint32(r[t].link_offset,r[t].written_offset)})),this.output.length!==i)throw e("internal error: incorrect buffer size allocated");return this.output},a.prototype.read_uint16=function(t){var r=this.input;if(t+2>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*r[t]+r[t+1]:r[t]+256*r[t+1]},a.prototype.read_uint32=function(t){var r=this.input;if(t+4>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[t]+65536*r[t+1]+256*r[t+2]+r[t+3]:r[t]+256*r[t+1]+65536*r[t+2]+16777216*r[t+3]},a.prototype.write_uint16=function(t,e){var r=this.output;this.big_endian?(r[t]=e>>>8&255,r[t+1]=255&e):(r[t]=255&e,r[t+1]=e>>>8&255)},a.prototype.write_uint32=function(t,e){var r=this.output;this.big_endian?(r[t]=e>>>24&255,r[t+1]=e>>>16&255,r[t+2]=e>>>8&255,r[t+3]=255&e):(r[t]=255&e,r[t+1]=e>>>8&255,r[t+2]=e>>>16&255,r[t+3]=e>>>24&255)},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));default:return null}},a.prototype.scan_ifd=function(t,r,i){var a=this.read_uint16(r);r+=2;for(var o=0;o<a;o++){var A=this.read_uint16(r),s=this.read_uint16(r+2),u=this.read_uint32(r+4),c=this.exif_format_length(s),h=u*c,f=h<=4?r+8:this.read_uint32(r+8),l=!1;if(f+h>this.input.length)throw e("unexpected EOF","EBADDATA");for(var g=[],p=f,d=0;d<u;d++,p+=c){var m=this.exif_format_read(s,p);if(null===m){g=null;break}g.push(m)}if(Array.isArray(g)&&2===s){try{g=n(String.fromCharCode.apply(null,g))}catch(t){g=null}g&&"\0"===g[g.length-1]&&(g=g.slice(0,-1))}if(this.is_subifd_link(t,A)&&Array.isArray(g)&&Number.isInteger(g[0])&&g[0]>0&&(this.ifds_to_read.push({id:A,offset:g[0]}),l=!0),!1===i({is_big_endian:this.big_endian,ifd:t,tag:A,format:s,count:u,entry_offset:r+this.start,data_length:h,data_offset:f+this.start,value:g,is_subifd_link:l}))return void(this.aborted=!0);r+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(r)})},t.exports.is_jpeg=function(t){return t.length>=4&&255===t[0]&&216===t[1]&&255===t[2]},t.exports.jpeg_segments_each=function(n,a){if(!i(n))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof a)throw e("Invalid argument (on_segment), Function expected","EINVAL");if(!t.exports.is_jpeg(n))throw e("Unknown file format","ENOTJPEG");for(var o=0,A=n.length,s=!1;;){var u,c;if(o+1>=A)throw e("Unexpected EOF","EBADDATA");var h=n[o],f=n[o+1];if(255===h&&255===f)u=255,c=1;else if(255===h&&0!==f){if(c=2,208<=(u=f)&&u<=217||1===u);else{if(o+3>=A)throw e("Unexpected EOF","EBADDATA");if((c+=256*n[o+2]+n[o+3])<2)throw e("Invalid segment length","EBADDATA");if(o+c-1>=A)throw e("Unexpected EOF","EBADDATA")}s&&(u>=208&&u<=215||(s=!1)),218===u&&(s=!0)}else{if(!s)throw e("Unexpected byte at segment start: "+r(h)+" (offset "+r(o)+")","EBADDATA");for(var l=o+1;;l++){if(l>=A)throw e("Unexpected EOF","EBADDATA");if(255===n[l]){if(l+1>=A)throw e("Unexpected EOF","EBADDATA");if(0!==n[l+1]){u=0,c=l-o;break}}}}if(!1===a({code:u,offset:o,length:c}))break;if(217===u)break;o+=c}},t.exports.jpeg_segments_filter=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_segment), Function expected","EINVAL");var a=[],o=0;t.exports.jpeg_segments_each(r,(function(t){var e=n(t);if(i(e))a.push({data:e}),o+=e.length;else if(Array.isArray(e))e.filter(i).forEach((function(t){a.push({data:t}),o+=t.length}));else if(!1!==e){var r={start:t.offset,end:t.offset+t.length};a.length>0&&a[a.length-1].end===r.start?a[a.length-1].end=r.end:a.push(r),o+=t.length}}));var A=new Uint8Array(o),s=0;return a.forEach((function(t){var e=t.data||r.subarray(t.start,t.end);A.set(e,s),s+=e.length})),A},t.exports.jpeg_exif_tags_each=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_exif_entry), Function expected","EINVAL");t.exports.jpeg_segments_each(r,(function(t){return 218!==t.code&&(225===t.code&&t.length>=10&&69===r[t.offset+4]&&120===r[t.offset+5]&&105===r[t.offset+6]&&102===r[t.offset+7]&&0===r[t.offset+8]&&0===r[t.offset+9]?(new a(r,t.offset+10,t.offset+t.length).each(n),!1):void 0)}))},t.exports.jpeg_exif_tags_filter=function(r,n){if(!i(r))throw e("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if("function"!=typeof n)throw e("Invalid argument (on_exif_entry), Function expected","EINVAL");var o=!1;return t.exports.jpeg_segments_filter(r,(function(t){if(!o&&(218===t.code&&(o=!0),225===t.code&&t.length>=10&&69===r[t.offset+4]&&120===r[t.offset+5]&&105===r[t.offset+6]&&102===r[t.offset+7]&&0===r[t.offset+8]&&0===r[t.offset+9])){var e=new a(r,t.offset+10,t.offset+t.length).filter(n);if(!e)return!1;var i=new Uint8Array(10);return i.set(r.slice(t.offset,t.offset+10)),i[2]=e.length+8>>>8&255,i[3]=e.length+8&255,o=!0,[i,e]}}))},t.exports.jpeg_add_comment=function(e,r){var n=!1,i=0;return t.exports.jpeg_segments_filter(e,(function(t){if(!(1===++i&&216===t.code||2===i&&224===t.code||n)){r=function(t){try{return unescape(encodeURIComponent(t))}catch(e){return t}}(r);var a=new Uint8Array(5+r.length),o=0;return a[o++]=255,a[o++]=254,a[o++]=r.length+3>>>8&255,a[o++]=r.length+3&255,r.split("").forEach((function(t){a[o++]=255&t.charCodeAt(0)})),a[o++]=0,n=!0,[a,e.subarray(t.offset,t.offset+t.length)]}}))}}));function u(t){return this._getUint8Array(t.blob).then((function(e){if(t.is_jpeg=s.is_jpeg(e),!t.is_jpeg)return Promise.resolve(t);t.orig_blob=t.blob;try{var r,n;if(s.jpeg_exif_tags_each(e,(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t.orientation=e.value[0]||1,r=e.is_big_endian,n=e.data_offset,!1})),n){var i=r?new Uint8Array([0,1]):new Uint8Array([1,0]);t.blob=new Blob([e.slice(0,n),i,e.slice(n+2)],{type:"image/jpeg"})}}catch(t){}return t}))}function c(t){if(!t.is_jpeg)return Promise.resolve(t);var e,r=t.orientation-1;if(!r)return Promise.resolve(t);var n=(e=4&r?this.pica.options.createCanvas(t.out_canvas.height,t.out_canvas.width):this.pica.options.createCanvas(t.out_canvas.width,t.out_canvas.height)).getContext("2d");return n.save(),1&r&&n.transform(-1,0,0,1,e.width,0),2&r&&n.transform(-1,0,0,-1,e.width,e.height),4&r&&n.transform(0,1,1,0,0,0),n.drawImage(t.out_canvas,0,0),n.restore(),t.out_canvas.width=t.out_canvas.height=0,t.out_canvas=e,Promise.resolve(t)}function h(t){return t.is_jpeg?Promise.all([this._getUint8Array(t.blob),this._getUint8Array(t.out_blob)]).then((function(e){var r=e[0],n=e[1];if(!s.is_jpeg(r))return Promise.resolve(t);var i=[];return s.jpeg_segments_each(r,(function(t){if(218===t.code)return!1;i.push(t)})),i=i.filter((function(t){return 226!==t.code&&(t.code>=224&&t.code<240||254===t.code)})).map((function(t){return r.slice(t.offset,t.offset+t.length)})),t.out_blob=new Blob([n.slice(0,2)].concat(i).concat([n.slice(20)]),{type:"image/jpeg"}),t})):Promise.resolve(t)}var f={jpeg_patch_exif:u,jpeg_rotate_canvas:c,jpeg_attach_orig_segments:h,assign:function(t){t.before("_blob_to_image",u),t.after("_transform",c),t.after("_create_blob",h)}};function l(t){if(!(this instanceof l))return new l(t);t=t||{},this.pica=t.pica||A({}),this.initialized=!1,this.utils=i}l.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},l.prototype.init=function(){this.use(f.assign)},l.prototype.toBlob=function(t,e){var r={blob:t,opts:i.assign({max:1/0},e)};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(this._create_blob).then((function(t){return t.out_canvas.width=t.out_canvas.height=0,t.out_blob}))},l.prototype.toCanvas=function(t,e){var r={blob:t,opts:i.assign({max:1/0},e)};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then((function(t){return t.out_canvas}))},l.prototype.before=function(t,e){if(!this[t])throw new Error('Method "'+t+'" does not exist');if("function"!=typeof e)throw new Error('Invalid argument "fn", function expected');var r=this[t],n=this;return this[t]=function(t){return e.call(n,t).then((function(t){return r.call(n,t)}))},this},l.prototype.after=function(t,e){if(!this[t])throw new Error('Method "'+t+'" does not exist');if("function"!=typeof e)throw new Error('Invalid argument "fn", function expected');var r=this[t],n=this;return this[t]=function(t){return r.call(n,t).then((function(t){return e.call(n,t)}))},this},l.prototype._blob_to_image=function(t){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;return t.image=document.createElement("img"),t.image_url=e.createObjectURL(t.blob),t.image.src=t.image_url,new Promise((function(e,r){t.image.onerror=function(){r(new Error("ImageBlobReduce: failed to create Image() from blob"))},t.image.onload=function(){e(t)}}))},l.prototype._calculate_size=function(t){var e=t.opts.max/Math.max(t.image.width,t.image.height);return e>1&&(e=1),t.transform_width=Math.max(Math.round(t.image.width*e),1),t.transform_height=Math.max(Math.round(t.image.height*e),1),t.scale_factor=e,Promise.resolve(t)},l.prototype._transform=function(t){t.out_canvas=this.pica.options.createCanvas(t.transform_width,t.transform_height),t.transform_width=null,t.transform_height=null;var e={alpha:"image/png"===t.blob.type};return this.utils.assign(e,this.utils.pick_pica_resize_options(t.opts)),this.pica.resize(t.image,t.out_canvas,e).then((function(){return t}))},l.prototype._cleanup=function(t){t.image.src="",t.image=null;var e=window.URL||window.webkitURL||window.mozURL||window.msURL;return e.revokeObjectURL&&e.revokeObjectURL(t.image_url),t.image_url=null,Promise.resolve(t)},l.prototype._create_blob=function(t){return this.pica.toBlob(t.out_canvas,t.blob.type).then((function(e){return t.out_blob=e,t}))},l.prototype._getUint8Array=function(t){return t.arrayBuffer?t.arrayBuffer().then((function(t){return new Uint8Array(t)})):new Promise((function(e,r){var n=new FileReader;n.readAsArrayBuffer(t),n.onload=function(){e(new Uint8Array(n.result))},n.onerror=function(){r(new Error("ImageBlobReduce: failed to load data from input blob")),n.abort()},n.onabort=function(){r(new Error("ImageBlobReduce: failed to load data from input blob (aborted)"))}}))},l.pica=A;var g=l;e.default=g},9521:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(8950),i=r(2975),a=function(){var t=(0,n.Z)(i.mark((function t(){var e,r=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:[{}],t.abrupt("return",(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((function(t,r){var n=document.createElement("input");n.type="file",n.webkitdirectory=!0;var i=function(e){"function"==typeof a&&a(),t(e)},a=e[0].legacySetup&&e[0].legacySetup(i,(function(){return a(r)}),n);n.addEventListener("change",(function(){var t=Array.from(n.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter((function(t){return t.webkitRelativePath.split("/").every((function(t){return!e[0].skipDirectory({name:t,kind:"directory"})}))}))):t=t.filter((function(t){return 2===t.webkitRelativePath.split("/").length})),i(t)})),n.click()}))));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},6474:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return s}});var n=r(1930),i=r(8950),a=r(2975);function o(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return(o=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new o(t)}var A=function(){var t=(0,i.Z)(a.mark((function t(e,r){var i,s,u,c,h,f,l,g,p,d,m=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=m.length>2&&void 0!==m[2]?m[2]:e.name,s=m.length>3?m[3]:void 0,u=[],c=[],f=!1,l=!1,t.prev=4,g=function(){var t=p.value,n="".concat(i,"/").concat(t.name);"file"===t.kind?c.push(t.getFile().then((function(r){return r.directoryHandle=e,r.handle=t,Object.defineProperty(r,"webkitRelativePath",{configurable:!0,enumerable:!0,get:function(){return n}})}))):"directory"!==t.kind||!r||s&&s(t)||u.push(A(t,r,n,s))},d=function(t){var e,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new o(e.call(t));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}(e.values());case 7:return t.next=9,d.next();case 9:if(!(f=!(p=t.sent).done)){t.next=14;break}g();case 11:f=!1,t.next=7;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(4),l=!0,h=t.t0;case 19:if(t.prev=19,t.prev=20,t.t1=f&&null!=d.return,!t.t1){t.next=25;break}return t.next=25,d.return();case 25:if(t.prev=25,!l){t.next=28;break}throw h;case 28:return t.finish(25);case 29:return t.finish(19);case 30:return t.t2=[],t.t3=n.Z,t.next=34,Promise.all(u);case 34:return t.t4=t.sent.flat(),t.t5=(0,t.t3)(t.t4),t.t6=n.Z,t.next=39,Promise.all(c);case 39:return t.t7=t.sent,t.t8=(0,t.t6)(t.t7),t.abrupt("return",t.t2.concat.call(t.t2,t.t5,t.t8));case 42:case"end":return t.stop()}}),t,null,[[4,16,19,30],[20,,25,29]])})));return function(e,r){return t.apply(this,arguments)}}(),s=function(){var t=(0,i.Z)(a.mark((function t(){var e,r,n=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=n.length>0&&void 0!==n[0]?n[0]:{}).recursive=e.recursive||!1,t.next=4,window.showDirectoryPicker({id:e.id,startIn:e.startIn});case 4:return r=t.sent,t.abrupt("return",A(r,e.recursive,void 0,e.skipDirectory));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},2254:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return o}});var n=r(8950),i=r(2975),a=function(){var t=(0,n.Z)(i.mark((function t(e){var r;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFile();case 2:return r=t.sent,t.abrupt("return",(r.handle=e,r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o=function(){var t=(0,n.Z)(i.mark((function t(){var e,r,n,o,A=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=A.length>0&&void 0!==A[0]?A[0]:[{}],Array.isArray(e)||(e=[e]),r=[],e.forEach((function(t,e){r[e]={description:t.description||"",accept:{}},t.mimeTypes?t.mimeTypes.map((function(n){r[e].accept[n]=t.extensions||[]})):r[e].accept["*/*"]=t.extensions||[]})),t.next=6,window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:r,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1});case 6:return n=t.sent,t.next=9,Promise.all(n.map(a));case 9:return o=t.sent,t.abrupt("return",e[0].multiple?o:o[0]);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},3499:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return o}});var n=r(1930),i=r(8950),a=r(2975),o=function(){var t=(0,i.Z)(a.mark((function t(){var e,r=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:[{}],t.abrupt("return",(Array.isArray(e)||(e=[e]),new Promise((function(t,r){var i=document.createElement("input");i.type="file";var a=[].concat((0,n.Z)(e.map((function(t){return t.mimeTypes||[]}))),(0,n.Z)(e.map((function(t){return t.extensions||[]})))).join();i.multiple=e[0].multiple||!1,i.accept=a||"";var o=function(e){"function"==typeof A&&A(),t(e)},A=e[0].legacySetup&&e[0].legacySetup(o,(function(){return A(r)}),i);i.addEventListener("change",(function(){o(i.multiple?Array.from(i.files):i.files[0])})),i.click()}))));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},6281:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(8950),i=r(2975),a=function(){var t=(0,n.Z)(i.mark((function t(e){var r,a,o,A,s,u=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=u.length>1&&void 0!==u[1]?u[1]:{},Array.isArray(r)&&(r=r[0]),a=document.createElement("a"),o=e,t.t0="body"in e,!t.t0){t.next=9;break}return t.next=8,function(){var t=(0,n.Z)(i.mark((function t(e,r){var a,o,A,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.getReader(),o=new ReadableStream({start:function(t){return function(){var e=(0,n.Z)(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.read().then((function(e){var n=e.done,i=e.value;if(!n)return t.enqueue(i),r();t.close()})));case 1:case"end":return e.stop()}}),e)})));function r(){return e.apply(this,arguments)}return r}()()}}),A=new Response(o),t.next=5,A.blob();case 5:return s=t.sent,t.abrupt("return",(a.releaseLock(),new Blob([s],{type:r})));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()(e.body,e.headers.get("content-type"));case 8:o=t.sent;case 9:return a.download=r.fileName||"Untitled",t.t1=URL,t.next=13,o;case 13:return t.t2=t.sent,a.href=t.t1.createObjectURL.call(t.t1,t.t2),A=function(){"function"==typeof s&&s()},s=r.legacySetup&&r.legacySetup(A,(function(){return s(reject)}),a),t.abrupt("return",(a.addEventListener("click",(function(){setTimeout((function(){return URL.revokeObjectURL(a.href)}),3e4),A()})),a.click(),null));case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},9475:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return a}});var n=r(8950),i=r(2975),a=function(){var t=(0,n.Z)(i.mark((function t(e){var r,n,a,o,A,s,u,c,h,f=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=f.length>1&&void 0!==f[1]?f[1]:[{}],n=f.length>2&&void 0!==f[2]?f[2]:null,a=f.length>3&&void 0!==f[3]&&f[3],o=f.length>4&&void 0!==f[4]?f[4]:null,Array.isArray(r)||(r=[r]),r[0].fileName=r[0].fileName||"Untitled",A=[],s=null,e instanceof Blob&&e.type?s=e.type:e.headers&&e.headers.get("content-type")&&(s=e.headers.get("content-type")),r.forEach((function(t,e){A[e]={description:t.description||"",accept:{}},t.mimeTypes?(0===e&&s&&t.mimeTypes.push(s),t.mimeTypes.map((function(r){A[e].accept[r]=t.extensions||[]}))):s&&(A[e].accept[s]=t.extensions||[])})),!n){t.next=17;break}return t.prev=8,t.next=11,n.getFile();case 11:t.next=17;break;case 13:if(t.prev=13,t.t0=t.catch(8),n=null,!a){t.next=17;break}throw t.t0;case 17:if(t.t1=n,t.t1){t.next=22;break}return t.next=21,window.showSaveFilePicker({suggestedName:r[0].fileName,id:r[0].id,startIn:r[0].startIn,types:A,excludeAcceptAllOption:r[0].excludeAcceptAllOption||!1});case 21:t.t1=t.sent;case 22:return u=t.t1,!n&&o&&o(),t.next=26,u.createWritable();case 26:if(c=t.sent,!("stream"in e)){t.next=32;break}return h=e.stream(),t.next=31,h.pipeTo(c);case 31:return t.abrupt("return",u);case 32:if(!("body"in e)){t.next=38;break}return t.next=35,e.body.pipeTo(c);case 35:t.t2=u,t.next=47;break;case 38:return t.t3=c,t.next=41,e;case 41:return t.t4=t.sent,t.next=44,t.t3.write.call(t.t3,t.t4);case 44:return t.next=46,c.close();case 46:t.t2=u;case 47:return t.abrupt("return",t.t2);case 48:case"end":return t.stop()}}),t,null,[[8,13]])})));return function(e){return t.apply(this,arguments)}}()}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|