@dwelle/excalidraw 0.3.77 → 0.12.0-fork2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw-assets/locales/ar-SA-json-4ff31c0432fe4c84d726.js +1 -0
- package/dist/excalidraw-assets/locales/bg-BG-json-1c6eb789a5c90a61edf8.js +1 -0
- package/dist/excalidraw-assets/locales/bn-BD-json-aa99c5a33f005fb00c6b.js +1 -0
- package/dist/excalidraw-assets/locales/ca-ES-json-32cf66a0dfdbbafb6903.js +1 -0
- package/dist/excalidraw-assets/locales/cs-CZ-json-304d08cac870aa0684ec.js +1 -0
- package/dist/excalidraw-assets/locales/da-DK-json-80c7153473e1427a9a3b.js +1 -0
- package/dist/excalidraw-assets/locales/de-DE-json-9b88838b2648d7d61f1b.js +1 -0
- package/dist/excalidraw-assets/locales/el-GR-json-74f57c0f8b11ac1b6dde.js +1 -0
- package/dist/excalidraw-assets/locales/es-ES-json-ffb4e65453db2f3058d4.js +1 -0
- package/dist/excalidraw-assets/locales/eu-ES-json-a61838a778c9eacb61ec.js +1 -0
- package/dist/excalidraw-assets/locales/fa-IR-json-2d0cb1044744ed8e4139.js +1 -0
- package/dist/excalidraw-assets/locales/fi-FI-json-32bcb6481756ef8af590.js +1 -0
- package/dist/excalidraw-assets/locales/fr-FR-json-935424b03b86c1d82dcd.js +1 -0
- package/dist/excalidraw-assets/locales/gl-ES-json-5b417484d91976bce190.js +1 -0
- package/dist/excalidraw-assets/locales/he-IL-json-3f5bfefb1ad0baf19b6c.js +1 -0
- package/dist/excalidraw-assets/locales/hi-IN-json-71a38dbb2202baec2bad.js +1 -0
- package/dist/excalidraw-assets/locales/hu-HU-json-e1275f2b1e6ae6ef4427.js +1 -0
- package/dist/excalidraw-assets/locales/id-ID-json-da38cd847aaf195c3c20.js +1 -0
- package/dist/excalidraw-assets/locales/it-IT-json-10923c290e23bd31a5b4.js +1 -0
- package/dist/excalidraw-assets/locales/ja-JP-json-4c357f8206b88dc44840.js +1 -0
- package/dist/excalidraw-assets/locales/kab-KAB-json-8303afee283a95237f2b.js +1 -0
- package/dist/excalidraw-assets/locales/kk-KZ-json-ccf0876179807d1d685a.js +1 -0
- package/dist/excalidraw-assets/locales/ko-KR-json-f27d159b2556809076aa.js +1 -0
- package/dist/excalidraw-assets/locales/lt-LT-json-7277ad8dae6d3e6607b3.js +1 -0
- package/dist/excalidraw-assets/locales/lv-LV-json-cc5e03ed2a09f8f8b60b.js +1 -0
- package/dist/excalidraw-assets/locales/mr-IN-json-cb316f30d7b40d3e6766.js +1 -0
- package/dist/excalidraw-assets/locales/my-MM-json-5dcc8e9cb97a4aa1d8bc.js +1 -0
- package/dist/excalidraw-assets/locales/nb-NO-json-61192c4af6e2231d38ae.js +1 -0
- package/dist/excalidraw-assets/locales/nl-NL-json-861ac93c048b5296b791.js +1 -0
- package/dist/excalidraw-assets/locales/nn-NO-json-808362c0cd4eccb6a885.js +1 -0
- package/dist/excalidraw-assets/locales/oc-FR-json-d5706569ab4023f94c66.js +1 -0
- package/dist/excalidraw-assets/locales/pa-IN-json-eb38ce8bfc1b974c1455.js +1 -0
- package/dist/excalidraw-assets/locales/pl-PL-json-55d8dd8a44917364ef63.js +1 -0
- package/dist/excalidraw-assets/locales/pt-BR-json-686219f43cd76123b7fa.js +1 -0
- package/dist/excalidraw-assets/locales/pt-PT-json-be4502ca3a1250845c39.js +1 -0
- package/dist/excalidraw-assets/locales/ro-RO-json-232ea1e0c18745ec6ed9.js +1 -0
- package/dist/excalidraw-assets/locales/ru-RU-json-ce5fedd8812aa76a0b41.js +1 -0
- package/dist/excalidraw-assets/locales/si-LK-json-f48a64dfd1cb9c075d2e.js +1 -0
- package/dist/excalidraw-assets/locales/sk-SK-json-537132ec043d4db7f328.js +1 -0
- package/dist/excalidraw-assets/locales/sl-SI-json-b69c9fd9b85dac1310c6.js +1 -0
- package/dist/excalidraw-assets/locales/sv-SE-json-9a8520b202b7181625cf.js +1 -0
- package/dist/excalidraw-assets/locales/ta-IN-json-15175d03785f7a482568.js +1 -0
- package/dist/excalidraw-assets/locales/tr-TR-json-c53ae37e848043dd0b89.js +1 -0
- package/dist/excalidraw-assets/locales/uk-UA-json-15fda426e55236408ef9.js +1 -0
- package/dist/excalidraw-assets/locales/vi-VN-json-5c276b534d762658589c.js +1 -0
- package/dist/excalidraw-assets/locales/zh-CN-json-0e3236ea93581e6ac2d3.js +1 -0
- package/dist/excalidraw-assets/locales/zh-HK-json-9e8b36ecb4c8399449b1.js +1 -0
- package/dist/excalidraw-assets/locales/zh-TW-json-441a30840e0721d7f2e2.js +1 -0
- package/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.js +2 -0
- package/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.js.LICENSE.txt +6 -0
- package/dist/excalidraw-assets-dev/locales/ar-SA-json-c8fa653de4977a22dad1.js +22 -0
- package/dist/excalidraw-assets-dev/locales/bg-BG-json-d7e517c7462119871c76.js +22 -0
- package/dist/excalidraw-assets-dev/locales/bn-BD-json-02993b6dba9e7f115b53.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ca-ES-json-7aabb5b31e7a995a90e3.js +22 -0
- package/dist/excalidraw-assets-dev/locales/cs-CZ-json-a9cc158d187424de71d7.js +22 -0
- package/dist/excalidraw-assets-dev/locales/da-DK-json-81b641c9b272e91762b8.js +22 -0
- package/dist/excalidraw-assets-dev/locales/de-DE-json-e9f68b4434bb76d28151.js +22 -0
- package/dist/excalidraw-assets-dev/locales/el-GR-json-2bc44d5450554154e110.js +22 -0
- package/dist/excalidraw-assets-dev/locales/es-ES-json-9e5e962b234d2fa5aac2.js +22 -0
- package/dist/excalidraw-assets-dev/locales/eu-ES-json-05199638b0e1e11061f3.js +22 -0
- package/dist/excalidraw-assets-dev/locales/fa-IR-json-2a69e87cf2308b8e78f5.js +22 -0
- package/dist/excalidraw-assets-dev/locales/fi-FI-json-6f0f0bcd3593bcc8930a.js +22 -0
- package/dist/excalidraw-assets-dev/locales/fr-FR-json-f53c7082a6f8691b7258.js +22 -0
- package/dist/excalidraw-assets-dev/locales/gl-ES-json-5295fdf24f032f998f75.js +22 -0
- package/dist/excalidraw-assets-dev/locales/he-IL-json-19fae6e424c8b418735d.js +22 -0
- package/dist/excalidraw-assets-dev/locales/hi-IN-json-f04242b20685f34378a5.js +22 -0
- package/dist/excalidraw-assets-dev/locales/hu-HU-json-c8014a1b2a44d4885691.js +22 -0
- package/dist/excalidraw-assets-dev/locales/id-ID-json-bcd3ce43f1dbefe3f4d0.js +22 -0
- package/dist/excalidraw-assets-dev/locales/it-IT-json-946dc662ecab93b77e69.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ja-JP-json-77b3461742458e757b59.js +22 -0
- package/dist/excalidraw-assets-dev/locales/kab-KAB-json-5e733b113476a350e900.js +22 -0
- package/dist/excalidraw-assets-dev/locales/kk-KZ-json-5ec5044574589896438e.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ko-KR-json-09de6762eea271167b56.js +22 -0
- package/dist/excalidraw-assets-dev/locales/lt-LT-json-a17971ff33b8929e96d3.js +22 -0
- package/dist/excalidraw-assets-dev/locales/lv-LV-json-2d1a7d044c33d030ecca.js +22 -0
- package/dist/excalidraw-assets-dev/locales/mr-IN-json-ed8cde2f50a5f3c08e85.js +22 -0
- package/dist/excalidraw-assets-dev/locales/my-MM-json-600fc533d1a1c8d3e2f9.js +22 -0
- package/dist/excalidraw-assets-dev/locales/nb-NO-json-c7c63cfd529a92ac3510.js +22 -0
- package/dist/excalidraw-assets-dev/locales/nl-NL-json-7e7200dded88b465781e.js +22 -0
- package/dist/excalidraw-assets-dev/locales/nn-NO-json-d654941277fcbace33bf.js +22 -0
- package/dist/excalidraw-assets-dev/locales/oc-FR-json-2d347b7f54a867a5478f.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pa-IN-json-63518bb328bf8b92790c.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pl-PL-json-92de366ba93223fa3d6a.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pt-BR-json-5e4c8cd83b785ed859c2.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pt-PT-json-a7f89a1c6f1c380141e5.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ro-RO-json-6903d070f824f8b91709.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ru-RU-json-110d8aec7823819bf4e3.js +22 -0
- package/dist/excalidraw-assets-dev/locales/si-LK-json-ad2dff740d16a23684ff.js +22 -0
- package/dist/excalidraw-assets-dev/locales/sk-SK-json-209333495d21be527f89.js +22 -0
- package/dist/excalidraw-assets-dev/locales/sl-SI-json-76bdeb34579c5b1f944f.js +22 -0
- package/dist/excalidraw-assets-dev/locales/sv-SE-json-6e768d07fff4e3ed6560.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ta-IN-json-059a459deba6d6230393.js +22 -0
- package/dist/excalidraw-assets-dev/locales/tr-TR-json-7cc28f1f798ef2dd9864.js +22 -0
- package/dist/excalidraw-assets-dev/locales/uk-UA-json-80b2990c3144c6bb1270.js +22 -0
- package/dist/excalidraw-assets-dev/locales/vi-VN-json-670ecb0ad40c0453bdfd.js +22 -0
- package/dist/excalidraw-assets-dev/locales/zh-CN-json-26caa1a6379860230513.js +22 -0
- package/dist/excalidraw-assets-dev/locales/zh-HK-json-179f6dc61b14b96215fa.js +22 -0
- package/dist/excalidraw-assets-dev/locales/zh-TW-json-2aeeb73d79793ee69bfc.js +22 -0
- package/dist/excalidraw.development.js +372 -152
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -9
- package/main.js +1 -4
- package/package.json +13 -6
- package/types/actions/actionAddToLibrary.d.ts +3 -0
- package/types/actions/actionBoundText.d.ts +1 -0
- package/types/actions/actionCanvas.d.ts +8 -0
- package/types/actions/actionClipboard.d.ts +6 -0
- package/types/actions/actionDeleteSelected.d.ts +4 -0
- package/types/actions/actionExport.d.ts +9 -0
- package/types/actions/actionFinalize.d.ts +2 -0
- package/types/actions/actionMenu.d.ts +3 -0
- package/types/actions/actionProperties.d.ts +13 -0
- package/types/actions/actionSelectAll.d.ts +1 -1
- package/types/actions/actionStyles.d.ts +1 -0
- package/types/actions/actionToggleGridMode.d.ts +1 -0
- package/types/actions/actionToggleLock.d.ts +99 -1
- package/types/actions/actionToggleStats.d.ts +1 -0
- package/types/actions/actionToggleViewMode.d.ts +1 -0
- package/types/actions/actionToggleZenMode.d.ts +1 -0
- package/types/analytics.d.ts +1 -1
- package/types/appState.d.ts +1 -0
- package/types/clients.d.ts +1 -1
- package/types/components/App.d.ts +4 -161
- package/types/components/JSONExportDialog.d.ts +2 -2
- package/types/components/LayerUI.d.ts +1 -2
- package/types/components/MobileMenu.d.ts +3 -5
- package/types/components/UserList.d.ts +0 -1
- package/types/components/icons.d.ts +0 -1
- package/types/constants.d.ts +3 -7
- package/types/data/blob.d.ts +4 -4
- package/types/data/json.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +1 -0
- package/types/element/binding.d.ts +3 -3
- package/types/element/dragElements.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +9 -5
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/sizeHelpers.d.ts +4 -0
- package/types/element/textElement.d.ts +1 -1
- package/types/element/typeChecks.d.ts +3 -3
- package/types/keys.d.ts +1 -1
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ar-SA-json-3f3939003e50137eb96e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ar-SA-json-4ff31c0432fe4c84d726.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/bg-BG-json-1c6eb789a5c90a61edf8.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/bg-BG-json-41978e51de89ecb69832.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/bn-BD-json-270049304edfc328feb0.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/bn-BD-json-aa99c5a33f005fb00c6b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ca-ES-json-2e2ec4a6db0dadecd932.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ca-ES-json-32cf66a0dfdbbafb6903.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/cs-CZ-json-294f73284f7603f8b308.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/cs-CZ-json-304d08cac870aa0684ec.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/da-DK-json-7cec75a31335c8eaab69.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/da-DK-json-80c7153473e1427a9a3b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/de-DE-json-9b88838b2648d7d61f1b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/de-DE-json-b972f335652b31abc478.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/el-GR-json-0a17ab9d0298049bcf5f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/el-GR-json-74f57c0f8b11ac1b6dde.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/es-ES-json-2a821ff3ff417c43b325.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/es-ES-json-ffb4e65453db2f3058d4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/eu-ES-json-807880ff10379aea34f5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/eu-ES-json-a61838a778c9eacb61ec.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fa-IR-json-2d0cb1044744ed8e4139.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fa-IR-json-30ce6b716d375cd90b9b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fi-FI-json-32bcb6481756ef8af590.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fi-FI-json-d71c23aabcb9ca7449d9.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fr-FR-json-935424b03b86c1d82dcd.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/fr-FR-json-d53486b6942cd134938f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/gl-ES-json-24b9a50f57184ae44f99.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/gl-ES-json-5b417484d91976bce190.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/he-IL-json-3f5bfefb1ad0baf19b6c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/he-IL-json-f91ace474afb01d8f3ed.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/hi-IN-json-71a38dbb2202baec2bad.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/hi-IN-json-9af974be0987a846db82.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/hu-HU-json-dd5d9a15eb412598f794.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/hu-HU-json-e1275f2b1e6ae6ef4427.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/id-ID-json-acdf1f60176cd026af64.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/id-ID-json-da38cd847aaf195c3c20.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/it-IT-json-10923c290e23bd31a5b4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/it-IT-json-790983f96414735e8451.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ja-JP-json-4c357f8206b88dc44840.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ja-JP-json-b57e6afb227d9247b3c8.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/kab-KAB-json-8303afee283a95237f2b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/kab-KAB-json-b3aced3d4ddccfb4127d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/kk-KZ-json-6f477840db7f293c3ff3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/kk-KZ-json-ccf0876179807d1d685a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ko-KR-json-d2e67336d6b43a42ff1e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ko-KR-json-f27d159b2556809076aa.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/lt-LT-json-1a57a9a7596eb235b3e5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/lt-LT-json-7277ad8dae6d3e6607b3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/lv-LV-json-40863b1530d2015aa72e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/lv-LV-json-cc5e03ed2a09f8f8b60b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/mr-IN-json-3295641c432b154ab60f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/mr-IN-json-cb316f30d7b40d3e6766.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/my-MM-json-5dcc8e9cb97a4aa1d8bc.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/my-MM-json-dc1320c2d6c1adca77d0.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nb-NO-json-61192c4af6e2231d38ae.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nb-NO-json-f073266126f35722bd87.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nl-NL-json-5d4a291a77a27fadddc1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nl-NL-json-861ac93c048b5296b791.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nn-NO-json-808362c0cd4eccb6a885.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/nn-NO-json-9fe14d0a715c691bb9aa.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/oc-FR-json-b7a10ed3433fcb6dd59a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/oc-FR-json-d5706569ab4023f94c66.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pa-IN-json-e11565cbf1ccc3a53a3b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pa-IN-json-eb38ce8bfc1b974c1455.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pl-PL-json-55d8dd8a44917364ef63.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pl-PL-json-843eb6fd0616dace3255.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-BR-json-686219f43cd76123b7fa.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-BR-json-e24132703235bd25ba2f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-PT-json-0501abbca76504a7d110.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-PT-json-be4502ca3a1250845c39.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ro-RO-json-232ea1e0c18745ec6ed9.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ro-RO-json-79dbe0225dfe06a010a6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ru-RU-json-1d73c3f8bae6d1f3d779.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ru-RU-json-ce5fedd8812aa76a0b41.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/si-LK-json-dfe5be591dc8bbe15cd1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/si-LK-json-f48a64dfd1cb9c075d2e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sk-SK-json-537132ec043d4db7f328.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sk-SK-json-bd7dbe4c1e42c016fcb5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sl-SI-json-85c2d64d8aa86fcd537e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sl-SI-json-b69c9fd9b85dac1310c6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sv-SE-json-74107fd3674c60fbe593.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/sv-SE-json-9a8520b202b7181625cf.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ta-IN-json-15175d03785f7a482568.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/ta-IN-json-c5b41d8c83aab479a2c6.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/tr-TR-json-75f46a2579a01cf32ba7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/tr-TR-json-c53ae37e848043dd0b89.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/uk-UA-json-15fda426e55236408ef9.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/uk-UA-json-f5b7b281f867489710d7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/vi-VN-json-5c276b534d762658589c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/vi-VN-json-a56a1980b98f933cd604.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-CN-json-0e3236ea93581e6ac2d3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-CN-json-af7e4dc6eb1d97a22272.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-HK-json-9e8b36ecb4c8399449b1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-HK-json-d0511bd8842fe92cc42e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-TW-json-43bef01a6edb6e4da73c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-TW-json-441a30840e0721d7f2e2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ar-SA-json-684b5e25f971902bd933.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ar-SA-json-c8fa653de4977a22dad1.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/bg-BG-json-d78c84e8962f5d754019.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/bg-BG-json-d7e517c7462119871c76.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/bn-BD-json-02993b6dba9e7f115b53.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/bn-BD-json-79007d6cd3d09b6c1e82.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ca-ES-json-7aabb5b31e7a995a90e3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ca-ES-json-84b33ecd3096b99533c1.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/cs-CZ-json-1d48380fd54bd715a21c.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/cs-CZ-json-a9cc158d187424de71d7.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/da-DK-json-81b641c9b272e91762b8.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/da-DK-json-9dc062ac2b2aee3ad4ec.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/de-DE-json-2d48c0ec0901cee81272.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/de-DE-json-e9f68b4434bb76d28151.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/el-GR-json-2bc44d5450554154e110.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/el-GR-json-8ec22bd0cbf376e3ba5d.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/es-ES-json-5dd577ba17baf0f4382c.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/es-ES-json-9e5e962b234d2fa5aac2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/eu-ES-json-05199638b0e1e11061f3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/eu-ES-json-9ba2e12372db6b5be813.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fa-IR-json-2a69e87cf2308b8e78f5.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fa-IR-json-9866fde07b07d55f2cb9.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fi-FI-json-2dcf087c4ff34b8a8ad7.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fi-FI-json-6f0f0bcd3593bcc8930a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fr-FR-json-e4bbc872fed09a689b27.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/fr-FR-json-f53c7082a6f8691b7258.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/gl-ES-json-4ab7103bd7905741cf7e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/gl-ES-json-5295fdf24f032f998f75.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/he-IL-json-19fae6e424c8b418735d.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/he-IL-json-abac6b158c54984aecba.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/hi-IN-json-3aba9d37f6dae9ca2445.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/hi-IN-json-f04242b20685f34378a5.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/hu-HU-json-8d604fcc349f93bc4440.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/hu-HU-json-c8014a1b2a44d4885691.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/id-ID-json-6d9b771568900ad6f055.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/id-ID-json-bcd3ce43f1dbefe3f4d0.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/it-IT-json-7086cd6c6f1f61016ba1.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/it-IT-json-946dc662ecab93b77e69.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ja-JP-json-77b3461742458e757b59.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ja-JP-json-d864fb849b2a3874b290.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/kab-KAB-json-5e733b113476a350e900.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/kab-KAB-json-c69f8a1079a411de837c.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/kk-KZ-json-5ec5044574589896438e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/kk-KZ-json-8c7f34edcdac22c11c72.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ko-KR-json-09de6762eea271167b56.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ko-KR-json-c80065dfa01e02f28695.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/lt-LT-json-a17971ff33b8929e96d3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/lt-LT-json-edaae0abc84fb205ee70.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/lv-LV-json-21cc252dcf4524c98e55.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/lv-LV-json-2d1a7d044c33d030ecca.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/mr-IN-json-d28b9664c21ee08d79eb.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/mr-IN-json-ed8cde2f50a5f3c08e85.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/my-MM-json-56d51a30e815283e7260.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/my-MM-json-600fc533d1a1c8d3e2f9.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nb-NO-json-827603cac737fb4bb00f.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nb-NO-json-c7c63cfd529a92ac3510.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nl-NL-json-7e7200dded88b465781e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nl-NL-json-9c5c4b7bfbfe3328e561.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nn-NO-json-cb21e50c1afeb6a8f01d.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/nn-NO-json-d654941277fcbace33bf.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/oc-FR-json-2d347b7f54a867a5478f.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/oc-FR-json-bec2ee705e7d3980fd61.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pa-IN-json-189c7e5cad9e781f0ce5.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pa-IN-json-63518bb328bf8b92790c.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pl-PL-json-92de366ba93223fa3d6a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pl-PL-json-9cc770276a511a05e638.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pt-BR-json-5e4c8cd83b785ed859c2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pt-BR-json-788b2c323ae4afd36853.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pt-PT-json-4f16b87e256eb838c91a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/pt-PT-json-a7f89a1c6f1c380141e5.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ro-RO-json-6903d070f824f8b91709.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ro-RO-json-9ac079b4af3b20377160.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ru-RU-json-110d8aec7823819bf4e3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ru-RU-json-eda247a0b10c11a51eec.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/si-LK-json-ad2dff740d16a23684ff.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/si-LK-json-ee3083905b0cf879022d.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sk-SK-json-03a80aeb3e09f77b1be6.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sk-SK-json-209333495d21be527f89.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sl-SI-json-55f372eebf814a422031.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sl-SI-json-76bdeb34579c5b1f944f.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sv-SE-json-6e768d07fff4e3ed6560.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/sv-SE-json-ca85dde4f9c34d5ee346.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ta-IN-json-059a459deba6d6230393.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/ta-IN-json-f9d1822384bc4ce086b6.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/tr-TR-json-30a4d84bda3152292dbe.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/tr-TR-json-7cc28f1f798ef2dd9864.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/uk-UA-json-80b2990c3144c6bb1270.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/uk-UA-json-b271ae2bf2e210aa582b.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/vi-VN-json-670ecb0ad40c0453bdfd.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/vi-VN-json-9a1f8e4ce0b77e05baa7.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-CN-json-26caa1a6379860230513.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-CN-json-29856d6541bf2cbd6aea.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-HK-json-179f6dc61b14b96215fa.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-HK-json-8bb0f0928ccbce98f995.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-TW-json-2aeeb73d79793ee69bfc.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/zh-TW-json-517b39d1a3184844b4d7.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +5 -1
- package/types/packages/excalidraw/index.d.ts +1 -4
- package/types/packages/excalidraw/webpack.prod.config.d.ts +2 -1
- package/types/renderer/renderElement.d.ts +2 -3
- package/types/types.d.ts +10 -22
- package/types/utils.d.ts +6 -6
- package/dist/excalidraw-assets/vendor-6644c8f79d52085cf653.js +0 -2
- package/dist/excalidraw-assets/vendor-6644c8f79d52085cf653.js.LICENSE.txt +0 -12
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see excalidraw.production.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ExcalidrawLib=t(require("react"),require("react-dom")):e.ExcalidrawLib=t(e.React,e.ReactDOM)}(self,(function(e,t){return(()=>{var n,r,i,o,a={8336:(e,t,n)=>{var r=n(487),i=n(4295);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},554:(e,t,n)=>{var r=n(487),i=n(9135);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},2789:(e,t,n)=>{var r=n(487),i=n(3729);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},5080:(e,t,n)=>{var r=n(487),i=n(4241);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},7225:(e,t,n)=>{var r=n(487),i=n(6029);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},778:(e,t,n)=>{var r=n(487),i=n(9609);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4220:(e,t,n)=>{var r=n(487),i=n(2345);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4678:(e,t,n)=>{var r=n(487),i=n(9393);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},1292:(e,t,n)=>{var r=n(487),i=n(6578);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},196:(e,t,n)=>{var r=n(487),i=n(9482);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},2205:(e,t,n)=>{var r=n(487),i=n(7955);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},1310:(e,t,n)=>{var r=n(487),i=n(3195);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},3922:(e,t,n)=>{var r=n(487),i=n(2978);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},7096:(e,t,n)=>{var r=n(487),i=n(1587);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},7117:(e,t,n)=>{var r=n(487),i=n(9478);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},1106:(e,t,n)=>{var r=n(487),i=n(7369);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},3336:(e,t,n)=>{var r=n(487),i=n(1434);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4406:(e,t,n)=>{var r=n(487),i=n(8923);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},6043:(e,t,n)=>{var r=n(487),i=n(5605);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},694:(e,t,n)=>{var r=n(487),i=n(5644);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},8328:(e,t,n)=>{var r=n(487),i=n(6843);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},8051:(e,t,n)=>{var r=n(487),i=n(8461);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4301:(e,t,n)=>{var r=n(487),i=n(9935);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},9966:(e,t,n)=>{var r=n(487),i=n(532);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},9295:(e,t,n)=>{var r=n(487),i=n(7589);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},47:(e,t,n)=>{var r=n(487),i=n(5741);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},9781:(e,t,n)=>{var r=n(487),i=n(8465);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},371:(e,t,n)=>{var r=n(487),i=n(5892);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4623:(e,t,n)=>{var r=n(487),i=n(3874);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},1528:(e,t,n)=>{var r=n(487),i=n(2681);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},518:(e,t,n)=>{var r=n(487),i=n(6759);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},9757:(e,t,n)=>{var r=n(487),i=n(9650);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},5422:(e,t,n)=>{var r=n(487),i=n(2044);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},276:(e,t,n)=>{var r=n(487),i=n(9144);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},6781:(e,t,n)=>{var r=n(487),i=n(6626);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},580:(e,t,n)=>{var r=n(487),i=n(6359);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4285:(e,t,n)=>{var r=n(487),i=n(9915);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},3313:(e,t,n)=>{var r=n(487),i=n(9310);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},8635:(e,t,n)=>{var r=n(487),i=n(6464);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},4404:(e,t,n)=>{var r=n(487),i=n(5260);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},487:(e,t,n)=>{"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],l=t.base?o[0]+t.base:o[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var u=s(d),h={css:o[1],media:o[2],sourceMap:o[3]};-1!==u?(a[u].references++,a[u].updater(h)):a.push({identifier:d,updater:m(h,t),references:1}),r.push(d)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var g=null,f=0;function m(e,t){var n,r,i;if(t.singleton){var o=f++;n=g||(g=c(t)),r=h.bind(null,n,o,!1),i=h.bind(null,n,o,!0)}else n=c(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);a[i].references--}for(var o=l(e,t),c=0;c<n.length;c++){var d=s(n[c]);0===a[d].references&&(a[d].updater(),a.splice(d,1))}n=o}}}},4295:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o),s=n(7157),l=n.n(s),c=new URL(n(3940),n.b),d=new URL(n(3147),n.b),u=a()(i()),h=l()(c),p=l()(d);u.push([e.id,'@font-face{font-family:"Virgil";src:url('+h+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+p+");font-display:swap}",""]);const g=u},9135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;margin-inline-end:.3em;transform:scaleY(0.9)}",""]);const s=a},3729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.8rem;font-weight:500}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}",""]);const s=a},4241:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",""]);const s=a},6029:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]);const s=a},9609:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#40c057;color:#fff;font-size:.6em;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]);const s=a},2345:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o),s=n(7157),l=n.n(s),c=new URL(n(9669),n.b),d=a()(i()),u=l()(c);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:-10px}:root[dir=ltr] .excalidraw .color-picker-triangle{left:12px}:root[dir=rtl] .excalidraw .color-picker-triangle{right:12px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-11px}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, auto);grid-gap:.5rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+u+') left center}.excalidraw .color-picker-hash{background:var(--input-border-color);height:1.875rem;width:1.875rem;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:4px 0 0 4px}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 4px 4px 0}.excalidraw .color-input-container:focus-within .color-picker-hash{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-input-container:focus-within .color-picker-hash::before,.excalidraw .color-input-container:focus-within .color-picker-hash::after{content:"";width:1px;height:100%;position:absolute;top:0}.excalidraw .color-input-container:focus-within .color-picker-hash::before{background:var(--input-border-color)}:root[dir=ltr] .excalidraw .color-input-container:focus-within .color-picker-hash::before{right:-1px}:root[dir=rtl] .excalidraw .color-input-container:focus-within .color-picker-hash::before{left:-1px}.excalidraw .color-input-container:focus-within .color-picker-hash::after{background:var(--input-bg-color)}:root[dir=ltr] .excalidraw .color-input-container:focus-within .color-picker-hash::after{right:-2px}:root[dir=rtl] .excalidraw .color-input-container:focus-within .color-picker-hash::after{left:-2px}.excalidraw .color-input-container{display:flex}.excalidraw .color-picker-input{width:11ch;margin:0;font-size:1rem;background-color:var(--input-bg-color);color:var(--text-primary-color);border:0;outline:none;height:1.75em;box-shadow:var(--input-border-color) 0 0 0 1px inset;float:left;padding:1px;padding-inline-start:.5em;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 4px 4px 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:4px 0 0 4px}.excalidraw .color-picker-label-swatch{height:1.875rem;width:1.875rem;margin-inline-end:.25rem;border:1px solid #dee2e6;position:relative;overflow:hidden;background-color:rgba(0,0,0,0) !important;filter:var(--theme-filter)}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#000}',""]);const h=d},9393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .confirm-dialog .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .confirm-dialog .ToolIcon_type_button{margin-left:.8rem;padding:0 .5rem}.excalidraw .confirm-dialog__content{font-size:1rem}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button{background-color:#fa5252}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button:hover{background-color:#e03131}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button .ToolIcon__icon{color:#fff}",""]);const s=a},6578:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-option{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-option.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-option.dangerous .context-menu-option__label{color:#f03e3e}.excalidraw .context-menu-option .context-menu-option__label{justify-self:start;margin-inline-end:20px}.excalidraw .context-menu-option .context-menu-option__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-option:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-option:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-option:hover.dangerous .context-menu-option__label{color:var(--popup-bg-color)}.excalidraw .context-menu-option:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-option{display:block}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__label{margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__shortcut{display:none}.excalidraw .context-menu-option-separator{border:none;border-top:1px solid #adb5bd}',""]);const s=a},9482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{display:grid;align-items:center;margin-top:0;grid-template-columns:1fr calc(var(--space-factor)*7);grid-gap:var(--metric);padding:calc(var(--space-factor)*2);text-align:center;font-variant:small-caps;font-size:1.2em}.excalidraw .Dialog__titleContent{flex:1}.excalidraw .Dialog .Modal__close{color:var(--icon-fill-color);margin:0}.excalidraw .Dialog__content{padding:0 16px 16px}.excalidraw--mobile.excalidraw .Dialog{--metric: calc(var(--space-factor) * 4);--inset-left: max(var(--metric), var(--sal));--inset-right: max(var(--metric), var(--sar))}.excalidraw--mobile.excalidraw .Dialog__title{grid-template-columns:calc(var(--space-factor)*7) 1fr calc(var(--space-factor)*7);position:-webkit-sticky;position:sticky;top:0;padding:calc(var(--space-factor)*2);background:var(--island-bg-color);font-size:1.25em;box-sizing:border-box;border-bottom:1px solid var(--button-gray-2);z-index:1}.excalidraw--mobile.excalidraw .Dialog__titleContent{text-align:center}.excalidraw--mobile.excalidraw .Dialog .Island{width:100vw;height:100%;box-sizing:border-box;overflow-y:auto;padding-left:max(calc(var(--padding) * var(--space-factor)), var(--sal));padding-right:max(calc(var(--padding) * var(--space-factor)), var(--sar));padding-bottom:max(calc(var(--padding) * var(--space-factor)), var(--sab))}.excalidraw--mobile.excalidraw .Dialog .Modal__close{order:-1}",""]);const s=a},7955:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o),s=n(7157),l=n.n(s),c=new URL(n(9669),n.b),d=a()(i()),u=l()(c);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+u+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3)}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{width:5rem;height:5rem;margin:0 .2em;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]);const h=d},3195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--space-factor);top:var(--space-factor);right:var(--space-factor);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]);const s=a},2978:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog h3{border-bottom:1px solid var(--button-gray-2);padding-bottom:4px}.excalidraw .HelpDialog--island{border:1px solid var(--button-gray-2);margin-bottom:16px}.excalidraw .HelpDialog--island-title{margin:0;padding:4px;background-color:var(--button-gray-1);text-align:center}.excalidraw .HelpDialog--shortcut{border-top:1px solid var(--button-gray-2)}.excalidraw .HelpDialog--key{word-break:keep-all;border:1px solid var(--button-gray-2);padding:2px 8px;margin:auto 4px;background-color:var(--button-gray-1);border-radius:2px;font-size:.8em;min-height:26px;box-sizing:border-box;display:flex;align-items:center;font-family:inherit}.excalidraw .HelpDialog--header{display:flex;flex-direction:row;justify-content:space-evenly;margin-bottom:32px;padding-bottom:16px}.excalidraw .HelpDialog--btn{border:1px solid var(--link-color);padding:8px 32px;border-radius:4px}.excalidraw .HelpDialog--btn:hover{text-decoration:none}",""]);const s=a},1587:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:6px;text-align:center;color:#868e96;font-size:.8rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2em}.excalidraw .HintViewer>span{padding:.2rem .4rem;background-color:var(--overlay-bg-color);border-radius:4px}",""]);const s=a},9478:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;opacity:.6;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label=transparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label=transparent] .picker-keybinding{color:#000}',""]);const s=a},7369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .Island{--padding: 0;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative}.excalidraw .Island.zen-mode{box-shadow:none}.excalidraw .Island::-webkit-scrollbar{width:10px}.excalidraw .Island::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.excalidraw .Island::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-thumb)}.excalidraw .Island::-webkit-scrollbar-thumb:hover{background-color:var(--color-scrollbar-thumb-hover)}.excalidraw .Island::-webkit-scrollbar-thumb:active{background-color:var(--color-scrollbar-thumb-active)}.excalidraw .App-menu_top .Stack_vertical .Island{min-width:216px}.excalidraw .App-menu_top .Stack_vertical .Stack_horizontal{justify-content:center !important}.excalidraw.excalidraw--view-mode .App-menu_top .Stack_vertical .Island{min-width:auto}",""]);const s=a},1434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.layer-ui__sidebar{position:absolute;top:var(--sat);bottom:var(--sab);right:var(--sar);z-index:5;box-shadow:var(--shadow-island);overflow:hidden;border-radius:var(--border-radius-lg);margin:var(--space-factor);width:calc(302px - var(--space-factor) * 2)}.layer-ui__sidebar .Island{box-shadow:none}.layer-ui__sidebar .ToolIcon__icon{border-radius:var(--border-radius-md)}.layer-ui__sidebar .ToolIcon__icon__close .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;justify-content:center;align-items:center;color:var(--color-text)}.layer-ui__sidebar .Island{--padding: 0;background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{transform:translate(-76px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{transform:translate(76px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center{pointer-events:none}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center>*{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left{margin-bottom:.2em}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto;margin-inline-end:1em}",""]);const s=a},8923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .layer-ui__library{display:flex;align-items:center;justify-content:center}.excalidraw .layer-ui__library .layer-ui__library-header{display:flex;align-items:center;width:100%;margin:2px 0 15px 0}.excalidraw .layer-ui__library .layer-ui__library-header .Spinner{margin-right:1rem}.excalidraw .layer-ui__library .layer-ui__library-header button{margin:0 2px}.excalidraw .layer-ui__sidebar .layer-ui__library{padding:0;height:100%}.excalidraw .layer-ui__sidebar .library-menu-items-container{height:100%;width:100%}.excalidraw .layer-ui__library-message{padding:2em 4em;min-width:200px;display:flex;flex-direction:column;align-items:center}.excalidraw .layer-ui__library-message .Spinner{margin-bottom:1em}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-browse-button{width:80%;min-height:22px;margin:0 auto;margin-top:1rem;padding:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw .library-menu-browse-button--mobile{min-height:22px;margin-left:auto}.excalidraw .library-menu-browse-button--mobile a{padding-right:0}",""]);const s=a},5605:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .library-menu-items-container{display:flex;flex-direction:column;height:100%;padding:.5rem;box-sizing:border-box}.excalidraw .library-menu-items-container .library-actions{width:100%;display:flex;margin-right:auto;align-items:center}.excalidraw .library-menu-items-container .library-actions button .library-actions-counter{position:absolute;right:2px;bottom:2px;border-radius:50%;width:1em;height:1em;padding:1px;font-size:.7rem;background:#fff}.excalidraw .library-menu-items-container .library-actions--remove{background-color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--remove:hover{background-color:#e03131}.excalidraw .library-menu-items-container .library-actions--remove:active{background-color:#c92a2a}.excalidraw .library-menu-items-container .library-actions--remove svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--remove .library-actions-counter{color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--export{background-color:#94d82d}.excalidraw .library-menu-items-container .library-actions--export:hover{background-color:#74b816}.excalidraw .library-menu-items-container .library-actions--export:active{background-color:#66a80f}.excalidraw .library-menu-items-container .library-actions--export svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--export .library-actions-counter{color:#94d82d}.excalidraw .library-menu-items-container .library-actions--publish{background-color:#15aabf}.excalidraw .library-menu-items-container .library-actions--publish:hover{background-color:#1098ad}.excalidraw .library-menu-items-container .library-actions--publish:active{background-color:#0b7285}.excalidraw .library-menu-items-container .library-actions--publish svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--publish label{margin-left:-0.2em;margin-right:1.1em;color:#fff;font-size:.86em}.excalidraw .library-menu-items-container .library-actions--publish .library-actions-counter{color:#15aabf}.excalidraw .library-menu-items-container .library-actions--load{background-color:#228be6}.excalidraw .library-menu-items-container .library-actions--load:hover{background-color:#1c7ed6}.excalidraw .library-menu-items-container .library-actions--load:active{background-color:#1864ab}.excalidraw .library-menu-items-container .library-actions--load svg{color:#fff}.excalidraw .library-menu-items-container__items{flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}",""]);const s=a},5644:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:63px;height:63px}.excalidraw .library-unit--hover{box-shadow:inset 0px 0px 0px 2px #339af0;border-color:#339af0}.excalidraw .library-unit--selected{box-shadow:inset 0px 0px 0px 2px #1971c2;border-color:#1971c2}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;left:2.3rem;bottom:2.3rem}.excalidraw .library-unit__checkbox .Checkbox-box{width:13px;height:13px;border-radius:2px;margin:.5em .5em .2em .2em;background-color:#d0ebff}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{transform:scale(1);animation:library-unit__adder-animation 1s ease-in infinite}.excalidraw .library-unit__adder{position:absolute;left:40%;top:40%;width:2rem;height:2rem;margin-left:-10px;margin-top:-10px;pointer-events:none}.excalidraw .library-unit:hover .library-unit__adder{fill:#1c7ed6}.excalidraw .library-unit:active .library-unit__adder{animation:none;transform:scale(0.8);fill:#000}.excalidraw .library-unit__active{cursor:pointer}@keyframes library-unit__adder-animation{0%{transform:scale(0.85)}50%{transform:scale(1)}100%{transform:scale(0.85)}}",""]);const s=a},6843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.7)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;transform:translateY(10px);animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:0 2px 10px rgba(0,0,0,.25);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@keyframes Modal__content_fade-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.excalidraw .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;align-items:center;justify-content:center}.excalidraw .Modal__close svg{height:calc(var(--space-factor)*5)}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",""]);const s=a},8461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",""]);const s=a},9935:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px}",""]);const s=a},532:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",""]);const s=a},7589:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;padding:0 .8rem;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em;font-style:italic;font-size:14px;display:block}",""]);const s=a},5741:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__sidebar-lock-button{margin-right:.2rem}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon_type_floating .side_lock_icon{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7)}.excalidraw .ToolIcon_type_floating .side_lock_icon svg{transform:scale(-1, 1)}.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.side_lock_icon{background-color:var(--color-primary)}",""]);const s=a},8465:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]);const s=a},5892:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{animation:rotate 1.6s linear infinite;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",""]);const s=a},3874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]);const s=a},2681:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]);const s=a},6759:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]);const s=a},9650:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@keyframes fade-in{from{opacity:0}to{opacity:1}}",""]);const s=a},2044:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon{background-color:var(--button-gray-1)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:hover,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__icon{width:2.5rem;height:2.5rem;color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;height:1em;fill:var(--icon-fill-color);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit}.excalidraw .excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button:hover,.excalidraw .Modal .ToolIcon_type_button:hover,.excalidraw .ToolIcon_type_button:hover{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{visibility:hidden}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_radio:focus-visible+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:focus-visible+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_radio:active+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:active+.ToolIcon__icon{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.5em;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}@media(max-width: 425px){.excalidraw .Shape .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .Shape .ToolIcon__icon svg{height:.8em}}@media(max-width: 760px){.excalidraw .ToolIcon.ToolIcon_type_floating{display:inline-block;position:absolute;right:calc(-2*var(--space-factor));margin-left:0;border-radius:20px 0 0 20px;z-index:1;background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:hover{background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:active{background-color:var(--button-gray-2)}.excalidraw .ToolIcon.ToolIcon_type_floating .ToolIcon__icon{border-radius:inherit}.excalidraw .ToolIcon.ToolIcon_type_floating svg{position:static}.excalidraw .ToolIcon.ToolIcon__library{top:calc(var(--sat) + 100px)}.excalidraw .ToolIcon.ToolIcon__lock{top:calc(var(--sat) + 60px)}.excalidraw .ToolIcon.ToolIcon__penMode{top:calc(var(--sat) + 140px)}}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}",""]);const s=a},9144:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar-container .ToolIcon_type_floating:not(.is-mobile) .ToolIcon__icon{padding:1px;background-color:var(--island-bg-color);box-shadow:1px 3px 4px 0px rgba(0,0,0,.15);border-radius:50%;transition:box-shadow .5s ease,transform .5s ease}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:focus-within+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:focus-within+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .App-toolbar-container .ToolIcon__hidden{box-shadow:none !important;background-color:rgba(0,0,0,0) !important;pointer-events:none !important}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock.ToolIcon_type_floating{margin-left:.1rem}.excalidraw .App-toolbar-container .ToolIcon__library{margin-inline-start:var(--space-factor)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon__icon{box-shadow:none;transform:scale(0.9)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon_type_checkbox:not(:checked):not(:hover):not(:active)+.ToolIcon__icon svg{fill:#adb5bd;color:#adb5bd}.excalidraw .App-toolbar{border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px rgba(0,0,0,.01),1px 1px 5px rgba(0,0,0,.15)}.excalidraw .App-toolbar .ToolIcon:hover{--icon-fill-color: var( --color-primary-contrast-offset, var(--color-primary) );--keybinding-color: var( --color-primary-contrast-offset, var(--color-primary) )}.excalidraw .App-toolbar .ToolIcon:active{--icon-fill-color: #212529;--keybinding-color: #212529}.excalidraw .App-toolbar .ToolIcon .ToolIcon__icon{background:rgba(0,0,0,0);border-radius:var(--border-radius-lg)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw.theme--dark .App-toolbar .ToolIcon:active{--icon-fill-color: #dee2e6;--keybinding-color: #dee2e6}",""]);const s=a},6626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",""]);const s=a},6359:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor);display:flex;justify-content:flex-end;overflow:hidden;border-radius:60px}.excalidraw .UserList:empty{display:none}.excalidraw .UserList.layout-vertical{grid-column:3;flex-direction:column-reverse;position:absolute;top:60px;right:var(--space-factor);max-height:calc(\n 100vh - var(--space-factor) - 60px - 60px +\n var(--itemOffset)\n );padding-bottom:max(var(--itemOffset)*-1,0px)}.excalidraw .UserList.layout-vertical .Avatar{width:2.4rem;height:2.4rem}.excalidraw .UserList>*{pointer-events:all}.excalidraw .UserList.layout-vertical>*{margin-bottom:var(--itemOffset)}.excalidraw .UserList.layout-horizontal>*{margin-right:var(--itemOffset)}.excalidraw .UserList_mobile{padding:0;justify-content:normal}.excalidraw .UserList_mobile>*{margin:0 var(--space-factor) var(--space-factor) 0}",""]);const s=a},9915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}",""]);const s=a},9310:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o),s=n(7157),l=n.n(s),c=new URL(n(7984),n.b),d=new URL(n(1639),n.b),u=a()(i()),h=l()(c),p=l()(d);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: #868e96;--dropdown-icon: url("+h+");--focus-highlight-color: #a5d8ff;--icon-fill-color: #212529;--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: #adb5bd;--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0 0 0 1px rgba(0, 0, 0, 0.01), 1px 1px 5px rgb(0 0 0 / 12%);--space-factor: 0.25rem;--text-primary-color: #343a40;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e2e1fc;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}.excalidraw.theme--dark{background:#000}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: #212529;--dropdown-icon: url("+p+');--focus-highlight-color: #228be6;--icon-fill-color: #ced4da;--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: rgba(30, 30, 30, 0.98);--keybinding-color: #868e96;--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #635c5c;--select-highlight-color: #4dabf7;--shadow-island: 1px 1px 5px rgba(0, 0, 0, 0.3);--text-primary-color: #ced4da;--color-primary: #5650f0;--color-primary-darker: #4b46d8;--color-primary-darkest: #3e39be;--color-primary-light: #3f3d64}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin-top:.333rem;margin-bottom:.333rem;font-size:.75rem;color:var(--text-primary-color);font-weight:bold;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn h3:first-child,.excalidraw .panelColumn legend:first-child,.excalidraw .panelColumn .control-label:first-child{margin-top:0}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap}.excalidraw .panelColumn .buttonList label{margin-right:.25rem;font-size:.75rem;display:inline-block}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn .buttonList .ToolIcon{margin:0;margin-inline-end:8px}.excalidraw .panelColumn .buttonList .ToolIcon:focus{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .panelColumn .buttonList .ToolIcon:hover{background-color:var(--button-gray-2)}.excalidraw .panelColumn .buttonList .ToolIcon:active{background-color:var(--button-gray-3)}.excalidraw .panelColumn .buttonList .ToolIcon:disabled{cursor:not-allowed}.excalidraw .panelColumn .buttonList .ToolIcon__icon{width:28px;height:28px}.excalidraw .panelColumn fieldset{margin:0;margin-top:.333rem;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button,.excalidraw .buttonList label{-webkit-user-select:none;user-select:none;background-color:var(--button-gray-1);border:0;border-radius:var(--border-radius-md);margin:.125rem 0;padding:.25rem;white-space:nowrap;cursor:pointer}.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button:hover,.excalidraw .buttonList label:hover{background-color:var(--button-gray-2)}.excalidraw button:active,.excalidraw .buttonList label:active{background-color:var(--button-gray-3)}.excalidraw button:disabled,.excalidraw .buttonList label:disabled{cursor:not-allowed}.excalidraw .active,.excalidraw .buttonList label.active{background-color:var(--color-primary);--icon-fill-color: #ffffff}.excalidraw .active:hover,.excalidraw .buttonList label.active:hover{background-color:var(--color-primary-darker)}.excalidraw .active:active,.excalidraw .buttonList label.active:active{background-color:var(--color-primary-darkest)}.excalidraw .buttonList.buttonListIcon label{display:inline-flex;justify-content:center;align-items:center}.excalidraw .buttonList.buttonListIcon label svg{width:35px;height:14px;padding:2px;opacity:.6}.excalidraw .buttonList.buttonListIcon label.active svg{opacity:1}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:grid;grid-template-columns:1fr -webkit-max-content 1fr;grid-template-columns:1fr max-content 1fr}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%;box-sizing:border-box}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .App-menu_top{grid-template-columns:auto -webkit-max-content auto;grid-template-columns:auto max-content auto;grid-gap:4px;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top>*{pointer-events:all}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:0;grid-template-columns:-webkit-min-content auto -webkit-min-content;grid-template-columns:min-content auto min-content;grid-gap:15px;align-items:flex-start;cursor:default;pointer-events:none !important}:root[dir=ltr] .excalidraw .App-menu_bottom{left:.25rem}:root[dir=rtl] .excalidraw .App-menu_bottom{right:.25rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;box-shadow:var(--shadow-island)}.excalidraw .dropdown-select{height:1.5rem;padding:0;padding-inline-start:.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .zIndexButton{margin:0;margin-inline-end:8px;padding:5px;display:inline-flex;align-items:center;justify-content:center}.excalidraw .zIndexButton svg{width:18px;height:18px}.excalidraw .scroll-back-to-content{color:var(--popup-text-color);position:absolute;left:50%;bottom:30px;transform:translateX(-50%);padding:10px 20px;pointer-events:all}.excalidraw .help-icon{display:flex;cursor:pointer;fill:#868e96;padding:0;margin:0;background:none;color:var(--icon-fill-color)}.excalidraw .help-icon svg{width:1.5rem;height:1.5rem}.excalidraw .help-icon:hover{background:none}.excalidraw .reset-zoom-button{padding:.2em;background:rgba(0,0,0,0);color:var(--text-primary-color);font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:5px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--button-gray-2);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--button-gray-3)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--button-gray-2)}.excalidraw .HomeButton.ToolIcon.ToolIcon_type_floating{display:inline-block;position:absolute;top:60px;left:calc(-2*var(--space-factor));right:auto;border-radius:0 20px 20px 0;background-color:var(--button-gray-1)}.excalidraw .HomeButton.ToolIcon.ToolIcon_type_floating:hover{background-color:var(--button-gray-1)}.excalidraw .HomeButton.ToolIcon.ToolIcon_type_floating:active{background-color:var(--button-gray-2)}.excalidraw .HomeButton.ToolIcon.ToolIcon_type_floating .ToolIcon__icon{border-radius:inherit}.excalidraw .HomeButton.ToolIcon.ToolIcon_type_floating svg{position:static}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',""]);const g=u},6464:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,"",""]),a.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"};const s=a},5260:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5370),i=n.n(r),o=n(769),a=n.n(o)()(i());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]);const s=a},741:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.d(t,{Z:()=>i})},3868:(e,t)=>{var n;n=function(e){e.version="0.3.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n="undefined"!=typeof Buffer;function r(e){for(var n=-1,r=0,i=e.length-7;r<i;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])];for(;r<i+7;)n=n>>>8^t[255&(n^e[r++])];return-1^n}e.table=t,e.bstr=function(e){if(e.length>32768&&n)return r(new Buffer(e));for(var i=-1,o=e.length-1,a=0;a<o;)i=t[255&(i^e.charCodeAt(a++))]^i>>>8,i=t[255&(i^e.charCodeAt(a++))]^i>>>8;return a===o&&(i=i>>>8^t[255&(i^e.charCodeAt(a))]),-1^i},e.buf=function(e){if(e.length>1e4)return r(e);for(var n=-1,i=0,o=e.length-3;i<o;)n=(n=(n=(n=n>>>8^t[255&(n^e[i++])])>>>8^t[255&(n^e[i++])])>>>8^t[255&(n^e[i++])])>>>8^t[255&(n^e[i++])];for(;i<o+3;)n=n>>>8^t[255&(n^e[i++])];return-1^n},e.str=function(e){for(var n,r,i=-1,o=0,a=e.length;o<a;)(n=e.charCodeAt(o++))<128?i=i>>>8^t[255&(i^n)]:n<2048?i=(i=i>>>8^t[255&(i^(192|n>>6&31))])>>>8^t[255&(i^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),r=1023&e.charCodeAt(o++),i=(i=(i=(i=i>>>8^t[255&(i^(240|n>>8&7))])>>>8^t[255&(i^(128|n>>2&63))])>>>8^t[255&(i^(128|r>>6&15|3&n))])>>>8^t[255&(i^(128|63&r))]):i=(i=(i=i>>>8^t[255&(i^(224|n>>12&15))])>>>8^t[255&(i^(128|n>>6&63))])>>>8^t[255&(i^(128|63&n))];return-1^i}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})},6131:(e,t,n)=>{"use strict";n.d(t,{zt:()=>P,cn:()=>B,Vv:()=>_,KO:()=>W});var r=n(9787);const i=Symbol(),o=e=>!!e[i],a=e=>{var t,n;null==(n=(t=e[i]).c)||n.call(t)},s=(e,t)=>{const n=e[i].o,r=t[i].o;return n===r||e===r||o(n)&&s(n,t)},l=e=>{const t={o:e,c:null},n=new Promise((n=>{t.c=()=>{t.c=null,n()},e.then(t.c,t.c)}));return n[i]=t,n};var c=Object.defineProperty,d=Object.defineProperties,u=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const m=e=>"init"in e,b="r",v="w",x="c",y="s",w=e=>{const t=new WeakMap,n=new WeakMap,r=new Map;let c,w;if(c=new Set,w=new Set,e)for(const[n,r]of e){const e={v:r,r:0,d:new Map};Object.freeze(e),m(n)||console.warn("Found initial value for derived atom which can cause unexpected behavior",n),t.set(n,e)}const _=new WeakMap,k=new WeakMap,E=e=>{let t=k.get(e);return t||(t=new Map,k.set(e,t)),t},C=(e,n)=>{if(e){const t=E(e);let r=t.get(n);return r||(r=C(e.p,n),r&&("p"in r&&r.p.then((()=>t.delete(n))),t.set(n,r))),r}return t.get(n)},S=(e,n,i)=>{if(Object.freeze(i),e){E(e).set(n,i)}else{const e=t.get(n);t.set(n,i),r.has(n)||r.set(n,e)}},I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=arguments.length>2?arguments[2]:void 0;if(!n)return t;const r=new Map;let i=!1;return n.forEach((n=>{var o;const a=(null==(o=C(e,n))?void 0:o.r)||0;r.set(n,a),t.get(n)!==a&&(i=!0)})),t.size!==r.size||i?r:t},T=(e,t,n,r,i)=>{const o=C(e,t);if(o){if(i&&(!("p"in o)||!s(o.p,i)))return o;"p"in o&&a(o.p)}const l={v:n,r:(null==o?void 0:o.r)||0,d:I(e,null==o?void 0:o.d,r)};return o&&"v"in o&&Object.is(o.v,n)?l.d===o.d||l.d.size===o.d.size&&Array.from(l.d.keys()).every((e=>o.d.has(e)))||Promise.resolve().then((()=>{U(e)})):(++l.r,l.d.has(t)&&(l.d=new Map(l.d).set(t,l.r))),S(e,t,l),l},j=(e,t,n,r,i)=>{const o=C(e,t);if(o){if(i&&(!("p"in o)||!s(o.p,i)))return o;"p"in o&&a(o.p)}const l={e:n,r:(null==o?void 0:o.r)||0,d:I(e,null==o?void 0:o.d,r)};return S(e,t,l),l},M=(e,t,n,r)=>{const i=C(e,t);if(i&&"p"in i){if(s(i.p,n))return i;a(i.p)}((e,t,n)=>{let r=_.get(t);r||(r=new Map,_.set(t,r)),n.then((()=>{r.get(e)===n&&(r.delete(e),r.size||_.delete(t))})),r.set(e,n)})(e,t,n);const o={p:n,r:(null==i?void 0:i.r)||0,d:I(e,null==i?void 0:i.d,r)};return S(e,t,o),o},L=(e,t,n,r)=>{if(n instanceof Promise){const i=l(n.then((n=>{T(e,t,n,r,i),U(e)})).catch((n=>{if(n instanceof Promise)return o(n)?n.then((()=>{A(e,t,!0)})):n;j(e,t,n,r,i),U(e)})));return M(e,t,i,r)}return T(e,t,n,r)},O=(e,t)=>{const n=C(e,t);if(n){"p"in n&&a(n.p);const o=(r=((e,t)=>{for(var n in t||(t={}))p.call(t,n)&&f(e,n,t[n]);if(h)for(var n of h(t))g.call(t,n)&&f(e,n,t[n]);return e})({},n),i={i:n.r},d(r,u(i)));S(e,t,o)}else console.warn("[Bug] could not invalidate non existing atom",t);var r,i},A=(e,t,r)=>{if(!r){const r=C(e,t);if(r){if(r.r!==r.i&&"p"in r&&r.p[i].c)return r;if(r.d.forEach(((r,i)=>{if(i!==t)if(n.has(i)){const t=C(e,i);t&&t.r===t.i&&A(e,i)}else A(e,i)})),Array.from(r.d).every((t=>{let[n,r]=t;const i=C(e,n);return i&&"v"in i&&i.r===r})))return r}}const o=new Set;try{const n=t.read((n=>{o.add(n);const r=n===t?C(e,n):A(e,n);if(r){if("e"in r)throw r.e;if("p"in r)throw r.p;return r.v}if(m(n))return n.init;throw new Error("no atom init")}));return L(e,t,n,o)}catch(n){if(n instanceof Promise){const r=l(n);return M(e,t,r,o)}return j(e,t,n,o)}},D=(e,t)=>A(t,e),z=(e,t)=>!t.l.size&&(!t.t.size||1===t.t.size&&t.t.has(e)),P=(e,t)=>{const r=n.get(t);null==r||r.t.forEach((n=>{n!==t&&(O(e,n),P(e,n))}))},R=(e,t,n)=>{let r=!0;const i=(t,n)=>{const r=A(e,t);if("e"in r)throw r.e;if("p"in r){if(null==n?void 0:n.unstable_promise)return r.p.then((()=>i(t,n)));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",t),r.p}if("v"in r)return r.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",t),new Error("no value found")},o=t.write(i,((n,i)=>{let o;if(n===t){if(!m(n))throw new Error("atom not writable");const t=(e=>{const t=new Set,n=_.get(e);return n&&(_.delete(e),n.forEach(((e,n)=>{a(e),t.add(n)}))),t})(n);t.forEach((t=>{t!==e&&L(t,n,i)})),L(e,n,i),P(e,n)}else o=R(e,n,i);return r||U(e),o}),n);return r=!1,e=void 0,o},B=(e,t,n)=>{const r=R(n,e,t);return U(n),r},N=(e,t)=>{const r={t:new Set(t&&[t]),l:new Set};n.set(e,r),w.add(e);if(A(void 0,e).d.forEach(((t,r)=>{const i=n.get(r);i?i.t.add(e):r!==e&&N(r,e)})),(e=>!!e.write)(e)&&e.onMount){const t=t=>B(e,t),n=e.onMount(t);n&&(r.u=n)}return r},H=e=>{var t;const r=null==(t=n.get(e))?void 0:t.u;r&&r(),n.delete(e),w.delete(e);const i=C(void 0,e);i?i.d.forEach(((t,r)=>{if(r!==e){const t=n.get(r);t&&(t.t.delete(e),z(r,t)&&H(r))}})):console.warn("[Bug] could not find atom state to unmount",e)},W=(e,t,r)=>{const i=new Set(t.d.keys());null==r||r.forEach(((t,r)=>{if(i.has(r))return void i.delete(r);const o=n.get(r);o&&(o.t.delete(e),z(r,o)&&H(r))})),i.forEach((t=>{const r=n.get(t);r?r.t.add(e):n.has(e)&&N(t,e)}))},U=e=>{if(e){E(e).forEach(((r,i)=>{if(r!==t.get(i)){const t=n.get(i);null==t||t.l.forEach((t=>t(e)))}}))}else{for(;r.size;){const e=Array.from(r);r.clear(),e.forEach((e=>{let[t,r]=e;const i=C(void 0,t);i&&i.d!==(null==r?void 0:r.d)&&W(t,i,null==r?void 0:r.d);const o=n.get(t);null==o||o.l.forEach((e=>e()))}))}c.forEach((e=>e()))}},F=(e,n)=>{n&&(e=>{E(e).forEach(((e,n)=>{const r=t.get(n);(e.r>((null==r?void 0:r.r)||0)||"v"in e&&e.r===(null==r?void 0:r.r)&&e.d!==(null==r?void 0:r.d))&&(t.set(n,e),e.d!==(null==r?void 0:r.d)&&W(n,e,null==r?void 0:r.d))}))})(n),U(void 0)},K=(e,t)=>{const r=(e=>{let t=n.get(e);return t||(t=N(e)),t})(e).l;return r.add(t),()=>{r.delete(t),(e=>{const t=n.get(e);t&&z(e,t)&&H(e)})(e)}},V=(e,t)=>{for(const[n,r]of e)m(n)&&(L(t,n,r),P(t,n));U(t)};return{[b]:D,[v]:B,[x]:F,[y]:K,h:V,n:e=>(c.add(e),()=>{c.delete(e)}),l:()=>w.values(),a:e=>t.get(e),m:e=>n.get(e)}},_=e=>{const t=w(e),n=e=>new Promise(((r,i)=>{const o=t.r(e);"e"in o?i(o.e):r("p"in o?o.p.then((()=>n(e))):o.v)}));return{get:e=>{const n=t.r(e);if("e"in n)throw n.e;if(!("p"in n))return n.v},asyncGet:n,set:(e,n)=>t.w(e,n),sub:(e,n)=>t.s(e,n),SECRET_INTERNAL_store:t}},k=(e,t)=>({s:t?t(e).SECRET_INTERNAL_store:w(e)}),E=new Map,C=e=>(E.has(e)||E.set(e,(0,r.createContext)(k())),E.get(e));var S=Object.defineProperty,I=Object.defineProperties,T=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,O=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||(t={}))M.call(t,n)&&O(e,n,t[n]);if(j)for(var n of j(t))L.call(t,n)&&O(e,n,t[n]);return e};const D=e=>e.debugLabel||e.toString(),z=e=>{let[t,n]=e;return Object.fromEntries(n.flatMap((e=>{var n,r;const i=null==(n=t.m)?void 0:n.call(t,e);if(!i)return[];const o=i.t,a=(null==(r=t.a)?void 0:r.call(t,e))||{};return[[D(e),(s=A(A(A({},"e"in a&&{error:a.e}),"p"in a&&{promise:a.p}),"v"in a&&{value:a.v}),l={dependents:Array.from(o).map(D)},I(s,T(l)))]];var s,l})))},P=e=>{let{children:t,initialValues:n,scope:i,unstable_createStore:o,unstable_enableVersionedWrite:a}=e;const[s,l]=(0,r.useState)();(0,r.useEffect)((()=>{s&&(c.current.s.c(null,s),delete s.p)}),[s]);const c=(0,r.useRef)();c.current||(c.current=k(n,o),a&&(c.current.w=e=>{l((t=>{const n=t?{p:t}:{};return e(n),n}))})),a||(e=>{const{s:t}=e,[n,i]=(0,r.useState)([]);(0,r.useEffect)((()=>{var e;const n=()=>{var e;i(Array.from((null==(e=t.l)?void 0:e.call(t))||[]))},r=null==(e=t.n)?void 0:e.call(t,n);return n(),r}),[t]),(0,r.useDebugValue)([t,n],z)})(c.current);const d=C(i);return(0,r.createElement)(d.Provider,{value:c.current},t)};let R=0;function B(e,t){const n="atom".concat(++R),r={toString:()=>n};return"function"==typeof e?r.read=e:(r.init=e,r.read=e=>e(r),r.write=(e,t,n)=>t(r,"function"==typeof n?n(e(r)):n)),t&&(r.write=t),r}function N(e,t){const n=C(t),{s:i}=(0,r.useContext)(n),o=(0,r.useCallback)((t=>{const n=i.r(e,t);if("e"in n)throw n.e;if("p"in n)throw n.p;if("v"in n)return n.v;throw new Error("no atom value")}),[i,e]),[[a,s,l],c]=(0,r.useReducer)((0,r.useCallback)(((t,n)=>{const r=o(n);return Object.is(t[1],r)&&t[2]===e?t:[n,r,e]}),[o,e]),void 0,(()=>{const t=void 0;return[t,o(t),e]}));return l!==e&&c(void 0),(0,r.useEffect)((()=>{const t=i.s(e,c);return c(void 0),t}),[i,e]),(0,r.useEffect)((()=>{i.c(e,a)})),(0,r.useDebugValue)(s),s}function H(e,t){const n=C(t),{s:i,w:o}=(0,r.useContext)(n);return(0,r.useCallback)((t=>{if(!("write"in e))throw new Error("not writable atom");const n=n=>i.w(e,t,n);return o?o(n):n()}),[i,o,e])}function W(e,t){return"scope"in e&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),t=e.scope),[N(e,t),H(e,t)]}},8409:(e,t,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype.toString,p=Math.max,g=Math.min,f=function(){return u.Date.now()};function m(e,t,n){var i,o,a,s,l,c,d=0,u=!1,h=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function x(t){var n=i,r=o;return i=o=void 0,d=t,s=e.apply(r,n)}function y(e){return d=e,l=setTimeout(_,t),u?x(e):s}function w(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-d>=a}function _(){var e=f();if(w(e))return k(e);l=setTimeout(_,function(e){var n=t-(e-c);return h?g(n,a-(e-d)):n}(e))}function k(e){return l=void 0,m&&i?x(e):(i=o=void 0,s)}function E(){var e=f(),n=w(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return y(c);if(h)return l=setTimeout(_,t),x(c)}return void 0===l&&(l=setTimeout(_,t)),s}return t=v(t)||0,b(n)&&(u=!!n.leading,a=(h="maxWait"in n)?p(v(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),E.cancel=function(){void 0!==l&&clearTimeout(l),d=0,i=c=o=l=void 0},E.flush=function(){return void 0===l?s:k(f())},E}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},6963:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,c=32,d=64,u=128,h=256,p=1/0,g=9007199254740991,f=NaN,m=4294967295,b=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",d],["rearg",h]],v="[object Arguments]",x="[object Array]",y="[object Boolean]",w="[object Date]",_="[object Error]",k="[object Function]",E="[object GeneratorFunction]",C="[object Map]",S="[object Number]",I="[object Object]",T="[object Promise]",j="[object RegExp]",M="[object Set]",L="[object String]",O="[object Symbol]",A="[object WeakMap]",D="[object ArrayBuffer]",z="[object DataView]",P="[object Float32Array]",R="[object Float64Array]",B="[object Int8Array]",N="[object Int16Array]",H="[object Int32Array]",W="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",K="[object Uint32Array]",V=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,Z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,q=RegExp(G.source),J=RegExp(X.source),Q=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,xe=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['’]",Le="[\\ud800-\\udfff]",Oe="["+je+"]",Ae="["+Ee+"]",De="\\d+",ze="[\\u2700-\\u27bf]",Pe="["+Se+"]",Re="[^\\ud800-\\udfff"+je+De+Ce+Se+Ie+"]",Be="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ie+"]",Fe="(?:"+Pe+"|"+Re+")",Ke="(?:"+Ue+"|"+Re+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",Ye="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Ae+"|"+Be+")"+"?",Ge="[\\ufe0e\\ufe0f]?",Xe=Ge+Ze+("(?:\\u200d(?:"+[Ne,He,We].join("|")+")"+Ge+Ze+")*"),qe="(?:"+[ze,He,We].join("|")+")"+Xe,Je="(?:"+[Ne+Ae+"?",Ae,He,We,Le].join("|")+")",Qe=RegExp(Me,"g"),$e=RegExp(Ae,"g"),et=RegExp(Be+"(?="+Be+")|"+Je+Xe,"g"),tt=RegExp([Ue+"?"+Pe+"+"+Ve+"(?="+[Oe,Ue,"$"].join("|")+")",Ke+"+"+Ye+"(?="+[Oe,Ue+Fe,"$"].join("|")+")",Ue+"?"+Fe+"+"+Ve,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,qe].join("|"),"g"),nt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+Te+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,at={};at[P]=at[R]=at[B]=at[N]=at[H]=at[W]=at[U]=at[F]=at[K]=!0,at[v]=at[x]=at[D]=at[y]=at[z]=at[w]=at[_]=at[k]=at[C]=at[S]=at[I]=at[j]=at[M]=at[L]=at[A]=!1;var st={};st[v]=st[x]=st[D]=st[z]=st[y]=st[w]=st[P]=st[R]=st[B]=st[N]=st[H]=st[C]=st[S]=st[I]=st[j]=st[M]=st[L]=st[O]=st[W]=st[U]=st[F]=st[K]=!0,st[_]=st[k]=st[A]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ut||ht||Function("return this")(),gt=t&&!t.nodeType&&t,ft=gt&&e&&!e.nodeType&&e,mt=ft&&ft.exports===gt,bt=mt&&ut.process,vt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),xt=vt&&vt.isArrayBuffer,yt=vt&&vt.isDate,wt=vt&&vt.isMap,_t=vt&&vt.isRegExp,kt=vt&&vt.isSet,Et=vt&&vt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Lt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function At(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Dt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function zt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Bt=Vt("length");function Nt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Wt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,Ft,n)}function Ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ft(e){return e!=e}function Kt(e,t){var n=null==e?0:e.length;return n?Gt(e,t)/n:f}function Vt(e){return function(t){return null==t?i:t[e]}}function Yt(e){return function(t){return null==e?i:e[t]}}function Zt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Gt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function qt(e){return e?e.slice(0,fn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return At(t,(function(t){return e[t]}))}function $t(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Yt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),on=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+lt[e]}function sn(e){return nt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return sn(e)?function(e){var t=et.lastIndex=0;for(;et.test(e);)++t;return t}(e):Bt(e)}function gn(e){return sn(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var mn=Yt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var bn=function e(t){var n,r=(t=null==t?pt:bn.defaults(pt.Object(),t,bn.pick(pt,it))).Array,se=t.Date,Ee=t.Error,Ce=t.Function,Se=t.Math,Ie=t.Object,Te=t.RegExp,je=t.String,Me=t.TypeError,Le=r.prototype,Oe=Ce.prototype,Ae=Ie.prototype,De=t["__core-js_shared__"],ze=Oe.toString,Pe=Ae.hasOwnProperty,Re=0,Be=(n=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ne=Ae.toString,He=ze.call(Ie),We=pt._,Ue=Te("^"+ze.call(Pe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=mt?t.Buffer:i,Ke=t.Symbol,Ve=t.Uint8Array,Ye=Fe?Fe.allocUnsafe:i,Ze=cn(Ie.getPrototypeOf,Ie),Ge=Ie.create,Xe=Ae.propertyIsEnumerable,qe=Le.splice,Je=Ke?Ke.isConcatSpreadable:i,et=Ke?Ke.iterator:i,nt=Ke?Ke.toStringTag:i,lt=function(){try{var e=go(Ie,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=se&&se.now!==pt.Date.now&&se.now,gt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ft=Se.ceil,bt=Se.floor,vt=Ie.getOwnPropertySymbols,Bt=Fe?Fe.isBuffer:i,Yt=t.isFinite,vn=Le.join,xn=cn(Ie.keys,Ie),yn=Se.max,wn=Se.min,_n=se.now,kn=t.parseInt,En=Se.random,Cn=Le.reverse,Sn=go(t,"DataView"),In=go(t,"Map"),Tn=go(t,"Promise"),jn=go(t,"Set"),Mn=go(t,"WeakMap"),Ln=go(Ie,"create"),On=Mn&&new Mn,An={},Dn=Wo(Sn),zn=Wo(In),Pn=Wo(Tn),Rn=Wo(jn),Bn=Wo(Mn),Nn=Ke?Ke.prototype:i,Hn=Nn?Nn.valueOf:i,Wn=Nn?Nn.toString:i;function Un(e){if(is(e)&&!Za(e)&&!(e instanceof Yn)){if(e instanceof Vn)return e;if(Pe.call(e,"__wrapped__"))return Uo(e)}return new Vn(e)}var Fn=function(){function e(){}return function(t){if(!rs(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Kn(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Xn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Qn(e,t){var n=Za(e),r=!n&&Ya(e),i=!n&&!r&&Ja(e),o=!n&&!r&&!i&&hs(e),a=n||r||i||o,s=a?Xt(e.length,je):[],l=s.length;for(var c in e)!t&&!Pe.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wo(c,l))||s.push(c);return s}function $n(e){var t=e.length;return t?e[qr(0,t-1)]:i}function er(e,t){return Bo(Li(e),cr(t,0,e.length))}function tr(e){return Bo(Li(e))}function nr(e,t,n){(n!==i&&!Fa(e[t],n)||n===i&&!(t in e))&&sr(e,t,n)}function rr(e,t,n){var r=e[t];Pe.call(e,t)&&Fa(r,n)&&(n!==i||t in e)||sr(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function or(e,t,n,r){return gr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Oi(t,Ds(t),e)}function sr(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lr(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:js(e,t[n]);return a}function cr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function dr(e,t,n,r,o,a){var s,l=1&t,c=2&t,d=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!rs(e))return e;var u=Za(e);if(u){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Li(e,s)}else{var h=bo(e),p=h==k||h==E;if(Ja(e))return Ci(e,l);if(h==I||h==v||p&&!o){if(s=c||p?{}:xo(e),!l)return c?function(e,t){return Oi(e,mo(e),t)}(e,function(e,t){return e&&Oi(t,zs(t),e)}(s,e)):function(e,t){return Oi(e,fo(e),t)}(e,ar(s,e))}else{if(!st[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case D:return Si(e);case y:case w:return new r(+e);case z:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case R:case B:case N:case H:case W:case U:case F:case K:return Ii(e,n);case C:case M:return new r;case S:case L:return new r(e);case j:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return i=e,Hn?Ie(Hn.call(i)):{}}var i}(e,h,l)}}a||(a=new Jn);var g=a.get(e);if(g)return g;a.set(e,s),cs(e)?e.forEach((function(r){s.add(dr(r,t,n,r,e,a))})):os(e)&&e.forEach((function(r,i){s.set(i,dr(r,t,n,i,e,a))}));var f=u?i:(d?c?ao:oo:c?zs:Ds)(e);return It(f||e,(function(r,i){f&&(r=e[i=r]),rr(s,i,dr(r,t,n,i,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ie(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function hr(e,t,n){if("function"!=typeof e)throw new Me(o);return Do((function(){e.apply(i,n)}),t)}function pr(e,t,n,r){var i=-1,o=Lt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=At(t,Jt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=$t,a=!1,t=new qn(t));e:for(;++i<s;){var d=e[i],u=null==n?d:n(d);if(d=r||0!==d?d:0,a&&u==u){for(var h=c;h--;)if(t[h]===u)continue e;l.push(d)}else o(t,u,r)||l.push(d)}return l}Un.templateSettings={escape:Q,evaluate:$,interpolate:ee,variable:"",imports:{_:Un}},Un.prototype=Kn.prototype,Un.prototype.constructor=Un,Vn.prototype=Fn(Kn.prototype),Vn.prototype.constructor=Vn,Yn.prototype=Fn(Kn.prototype),Yn.prototype.constructor=Yn,Zn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},Zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Zn.prototype.get=function(e){var t=this.__data__;if(Ln){var n=t[e];return n===a?i:n}return Pe.call(t,e)?t[e]:i},Zn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==i:Pe.call(t,e)},Zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===i?a:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return ir(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Xn.prototype.clear=function(){this.size=0,this.__data__={hash:new Zn,map:new(In||Gn),string:new Zn}},Xn.prototype.delete=function(e){var t=ho(this,e).delete(e);return this.size-=t?1:0,t},Xn.prototype.get=function(e){return ho(this,e).get(e)},Xn.prototype.has=function(e){return ho(this,e).has(e)},Xn.prototype.set=function(e,t){var n=ho(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!In||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Xn(r)}return n.set(e,t),this.size=n.size,this};var gr=zi(_r),fr=zi(kr,!0);function mr(e,t){var n=!0;return gr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function br(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(l===i?s==s&&!us(s):n(s,l)))var l=s,c=a}return c}function vr(e,t){var n=[];return gr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function xr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?xr(s,t-1,n,r,i):Dt(i,s):r||(i[i.length]=s)}return i}var yr=Pi(),wr=Pi(!0);function _r(e,t){return e&&yr(e,t,Ds)}function kr(e,t){return e&&wr(e,t,Ds)}function Er(e,t){return Mt(t,(function(t){return es(e[t])}))}function Cr(e,t){for(var n=0,r=(t=wi(t,e)).length;null!=e&&n<r;)e=e[Ho(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return Za(e)?r:Dt(r,n(e))}function Ir(e){return null==e?e===i?"[object Undefined]":"[object Null]":nt&&nt in Ie(e)?function(e){var t=Pe.call(e,nt),n=e[nt];try{e[nt]=i;var r=!0}catch(e){}var o=Ne.call(e);r&&(t?e[nt]=n:delete e[nt]);return o}(e):function(e){return Ne.call(e)}(e)}function Tr(e,t){return e>t}function jr(e,t){return null!=e&&Pe.call(e,t)}function Mr(e,t){return null!=e&&t in Ie(e)}function Lr(e,t,n){for(var o=n?Ot:Lt,a=e[0].length,s=e.length,l=s,c=r(s),d=1/0,u=[];l--;){var h=e[l];l&&t&&(h=At(h,Jt(t))),d=wn(h.length,d),c[l]=!n&&(t||a>=120&&h.length>=120)?new qn(l&&h):i}h=e[0];var p=-1,g=c[0];e:for(;++p<a&&u.length<d;){var f=h[p],m=t?t(f):f;if(f=n||0!==f?f:0,!(g?$t(g,m):o(u,m,n))){for(l=s;--l;){var b=c[l];if(!(b?$t(b,m):o(e[l],m,n)))continue e}g&&g.push(m),u.push(f)}}return u}function Or(e,t,n){var r=null==(e=Mo(e,t=wi(t,e)))?e:e[Ho($o(t))];return null==r?i:Ct(r,e,n)}function Ar(e){return is(e)&&Ir(e)==v}function Dr(e,t,n,r,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Za(e),l=Za(t),c=s?x:bo(e),d=l?x:bo(t),u=(c=c==v?I:c)==I,h=(d=d==v?I:d)==I,p=c==d;if(p&&Ja(e)){if(!Ja(t))return!1;s=!0,u=!1}if(p&&!u)return a||(a=new Jn),s||hs(e)?ro(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case z:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case y:case w:case S:return Fa(+e,+t);case _:return e.name==t.name&&e.message==t.message;case j:case L:return e==t+"";case C:var s=ln;case M:var l=1&r;if(s||(s=un),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var d=ro(s(e),s(t),r,i,o,a);return a.delete(e),d;case O:if(Hn)return Hn.call(e)==Hn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var g=u&&Pe.call(e,"__wrapped__"),f=h&&Pe.call(t,"__wrapped__");if(g||f){var m=g?e.value():e,b=f?t.value():t;return a||(a=new Jn),o(m,b,n,r,a)}}if(!p)return!1;return a||(a=new Jn),function(e,t,n,r,o,a){var s=1&n,l=oo(e),c=l.length,d=oo(t).length;if(c!=d&&!s)return!1;var u=c;for(;u--;){var h=l[u];if(!(s?h in t:Pe.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var f=!0;a.set(e,t),a.set(t,e);var m=s;for(;++u<c;){var b=e[h=l[u]],v=t[h];if(r)var x=s?r(v,b,h,t,e,a):r(b,v,h,e,t,a);if(!(x===i?b===v||o(b,v,n,r,a):x)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,o,a)}(e,t,n,r,Dr,o))}function zr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ie(e);o--;){var l=n[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=n[o])[0],d=e[c],u=l[1];if(s&&l[2]){if(d===i&&!(c in e))return!1}else{var h=new Jn;if(r)var p=r(d,u,c,e,t,h);if(!(p===i?Dr(u,d,3,r,h):p))return!1}}return!0}function Pr(e){return!(!rs(e)||(t=e,Be&&Be in t))&&(es(e)?Ue:ve).test(Wo(e));var t}function Rr(e){return"function"==typeof e?e:null==e?al:"object"==typeof e?Za(e)?Fr(e[0],e[1]):Ur(e):fl(e)}function Br(e){if(!So(e))return xn(e);var t=[];for(var n in Ie(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nr(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Ie(e))t.push(n);return t}(e);var t=So(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}function Hr(e,t){return e<t}function Wr(e,t){var n=-1,i=Xa(e)?r(e.length):[];return gr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Ur(e){var t=po(e);return 1==t.length&&t[0][2]?To(t[0][0],t[0][1]):function(n){return n===e||zr(n,e,t)}}function Fr(e,t){return ko(e)&&Io(t)?To(Ho(e),t):function(n){var r=js(n,e);return r===i&&r===t?Ms(n,e):Dr(t,r,3)}}function Kr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Jn),rs(a))!function(e,t,n,r,o,a,s){var l=Oo(e,n),c=Oo(t,n),d=s.get(c);if(d)return void nr(e,n,d);var u=a?a(l,c,n+"",e,t,s):i,h=u===i;if(h){var p=Za(c),g=!p&&Ja(c),f=!p&&!g&&hs(c);u=c,p||g||f?Za(l)?u=l:qa(l)?u=Li(l):g?(h=!1,u=Ci(c,!0)):f?(h=!1,u=Ii(c,!0)):u=[]:ss(c)||Ya(c)?(u=l,Ya(l)?u=ys(l):rs(l)&&!es(l)||(u=xo(c))):h=!1}h&&(s.set(c,u),o(u,c,r,a,s),s.delete(c));nr(e,n,u)}(e,t,s,n,Kr,r,o);else{var l=r?r(Oo(e,s),a,s+"",e,t,o):i;l===i&&(l=a),nr(e,s,l)}}),zs)}function Vr(e,t){var n=e.length;if(n)return wo(t+=t<0?n:0,n)?e[t]:i}function Yr(e,t,n){t=t.length?At(t,(function(e){return Za(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[al];var r=-1;t=At(t,Jt(uo()));var i=Wr(e,(function(e,n,i){var o=At(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var l=Ti(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Zr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&ti(o,wi(a,e),s)}return o}function Gr(e,t,n,r){var i=r?Ut:Wt,o=-1,a=t.length,s=e;for(e===t&&(t=Li(t)),n&&(s=At(e,Jt(n)));++o<a;)for(var l=0,c=t[o],d=n?n(c):c;(l=i(s,d,l,r))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Xr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;wo(i)?qe.call(e,i,1):pi(e,i)}}return e}function qr(e,t){return e+bt(En()*(t-e+1))}function Jr(e,t){var n="";if(!e||t<1||t>g)return n;do{t%2&&(n+=e),(t=bt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return zo(jo(e,t,al),e+"")}function $r(e){return $n(Fs(e))}function ei(e,t){var n=Fs(e);return Bo(n,cr(t,0,n.length))}function ti(e,t,n,r){if(!rs(e))return e;for(var o=-1,a=(t=wi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Ho(t[o]),d=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var u=l[c];(d=r?r(u,c,l):i)===i&&(d=rs(u)?u:wo(t[o+1])?[]:{})}rr(l,c,d),l=l[c]}return e}var ni=On?function(e,t){return On.set(e,t),e}:al,ri=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:rl(t),writable:!0})}:al;function ii(e){return Bo(Fs(e))}function oi(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ai(e,t){var n;return gr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return li(e,t,al,n)}function li(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,l=null===t,c=us(t),d=t===i;o<a;){var u=bt((o+a)/2),h=n(e[u]),p=h!==i,g=null===h,f=h==h,m=us(h);if(s)var b=r||f;else b=d?f&&(r||p):l?f&&p&&(r||!g):c?f&&p&&!g&&(r||!m):!g&&!m&&(r?h<=t:h<t);b?o=u+1:a=u}return wn(a,4294967294)}function ci(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Fa(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function di(e){return"number"==typeof e?e:us(e)?f:+e}function ui(e){if("string"==typeof e)return e;if(Za(e))return At(e,ui)+"";if(us(e))return Wn?Wn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,n){var r=-1,i=Lt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Ji(e);if(c)return un(c);a=!1,i=$t,l=new qn}else l=t?[]:s;e:for(;++r<o;){var d=e[r],u=t?t(d):d;if(d=n||0!==d?d:0,a&&u==u){for(var h=l.length;h--;)if(l[h]===u)continue e;t&&l.push(u),s.push(d)}else i(l,u,n)||(l!==s&&l.push(u),s.push(d))}return s}function pi(e,t){return null==(e=Mo(e,t=wi(t,e)))||delete e[Ho($o(t))]}function gi(e,t,n,r){return ti(e,t,n(Cr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof Yn&&(n=n.value()),zt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function bi(e,t,n){var i=e.length;if(i<2)return i?hi(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],l=-1;++l<i;)l!=o&&(a[o]=pr(a[o]||s,e[l],t,n));return hi(xr(a,1),t,n)}function vi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var l=r<a?t[r]:i;n(s,e[r],l)}return s}function xi(e){return qa(e)?e:[]}function yi(e){return"function"==typeof e?e:al}function wi(e,t){return Za(e)?e:ko(e,t)?[e]:No(ws(e))}var _i=Qr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:oi(e,t,n)}var Ei=ut||function(e){return pt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=Ye?Ye(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ii(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ti(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=us(e),s=t!==i,l=null===t,c=t==t,d=us(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!d&&e<t||d&&n&&o&&!r&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}function ji(e,t,n,i){for(var o=-1,a=e.length,s=n.length,l=-1,c=t.length,d=yn(a-s,0),u=r(c+d),h=!i;++l<c;)u[l]=t[l];for(;++o<s;)(h||o<a)&&(u[n[o]]=e[o]);for(;d--;)u[l++]=e[o++];return u}function Mi(e,t,n,i){for(var o=-1,a=e.length,s=-1,l=n.length,c=-1,d=t.length,u=yn(a-l,0),h=r(u+d),p=!i;++o<u;)h[o]=e[o];for(var g=o;++c<d;)h[g+c]=t[c];for(;++s<l;)(p||o<a)&&(h[g+n[s]]=e[o++]);return h}function Li(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Oi(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),o?sr(n,l,c):rr(n,l,c)}return n}function Ai(e,t){return function(n,r){var i=Za(n)?St:or,o=t?t():{};return i(n,e,uo(r,2),o)}}function Di(e){return Qr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&_o(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ie(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t}))}function zi(e,t){return function(n,r){if(null==n)return n;if(!Xa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ie(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(e){return function(t,n,r){for(var i=-1,o=Ie(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Ri(e){return function(t){var n=sn(t=ws(t))?gn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function Bi(e){return function(t){return zt(el(Ys(t).replace(Qe,"")),e,"")}}function Ni(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Hi(e){return function(t,n,r){var o=Ie(t);if(!Xa(t)){var a=uo(n,3);t=Ds(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Wi(e){return io((function(t){var n=t.length,r=n,a=Vn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Me(o);if(a&&!l&&"wrapper"==lo(s))var l=new Vn([],!0)}for(r=l?r:n;++r<n;){var c=lo(s=t[r]),d="wrapper"==c?so(s):i;l=d&&Eo(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[lo(d[0])].apply(l,d[3]):1==s.length&&Eo(s)?l[c]():l.thru(s)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Za(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Ui(e,t,n,o,a,s,l,c,d,h){var p=t&u,g=1&t,f=2&t,m=24&t,b=512&t,v=f?i:Ni(e);return function i(){for(var u=arguments.length,x=r(u),y=u;y--;)x[y]=arguments[y];if(m)var w=co(i),_=nn(x,w);if(o&&(x=ji(x,o,a,m)),s&&(x=Mi(x,s,l,m)),u-=_,m&&u<h){var k=dn(x,w);return Xi(e,t,Ui,i.placeholder,n,x,k,c,d,h-u)}var E=g?n:this,C=f?E[e]:e;return u=x.length,c?x=Lo(x,c):b&&u>1&&x.reverse(),p&&d<u&&(x.length=d),this&&this!==pt&&this instanceof i&&(C=v||Ni(C)),C.apply(E,x)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return _r(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Ki(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ui(n),r=ui(r)):(n=di(n),r=di(r)),o=e(n,r)}return o}}function Vi(e){return io((function(t){return t=At(t,Jt(uo())),Qr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function Yi(e,t){var n=(t=t===i?" ":ui(t)).length;if(n<2)return n?Jr(t,e):t;var r=Jr(t,ft(e/pn(t)));return sn(t)?ki(gn(r),0,e).join(""):r.slice(0,e)}function Zi(e){return function(t,n,o){return o&&"number"!=typeof o&&_o(t,n,o)&&(n=o=i),t=ms(t),n===i?(n=t,t=0):n=ms(n),function(e,t,n,i){for(var o=-1,a=yn(ft((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:ms(o),e)}}function Gi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=xs(t),n=xs(n)),e(t,n)}}function Xi(e,t,n,r,o,a,s,l,u,h){var p=8&t;t|=p?c:d,4&(t&=~(p?d:c))||(t&=-4);var g=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,l,u,h],f=n.apply(i,g);return Eo(e)&&Ao(f,g),f.placeholder=r,Po(f,e,t)}function qi(e){var t=Se[e];return function(e,n){if(e=xs(e),(n=null==n?0:wn(bs(n),292))&&Yt(e)){var r=(ws(e)+"e").split("e");return+((r=(ws(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ji=jn&&1/un(new jn([,-0]))[1]==p?function(e){return new jn(e)}:ul;function Qi(e){return function(t){var n=bo(t);return n==C?ln(t):n==M?hn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $i(e,t,n,a,p,g,f,m){var b=2&t;if(!b&&"function"!=typeof e)throw new Me(o);var v=a?a.length:0;if(v||(t&=-97,a=p=i),f=f===i?f:yn(bs(f),0),m=m===i?m:bs(m),v-=p?p.length:0,t&d){var x=a,y=p;a=p=i}var w=b?i:so(e),_=[e,t,n,a,p,x,y,g,f,m];if(w&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==u&&8==n||r==u&&n==h&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?ji(c,l,t[4]):l,e[4]=c?dn(e[3],s):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Mi(c,l,t[6]):l,e[6]=c?dn(e[5],s):t[6]);(l=t[7])&&(e[7]=l);r&u&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,w),e=_[0],t=_[1],n=_[2],a=_[3],p=_[4],!(m=_[9]=_[9]===i?b?0:e.length:yn(_[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==l?function(e,t,n){var o=Ni(e);return function a(){for(var s=arguments.length,l=r(s),c=s,d=co(a);c--;)l[c]=arguments[c];var u=s<3&&l[0]!==d&&l[s-1]!==d?[]:dn(l,d);return(s-=u.length)<n?Xi(e,t,Ui,a.placeholder,i,l,u,i,i,n-s):Ct(this&&this!==pt&&this instanceof a?o:e,this,l)}}(e,t,m):t!=c&&33!=t||p.length?Ui.apply(i,_):function(e,t,n,i){var o=1&t,a=Ni(e);return function t(){for(var s=-1,l=arguments.length,c=-1,d=i.length,u=r(d+l),h=this&&this!==pt&&this instanceof t?a:e;++c<d;)u[c]=i[c];for(;l--;)u[c++]=arguments[++s];return Ct(h,o?n:this,u)}}(e,t,n,a);else var k=function(e,t,n){var r=1&t,i=Ni(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Po((w?ni:Ao)(k,_),e,t)}function eo(e,t,n,r){return e===i||Fa(e,Ae[n])&&!Pe.call(r,n)?t:e}function to(e,t,n,r,o,a){return rs(e)&&rs(t)&&(a.set(t,e),Kr(e,t,i,to,a),a.delete(t)),e}function no(e){return ss(e)?i:e}function ro(e,t,n,r,o,a){var s=1&n,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var h=-1,p=!0,g=2&n?new qn:i;for(a.set(e,t),a.set(t,e);++h<l;){var f=e[h],m=t[h];if(r)var b=s?r(m,f,h,t,e,a):r(f,m,h,e,t,a);if(b!==i){if(b)continue;p=!1;break}if(g){if(!Rt(t,(function(e,t){if(!$t(g,t)&&(f===e||o(f,e,n,r,a)))return g.push(t)}))){p=!1;break}}else if(f!==m&&!o(f,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function io(e){return zo(jo(e,i,Go),e+"")}function oo(e){return Sr(e,Ds,fo)}function ao(e){return Sr(e,zs,mo)}var so=On?function(e){return On.get(e)}:ul;function lo(e){for(var t=e.name+"",n=An[t],r=Pe.call(An,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function co(e){return(Pe.call(Un,"placeholder")?Un:e).placeholder}function uo(){var e=Un.iteratee||sl;return e=e===sl?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function ho(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function po(e){for(var t=Ds(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Io(i)]}return t}function go(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Pr(n)?n:i}var fo=vt?function(e){return null==e?[]:(e=Ie(e),Mt(vt(e),(function(t){return Xe.call(e,t)})))}:vl,mo=vt?function(e){for(var t=[];e;)Dt(t,fo(e)),e=Ze(e);return t}:vl,bo=Ir;function vo(e,t,n){for(var r=-1,i=(t=wi(t,e)).length,o=!1;++r<i;){var a=Ho(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ns(i)&&wo(a,i)&&(Za(e)||Ya(e))}function xo(e){return"function"!=typeof e.constructor||So(e)?{}:Fn(Ze(e))}function yo(e){return Za(e)||Ya(e)||!!(Je&&e&&e[Je])}function wo(e,t){var n=typeof e;return!!(t=null==t?g:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function _o(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Xa(n)&&wo(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function ko(e,t){if(Za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ie(t))}function Eo(e){var t=lo(e),n=Un[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Sn&&bo(new Sn(new ArrayBuffer(1)))!=z||In&&bo(new In)!=C||Tn&&bo(Tn.resolve())!=T||jn&&bo(new jn)!=M||Mn&&bo(new Mn)!=A)&&(bo=function(e){var t=Ir(e),n=t==I?e.constructor:i,r=n?Wo(n):"";if(r)switch(r){case Dn:return z;case zn:return C;case Pn:return T;case Rn:return M;case Bn:return A}return t});var Co=De?es:xl;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function Io(e){return e==e&&!rs(e)}function To(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ie(n)))}}function jo(e,t,n){return t=yn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=yn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var l=r(t+1);++o<t;)l[o]=i[o];return l[t]=n(s),Ct(e,this,l)}}function Mo(e,t){return t.length<2?e:Cr(e,oi(t,0,-1))}function Lo(e,t){for(var n=e.length,r=wn(t.length,n),o=Li(e);r--;){var a=t[r];e[r]=wo(a,n)?o[a]:i}return e}function Oo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=Ro(ni),Do=gt||function(e,t){return pt.setTimeout(e,t)},zo=Ro(ri);function Po(e,t,n){var r=t+"";return zo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return It(b,(function(n){var r="_."+n[0];t&n[1]&&!Lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=_n(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Bo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=qr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var No=function(e){var t=Ra(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(pe,"$1"):n||e)})),t}));function Ho(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wo(e){if(null!=e){try{return ze.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Uo(e){if(e instanceof Yn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Li(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fo=Qr((function(e,t){return qa(e)?pr(e,xr(t,1,qa,!0)):[]})),Ko=Qr((function(e,t){var n=$o(t);return qa(n)&&(n=i),qa(e)?pr(e,xr(t,1,qa,!0),uo(n,2)):[]})),Vo=Qr((function(e,t){var n=$o(t);return qa(n)&&(n=i),qa(e)?pr(e,xr(t,1,qa,!0),i,n):[]}));function Yo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:bs(n);return i<0&&(i=yn(r+i,0)),Ht(e,uo(t,3),i)}function Zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=bs(n),o=n<0?yn(r+o,0):wn(o,r-1)),Ht(e,uo(t,3),o,!0)}function Go(e){return(null==e?0:e.length)?xr(e,1):[]}function Xo(e){return e&&e.length?e[0]:i}var qo=Qr((function(e){var t=At(e,xi);return t.length&&t[0]===e[0]?Lr(t):[]})),Jo=Qr((function(e){var t=$o(e),n=At(e,xi);return t===$o(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Lr(n,uo(t,2)):[]})),Qo=Qr((function(e){var t=$o(e),n=At(e,xi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Lr(n,i,t):[]}));function $o(e){var t=null==e?0:e.length;return t?e[t-1]:i}var ea=Qr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=lr(e,t);return Xr(e,At(t,(function(e){return wo(e,n)?+e:e})).sort(Ti)),r}));function ra(e){return null==e?e:Cn.call(e)}var ia=Qr((function(e){return hi(xr(e,1,qa,!0))})),oa=Qr((function(e){var t=$o(e);return qa(t)&&(t=i),hi(xr(e,1,qa,!0),uo(t,2))})),aa=Qr((function(e){var t=$o(e);return t="function"==typeof t?t:i,hi(xr(e,1,qa,!0),i,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(qa(e))return t=yn(e.length,t),!0})),Xt(t,(function(t){return At(e,Vt(t))}))}function la(e,t){if(!e||!e.length)return[];var n=sa(e);return null==t?n:At(n,(function(e){return Ct(t,i,e)}))}var ca=Qr((function(e,t){return qa(e)?pr(e,t):[]})),da=Qr((function(e){return bi(Mt(e,qa))})),ua=Qr((function(e){var t=$o(e);return qa(t)&&(t=i),bi(Mt(e,qa),uo(t,2))})),ha=Qr((function(e){var t=$o(e);return t="function"==typeof t?t:i,bi(Mt(e,qa),i,t)})),pa=Qr(sa);var ga=Qr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,la(e,n)}));function fa(e){var t=Un(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var ba=io((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return lr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Yn&&wo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ma,args:[o],thisArg:i}),new Vn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=Ai((function(e,t,n){Pe.call(e,n)?++e[n]:sr(e,n,1)}));var xa=Hi(Yo),ya=Hi(Zo);function wa(e,t){return(Za(e)?It:gr)(e,uo(t,3))}function _a(e,t){return(Za(e)?Tt:fr)(e,uo(t,3))}var ka=Ai((function(e,t,n){Pe.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Ea=Qr((function(e,t,n){var i=-1,o="function"==typeof t,a=Xa(e)?r(e.length):[];return gr(e,(function(e){a[++i]=o?Ct(t,e,n):Or(e,t,n)})),a})),Ca=Ai((function(e,t,n){sr(e,n,t)}));function Sa(e,t){return(Za(e)?At:Wr)(e,uo(t,3))}var Ia=Ai((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ta=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_o(e,t[0],t[1])?t=[]:n>2&&_o(t[0],t[1],t[2])&&(t=[t[0]]),Yr(e,xr(t,1),[])})),ja=ht||function(){return pt.Date.now()};function Ma(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,$i(e,u,i,i,i,i,t)}function La(e,t){var n;if("function"!=typeof t)throw new Me(o);return e=bs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Oa=Qr((function(e,t,n){var r=1;if(n.length){var i=dn(n,co(Oa));r|=c}return $i(e,r,t,n,i)})),Aa=Qr((function(e,t,n){var r=3;if(n.length){var i=dn(n,co(Aa));r|=c}return $i(t,r,e,n,i)}));function Da(e,t,n){var r,a,s,l,c,d,u=0,h=!1,p=!1,g=!0;if("function"!=typeof e)throw new Me(o);function f(t){var n=r,o=a;return r=a=i,u=t,l=e.apply(o,n)}function m(e){return u=e,c=Do(v,t),h?f(e):l}function b(e){var n=e-d;return d===i||n>=t||n<0||p&&e-u>=s}function v(){var e=ja();if(b(e))return x(e);c=Do(v,function(e){var n=t-(e-d);return p?wn(n,s-(e-u)):n}(e))}function x(e){return c=i,g&&r?f(e):(r=a=i,l)}function y(){var e=ja(),n=b(e);if(r=arguments,a=this,d=e,n){if(c===i)return m(d);if(p)return Ei(c),c=Do(v,t),f(d)}return c===i&&(c=Do(v,t)),l}return t=xs(t)||0,rs(n)&&(h=!!n.leading,s=(p="maxWait"in n)?yn(xs(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),y.cancel=function(){c!==i&&Ei(c),u=0,r=d=a=c=i},y.flush=function(){return c===i?l:x(ja())},y}var za=Qr((function(e,t){return hr(e,1,t)})),Pa=Qr((function(e,t,n){return hr(e,xs(t)||0,n)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Xn),n}function Ba(e){if("function"!=typeof e)throw new Me(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Xn;var Na=_i((function(e,t){var n=(t=1==t.length&&Za(t[0])?At(t[0],Jt(uo())):At(xr(t,1),Jt(uo()))).length;return Qr((function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),Ha=Qr((function(e,t){var n=dn(t,co(Ha));return $i(e,c,i,t,n)})),Wa=Qr((function(e,t){var n=dn(t,co(Wa));return $i(e,d,i,t,n)})),Ua=io((function(e,t){return $i(e,h,i,i,i,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Ka=Gi(Tr),Va=Gi((function(e,t){return e>=t})),Ya=Ar(function(){return arguments}())?Ar:function(e){return is(e)&&Pe.call(e,"callee")&&!Xe.call(e,"callee")},Za=r.isArray,Ga=xt?Jt(xt):function(e){return is(e)&&Ir(e)==D};function Xa(e){return null!=e&&ns(e.length)&&!es(e)}function qa(e){return is(e)&&Xa(e)}var Ja=Bt||xl,Qa=yt?Jt(yt):function(e){return is(e)&&Ir(e)==w};function $a(e){if(!is(e))return!1;var t=Ir(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ss(e)}function es(e){if(!rs(e))return!1;var t=Ir(e);return t==k||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==bs(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function is(e){return null!=e&&"object"==typeof e}var os=wt?Jt(wt):function(e){return is(e)&&bo(e)==C};function as(e){return"number"==typeof e||is(e)&&Ir(e)==S}function ss(e){if(!is(e)||Ir(e)!=I)return!1;var t=Ze(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ze.call(n)==He}var ls=_t?Jt(_t):function(e){return is(e)&&Ir(e)==j};var cs=kt?Jt(kt):function(e){return is(e)&&bo(e)==M};function ds(e){return"string"==typeof e||!Za(e)&&is(e)&&Ir(e)==L}function us(e){return"symbol"==typeof e||is(e)&&Ir(e)==O}var hs=Et?Jt(Et):function(e){return is(e)&&ns(e.length)&&!!at[Ir(e)]};var ps=Gi(Hr),gs=Gi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Xa(e))return ds(e)?gn(e):Li(e);if(et&&e[et])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[et]());var t=bo(e);return(t==C?ln:t==M?un:Fs)(e)}function ms(e){return e?(e=xs(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function bs(e){var t=ms(e),n=t%1;return t==t?n?t-n:t:0}function vs(e){return e?cr(bs(e),0,m):0}function xs(e){if("number"==typeof e)return e;if(us(e))return f;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=be.test(e);return n||xe.test(e)?dt(e.slice(2),n?2:8):me.test(e)?f:+e}function ys(e){return Oi(e,zs(e))}function ws(e){return null==e?"":ui(e)}var _s=Di((function(e,t){if(So(t)||Xa(t))Oi(t,Ds(t),e);else for(var n in t)Pe.call(t,n)&&rr(e,n,t[n])})),ks=Di((function(e,t){Oi(t,zs(t),e)})),Es=Di((function(e,t,n,r){Oi(t,zs(t),e,r)})),Cs=Di((function(e,t,n,r){Oi(t,Ds(t),e,r)})),Ss=io(lr);var Is=Qr((function(e,t){e=Ie(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&_o(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=zs(a),l=-1,c=s.length;++l<c;){var d=s[l],u=e[d];(u===i||Fa(u,Ae[d])&&!Pe.call(e,d))&&(e[d]=a[d])}return e})),Ts=Qr((function(e){return e.push(i,to),Ct(Rs,i,e)}));function js(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function Ms(e,t){return null!=e&&vo(e,t,Mr)}var Ls=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),rl(al)),Os=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),uo),As=Qr(Or);function Ds(e){return Xa(e)?Qn(e):Br(e)}function zs(e){return Xa(e)?Qn(e,!0):Nr(e)}var Ps=Di((function(e,t,n){Kr(e,t,n)})),Rs=Di((function(e,t,n,r){Kr(e,t,n,r)})),Bs=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,(function(t){return t=wi(t,e),r||(r=t.length>1),t})),Oi(e,ao(e),n),r&&(n=dr(n,7,no));for(var i=t.length;i--;)pi(n,t[i]);return n}));var Ns=io((function(e,t){return null==e?{}:function(e,t){return Zr(e,t,(function(t,n){return Ms(e,n)}))}(e,t)}));function Hs(e,t){if(null==e)return{};var n=At(ao(e),(function(e){return[e]}));return t=uo(t),Zr(e,n,(function(e,n){return t(e,n[0])}))}var Ws=Qi(Ds),Us=Qi(zs);function Fs(e){return null==e?[]:Qt(e,Ds(e))}var Ks=Bi((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return $s(ws(e).toLowerCase())}function Ys(e){return(e=ws(e))&&e.replace(we,rn).replace($e,"")}var Zs=Bi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=Bi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Xs=Ri("toLowerCase");var qs=Bi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Js=Bi((function(e,t,n){return e+(n?" ":"")+$s(t)}));var Qs=Bi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),$s=Ri("toUpperCase");function el(e,t,n){return e=ws(e),(t=n?i:t)===i?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var tl=Qr((function(e,t){try{return Ct(e,i,t)}catch(e){return $a(e)?e:new Ee(e)}})),nl=io((function(e,t){return It(t,(function(t){t=Ho(t),sr(e,t,Oa(e[t],e))})),e}));function rl(e){return function(){return e}}var il=Wi(),ol=Wi(!0);function al(e){return e}function sl(e){return Rr("function"==typeof e?e:dr(e,1))}var ll=Qr((function(e,t){return function(n){return Or(n,e,t)}})),cl=Qr((function(e,t){return function(n){return Or(e,n,t)}}));function dl(e,t,n){var r=Ds(t),i=Er(t,r);null!=n||rs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Ds(t)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return It(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Li(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function ul(){}var hl=Vi(At),pl=Vi(jt),gl=Vi(Rt);function fl(e){return ko(e)?Vt(Ho(e)):function(e){return function(t){return Cr(t,e)}}(e)}var ml=Zi(),bl=Zi(!0);function vl(){return[]}function xl(){return!1}var yl=Ki((function(e,t){return e+t}),0),wl=qi("ceil"),_l=Ki((function(e,t){return e/t}),1),kl=qi("floor");var El,Cl=Ki((function(e,t){return e*t}),1),Sl=qi("round"),Il=Ki((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Me(o);return e=bs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Ma,Un.assign=_s,Un.assignIn=ks,Un.assignInWith=Es,Un.assignWith=Cs,Un.at=Ss,Un.before=La,Un.bind=Oa,Un.bindAll=nl,Un.bindKey=Aa,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Za(e)?e:[e]},Un.chain=fa,Un.chunk=function(e,t,n){t=(n?_o(e,t,n):t===i)?1:yn(bs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=r(ft(o/t));a<o;)l[s++]=oi(e,a,a+=t);return l},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Dt(Za(n)?Li(n):[n],xr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new Me(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Ds(e);return function(n){return ur(n,e,t)}}(dr(e,1))},Un.constant=rl,Un.countBy=va,Un.create=function(e,t){var n=Fn(e);return null==t?n:ar(n,t)},Un.curry=function e(t,n,r){var o=$i(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.curryRight=function e(t,n,r){var o=$i(t,l,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.debounce=Da,Un.defaults=Is,Un.defaultsDeep=Ts,Un.defer=za,Un.delay=Pa,Un.difference=Fo,Un.differenceBy=Ko,Un.differenceWith=Vo,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=n||t===i?1:bs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,0,(t=r-(t=n||t===i?1:bs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0):[]},Un.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&_o(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=bs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:bs(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Za(e)?Mt:vr)(e,uo(t,3))},Un.flatMap=function(e,t){return xr(Sa(e,t),1)},Un.flatMapDeep=function(e,t){return xr(Sa(e,t),p)},Un.flatMapDepth=function(e,t,n){return n=n===i?1:bs(n),xr(Sa(e,t),n)},Un.flatten=Go,Un.flattenDeep=function(e){return(null==e?0:e.length)?xr(e,p):[]},Un.flattenDepth=function(e,t){return(null==e?0:e.length)?xr(e,t=t===i?1:bs(t)):[]},Un.flip=function(e){return $i(e,512)},Un.flow=il,Un.flowRight=ol,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Un.functions=function(e){return null==e?[]:Er(e,Ds(e))},Un.functionsIn=function(e){return null==e?[]:Er(e,zs(e))},Un.groupBy=ka,Un.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},Un.intersection=qo,Un.intersectionBy=Jo,Un.intersectionWith=Qo,Un.invert=Ls,Un.invertBy=Os,Un.invokeMap=Ea,Un.iteratee=sl,Un.keyBy=Ca,Un.keys=Ds,Un.keysIn=zs,Un.map=Sa,Un.mapKeys=function(e,t){var n={};return t=uo(t,3),_r(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},Un.mapValues=function(e,t){var n={};return t=uo(t,3),_r(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},Un.matches=function(e){return Ur(dr(e,1))},Un.matchesProperty=function(e,t){return Fr(e,dr(t,1))},Un.memoize=Ra,Un.merge=Ps,Un.mergeWith=Rs,Un.method=ll,Un.methodOf=cl,Un.mixin=dl,Un.negate=Ba,Un.nthArg=function(e){return e=bs(e),Qr((function(t){return Vr(t,e)}))},Un.omit=Bs,Un.omitBy=function(e,t){return Hs(e,Ba(uo(t)))},Un.once=function(e){return La(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Za(t)||(t=null==t?[]:[t]),Za(n=r?i:n)||(n=null==n?[]:[n]),Yr(e,t,n))},Un.over=hl,Un.overArgs=Na,Un.overEvery=pl,Un.overSome=gl,Un.partial=Ha,Un.partialRight=Wa,Un.partition=Ia,Un.pick=Ns,Un.pickBy=Hs,Un.property=fl,Un.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},Un.pull=ea,Un.pullAll=ta,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,uo(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,i,n):e},Un.pullAt=na,Un.range=ml,Un.rangeRight=bl,Un.rearg=Ua,Un.reject=function(e,t){return(Za(e)?Mt:vr)(e,Ba(uo(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Xr(e,i),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Me(o);return Qr(e,t=t===i?t:bs(t))},Un.reverse=ra,Un.sampleSize=function(e,t,n){return t=(n?_o(e,t,n):t===i)?1:bs(t),(Za(e)?er:ei)(e,t)},Un.set=function(e,t,n){return null==e?e:ti(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ti(e,t,n,r)},Un.shuffle=function(e){return(Za(e)?tr:ii)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&_o(e,t,n)?(t=0,n=r):(t=null==t?0:bs(t),n=n===i?r:bs(n)),oi(e,t,n)):[]},Un.sortBy=Ta,Un.sortedUniq=function(e){return e&&e.length?ci(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?ci(e,uo(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&_o(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ws(e))&&("string"==typeof t||null!=t&&!ls(t))&&!(t=ui(t))&&sn(e)?ki(gn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Me(o);return t=null==t?0:yn(bs(t),0),Qr((function(n){var r=n[t],i=ki(n,0,t);return r&&Dt(i,r),Ct(e,this,i)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===i?1:bs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oi(e,(t=r-(t=n||t===i?1:bs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fi(e,uo(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Me(o);return rs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Da(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=ma,Un.toArray=fs,Un.toPairs=Ws,Un.toPairsIn=Us,Un.toPath=function(e){return Za(e)?At(e,Ho):us(e)?[e]:Li(No(ws(e)))},Un.toPlainObject=ys,Un.transform=function(e,t,n){var r=Za(e),i=r||Ja(e)||hs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Fn(Ze(e)):{}}return(i?It:_r)(e,(function(e,r,i){return t(n,e,r,i)})),n},Un.unary=function(e){return Ma(e,1)},Un.union=ia,Un.unionBy=oa,Un.unionWith=aa,Un.uniq=function(e){return e&&e.length?hi(e):[]},Un.uniqBy=function(e,t){return e&&e.length?hi(e,uo(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?hi(e,i,t):[]},Un.unset=function(e,t){return null==e||pi(e,t)},Un.unzip=sa,Un.unzipWith=la,Un.update=function(e,t,n){return null==e?e:gi(e,t,yi(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:gi(e,t,yi(n),r)},Un.values=Fs,Un.valuesIn=function(e){return null==e?[]:Qt(e,zs(e))},Un.without=ca,Un.words=el,Un.wrap=function(e,t){return Ha(yi(t),e)},Un.xor=da,Un.xorBy=ua,Un.xorWith=ha,Un.zip=pa,Un.zipObject=function(e,t){return vi(e||[],t||[],rr)},Un.zipObjectDeep=function(e,t){return vi(e||[],t||[],ti)},Un.zipWith=ga,Un.entries=Ws,Un.entriesIn=Us,Un.extend=ks,Un.extendWith=Es,dl(Un,Un),Un.add=yl,Un.attempt=tl,Un.camelCase=Ks,Un.capitalize=Vs,Un.ceil=wl,Un.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=xs(n))==n?n:0),t!==i&&(t=(t=xs(t))==t?t:0),cr(xs(e),t,n)},Un.clone=function(e){return dr(e,4)},Un.cloneDeep=function(e){return dr(e,5)},Un.cloneDeepWith=function(e,t){return dr(e,5,t="function"==typeof t?t:i)},Un.cloneWith=function(e,t){return dr(e,4,t="function"==typeof t?t:i)},Un.conformsTo=function(e,t){return null==t||ur(e,t,Ds(t))},Un.deburr=Ys,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=_l,Un.endsWith=function(e,t,n){e=ws(e),t=ui(t);var r=e.length,o=n=n===i?r:cr(bs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Un.eq=Fa,Un.escape=function(e){return(e=ws(e))&&J.test(e)?e.replace(X,on):e},Un.escapeRegExp=function(e){return(e=ws(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Un.every=function(e,t,n){var r=Za(e)?jt:mr;return n&&_o(e,t,n)&&(t=i),r(e,uo(t,3))},Un.find=xa,Un.findIndex=Yo,Un.findKey=function(e,t){return Nt(e,uo(t,3),_r)},Un.findLast=ya,Un.findLastIndex=Zo,Un.findLastKey=function(e,t){return Nt(e,uo(t,3),kr)},Un.floor=kl,Un.forEach=wa,Un.forEachRight=_a,Un.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),zs)},Un.forInRight=function(e,t){return null==e?e:wr(e,uo(t,3),zs)},Un.forOwn=function(e,t){return e&&_r(e,uo(t,3))},Un.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Un.get=js,Un.gt=Ka,Un.gte=Va,Un.has=function(e,t){return null!=e&&vo(e,t,jr)},Un.hasIn=Ms,Un.head=Xo,Un.identity=al,Un.includes=function(e,t,n,r){e=Xa(e)?e:Fs(e),n=n&&!r?bs(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ds(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:bs(n);return i<0&&(i=yn(r+i,0)),Wt(e,t,i)},Un.inRange=function(e,t,n){return t=ms(t),n===i?(n=t,t=0):n=ms(n),function(e,t,n){return e>=wn(t,n)&&e<yn(t,n)}(e=xs(e),t,n)},Un.invoke=As,Un.isArguments=Ya,Un.isArray=Za,Un.isArrayBuffer=Ga,Un.isArrayLike=Xa,Un.isArrayLikeObject=qa,Un.isBoolean=function(e){return!0===e||!1===e||is(e)&&Ir(e)==y},Un.isBuffer=Ja,Un.isDate=Qa,Un.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},Un.isEmpty=function(e){if(null==e)return!0;if(Xa(e)&&(Za(e)||"string"==typeof e||"function"==typeof e.splice||Ja(e)||hs(e)||Ya(e)))return!e.length;var t=bo(e);if(t==C||t==M)return!e.size;if(So(e))return!Br(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Dr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Dr(e,t,i,n):!!r},Un.isError=$a,Un.isFinite=function(e){return"number"==typeof e&&Yt(e)},Un.isFunction=es,Un.isInteger=ts,Un.isLength=ns,Un.isMap=os,Un.isMatch=function(e,t){return e===t||zr(e,t,po(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,zr(e,t,po(t),n)},Un.isNaN=function(e){return as(e)&&e!=+e},Un.isNative=function(e){if(Co(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=as,Un.isObject=rs,Un.isObjectLike=is,Un.isPlainObject=ss,Un.isRegExp=ls,Un.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=g},Un.isSet=cs,Un.isString=ds,Un.isSymbol=us,Un.isTypedArray=hs,Un.isUndefined=function(e){return e===i},Un.isWeakMap=function(e){return is(e)&&bo(e)==A},Un.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Ir(e)},Un.join=function(e,t){return null==e?"":vn.call(e,t)},Un.kebabCase=Zs,Un.last=$o,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=bs(n))<0?yn(r+o,0):wn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,Ft,o,!0)},Un.lowerCase=Gs,Un.lowerFirst=Xs,Un.lt=ps,Un.lte=gs,Un.max=function(e){return e&&e.length?br(e,al,Tr):i},Un.maxBy=function(e,t){return e&&e.length?br(e,uo(t,2),Tr):i},Un.mean=function(e){return Kt(e,al)},Un.meanBy=function(e,t){return Kt(e,uo(t,2))},Un.min=function(e){return e&&e.length?br(e,al,Hr):i},Un.minBy=function(e,t){return e&&e.length?br(e,uo(t,2),Hr):i},Un.stubArray=vl,Un.stubFalse=xl,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Cl,Un.nth=function(e,t){return e&&e.length?Vr(e,bs(t)):i},Un.noConflict=function(){return pt._===this&&(pt._=We),this},Un.noop=ul,Un.now=ja,Un.pad=function(e,t,n){e=ws(e);var r=(t=bs(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Yi(bt(i),n)+e+Yi(ft(i),n)},Un.padEnd=function(e,t,n){e=ws(e);var r=(t=bs(t))?pn(e):0;return t&&r<t?e+Yi(t-r,n):e},Un.padStart=function(e,t,n){e=ws(e);var r=(t=bs(t))?pn(e):0;return t&&r<t?Yi(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(ws(e).replace(ae,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&_o(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ms(e),t===i?(t=e,e=0):t=ms(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return wn(e+o*(t-e+ct("1e-"+((o+"").length-1))),t)}return qr(e,t)},Un.reduce=function(e,t,n){var r=Za(e)?zt:Zt,i=arguments.length<3;return r(e,uo(t,4),n,i,gr)},Un.reduceRight=function(e,t,n){var r=Za(e)?Pt:Zt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Un.repeat=function(e,t,n){return t=(n?_o(e,t,n):t===i)?1:bs(t),Jr(ws(e),t)},Un.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,o=(t=wi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Ho(t[r])];a===i&&(r=o,a=n),e=es(a)?a.call(e):a}return e},Un.round=Sl,Un.runInContext=e,Un.sample=function(e){return(Za(e)?$n:$r)(e)},Un.size=function(e){if(null==e)return 0;if(Xa(e))return ds(e)?pn(e):e.length;var t=bo(e);return t==C||t==M?e.size:Br(e).length},Un.snakeCase=qs,Un.some=function(e,t,n){var r=Za(e)?Rt:ai;return n&&_o(e,t,n)&&(t=i),r(e,uo(t,3))},Un.sortedIndex=function(e,t){return si(e,t)},Un.sortedIndexBy=function(e,t,n){return li(e,t,uo(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return si(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return li(e,t,uo(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Un.startCase=Js,Un.startsWith=function(e,t,n){return e=ws(e),n=null==n?0:cr(bs(n),0,e.length),t=ui(t),e.slice(n,n+t.length)==t},Un.subtract=Il,Un.sum=function(e){return e&&e.length?Gt(e,al):0},Un.sumBy=function(e,t){return e&&e.length?Gt(e,uo(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&_o(e,t,n)&&(t=i),e=ws(e),t=Es({},t,r,eo);var o,a,s=Es({},t.imports,r.imports,eo),l=Ds(s),c=Qt(s,l),d=0,u=t.interpolate||_e,h="__p += '",p=Te((t.escape||_e).source+"|"+u.source+"|"+(u===ee?ge:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),g="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(d,l).replace(ke,an),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),h+="';\n";var f=Pe.call(t,"variable")&&t.variable;if(f){if(he.test(f))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(Y,"$1").replace(Z,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=tl((function(){return Ce(l,g+"return "+h).apply(i,c)}));if(m.source=h,$a(m))throw m;return m},Un.times=function(e,t){if((e=bs(e))<1||e>g)return[];var n=m,r=wn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Un.toFinite=ms,Un.toInteger=bs,Un.toLength=vs,Un.toLower=function(e){return ws(e).toLowerCase()},Un.toNumber=xs,Un.toSafeInteger=function(e){return e?cr(bs(e),-9007199254740991,g):0===e?e:0},Un.toString=ws,Un.toUpper=function(e){return ws(e).toUpperCase()},Un.trim=function(e,t,n){if((e=ws(e))&&(n||t===i))return qt(e);if(!e||!(t=ui(t)))return e;var r=gn(e),o=gn(t);return ki(r,en(r,o),tn(r,o)+1).join("")},Un.trimEnd=function(e,t,n){if((e=ws(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=ui(t)))return e;var r=gn(e);return ki(r,0,tn(r,gn(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=ws(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ui(t)))return e;var r=gn(e);return ki(r,en(r,gn(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(rs(t)){var o="separator"in t?t.separator:o;n="length"in t?bs(t.length):n,r="omission"in t?ui(t.omission):r}var a=(e=ws(e)).length;if(sn(e)){var s=gn(e);a=s.length}if(n>=a)return e;var l=n-pn(r);if(l<1)return r;var c=s?ki(s,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),ls(o)){if(e.slice(l).search(o)){var d,u=c;for(o.global||(o=Te(o.source,ws(fe.exec(o))+"g")),o.lastIndex=0;d=o.exec(u);)var h=d.index;c=c.slice(0,h===i?l:h)}}else if(e.indexOf(ui(o),l)!=l){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Un.unescape=function(e){return(e=ws(e))&&q.test(e)?e.replace(G,mn):e},Un.uniqueId=function(e){var t=++Re;return ws(e)+t},Un.upperCase=Qs,Un.upperFirst=$s,Un.each=wa,Un.eachRight=_a,Un.first=Xo,dl(Un,(El={},_r(Un,(function(e,t){Pe.call(Un.prototype,t)||(El[t]=e)})),El),{chain:!1}),Un.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),It(["drop","take"],(function(e,t){Yn.prototype[e]=function(n){n=n===i?1:yn(bs(n),0);var r=this.__filtered__&&!t?new Yn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),It(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}})),It(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}})),Yn.prototype.compact=function(){return this.filter(al)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Yn(this):this.map((function(n){return Or(n,e,t)}))})),Yn.prototype.reject=function(e){return this.filter(Ba(uo(e)))},Yn.prototype.slice=function(e,t){e=bs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Yn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=bs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(m)},_r(Yn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Yn,c=s[0],d=l||Za(t),u=function(e){var t=o.apply(Un,Dt([e],s));return r&&h?t[0]:t};d&&n&&"function"==typeof c&&1!=c.length&&(l=d=!1);var h=this.__chain__,p=!!this.__actions__.length,g=a&&!h,f=l&&!p;if(!a&&d){t=f?t:new Yn(this);var m=e.apply(t,s);return m.__actions__.push({func:ma,args:[u],thisArg:i}),new Vn(m,h)}return g&&f?e.apply(this,s):(m=this.thru(u),g?r?m.value()[0]:m.value():m)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Za(i)?i:[],e)}return this[n]((function(n){return t.apply(Za(n)?n:[],e)}))}})),_r(Yn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Pe.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[Ui(i,2).name]=[{name:"wrapper",func:i}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Li(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Li(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Li(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Za(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,d=this.__iteratees__,u=d.length,h=0,p=wn(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return mi(e,this.__actions__);var g=[];e:for(;l--&&h<p;){for(var f=-1,m=e[c+=t];++f<u;){var b=d[f],v=b.iteratee,x=b.type,y=v(m);if(2==x)m=y;else if(!y){if(1==x)continue e;break e}}g[h++]=m}return g},Un.prototype.at=ba,Un.prototype.chain=function(){return fa(this)},Un.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Kn;){var r=Uo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var t=e;return this.__actions__.length&&(t=new Yn(this)),(t=t.reverse()).__actions__.push({func:ma,args:[ra],thisArg:i}),new Vn(t,this.__chain__)}return this.thru(ra)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,et&&(Un.prototype[et]=function(){return this}),Un}();pt._=bn,(r=function(){return bn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},6934:(e,t,n)=>{"use strict";var r={};(0,n(319).assign)(r,n(5186),n(9254),n(3417)),e.exports=r},5186:(e,t,n)=>{"use strict";var r=n(5926),i=n(319),o=n(1519),a=n(994),s=n(13),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,d)))throw new Error(a[n]);this._dict_set=!0}}function d(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},9254:(e,t,n)=>{"use strict";var r=n(1361),i=n(319),o=n(1519),a=n(3417),s=n(994),l=n(13),c=n(4414),d=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===d.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function h(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}u.prototype.push=function(e,t){var n,s,l,c,u,h=this.strm,p=this.options.chunkSize,g=this.options.dictionary,f=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=r.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&g&&(n=r.inflateSetDictionary(this.strm,g)),n===a.Z_BUF_ERROR&&!0===f&&(n=a.Z_OK,f=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(h.output,h.next_out),c=h.next_out-l,u=o.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(u)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=u,t.inflate=h,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.ungzip=h},319:(e,t)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},1519:(e,t,n)=>{"use strict";var r=n(319),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,i,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,o,s=t||e.length,c=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if((o=a[i])>4)c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n<s;)i=i<<6|63&e[n++],o--;o>1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},9643:e=>{"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},3417:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},7690:e=>{"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},5926:(e,t,n)=>{"use strict";var r,i=n(319),o=n(762),a=n(9643),s=n(7690),l=n(994),c=-2,d=258,u=262,h=103,p=113,g=666;function f(e,t){return e.msg=l[t],t}function m(e){return(e<<1)-(e>4?9:0)}function b(e){for(var t=e.length;--t>=0;)e[t]=0}function v(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function x(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,v(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,g=e.strstart+d,f=c[o+a-1],m=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===m&&c[n+a-1]===f&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<g);if(r=d-(g-o),o=g-d,r>a){if(e.match_start=t,a=r,r>=s)break;f=c[o+a-1],m=c[o+a]}}}while((t=p[t&h])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function k(e){var t,n,r,o,l,c,d,h,p,g,f=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){i.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--n);t=n=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--n);o+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,p=o,g=void 0,(g=c.avail_in)>p&&(g=p),n=0===g?0:(c.avail_in-=g,i.arraySet(d,c.input,c.next_in,g,h),1===c.state.wrap?c.adler=a(c.adler,d,g,h):2===c.state.wrap&&(c.adler=s(c.adler,d,g,h)),c.next_in+=g,c.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function E(e,t){for(var n,r;;){if(e.lookahead<u){if(k(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-u&&(e.match_length=_(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(x(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(x(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(x(e,!1),0===e.strm.avail_out)?1:2}function C(e,t){for(var n,r,i;;){if(e.lookahead<u){if(k(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-u&&(e.match_length=_(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(x(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&x(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(x(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(x(e,!1),0===e.strm.avail_out)?1:2}function S(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function I(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),b(this.dyn_ltree),b(this.dyn_dtree),b(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),b(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),b(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function T(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):f(e,c)}function j(e){var t,n=T(e);return 0===n&&((t=e.state).window_size=2*t.w_size,b(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function M(e,t,n,r,o,a){if(!e)return c;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return f(e,c);8===r&&(r=9);var l=new I;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=n,j(e)}r=[new S(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(k(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,x(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(x(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(x(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(x(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,E),new S(4,5,16,8,E),new S(4,6,32,32,E),new S(4,4,16,16,C),new S(8,16,32,32,C),new S(8,16,128,128,C),new S(8,32,128,256,C),new S(32,128,258,1024,C),new S(32,258,258,4096,C)],t.deflateInit=function(e,t){return M(e,t,8,15,8,0)},t.deflateInit2=M,t.deflateReset=j,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||t>5||t<0)return e?f(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===g&&4!==t)return f(e,0===e.avail_out?-5:c);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,3),i.status=p);else{var u=8+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=p,w(i,u),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),v(e),a=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),v(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),v(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&v(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=p)):i.status=p),0!==i.pending){if(v(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(n)&&4!==t)return f(e,-5);if(i.status===g&&0!==e.avail_in)return f(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==g){var _=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(k(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(x(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(x(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(x(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=d){if(k(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+d;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=d-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(x(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(x(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(x(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==_&&4!==_||(i.status=g),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(b(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),v(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),v(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==p&&t!==g?f(e,c):(e.state=null,t===p?f(e,-3):0):c},t.deflateSetDictionary=function(e,t){var n,r,o,s,l,d,u,h,p=t.length;if(!e||!e.state)return c;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(b(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new i.Buf8(n.w_size),i.arraySet(h,t,p-n.w_size,n.w_size,0),t=h,p=n.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,k(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--o);n.strstart=r,n.lookahead=2,k(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=d,e.input=u,e.avail_in=l,n.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},4414:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},3030:e=>{"use strict";e.exports=function(e,t){var n,r,i,o,a,s,l,c,d,u,h,p,g,f,m,b,v,x,y,w,_,k,E,C,S;n=e.state,r=e.next_in,C=e.input,i=r+(e.avail_in-5),o=e.next_out,S=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,d=n.whave,u=n.wnext,h=n.window,p=n.hold,g=n.bits,f=n.lencode,m=n.distcode,b=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{g<15&&(p+=C[r++]<<g,g+=8,p+=C[r++]<<g,g+=8),x=f[p&b];t:for(;;){if(p>>>=y=x>>>24,g-=y,0===(y=x>>>16&255))S[o++]=65535&x;else{if(!(16&y)){if(0==(64&y)){x=f[(65535&x)+(p&(1<<y)-1)];continue t}if(32&y){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&x,(y&=15)&&(g<y&&(p+=C[r++]<<g,g+=8),w+=p&(1<<y)-1,p>>>=y,g-=y),g<15&&(p+=C[r++]<<g,g+=8,p+=C[r++]<<g,g+=8),x=m[p&v];n:for(;;){if(p>>>=y=x>>>24,g-=y,!(16&(y=x>>>16&255))){if(0==(64&y)){x=m[(65535&x)+(p&(1<<y)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&x,g<(y&=15)&&(p+=C[r++]<<g,(g+=8)<y&&(p+=C[r++]<<g,g+=8)),(_+=p&(1<<y)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=y,g-=y,_>(y=o-a)){if((y=_-y)>d&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,E=h,0===u){if(k+=c-y,y<w){w-=y;do{S[o++]=h[k++]}while(--y);k=o-_,E=S}}else if(u<y){if(k+=c+u-y,(y-=u)<w){w-=y;do{S[o++]=h[k++]}while(--y);if(k=0,u<w){w-=y=u;do{S[o++]=h[k++]}while(--y);k=o-_,E=S}}}else if(k+=u-y,y<w){w-=y;do{S[o++]=h[k++]}while(--y);k=o-_,E=S}for(;w>2;)S[o++]=E[k++],S[o++]=E[k++],S[o++]=E[k++],w-=3;w&&(S[o++]=E[k++],w>1&&(S[o++]=E[k++]))}else{k=o-_;do{S[o++]=S[k++],S[o++]=S[k++],S[o++]=S[k++],w-=3}while(w>2);w&&(S[o++]=S[k++],w>1&&(S[o++]=S[k++]))}break}}break}}while(r<i&&o<s);r-=w=g>>3,p&=(1<<(g-=w<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=g}},1361:(e,t,n)=>{"use strict";var r=n(319),i=n(9643),o=n(7690),a=n(3030),s=n(9853),l=-2,c=12,d=30;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):l}function g(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):l}function f(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?l:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,g(e))):l}function m(e,t){var n,r;return e?(r=new h,e.state=r,r.window=null,0!==(n=f(e,t))&&(e.state=null),n):l}var b,v,x=!0;function y(e){if(x){var t;for(b=new r.Buf32(512),v=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,v,0,e.work,{bits:5}),x=!1}e.lencode=b,e.lenbits=9,e.distcode=v,e.distbits=5}function w(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=g,t.inflateReset2=f,t.inflateResetKeep=p,t.inflateInit=function(e){return m(e,15)},t.inflateInit2=m,t.inflate=function(e,t){var n,h,p,g,f,m,b,v,x,_,k,E,C,S,I,T,j,M,L,O,A,D,z,P,R=0,B=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;(n=e.state).mode===c&&(n.mode=13),f=e.next_out,p=e.output,b=e.avail_out,g=e.next_in,h=e.input,m=e.avail_in,v=n.hold,x=n.bits,_=m,k=b,D=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(2&n.wrap&&35615===v){n.check=0,B[0]=255&v,B[1]=v>>>8&255,n.check=o(n.check,B,2,0),v=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&v)<<8)+(v>>8))%31){e.msg="incorrect header check",n.mode=d;break}if(8!=(15&v)){e.msg="unknown compression method",n.mode=d;break}if(x-=4,A=8+(15&(v>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){e.msg="invalid window size",n.mode=d;break}n.dmax=1<<A,e.adler=n.check=1,n.mode=512&v?10:c,v=0,x=0;break;case 2:for(;x<16;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(n.flags=v,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=d;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=d;break}n.head&&(n.head.text=v>>8&1),512&n.flags&&(B[0]=255&v,B[1]=v>>>8&255,n.check=o(n.check,B,2,0)),v=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.head&&(n.head.time=v),512&n.flags&&(B[0]=255&v,B[1]=v>>>8&255,B[2]=v>>>16&255,B[3]=v>>>24&255,n.check=o(n.check,B,4,0)),v=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.head&&(n.head.xflags=255&v,n.head.os=v>>8),512&n.flags&&(B[0]=255&v,B[1]=v>>>8&255,n.check=o(n.check,B,2,0)),v=0,x=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.length=v,n.head&&(n.head.extra_len=v),512&n.flags&&(B[0]=255&v,B[1]=v>>>8&255,n.check=o(n.check,B,2,0)),v=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((E=n.length)>m&&(E=m),E&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,h,g,E,A)),512&n.flags&&(n.check=o(n.check,h,E,g)),m-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===m)break e;E=0;do{A=h[g+E++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A))}while(A&&E<m);if(512&n.flags&&(n.check=o(n.check,h,E,g)),m-=E,g+=E,A)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===m)break e;E=0;do{A=h[g+E++],n.head&&A&&n.length<65536&&(n.head.comment+=String.fromCharCode(A))}while(A&&E<m);if(512&n.flags&&(n.check=o(n.check,h,E,g)),m-=E,g+=E,A)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(v!==(65535&n.check)){e.msg="header crc mismatch",n.mode=d;break}v=0,x=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=c;break;case 10:for(;x<32;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}e.adler=n.check=u(v),v=0,x=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=b,e.next_in=g,e.avail_in=m,n.hold=v,n.bits=x,2;e.adler=n.check=1,n.mode=c;case c:if(5===t||6===t)break e;case 13:if(n.last){v>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}switch(n.last=1&v,x-=1,3&(v>>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){v>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=d}v>>>=2,x-=2;break;case 14:for(v>>>=7&x,x-=7&x;x<32;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if((65535&v)!=(v>>>16^65535)){e.msg="invalid stored block lengths",n.mode=d;break}if(n.length=65535&v,v=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(E=n.length){if(E>m&&(E=m),E>b&&(E=b),0===E)break e;r.arraySet(p,h,g,E,f),m-=E,g+=E,b-=E,f+=E,n.length-=E;break}n.mode=c;break;case 17:for(;x<14;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(n.nlen=257+(31&v),v>>>=5,x-=5,n.ndist=1+(31&v),v>>>=5,x-=5,n.ncode=4+(15&v),v>>>=4,x-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=d;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.lens[N[n.have++]]=7&v,v>>>=3,x-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid code lengths set",n.mode=d;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;T=(R=n.lencode[v&(1<<n.lenbits)-1])>>>16&255,j=65535&R,!((I=R>>>24)<=x);){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(j<16)v>>>=I,x-=I,n.lens[n.have++]=j;else{if(16===j){for(P=I+2;x<P;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(v>>>=I,x-=I,0===n.have){e.msg="invalid bit length repeat",n.mode=d;break}A=n.lens[n.have-1],E=3+(3&v),v>>>=2,x-=2}else if(17===j){for(P=I+3;x<P;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}x-=I,A=0,E=3+(7&(v>>>=I)),v>>>=3,x-=3}else{for(P=I+7;x<P;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}x-=I,A=0,E=11+(127&(v>>>=I)),v>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=d;break}for(;E--;)n.lens[n.have++]=A}}if(n.mode===d)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=d;break}if(n.lenbits=9,z={bits:n.lenbits},D=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid literal/lengths set",n.mode=d;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},D=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,D){e.msg="invalid distances set",n.mode=d;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(m>=6&&b>=258){e.next_out=f,e.avail_out=b,e.next_in=g,e.avail_in=m,n.hold=v,n.bits=x,a(e,k),f=e.next_out,p=e.output,b=e.avail_out,g=e.next_in,h=e.input,m=e.avail_in,v=n.hold,x=n.bits,n.mode===c&&(n.back=-1);break}for(n.back=0;T=(R=n.lencode[v&(1<<n.lenbits)-1])>>>16&255,j=65535&R,!((I=R>>>24)<=x);){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(T&&0==(240&T)){for(M=I,L=T,O=j;T=(R=n.lencode[O+((v&(1<<M+L)-1)>>M)])>>>16&255,j=65535&R,!(M+(I=R>>>24)<=x);){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}v>>>=M,x-=M,n.back+=M}if(v>>>=I,x-=I,n.back+=I,n.length=j,0===T){n.mode=26;break}if(32&T){n.back=-1,n.mode=c;break}if(64&T){e.msg="invalid literal/length code",n.mode=d;break}n.extra=15&T,n.mode=22;case 22:if(n.extra){for(P=n.extra;x<P;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.length+=v&(1<<n.extra)-1,v>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;T=(R=n.distcode[v&(1<<n.distbits)-1])>>>16&255,j=65535&R,!((I=R>>>24)<=x);){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(0==(240&T)){for(M=I,L=T,O=j;T=(R=n.distcode[O+((v&(1<<M+L)-1)>>M)])>>>16&255,j=65535&R,!(M+(I=R>>>24)<=x);){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}v>>>=M,x-=M,n.back+=M}if(v>>>=I,x-=I,n.back+=I,64&T){e.msg="invalid distance code",n.mode=d;break}n.offset=j,n.extra=15&T,n.mode=24;case 24:if(n.extra){for(P=n.extra;x<P;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}n.offset+=v&(1<<n.extra)-1,v>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=d;break}n.mode=25;case 25:if(0===b)break e;if(E=k-b,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=d;break}E>n.wnext?(E-=n.wnext,C=n.wsize-E):C=n.wnext-E,E>n.length&&(E=n.length),S=n.window}else S=p,C=f-n.offset,E=n.length;E>b&&(E=b),b-=E,n.length-=E;do{p[f++]=S[C++]}while(--E);0===n.length&&(n.mode=21);break;case 26:if(0===b)break e;p[f++]=n.length,b--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===m)break e;m--,v|=h[g++]<<x,x+=8}if(k-=b,e.total_out+=k,n.total+=k,k&&(e.adler=n.check=n.flags?o(n.check,p,k,f-k):i(n.check,p,k,f-k)),k=b,(n.flags?v:u(v))!==n.check){e.msg="incorrect data check",n.mode=d;break}v=0,x=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===m)break e;m--,v+=h[g++]<<x,x+=8}if(v!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=d;break}v=0,x=0}n.mode=29;case 29:D=1;break e;case d:D=-3;break e;case 31:return-4;default:return l}return e.next_out=f,e.avail_out=b,e.next_in=g,e.avail_in=m,n.hold=v,n.bits=x,(n.wsize||k!==e.avail_out&&n.mode<d&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,k-e.avail_out)?(n.mode=31,-4):(_-=e.avail_in,k-=e.avail_out,e.total_in+=_,e.total_out+=k,n.total+=k,n.wrap&&k&&(e.adler=n.check=n.flags?o(n.check,p,k,e.next_out-k):i(n.check,p,k,e.next_out-k)),e.data_type=n.bits+(n.last?64:0)+(n.mode===c?128:0)+(20===n.mode||15===n.mode?256:0),(0===_&&0===k||4===t)&&0===D&&(D=-5),D)},t.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?l:(n.head=t,t.done=!1,0):l},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?l:11===n.mode&&i(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):l},t.inflateInfo="pako inflate (from Nodeca project)"},9853:(e,t,n)=>{"use strict";var r=n(319),i=15,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,c,d,u,h,p){var g,f,m,b,v,x,y,w,_,k=p.bits,E=0,C=0,S=0,I=0,T=0,j=0,M=0,L=0,O=0,A=0,D=null,z=0,P=new r.Buf16(16),R=new r.Buf16(16),B=null,N=0;for(E=0;E<=i;E++)P[E]=0;for(C=0;C<c;C++)P[t[n+C]]++;for(T=k,I=i;I>=1&&0===P[I];I--);if(T>I&&(T=I),0===I)return d[u++]=20971520,d[u++]=20971520,p.bits=1,0;for(S=1;S<I&&0===P[S];S++);for(T<S&&(T=S),L=1,E=1;E<=i;E++)if(L<<=1,(L-=P[E])<0)return-1;if(L>0&&(0===e||1!==I))return-1;for(R[1]=0,E=1;E<i;E++)R[E+1]=R[E]+P[E];for(C=0;C<c;C++)0!==t[n+C]&&(h[R[t[n+C]]++]=C);if(0===e?(D=B=h,x=19):1===e?(D=o,z-=257,B=a,N-=257,x=256):(D=s,B=l,x=-1),A=0,C=0,E=S,v=u,j=T,M=0,m=-1,b=(O=1<<T)-1,1===e&&O>852||2===e&&O>592)return 1;for(;;){y=E-M,h[C]<x?(w=0,_=h[C]):h[C]>x?(w=B[N+h[C]],_=D[z+h[C]]):(w=96,_=0),g=1<<E-M,S=f=1<<j;do{d[v+(A>>M)+(f-=g)]=y<<24|w<<16|_|0}while(0!==f);for(g=1<<E-1;A&g;)g>>=1;if(0!==g?(A&=g-1,A+=g):A=0,C++,0==--P[E]){if(E===I)break;E=t[n+h[C]]}if(E>T&&(A&b)!==m){for(0===M&&(M=T),v+=S,L=1<<(j=E-M);j+M<I&&!((L-=P[j+M])<=0);)j++,L<<=1;if(O+=1<<j,1===e&&O>852||2===e&&O>592)return 1;d[m=A&b]=T<<24|j<<16|v-u|0}}return 0!==A&&(d[v+A]=E-M<<24|64<<16|0),p.bits=T,0}},994:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},762:(e,t,n)=>{"use strict";var r=n(319);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var g=new Array(60);i(g);var f=new Array(512);i(f);var m=new Array(256);i(m);var b=new Array(29);i(b);var v,x,y,w=new Array(s);function _(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?f[e]:f[256+(e>>>7)]}function C(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function S(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,C(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function I(e,t,n){S(e,n[2*t],n[2*t+1])}function T(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function j(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=l;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=T(o[s]++,s))}}function M(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){e.bi_valid>8?C(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function O(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function A(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&O(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!O(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function D(e,t,n){var r,i,a,s,l=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===r?I(e,i,t):(I(e,(a=m[i])+o+1,t),0!==(s=c[a])&&S(e,i-=b[a],s),I(e,a=E(--r),n),0!==(s=d[a])&&S(e,r-=w[a],s))}while(l<e.last_lit);I(e,256,t)}function z(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<c;n++)0!==o[2*n]?(e.heap[++e.heap_len]=d=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=d,n=e.heap_len>>1;n>=1;n--)A(e,o,n);i=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],A(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,A(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(o=0;o<=l;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=c[2*c[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,m++),c[2*r+1]=o,r>d||(e.bl_count[o]++,a=0,r>=g&&(a=p[r-g]),s=c[2*r],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(u[2*r+1]+a)));if(0!==m){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>d||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),r--)}}(e,t),j(o,d,e.bl_count)}function P(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<l&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4))}function R(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<l&&i===a)){if(s<c)do{I(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(I(e,i,e.bl_tree),s--),I(e,16,e.bl_tree),S(e,s-3,2)):s<=10?(I(e,17,e.bl_tree),S(e,s-3,3)):(I(e,18,e.bl_tree),S(e,s-11,7));s=0,o=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4)}}i(w);var B=!1;function N(e,t,n,i){S(e,0+(i?1:0),3),function(e,t,n,i){L(e),i&&(C(e,n),C(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){B||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(b[r]=n,e=0;e<1<<c[r];e++)m[n++]=r;for(m[n-1]=r,i=0,r=0;r<16;r++)for(w[r]=i,e=0;e<1<<d[r];e++)f[i++]=r;for(i>>=7;r<s;r++)for(w[r]=i<<7,e=0;e<1<<d[r]-7;e++)f[256+i++]=r;for(t=0;t<=l;t++)o[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,o[8]++;for(;e<=255;)p[2*e+1]=9,e++,o[9]++;for(;e<=279;)p[2*e+1]=7,e++,o[7]++;for(;e<=287;)p[2*e+1]=8,e++,o[8]++;for(j(p,287,o),e=0;e<s;e++)g[2*e+1]=5,g[2*e]=T(e,5);v=new _(p,c,257,a,l),x=new _(g,d,0,s,l),y=new _(new Array(0),u,0,19,7)}(),B=!0),e.l_desc=new k(e.dyn_ltree,v),e.d_desc=new k(e.dyn_dtree,x),e.bl_desc=new k(e.bl_tree,y),e.bi_buf=0,e.bi_valid=0,M(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),z(e,e.l_desc),z(e,e.d_desc),s=function(e){var t;for(P(e,e.dyn_ltree,e.l_desc.max_code),P(e,e.dyn_dtree,e.d_desc.max_code),z(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?N(e,t,n,r):4===e.strategy||a===i?(S(e,2+(r?1:0),3),D(e,p,g)):(S(e,4+(r?1:0),3),function(e,t,n,r){var i;for(S(e,t-257,5),S(e,n-1,5),S(e,r-4,4),i=0;i<r;i++)S(e,e.bl_tree[2*h[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),D(e,e.dyn_ltree,e.dyn_dtree)),M(e),r&&L(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+o+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){S(e,2,3),I(e,256,p),function(e){16===e.bi_valid?(C(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},13:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},8281:e=>{e.exports=function(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",i=0;i<e.length;i++){var o=e[i];if(t)o?r+=String.fromCharCode(o):t=!1;else{if(!o)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");n+=String.fromCharCode(o)}}return{keyword:r,text:n}}},5813:e=>{e.exports=function(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n,r=e.length+t.length+1,i=new Uint8Array(r),o=0,a=0;a<e.length;a++){if(!(n=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");i[o++]=n}i[o++]=0;for(var s=0;s<t.length;s++){if(!(n=t.charCodeAt(s)))throw new Error("0x00 character is not permitted in tEXt content");i[o++]=n}return{name:"tEXt",data:i}}},6927:(e,t,n)=>{t.encode=n(5813),t.decode=n(8281)},3070:(e,t,n)=>{var r=n(885),i=n(3868);e.exports=function(e){var t,n=8,l=n;for(t=0;t<e.length;t++)n+=e[t].data.length,n+=12;var c=new Uint8Array(n);for(c[0]=137,c[1]=80,c[2]=78,c[3]=71,c[4]=13,c[5]=10,c[6]=26,c[7]=10,t=0;t<e.length;t++){var d=e[t],u=d.name,h=d.data,p=h.length,g=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)];s[0]=p,c[l++]=o[3],c[l++]=o[2],c[l++]=o[1],c[l++]=o[0],c[l++]=g[0],c[l++]=g[1],c[l++]=g[2],c[l++]=g[3];for(var f=0;f<p;)c[l++]=h[f++];var m=g.concat(r(h)),b=i.buf(m);a[0]=b,c[l++]=o[3],c[l++]=o[2],c[l++]=o[1],c[l++]=o[0]}return c};var o=new Uint8Array(4),a=new Int32Array(o.buffer),s=new Uint32Array(o.buffer)},9567:(e,t,n)=>{var r=n(3868);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],s=8;for(;s<e.length;){i[3]=e[s++],i[2]=e[s++],i[1]=e[s++],i[0]=e[s++];var l=a[0]+4,c=new Uint8Array(l);c[0]=e[s++],c[1]=e[s++],c[2]=e[s++],c[3]=e[s++];var d=String.fromCharCode(c[0])+String.fromCharCode(c[1])+String.fromCharCode(c[2])+String.fromCharCode(c[3]);if(!n.length&&"IHDR"!==d)throw new Error("IHDR header missing");if("IEND"===d){t=!0,n.push({name:d,data:new Uint8Array(0)});break}for(var u=4;u<l;u++)c[u]=e[s++];i[3]=e[s++],i[2]=e[s++],i[1]=e[s++],i[0]=e[s++];var h=o[0];if(r.buf(c)!==h)throw new Error("CRC values for "+d+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(c.buffer.slice(4));n.push({name:d,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var i=new Uint8Array(4),o=new Int32Array(i.buffer),a=new Uint32Array(i.buffer)},6575:(e,t,n)=>{"use strict";function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function i(e,t,n){const i=r(t,n);if(0===i)return r(e,t);let a=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),r(e,o(t,n,a))}function o(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function a(e,t,n,i){const s=i||[];if(function(e,t){const n=e[t+0],r=e[t+1],i=e[t+2],o=e[t+3];let a=3*r[0]-2*n[0]-o[0];a*=a;let s=3*r[1]-2*n[1]-o[1];s*=s;let l=3*i[0]-2*o[0]-n[0];l*=l;let c=3*i[1]-2*o[1]-n[1];return c*=c,a<l&&(a=l),s<c&&(s=c),a+s}(e,t)<n){const n=e[t+0];if(s.length){(l=s[s.length-1],c=n,Math.sqrt(r(l,c)))>1&&s.push(n)}else s.push(n);s.push(e[t+3])}else{const r=.5,i=e[t+0],l=e[t+1],c=e[t+2],d=e[t+3],u=o(i,l,r),h=o(l,c,r),p=o(c,d,r),g=o(u,h,r),f=o(h,p,r),m=o(g,f,r);a([i,u,g,m],0,n,s),a([m,f,p,d],0,n,s)}var l,c;return s}function s(e,t){return l(e,0,e.length,t)}function l(e,t,n,r,o){const a=o||[],s=e[t],c=e[n-1];let d=0,u=1;for(let r=t+1;r<n-1;++r){const t=i(e[r],s,c);t>d&&(d=t,u=r)}return Math.sqrt(d)>r?(l(e,t,u+1,r,a),l(e,u,n,r,a)):(a.length||a.push(s),a.push(c)),a}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15,n=arguments.length>2?arguments[2]:void 0;const r=[],i=(e.length-1)/3;for(let n=0;n<i;n++){a(e,3*n,t,r)}return n&&n>0?l(r,0,r.length,n):r}n.d(t,{o:()=>s,s:()=>c})},9636:(e,t,n)=>{"use strict";var r=n(9787),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:d,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},1337:(e,t,n)=>{"use strict";e.exports=n(9636)},8136:(e,t,n)=>{"use strict";function r(){return Math.floor(Math.random()*2**31)}n.d(t,{W:()=>r,k:()=>i});class i{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},6852:(e,t,n)=>{"use strict";function r(e,t,n){if(e&&e.length){const[r,i]=t,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);e.forEach((e=>{const[t,n]=e;e[0]=(t-r)*a-(n-i)*s+r,e[1]=(t-r)*s+(n-i)*a+i}))}}function i(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function o(e,t){const n=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.max(i,.1);const o=[0,0];if(n)for(const t of e)r(t,o,n);const a=function(e,t){const n=[];for(const t of e){const e=[...t];e[0].join(",")!==e[e.length-1].join(",")&&e.push([e[0][0],e[0][1]]),e.length>2&&n.push(e)}const r=[];t=Math.max(t,.1);const i=[];for(const e of n)for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if(n[1]!==r[1]){const e=Math.min(n[1],r[1]);i.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(i.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!i.length)return r;let o=[],a=i[0].ymin;for(;o.length||i.length;){if(i.length){let e=-1;for(let t=0;t<i.length&&!(i[t].ymin>a);t++)e=t;i.splice(0,e+1).forEach((e=>{o.push({s:a,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=a))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),o.length>1)for(let e=0;e<o.length;e+=2){const t=e+1;if(t>=o.length)break;const n=o[e].edge,i=o[t].edge;r.push([[Math.round(n.x),a],[Math.round(i.x),a]])}a+=t,o.forEach((e=>{e.edge.x=e.edge.x+t*e.edge.islope}))}return r}(e,i);if(n){for(const t of e)r(t,o,-n);!function(e,t,n){const i=[];e.forEach((e=>i.push(...e))),r(i,t,n)}(a,o,-n)}return a}n.d(t,{Z:()=>G});class a{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=o(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}}class s extends a{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);const r=o(e,Object.assign({},t,{hachureGap:n})),a=Math.PI/180*t.hachureAngle,s=[],l=.5*n*Math.cos(a),c=.5*n*Math.sin(a);for(const[e,t]of r)i([e,t])&&s.push([[e[0]-l,e[1]+c],[...t]],[[e[0]+l,e[1]-c],[...t]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}}class l extends a{fillPolygons(e,t){const n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}}class c{constructor(e){this.helper=e}fillPolygons(e,t){const n=o(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let o=t.fillWeight;o<0&&(o=t.strokeWidth/2);const a=r/4;for(const s of e){const e=i(s),l=e/r,c=Math.ceil(l)-1,d=e-c*r,u=(s[0][0]+s[1][0])/2-r/4,h=Math.min(s[0][1],s[1][1]);for(let e=0;e<c;e++){const i=h+d+e*r,s=u-a+2*Math.random()*a,l=i-a+2*Math.random()*a,c=this.helper.ellipse(s,l,o,o,t);n.push(...c.ops)}}return{type:"fillSketch",ops:n}}}class d{constructor(e){this.helper=e}fillPolygons(e,t){const n=o(e,t);return{type:"fillSketch",ops:this.dashedLine(n,t)}}dashedLine(e,t){const n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,o=[];return e.forEach((e=>{const a=i(e),s=Math.floor(a/(n+r)),l=(a+r-s*(n+r))/2;let c=e[0],d=e[1];c[0]>d[0]&&(c=e[1],d=e[0]);const u=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let e=0;e<s;e++){const i=e*(n+r),a=i+n,s=[c[0]+i*Math.cos(u)+l*Math.cos(u),c[1]+i*Math.sin(u)+l*Math.sin(u)],d=[c[0]+a*Math.cos(u)+l*Math.cos(u),c[1]+a*Math.sin(u)+l*Math.sin(u)];o.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],t))}})),o}}class u{constructor(e){this.helper=e}fillPolygons(e,t){const n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=o(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){const r=[];return e.forEach((e=>{const o=i(e),a=Math.round(o/(2*t));let s=e[0],l=e[1];s[0]>l[0]&&(s=e[1],l=e[0]);const c=Math.atan((l[1]-s[1])/(l[0]-s[0]));for(let e=0;e<a;e++){const i=2*e*t,o=2*(e+1)*t,a=Math.sqrt(2*Math.pow(t,2)),l=[s[0]+i*Math.cos(c),s[1]+i*Math.sin(c)],d=[s[0]+o*Math.cos(c),s[1]+o*Math.sin(c)],u=[l[0]+a*Math.cos(c+Math.PI/4),l[1]+a*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],n),...this.helper.doubleLineOps(u[0],u[1],d[0],d[1],n))}})),r}}const h={};var p=n(8136);const g={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function f(e,t){return e.type===t}function m(e){const t=[],n=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:"".concat(parseFloat(RegExp.$1))},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let r="BOD",i=0,o=n[i];for(;!f(o,2);){let a=0;const s=[];if("BOD"===r){if("M"!==o.text&&"m"!==o.text)return m("M0,0"+e);i++,a=g[o.text],r=o.text}else f(o,1)?a=g[r]:(i++,a=g[o.text],r=o.text);if(!(i+a<n.length))throw new Error("Path data ended short");for(let e=i;e<i+a;e++){const t=n[e];if(!f(t,1))throw new Error("Param not a number: "+r+","+t.text);s[s.length]=+t.text}if("number"!=typeof g[r])throw new Error("Bad segment: "+r);{const e={key:r,data:s};t.push(e),i+=a,o=n[i],"M"===r&&(r="L"),"m"===r&&(r="l")}}return t}function b(e){let t=0,n=0,r=0,i=0;const o=[];for(const{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,n]=s,[r,i]=s;break;case"m":t+=s[0],n+=s[1],o.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":o.push({key:"L",data:[...s]}),[t,n]=s;break;case"l":t+=s[0],n+=s[1],o.push({key:"L",data:[t,n]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],n=s[5];break;case"c":{const e=s.map(((e,r)=>r%2?e+n:e+t));o.push({key:"C",data:e}),t=e[4],n=e[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{const e=s.map(((e,r)=>r%2?e+n:e+t));o.push({key:"Q",data:e}),t=e[2],n=e[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{const e=s.map(((e,r)=>r%2?e+n:e+t));o.push({key:"S",data:e}),t=e[2],n=e[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],o.push({key:"T",data:[t,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,n=i}return o}function v(e){const t=[];let n="",r=0,i=0,o=0,a=0,s=0,l=0;for(const{key:c,data:d}of e){switch(c){case"M":t.push({key:"M",data:[...d]}),[r,i]=d,[o,a]=d;break;case"C":t.push({key:"C",data:[...d]}),r=d[4],i=d[5],s=d[2],l=d[3];break;case"L":t.push({key:"L",data:[...d]}),[r,i]=d;break;case"H":r=d[0],t.push({key:"L",data:[r,i]});break;case"V":i=d[0],t.push({key:"L",data:[r,i]});break;case"S":{let e=0,o=0;"C"===n||"S"===n?(e=r+(r-s),o=i+(i-l)):(e=r,o=i),t.push({key:"C",data:[e,o,...d]}),s=d[0],l=d[1],r=d[2],i=d[3];break}case"T":{const[e,o]=d;let a=0,c=0;"Q"===n||"T"===n?(a=r+(r-s),c=i+(i-l)):(a=r,c=i);const u=r+2*(a-r)/3,h=i+2*(c-i)/3,p=e+2*(a-e)/3,g=o+2*(c-o)/3;t.push({key:"C",data:[u,h,p,g,e,o]}),s=a,l=c,r=e,i=o;break}case"Q":{const[e,n,o,a]=d,c=r+2*(e-r)/3,u=i+2*(n-i)/3,h=o+2*(e-o)/3,p=a+2*(n-a)/3;t.push({key:"C",data:[c,u,h,p,o,a]}),s=e,l=n,r=o,i=a;break}case"A":{const e=Math.abs(d[0]),n=Math.abs(d[1]),o=d[2],a=d[3],s=d[4],l=d[5],c=d[6];if(0===e||0===n)t.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c;else if(r!==l||i!==c){y(r,i,l,c,e,n,o,a,s).forEach((function(e){t.push({key:"C",data:e})})),r=l,i=c}break}case"Z":t.push({key:"Z",data:[]}),r=o,i=a}n=c}return t}function x(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function y(e,t,n,r,i,o,a,s,l,c){const d=(u=a,Math.PI*u/180);var u;let h=[],p=0,g=0,f=0,m=0;if(c)[p,g,f,m]=c;else{[e,t]=x(e,t,-d),[n,r]=x(n,r,-d);const a=(e-n)/2,c=(t-r)/2;let u=a*a/(i*i)+c*c/(o*o);u>1&&(u=Math.sqrt(u),i*=u,o*=u);const h=i*i,b=o*o,v=h*b-h*c*c-b*a*a,y=h*c*c+b*a*a,w=(s===l?-1:1)*Math.sqrt(Math.abs(v/y));f=w*i*c/o+(e+n)/2,m=w*-o*a/i+(t+r)/2,p=Math.asin(parseFloat(((t-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),e<f&&(p=Math.PI-p),n<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let b=g-p;if(Math.abs(b)>120*Math.PI/180){const e=g,t=n,s=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=y(n=f+i*Math.cos(g),r=m+o*Math.sin(g),t,s,i,o,a,0,l,[g,e,f,m])}b=g-p;const v=Math.cos(p),w=Math.sin(p),_=Math.cos(g),k=Math.sin(g),E=Math.tan(b/4),C=4/3*i*E,S=4/3*o*E,I=[e,t],T=[e+C*w,t-S*v],j=[n+C*k,r-S*_],M=[n,r];if(T[0]=2*I[0]-T[0],T[1]=2*I[1]-T[1],c)return[T,j,M].concat(h);{h=[T,j,M].concat(h);const e=[];for(let t=0;t<h.length;t+=3){const n=x(h[t][0],h[t][1],d),r=x(h[t+1][0],h[t+1][1],d),i=x(h[t+2][0],h[t+2][1],d);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}const w={randOffset:function(e,t){return A(e,t)},randOffsetWithRange:function(e,t,n){return O(e,t,n)},ellipse:function(e,t,n,r,i){const o=S(n,r,i);return I(e,t,i,o).opset},doubleLineOps:function(e,t,n,r,i){return D(e,t,n,r,i,!0)}};function _(e,t,n,r,i){return{type:"path",ops:D(e,t,n,r,i)}}function k(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let t=0;t<r-1;t++)i.push(...D(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...D(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return 2===r?_(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function E(e,t,n,r,i){return function(e,t){return k(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function C(e,t){let n=P(e,1*(1+.2*t.roughness),t);if(!t.disableMultiStroke){const r=P(e,1.5*(1+.22*t.roughness),function(e){const t=Object.assign({},e);t.randomizer=void 0,e.seed&&(t.seed=e.seed+1);return t}(t));n=n.concat(r)}return{type:"path",ops:n}}function S(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let a=Math.abs(e/2),s=Math.abs(t/2);const l=1-n.curveFitting;return a+=A(a*l,n),s+=A(s*l,n),{increment:o,rx:a,ry:s}}function I(e,t,n,r){const[i,o]=B(r.increment,e,t,r.rx,r.ry,1,r.increment*O(.1,O(.4,1,n),n),n);let a=R(i,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[i]=B(r.increment,e,t,r.rx,r.ry,1.5,0,n),o=R(i,null,n);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function T(e,t,n,r,i,o,a,s,l){const c=e,d=t;let u=Math.abs(n/2),h=Math.abs(r/2);u+=A(.01*u,l),h+=A(.01*h,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),b=N(m,c,d,u,h,p,g,1,l);if(!l.disableMultiStroke){const e=N(m,c,d,u,h,p,g,1.5,l);b.push(...e)}return a&&(s?b.push(...D(c,d,c+u*Math.cos(p),d+h*Math.sin(p),l),...D(c,d,c+u*Math.cos(g),d+h*Math.sin(g),l)):b.push({op:"lineTo",data:[c,d]},{op:"lineTo",data:[c+u*Math.cos(p),d+h*Math.sin(p)]})),{type:"path",ops:b}}function j(e,t){const n=[];for(const r of e)if(r.length){const e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+A(e,t),r[0][1]+A(e,t)]});for(let o=1;o<i;o++)n.push({op:"lineTo",data:[r[o][0]+A(e,t),r[o][1]+A(e,t)]})}}return{type:"fillPath",ops:n}}function M(e,t){return function(e,t){let n=e.fillStyle||"hachure";if(!h[n])switch(n){case"zigzag":h[n]||(h[n]=new s(t));break;case"cross-hatch":h[n]||(h[n]=new l(t));break;case"dots":h[n]||(h[n]=new c(t));break;case"dashed":h[n]||(h[n]=new d(t));break;case"zigzag-line":h[n]||(h[n]=new u(t));break;default:n="hachure",h[n]||(h[n]=new a(t))}return h[n]}(t,w).fillPolygons(e,t)}function L(e){return e.randomizer||(e.randomizer=new p.k(e.seed||0)),e.randomizer.next()}function O(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return n.roughness*r*(L(n)*(t-e)+e)}function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return O(-e,e,t,n)}function D(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=z(e,t,n,r,i,!0,!1);if(a)return s;const l=z(e,t,n,r,i,!0,!0);return s.concat(l)}function z(e,t,n,r,i,o,a){const s=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>s&&(d=l/10);const u=d/2,h=.2+.2*L(i);let p=i.bowing*i.maxRandomnessOffset*(r-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=A(p,i,c),g=A(g,i,c);const f=[],m=()=>A(u,i,c),b=()=>A(d,i,c),v=i.preserveVertices;return o&&(a?f.push({op:"move",data:[e+(v?0:m()),t+(v?0:m())]}):f.push({op:"move",data:[e+(v?0:A(d,i,c)),t+(v?0:A(d,i,c))]})),a?f.push({op:"bcurveTo",data:[p+e+(n-e)*h+m(),g+t+(r-t)*h+m(),p+e+2*(n-e)*h+m(),g+t+2*(r-t)*h+m(),n+(v?0:m()),r+(v?0:m())]}):f.push({op:"bcurveTo",data:[p+e+(n-e)*h+b(),g+t+(r-t)*h+b(),p+e+2*(n-e)*h+b(),g+t+2*(r-t)*h+b(),n+(v?0:b()),r+(v?0:b())]}),f}function P(e,t,n){const r=[];r.push([e[0][0]+A(t,n),e[0][1]+A(t,n)]),r.push([e[0][0]+A(t,n),e[0][1]+A(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+A(t,n),e[i][1]+A(t,n)]),i===e.length-1&&r.push([e[i][0]+A(t,n),e[i][1]+A(t,n)]);return R(r,null,n)}function R(e,t,n){const r=e.length,i=[];if(r>3){const o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){const n=e[t];o[0]=[n[0],n[1]],o[1]=[n[0]+(a*e[t+1][0]-a*e[t-1][0])/6,n[1]+(a*e[t+1][1]-a*e[t-1][1])/6],o[2]=[e[t+1][0]+(a*e[t][0]-a*e[t+2][0])/6,e[t+1][1]+(a*e[t][1]-a*e[t+2][1])/6],o[3]=[e[t+1][0],e[t+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&2===t.length){const e=n.maxRandomnessOffset;i.push({op:"lineTo",data:[t[0]+A(e,n),t[1]+A(e,n)]})}}else 3===r?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&i.push(...D(e[0][0],e[0][1],e[1][0],e[1][1],n));return i}function B(e,t,n,r,i,o,a,s){const l=[],c=[];if(0===s.roughness){e/=4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let o=0;o<=2*Math.PI;o+=e){const e=[t+r*Math.cos(o),n+i*Math.sin(o)];l.push(e),c.push(e)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const d=A(.5,s)-Math.PI/2;c.push([A(o,s)+t+.9*r*Math.cos(d-e),A(o,s)+n+.9*i*Math.sin(d-e)]);const u=2*Math.PI+d-.01;for(let a=d;a<u;a+=e){const e=[A(o,s)+t+r*Math.cos(a),A(o,s)+n+i*Math.sin(a)];l.push(e),c.push(e)}c.push([A(o,s)+t+r*Math.cos(d+2*Math.PI+.5*a),A(o,s)+n+i*Math.sin(d+2*Math.PI+.5*a)]),c.push([A(o,s)+t+.98*r*Math.cos(d+a),A(o,s)+n+.98*i*Math.sin(d+a)]),c.push([A(o,s)+t+.9*r*Math.cos(d+.5*a),A(o,s)+n+.9*i*Math.sin(d+.5*a)])}return[c,l]}function N(e,t,n,r,i,o,a,s,l){const c=o+A(.1,l),d=[];d.push([A(s,l)+t+.9*r*Math.cos(c-e),A(s,l)+n+.9*i*Math.sin(c-e)]);for(let o=c;o<=a;o+=e)d.push([A(s,l)+t+r*Math.cos(o),A(s,l)+n+i*Math.sin(o)]);return d.push([t+r*Math.cos(a),n+i*Math.sin(a)]),d.push([t+r*Math.cos(a),n+i*Math.sin(a)]),R(d,null,l)}function H(e,t,n,r,i,o,a,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let d=[0,0];const u=s.disableMultiStroke?1:2,h=s.preserveVertices;for(let p=0;p<u;p++)0===p?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(h?0:A(c[0],s)),a[1]+(h?0:A(c[0],s))]}),d=h?[i,o]:[i+A(c[p],s),o+A(c[p],s)],l.push({op:"bcurveTo",data:[e+A(c[p],s),t+A(c[p],s),n+A(c[p],s),r+A(c[p],s),d[0],d[1]]});return l}function W(e){return[...e]}var U=n(6575);const F="none";class K{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,p.W)()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){const o=this._o(i);return this._d("line",[_(e,t,n,r,o)],o)}rectangle(e,t,n,r,i){const o=this._o(i),a=[],s=E(e,t,n,r,o);if(o.fill){const i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===o.fillStyle?a.push(j([i],o)):a.push(M([i],o))}return o.stroke!==F&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,n,r,i){const o=this._o(i),a=[],s=S(n,r,o),l=I(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const n=I(e,t,o,s).opset;n.type="fillPath",a.push(n)}else a.push(M([l.estimatedPoints],o));return o.stroke!==F&&a.push(l.opset),this._d("ellipse",a,o)}circle(e,t,n,r){const i=this.ellipse(e,t,n,n,r);return i.shape="circle",i}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[k(e,!1,n)],n)}arc(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0;const l=this._o(s),c=[],d=T(e,t,n,r,i,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=T(e,t,n,r,i,o,!0,!1,a);s.type="fillPath",c.push(s)}else c.push(function(e,t,n,r,i,o,a){const s=e,l=t;let c=Math.abs(n/2),d=Math.abs(r/2);c+=A(.01*c,a),d+=A(.01*d,a);let u=i,h=o;for(;u<0;)u+=2*Math.PI,h+=2*Math.PI;h-u>2*Math.PI&&(u=0,h=2*Math.PI);const p=(h-u)/a.curveStepCount,g=[];for(let e=u;e<=h;e+=p)g.push([s+c*Math.cos(e),l+d*Math.sin(e)]);return g.push([s+c*Math.cos(h),l+d*Math.sin(h)]),g.push([s,l]),M([g],a)}(e,t,n,r,i,o,l));return l.stroke!==F&&c.push(d),this._d("arc",c,l)}curve(e,t){const n=this._o(t),r=[],i=C(e,n);if(n.fill&&n.fill!==F&&e.length>=3){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(W(e[0]),W(e[1]),W(e[2]),W(e[2]));else{const n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);const i=[],o=1-t;r.push(W(n[0]));for(let e=1;e+2<n.length;e++){const t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(o*n[e+1][0]-o*n[e-1][0])/6,t[1]+(o*n[e+1][1]-o*n[e-1][1])/6],i[2]=[n[e+1][0]+(o*n[e][0]-o*n[e+2][0])/6,n[e+1][1]+(o*n[e][1]-o*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}(e),i=(0,U.s)(t,10,(1+n.roughness)/2);"solid"===n.fillStyle?r.push(j([i],n)):r.push(M([i],n))}return n.stroke!==F&&r.push(i),this._d("curve",r,n)}polygon(e,t){const n=this._o(t),r=[],i=k(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(j([e],n)):r.push(M([e],n))),n.stroke!==F&&r.push(i),this._d("polygon",r,n)}path(e,t){const n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==F,o=n.stroke!==F,a=!!(n.simplification&&n.simplification<1),s=function(e,t,n){const r=v(b(m(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...(0,U.s)(s,t)),s=[]},c=()=>{l(),o.length&&(i.push(o),o=[])};for(const{key:e,data:t}of r)switch(e){case"M":c(),a=[t[0],t[1]],o.push(a);break;case"L":l(),o.push([t[0],t[1]]);break;case"C":if(!s.length){const e=o.length?o[o.length-1]:a;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(c(),!n)return i;const d=[];for(const e of i){const t=(0,U.o)(e,n);t.length&&d.push(t)}return d}(e,1,a?4-4*n.simplification:(1+n.roughness)/2);return i&&("solid"===n.fillStyle?r.push(j(s,n)):r.push(M(s,n))),o&&(a?s.forEach((e=>{r.push(k(e,!1,n))})):r.push(function(e,t){const n=v(b(m(e))),r=[];let i=[0,0],o=[0,0];for(const{key:e,data:a}of n)switch(e){case"M":{const e=1*(t.maxRandomnessOffset||0),n=t.preserveVertices;r.push({op:"move",data:a.map((r=>r+(n?0:A(e,t))))}),o=[a[0],a[1]],i=[a[0],a[1]];break}case"L":r.push(...D(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]];break;case"C":{const[e,n,i,s,l,c]=a;r.push(...H(e,n,i,s,l,c,o,t)),o=[l,c];break}case"Z":r.push(...D(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:r}}(e,n))),this._d("path",r,n)}opsToPath(e,t){let n="";for(const r of e.ops){const e="number"==typeof t&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case"move":n+="M".concat(e[0]," ").concat(e[1]," ");break;case"bcurveTo":n+="C".concat(e[0]," ").concat(e[1],", ").concat(e[2]," ").concat(e[3],", ").concat(e[4]," ").concat(e[5]," ");break;case"lineTo":n+="L".concat(e[0]," ").concat(e[1]," ")}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(const e of t){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:F};break;case"fillPath":t={d:this.opsToPath(e),stroke:F,strokeWidth:0,fill:n.fill||F};break;case"fillSketch":t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||F,strokeWidth:n,fill:F}}}class V{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new K(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(const o of t)switch(o.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,o,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const t="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(r,o,i,t),r.restore();break}case"fillSketch":this.fillSketch(r,o,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"nonzero";e.beginPath();for(const r of t.ops){const t="number"==typeof n&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case"move":e.moveTo(t[0],t[1]);break;case"bcurveTo":e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case"lineTo":e.lineTo(t[0],t[1])}}"fillPath"===t.type?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){const o=this.gen.line(e,t,n,r,i);return this.draw(o),o}rectangle(e,t,n,r,i){const o=this.gen.rectangle(e,t,n,r,i);return this.draw(o),o}ellipse(e,t,n,r,i){const o=this.gen.ellipse(e,t,n,r,i);return this.draw(o),o}circle(e,t,n,r){const i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0;const l=this.gen.arc(e,t,n,r,i,o,a,s);return this.draw(l),l}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){const n=this.gen.path(e,t);return this.draw(n),n}}const Y="http://www.w3.org/2000/svg";class Z{constructor(e,t){this.svg=e,this.gen=new K(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(Y,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset","".concat(n.strokeLineDashOffset));break;case"fillPath":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(r,a,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=e.createElementNS(Y,"path");return i.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset","".concat(n.fillLineDashOffset)),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){const o=this.gen.line(e,t,n,r,i);return this.draw(o)}rectangle(e,t,n,r,i){const o=this.gen.rectangle(e,t,n,r,i);return this.draw(o)}ellipse(e,t,n,r,i){const o=this.gen.ellipse(e,t,n,r,i);return this.draw(o)}circle(e,t,n,r){const i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0;const l=this.gen.arc(e,t,n,r,i,o,a,s);return this.draw(l)}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n)}path(e,t){const n=this.gen.path(e,t);return this.draw(n)}}const G={canvas:(e,t)=>new V(e,t),svg:(e,t)=>new Z(e,t),generator:e=>new K(e),newSeed:()=>K.newSeed()}},885:e=>{e.exports=function(e,t,n){var r=[],i=e.length;if(0===i)return r;var o=t<0?Math.max(0,t+i):t||0;for(void 0!==n&&(i=n<0?n+i:n);i-- >o;)r[i-o]=e[i];return r}},828:(e,t,n)=>{"use strict";n.d(t,{Lo:()=>C,CZ:()=>S});var r=n(5564),i=n(3646),o=n(1319),a=n(4041),s=n(8288),l=n(5118),c=n(5202),d=n(6066),u=n(75),h=n(2264),p=n(746),g=n(6340),f=n(7901),m=n(9910),b=n(1935),v=n(8897),x=n(9787),y=n(7067),w=n(4981),_=n(1337);const k=e=>{let{onConfirm:t}=e;const[n,r]=(0,x.useState)(!1),a=()=>{r(!n)};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(o.V,{type:"button",icon:i._I,title:(0,c.t)("buttons.clearReset"),"aria-label":(0,c.t)("buttons.clearReset"),showAriaLabel:(0,y.Fy)().isMobile,onClick:a,"data-testid":"clear-canvas-button"}),n&&(0,_.jsx)(w.Z,{onConfirm:()=>{t(),a()},onCancel:a,title:(0,c.t)("clearCanvasDialog.title"),children:(0,_.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,c.t)("alerts.clearReset")]})})]})};var E=n(741);(0,f.z)({name:"changeViewBackgroundColor",trackEvent:!1,perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),n),commitToHistory:!!n.viewBackgroundColor}),PanelComponent:e=>{let{elements:t,appState:n,updateData:i}=e;return(0,_.jsx)("div",{style:{position:"relative"},children:(0,_.jsx)(r.z,{label:(0,c.t)("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:e=>i({viewBackgroundColor:e}),isActive:"canvasColorPicker"===n.openPopup,setActive:e=>i({openPopup:e?"canvasColorPicker":null}),"data-testid":"canvas-background-picker",elements:t,appState:n})})}}),(0,f.z)({name:"clearCanvas",trackEvent:{category:"canvas"},perform:(e,t,n,r)=>(r.imageCache.clear(),{elements:e.map((e=>(0,b.BE)(e,{isDeleted:!0}))),appState:Object.assign(Object.assign({},(0,v.im)()),{files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,showStats:t.showStats,pasteDialog:t.pasteDialog,activeTool:"image"===t.activeTool.type?Object.assign(Object.assign({},t.activeTool),{type:"selection"}):t.activeTool}),commitToHistory:!0}),PanelComponent:e=>{let{updateData:t}=e;return(0,_.jsx)(k,{onConfirm:t})}});const C=(0,f.z)({name:"zoomIn",trackEvent:{category:"canvas"},perform:(e,t,n,r)=>({appState:Object.assign(Object.assign({},t),(0,p.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,u.j)(t.zoom.value+s.V4)},t)),commitToHistory:!1}),PanelComponent:e=>{let{updateData:t}=e;return(0,_.jsx)(o.V,{type:"button",icon:i.kr,title:"".concat((0,c.t)("buttons.zoomIn")," — ").concat((0,g.uY)("CtrlOrCmd++")),"aria-label":(0,c.t)("buttons.zoomIn"),onClick:()=>{t(null)},size:"small"})},keyTest:e=>(e.code===d.aU.EQUAL||e.code===d.aU.NUM_ADD)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}),S=(0,f.z)({name:"zoomOut",trackEvent:{category:"canvas"},perform:(e,t,n,r)=>({appState:Object.assign(Object.assign({},t),(0,p.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,u.j)(t.zoom.value-s.V4)},t)),commitToHistory:!1}),PanelComponent:e=>{let{updateData:t}=e;return(0,_.jsx)(o.V,{type:"button",icon:i.vG,title:"".concat((0,c.t)("buttons.zoomOut")," — ").concat((0,g.uY)("CtrlOrCmd+-")),"aria-label":(0,c.t)("buttons.zoomOut"),onClick:()=>{t(null)},size:"small"})},keyTest:e=>(e.code===d.aU.MINUS||e.code===d.aU.NUM_SUBTRACT)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}),I=((0,f.z)({name:"resetZoom",trackEvent:{category:"canvas"},perform:(e,t,n,r)=>({appState:Object.assign(Object.assign({},t),(0,p.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,u.j)(1)},t)),commitToHistory:!1}),PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,_.jsx)(m.u,{label:(0,c.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,_.jsxs)(o.V,{type:"button",className:"reset-zoom-button",title:(0,c.t)("buttons.resetZoom"),"aria-label":(0,c.t)("buttons.resetZoom"),onClick:()=>{t(null)},size:"small",children:[(100*n.zoom.value).toFixed(0),"%"]})})},keyTest:e=>(e.code===d.aU.ZERO||e.code===d.aU.NUM_ZERO)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}),(e,t)=>{const[n,r,i,o]=e,a=i-n,l=t.width/a,c=o-r,d=t.height/c,u=Math.min(l,d),h=Math.floor(u/s.V4)*s.V4;return Math.min(Math.max(h,s.V4),1)}),T=(e,t,n)=>{const r=(0,l.Lm)(e),i=(0,u.eD)(r,t),o=n&&i.length>0?(0,l.KP)(i):(0,l.KP)(r),a={value:I(o,{width:t.width,height:t.height})},[s,c,d,p]=o,g=(s+d)/2,f=(c+p)/2;return{appState:Object.assign(Object.assign(Object.assign({},t),(0,h.s)({scenePoint:{x:g,y:f},viewportDimensions:{width:t.width,height:t.height},zoom:a})),{zoom:a}),commitToHistory:!1}};(0,f.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:(e,t)=>T(e,t,!0),keyTest:e=>e.code===d.aU.TWO&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}),(0,f.z)({name:"zoomToFit",trackEvent:{category:"canvas"},perform:(e,t)=>T(e,t,!1),keyTest:e=>e.code===d.aU.ONE&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}),(0,f.z)({name:"toggleTheme",trackEvent:{category:"canvas"},perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{theme:n||(t.theme===s.C6.LIGHT?s.C6.DARK:s.C6.LIGHT)}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n}=e;return(0,_.jsx)("div",{style:{marginInlineStart:"0.25rem"},children:(0,_.jsx)(a.J,{value:t.theme,onChange:e=>{n(e)}})})},keyTest:e=>e.altKey&&e.shiftKey&&e.code===d.aU.D}),(0,f.z)({name:"eraser",trackEvent:{category:"toolbar"},perform:(e,t)=>{let n;return n=(0,v.EN)(t)?(0,g.Om)(t,Object.assign(Object.assign({},t.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{lastActiveToolBeforeEraser:null})):(0,g.Om)(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:Object.assign(Object.assign({},t),{selectedElementIds:{},selectedGroupIds:{},activeTool:n}),commitToHistory:!0}},keyTest:e=>e.key===d.tW.E,PanelComponent:e=>{let{elements:t,appState:n,updateData:r,data:a}=e;return(0,_.jsx)(o.V,{type:"button",icon:i.rn,className:(0,E.Z)("eraser",{active:(0,v.EN)(n)}),title:"".concat((0,c.t)("toolBar.eraser"),"-").concat((0,g.uY)("E")),"aria-label":(0,c.t)("toolBar.eraser"),onClick:()=>{r(null)},size:(null==a?void 0:a.size)||"medium"})}})},3917:(e,t,n)=>{"use strict";n.d(t,{Tu:()=>T,Zq:()=>j});var r=n(741),i=n(1337);const o=e=>{let{options:t,value:n,onChange:o,group:a}=e;return(0,i.jsx)("div",{className:"buttonList buttonListIcon",children:t.map((e=>(0,i.jsxs)("label",{className:(0,r.Z)({active:n===e.value}),title:e.text,children:[(0,i.jsx)("input",{type:"radio",name:a,onChange:()=>o(e.value),checked:n===e.value,"data-testid":e.testId}),e.icon]},e.text)))})};var a=n(5564),s=n(9787),l=n.n(s),c=n(7288),d=(n(7117),n(6066)),u=n(5202);function h(e){let{options:t,value:n,label:r,onChange:o,onClose:a}=e;const s=l().useRef(),c=l().useRef(),h=l().useRef(null);l().useEffect((()=>{c.current?c.current.focus():h.current&&h.current.focus()}),[]);return(0,i.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":r,onKeyDown:e=>{const n=t.find((t=>t.keyBinding===e.key.toLowerCase()));if(e.metaKey||e.altKey||e.ctrlKey||!n)if(e.key===d.tW.TAB)setTimeout((()=>{c.current!==document.activeElement&&a()}),0);else if((0,d.Wl)(e.key)){const{activeElement:n}=document,r=(0,u.G3)().rtl,i=Array.prototype.indexOf.call(h.current.children,n);if(-1!==i){const n=t.length;let o=i;switch(e.key){case r?d.tW.ARROW_LEFT:d.tW.ARROW_RIGHT:case d.tW.ARROW_DOWN:o=(i+1)%n;break;case r?d.tW.ARROW_RIGHT:d.tW.ARROW_LEFT:case d.tW.ARROW_UP:o=(n+i-1)%n}h.current.children[o].focus()}e.preventDefault()}else e.key!==d.tW.ESCAPE&&e.key!==d.tW.ENTER||(e.preventDefault(),a());else{const r=t.indexOf(n);h.current.children[r].focus(),e.preventDefault()}e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},children:(0,i.jsx)("div",{className:"picker-content",ref:h,children:t.map(((e,t)=>(0,i.jsxs)("button",{className:"picker-option",onClick:t=>{t.currentTarget.focus(),o(e.value)},title:"".concat(e.text," — ").concat(e.keyBinding.toUpperCase()),"aria-label":e.text||"none","aria-keyshortcuts":e.keyBinding,ref:r=>{r&&0===t&&(s.current=r),r&&e.value===n&&(c.current=r)},onFocus:()=>{o(e.value)},children:[e.icon,(0,i.jsx)("span",{className:"picker-keybinding",children:e.keyBinding})]},e.text)))})})}function p(e){var t;let{value:n,label:r,options:o,onChange:a,group:s=""}=e;const[d,p]=l().useState(!1),g=l().useRef(null),f=(0,u.G3)().rtl;return(0,i.jsxs)("label",{className:"picker-container",children:[(0,i.jsx)("button",{name:s,className:d?"active":"","aria-label":r,onClick:()=>p(!d),ref:g,children:null===(t=o.find((e=>e.value===n)))||void 0===t?void 0:t.icon}),(0,i.jsx)(l().Suspense,{fallback:"",children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.J,Object.assign(Object.assign({onCloseRequest:e=>e.target!==g.current&&p(!1)},f?{right:5.5}:{left:-5.5}),{children:(0,i.jsx)(h,{options:o,value:n,label:r,onChange:a,onClose:()=>{var e;p(!1),null===(e=g.current)||void 0===e||e.focus()}})})),(0,i.jsx)("div",{className:"picker-triangle"})]}):null})]})}var g=n(3646),f=n(8288),m=n(5118),b=n(1935),v=n(5710),x=n(1974),y=n(6954),w=n(75),_=n(8120),k=n(6340),E=n(7901);const C=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=(0,k.xn)((0,w.eD)(e,t,r));return e.map((e=>{var r;return i.get(e.id)||e.id===(null===(r=t.editingElement)||void 0===r?void 0:r.id)?n(e):e}))},S=function(e,t,n,r){var i,o;const a=t.editingElement,s=(0,m.Lm)(e);return null!==(i=null!==(o=a&&n(a))&&void 0!==o?o:(0,w.N)(s,t)?(0,w.PR)(s,t,n):r)&&void 0!==i?i:null},I=(e,t,n,r)=>{const i=new Set;return{elements:C(e,t,(e=>{if((0,m.iB)(e)){const o=n(e);i.add(o);let a=(0,b.BE)(e,{fontSize:o});return(0,m.oN)(a,(0,v.tl)(e)),t=e,r=a,a=(0,x.Xh)(r)?r:(0,b.DR)(r,{x:"left"===t.textAlign?t.x:t.x+(t.width-r.width)/("center"===t.textAlign?2:1),y:t.y+(t.height-r.height)/2},!1),a}var t,r;return e}),!0),appState:Object.assign(Object.assign({},t),{currentItemFontSize:1===i.size?[...i][0]:null!=r?r:t.currentItemFontSize}),commitToHistory:!0}},T=((0,E.z)({name:"changeStrokeColor",trackEvent:!1,perform:(e,t,n)=>Object.assign(Object.assign({},n.currentItemStrokeColor&&{elements:C(e,t,(e=>(0,_.PD)(e.type)?(0,b.BE)(e,{strokeColor:n.currentItemStrokeColor}):e),!0)}),{appState:Object.assign(Object.assign({},t),n),commitToHistory:!!n.currentItemStrokeColor}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{"aria-hidden":"true",children:(0,u.t)("labels.stroke")}),(0,i.jsx)(a.z,{type:"elementStroke",label:(0,u.t)("labels.stroke"),color:S(t,n,(e=>e.strokeColor),n.currentItemStrokeColor),onChange:e=>r({currentItemStrokeColor:e}),isActive:"strokeColorPicker"===n.openPopup,setActive:e=>r({openPopup:e?"strokeColorPicker":null}),elements:t,appState:n})]})}}),(0,E.z)({name:"changeBackgroundColor",trackEvent:!1,perform:(e,t,n)=>Object.assign(Object.assign({},n.currentItemBackgroundColor&&{elements:C(e,t,(e=>(0,b.BE)(e,{backgroundColor:n.currentItemBackgroundColor})))}),{appState:Object.assign(Object.assign({},t),n),commitToHistory:!!n.currentItemBackgroundColor}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{"aria-hidden":"true",children:(0,u.t)("labels.background")}),(0,i.jsx)(a.z,{type:"elementBackground",label:(0,u.t)("labels.background"),color:S(t,n,(e=>e.backgroundColor),n.currentItemBackgroundColor),onChange:e=>r({currentItemBackgroundColor:e}),isActive:"backgroundColorPicker"===n.openPopup,setActive:e=>r({openPopup:e?"backgroundColorPicker":null}),elements:t,appState:n})]})}}),(0,E.z)({name:"changeFillStyle",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>(0,b.BE)(e,{fillStyle:n}))),appState:Object.assign(Object.assign({},t),{currentItemFillStyle:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.fill")}),(0,i.jsx)(o,{options:[{value:"hachure",text:(0,u.t)("labels.hachure"),icon:(0,i.jsx)(g.a0,{theme:n.theme})},{value:"cross-hatch",text:(0,u.t)("labels.crossHatch"),icon:(0,i.jsx)(g.np,{theme:n.theme})},{value:"solid",text:(0,u.t)("labels.solid"),icon:(0,i.jsx)(g.X7,{theme:n.theme})}],group:"fill",value:S(t,n,(e=>e.fillStyle),n.currentItemFillStyle),onChange:e=>{r(e)}})]})}}),(0,E.z)({name:"changeStrokeWidth",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>(0,b.BE)(e,{strokeWidth:n}))),appState:Object.assign(Object.assign({},t),{currentItemStrokeWidth:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.strokeWidth")}),(0,i.jsx)(o,{group:"stroke-width",options:[{value:1,text:(0,u.t)("labels.thin"),icon:(0,i.jsx)(g.tY,{theme:n.theme,strokeWidth:2})},{value:2,text:(0,u.t)("labels.bold"),icon:(0,i.jsx)(g.tY,{theme:n.theme,strokeWidth:6})},{value:4,text:(0,u.t)("labels.extraBold"),icon:(0,i.jsx)(g.tY,{theme:n.theme,strokeWidth:10})}],value:S(t,n,(e=>e.strokeWidth),n.currentItemStrokeWidth),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeSloppiness",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>(0,b.BE)(e,{seed:(0,y.LU)(),roughness:n}))),appState:Object.assign(Object.assign({},t),{currentItemRoughness:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.sloppiness")}),(0,i.jsx)(o,{group:"sloppiness",options:[{value:0,text:(0,u.t)("labels.architect"),icon:(0,i.jsx)(g.bf,{theme:n.theme})},{value:1,text:(0,u.t)("labels.artist"),icon:(0,i.jsx)(g.kM,{theme:n.theme})},{value:2,text:(0,u.t)("labels.cartoonist"),icon:(0,i.jsx)(g.W2,{theme:n.theme})}],value:S(t,n,(e=>e.roughness),n.currentItemRoughness),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeStrokeStyle",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>(0,b.BE)(e,{strokeStyle:n}))),appState:Object.assign(Object.assign({},t),{currentItemStrokeStyle:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.strokeStyle")}),(0,i.jsx)(o,{group:"strokeStyle",options:[{value:"solid",text:(0,u.t)("labels.strokeStyle_solid"),icon:(0,i.jsx)(g.nu,{theme:n.theme})},{value:"dashed",text:(0,u.t)("labels.strokeStyle_dashed"),icon:(0,i.jsx)(g.h0,{theme:n.theme})},{value:"dotted",text:(0,u.t)("labels.strokeStyle_dotted"),icon:(0,i.jsx)(g.aT,{theme:n.theme})}],value:S(t,n,(e=>e.strokeStyle),n.currentItemStrokeStyle),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeOpacity",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>(0,b.BE)(e,{opacity:n})),!0),appState:Object.assign(Object.assign({},t),{currentItemOpacity:n}),commitToHistory:!0}),PanelComponent:e=>{var t;let{elements:n,appState:r,updateData:o}=e;return(0,i.jsxs)("label",{className:"control-label",children:[(0,u.t)("labels.opacity"),(0,i.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:e=>o(+e.target.value),value:null!==(t=S(n,r,(e=>e.opacity),r.currentItemOpacity))&&void 0!==t?t:void 0})]})}}),(0,E.z)({name:"changeFontSize",trackEvent:!1,perform:(e,t,n)=>I(e,t,(()=>n),n),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.fontSize")}),(0,i.jsx)(o,{group:"font-size",options:[{value:16,text:(0,u.t)("labels.small"),icon:(0,i.jsx)(g.q0,{theme:n.theme}),testId:"fontSize-small"},{value:20,text:(0,u.t)("labels.medium"),icon:(0,i.jsx)(g.nq,{theme:n.theme}),testId:"fontSize-medium"},{value:28,text:(0,u.t)("labels.large"),icon:(0,i.jsx)(g.tW,{theme:n.theme}),testId:"fontSize-large"},{value:36,text:(0,u.t)("labels.veryLarge"),icon:(0,i.jsx)(g.OA,{theme:n.theme}),testId:"fontSize-veryLarge"}],value:S(t,n,(e=>{if((0,m.iB)(e))return e.fontSize;const t=(0,v.WJ)(e);return t?t.fontSize:null}),n.currentItemFontSize||f.n5),onChange:e=>r(e)})]})}}),(0,E.z)({name:"decreaseFontSize",trackEvent:!1,perform:(e,t,n)=>I(e,t,(e=>Math.round(1/1.1*e.fontSize))),keyTest:e=>e[d.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===d.tW.CHEVRON_LEFT||e.key===d.tW.COMMA)})),j=(0,E.z)({name:"increaseFontSize",trackEvent:!1,perform:(e,t,n)=>I(e,t,(e=>Math.round(1.1*e.fontSize))),keyTest:e=>e[d.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===d.tW.CHEVRON_RIGHT||e.key===d.tW.PERIOD)});(0,E.z)({name:"changeFontFamily",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>{if((0,m.iB)(e)){const t=(0,b.BE)(e,{fontFamily:n});return(0,m.oN)(t,(0,v.tl)(e)),t}return e}),!0),appState:Object.assign(Object.assign({},t),{currentItemFontFamily:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;const a=[{value:f.ut.Virgil,text:(0,u.t)("labels.handDrawn"),icon:(0,i.jsx)(g.kK,{theme:n.theme})},{value:f.ut.Helvetica,text:(0,u.t)("labels.normal"),icon:(0,i.jsx)(g.vo,{theme:n.theme})},{value:f.ut.Cascadia,text:(0,u.t)("labels.code"),icon:(0,i.jsx)(g.z6,{theme:n.theme})}];return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.fontFamily")}),(0,i.jsx)(o,{group:"font-family",options:a,value:S(t,n,(e=>{if((0,m.iB)(e))return e.fontFamily;const t=(0,v.WJ)(e);return t?t.fontFamily:null}),n.currentItemFontFamily||f.rk),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeTextAlign",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>{if((0,m.iB)(e)){const t=(0,b.BE)(e,{textAlign:n});return(0,m.oN)(t,(0,v.tl)(e)),t}return e}),!0),appState:Object.assign(Object.assign({},t),{currentItemTextAlign:n}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.textAlign")}),(0,i.jsx)(o,{group:"text-align",options:[{value:"left",text:(0,u.t)("labels.left"),icon:(0,i.jsx)(g.rr,{theme:n.theme})},{value:"center",text:(0,u.t)("labels.center"),icon:(0,i.jsx)(g.o3,{theme:n.theme})},{value:"right",text:(0,u.t)("labels.right"),icon:(0,i.jsx)(g.oT,{theme:n.theme})}],value:S(t,n,(e=>{if((0,m.iB)(e))return e.textAlign;const t=(0,v.WJ)(e);return t?t.textAlign:null}),n.currentItemTextAlign),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:(e,t,n)=>({elements:C(e,t,(e=>{if((0,m.iB)(e)){const t=(0,b.BE)(e,{verticalAlign:n});return(0,m.oN)(t,(0,v.tl)(e)),t}return e}),!0),appState:Object.assign({},t),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsx)("fieldset",{children:(0,i.jsx)(o,{group:"text-align",options:[{value:f.oX.TOP,text:(0,u.t)("labels.alignTop"),icon:(0,i.jsx)(g.EO,{theme:n.theme})},{value:f.oX.MIDDLE,text:(0,u.t)("labels.centerVertically"),icon:(0,i.jsx)(g.P7,{theme:n.theme})},{value:f.oX.BOTTOM,text:(0,u.t)("labels.alignBottom"),icon:(0,i.jsx)(g.aA,{theme:n.theme})}],value:S(t,n,(e=>{if((0,m.iB)(e)&&e.containerId)return e.verticalAlign;const t=(0,v.WJ)(e);return t?t.verticalAlign:null})),onChange:e=>r(e)})})}}),(0,E.z)({name:"changeSharpness",trackEvent:!1,perform:(e,t,n)=>{const r=(0,w.Zs)((0,m.Lm)(e),t),i=r.length?r.every((e=>!(0,x.bt)(e))):!(0,x.dt)(t.activeTool.type),o=r.length?r.every(x.bt):(0,x.dt)(t.activeTool.type);return{elements:C(e,t,(e=>(0,b.BE)(e,{strokeSharpness:n}))),appState:Object.assign(Object.assign({},t),{currentItemStrokeSharpness:i?n:t.currentItemStrokeSharpness,currentItemLinearStrokeSharpness:o?n:t.currentItemLinearStrokeSharpness}),commitToHistory:!0}},PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.edges")}),(0,i.jsx)(o,{group:"edges",options:[{value:"sharp",text:(0,u.t)("labels.sharp"),icon:(0,i.jsx)(g.wr,{theme:n.theme})},{value:"round",text:(0,u.t)("labels.round"),icon:(0,i.jsx)(g.DS,{theme:n.theme})}],value:S(t,n,(e=>e.strokeSharpness),(0,w.gP)(n.activeTool.type)&&((0,x.dt)(n.activeTool.type)?n.currentItemLinearStrokeSharpness:n.currentItemStrokeSharpness)||null),onChange:e=>r(e)})]})}}),(0,E.z)({name:"changeArrowhead",trackEvent:!1,perform:(e,t,n)=>({elements:C(e,t,(e=>{if((0,x.bt)(e)){const{position:t,type:r}=n;if("start"===t){return(0,b.BE)(e,{startArrowhead:r})}if("end"===t){return(0,b.BE)(e,{endArrowhead:r})}}return e})),appState:Object.assign(Object.assign({},t),{["start"===n.position?"currentItemStartArrowhead":"currentItemEndArrowhead"]:n.type}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;const o=(0,u.G3)().rtl;return(0,i.jsxs)("fieldset",{children:[(0,i.jsx)("legend",{children:(0,u.t)("labels.arrowheads")}),(0,i.jsxs)("div",{className:"iconSelectList",children:[(0,i.jsx)(p,{label:"arrowhead_start",options:[{value:null,text:(0,u.t)("labels.arrowhead_none"),icon:(0,i.jsx)(g.fr,{theme:n.theme}),keyBinding:"q"},{value:"arrow",text:(0,u.t)("labels.arrowhead_arrow"),icon:(0,i.jsx)(g.il,{theme:n.theme,flip:!o}),keyBinding:"w"},{value:"bar",text:(0,u.t)("labels.arrowhead_bar"),icon:(0,i.jsx)(g.m,{theme:n.theme,flip:!o}),keyBinding:"e"},{value:"dot",text:(0,u.t)("labels.arrowhead_dot"),icon:(0,i.jsx)(g.tn,{theme:n.theme,flip:!o}),keyBinding:"r"},{value:"triangle",text:(0,u.t)("labels.arrowhead_triangle"),icon:(0,i.jsx)(g.j8,{theme:n.theme,flip:!o}),keyBinding:"t"}],value:S(t,n,(e=>(0,x.bt)(e)&&(0,w.Un)(e.type)?e.startArrowhead:n.currentItemStartArrowhead),n.currentItemStartArrowhead),onChange:e=>r({position:"start",type:e})}),(0,i.jsx)(p,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,u.t)("labels.arrowhead_none"),keyBinding:"q",icon:(0,i.jsx)(g.fr,{theme:n.theme})},{value:"arrow",text:(0,u.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,i.jsx)(g.il,{theme:n.theme,flip:o})},{value:"bar",text:(0,u.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,i.jsx)(g.m,{theme:n.theme,flip:o})},{value:"dot",text:(0,u.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,i.jsx)(g.tn,{theme:n.theme,flip:o})},{value:"triangle",text:(0,u.t)("labels.arrowhead_triangle"),icon:(0,i.jsx)(g.j8,{theme:n.theme,flip:o}),keyBinding:"t"}],value:S(t,n,(e=>(0,x.bt)(e)&&(0,w.Un)(e.type)?e.endArrowhead:n.currentItemEndArrowhead),n.currentItemEndArrowhead),onChange:e=>r({position:"end",type:e})})]})]})}})},7901:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,z:()=>i});let r=[];const i=e=>(r=r.concat(e),e)},7047:(e,t,n)=>{"use strict";var r,i;n.d(t,{L:()=>o});const o="undefined"!=typeof process&&null!==(r={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.3.76",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==r&&r.REACT_APP_GOOGLE_ANALYTICS_ID&&"undefined"!=typeof window&&window.gtag?(e,t,n,r)=>{try{window.gtag("event",t,{event_category:e,event_label:n,value:r})}catch(e){console.error("error logging to ga",e)}}:("undefined"!=typeof process&&null!==(i={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.3.76",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==i&&i.JEST_WORKER_ID,(e,t,n,r)=>{})},8897:(e,t,n)=>{"use strict";n.d(t,{im:()=>l,fx:()=>u,s:()=>h,eS:()=>p,EN:()=>g});var r=n(5284),i=n(8288),o=n(5202),a=n(6340);const s=i.ZB.includes(devicePixelRatio)?devicePixelRatio:1,l=()=>({theme:i.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:"transparent",currentItemEndArrowhead:"arrow",currentItemFillStyle:"hachure",currentItemFontFamily:i.rk,currentItemFontSize:i.n5,currentItemLinearStrokeSharpness:"round",currentItemOpacity:100,currentItemRoughness:1,currentItemStartArrowhead:null,currentItemStrokeColor:r.black,currentItemStrokeSharpness:"sharp",currentItemStrokeStyle:"solid",currentItemStrokeWidth:1,currentItemTextAlign:i.Hg,cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:!1,lastActiveToolBeforeEraser:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:s,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,isLibraryOpen:!1,isLibraryMenuDocked:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,o.t)("labels.untitled"),"-").concat((0,a.Fc)()),openMenu:null,openPopup:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showHelpDialog:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toast:null,viewBackgroundColor:r.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1}),c={theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemLinearStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},isLibraryOpen:{browser:!0,export:!1,server:!1},isLibraryMenuDocked:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showHelpDialog:{browser:!1,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1}},d=(e,t)=>{const n={};for(const r of Object.keys(e)){const i=c[r];if(null!=i&&i[t]){const t=e[r];n[r]=t}}return n},u=e=>d(e,"browser"),h=e=>d(e,"export"),p=e=>d(e,"server"),g=e=>{let{activeTool:t}=e;return"eraser"===t.type}},5674:(e,t,n)=>{"use strict";n.d(t,{i$:()=>u,dz:()=>f,ps:()=>k});var r=n(56),i=n(8288),o=n(5118),a=n(6954);const s=32,l=12,c=256,d="NOT_SPREADSHEET",u="VALID_SPREADSHEET",h=e=>{const t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat("".concat((t[1]||t[2])+t[3]).replace(/,/g,"")):null},p=(e,t)=>e.slice(1).every((e=>null!==h(e[t]))),g=e=>{const t=e[0].length;if(t>2)return{type:d,reason:"More than 2 columns"};if(1===t){if(!p(e,0))return{type:d,reason:"Value is not numeric"};const t=null===h(e[0][0]),n=(t?e.slice(1):e).map((e=>h(e[0])));return n.length<2?{type:d,reason:"Less than two rows"}:{type:u,spreadsheet:{title:t?e[0][0]:null,labels:null,values:n}}}const n=p(e,0),r=p(e,1);if(!n&&!r)return{type:d,reason:"Value is not numeric"};const[i,o]=r?[0,1]:[1,0],a=null===h(e[0][o]),s=a?e.slice(1):e;return s.length<2?{type:d,reason:"Less than 2 rows"}:{type:u,spreadsheet:{title:a?e[0][o]:null,labels:s.map((e=>e[i])),values:s.map((e=>h(e[o])))}}},f=e=>{let t=e.trim().split("\n").map((e=>e.trim().split("\t")));if(t.length&&2!==t[0].length&&(t=e.trim().split("\n").map((e=>e.trim().split(",")))),0===t.length)return{type:d,reason:"No values"};const n=t[0].length;if(!t.every((e=>e.length===n)))return{type:d,reason:"All rows don't have same number of columns"};const r=g(t);if(r.type!==u){const e=g((e=>{const t=[];for(let n=0;n<e[0].length;n++){const r=[];for(let t=0;t<e.length;t++)r.push(e[t][n]);t.push(r)}return t})(t));if(e.type===u)return e}return r},m=r.Z.elementBackground.slice(2,r.Z.elementBackground.length),b={fillStyle:"hachure",fontFamily:i.rk,fontSize:i.n5,opacity:100,roughness:1,strokeColor:r.Z.elementStroke[0],strokeSharpness:"sharp",strokeStyle:"solid",strokeWidth:1,verticalAlign:i.oX.MIDDLE,locked:!1},v=e=>({chartWidth:44*e.values.length+l,chartHeight:280}),x=(e,t,n,r,i)=>{var a;return(null===(a=e.labels)||void 0===a?void 0:a.map(((e,a)=>(0,o.VL)(Object.assign(Object.assign({groupIds:[r],backgroundColor:i},b),{text:e.length>8?"".concat(e.slice(0,5),"..."):e,x:t+44*a+24,y:n+6,width:s,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"})))))||[]},y=(e,t,n,r,i)=>{const a=(0,o.VL)(Object.assign(Object.assign({groupIds:[r],backgroundColor:i},b),{x:t-l,y:n-l,text:"0",textAlign:"right"}));return[a,(0,o.VL)(Object.assign(Object.assign({groupIds:[r],backgroundColor:i},b),{x:t-l,y:n-c-a.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"}))]},w=(e,t,n,r,i)=>{const{chartWidth:a,chartHeight:s}=v(e);return[(0,o.y8)(Object.assign(Object.assign({backgroundColor:i,groupIds:[r]},b),{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,width:a,points:[[0,0],[a,0]]})),(0,o.y8)(Object.assign(Object.assign({backgroundColor:i,groupIds:[r]},b),{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,height:s,points:[[0,0],[0,-s]]})),(0,o.y8)(Object.assign(Object.assign({backgroundColor:i,groupIds:[r]},b),{type:"line",x:t,y:n-c-l,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:a,opacity:50,points:[[0,0],[a,0]]}))]},_=(e,t,n,a,s,l)=>{const{chartWidth:d,chartHeight:u}=v(e),h=e.title?(0,o.VL)(Object.assign(Object.assign({backgroundColor:s,groupIds:[a]},b),{text:e.title,x:t+d/2,y:n-c-24-i.n5,strokeSharpness:"sharp",strokeStyle:"solid",textAlign:"center"})):null,p=l?(0,o.Up)(Object.assign(Object.assign({backgroundColor:s,groupIds:[a]},b),{type:"rectangle",x:t,y:n-u,width:d,height:u,strokeColor:r.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[...p?[p]:[],...h?[h]:[],...x(e,t,n,a,s),...y(e,t,n,a,s),...w(e,t,n,a,s)]},k=(e,t,n,r)=>"line"===e?((e,t,n)=>{const r=Math.max(...e.values),s=(0,a.kb)(),d=m[Math.floor(Math.random()*m.length)];let u=0;const h=[];for(const t of e.values){const e=44*u,n=-t/r*c;h.push([e,n]),u++}const p=Math.max(...h.map((e=>e[0]))),g=Math.max(...h.map((e=>e[1]))),f=Math.min(...h.map((e=>e[0]))),v=Math.min(...h.map((e=>e[1]))),x=(0,o.y8)(Object.assign(Object.assign({backgroundColor:d,groupIds:[s]},b),{type:"line",x:t+l+16,y:n-l,startArrowhead:null,endArrowhead:null,height:g-v,width:p-f,strokeWidth:2,points:h})),y=e.values.map(((e,i)=>{const a=44*i+6,u=-e/r*c+6;return(0,o.Up)(Object.assign(Object.assign({backgroundColor:d,groupIds:[s]},b),{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+a+16,y:n+u-24,width:l,height:l}))})),w=e.values.map(((e,i)=>{const a=44*i+6,u=e/r*c+6+l;return(0,o.y8)(Object.assign(Object.assign({backgroundColor:d,groupIds:[s]},b),{type:"line",x:t+a+16+6,y:n-u,startArrowhead:null,endArrowhead:null,height:u,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,u]]}))}));return[..._(e,t,n,s,d,"production"===i.Vi.DEVELOPMENT),x,...w,...y]})(t,n,r):((e,t,n)=>{const r=Math.max(...e.values),d=(0,a.kb)(),u=m[Math.floor(Math.random()*m.length)];return[...e.values.map(((e,i)=>{const a=e/r*c;return(0,o.Up)(Object.assign(Object.assign({backgroundColor:u,groupIds:[d]},b),{type:"rectangle",x:t+44*i+l,y:n-a-l,width:s,height:a}))})),..._(e,t,n,d,u,"production"===i.Vi.DEVELOPMENT)]})(t,n,r)},8982:(e,t,n)=>{"use strict";n.d(t,{X:()=>i,f:()=>o});var r=n(56);const i=(e,t)=>{if(null!=t&&t.collaborators){const n=t.collaborators.get(e);if(null!=n&&n.color)return n.color}const n=e.split("").reduce(((e,t)=>e+t.charCodeAt(0)),0),i=r.Z.elementBackground.slice(1),o=r.Z.elementStroke.slice(1);return{background:i[n%i.length],stroke:o[n%o.length]}},o=e=>{if(!e)return"?";const t=e.trim().split(" ");if(t.length<2)return t[0].substring(0,2).toUpperCase();const n=t[0],r=t[t.length-1];return(n[0]+r[0]).toUpperCase()}},6665:(e,t,n)=>{"use strict";n.d(t,{wx:()=>u,vt:()=>h,vQ:()=>p,mQ:()=>f,uR:()=>m,dd:()=>b});var r=n(4162),i=n(5674),o=n(8288),a=n(1974),s=n(6340);let l="",c=!1;const d="clipboard"in navigator&&"readText"in navigator.clipboard,u="clipboard"in navigator&&"writeText"in navigator.clipboard,h="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,p=async(e,t,n)=>{const r={type:o.r8.excalidrawClipboard,elements:e,files:n?e.reduce(((e,t)=>((0,a.wi)(t)&&n[t.fileId]&&(e[t.fileId]=n[t.fileId]),e)),{}):void 0},i=JSON.stringify(r);l=i;try{c=!1,await b(i)}catch(e){c=!0,console.error(e)}},g=()=>{if(!l)return{};try{return JSON.parse(l)}catch(e){return console.error(e),{}}},f=async e=>{const t=await(async e=>{try{var t;return(e?null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain").trim():d&&await navigator.clipboard.readText())||""}catch(e){return""}})(e);if(!t||t.includes(r.oj))return g();const n=(e=>{const t=(0,i.dz)(e);return t.type===i.i$?{spreadsheet:t.spreadsheet}:null})(t);if(n)return n;const a=g();try{const e=JSON.parse(t);return s=e,[o.r8.excalidraw,o.r8.excalidrawClipboard].includes(null==s?void 0:s.type)&&Array.isArray(s.elements)?{elements:e.elements,files:e.files}:a}catch(e){return c&&a.elements?a:{text:t}}var s},m=async e=>{let t;try{t=navigator.clipboard.write([new window.ClipboardItem({[o.LO.png]:e})])}catch(t){if(!(0,s.y8)(e))throw t;await navigator.clipboard.write([new window.ClipboardItem({[o.LO.png]:await e})])}await t},b=async e=>{let t=!1;if(u)try{await navigator.clipboard.writeText(e||""),t=!0}catch(e){console.error(e)}if(!t&&!v(e||" "))throw new Error("couldn't copy")},v=e=>{const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;n.style.top="".concat(r,"px"),n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);let i=!1;try{n.select(),n.setSelectionRange(0,n.value.length),i=document.execCommand("copy")}catch(e){console.error(e)}return n.remove(),i}},56:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5284);const i=e=>[r.red[e],r.pink[e],r.grape[e],r.violet[e],r.indigo[e],r.blue[e],r.cyan[e],r.teal[e],r.green[e],r.lime[e],r.yellow[e],r.orange[e]],o={canvasBackground:[r.white,r.gray[0],r.gray[1],...i(0)],elementBackground:["transparent",r.gray[4],r.gray[6],...i(6)],elementStroke:[r.black,r.gray[8],r.gray[7],...i(9)]}},7067:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>ir,Fy:()=>Hn,J0:()=>Un});var r=n(9787),i=n.n(r),o=n(6852),a=n(741),s=n(6612),l=n(75),c=n(6066),d=n(1319),u=n(3646),h=n(5202),p=n(7901),g=n(5118),f=n(1935),m=n(242),b=n(6938),v=n(8290),x=n(1974),y=n(6340),w=n(1337);const _=(e,t)=>{if(e.editingGroupId){const n=(0,m.Fb)((0,g.Lm)(t),e.editingGroupId);if(n.length)return Object.assign(Object.assign({},e),{selectedElementIds:{[n[0].id]:!0}})}return e},k=(0,p.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:(e,t)=>{if(t.editingLinearElement){const{elementId:n,selectedPointsIndices:r,startBindingElement:i,endBindingElement:o}=t.editingLinearElement,a=b._.getElement(n);if(!a)return!1;if(null==r||a.points.length<2){const n=e.filter((e=>e.id!==a.id)),r=_(t,n);return{elements:n,appState:Object.assign(Object.assign({},r),{editingLinearElement:null}),commitToHistory:!1}}const s={startBindingElement:null!=r&&r.includes(0)?null:i,endBindingElement:null!=r&&r.includes(a.points.length-1)?null:o};return b._.deletePoints(a,r),{elements:e,appState:Object.assign(Object.assign({},t),{editingLinearElement:Object.assign(Object.assign(Object.assign({},t.editingLinearElement),s),{selectedPointsIndices:(null==r?void 0:r[0])>0?[r[0]-1]:[0]})}),commitToHistory:!0}}let{elements:n,appState:r}=((e,t)=>({elements:e.map((e=>t.selectedElementIds[e.id]||(0,x.Xh)(e)&&t.selectedElementIds[e.containerId]?(0,f.BE)(e,{isDeleted:!0}):e)),appState:Object.assign(Object.assign({},t),{selectedElementIds:{}})}))(e,t);return(0,v.$q)(n,e.filter((e=>{let{id:n}=e;return t.selectedElementIds[n]}))),r=_(r,n),{elements:n,appState:Object.assign(Object.assign({},r),{activeTool:(0,y.Om)(t,{type:"selection"}),multiElement:null}),commitToHistory:(0,l.N)((0,g.Lm)(e),t)}},contextItemLabel:"labels.delete",keyTest:e=>e.key===c.tW.BACKSPACE||e.key===c.tW.DELETE,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{type:"button",icon:u._I,title:(0,h.t)("labels.delete"),"aria-label":(0,h.t)("labels.delete"),onClick:()=>r(null),visible:(0,l.N)((0,g.Lm)(t),n)})}});var E=n(1564);const C=(e,t)=>{let n=[],r=[],i=null,o=-1;const a=(0,y.xn)((0,l.eD)(e,t,!0));for(;++o<e.length;)a.get(e[o].id)?(r.length&&(n=n.concat(r),r=[]),n.push(o),i=o+1):e[o].isDeleted&&i===o?(i=o+1,r.push(o)):r=[];return n},S=(e,t,n)=>{if("containerId"in e&&e.containerId){if("left"!==n)return t.indexOf(e);{const n=E.Z.getScene(e).getElement(e.containerId);if(n)return t.indexOf(n)}}else{var r,i;const o=null===(r=e.boundElements)||void 0===r||null===(i=r.find((e=>"arrow"!==e.type)))||void 0===i?void 0:i.id;if(o){if("left"===n)return t.indexOf(e);const r=E.Z.getScene(e).getElement(o);if(r)return t.indexOf(r)}}},I=(e,t)=>t.reduce(((t,n)=>{const r=e[n];return t[r.id]=r,t}),{}),T=(e,t,n)=>{const r=C(t,e),i=I(t,r);let o=(e=>{let t=0;return e.reduce(((n,r,i)=>(i>0&&e[i-1]!==r-1&&(t=++t),(n[t]||(n[t]=[])).push(r),n)),[])})(r);return"right"===n&&(o=o.reverse()),o.forEach(((r,i)=>{const o=r[0],a=r[r.length-1],s="left"===n?o:a,l=((e,t,n,r)=>{const i=t[n],o=t=>!t.isDeleted&&(!e.editingGroupId||t.groupIds.includes(e.editingGroupId)),a="left"===r?(0,y.qr)(t,o,Math.max(0,n-1)):(0,y.cx)(t,o,n+1),s=t[a];if(!s)return-1;if(e.editingGroupId){var l;if((null==i?void 0:i.groupIds.join(""))===(null==s?void 0:s.groupIds.join("")))return null!==(l=S(s,t,r))&&void 0!==l?l:a;if(null==s||!s.groupIds.includes(e.editingGroupId))return-1}var c;if(!s.groupIds.length)return null!==(c=S(s,t,r))&&void 0!==c?c:a;const d=e.editingGroupId?s.groupIds[s.groupIds.indexOf(e.editingGroupId)-1]:s.groupIds[s.groupIds.length-1],u=(0,m.Fb)(t,d);return u.length?"left"===r?t.indexOf(u[0]):t.indexOf(u[u.length-1]):a})(e,t,s,n);if(-1===l||s===l)return;const c="left"===n?t.slice(0,l):t.slice(0,o),d=t.slice(o,a+1),u="left"===n?t.slice(l,o):t.slice(a+1,l+1),h="left"===n?t.slice(a+1):t.slice(l+1);t="left"===n?[...c,...d,...u,...h]:[...c,...u,...d,...h]})),t.map((e=>i[e.id]?(0,f.ZP)(e):e))},j=(e,t,n)=>{const r=C(e,t),i=I(e,r),o=[];let a,s;if("left"===n){if(t.editingGroupId){const n=(0,m.Fb)(e,t.editingGroupId);if(!n.length)return e;a=e.indexOf(n[0])}else a=0;s=r[r.length-1]}else{if(t.editingGroupId){const n=(0,m.Fb)(e,t.editingGroupId);if(!n.length)return e;s=e.indexOf(n[n.length-1])}else s=e.length-1;a=r[0]}for(let t=a;t<s+1;t++)r.includes(t)||o.push(e[t]);const l=Object.values(i).map((e=>(0,f.ZP)(e))),c=e.slice(0,a),d=e.slice(s+1);return"left"===n?[...c,...l,...o,...d]:[...c,...o,...l,...d]},M=(e,t)=>T(t,e,"left"),L=(e,t)=>T(t,e,"right"),O=(e,t)=>j(e,t,"left"),A=(e,t)=>j(e,t,"right"),D=(0,p.z)({name:"sendBackward",trackEvent:{category:"element"},perform:(e,t)=>({elements:M(e,t),appState:t,commitToHistory:!0}),contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:e=>e[c.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===c.aU.BRACKET_LEFT,PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,w.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:"".concat((0,h.t)("labels.sendBackward")," — ").concat((0,y.uY)("CtrlOrCmd+[")),children:(0,w.jsx)(u.Gc,{theme:n.theme})})}}),z=(0,p.z)({name:"bringForward",trackEvent:{category:"element"},perform:(e,t)=>({elements:L(e,t),appState:t,commitToHistory:!0}),contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:e=>e[c.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===c.aU.BRACKET_RIGHT,PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,w.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:"".concat((0,h.t)("labels.bringForward")," — ").concat((0,y.uY)("CtrlOrCmd+]")),children:(0,w.jsx)(u.t5,{theme:n.theme})})}}),P=(0,p.z)({name:"sendToBack",trackEvent:{category:"element"},perform:(e,t)=>({elements:O(e,t),appState:t,commitToHistory:!0}),contextItemLabel:"labels.sendToBack",keyTest:e=>c.Um?e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.BRACKET_LEFT:e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===c.aU.BRACKET_LEFT,PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,w.jsx)("button",{type:"button",className:"zIndexButton",onClick:()=>t(null),title:"".concat((0,h.t)("labels.sendToBack")," — ").concat(c.Um?(0,y.uY)("CtrlOrCmd+Alt+["):(0,y.uY)("CtrlOrCmd+Shift+[")),children:(0,w.jsx)(u.pw,{theme:n.theme})})}}),R=(0,p.z)({name:"bringToFront",trackEvent:{category:"element"},perform:(e,t)=>({elements:A(e,t),appState:t,commitToHistory:!0}),contextItemLabel:"labels.bringToFront",keyTest:e=>c.Um?e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.BRACKET_RIGHT:e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===c.aU.BRACKET_RIGHT,PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,w.jsx)("button",{type:"button",className:"zIndexButton",onClick:e=>t(null),title:"".concat((0,h.t)("labels.bringToFront")," — ").concat(c.Um?(0,y.uY)("CtrlOrCmd+Alt+]"):(0,y.uY)("CtrlOrCmd+Shift+]")),children:(0,w.jsx)(u.IN,{theme:n.theme})})}}),B=(0,p.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:(e,t)=>!t.editingLinearElement&&{appState:(0,m.bO)(Object.assign(Object.assign({},t),{editingGroupId:null,selectedElementIds:e.reduce(((e,t)=>(t.isDeleted||(0,g.iB)(t)&&t.containerId||t.locked||(e[t.id]=!0),e)),{})}),(0,g.Lm)(e)),commitToHistory:!0},contextItemLabel:"labels.selectAll",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.key===c.tW.A});var N=n(8288),H=n(5710);const W=(0,p.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:(e,t)=>{if(t.editingLinearElement){const n=b._.duplicateSelectedPoints(t);return!!n&&{elements:e,appState:n.appState,commitToHistory:!0}}return Object.assign(Object.assign({},U(e,t)),{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.key===c.tW.D,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.d9,title:"".concat((0,h.t)("labels.duplicateSelection")," — ").concat((0,y.uY)("CtrlOrCmd+D")),"aria-label":(0,h.t)("labels.duplicateSelection"),onClick:()=>r(null),visible:(0,l.N)((0,g.Lm)(t),n)})}}),U=(e,t)=>{const n=new Map,r=[],i=[],o=new Map,a=e=>{const a=(0,g.Sy)(t.editingGroupId,n,e,{x:e.x+N.k/2,y:e.y+N.k/2});return o.set(e.id,a.id),i.push(e),r.push(a),a},s=[];let c=0;const d=(0,y.xn)((0,l.eD)(e,t,!0));for(;c<e.length;){const n=e[c];if(d.get(n.id)){if(n.groupIds.length){const r=(0,m.yO)(t,n);if(r){const t=(0,m.Fb)(e,r);s.push(...t,...t.map((e=>a(e)))),c+=t.length;continue}}s.push(n,a(n))}else s.push(n);c++}return(0,H.P7)(s,i,o),(0,v.ek)(s,i,o),{elements:s,appState:(0,m.bO)(Object.assign(Object.assign({},t),{selectedGroupIds:{},selectedElementIds:r.reduce(((e,t)=>((0,x.Xh)(t)||(e[t.id]=!0),e)),{})}),(0,g.Lm)(s))}};n(3917),n(828);var F=n(6552);const K=(0,p.z)({name:"finalize",trackEvent:!1,perform:(e,t,n,r)=>{var i;let{canvas:o,focusContainer:a,scene:s}=r;if(t.editingLinearElement){const{elementId:n,startBindingElement:r,endBindingElement:i}=t.editingLinearElement,o=b._.getElement(n);if(o)return(0,x.Mn)(o)&&(0,v.HG)(o,r,i),{elements:o.points.length<2||(0,g.QD)(o)?e.filter((e=>e.id!==o.id)):void 0,appState:Object.assign(Object.assign({},t),{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}let l=e;const c=t.pendingImageElementId&&s.getElement(t.pendingImageElementId);c&&(0,f.DR)(c,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&a();const d=t.multiElement?t.multiElement:"freedraw"===(null===(i=t.editingElement)||void 0===i?void 0:i.type)?t.editingElement:null;if(d){if("freedraw"!==d.type&&"touch"!==t.lastPointerDownWith){const{points:e,lastCommittedPoint:t}=d;t&&e[e.length-1]===t||(0,f.DR)(d,{points:d.points.slice(0,-1)})}(0,g.QD)(d)&&(l=l.slice(0,-1));const e=(0,F.g6)(d.points,t.zoom.value);if(("line"===d.type||"freedraw"===d.type)&&e){const e=d.points,t=e[0];(0,f.DR)(d,{points:e.map(((n,r)=>r===e.length-1?[t[0],t[1]]:n))})}if((0,x.Mn)(d)&&!e&&d.points.length>1){const[e,n]=b._.getPointAtIndexGlobalCoordinates(d,-1);(0,v.R)(d,t,E.Z.getScene(d),{x:e,y:n})}t.activeTool.locked||"freedraw"===t.activeTool.type||(t.selectedElementIds[d.id]=!0)}let u;return(t.activeTool.locked||"freedraw"===t.activeTool.type)&&d||(0,y.z8)(o),u="eraser"===t.activeTool.type?(0,y.Om)(t,Object.assign(Object.assign({},t.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{lastActiveToolBeforeEraser:null})):(0,y.Om)(t,{type:"selection"}),{elements:l,appState:Object.assign(Object.assign({},t),{cursorButton:"up",activeTool:(t.activeTool.locked||"freedraw"===t.activeTool.type)&&d?t.activeTool:u,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:d&&!t.activeTool.locked&&"freedraw"!==t.activeTool.type?Object.assign(Object.assign({},t.selectedElementIds),{[d.id]:!0}):t.selectedElementIds,pendingImageElementId:null}),commitToHistory:"freedraw"===t.activeTool.type}},keyTest:(e,t)=>e.key===c.tW.ESCAPE&&(null!==t.editingLinearElement||!t.draggingElement&&null===t.multiElement)||(e.key===c.tW.ESCAPE||e.key===c.tW.ENTER)&&null!==t.multiElement,PanelComponent:e=>{let{appState:t,updateData:n,data:r}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.$c,title:(0,h.t)("buttons.done"),"aria-label":(0,h.t)("buttons.done"),onClick:n,visible:null!=t.multiElement,size:(null==r?void 0:r.size)||"medium"})}});n(518),n(9966);const V=e=>{const{id:t}=Un(),[n,i]=(0,r.useState)(e.value);return(0,w.jsxs)("div",{className:"ProjectName",children:[(0,w.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(e.label).concat(e.isNameEditable?"":":")}),e.isNameEditable?(0,w.jsx)("input",{type:"text",className:"TextInput",onBlur:t=>{(0,y.qz)(t.target);const n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:e=>{if("Enter"===e.key){if(e.preventDefault(),e.nativeEvent.isComposing||229===e.keyCode)return;e.currentTarget.blur()}},id:"".concat(t,"-filename"),value:n,onChange:e=>i(e.target.value)}):(0,w.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(t,"-filename"),children:e.value})]})};n(5422);var Y=n(9910),Z=n(4041),G=n(6665),X=n(4162),q=n(434),J=n(1393),Q=n(5523);const $=async(e,t,r,i,o)=>{let{exportBackground:a,exportPadding:s=N.qy,viewBackgroundColor:l,name:c,fileHandle:d=null}=o;if(0===t.length)throw new Error((0,h.t)("alerts.cannotExportEmptyCanvas"));if("svg"===e||"clipboard-svg"===e){const n=await(0,X.$D)(t,{exportBackground:a,exportWithDarkMode:r.exportWithDarkMode,viewBackgroundColor:l,exportPadding:s,exportScale:r.exportScale,exportEmbedScene:r.exportEmbedScene&&"svg"===e},i);if("svg"===e)return await(0,J.NL)(new Blob([n.outerHTML],{type:N.LO.svg}),{description:"Export to SVG",name:c,extension:r.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:d});if("clipboard-svg"===e)return void await(0,G.dd)(n.outerHTML)}const u=await(0,X.NL)(t,r,i,{exportBackground:a,viewBackgroundColor:l,exportPadding:s});if(u.style.display="none",document.body.appendChild(u),"png"===e){let e=await(0,q._c)(u);return u.remove(),r.exportEmbedScene&&(e=await(await Promise.resolve().then(n.bind(n,673))).encodePngMetadata({blob:e,metadata:(0,Q.I_)(t,r,i,"local")})),await(0,J.NL)(e,{description:"Export to PNG",name:c,extension:r.exportEmbedScene?"excalidraw.png":"png",fileHandle:d})}if("clipboard"!==e)throw u.remove(),new Error("Unsupported export type");try{const e=(0,q._c)(u);await(0,G.uR)(e)}catch(e){if("CANVAS_POSSIBLY_TOO_BIG"===e.name)throw e;throw new Error((0,h.t)("alerts.couldNotCopyToClipboard"))}finally{u.remove()}};n(7225);const ee=e=>{let{children:t,checked:n,onChange:r,className:i}=e;return(0,w.jsxs)("div",{className:(0,a.Z)("Checkbox",i,{"is-checked":n}),onClick:e=>{r(!n,e),e.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,w.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":n,children:u.eQ}),(0,w.jsx)("div",{className:"Checkbox-label",children:t})]})};n(4623);const te=e=>{let{children:t,gap:n,align:r,justifyContent:i,className:o,style:s}=e;return(0,w.jsx)("div",{className:(0,a.Z)("Stack Stack_horizontal",o),style:Object.assign({"--gap":n,alignItems:r,justifyContent:i},s),children:t})},ne=e=>{let{children:t,gap:n,align:r,justifyContent:i,className:o,style:s}=e;return(0,w.jsx)("div",{className:(0,a.Z)("Stack Stack_vertical",o),style:Object.assign({"--gap":n,justifyItems:r,justifyContent:i},s),children:t})};n(554);const re=e=>{let{fileName:t,onSave:n}=e;return(0,w.jsxs)(te,{className:"ActiveFile",gap:1,align:"center",children:[(0,w.jsxs)("span",{className:"ActiveFile__fileName",children:[u.tP,(0,w.jsx)("span",{children:t})]}),(0,w.jsx)(d.V,{type:"icon",icon:u.a1,title:(0,h.t)("buttons.save"),"aria-label":(0,h.t)("buttons.save"),onClick:n,"data-testid":"save-button"})]})},ie=((0,p.z)({name:"changeProjectName",trackEvent:!1,perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{name:n}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n,appProps:r}=e;return(0,w.jsx)(V,{label:(0,h.t)("labels.fileTitle"),value:t.name||"Unnamed",onChange:e=>n(e),isNameEditable:void 0===r.name&&!t.viewModeEnabled})}}),(0,p.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{exportScale:n}),commitToHistory:!1}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;const i=(0,g.Lm)(t),o=(0,l.N)(i,n)?(0,l.eD)(i,n):i;return(0,w.jsx)(w.Fragment,{children:N.ZB.map((e=>{const[t,i]=(0,X.Cg)(o,N.qy,e),a="".concat((0,h.t)("buttons.scale")," ").concat(e,"x (").concat(t,"x").concat(i,")");return(0,w.jsx)(d.V,{size:"small",type:"radio",icon:"".concat(e,"x"),name:"export-canvas-scale",title:a,"aria-label":a,id:"export-canvas-scale",checked:e===n.exportScale,onChange:()=>r(e)},e)}))})}}),(0,p.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{exportBackground:n}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n}=e;return(0,w.jsx)(ee,{checked:t.exportBackground,onChange:e=>n(e),children:(0,h.t)("labels.withBackground")})}}),(0,p.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{exportEmbedScene:n}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n}=e;return(0,w.jsxs)(ee,{checked:t.exportEmbedScene,onChange:e=>n(e),children:[(0,h.t)("labels.exportEmbedScene"),(0,w.jsx)(Y.u,{label:(0,h.t)("labels.exportEmbedScene_details"),long:!0,children:(0,w.jsx)("div",{className:"excalidraw-tooltip-icon",children:u.Vl})})]})}}),(0,p.z)({name:"saveToActiveFile",trackEvent:{category:"export"},perform:async(e,t,n,r)=>{const i=!!t.fileHandle;try{const{fileHandle:n}=(0,q.g8)(t.fileHandle)?await(async(e,t,n)=>{const{exportBackground:r,viewBackgroundColor:i,name:o,fileHandle:a}=t,s=(0,q.Qk)(a);if(!a||!(0,q.DQ)(s))throw new Error("fileHandle should exist and should be of type svg or png when resaving");return t=Object.assign(Object.assign({},t),{exportEmbedScene:!0}),await $(s,(0,g.Lm)(e),t,n,{exportBackground:r,viewBackgroundColor:i,name:o,fileHandle:a}),{fileHandle:a}})(e,t,r.files):await(0,Q.Um)(e,t,r.files);return{commitToHistory:!1,appState:Object.assign(Object.assign({},t),{fileHandle:n,toast:i?{message:null!=n&&n.name?(0,h.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(n.name,'"')):(0,h.t)("toast.fileSaved")}:null})}}catch(e){return"AbortError"!==(null==e?void 0:e.name)?console.error(e):console.warn(e),{commitToHistory:!1}}},keyTest:e=>e.key===c.tW.S&&e[c.tW.CTRL_OR_CMD]&&!e.shiftKey,PanelComponent:e=>{var t;let{updateData:n,appState:r}=e;return(0,w.jsx)(re,{onSave:()=>n(null),fileName:null===(t=r.fileHandle)||void 0===t?void 0:t.name})}}),(0,p.z)({name:"saveFileToDisk",trackEvent:{category:"export"},perform:async(e,t,n,r)=>{try{const{fileHandle:n}=await(0,Q.Um)(e,Object.assign(Object.assign({},t),{fileHandle:null}),r.files);return{commitToHistory:!1,appState:Object.assign(Object.assign({},t),{fileHandle:n})}}catch(e){return"AbortError"!==(null==e?void 0:e.name)?console.error(e):console.warn(e),{commitToHistory:!1}}},keyTest:e=>e.key===c.tW.S&&e.shiftKey&&e[c.tW.CTRL_OR_CMD],PanelComponent:e=>{let{updateData:t}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.po,title:(0,h.t)("buttons.saveAs"),"aria-label":(0,h.t)("buttons.saveAs"),showAriaLabel:Hn().isMobile,hidden:!J.kr,onClick:()=>t(null),"data-testid":"save-as-button"})}}));(0,p.z)({name:"loadScene",trackEvent:{category:"export"},perform:async(e,t,n,r)=>{try{const{elements:n,appState:r,files:i}=await(0,Q.n8)(t,e);return{elements:n,appState:r,files:i,commitToHistory:!0}}catch(n){return"AbortError"===(null==n?void 0:n.name)?(console.warn(n),!1):{elements:e,appState:Object.assign(Object.assign({},t),{errorMessage:n.message}),files:r.files,commitToHistory:!1}}},keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.key===c.tW.O,PanelComponent:e=>{let{updateData:t,appState:n}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.zD,title:(0,h.t)("buttons.load"),"aria-label":(0,h.t)("buttons.load"),showAriaLabel:Hn().isMobile,onClick:t,"data-testid":"load-button"})}}),(0,p.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,t,n)=>({appState:Object.assign(Object.assign({},t),{exportWithDarkMode:n}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n}=e;return(0,w.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,w.jsx)(Z.J,{value:t.exportWithDarkMode?N.C6.DARK:N.C6.LIGHT,onChange:e=>{n(e===N.C6.DARK)},title:(0,h.t)("labels.toggleExportColorScheme")})})}});let oe="{}";const ae=(0,p.z)({name:"copyStyles",trackEvent:{category:"element"},perform:(e,t)=>{const n=[],r=e.find((e=>t.selectedElementIds[e.id]));if(n.push(r),r&&(0,x.Xo)(r)){const e=(0,H.WJ)(r);n.push(e)}return r&&(oe=JSON.stringify(n)),{appState:Object.assign(Object.assign({},t),{toast:{message:(0,h.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.C}),se=(0,p.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:(e,t)=>{const n=JSON.parse(oe),r=n[0],i=n[1];if(!(0,g.r2)(r))return{elements:e,commitToHistory:!1};const o=(0,l.eD)(e,t,!0),a=o.map((e=>e.id));return{elements:e.map((e=>{if(a.includes(e.id)){var t,n,s,l,c,d,u;let a=r;if((0,g.iB)(e)&&e.containerId&&(a=i),!a)return e;let b=(0,f.BE)(e,{backgroundColor:null===(t=a)||void 0===t?void 0:t.backgroundColor,strokeWidth:null===(n=a)||void 0===n?void 0:n.strokeWidth,strokeColor:null===(s=a)||void 0===s?void 0:s.strokeColor,strokeStyle:null===(l=a)||void 0===l?void 0:l.strokeStyle,fillStyle:null===(c=a)||void 0===c?void 0:c.fillStyle,opacity:null===(d=a)||void 0===d?void 0:d.opacity,roughness:null===(u=a)||void 0===u?void 0:u.roughness});if((0,g.iB)(b)){var h,p,m;b=(0,f.BE)(b,{fontSize:(null===(h=a)||void 0===h?void 0:h.fontSize)||N.n5,fontFamily:(null===(p=a)||void 0===p?void 0:p.fontFamily)||N.rk,textAlign:(null===(m=a)||void 0===m?void 0:m.textAlign)||N.Hg});let e=null;b.containerId&&(e=o.find((e=>(0,g.iB)(b)&&e.id===b.containerId))||null),(0,g.oN)(b,e)}return"arrow"===b.type&&(b=(0,f.BE)(b,{startArrowhead:a.startArrowhead,endArrowhead:a.endArrowhead})),b}return e})),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.V}),le=e=>(0,w.jsx)("button",{className:"help-icon",onClick:e.onClick,type:"button",title:"".concat(e.title," — ?"),"aria-label":e.title,children:u.Vl});(0,p.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:(e,t)=>({appState:Object.assign(Object.assign({},t),{openMenu:"canvas"===t.openMenu?null:"canvas"}),commitToHistory:!1}),PanelComponent:e=>{let{appState:t,updateData:n}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.GI,"aria-label":(0,h.t)("buttons.menu"),onClick:n,selected:"canvas"===t.openMenu})}}),(0,p.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:(e,t)=>({appState:Object.assign(Object.assign({},t),{openMenu:"shape"===t.openMenu?null:"shape"}),commitToHistory:!1}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{visible:(0,g.RT)(n,(0,g.Lm)(t)),type:"button",icon:u.DG,"aria-label":(0,h.t)("buttons.edit"),onClick:r,selected:"shape"===n.openMenu})}}),(0,p.z)({name:"toggleFullScreen",trackEvent:{category:"canvas",predicate:e=>!(0,y.rB)()},perform:()=>((0,y.rB)()||(0,y.wo)(),(0,y.rB)()&&(0,y.Pr)(),{commitToHistory:!1}),keyTest:e=>e.code===c.aU.F&&!e[c.tW.CTRL_OR_CMD]}),(0,p.z)({name:"toggleShortcuts",trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,t,n,r)=>{let{focusContainer:i}=r;return t.showHelpDialog&&i(),{appState:Object.assign(Object.assign({},t),{showHelpDialog:!t.showHelpDialog}),commitToHistory:!1}},PanelComponent:e=>{let{updateData:t}=e;return(0,w.jsx)(le,{title:(0,h.t)("helpDialog.title"),onClick:t})},keyTest:e=>e.key===c.tW.QUESTION_MARK});var ce=n(6954);const de=(e,t)=>{const n=(0,l.eD)((0,g.Lm)(e),t,!0);return n.length>=2&&!(e=>{if(e.length>=2){const t=e[0].groupIds;for(const n of t)if(e.reduce(((e,t)=>e&&(0,m.Nd)(t,n)),!0))return!0}return!1})(n)},ue=(0,p.z)({name:"group",trackEvent:{category:"element"},perform:(e,t)=>{const n=(0,l.eD)((0,g.Lm)(e),t,!0);if(n.length<2)return{appState:t,elements:e,commitToHistory:!1};const r=(0,m.iJ)(t);if(1===r.length){const i=r[0],o=new Set((0,m.Fb)(e,i).map((e=>e.id))),a=new Set(n.map((e=>e.id)));if(new Set([...Array.from(o),...Array.from(a)]).size===o.size)return{appState:t,elements:e,commitToHistory:!1}}const i=(0,ce.kb)(),o=(0,y.xn)(n),a=e.map((e=>o.get(e.id)?(0,f.BE)(e,{groupIds:(0,m.S_)(e.groupIds,i,t.editingGroupId)}):e)),s=(0,m.Fb)(a,i),c=s[s.length-1],d=a.lastIndexOf(c),u=a.slice(d+1),h=[...a.slice(0,d).filter((e=>!(0,m.Nd)(e,i))),...s,...u];return{appState:(0,m.F$)(i,Object.assign(Object.assign({},t),{selectedGroupIds:{}}),(0,g.Lm)(h)),elements:h,commitToHistory:!0}},contextItemLabel:"labels.group",contextItemPredicate:(e,t)=>de(e,t),keyTest:e=>!e.shiftKey&&e[c.tW.CTRL_OR_CMD]&&e.code===c.aU.G,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!de(t,n),type:"button",icon:(0,w.jsx)(u.BF,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.group")," — ").concat((0,y.uY)("CtrlOrCmd+G")),"aria-label":(0,h.t)("labels.group"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),he=(0,p.z)({name:"ungroup",trackEvent:{category:"element"},perform:(e,t)=>{if(0===(0,m.iJ)(t).length)return{appState:t,elements:e,commitToHistory:!1};const n=[],r=e.map((e=>{(0,x.Xh)(e)&&n.push(e.id);const r=(0,m.h6)(e.groupIds,t.selectedGroupIds);return r.length===e.groupIds.length?e:(0,f.BE)(e,{groupIds:r})})),i=(0,m.bO)(Object.assign(Object.assign({},t),{selectedGroupIds:{}}),(0,g.Lm)(r));return n.forEach((e=>i.selectedElementIds[e]=!1)),{appState:i,elements:r,commitToHistory:!0}},keyTest:e=>e.shiftKey&&e[c.tW.CTRL_OR_CMD]&&e.code===c.aU.G,contextItemLabel:"labels.ungroup",contextItemPredicate:(e,t)=>(0,m.iJ)(t).length>0,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{type:"button",hidden:0===(0,m.iJ)(n).length,icon:(0,w.jsx)(u.RJ,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.ungroup")," — ").concat((0,y.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,h.t)("labels.ungroup"),visible:(0,l.N)((0,g.Lm)(t),n)})}});var pe=n(8982);n(2789);const ge=e=>{let{color:t,border:n,onClick:i,name:o,src:a}=e;const s=(0,pe.f)(o),[l,c]=(0,r.useState)(!1),d=!l&&a,u=d?void 0:{background:t,border:"1px solid ".concat(n)};return(0,w.jsx)("div",{className:"Avatar",style:u,onClick:i,children:d?(0,w.jsx)("img",{className:"Avatar-img",src:a,alt:s,referrerPolicy:"no-referrer",onError:()=>c(!0)}):s})};var fe=n(2264);(0,p.z)({name:"goToCollaborator",trackEvent:{category:"collab"},perform:(e,t,n)=>{const r=n;return r?{appState:Object.assign(Object.assign(Object.assign({},t),(0,fe.s)({scenePoint:r,viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})),{openMenu:"canvas"===t.openMenu?null:t.openMenu}),commitToHistory:!1}:{appState:t,commitToHistory:!1}},PanelComponent:e=>{let{appState:t,updateData:n,data:r}=e;const[i,o]=r,{background:a,stroke:s}=(0,pe.X)(i,t);return(0,w.jsx)(ge,{color:a,border:s,onClick:()=>n(o.pointer),name:o.username||"",src:o.avatarUrl})}});var me=n(2791);const be=(0,p.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,t,n,r)=>{const i=(0,l.eD)((0,g.Lm)(e),t,!0);return i.some((e=>"image"===e.type))?{commitToHistory:!1,appState:Object.assign(Object.assign({},t),{errorMessage:"Support for adding images to the library coming soon!"})}:r.library.getLatestLibrary().then((e=>r.library.setLibrary([{id:(0,ce.kb)(),status:"unpublished",elements:i.map(me.OL),created:Date.now()},...e]))).then((()=>({commitToHistory:!1,appState:Object.assign(Object.assign({},t),{toast:{message:(0,h.t)("toast.addedToLibrary")}})}))).catch((e=>({commitToHistory:!1,appState:Object.assign(Object.assign({},t),{errorMessage:e.message})})))},contextItemLabel:"labels.addToLibrary"});var ve=n(8925);const xe=(e,t,n)=>{let{axis:r,position:i}=n;const o=(0,ve.v2)(e),[a,s]="x"===r?["minX","maxX"]:["minY","maxY"],l={x:0,y:0};return"start"===i?Object.assign(Object.assign({},l),{[r]:t[a]-o[a]}):"end"===i?Object.assign(Object.assign({},l),{[r]:t[s]-o[s]}):Object.assign(Object.assign({},l),{[r]:(t[a]+t[s])/2-(o[a]+o[s])/2})},ye=(e,t)=>(0,l.eD)((0,g.Lm)(e),t).length>1,we=(e,t,n)=>{const r=((e,t)=>{const n=(0,m.AI)(e),r=(0,ve.v2)(e);return n.flatMap((e=>{const n=xe(e,r,t);return e.map((e=>(0,f.BE)(e,{x:e.x+n.x,y:e.y+n.y})))}))})((0,l.eD)((0,g.Lm)(e),t),n),i=(0,y.xn)(r);return e.map((e=>i.get(e.id)||e))},_e=((0,p.z)({name:"alignTop",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"start",axis:"y"}),commitToHistory:!0}),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===c.tW.ARROW_UP,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.Ct,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.alignTop")," — ").concat((0,y.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,h.t)("labels.alignTop"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"alignBottom",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"end",axis:"y"}),commitToHistory:!0}),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===c.tW.ARROW_DOWN,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.HL,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.alignBottom")," — ").concat((0,y.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,h.t)("labels.alignBottom"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"alignLeft",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"start",axis:"x"}),commitToHistory:!0}),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===c.tW.ARROW_LEFT,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.xs,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.alignLeft")," — ").concat((0,y.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,h.t)("labels.alignLeft"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"alignRight",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"end",axis:"x"}),commitToHistory:!0}),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===c.tW.ARROW_RIGHT,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.mh,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.alignRight")," — ").concat((0,y.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,h.t)("labels.alignRight"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"center",axis:"y"}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.ST,{theme:n.theme}),onClick:()=>r(null),title:(0,h.t)("labels.centerVertically"),"aria-label":(0,h.t)("labels.centerVertically"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:we(e,t,{position:"center",axis:"x"}),commitToHistory:!0}),PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!ye(t,n),type:"button",icon:(0,w.jsx)(u.gK,{theme:n.theme}),onClick:()=>r(null),title:(0,h.t)("labels.centerHorizontally"),"aria-label":(0,h.t)("labels.centerHorizontally"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(e,t)=>(0,l.eD)((0,g.Lm)(e),t).length>1),ke=(e,t,n)=>{const r=((e,t)=>{const[n,r,i,o]="x"===t.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],a=(0,ve.v2)(e),s=(0,m.AI)(e).map((e=>[e,(0,ve.v2)(e)])).sort(((e,t)=>e[1][r]-t[1][r]));let l=0;for(const e of s)l+=e[1][o];const c=(a[o]-l)/(s.length-1);if(c<0){const e=s.findIndex((e=>e[1][n]===a[n])),o=s.findIndex((e=>e[1][i]===a[i])),l=(s[o][1][r]-s[e][1][r])/(s.length-1);let c=s[e][1][r];return s.flatMap(((n,i)=>{let[a,s]=n;const d={x:0,y:0};return i!==e&&i!==o&&(c+=l,d[t.axis]=c-s[r]),a.map((e=>(0,f.BE)(e,{x:e.x+d.x,y:e.y+d.y})))}))}let d=a[n];return s.flatMap((e=>{let[r,i]=e;const a={x:0,y:0};return a[t.axis]=d-i[n],d+=c,d+=i[o],r.map((e=>(0,f.BE)(e,{x:e.x+a.x,y:e.y+a.y})))}))})((0,l.eD)((0,g.Lm)(e),t),n),i=(0,y.xn)(r);return e.map((e=>i.get(e.id)||e))};(0,p.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:ke(e,t,{space:"between",axis:"x"}),commitToHistory:!0}),keyTest:e=>!e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.H,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!_e(t,n),type:"button",icon:(0,w.jsx)(u.uD,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.distributeHorizontally")," — ").concat((0,y.uY)("Alt+H")),"aria-label":(0,h.t)("labels.distributeHorizontally"),visible:(0,l.N)((0,g.Lm)(t),n)})}}),(0,p.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:(e,t)=>({appState:t,elements:ke(e,t,{space:"between",axis:"y"}),commitToHistory:!0}),keyTest:e=>!e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.V,PanelComponent:e=>{let{elements:t,appState:n,updateData:r}=e;return(0,w.jsx)(d.V,{hidden:!_e(t,n),type:"button",icon:(0,w.jsx)(u.W5,{theme:n.theme}),onClick:()=>r(null),title:"".concat((0,h.t)("labels.distributeVertically")," — ").concat((0,y.uY)("Alt+V")),"aria-label":(0,h.t)("labels.distributeVertically"),visible:(0,l.N)((0,g.Lm)(t),n)})}});var Ee=n(8634),Ce=n(267);const Se=(0,p.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:(e,t)=>({elements:Te(e,t,"horizontal"),appState:t,commitToHistory:!0}),keyTest:e=>e.shiftKey&&"KeyH"===e.code,contextItemLabel:"labels.flipHorizontal",contextItemPredicate:(e,t)=>((e,t)=>{const n=(0,l.eD)((0,g.Lm)(e),t);return 1===n.length&&"text"!==n[0].type})(e,t)}),Ie=(0,p.z)({name:"flipVertical",trackEvent:{category:"element"},perform:(e,t)=>({elements:Te(e,t,"vertical"),appState:t,commitToHistory:!0}),keyTest:e=>e.shiftKey&&"KeyV"===e.code,contextItemLabel:"labels.flipVertical",contextItemPredicate:(e,t)=>((e,t)=>1===(0,l.eD)((0,g.Lm)(e),t).length)(e,t)}),Te=(e,t,n)=>{const r=(0,l.eD)((0,g.Lm)(e),t);if(r.length>1)return e;const i=je(r,t,n),o=(0,y.xn)(i);return e.map((e=>o.get(e.id)||e))},je=(e,t,n)=>(e.forEach((e=>{Me(e,t),"vertical"===n&&Le(e,Math.PI)})),e),Me=(e,t)=>{const n=e.x,r=e.y,i=e.width,o=e.height,a=(0,Ee.LW)(e.angle);let s=0;((0,x.bt)(e)||(0,x.F9)(e))&&(s=2*e.points.reduce(((e,t)=>Math.max(e,t[0])),0)-e.width),(0,f.DR)(e,{angle:(0,Ee.LW)(0)});const l=(0,Ce.PC)(e,t.zoom);let c=!0,d=0,u=l.nw;if(!u&&(c=!1,u=l.ne,!u))return void(0,f.DR)(e,{angle:a});if((0,x.bt)(e)){for(let t=1;t<e.points.length;t++)b._.movePoints(e,[{index:t,point:[-e.points[t][0],e.points[t][1]]}]);b._.normalizePoints(e)}else d=c?e.x+2*i:e.x-2*i,(0,Ee.l2)((new Map).set(e.id,e),!0,e,c?"nw":"ne",!1,d,u[1]),(0,f.DR)(e,{width:i,height:o});let h=(0,Ee.LW)(2*Math.PI-a);h<0&&(h=(0,Ee.LW)(h+2*Math.PI)),(0,f.DR)(e,{angle:h}),(0,f.DR)(e,{x:n+s,y:r}),(0,v.Ww)(e)},Le=(e,t)=>{const n=e.x,r=e.y;let i=(0,Ee.LW)(e.angle+t);i<0&&(i=(0,Ee.LW)(2*Math.PI+i)),(0,f.DR)(e,{angle:i}),(0,f.DR)(e,{x:n,y:r})};var Oe=n(1868);const Ae=(0,p.z)({name:"copy",trackEvent:{category:"element"},perform:(e,t,n,r)=>{const i=(0,Oe.eD)(e,t,!0);return(0,G.vQ)(i,t,r.files),{commitToHistory:!1}},contextItemLabel:"labels.copy",keyTest:void 0}),De=(0,p.z)({name:"cut",trackEvent:{category:"element"},perform:(e,t,n,r)=>(Ae.perform(e,t,n,r),k.perform(e,t)),contextItemLabel:"labels.cut",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.code===c.aU.X}),ze=(0,p.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:async(e,t,n,r)=>{if(!r.canvas)return{commitToHistory:!1};const i=(0,Oe.eD)((0,g.Lm)(e),t,!0);try{return await $("clipboard-svg",i.length?i:(0,g.Lm)(e),t,r.files,t),{commitToHistory:!1}}catch(e){return console.error(e),{appState:Object.assign(Object.assign({},t),{errorMessage:e.message}),commitToHistory:!1}}},contextItemLabel:"labels.copyAsSvg"}),Pe=(0,p.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:async(e,t,n,r)=>{if(!r.canvas)return{commitToHistory:!1};const i=(0,Oe.eD)((0,g.Lm)(e),t,!0);try{return await $("clipboard",i.length?i:(0,g.Lm)(e),t,r.files,t),{appState:Object.assign(Object.assign({},t),{toast:{message:(0,h.t)("toast.copyToClipboardAsPng",{exportSelection:i.length?(0,h.t)("toast.selection"):(0,h.t)("toast.canvas"),exportColorScheme:t.exportWithDarkMode?(0,h.t)("buttons.darkMode"):(0,h.t)("buttons.lightMode")})}}),commitToHistory:!1}}catch(e){return console.error(e),{appState:Object.assign(Object.assign({},t),{errorMessage:e.message}),commitToHistory:!1}}},contextItemLabel:"labels.copyAsPng",keyTest:e=>e.code===c.aU.C&&e.altKey&&e.shiftKey}),Re=(0,p.z)({name:"copyText",trackEvent:{category:"element"},perform:(e,t)=>{const n=(0,Oe.eD)((0,g.Lm)(e),t,!0).reduce(((e,t)=>((0,g.iB)(t)&&e.push(t.text),e)),[]).join("\n\n");return(0,G.dd)(n),{commitToHistory:!1}},contextItemPredicate:(e,t)=>G.wx&&(0,Oe.eD)(e,t,!0).some(g.iB),contextItemLabel:"labels.copyText"}),Be=(0,p.z)({name:"gridMode",trackEvent:{category:"canvas",predicate:e=>!e.gridSize},perform(e,t){return{appState:Object.assign(Object.assign({},t),{gridSize:this.checked(t)?null:N.k}),commitToHistory:!1}},checked:e=>null!==e.gridSize,contextItemLabel:"labels.showGrid",keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.code===c.aU.QUOTE}),Ne=(0,p.z)({name:"zenMode",trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,t){return{appState:Object.assign(Object.assign({},t),{zenModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:e=>e.zenModeEnabled,contextItemLabel:"buttons.zenMode",keyTest:e=>!e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.Z}),He=(0,p.z)({name:"stats",trackEvent:{category:"menu"},perform(e,t){return{appState:Object.assign(Object.assign({},t),{showStats:!this.checked(t)}),commitToHistory:!1}},checked:e=>e.showStats,contextItemLabel:"stats.title",keyTest:e=>!e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.SLASH}),We=(0,p.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},contextItemPredicate:(e,t)=>(0,l.eD)(e,t).some((e=>(0,x.Xo)(e))),perform:(e,t)=>((0,l.eD)((0,g.Lm)(e),t).forEach((e=>{const t=(0,H.WJ)(e);if(t){var n;const{width:r,height:i,baseline:o}=(0,H.X1)(t.originalText,(0,y.mO)(t));(0,f.DR)(t,{containerId:null,width:r,height:i,baseline:o,text:t.originalText}),(0,f.DR)(e,{boundElements:null===(n=e.boundElements)||void 0===n?void 0:n.filter((e=>e.id!==t.id))})}})),{elements:e,appState:t,commitToHistory:!0})}),Ue=(0,p.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},contextItemPredicate:(e,t)=>{const n=(0,l.eD)(e,t);if(2===n.length){const e=(0,g.iB)(n[0])||(0,g.iB)(n[1]);let t;if((0,x.mG)(n[0])?t=n[0]:(0,x.mG)(n[1])&&(t=n[1]),e&&t&&null===(0,H.WJ)(t))return!0}return!1},perform:(e,t)=>{const n=(0,l.eD)((0,g.Lm)(e),t);let r,i;(0,g.iB)(n[0])&&(0,x.mG)(n[1])?(r=n[0],i=n[1]):(r=n[1],i=n[0]),(0,f.DR)(r,{containerId:i.id,verticalAlign:N.oX.MIDDLE}),(0,f.DR)(i,{boundElements:(i.boundElements||[]).concat({type:"text",id:r.id})}),(0,H.oN)(r,i);const o=e.slice(),a=o.findIndex((e=>e.id===r.id));o.splice(a,1);const s=o.findIndex((e=>e.id===i.id));return o.splice(s+1,0,r),{elements:o,appState:Object.assign(Object.assign({},t),{selectedElementIds:{[i.id]:!0}}),commitToHistory:!0}}});var Fe=n(2383);const Ke=(0,p.z)({name:"toggleLock",trackEvent:{category:"element"},perform:(e,t)=>{const n=(0,l.eD)(e,t,!0);if(!n.length)return!1;const r=Ve(n),i=(0,y.xn)(n);return{elements:e.map((e=>i.has(e.id)?(0,f.BE)(e,{locked:"lock"===r}):e)),appState:t,commitToHistory:!0}},contextItemLabel:(e,t)=>{const n=(0,l.eD)(e,t,!1);if(1===n.length)return n[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock";if(n.length>1)return"lock"===Ve(n)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll";throw new Error("Unexpected zero elements to lock/unlock. This should never happen.")},keyTest:(e,t,n)=>e.key.toLocaleLowerCase()===c.tW.L&&e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&(0,l.eD)(n,t,!1).length>0}),Ve=e=>e.some((e=>!e.locked))?"lock":"unlock",Ye=(e,t,n)=>{const r=!1;if(!(t.multiElement||t.resizingElement||t.editingElement||t.draggingElement)){const i=n();if(null===i)return{commitToHistory:r};const o=(0,y.xn)(e),a=i.elements,s=(0,y.xn)(a),l=e.filter((e=>!s.has(e.id))),c=a.map((e=>(0,f.BE)(o.get(e.id)||e,e))).concat(l.map((e=>(0,f.BE)(e,{isDeleted:!0}))));return(0,v.$q)(c,l),{elements:c,appState:Object.assign(Object.assign({},t),i.appState),commitToHistory:r,syncHistory:!0}}return{commitToHistory:r}};var Ze=n(7047);const Ge=(e,t,n,r,i,o)=>{if(e.trackEvent)try{if("object"==typeof e.trackEvent){(!e.trackEvent.predicate||e.trackEvent.predicate(n,r,o))&&(0,Ze.L)(e.trackEvent.category,e.trackEvent.action||e.name,"".concat(t," (").concat(i.device.isMobile?"mobile":"desktop",")"))}}catch(e){console.error("error while logging action:",e)}};class Xe{constructor(e,t,n,r){this.actions={},this.renderAction=(e,t)=>{const n=this.app.props.UIOptions.canvasActions;if(this.actions[e]&&"PanelComponent"in this.actions[e]&&(!n||!(e in n)||n[e])){const n=this.actions[e],r=n.PanelComponent,i=this.getElementsIncludingDeleted(),o=this.getAppState(),a=e=>{Ge(n,"ui",o,i,this.app,e),this.updater(n.perform(this.getElementsIncludingDeleted(),this.getAppState(),e,this.app))};return(0,w.jsx)(r,{elements:this.getElementsIncludingDeleted(),appState:this.getAppState(),updateData:a,appProps:this.app.props,data:t})}return null},this.updater=t=>{if(!t||!("then"in t))return e(t);t.then((t=>e(t)))},this.getAppState=t,this.getElementsIncludingDeleted=n,this.app=r}registerAction(e){this.actions[e.name]=e}registerAll(e){e.forEach((e=>this.registerAction(e)))}handleKeyDown(e){const t=this.app.props.UIOptions.canvasActions,n=Object.values(this.actions).sort(((e,t)=>(t.keyPriority||0)-(e.keyPriority||0))).filter((n=>(!t||!(n.name in t)||t[n.name])&&n.keyTest&&n.keyTest(e,this.getAppState(),this.getElementsIncludingDeleted())));if(1!==n.length)return n.length>1&&console.warn("Canceling as multiple actions match this shortcut",n),!1;const r=n[0],{viewModeEnabled:i}=this.getAppState();if(i&&!Object.values(N.EH).includes(n[0].name))return!1;const o=this.getElementsIncludingDeleted(),a=this.getAppState();return Ge(r,"keyboard",a,o,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(n[0].perform(o,a,null,this.app)),!0}executeAction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";const n=this.getElementsIncludingDeleted(),r=this.getAppState();Ge(e,t,r,n,this.app,null),this.updater(e.perform(n,r,null,this.app))}}var qe=n(8897),Je=n(7053),Qe=n(679);const $e=e=>{const t=Array.from(e.values());return{x:tt(t,(e=>e.x))/t.length,y:tt(t,(e=>e.y))/t.length}},et=e=>{let[t,n]=e;return Math.hypot(t.x-n.x,t.y-n.y)},tt=(e,t)=>e.reduce(((e,n)=>e+t(n)),0),nt=e=>({selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,viewBackgroundColor:e.viewBackgroundColor,editingLinearElement:e.editingLinearElement,editingGroupId:e.editingGroupId,name:e.name});const rt=class{constructor(){this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=(e,t)=>this.dehydrateHistoryEntry({appState:nt(e),elements:t.reduce(((t,n)=>{if((0,x.bt)(n)&&e.multiElement&&e.multiElement.id===n.id){if(e.multiElement&&e.multiElement.id===n.id&&n.points.length<2)return t;t.push(Object.assign(Object.assign({},n),{points:n.lastCommittedPoint!==n.points[n.points.length-1]?n.points.slice(0,-1):n.points}))}else t.push(n);return t}),[])})}hydrateHistoryEntry(e){let{appState:t,elements:n}=e;return{appState:JSON.parse(t),elements:n.map((e=>{var t;const n=null===(t=this.elementCache.get(e.id))||void 0===t?void 0:t.get(e.versionNonce);if(!n)throw new Error("Element not found: ".concat(e.id,":").concat(e.versionNonce));return n}))}}dehydrateHistoryEntry(e){let{appState:t,elements:n}=e;return{appState:JSON.stringify(t),elements:n.map((e=>{this.elementCache.has(e.id)||this.elementCache.set(e.id,new Map);const t=this.elementCache.get(e.id);return t.has(e.versionNonce)||t.set(e.versionNonce,(0,me.OL)(e)),{id:e.id,versionNonce:e.versionNonce}}))}}getSnapshotForTest(){return{recording:this.recording,stateHistory:this.stateHistory.map((e=>this.hydrateHistoryEntry(e))),redoStack:this.redoStack.map((e=>this.hydrateHistoryEntry(e)))}}clear(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}shouldCreateEntry(e){const{lastEntry:t}=this;if(!t)return!0;if(e.elements.length!==t.elements.length)return!0;for(let n=e.elements.length-1;n>-1;n--){const r=e.elements[n],i=t.elements[n];if(!r||!i||r.id!==i.id||r.versionNonce!==i.versionNonce)return!0}let n;for(n in e.appState){var r,i;if("editingLinearElement"===n)if((null===(r=e.appState[n])||void 0===r?void 0:r.elementId)===(null===(i=t.appState[n])||void 0===i?void 0:i.elementId))continue;if("selectedElementIds"!==n&&"selectedGroupIds"!==n&&e.appState[n]!==t.appState[n])return!0}return!1}pushEntry(e,t){const n=this.generateEntry(e,t),r=this.hydrateHistoryEntry(n);if(r){if(!this.shouldCreateEntry(r))return;this.stateHistory.push(n),this.lastEntry=r,this.clearRedoStack()}}clearRedoStack(){this.redoStack.splice(0,this.redoStack.length)}redoOnce(){if(0===this.redoStack.length)return null;const e=this.redoStack.pop();return void 0!==e?(this.stateHistory.push(e),this.hydrateHistoryEntry(e)):null}undoOnce(){if(1===this.stateHistory.length)return null;const e=this.stateHistory.pop(),t=this.stateHistory[this.stateHistory.length-1];return void 0!==e?(this.redoStack.push(e),this.hydrateHistoryEntry(t)):null}setCurrentState(e,t){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(e,t))}resumeRecording(){this.recording=!0}record(e,t){this.recording&&(this.pushEntry(e,t),this.recording=!1)}};var it=n(3547),ot=n(6202),at=n(746);const st=[{icon:(0,w.jsx)("svg",{viewBox:"0 0 320 512",className:"",children:(0,w.jsx)("path",{d:"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"})}),value:"selection",key:c.tW.V},{icon:(0,w.jsx)("svg",{viewBox:"0 0 448 512",children:(0,w.jsx)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})}),value:"rectangle",key:c.tW.R},{icon:(0,w.jsx)("svg",{viewBox:"0 0 223.646 223.646",children:(0,w.jsx)("path",{d:"M111.823 0L16.622 111.823 111.823 223.646 207.025 111.823z"})}),value:"diamond",key:c.tW.D},{icon:(0,w.jsx)("svg",{viewBox:"0 0 512 512",children:(0,w.jsx)("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})}),value:"ellipse",key:c.tW.O},{icon:(0,w.jsx)("svg",{viewBox:"0 0 448 512",className:"rtl-mirror",children:(0,w.jsx)("path",{d:"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"})}),value:"arrow",key:c.tW.A},{icon:(0,w.jsx)("svg",{viewBox:"0 0 6 6",children:(0,w.jsx)("line",{x1:"0",y1:"3",x2:"6",y2:"3",stroke:"currentColor",strokeLinecap:"round"})}),value:"line",key:[c.tW.P,c.tW.L]},{icon:(0,w.jsx)("svg",{viewBox:"0 0 512 512",children:(0,w.jsx)("path",{fill:"currentColor",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"})}),value:"freedraw",key:[c.tW.X,c.tW.P.toUpperCase()]},{icon:(0,w.jsx)("svg",{viewBox:"0 0 448 512",children:(0,w.jsx)("path",{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"})}),value:"text",key:c.tW.T},{icon:(0,w.jsx)("svg",{viewBox:"0 0 512 512",children:(0,w.jsx)("path",{fill:"currentColor",d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"})}),value:"image",key:null}];var lt=n(5156),ct=n(7288);n(1292);const dt={cut:[(0,y.uY)("CtrlOrCmd+X")],copy:[(0,y.uY)("CtrlOrCmd+C")],paste:[(0,y.uY)("CtrlOrCmd+V")],copyStyles:[(0,y.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,y.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,y.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,y.uY)("Del")],duplicateSelection:[(0,y.uY)("CtrlOrCmd+D"),(0,y.uY)("Alt+".concat((0,h.t)("helpDialog.drag")))],sendBackward:[(0,y.uY)("CtrlOrCmd+[")],bringForward:[(0,y.uY)("CtrlOrCmd+]")],sendToBack:[c.Um?(0,y.uY)("CtrlOrCmd+Alt+["):(0,y.uY)("CtrlOrCmd+Shift+[")],bringToFront:[c.Um?(0,y.uY)("CtrlOrCmd+Alt+]"):(0,y.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,y.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,y.uY)("CtrlOrCmd+G")],ungroup:[(0,y.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,y.uY)("CtrlOrCmd+'")],zenMode:[(0,y.uY)("Alt+Z")],stats:[(0,y.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,y.uY)("Shift+H")],flipVertical:[(0,y.uY)("Shift+V")],viewMode:[(0,y.uY)("Alt+R")],hyperlink:[(0,y.uY)("CtrlOrCmd+K")],toggleLock:[(0,y.uY)("CtrlOrCmd+Shift+L")]},ut=e=>{const t=dt[e];return t&&t.length>0?t[0]:""},ht=e=>{let{options:t,onCloseRequest:n,top:r,left:i,actionManager:o,appState:s,elements:l}=e;return(0,w.jsx)(ct.J,{onCloseRequest:n,top:r,left:i,fitInViewport:!0,offsetLeft:s.offsetLeft,offsetTop:s.offsetTop,viewportWidth:s.width,viewportHeight:s.height,children:(0,w.jsx)("ul",{className:"context-menu",onContextMenu:e=>e.preventDefault(),children:t.map(((e,t)=>{var r;if("separator"===e)return(0,w.jsx)("hr",{className:"context-menu-option-separator"},t);const i=e.name;let c="";return e.contextItemLabel&&(c="function"==typeof e.contextItemLabel?(0,h.t)(e.contextItemLabel(l,s)):(0,h.t)(e.contextItemLabel)),(0,w.jsx)("li",{"data-testid":i,onClick:n,children:(0,w.jsxs)("button",{className:(0,a.Z)("context-menu-option",{dangerous:"deleteSelectedElements"===i,checkmark:null===(r=e.checked)||void 0===r?void 0:r.call(e,s)}),onClick:()=>o.executeAction(e,"contextMenu"),children:[(0,w.jsx)("div",{className:"context-menu-option__label",children:c}),(0,w.jsx)("kbd",{className:"context-menu-option__shortcut",children:i?ut(i):""})]})},t)}))})})},pt=new WeakMap,gt={push(e){const t=Array.of();e.options.forEach((e=>{e&&t.push(e)})),t.length&&(0,lt.render)((0,w.jsx)(ht,{top:e.top,left:e.left,options:t,onCloseRequest:()=>(e=>{const t=pt.get(e);t&&((0,lt.unmountComponentAtNode)(t),t.remove(),pt.delete(e))})(e.container),actionManager:e.actionManager,appState:e.appState,elements:e.elements}),(e=>{let t=pt.get(e);return t||(t=document.createElement("div"),e.querySelector(".excalidraw-contextMenuContainer").appendChild(t),pt.set(e,t),t)})(e.container))}};var ft=n(8120);const mt=e=>{var t;let{appState:n,elements:r,renderAction:i,activeTool:o}=e;const a=(0,l.Zs)((0,g.Lm)(r),n);let s=!1;2===a.length&&((0,x.Xo)(a[0])||(0,x.Xo)(a[1]))&&(s=!0);const c=Boolean(n.editingElement),d=Hn(),u="rtl"===document.documentElement.getAttribute("dir"),p=(0,l.$b)(o)||a.some((e=>(0,l.$b)(e.type)&&!(0,y.Qm)(e.backgroundColor))),f=(0,l.$b)(o)||a.some((e=>(0,l.$b)(e.type))),m=1===a.length||s;let b=(null===(t=a[0])||void 0===t?void 0:t.type)||null;for(const e of a)if(e.type!==b){b=null;break}return(0,w.jsxs)("div",{className:"panelColumn",children:[((0,ft.PD)(o)&&"image"!==o&&"image"!==b||a.some((e=>(0,ft.PD)(e.type))))&&i("changeStrokeColor"),f&&i("changeBackgroundColor"),p&&i("changeFillStyle"),((0,l.Zd)(o)||a.some((e=>(0,l.Zd)(e.type))))&&i("changeStrokeWidth"),("freedraw"===o||a.some((e=>"freedraw"===e.type)))&&i("changeStrokeShape"),((0,l.M9)(o)||a.some((e=>(0,l.M9)(e.type))))&&(0,w.jsxs)(w.Fragment,{children:[i("changeStrokeStyle"),i("changeSloppiness")]}),((0,l.gP)(o)||a.some((e=>(0,l.gP)(e.type))))&&(0,w.jsx)(w.Fragment,{children:i("changeSharpness")}),((0,l.bZ)(o)||a.some((e=>(0,l.bZ)(e.type))))&&(0,w.jsxs)(w.Fragment,{children:[i("changeFontSize"),i("changeFontFamily"),i("changeTextAlign")]}),a.some((e=>(0,x.Xo)(e)||(0,x.Xh)(e)))&&i("changeVerticalAlign"),((0,l.Un)(o)||a.some((e=>(0,l.Un)(e.type))))&&(0,w.jsx)(w.Fragment,{children:i("changeArrowhead")}),i("changeOpacity"),(0,w.jsxs)("fieldset",{children:[(0,w.jsx)("legend",{children:(0,h.t)("labels.layers")}),(0,w.jsxs)("div",{className:"buttonList",children:[i("sendToBack"),i("sendBackward"),i("bringToFront"),i("bringForward")]})]}),a.length>1&&!s&&(0,w.jsxs)("fieldset",{children:[(0,w.jsx)("legend",{children:(0,h.t)("labels.align")}),(0,w.jsxs)("div",{className:"buttonList",children:[u?(0,w.jsxs)(w.Fragment,{children:[i("alignRight"),i("alignHorizontallyCentered"),i("alignLeft")]}):(0,w.jsxs)(w.Fragment,{children:[i("alignLeft"),i("alignHorizontallyCentered"),i("alignRight")]}),a.length>2&&i("distributeHorizontally"),(0,w.jsxs)("div",{className:"iconRow",children:[i("alignTop"),i("alignVerticallyCentered"),i("alignBottom"),a.length>2&&i("distributeVertically")]})]})]}),!c&&a.length>0&&(0,w.jsxs)("fieldset",{children:[(0,w.jsx)("legend",{children:(0,h.t)("labels.actions")}),(0,w.jsxs)("div",{className:"buttonList",children:[!d.isMobile&&i("duplicateSelection"),!d.isMobile&&i("deleteSelectedElements"),i("group"),i("ungroup"),m&&i("hyperlink")]})]})]})},bt=e=>{let{canvas:t,activeTool:n,setAppState:r,onImageAction:i,appState:o}=e;return(0,w.jsx)(w.Fragment,{children:st.map(((e,a)=>{let{value:s,icon:l,key:c}=e;const u=(0,h.t)("toolBar.".concat(s)),p=c&&("string"==typeof c?c:c[0]),g=p?"".concat((0,y.Oo)(p)," ").concat((0,h.t)("helpDialog.or")," ").concat(a+1):"".concat(a+1);return(0,w.jsx)(d.V,{className:"Shape",type:"radio",icon:l,checked:n.type===s,name:"editor-current-shape",title:"".concat((0,y.Oo)(u)," — ").concat(g),keyBindingLabel:"".concat(a+1),"aria-label":(0,y.Oo)(u),"aria-keyshortcuts":g,"data-testid":s,onPointerDown:e=>{let{pointerType:t}=e;o.penDetected||"pen"!==t||r({penDetected:!0,penMode:!0})},onChange:e=>{let{pointerType:n}=e;o.activeTool.type!==s&&(0,Ze.L)("toolbar",s,"ui");const a=(0,y.Om)(o,{type:s});r({activeTool:a,multiElement:null,selectedElementIds:{}}),(0,y.Uk)(t,Object.assign(Object.assign({},o),{activeTool:a})),"image"===s&&i({pointerType:n})}},s)}))})},vt=e=>{let{renderAction:t,zoom:n}=e;return(0,w.jsx)(ne,{gap:1,children:(0,w.jsxs)(te,{gap:1,align:"center",children:[t("zoomOut"),t("zoomIn"),t("resetZoom")]})})},xt=e=>{let{appState:t,setAppState:n,actionManager:r,showThemeBtn:i}=e;return(0,w.jsxs)("div",{style:{display:"flex"},children:[r.renderAction("changeViewBackgroundColor"),i&&r.renderAction("toggleTheme")]})};n(778);const yt=e=>{let{isCollaborating:t,collaboratorCount:n,onClick:r}=e;return(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(d.V,{className:(0,a.Z)("CollabButton",{"is-collaborating":t}),onClick:r,icon:u.rC,type:"button",title:(0,h.t)("labels.liveCollaboration"),"aria-label":(0,h.t)("labels.liveCollaboration"),showAriaLabel:Hn().isMobile,children:t&&(0,w.jsx)("div",{className:"CollabButton-collaborators",children:n})})})};var wt=n(2939);const _t=e=>{let{message:t,onClose:n}=e;const[o,a]=(0,r.useState)(!!t),{container:s}=Un(),l=i().useCallback((()=>{a(!1),n&&n(),null==s||s.focus()}),[n,s]);return(0,w.jsx)(w.Fragment,{children:o&&(0,w.jsx)(wt.V,{small:!0,onCloseRequest:l,title:(0,h.t)("errorDialog.title"),children:(0,w.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:t})})})};var kt=n(7968),Et=(n(2205),n(5284));const Ct="filter"in document.createElement("canvas").getContext("2d"),St=()=>(0,w.jsxs)("div",{children:[(0,w.jsx)("h3",{children:(0,h.t)("canvasError.cannotShowPreview")}),(0,w.jsx)("p",{children:(0,w.jsx)("span",{children:(0,h.t)("canvasError.canvasTooBig")})}),(0,w.jsxs)("em",{children:["(",(0,h.t)("canvasError.canvasTooBigTip"),")"]})]}),It=(e,t)=>{(0,lt.unmountComponentAtNode)(t),t.innerHTML="",e instanceof HTMLCanvasElement?t.appendChild(e):(0,lt.render)((0,w.jsx)(St,{}),t)},Tt=e=>{let{children:t,title:n,onClick:r,color:i,shade:o=6}=e;return(0,w.jsx)("button",{className:"ExportDialog-imageExportButton",style:{"--button-color":Et[i][o],"--button-color-darker":Et[i][o+1],"--button-color-darkest":Et[i][o+2]},title:n,"aria-label":n,onClick:r,children:t})},jt=e=>{let{elements:t,appState:n,files:i,exportPadding:o=N.qy,actionManager:a,onExportToPng:s,onExportToSvg:c,onExportToClipboard:d}=e;const p=(0,l.N)(t,n),[g,f]=(0,r.useState)(p),m=(0,r.useRef)(null),{exportBackground:b,viewBackgroundColor:v}=n,x=g?(0,l.eD)(t,n,!0):t;return(0,r.useEffect)((()=>{f(p)}),[p]),(0,r.useEffect)((()=>{const e=m.current;e&&(0,X.NL)(x,n,i,{exportBackground:b,viewBackgroundColor:v,exportPadding:o}).then((t=>(0,q._c)(t).then((()=>{It(t,e)})))).catch((t=>{console.error(t),It(new kt.l,e)}))}),[n,i,x,b,o,v]),(0,w.jsxs)("div",{className:"ExportDialog",children:[(0,w.jsx)("div",{className:"ExportDialog__preview",ref:m}),Ct&&a.renderAction("exportWithDarkMode"),(0,w.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},children:(0,w.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[a.renderAction("changeExportBackground"),p&&(0,w.jsx)(ee,{checked:g,onChange:e=>f(e),children:(0,h.t)("labels.onlySelected")}),a.renderAction("changeExportEmbedScene")]})}),(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,w.jsx)(te,{gap:2,children:a.renderAction("changeExportScale")}),(0,w.jsx)("p",{style:{marginLeft:"1em",userSelect:"none"},children:(0,h.t)("buttons.scale")})]}),(0,w.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!J.kr&&a.renderAction("changeProjectName")}),(0,w.jsxs)(te,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,w.jsx)(Tt,{color:"indigo",title:(0,h.t)("buttons.exportToPng"),"aria-label":(0,h.t)("buttons.exportToPng"),onClick:()=>s(x),children:"PNG"}),(0,w.jsx)(Tt,{color:"red",title:(0,h.t)("buttons.exportToSvg"),"aria-label":(0,h.t)("buttons.exportToSvg"),onClick:()=>c(x),children:"SVG"}),G.vt&&(0,w.jsx)(Tt,{title:(0,h.t)("buttons.copyPngToClipboard"),onClick:()=>d(x),color:"gray",shade:7,children:u.BR})]})]})},Mt=e=>{let{elements:t,appState:n,files:o,exportPadding:a=N.qy,actionManager:s,onExportToPng:l,onExportToSvg:c,onExportToClipboard:p}=e;const[g,f]=(0,r.useState)(!1),m=i().useCallback((()=>{f(!1)}),[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.V,{onClick:()=>{f(!0)},"data-testid":"image-export-button",icon:u.Rb,type:"button","aria-label":(0,h.t)("buttons.exportImage"),showAriaLabel:Hn().isMobile,title:(0,h.t)("buttons.exportImage")}),g&&(0,w.jsx)(wt.V,{onCloseRequest:m,title:(0,h.t)("buttons.exportImage"),children:(0,w.jsx)(jt,{elements:t,appState:n,files:o,exportPadding:a,actionManager:s,onExportToPng:l,onExportToSvg:c,onExportToClipboard:p,onCloseRequest:m})})]})};n(1310);const Lt=e=>{let{children:t,side:n,className:r}=e;return(0,w.jsx)("div",{className:(0,a.Z)("FixedSideContainer","FixedSideContainer_side_".concat(n),r),children:t})};n(7096);const Ot=e=>{let{appState:t,elements:n,isMobile:r}=e,i=(e=>{let{appState:t,elements:n,isMobile:r}=e;const{activeTool:i,isResizing:o,isRotating:a,lastPointerDownWith:s}=t,c=null!==t.multiElement;if(t.isLibraryOpen)return null;if((0,qe.EN)(t))return(0,h.t)("hints.eraserRevert");if("arrow"===i.type||"line"===i.type)return c?(0,h.t)("hints.linearElementMulti"):(0,h.t)("hints.linearElement");if("freedraw"===i.type)return(0,h.t)("hints.freeDraw");if("text"===i.type)return(0,h.t)("hints.text");if("image"===t.activeTool.type&&t.pendingImageElementId)return(0,h.t)("hints.placeImage");const d=(0,l.eD)(n,t);if(o&&"mouse"===s&&1===d.length){const e=d[0];return(0,x.bt)(e)&&2===e.points.length?(0,h.t)("hints.lockAngle"):(0,x.pC)(e)?(0,h.t)("hints.resizeImage"):(0,h.t)("hints.resize")}if(a&&"mouse"===s)return(0,h.t)("hints.rotate");if(1===d.length&&(0,x.iB)(d[0]))return(0,h.t)("hints.text_selected");if(t.editingElement&&(0,x.iB)(t.editingElement))return(0,h.t)("hints.text_editing");if("selection"===i.type){var u;if("selection"===(null===(u=t.draggingElement)||void 0===u?void 0:u.type)&&!t.editingElement&&!t.editingLinearElement)return(0,h.t)("hints.deepBoxSelect");if(!d.length&&!r)return(0,h.t)("hints.canvasPanning")}if(1===d.length){if((0,x.bt)(d[0]))return t.editingLinearElement?t.editingLinearElement.selectedPointsIndices?(0,h.t)("hints.lineEditor_pointSelected"):(0,h.t)("hints.lineEditor_nothingSelected"):(0,h.t)("hints.lineEditor_info");if((0,x.mG)(d[0]))return(0,h.t)("hints.bindTextToElement")}return null})({appState:t,elements:n,isMobile:r});return i?(i=(0,y.uY)(i),(0,w.jsx)("div",{className:"HintViewer",children:(0,w.jsx)("span",{children:i})})):null};var At=n(1226),Dt=n(5440);const zt={CHECKED:(0,w.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",children:(0,w.jsx)("path",{d:"M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"})}),UNCHECKED:(0,w.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:(0,w.jsx)("path",{d:"M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"})})},Pt=e=>(0,w.jsxs)("label",{className:(0,a.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title," — Q"),children:[(0,w.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,w.jsx)("div",{className:"ToolIcon__icon",children:e.checked?zt.CHECKED:zt.UNCHECKED})]});var Rt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Bt=e=>{let{heading:t,children:n}=e,r=Rt(e,["heading","children"]);const{id:i}=Un(),o=(0,w.jsx)("h2",{className:"visually-hidden",id:"".concat(i,"-").concat(t,"-title"),children:(0,h.t)("headings.".concat(t))});return(0,w.jsx)("section",Object.assign(Object.assign({},r),{"aria-labelledby":"".concat(i,"-").concat(t,"-title"),children:"function"==typeof n?n(o):(0,w.jsxs)(w.Fragment,{children:[o,n]})}))};var Nt=n(756);n(580);const Ht=e=>{let{className:t,mobile:n,collaborators:r,actionManager:o,layout:s}=e;const l="vertical"===s?6:3,c=r.size>l?-2*Math.min(r.size-l,15):4,d=new Map;r.forEach(((e,t)=>{d.set(e.id||t,e)}));const u=d.size>0&&Array.from(d).filter((e=>{let[t,n]=e;return 0!==Object.keys(n).length})).map((e=>{let[t,r]=e;const a=o.renderAction("goToCollaborator",[t,r]);return n?(0,w.jsx)(Y.u,{label:r.username||"Unknown user",children:a},t):(0,w.jsx)(i().Fragment,{children:a},t)}));return(0,w.jsx)("div",{className:(0,a.Z)("UserList layout-".concat(s),t,{UserList_mobile:n}),style:{"--itemOffset":"".concat(c,"px")},children:u})},Wt=(0,w.jsx)("svg",{viewBox:"0 0 576 512",children:(0,w.jsx)("path",{fill:"currentColor",d:"M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"})}),Ut=e=>{let{appState:t,setAppState:n,isMobile:r}=e;const i=Hn();return(0,w.jsxs)("label",{className:(0,a.Z)("ToolIcon ToolIcon_type_floating ToolIcon__library","ToolIcon_size_medium",{"is-mobile":r}),title:"".concat((0,y.Oo)((0,h.t)("toolBar.library"))," — 0"),children:[(0,w.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:"editor-library",onChange:e=>{var t;null===(t=document.querySelector(".layer-ui__wrapper"))||void 0===t||t.classList.remove("animate");const r=e.target.checked;n({isLibraryOpen:r}),r&&(0,Ze.L)("library","toggleLibrary (open)","toolbar (".concat(i.isMobile?"mobile":"desktop",")"))},checked:t.isLibraryOpen,"aria-label":(0,y.Oo)((0,h.t)("toolBar.library")),"aria-keyshortcuts":"0"}),(0,w.jsx)("div",{className:"ToolIcon__icon",children:Wt})]})},Ft="medium",Kt={CHECKED:(0,w.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",children:[(0,w.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,w.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,w.jsx)("path",{d:"M125 145h70v50h-70"}),(0,w.jsx)("path",{d:"M190 145v-30l-10-20h-40l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),UNCHECKED:(0,w.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:[(0,w.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,w.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,w.jsx)("path",{d:"M125 145h70v50h-70"}),(0,w.jsx)("path",{d:"M145 145v-30l-10-20H95l-10 20v30h15v-30l5-5h20l5 5v30h15"})]})},Vt=e=>e.penDetected?(0,w.jsxs)("label",{className:(0,a.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat(Ft),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,w.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,w.jsx)("div",{className:"ToolIcon__icon",children:e.checked?Kt.CHECKED:Kt.UNCHECKED})]}):e.isMobile?null:(0,w.jsx)("label",{className:(0,a.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat(Ft),{"is-mobile":e.isMobile}),children:(0,w.jsx)("div",{className:"ToolIcon__icon ToolIcon__hidden"})}),Yt=e=>{let{onHomeButtonClick:t,appState:n,elements:r,libraryMenu:i,actionManager:o,renderJSONExportDialog:a,renderImageExportDialog:s,setAppState:c,onCollabButtonClick:p,onLockToggle:f,onPenModeToggle:m,canvas:b,isCollaborating:v,renderCustomFooter:x,showThemeBtn:y,onImageAction:_,renderTopRightUI:k,renderStats:E,UIOptions:C}=e;return(0,w.jsxs)(w.Fragment,{children:[!n.viewModeEnabled&&(0,w.jsxs)(Lt,{side:"top",className:"App-top-bar",children:[(0,w.jsx)("div",{}),(0,w.jsx)(Bt,{heading:"shapes",children:e=>(0,w.jsxs)(ne,{gap:4,align:"center",children:[(0,w.jsxs)(te,{gap:1,className:"App-toolbar-container",children:[(0,w.jsxs)(At.W,{padding:1,className:"App-toolbar",children:[e,(0,w.jsx)(te,{gap:1,children:(0,w.jsx)(bt,{appState:n,canvas:b,activeTool:n.activeTool,setAppState:c,onImageAction:e=>{let{pointerType:t}=e;_({insertOnCanvasDirectly:"mouse"!==t})}})})]}),(0,w.jsx)(d.V,{type:"button",className:"HomeButton ToolIcon_type_floating",title:"Home","aria-label":"Home",icon:u.LE,onClick:t},"home"),(0,w.jsx)(Pt,{checked:n.activeTool.locked,onChange:f,title:(0,h.t)("toolBar.lock"),isMobile:!0}),(0,w.jsx)(Ut,{appState:n,setAppState:c,isMobile:!0}),(0,w.jsx)(Vt,{checked:n.penMode,onChange:m,title:(0,h.t)("toolBar.penMode"),isMobile:!0,penDetected:n.penDetected})]}),i]})}),(0,w.jsx)("div",{style:{display:"flex"},children:null==k?void 0:k(!0,n,b)})]}),E(),(0,w.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:Nt.nn+2*Nt.WM,marginLeft:Nt.nn+2*Nt.WM,marginRight:Nt.nn+2*Nt.WM},children:(0,w.jsxs)(At.W,{padding:0,children:[C.canvasActions&&"canvas"===n.openMenu?(0,w.jsx)(Bt,{className:"App-mobile-menu",heading:"canvasActions",children:(0,w.jsx)("div",{className:"panelColumn",children:(0,w.jsxs)(ne,{gap:4,children:[n.viewModeEnabled?(0,w.jsxs)(w.Fragment,{children:[a(),s()]}):(0,w.jsxs)(w.Fragment,{children:[o.renderAction("clearCanvas"),o.renderAction("loadScene"),a(),s(),p&&(0,w.jsx)(yt,{isCollaborating:v,collaboratorCount:n.collaborators.size,onClick:p}),(0,w.jsx)(xt,{actionManager:o,appState:n,setAppState:c,showThemeBtn:y})]}),null==x?void 0:x(!0,n),n.collaborators.size>0&&(0,w.jsxs)("fieldset",{children:[(0,w.jsx)("legend",{children:(0,h.t)("labels.collaborators")}),(0,w.jsx)(Ht,{mobile:!0,layout:"horizontal",collaborators:n.collaborators,actionManager:o})]})]})})}):"shape"===n.openMenu&&!n.viewModeEnabled&&(0,g.RT)(n,r)?(0,w.jsx)(Bt,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,w.jsx)(mt,{appState:n,elements:r,renderAction:o.renderAction,activeTool:n.activeTool.type})}):null,(0,w.jsxs)("footer",{className:"App-toolbar",children:[(()=>{const e=!n.viewModeEnabled&&!n.editingElement&&0===(0,l.eD)(r,n).length;return n.viewModeEnabled?C.canvasActions?(0,w.jsx)("div",{className:"App-toolbar-content",children:o.renderAction("toggleCanvasMenu")}):(0,w.jsx)("div",{children:"Excalidraw"}):(0,w.jsxs)("div",{className:"App-toolbar-content",children:[C.canvasActions&&o.renderAction("toggleCanvasMenu"),o.renderAction("toggleEditMenu"),o.renderAction("undo"),o.renderAction("redo"),e&&o.renderAction("eraser"),o.renderAction(n.multiElement?"finalize":"duplicateSelection"),o.renderAction("deleteSelectedElements")]})})(),n.scrolledOutside&&!n.openMenu&&!n.isLibraryOpen&&(0,w.jsx)("button",{className:"scroll-back-to-content",onClick:()=>{c(Object.assign({},(0,l.W)(r,n,b)))},children:(0,h.t)("buttons.scrollBackToContent")})]})]})})]})};var Zt=n(5674);n(8051);const Gt=e=>{const t=(0,r.useRef)(null),[n,i]=(0,r.useState)(null);return(0,r.useLayoutEffect)((()=>{if(!e.spreadsheet)return;const n=(0,Zt.ps)(e.chartType,e.spreadsheet,0,0);let r;i(n);const o=t.current;return(async()=>{r=await(0,X.$D)(n,{exportBackground:!1,viewBackgroundColor:Et.white},null),o.appendChild(r),e.selected&&o.parentNode.focus()})(),()=>{o.removeChild(r)}}),[e.spreadsheet,e.chartType,e.selected]),(0,w.jsx)("button",{className:"ChartPreview",onClick:()=>{n&&e.onClick(e.chartType,n)},children:(0,w.jsx)("div",{ref:t})})},Xt=e=>{let{setAppState:t,appState:n,onClose:r,onInsertChart:o}=e;const a=i().useCallback((()=>{r&&r()}),[r]),s=(e,n)=>{o(n),(0,Ze.L)("magic","chart",e),t({currentChartType:e,pasteDialog:{shown:!1,data:null}})};return(0,w.jsx)(wt.V,{small:!0,onCloseRequest:a,title:(0,h.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,w.jsxs)("div",{className:"container",children:[(0,w.jsx)(Gt,{chartType:"bar",spreadsheet:n.pasteDialog.data,selected:"bar"===n.currentChartType,onClick:s}),(0,w.jsx)(Gt,{chartType:"line",spreadsheet:n.pasteDialog.data,selected:"line"===n.currentChartType,onClick:s})]})})};n(3922);const qt=()=>(0,w.jsxs)("div",{className:"HelpDialog--header",children:[(0,w.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("helpDialog.documentation")}),(0,w.jsx)("a",{className:"HelpDialog--btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("helpDialog.blog")}),(0,w.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("helpDialog.github")})]}),Jt=e=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("h3",{children:e.title}),e.children]}),Qt=e=>(0,w.jsx)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},children:e.children}),$t=e=>(0,w.jsx)("div",{style:{width:"49%"},children:e.children}),en=e=>(0,w.jsxs)("div",{className:"HelpDialog--island",children:[(0,w.jsx)("h3",{className:"HelpDialog--island-title",children:e.caption}),e.children]}),tn=e=>(0,w.jsx)("div",{className:"HelpDialog--shortcut",children:(0,w.jsxs)("div",{style:{display:"flex",margin:"0",padding:"4px 8px",alignItems:"center"},children:[(0,w.jsx)("div",{style:{lineHeight:1.4},children:e.label}),(0,w.jsx)("div",{style:{display:"flex",flex:"0 0 auto",justifyContent:"flex-end",marginInlineStart:"auto",minWidth:"30%"},children:e.shortcuts.map(((t,n)=>(0,w.jsxs)(i().Fragment,{children:[(0,w.jsx)(nn,{children:t}),e.isOr&&n!==e.shortcuts.length-1&&(0,h.t)("helpDialog.or")]},n)))})]})});tn.defaultProps={isOr:!0};const nn=e=>(0,w.jsx)("kbd",Object.assign({className:"HelpDialog--key"},e)),rn=e=>{let{onClose:t}=e;const n=i().useCallback((()=>{t&&t()}),[t]);return(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(wt.V,{onCloseRequest:n,title:(0,h.t)("helpDialog.title"),className:"HelpDialog",children:[(0,w.jsx)(qt,{}),(0,w.jsx)(Jt,{title:(0,h.t)("helpDialog.shortcuts"),children:(0,w.jsxs)(Qt,{children:[(0,w.jsxs)($t,{children:[(0,w.jsxs)(en,{caption:(0,h.t)("helpDialog.tools"),children:[(0,w.jsx)(tn,{label:(0,h.t)("toolBar.selection"),shortcuts:["V","1"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.rectangle"),shortcuts:["R","2"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.diamond"),shortcuts:["D","3"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.ellipse"),shortcuts:["O","4"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.arrow"),shortcuts:["A","5"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.line"),shortcuts:["P","6"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.freedraw"),shortcuts:["Shift + P","X","7"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.text"),shortcuts:["T","8"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.image"),shortcuts:["9"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.library"),shortcuts:["0"]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.eraser"),shortcuts:[(0,y.uY)("E")]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.editSelectedShape"),shortcuts:[(0,y.uY)("Enter"),(0,h.t)("helpDialog.doubleClick")]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.textNewLine"),shortcuts:[(0,y.uY)("Enter"),(0,y.uY)("Shift+Enter")]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.textFinish"),shortcuts:[(0,y.uY)("Esc"),(0,y.uY)("CtrlOrCmd+Enter")]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,h.t)("helpDialog.click"),(0,h.t)("helpDialog.click"),(0,h.t)("helpDialog.click")],isOr:!1}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.curvedLine"),shortcuts:["L",(0,h.t)("helpDialog.click"),(0,h.t)("helpDialog.click"),(0,h.t)("helpDialog.click")],isOr:!1}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.lock"),shortcuts:["Q"]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.preventBinding"),shortcuts:[(0,y.uY)("CtrlOrCmd")]}),(0,w.jsx)(tn,{label:(0,h.t)("toolBar.link"),shortcuts:[(0,y.uY)("CtrlOrCmd+K")]})]}),(0,w.jsxs)(en,{caption:(0,h.t)("helpDialog.view"),children:[(0,w.jsx)(tn,{label:(0,h.t)("buttons.zoomIn"),shortcuts:[(0,y.uY)("CtrlOrCmd++")]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.zoomOut"),shortcuts:[(0,y.uY)("CtrlOrCmd+-")]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.resetZoom"),shortcuts:[(0,y.uY)("CtrlOrCmd+0")]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.zenMode"),shortcuts:[(0,y.uY)("Alt+Z")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.showGrid"),shortcuts:[(0,y.uY)("CtrlOrCmd+'")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.viewMode"),shortcuts:[(0,y.uY)("Alt+R")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.toggleTheme"),shortcuts:[(0,y.uY)("Alt+Shift+D")]}),(0,w.jsx)(tn,{label:(0,h.t)("stats.title"),shortcuts:[(0,y.uY)("Alt+/")]})]})]}),(0,w.jsx)($t,{children:(0,w.jsxs)(en,{caption:(0,h.t)("helpDialog.editor"),children:[(0,w.jsx)(tn,{label:(0,h.t)("labels.selectAll"),shortcuts:[(0,y.uY)("CtrlOrCmd+A")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.multiSelect"),shortcuts:[(0,y.uY)("Shift+".concat((0,h.t)("helpDialog.click")))]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.deepSelect"),shortcuts:[(0,y.uY)("CtrlOrCmd+".concat((0,h.t)("helpDialog.click")))]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,y.uY)("CtrlOrCmd+".concat((0,h.t)("helpDialog.drag")))]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.moveCanvas"),shortcuts:[(0,y.uY)("Space+".concat((0,h.t)("helpDialog.drag"))),(0,y.uY)("Wheel+".concat((0,h.t)("helpDialog.drag")))],isOr:!0}),(0,w.jsx)(tn,{label:(0,h.t)("labels.cut"),shortcuts:[(0,y.uY)("CtrlOrCmd+X")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.copy"),shortcuts:[(0,y.uY)("CtrlOrCmd+C")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.paste"),shortcuts:[(0,y.uY)("CtrlOrCmd+V")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.copyAsPng"),shortcuts:[(0,y.uY)("Shift+Alt+C")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.copyStyles"),shortcuts:[(0,y.uY)("CtrlOrCmd+Alt+C")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.pasteStyles"),shortcuts:[(0,y.uY)("CtrlOrCmd+Alt+V")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.delete"),shortcuts:[(0,y.uY)("Del")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.sendToBack"),shortcuts:[c.Um?(0,y.uY)("CtrlOrCmd+Alt+["):(0,y.uY)("CtrlOrCmd+Shift+[")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.bringToFront"),shortcuts:[c.Um?(0,y.uY)("CtrlOrCmd+Alt+]"):(0,y.uY)("CtrlOrCmd+Shift+]")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.sendBackward"),shortcuts:[(0,y.uY)("CtrlOrCmd+[")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.bringForward"),shortcuts:[(0,y.uY)("CtrlOrCmd+]")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.alignTop"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+Up")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.alignBottom"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+Down")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.alignLeft"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+Left")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.alignRight"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+Right")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.duplicateSelection"),shortcuts:[(0,y.uY)("CtrlOrCmd+D"),(0,y.uY)("Alt+".concat((0,h.t)("helpDialog.drag")))]}),(0,w.jsx)(tn,{label:(0,h.t)("helpDialog.toggleElementLock"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+L")]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.undo"),shortcuts:[(0,y.uY)("CtrlOrCmd+Z")]}),(0,w.jsx)(tn,{label:(0,h.t)("buttons.redo"),shortcuts:c.ED?[(0,y.uY)("CtrlOrCmd+Y"),(0,y.uY)("CtrlOrCmd+Shift+Z")]:[(0,y.uY)("CtrlOrCmd+Shift+Z")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.group"),shortcuts:[(0,y.uY)("CtrlOrCmd+G")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.ungroup"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+G")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.flipHorizontal"),shortcuts:[(0,y.uY)("Shift+H")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.flipVertical"),shortcuts:[(0,y.uY)("Shift+V")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.showStroke"),shortcuts:[(0,y.uY)("S")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.showBackground"),shortcuts:[(0,y.uY)("G")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.decreaseFontSize"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+<")]}),(0,w.jsx)(tn,{label:(0,h.t)("labels.increaseFontSize"),shortcuts:[(0,y.uY)("CtrlOrCmd+Shift+>")]})]})})]})})]})})};n(5080);const on=e=>{let{children:t,color:n}=e;return(0,w.jsx)("div",{className:"Card",style:{"--card-color":"primary"===n?"var(--color-primary)":Et[n][7],"--card-color-darker":"primary"===n?"var(--color-primary-darker)":Et[n][8],"--card-color-darkest":"primary"===n?"var(--color-primary-darkest)":Et[n][9]},children:t})},an=e=>{let{elements:t,appState:n,files:r,actionManager:i,exportOpts:o,canvas:a}=e;const{onExportToBackend:s}=o;return(0,w.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,w.jsxs)("div",{className:"ExportDialog-cards",children:[o.saveFileToDisk&&(0,w.jsxs)(on,{color:"lime",children:[(0,w.jsx)("div",{className:"Card-icon",children:u.TP}),(0,w.jsx)("h2",{children:(0,h.t)("exportDialog.disk_title")}),(0,w.jsxs)("div",{className:"Card-details",children:[(0,h.t)("exportDialog.disk_details"),!J.kr&&i.renderAction("changeProjectName")]}),(0,w.jsx)(d.V,{className:"Card-button",type:"button",title:(0,h.t)("exportDialog.disk_button"),"aria-label":(0,h.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:()=>{i.executeAction(ie,"ui")}})]}),s&&(0,w.jsxs)(on,{color:"pink",children:[(0,w.jsx)("div",{className:"Card-icon",children:u.p4}),(0,w.jsx)("h2",{children:(0,h.t)("exportDialog.link_title")}),(0,w.jsx)("div",{className:"Card-details",children:(0,h.t)("exportDialog.link_details")}),(0,w.jsx)(d.V,{className:"Card-button",type:"button",title:(0,h.t)("exportDialog.link_button"),"aria-label":(0,h.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:()=>{s(t,n,r,a),(0,Ze.L)("export","link","ui (".concat((0,y.$h)(),")"))}})]}),o.renderCustomUI&&o.renderCustomUI(t,n,r,a)]})})},sn=e=>{let{elements:t,appState:n,files:o,actionManager:a,exportOpts:s,canvas:l}=e;const[c,p]=(0,r.useState)(!1),g=i().useCallback((()=>{p(!1)}),[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.V,{onClick:()=>{"function"==typeof s?a.executeAction(ie):p(!0)},"data-testid":"json-export-button",icon:u.TP,type:"button","aria-label":(0,h.t)("buttons.export"),showAriaLabel:Hn().isMobile,title:(0,h.t)("buttons.export")}),c&&s&&"function"!=typeof s&&(0,w.jsx)(wt.V,{onCloseRequest:g,title:(0,h.t)("buttons.export"),children:(0,w.jsx)(an,{elements:t,appState:n,files:o,actionManager:a,onCloseRequest:g,exportOpts:s,canvas:l})})]})};var ln=n(3024);n(9295),n(9781);const cn=e=>{let{libItem:t,appState:n,index:i,onChange:o,onRemove:a}=e;const s=(0,r.useRef)(null),l=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const e=s.current;e&&(async()=>{const r=await(0,ln.$D)({elements:t.elements,appState:Object.assign(Object.assign({},n),{viewBackgroundColor:Et.white,exportBackground:!0}),files:null});e.innerHTML=r.outerHTML})()}),[t.elements,n]),(0,w.jsxs)("div",{className:"single-library-item",children:["published"===t.status&&(0,w.jsx)("span",{className:"single-library-item-status",children:(0,h.t)("labels.statusPublished")}),(0,w.jsx)("div",{ref:s,className:"single-library-item__svg"}),(0,w.jsx)(d.V,{"aria-label":(0,h.t)("buttons.remove"),type:"button",icon:u.xv,className:"single-library-item--remove",onClick:a.bind(null,t.id),title:(0,h.t)("buttons.remove")}),(0,w.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0.3rem",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,w.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,w.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,w.jsx)("span",{style:{fontWeight:500,color:Et.gray[6]},children:(0,h.t)("publishDialog.itemName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",ref:l,style:{width:"80%",padding:"0.2rem"},defaultValue:t.name,placeholder:"Item name",onChange:e=>{o(e.target.value,i)}})]}),(0,w.jsx)("span",{className:"error",children:t.error})]})]})},dn="publish-library-data",un=e=>{let{onClose:t,libraryItems:n,appState:i,onSuccess:o,onError:a,updateItemsInStorage:s,onRemove:l}=e;const[c,u]=(0,r.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[p,g]=(0,r.useState)(!1);(0,r.useEffect)((()=>{const e=(()=>{try{const e=localStorage.getItem(dn);if(e)return JSON.parse(e)}catch(e){console.error(e)}return null})();e&&u(e)}),[]);const[f,m]=(0,r.useState)(n.slice());(0,r.useEffect)((()=>{m(n.slice())}),[n]);const b=e=>{u(Object.assign(Object.assign({},c),{[e.target.name]:e.target.value}))},v=(0,r.useCallback)((()=>{s(f),(e=>{try{localStorage.setItem(dn,JSON.stringify(e))}catch(e){console.error(e)}})(c),t()}),[f,t,s,c]),x=!!n.length,_=n.some((e=>"published"===e.status));return(0,w.jsx)(wt.V,{onCloseRequest:v,title:(0,h.t)("publishDialog.title"),className:"publish-library",children:x?(0,w.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),g(!0);const t=[];let n=!1;if(f.forEach((e=>{let r="";e.name||(r=(0,h.t)("publishDialog.errors.required"),n=!0),t.push(Object.assign(Object.assign({},e),{error:r}))})),n)return m(t),void g(!1);const r=await(async e=>{const t=128,n=Math.round(8),r=Math.max(Math.round(2),2),i=(0,y.yo)(e,6),o=document.createElement("canvas");o.width=i[0].length*t+(i[0].length+1)*(2*n)-2*n,o.height=i.length*t+(i.length+1)*(2*n)-2*n;const a=o.getContext("2d");a.fillStyle=Et.white,a.fillRect(0,0,o.width,o.height);for(const[i,o]of e.entries()){const e=await(0,ln.NL)({elements:o.elements,files:null,maxWidthOrHeight:t}),{width:s,height:l}=e,c=Math.floor(i/6)*(t+2*n),d=i%6*(t+2*n);a.drawImage(e,d+(t-s)/2+n,c+(t-l)/2+n),a.lineWidth=r,a.strokeStyle=Et.gray[4],a.strokeRect(d+n/2,c+n/2,t+n,t+n)}return await(0,q.Tu)(new File([await(0,q._c)(o)],"preview",{type:N.LO.png}),{outputType:N.LO.jpg,maxWidthOrHeight:5e3})})(f),i={type:N.r8.excalidrawLibrary,version:N.Kr.excalidrawLibrary,source:N.pb,libraryItems:f},s=JSON.stringify(i,null,2),l=new Blob([s],{type:"application/json"}),d=new FormData;d.append("excalidrawLib",l),d.append("previewImage",r),d.append("previewImageType",r.type),d.append("title",c.name),d.append("authorName",c.authorName),d.append("githubHandle",c.githubHandle),d.append("name",c.name),d.append("description",c.description),d.append("twitterHandle",c.twitterHandle),d.append("website",c.website),fetch("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries/submit",{method:"post",body:d}).then((e=>e.ok?e.json().then((e=>{let{url:t}=e;localStorage.removeItem(dn),o({url:t,authorName:c.authorName,items:f})})):e.json().catch((()=>{throw new Error(e.statusText||"something went wrong")})).then((t=>{throw new Error(t.message||e.statusText||"something went wrong")}))),(e=>{console.error(e),a(e),g(!1)})).catch((e=>{console.error(e),a(e),g(!1)}))},children:[(0,w.jsxs)("div",{className:"publish-library-note",children:[(0,h.t)("publishDialog.noteDescription.pre"),(0,w.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("publishDialog.noteDescription.link")})," ",(0,h.t)("publishDialog.noteDescription.post")]}),(0,w.jsxs)("span",{className:"publish-library-note",children:[(0,h.t)("publishDialog.noteGuidelines.pre"),(0,w.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("publishDialog.noteGuidelines.link")}),(0,h.t)("publishDialog.noteGuidelines.post")]}),(0,w.jsx)("div",{className:"publish-library-note",children:(0,h.t)("publishDialog.noteItems")}),_&&(0,w.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,h.t)("publishDialog.republishWarning")}),(()=>{const e=[];return f.forEach(((t,n)=>{e.push((0,w.jsx)("div",{className:"single-library-item-wrapper",children:(0,w.jsx)(cn,{libItem:t,appState:i,index:n,onChange:(e,t)=>{const n=f.slice();n[t].name=e,m(n)},onRemove:l})},n))})),(0,w.jsx)("div",{className:"selected-library-items",children:e})})(),(0,w.jsxs)("div",{className:"publish-library__fields",children:[(0,w.jsxs)("label",{children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.libraryName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",name:"name",required:!0,value:c.name,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.libraryName")})]}),(0,w.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.libraryDesc")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("textarea",{name:"description",rows:4,required:!0,value:c.description,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.libraryDesc")})]}),(0,w.jsxs)("label",{children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.authorName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",name:"authorName",required:!0,value:c.authorName,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.authorName")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.githubUsername")}),(0,w.jsx)("input",{type:"text",name:"githubHandle",value:c.githubHandle,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.githubHandle")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.twitterUsername")}),(0,w.jsx)("input",{type:"text",name:"twitterHandle",value:c.twitterHandle,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.twitterHandle")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,h.t)("publishDialog.website")}),(0,w.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,h.t)("publishDialog.errors.website"),value:c.website,onChange:b,placeholder:(0,h.t)("publishDialog.placeholder.website")})]}),(0,w.jsxs)("span",{className:"publish-library-note",children:[(0,h.t)("publishDialog.noteLicense.pre"),(0,w.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("publishDialog.noteLicense.link")}),(0,h.t)("publishDialog.noteLicense.post")]})]}),(0,w.jsxs)("div",{className:"publish-library__buttons",children:[(0,w.jsx)(d.V,{type:"button",title:(0,h.t)("buttons.cancel"),"aria-label":(0,h.t)("buttons.cancel"),label:(0,h.t)("buttons.cancel"),onClick:v,"data-testid":"cancel-clear-canvas-button",className:"publish-library__buttons--cancel"}),(0,w.jsx)(d.V,{type:"submit",title:(0,h.t)("buttons.submit"),"aria-label":(0,h.t)("buttons.submit"),label:(0,h.t)("buttons.submit"),className:"publish-library__buttons--confirm",isLoading:p})]})]}):(0,w.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,h.t)("publishDialog.atleastOneLibItem")})})};n(4406);var hn=n(6963),pn=n(4981);n(694);const gn=(0,w.jsx)("svg",{viewBox:"0 0 1792 1792",children:(0,w.jsx)("path",{d:"M1600 736v192c0 26.667-9.33 49.333-28 68-18.67 18.67-41.33 28-68 28h-416v416c0 26.67-9.33 49.33-28 68s-41.33 28-68 28H800c-26.667 0-49.333-9.33-68-28s-28-41.33-28-68v-416H288c-26.667 0-49.333-9.33-68-28-18.667-18.667-28-41.333-28-68V736c0-26.667 9.333-49.333 28-68s41.333-28 68-28h416V224c0-26.667 9.333-49.333 28-68s41.333-28 68-28h192c26.67 0 49.33 9.333 68 28s28 41.333 28 68v416h416c26.67 0 49.33 9.333 68 28s28 41.333 28 68Z",style:{stroke:"#fff",strokeWidth:140},transform:"translate(0 64)"})}),fn=e=>{let{id:t,elements:n,files:i,isPending:o,onClick:s,selected:l,onToggle:c,onDrag:d}=e;const u=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=u.current;if(e)return(async()=>{if(!n)return;const t=await(0,X.$D)(n,{exportBackground:!1,viewBackgroundColor:Et.white},i);e.innerHTML=t.outerHTML})(),()=>{e.innerHTML=""}}),[n,i]);const[h,p]=(0,r.useState)(!1),g=Hn().isMobile,f=o&&(0,w.jsx)("div",{className:"library-unit__adder",children:gn});return(0,w.jsxs)("div",{className:(0,a.Z)("library-unit",{"library-unit__active":n,"library-unit--hover":n&&h,"library-unit--selected":l}),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,w.jsx)("div",{className:(0,a.Z)("library-unit__dragger",{"library-unit__pulse":!!o}),ref:u,draggable:!!n,onClick:n||o?e=>{t&&e.shiftKey?c(t,e):s()}:void 0,onDragStart:e=>{t?(p(!1),d(t,e)):e.preventDefault()}}),f,t&&n&&(h||g||l)&&(0,w.jsx)(ee,{checked:l,onChange:(e,n)=>c(t,n),className:"library-unit__checkbox"})]})};n(6043);var mn=n(9101);n(47);const bn=(0,w.jsx)("svg",{viewBox:"0 0 24 24",fill:"#ffffff",children:(0,w.jsx)("path",{d:"M19 22H5a3 3 0 01-3-3V5a3 3 0 013-3h14a3 3 0 013 3v14a3 3 0 01-3 3zm0-18h-9v16h9a1.01 1.01 0 001-1V5a1.01 1.01 0 00-1-1z"})}),vn=e=>(0,w.jsxs)(Y.u,{label:(0,h.t)("labels.sidebarLock"),children:[(0,w.jsxs)("label",{className:(0,a.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium")),children:[(0,w.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:e.onChange,checked:e.checked,"aria-label":(0,h.t)("labels.sidebarLock")})," ",(0,w.jsx)("div",{className:"ToolIcon__icon side_lock_icon",tabIndex:0,children:bn})," "]})," "]}),xn=e=>{let{isLoading:t,libraryItems:n,onRemoveFromLibrary:i,onAddToLibrary:o,onInsertLibraryItems:a,pendingElements:s,theme:l,setAppState:c,appState:p,libraryReturnUrl:g,library:f,files:m,id:b,selectedItems:v,onSelectItems:x,onPublish:_,resetLibrary:k}=e;const E=(0,r.useCallback)((()=>{const e=v.length?(0,h.t)("alerts.removeItemsFromsLibrary",{count:v.length}):(0,h.t)("alerts.resetLibrary"),t=v.length?(0,h.t)("confirmDialog.removeItemsFromLib"):(0,h.t)("confirmDialog.resetLibrary");return(0,w.jsx)(pn.Z,{onConfirm:()=>{v.length?i():k(),S(!1)},onCancel:()=>{S(!1)},title:t,children:(0,w.jsx)("p",{children:e})})}),[v,i,k]),[C,S]=(0,r.useState)(!1),I=Hn(),T=()=>{const e=!!v.length,t=e?n.filter((e=>v.includes(e.id))):n,r=e?(0,h.t)("buttons.remove"):(0,h.t)("buttons.resetLibrary");return(0,w.jsxs)("div",{className:"library-actions",children:[!e&&(0,w.jsx)(d.V,{type:"button",title:(0,h.t)("buttons.load"),"aria-label":(0,h.t)("buttons.load"),icon:u.zD,onClick:async()=>{try{await f.updateLibrary({libraryItems:(0,J.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(e){if("AbortError"===(null==e?void 0:e.name))return void console.warn(e);c({errorMessage:(0,h.t)("errors.importLibraryError")})}},className:"library-actions--load"},"import"),!!t.length&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.V,{type:"button",title:(0,h.t)("buttons.export"),"aria-label":(0,h.t)("buttons.export"),icon:u.TP,onClick:async()=>{const n=e?t:await f.getLatestLibrary();(0,Q.t1)(n).catch(y.FG).catch((e=>{c({errorMessage:e.message})}))},className:"library-actions--export",children:v.length>0&&(0,w.jsx)("span",{className:"library-actions-counter",children:v.length})},"export"),(0,w.jsx)(d.V,{type:"button",title:r,"aria-label":r,icon:u._I,onClick:()=>S(!0),className:"library-actions--remove",children:v.length>0&&(0,w.jsx)("span",{className:"library-actions-counter",children:v.length})},"reset")]}),e&&(0,w.jsx)(Y.u,{label:(0,h.t)("hints.publishLibrary"),children:(0,w.jsxs)(d.V,{type:"button","aria-label":(0,h.t)("buttons.publishLibrary"),label:(0,h.t)("buttons.publishLibrary"),icon:u.Nw,className:"library-actions--publish",onClick:_,children:[!I.isMobile&&(0,w.jsx)("label",{children:(0,h.t)("buttons.publishLibrary")}),v.length>0&&(0,w.jsx)("span",{className:"library-actions-counter",children:v.length})]})}),I.isMobile&&(0,w.jsx)("div",{className:"library-menu-browse-button--mobile",children:(0,w.jsx)("a",{href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(M,"&useHash=true&token=").concat(b,"&theme=").concat(l,"&version=").concat(N.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,h.t)("labels.libraries")})})]})},j=I.isMobile&&!I.isSmScreen?6:4,M=g||window.location.origin+window.location.pathname,[L,O]=(0,r.useState)(null),A=(e,t)=>{const n=!v.includes(e),r=[...R,...B];if(n){if(t.shiftKey&&L){const t=r.findIndex((e=>e.id===L)),n=r.findIndex((t=>t.id===e));if(-1===t||-1===n)return void x([...v,e]);const i=(0,y.xn)(v),o=r.reduce(((e,r,o)=>((o>=t&&o<=n||i.has(r.id))&&e.push(r.id),e)),[]);x(o)}else x([...v,e]);O(e)}else O(null),x(v.filter((t=>t!==e)))},D=e=>{let t;return t=v.includes(e)?n.filter((e=>v.includes(e.id))):n.filter((t=>t.id===e)),t},z=e=>{var t,n,r,i,o;return(0,w.jsx)(ne,{children:(0,w.jsx)(fn,{elements:null===(t=e.item)||void 0===t?void 0:t.elements,files:m,isPending:!(null!==(n=e.item)&&void 0!==n&&n.id||null===(r=e.item)||void 0===r||!r.elements),onClick:e.onClick||(()=>{}),id:(null===(i=e.item)||void 0===i?void 0:i.id)||null,selected:!(null===(o=e.item)||void 0===o||!o.id)&&v.includes(e.item.id),onToggle:A,onDrag:(e,t)=>{t.dataTransfer.setData(N.LO.excalidrawlib,(0,Q.NI)(D(e)))}})},e.key)},P=e=>{const t=e.map((e=>e.id?z({item:e,onClick:()=>a(D(e.id)),key:e.id}):z({key:"__pending__item__",item:e,onClick:()=>o(s)})));let n=(0,hn.chunk)(t,j);return n.length||(n=[[]]),n.map(((e,t,n)=>(t===n.length-1&&(e=e.concat(new Array(j-e.length).fill(null).map(((e,t)=>z({key:"empty_".concat(t),item:null}))))),(0,w.jsx)(te,{align:"center",gap:1,children:e},t))))},R=n.filter((e=>"published"!==e.status)),B=n.filter((e=>"published"===e.status));return(0,w.jsxs)("div",{className:"library-menu-items-container",style:I.isMobile?{minHeight:"200px",maxHeight:"70vh"}:void 0,children:[C&&E(),(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)("div",{className:"layer-ui__library-header",children:[T(),I.canDeviceFitSidebar&&(0,w.jsx)(w.Fragment,{children:(0,w.jsx)("div",{className:"layer-ui__sidebar-lock-button",children:(0,w.jsx)(vn,{checked:p.isLibraryMenuDocked,onChange:()=>{var e;null===(e=document.querySelector(".layer-ui__wrapper"))||void 0===e||e.classList.add("animate");const t=!p.isLibraryMenuDocked;c({isLibraryMenuDocked:t}),(0,Ze.L)("library","toggleLibraryDock (".concat(t?"dock":"undock",")"),"sidebar (".concat(I.isMobile?"mobile":"desktop",")"))}})})}),!I.isMobile&&(0,w.jsx)("div",{className:"ToolIcon__icon__close",children:(0,w.jsx)("button",{className:"Modal__close",onClick:()=>c({isLibraryOpen:!1}),"aria-label":(0,h.t)("buttons.close"),children:u.xv})})]},"library-header")}),(0,w.jsxs)(ne,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:B.length>0?1:"0 1 auto",marginBottom:0},children:[(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:"separator",children:[(s.length>0||R.length>0||B.length>0)&&(0,w.jsx)("div",{children:(0,h.t)("labels.personalLib")}),t&&(0,w.jsx)("div",{style:{marginLeft:"auto",marginRight:"1rem",display:"flex",alignItems:"center",fontWeight:"normal"},children:(0,w.jsx)("div",{style:{transform:"translateY(2px)"},children:(0,w.jsx)(mn.Z,{})})})]}),s.length||R.length?P([...s.length?[{id:null,elements:s}]:[],...R]):(0,w.jsxs)("div",{style:{height:65,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:[(0,h.t)("library.noItems"),(0,w.jsx)("div",{style:{margin:".6rem 0",fontSize:".8em",width:"70%",textAlign:"center"},children:B.length>0?(0,h.t)("library.hint_emptyPrivateLibrary"):(0,h.t)("library.hint_emptyLibrary")})]})]}),(0,w.jsxs)(w.Fragment,{children:[(B.length>0||!I.isMobile&&(s.length>0||R.length>0))&&(0,w.jsx)("div",{className:"separator",children:(0,h.t)("labels.excalidrawLib")}),B.length>0?P(B):R.length>0?(0,w.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,h.t)("library.noItems")}):null]})]}),!I.isMobile&&(0,w.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(M,"&useHash=true&token=").concat(b,"&theme=").concat(l,"&version=").concat(N.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,h.t)("labels.libraries")})]})};var yn=n(6131),wn=n(9487);const _n=(e,t)=>e.filter((e=>t.includes(e.id))),kn=(0,r.forwardRef)(((e,t)=>{let{children:n}=e;return(0,w.jsx)(At.W,{padding:1,ref:t,className:"layer-ui__library",children:n})})),En=e=>{let{onClose:t,onInsertLibraryItems:n,pendingElements:i,onAddToLibrary:o,theme:a,setAppState:s,files:l,libraryReturnUrl:u,focusContainer:p,library:g,id:f,appState:m}=e;const b=(0,r.useRef)(null),v=Hn();((e,t)=>{(0,r.useEffect)((()=>{const n=n=>{e.current&&(n.target instanceof Element&&(e.current.contains(n.target)||!document.body.contains(n.target))||t(n))};return document.addEventListener("pointerdown",n,!1),()=>{document.removeEventListener("pointerdown",n)}}),[e,t])})(b,(0,r.useCallback)((e=>{e.target.closest(".ToolIcon__library")||m.isLibraryMenuDocked&&v.canDeviceFitSidebar||t()}),[t,m.isLibraryMenuDocked,v.canDeviceFitSidebar])),(0,r.useEffect)((()=>{const e=e=>{e.key!==c.tW.ESCAPE||m.isLibraryMenuDocked&&v.canDeviceFitSidebar||t()};return document.addEventListener(N.Ks.KEYDOWN,e),()=>{document.removeEventListener(N.Ks.KEYDOWN,e)}}),[t,m.isLibraryMenuDocked,v.canDeviceFitSidebar]);const[x,y]=(0,r.useState)([]),[_,k]=(0,r.useState)(!1),[E,C]=(0,r.useState)(null),[S]=(0,yn.KO)(Je.rF,wn.yE),I=(0,r.useCallback)((async e=>{const t=e.filter((e=>!x.includes(e.id)));g.setLibrary(t).catch((()=>{s({errorMessage:(0,h.t)("alerts.errorRemovingFromLibrary")})})),y([])}),[g,s,x,y]),T=(0,r.useCallback)((()=>{g.resetLibrary(),p()}),[g,p]),j=(0,r.useCallback)((async(e,t)=>{if((0,Ze.L)("element","addToLibrary","ui"),e.some((e=>"image"===e.type)))return s({errorMessage:"Support for adding images to the library coming soon!"});const n=[{status:"unpublished",elements:e,id:(0,ce.kb)(),created:Date.now()},...t];o(),g.setLibrary(n).catch((()=>{s({errorMessage:(0,h.t)("alerts.errorAddingToLibrary")})}))}),[o,g,s]),M=(0,r.useCallback)((()=>(0,w.jsxs)(wt.V,{onCloseRequest:()=>C(null),title:(0,h.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,w.jsxs)("p",{children:[(0,h.t)("publishSuccessDialog.content",{authorName:E.authorName})," ",(0,w.jsx)("a",{href:null==E?void 0:E.url,target:"_blank",rel:"noopener noreferrer",children:(0,h.t)("publishSuccessDialog.link")})]}),(0,w.jsx)(d.V,{type:"button",title:(0,h.t)("buttons.close"),"aria-label":(0,h.t)("buttons.close"),label:(0,h.t)("buttons.close"),onClick:()=>C(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})),[C,E]),L=(0,r.useCallback)(((e,t)=>{k(!1),C({url:e.url,authorName:e.authorName});const n=t.slice();n.forEach((e=>{x.includes(e.id)&&(e.status="published")})),g.setLibrary(n)}),[k,C,x,g]);return"loading"!==S.status||S.isInitialized?(0,w.jsxs)(kn,{ref:b,children:[_&&(0,w.jsx)(un,{onClose:()=>k(!1),libraryItems:_n(S.libraryItems,x),appState:m,onSuccess:e=>L(e,S.libraryItems),onError:e=>window.alert(e),updateItemsInStorage:()=>g.setLibrary(S.libraryItems),onRemove:e=>y(x.filter((t=>t!==e)))}),E&&M(),(0,w.jsx)(xn,{isLoading:"loading"===S.status,libraryItems:S.libraryItems,onRemoveFromLibrary:()=>I(S.libraryItems),onAddToLibrary:e=>j(e,S.libraryItems),onInsertLibraryItems:n,pendingElements:i,setAppState:s,appState:m,libraryReturnUrl:u,library:g,theme:a,files:l,id:f,selectedItems:x,onSelectItems:e=>y(e),onPublish:()=>k(!0),resetLibrary:T})]}):(0,w.jsx)(kn,{ref:b,children:(0,w.jsxs)("div",{className:"layer-ui__library-message",children:[(0,w.jsx)(mn.Z,{size:"2em"}),(0,w.jsx)("span",{children:(0,h.t)("labels.libraryLoadingMessage")})]})})};n(3336),n(276),n(1528);const Cn=e=>{var t;const n=Hn(),r=(0,ve.KP)(e.elements),i=(0,l.Zs)(e.elements,e.appState),o=(0,ve.KP)(i);return n.isMobile&&e.appState.openMenu?null:(0,w.jsx)("div",{className:"Stats",children:(0,w.jsxs)(At.W,{padding:2,children:[(0,w.jsx)("div",{className:"close",onClick:e.onClose,children:u.xv}),(0,w.jsx)("h3",{children:(0,h.t)("stats.title")}),(0,w.jsx)("table",{children:(0,w.jsxs)("tbody",{children:[(0,w.jsx)("tr",{children:(0,w.jsx)("th",{colSpan:2,children:(0,h.t)("stats.scene")})}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.elements")}),(0,w.jsx)("td",{children:e.elements.length})]}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.width")}),(0,w.jsx)("td",{children:Math.round(r[2])-Math.round(r[0])})]}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.height")}),(0,w.jsx)("td",{children:Math.round(r[3])-Math.round(r[1])})]}),1===i.length&&(0,w.jsx)("tr",{children:(0,w.jsx)("th",{colSpan:2,children:(0,h.t)("stats.element")})}),i.length>1&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("tr",{children:(0,w.jsx)("th",{colSpan:2,children:(0,h.t)("stats.selected")})}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.elements")}),(0,w.jsx)("td",{children:i.length})]})]}),i.length>0&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:"x"}),(0,w.jsx)("td",{children:Math.round(o[0])})]}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:"y"}),(0,w.jsx)("td",{children:Math.round(o[1])})]}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.width")}),(0,w.jsx)("td",{children:Math.round(o[2]-o[0])})]}),(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.height")}),(0,w.jsx)("td",{children:Math.round(o[3]-o[1])})]})]}),1===i.length&&(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,h.t)("stats.angle")}),(0,w.jsx)("td",{children:"".concat(Math.round(180*i[0].angle/Math.PI),"°")})]}),null===(t=e.renderCustomStats)||void 0===t?void 0:t.call(e,e.elements,e.appState)]})})]})})};var Sn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const In=e=>{let{onHomeButtonClick:t,actionManager:n,appState:i,files:o,setAppState:s,canvas:c,elements:d,onCollabButtonClick:u,onLockToggle:p,onPenModeToggle:f,onInsertElements:m,showExitZenModeBtn:b,showThemeBtn:v,isCollaborating:x,renderTopRightUI:_,renderCustomFooter:k,renderCustomStats:E,libraryReturnUrl:C,UIOptions:S,focusContainer:I,library:T,id:j,onImageAction:M}=e;const L=Hn(),O=()=>S.canvasActions&&S.canvasActions.export?(0,w.jsx)(sn,{elements:d,appState:i,files:o,actionManager:n,exportOpts:S.canvasActions.export,canvas:c}):null,A=()=>{if(!S.canvasActions||!S.canvasActions.saveAsImage)return null;const e=e=>async t=>{(0,Ze.L)("export",e,"ui");const n=await $(e,t,i,o,{exportBackground:i.exportBackground,name:i.name,viewBackgroundColor:i.viewBackgroundColor}).catch(y.FG).catch((e=>{console.error(e),s({errorMessage:e.message})}));i.exportEmbedScene&&n&&(0,q.g8)(n)&&s({fileHandle:n})};return(0,w.jsx)(Mt,{elements:d,appState:i,files:o,actionManager:n,onExportToPng:e("png"),onExportToSvg:e("svg"),onExportToClipboard:e("clipboard")})},D=(0,r.useCallback)((()=>{!!document.querySelector(".Dialog")||s({isLibraryOpen:!1})}),[s]),z=(0,r.useCallback)((()=>{s({selectedElementIds:{},selectedGroupIds:{}})}),[s]),P=i.isLibraryOpen?(0,w.jsx)(En,{pendingElements:(0,l.eD)(d,i,!0),onClose:D,onInsertLibraryItems:e=>{m((0,Je.WV)(e))},onAddToLibrary:z,setAppState:s,libraryReturnUrl:C,focusContainer:I,library:T,theme:i.theme,files:o,id:j,appState:i}):null,R=(0,w.jsxs)(w.Fragment,{children:[i.isLoading&&(0,w.jsx)(Dt.z,{delay:250}),i.errorMessage&&(0,w.jsx)(_t,{message:i.errorMessage,onClose:()=>s({errorMessage:null})}),i.showHelpDialog&&(0,w.jsx)(rn,{onClose:()=>{s({showHelpDialog:!1})}}),i.pasteDialog.shown&&(0,w.jsx)(Xt,{setAppState:s,appState:i,onInsertChart:m,onClose:()=>s({pasteDialog:{shown:!1,data:null}})})]}),B=()=>i.showStats?(0,w.jsx)(Cn,{appState:i,setAppState:s,elements:d,onClose:()=>{n.executeAction(He)},renderCustomStats:E}):null;return L.isMobile?(0,w.jsxs)(w.Fragment,{children:[R,(0,w.jsx)(Yt,{onHomeButtonClick:t,appState:i,elements:d,actionManager:n,libraryMenu:P,renderJSONExportDialog:O,renderImageExportDialog:A,setAppState:s,onCollabButtonClick:u,onLockToggle:()=>p(),onPenModeToggle:f,canvas:c,isCollaborating:x,renderCustomFooter:k,showThemeBtn:v,onImageAction:M,renderTopRightUI:_,renderStats:B,UIOptions:S})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:(0,a.Z)("layer-ui__wrapper",{"disable-pointerEvents":i.draggingElement||i.resizingElement||i.editingElement&&!(0,g.iB)(i.editingElement)}),style:i.isLibraryOpen&&i.isLibraryMenuDocked&&L.canDeviceFitSidebar?{width:"calc(100% - ".concat(N.EE,"px)")}:{},children:[R,(()=>{const e=(0,g.RT)(i,d);return(0,w.jsx)(Lt,{side:"top",children:(0,w.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,w.jsxs)(ne,{gap:4,className:(0,a.Z)({"disable-pointerEvents":i.zenModeEnabled}),children:[S.canvasActions&&(i.viewModeEnabled?(0,w.jsx)(Bt,{heading:"canvasActions",className:(0,a.Z)("zen-mode-transition",{"transition-left":i.zenModeEnabled}),children:(0,w.jsx)(At.W,{padding:2,style:{zIndex:1},children:(0,w.jsx)(ne,{gap:4,children:(0,w.jsxs)(te,{gap:1,justifyContent:"space-between",children:[O(),A()]})})})}):(0,w.jsx)(Bt,{heading:"canvasActions",className:(0,a.Z)("zen-mode-transition",{"transition-left":i.zenModeEnabled}),children:(0,w.jsx)(At.W,{padding:2,style:{zIndex:1},children:(0,w.jsxs)(ne,{gap:4,children:[(0,w.jsxs)(te,{gap:3,justifyContent:"space-between",children:[n.renderAction("clearCanvas"),n.renderAction("loadScene"),O(),A(),u&&(0,w.jsx)(yt,{isCollaborating:x,collaboratorCount:i.collaborators.size,onClick:u})]}),(0,w.jsx)(xt,{actionManager:n,appState:i,setAppState:s,showThemeBtn:v}),i.fileHandle&&(0,w.jsx)(w.Fragment,{children:n.renderAction("saveToActiveFile")})]})})})),e&&(0,w.jsx)(Bt,{heading:"selectedShapeActions",className:(0,a.Z)("zen-mode-transition",{"transition-left":i.zenModeEnabled}),children:(0,w.jsx)(At.W,{className:N.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(i.height-(i.fileHandle?248:200),"px")},children:(0,w.jsx)(mt,{appState:i,elements:d,renderAction:n.renderAction,activeTool:i.activeTool.type})})})]}),!i.viewModeEnabled&&(0,w.jsx)(Bt,{heading:"shapes",children:e=>(0,w.jsx)(ne,{gap:4,align:"start",children:(0,w.jsxs)(te,{gap:1,className:(0,a.Z)("App-toolbar-container",{"zen-mode":i.zenModeEnabled}),children:[(0,w.jsx)(Vt,{zenModeEnabled:i.zenModeEnabled,checked:i.penMode,onChange:f,title:(0,h.t)("toolBar.penMode"),penDetected:i.penDetected}),(0,w.jsx)(Pt,{zenModeEnabled:i.zenModeEnabled,checked:i.activeTool.locked,onChange:()=>p(),title:(0,h.t)("toolBar.lock")}),(0,w.jsxs)(At.W,{padding:1,className:(0,a.Z)("App-toolbar",{"zen-mode":i.zenModeEnabled}),children:[(0,w.jsx)(Ot,{appState:i,elements:d,isMobile:L.isMobile}),e,(0,w.jsx)(te,{gap:1,children:(0,w.jsx)(bt,{appState:i,canvas:c,activeTool:i.activeTool,setAppState:s,onImageAction:e=>{let{pointerType:t}=e;M({insertOnCanvasDirectly:"mouse"!==t})}})})]}),(0,w.jsx)(Ut,{appState:i,setAppState:s})]})})}),(0,w.jsxs)("div",{className:(0,a.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":i.zenModeEnabled}),children:[(0,w.jsx)(Ht,{collaborators:i.collaborators,actionManager:n,className:(0,a.Z)("zen-mode-transition",{"transition-right":i.zenModeEnabled}),layout:"vertical"}),null==_?void 0:_(L.isMobile,i,c)]})]})})})(),(0,w.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,w.jsx)("div",{className:(0,a.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":i.zenModeEnabled}),children:(0,w.jsx)(ne,{gap:2,children:(0,w.jsxs)(Bt,{heading:"canvasActions",children:[(0,w.jsx)(At.W,{padding:1,children:(0,w.jsx)(vt,{renderAction:n.renderAction,zoom:i.zoom})}),!i.viewModeEnabled&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:(0,a.Z)("undo-redo-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":i.zenModeEnabled}),children:[n.renderAction("undo",{size:"small"}),n.renderAction("redo",{size:"small"})]}),(0,w.jsx)("div",{className:(0,a.Z)("eraser-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":i.zenModeEnabled}),children:n.renderAction("eraser",{size:"small"})})]}),!i.viewModeEnabled&&i.multiElement&&L.isTouchScreen&&(0,w.jsx)("div",{className:(0,a.Z)("finalize-button zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":i.zenModeEnabled}),children:n.renderAction("finalize",{size:"small"})})]})})}),(0,w.jsx)("div",{className:(0,a.Z)("layer-ui__wrapper__footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":i.zenModeEnabled}),children:null==k?void 0:k(!1,i)}),(0,w.jsx)("div",{className:(0,a.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":i.zenModeEnabled}),children:n.renderAction("toggleShortcuts")}),(0,w.jsx)("button",{className:(0,a.Z)("disable-zen-mode",{"disable-zen-mode--visible":b}),onClick:()=>n.executeAction(Ne),children:(0,h.t)("buttons.exitZenMode")})]}),B(),i.scrolledOutside&&(0,w.jsx)("button",{className:"scroll-back-to-content",onClick:()=>{s(Object.assign({},(0,l.W)(d,i,c)))},children:(0,h.t)("buttons.scrollBackToContent")})]}),i.isLibraryOpen&&(0,w.jsx)("div",{className:"layer-ui__sidebar",children:P})]})},Tn=(e,t)=>{const n=e=>{const{suggestedBindings:t,startBoundElement:n}=e;return Sn(e,["suggestedBindings","startBoundElement"])},r=n(e.appState),i=n(t.appState),o=Object.keys(r);return e.renderTopRightUI===t.renderTopRightUI&&e.renderCustomFooter===t.renderCustomFooter&&e.langCode===t.langCode&&e.elements===t.elements&&e.files===t.files&&o.every((e=>r[e]===i[e]))},jn=i().memo(In,Tn);n(9757);const Mn=5e3,Ln=e=>{let{message:t,onClose:n,closable:i=!1,duration:o=Mn}=e;const a=(0,r.useRef)(0),s=o!==1/0,l=(0,r.useCallback)((()=>{s&&(a.current=window.setTimeout((()=>n()),o))}),[n,o,s]);(0,r.useEffect)((()=>{if(s)return l(),()=>clearTimeout(a.current)}),[l,t,o,s]);const c=s?()=>clearTimeout(null==a?void 0:a.current):void 0,h=s?l:void 0;return(0,w.jsxs)("div",{className:"Toast",onMouseEnter:c,onMouseLeave:h,children:[(0,w.jsx)("p",{className:"Toast__message",children:t}),i&&(0,w.jsx)(d.V,{icon:u.xv,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})},On=(0,p.z)({name:"viewMode",trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,t){return{appState:Object.assign(Object.assign({},t),{viewModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:e=>e.viewModeEnabled,contextItemLabel:"labels.viewMode",keyTest:e=>!e[c.tW.CTRL_OR_CMD]&&e.altKey&&e.code===c.aU.R});var An=n(5637),Dn=n(8409),zn=n.n(Dn),Pn=n(2325);class Rn{constructor(e){var t;this.subscribers=[],this.updateOnChangeOnly=null!==(t=null==e?void 0:e.updateOnChangeOnly)&&void 0!==t&&t,this.value=null==e?void 0:e.initialState}on(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.flat().filter((e=>"function"==typeof e));return this.subscribers.push(...r),()=>this.off(r)}once(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.flat().filter((e=>"function"==typeof e)),i=this.on(...r);return r.push((()=>i())),i}off(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.flat();this.subscribers=this.subscribers.filter((e=>!r.includes(e)))}trigger(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.updateOnChangeOnly&&this.value===t?[]:(this.value=t,this.subscribers.map((e=>e(...t))))}destroy(){this.subscribers=[],this.value=void 0}}const Bn={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},Nn=i().createContext(Bn),Hn=()=>(0,r.useContext)(Nn),Wn=i().createContext({container:null,id:null}),Un=()=>(0,r.useContext)(Wn);let Fn=!1,Kn=0,Vn=0,Yn=0,Zn=!1,Gn=!1,Xn=!1,qn={horizontal:null,vertical:null},Jn=0,Qn=!1,$n=!0,er=null;const tr={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null};class nr extends i().Component{constructor(e){super(e),rr.call(this);const t=(0,qe.im)(),{excalidrawRef:n,viewModeEnabled:r=!1,zenModeEnabled:i=!1,gridModeEnabled:o=!1,theme:a=t.theme,name:l=t.name}=e;if(this.state=Object.assign(Object.assign(Object.assign(Object.assign({},t),{theme:a,isLoading:!0}),this.getCanvasOffsets()),{viewModeEnabled:r,zenModeEnabled:i,gridSize:o?N.k:null,name:l,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,isLibraryMenuDocked:!1}),this.id=(0,s.x0)(),this.library=new Je.ZP(this),n){var g;const e="current"in n&&(null===(g=n.current)||void 0===g?void 0:g.readyPromise)||(0,y.PI)(),t={ready:!0,readyPromise:e,updateScene:this.updateScene,updateLibrary:this.library.updateLibrary,addFiles:this.addFiles,resetScene:this.resetScene,getSceneElementsIncludingDeleted:this.getSceneElementsIncludingDeleted,history:{clear:this.resetHistory},scrollToContent:this.scrollToContent,getSceneElements:this.getSceneElements,getAppState:()=>this.state,getFiles:()=>this.files,refresh:this.refresh,setToast:this.setToast,id:this.id,setActiveTool:this.setActiveTool,setCursor:this.setCursor,resetCursor:this.resetCursor,app:this,onChange:e=>this.onChangeEmitter.on(e),onPointerDown:e=>this.onPointerDownEmitter.on(e),onPointerUp:e=>this.onPointerUpEmitter.on(e)};"function"==typeof n?n(t):n.current=t,e.resolve(t)}var f;this.excalidrawContainerValue={container:this.excalidrawContainerRef.current,id:this.id},this.scene=new E.Z,this.history=new rt,this.actionManager=new Xe(this.syncActionResult,(()=>this.state),(()=>this.scene.getElementsIncludingDeleted()),this),this.actionManager.registerAll(p.N),this.actionManager.registerAction((f=this.history,{name:"undo",trackEvent:{category:"history"},perform:(e,t)=>Ye(e,t,(()=>f.undoOnce())),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.key.toLowerCase()===c.tW.Z&&!e.shiftKey,PanelComponent:e=>{let{updateData:t,data:n}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.Yw,"aria-label":(0,h.t)("buttons.undo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:()=>!1})),this.actionManager.registerAction((e=>({name:"redo",trackEvent:{category:"history"},perform:(t,n)=>Ye(t,n,(()=>e.redoOnce())),keyTest:e=>e[c.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===c.tW.Z||c.ED&&e.ctrlKey&&!e.shiftKey&&e.key===c.tW.Y,PanelComponent:e=>{let{updateData:t,data:n}=e;return(0,w.jsx)(d.V,{type:"button",icon:u.KX,"aria-label":(0,h.t)("buttons.redo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:()=>!1}))(this.history))}renderCanvas(){const e=window.devicePixelRatio,{width:t,height:n,viewModeEnabled:r}=this.state,i=t*e,o=n*e;return r?(0,w.jsx)("canvas",{className:"excalidraw__canvas",style:{width:t,height:n,cursor:N.oc.GRAB},width:i,height:o,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,h.t)("labels.drawingCanvas")}):(0,w.jsx)("canvas",{className:"excalidraw__canvas",style:{width:t,height:n},width:i,height:o,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,h.t)("labels.drawingCanvas")})}render(){var e,t;const n=(0,l.eD)(this.scene.getNonDeletedElements(),this.state),{onCollabButtonClick:r,renderTopRightUI:i,renderFooter:o,renderCustomStats:s}=this.props;return(0,w.jsx)("div",{className:(0,a.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--zen-mode":this.state.zenModeEnabled,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,w.jsx)(Wn.Provider,{value:this.excalidrawContainerValue,children:(0,w.jsxs)(Nn.Provider,{value:this.device,children:[(0,w.jsx)(jn,{onHomeButtonClick:this.props.onHomeButtonClick,canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onCollabButtonClick:r,onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onInsertElements:e=>this.addElementsFromPasteOrLibrary({elements:e,position:"center",files:null}),langCode:(0,h.G3)().code,isCollaborating:this.props.isCollaborating,renderTopRightUI:i,renderCustomFooter:o,renderCustomStats:s,showExitZenModeBtn:void 0===(null===(e=this.props)||void 0===e?void 0:e.zenModeEnabled)&&this.state.zenModeEnabled,showThemeBtn:void 0===(null===(t=this.props)||void 0===t?void 0:t.theme)&&this.props.UIOptions.canvasActions&&this.props.UIOptions.canvasActions.theme,libraryReturnUrl:this.props.libraryReturnUrl,UIOptions:this.props.UIOptions,focusContainer:this.focusContainer,library:this.library,id:this.id,onImageAction:this.onImageAction}),(0,w.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,w.jsx)("div",{className:"excalidraw-contextMenuContainer"}),1===n.length&&this.state.showHyperlinkPopup&&(0,w.jsx)(Fe.nW,{element:n[0],appState:this.state,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},n[0].id),null!==this.state.toast&&(0,w.jsx)(Ln,{message:this.state.toast.message,onClose:()=>this.setToast(null),duration:this.state.toast.duration,closable:this.state.toast.closable}),(0,w.jsx)("main",{children:this.renderCanvas()})]})})})}async componentDidMount(){var e,t,n=this;if(this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"===N.Vi.TEST||"production"===N.Vi.DEVELOPMENT){this.setState.bind(this);Object.defineProperties(window.h,{state:{configurable:!0,get:()=>this.state},setState:{configurable:!0,value:function(){return n.setState(...arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})}if(this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current)this.resizeObserver=new ResizeObserver((()=>{$n=!1,this.refreshDeviceState(this.excalidrawContainerRef.current),this.updateDOMRect()})),null===(t=this.resizeObserver)||void 0===t||t.observe(this.excalidrawContainerRef.current);else if(window.matchMedia){const e=window.matchMedia("(max-width: ".concat(N.kV,"px), (max-height: ").concat(N.Yx,"px) and (max-width: ").concat(N.sS,"px)")),t=window.matchMedia("(max-width: ".concat(N.eF,"px)")),n=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:N.sk,"px)")),r=()=>{this.excalidrawContainerRef.current.getBoundingClientRect(),this.device=(0,y.v4)(this.device,{isSmScreen:t.matches,isMobile:e.matches,canDeviceFitSidebar:n.matches})};e.addListener(r),this.detachIsMobileMqHandler=()=>e.removeListener(r)}new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),this.checkIfBrowserZoomed()}componentWillUnmount(){var e;this.files={},this.imageCache.clear(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),(0,ot.aL)(),this.onChangeEmitter.destroy(),this.scene=new E.Z,this.history=new rt,this.actionManager=new Xe(this.syncActionResult,(()=>this.state),(()=>this.scene.getElementsIncludingDeleted()),this),this.library=new Je.ZP(this),this.canvas=null,this.rc=null,this.excalidrawContainerRef.current=void 0,this.nearestScrollableContainer=void 0,this.excalidrawContainerValue={container:null,id:"unmounted"},clearTimeout(Jn),Jn=0}removeEventListeners(){var e,t,n,r,i,o,a;document.removeEventListener(N.Ks.POINTER_UP,this.removePointer),document.removeEventListener(N.Ks.COPY,this.onCopy),document.removeEventListener(N.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(N.Ks.CUT,this.onCut),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.removeEventListener(N.Ks.WHEEL,this.onWheel),null===(t=this.nearestScrollableContainer)||void 0===t||t.removeEventListener(N.Ks.SCROLL,this.onScroll),document.removeEventListener(N.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(N.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(N.Ks.KEYUP,this.onKeyUp),window.removeEventListener(N.Ks.RESIZE,this.onResize,!1),window.removeEventListener(N.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(N.Ks.BLUR,this.onBlur,!1),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.removeEventListener(N.Ks.DRAG_OVER,this.disableEvent,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.removeEventListener(N.Ks.DROP,this.disableEvent,!1),null===(i=document.fonts)||void 0===i||null===(o=i.removeEventListener)||void 0===o||o.call(i,"loadingdone",this.onFontLoaded),document.removeEventListener(N.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(N.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(N.Ks.GESTURE_END,this.onGestureEnd,!1),null===(a=this.detachIsMobileMqHandler)||void 0===a||a.call(this)}addEventListeners(){var e,t,n,r,i;this.removeEventListeners(),document.addEventListener(N.Ks.POINTER_UP,this.removePointer),document.addEventListener(N.Ks.COPY,this.onCopy),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.addEventListener(N.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(N.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(N.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(N.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),null===(t=document.fonts)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"loadingdone",this.onFontLoaded),document.addEventListener(N.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(N.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(N.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(N.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(N.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,y.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(N.Ks.SCROLL,this.onScroll)),window.addEventListener(N.Ks.RESIZE,this.onResize,!1),window.addEventListener(N.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(N.Ks.BLUR,this.onBlur,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.addEventListener(N.Ks.DRAG_OVER,this.disableEvent,!1),null===(i=this.excalidrawContainerRef.current)||void 0===i||i.addEventListener(N.Ks.DROP,this.disableEvent,!1))}componentDidUpdate(e,t){var n,r,i;(this.excalidrawContainerRef.current&&e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),t.scrollX!==this.state.scrollX||t.scrollY!==this.state.scrollY)&&(null===(r=this.props)||void 0===r||null===(i=r.onScrollChange)||void 0===i||i.call(r,this.state.scrollX,this.state.scrollY));Object.keys(this.state.selectedElementIds).length&&(0,qe.EN)(this.state)&&this.setState({activeTool:(0,y.Om)(this.state,{type:"selection"})}),"eraser"===this.state.activeTool.type&&t.theme!==this.state.theme&&(0,y.OF)(this.canvas,this.state.theme),"selection"===t.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),t.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?N.k:null}),this.props.UIOptions.canvasActions||"canvas"!==this.state.openMenu||this.setState({openMenu:null}),this.props.name&&e.name!==this.props.name&&this.setState({name:this.props.name}),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.classList.toggle("theme--dark","dark"===this.state.theme),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout((()=>{this.actionManager.executeAction(K)}));const{multiElement:o}=t;t.activeTool!==this.state.activeTool&&null!=o&&(0,v.N1)(this.state)&&(0,x.Mn)(o,!1)&&(0,v.R)(o,this.state,this.scene,(0,y.AK)(b._.getPointAtIndexGlobalCoordinates(o,-1)));const a={},s={},l={},c={},d={};this.state.collaborators.forEach(((e,t)=>{if(e.selectedElementIds)for(const n of Object.keys(e.selectedElementIds))n in l||(l[n]=[]),l[n].push(t);e.pointer&&(e.username&&(c[t]=e.username),e.userState&&(d[t]=e.userState),s[t]=(0,y._i)({sceneX:e.pointer.x,sceneY:e.pointer.y},this.state),a[t]=e.button)}));const u=this.scene.getNonDeletedElements().filter((e=>(!(0,x.pC)(e)||this.state.pendingImageElementId!==e.id)&&(!this.state.editingElement||"text"!==this.state.editingElement.type||e.id!==this.state.editingElement.id)));var h,p;((0,it.Eu)(u,this.state,this.state.selectionElement,window.devicePixelRatio,this.rc,this.canvas,{scrollX:this.state.scrollX,scrollY:this.state.scrollY,viewBackgroundColor:this.state.viewBackgroundColor,zoom:this.state.zoom,remotePointerViewportCoords:s,remotePointerButton:a,remoteSelectedElementIds:l,remotePointerUsernames:c,remotePointerUserStates:d,shouldCacheIgnoreZoom:this.state.shouldCacheIgnoreZoom,theme:this.state.theme,imageCache:this.imageCache,isExporting:!1,renderScrollbars:!this.device.isMobile},(e=>{let{atLeastOneVisibleElement:t,scrollBars:n}=e;n&&(qn=n);const r=!(0,g.iB)(this.state.editingElement)&&(!t&&u.length>0);this.state.scrolledOutside!==r&&this.setState({scrolledOutside:r}),this.scheduleImageRefresh()}),$n&&!0===window.EXCALIDRAW_THROTTLE_RENDER),$n||($n=!0),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||(null===(h=(p=this.props).onChange)||void 0===h||h.call(p,this.scene.getElementsIncludingDeleted(),this.state,this.files,this.props.id),this.onChangeEmitter.trigger(this.scene.getElementsIncludingDeleted(),this.state,this.files))}static resetTapTwice(){Fn=!1}addTextFromPaste(e){const{x:t,y:n}=(0,y.dE)({clientX:Vn,clientY:Yn},this.state),r=(0,g.VL)({x:t,y:n,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:N.hs,locked:!1});this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),r]),this.setState({selectedElementIds:{[r.id]:!0}}),this.history.resumeRecording()}handleTextWysiwyg(e,t){let{isExistingElement:n=!1}=t;const r=(t,n,r)=>{this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map((i=>i.id===e.id&&(0,g.iB)(i)?(0,g.N_)(i,{text:t,isDeleted:r,originalText:n}):i))])};(0,g.b_)({id:e.id,canvas:this.canvas,getViewportCoords:(e,t)=>{const{x:n,y:r}=(0,y._i)({sceneX:e,sceneY:t},this.state);return[n-this.state.offsetLeft,r-this.state.offsetTop]},onChange:(0,y.tH)((t=>{r(t,t,!1),(0,g.qP)(e)&&(0,v.Ww)(e)})),onSubmit:(0,y.tH)((t=>{let{text:i,viaKeyboard:o,originalText:a}=t;const s=!i.trim();if(r(i,a,s),!s&&o){const t=e.containerId?e.containerId:e.id;this.setState((e=>({selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[t]:!0})})))}s&&(0,v.$q)(this.scene.getNonDeletedElements(),[e]),s&&!n||this.history.resumeRecording(),this.setState({draggingElement:null,editingElement:null}),this.state.activeTool.locked&&(0,y.Uk)(this.canvas,this.state),this.focusContainer()})),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),r(e.text,e.originalText,!1)}deselectElements(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}getTextElementAtPosition(e,t){const n=this.getElementAtPosition(e,t,{includeBoundTextElement:!0});return n&&(0,g.iB)(n)&&!n.isDeleted?n:null}getElementAtPosition(e,t,n){const r=this.getElementsAtPosition(e,t,null==n?void 0:n.includeBoundTextElement,null==n?void 0:n.includeLockedElements);if(r.length>1){if(null!=n&&n.preferSelected)for(let e=r.length-1;e>-1;e--)if(this.state.selectedElementIds[r[e].id])return r[e];const i=r[r.length-1];return(0,g.wB)(i,this.state,e,t)?r[r.length-2]:i}return 1===r.length?r[0]:null}getElementsAtPosition(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=n&&r?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter((e=>(r||!e.locked)&&(n||!((0,g.iB)(e)&&e.containerId))));return(0,l.CJ)(i,(n=>(0,g.wX)(n,this.state,e,t)))}maybeCleanupAfterMissingPointerUp(e){null!==er&&er(e)}updateGestureOnPointerDown(e){tr.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===tr.pointers.size&&(tr.lastCenter=$e(tr.pointers),tr.initialScale=this.state.zoom.value,tr.initialDistance=et(Array.from(tr.pointers.values())))}initialPointerDownState(e){const t=(0,y.dE)(e,this.state),n=(0,l.eD)(this.scene.getNonDeletedElements(),this.state),[r,i,o,a]=(0,g.KP)(n);return{origin:t,withCmdOrCtrl:e[c.tW.CTRL_OR_CMD],originInGrid:(0,y.AK)((0,F.wC)(t.x,t.y,this.state.gridSize)),scrollbars:(0,l._4)(qn,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:Object.assign({},t),originalElements:this.scene.getNonDeletedElements().reduce(((e,t)=>(e.set(t.id,(0,me.OL)(t)),e)),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(o+r)/2,y:(a+i)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(t,n),hasHitElementInside:!1},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}handleDraggingScrollBar(e,t){if(!t.scrollbars.isOverEither||this.state.multiElement)return!1;Xn=!0,t.lastCoords.x=e.clientX,t.lastCoords.y=e.clientY;const n=(0,y.$9)((e=>{e.target instanceof HTMLElement&&this.handlePointerMoveOverScrollbars(e,t)})),r=(0,y.tH)((()=>{Xn=!1,(0,y.Uk)(this.canvas,this.state),er=null,this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(N.Ks.POINTER_MOVE,n),window.removeEventListener(N.Ks.POINTER_UP,r),n.flush()}));return er=r,window.addEventListener(N.Ks.POINTER_MOVE,n),window.addEventListener(N.Ks.POINTER_UP,r),!0}isASelectedElement(e){return null!=e&&this.state.selectedElementIds[e.id]}isHittingCommonBoundingBoxOfSelectedElements(e,t){if(t.length<2)return!1;const n=10/this.state.zoom.value,[r,i,o,a]=(0,g.KP)(t);return e.x>r-n&&e.x<o+n&&e.y>i-n&&e.y<a+n}onKeyDownFromPointerDownHandler(e){return(0,y.tH)((t=>{this.maybeHandleResize(e,t)||this.maybeDragNewGenericElement(e,t)}))}onKeyUpFromPointerDownHandler(e){return(0,y.tH)((t=>{t.key===c.tW.ALT&&t.preventDefault(),this.maybeHandleResize(e,t)||this.maybeDragNewGenericElement(e,t)}))}onPointerMoveFromPointerDownHandler(e){return(0,y.$9)((t=>{var n,r;null===e.drag.offset&&(e.drag.offset=(0,y.AK)((0,g.$V)((0,l.eD)(this.scene.getNonDeletedElements(),this.state),e.origin.x,e.origin.y)));if(!(t.target instanceof HTMLElement))return;if(this.handlePointerMoveOverScrollbars(t,e))return;const i=(0,y.dE)(t,this.state);if((0,qe.EN)(this.state))return void this.handleEraser(t,e,i);const[o,a]=(0,F.wC)(i.x,i.y,this.state.gridSize);if(!e.drag.hasOccurred&&("arrow"===this.state.activeTool.type||"line"===this.state.activeTool.type)&&(0,F.LW)(i.x,i.y,e.origin.x,e.origin.y)<N.f)return;if(e.resize.isResizing&&(e.lastCoords.x=i.x,e.lastCoords.y=i.y,this.maybeHandleResize(e,t)))return!0;if(this.state.editingLinearElement){if(b._.handlePointDragging(this.state,(e=>this.setState(e)),i.x,i.y,((e,t)=>{this.maybeSuggestBindingsForLinearElementAtCoords(e,t)})))return e.lastCoords.x=i.x,void(e.lastCoords.y=i.y)}if((e.hit.allHitElements.some((e=>this.isASelectedElement(e)))||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&(!this.state.editingLinearElement||!t.shiftKey)&&(!this.state.editingLinearElement||(null===(n=this.state.editingLinearElement)||void 0===n?void 0:n.elementId)!==(null===(r=e.hit.element)||void 0===r?void 0:r.id)||e.hit.hasHitElementInside)){const n=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if(n.every((e=>e.locked)))return;if(e.drag.hasOccurred=!0,n.length>0&&!e.withCmdOrCtrl){const[r,o]=(0,F.wC)(i.x-e.drag.offset.x,i.y-e.drag.offset.y,this.state.gridSize),[a,s]=[Math.abs(i.x-e.origin.x),Math.abs(i.y-e.origin.y)],c=t.shiftKey;if((0,g.o8)(e,n,r,o,c,a,s,this.state),this.maybeSuggestBindingForAll(n),t.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;const t=[],n=[],i=new Map,a=new Map,s=e.hit.element,c=this.scene.getElementsIncludingDeleted(),d=(0,l.eD)(c,this.state,!0).map((e=>e.id));for(const l of c)if(d.includes(l.id)||l.id===(null==s?void 0:s.id)&&e.hit.wasAddedToSelection){const s=(0,g.Sy)(this.state.editingGroupId,i,l),[c,d]=(0,F.wC)(e.origin.x-e.drag.offset.x,e.origin.y-e.drag.offset.y,this.state.gridSize);(0,f.DR)(s,{x:s.x+(c-r),y:s.y+(d-o)}),t.push(s),n.push(l),a.set(l.id,s.id)}else t.push(l);const u=[...t,...n];(0,H.P7)(t,n,a),(0,v.ek)(u,n,a,"duplicatesServeAsOld"),this.scene.replaceAllElements(u)}return}}const s=this.state.draggingElement;if(s){if("freedraw"===s.type){const e=s.points,n=i.x-s.x,r=i.y-s.y,o=e.length>0&&e[e.length-1];if(!(o&&o[0]===n&&o[1]===r)){const i=s.simulatePressure?s.pressures:[...s.pressures,t.pressure];(0,f.DR)(s,{points:[...e,[n,r]],pressures:i})}}else if((0,x.bt)(s)){e.drag.hasOccurred=!0;const n=s.points;let r=o-s.x,l=a-s.y;(0,c.Ge)(t)&&2===n.length&&({width:r,height:l}=(0,g.uK)(this.state.activeTool.type,r,l)),1===n.length?(0,f.DR)(s,{points:[...n,[r,l]]}):n.length>1&&(0,f.DR)(s,{points:[...n.slice(0,-1),[r,l]]}),(0,x.Mn)(s,!1)&&this.maybeSuggestBindingsForLinearElementAtCoords(s,[i],this.state.startBoundElement)}else e.lastCoords.x=i.x,e.lastCoords.y=i.y,this.maybeDragNewGenericElement(e,t);if("selection"===this.state.activeTool.type){e.boxSelection.hasOccurred=!0;const n=this.scene.getNonDeletedElements();if(t.shiftKey||this.state.editingLinearElement||!(0,l.N)(n,this.state)||(e.withCmdOrCtrl&&e.hit.element?this.setState((t=>(0,m.bO)(Object.assign(Object.assign({},t),{selectedElementIds:{[e.hit.element.id]:!0}}),this.scene.getNonDeletedElements()))):this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),this.state.editingLinearElement)b._.handleBoxSelection(t,this.state,this.setState.bind(this));else{const t=(0,l.Yp)(n,s);this.setState((n=>(0,m.bO)(Object.assign(Object.assign({},n),{selectedElementIds:Object.assign(Object.assign(Object.assign({},n.selectedElementIds),t.reduce(((e,t)=>(e[t.id]=!0,e)),{})),e.hit.element?{[e.hit.element.id]:!t.length}:null),showHyperlinkPopup:!(1!==t.length||!t[0].link)&&"info"}),this.scene.getNonDeletedElements())))}}}}))}handlePointerMoveOverScrollbars(e,t){if(t.scrollbars.isOverHorizontal){const n=e.clientX,r=n-t.lastCoords.x;return this.setState({scrollX:this.state.scrollX-r/this.state.zoom.value}),t.lastCoords.x=n,!0}if(t.scrollbars.isOverVertical){const n=e.clientY,r=n-t.lastCoords.y;return this.setState({scrollY:this.state.scrollY-r/this.state.zoom.value}),t.lastCoords.y=n,!0}return!1}onPointerUpFromPointerDownHandler(e){return(0,y.tH)((t=>{const{draggingElement:n,resizingElement:r,multiElement:i,activeTool:o,isResizing:a,isRotating:s}=this.state;var c,d;if(this.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:i||(0,g.iB)(this.state.editingElement)?this.state.editingElement:null}),this.savePointer(t.clientX,t.clientY,"up"),this.onPointerUpEmitter.trigger(this.state.activeTool,e,t),this.state.editingLinearElement)if(e.boxSelection.hasOccurred||(null===(c=e.hit)||void 0===c||null===(d=c.element)||void 0===d?void 0:d.id)===this.state.editingLinearElement.elementId&&e.hit.hasHitElementInside){const e=b._.handlePointerUp(t,this.state.editingLinearElement,this.state);e!==this.state.editingLinearElement&&this.setState({editingLinearElement:e,suggestedBindings:[]})}else this.actionManager.executeAction(K);if(er=null,e.eventListeners.onMove&&e.eventListeners.onMove.flush(),window.removeEventListener(N.Ks.POINTER_MOVE,e.eventListeners.onMove),window.removeEventListener(N.Ks.POINTER_UP,e.eventListeners.onUp),window.removeEventListener(N.Ks.KEYDOWN,e.eventListeners.onKeyDown),window.removeEventListener(N.Ks.KEYUP,e.eventListeners.onKeyUp),this.state.pendingImageElementId&&this.setState({pendingImageElementId:null}),"freedraw"===(null==n?void 0:n.type)){const e=(0,y.dE)(t,this.state),r=n.points;let i=e.x-n.x,o=e.y-n.y;i===r[0][0]&&o===r[0][1]&&(o+=1e-4,i+=1e-4);const a=n.simulatePressure?[]:[...n.pressures,t.pressure];return(0,f.DR)(n,{points:[...r,[i,o]],pressures:a,lastCommittedPoint:[i,o]}),void this.actionManager.executeAction(K)}if((0,x.pC)(n)){const e=n;try{this.initializeImageDimensions(e),this.setState({selectedElementIds:{[e.id]:!0}},(()=>{this.actionManager.executeAction(K)}))}catch(t){console.error(t),this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter((t=>t.id!==e.id))),this.actionManager.executeAction(K)}return}if((0,x.bt)(n)){n.points.length>1&&this.history.resumeRecording();const r=(0,y.dE)(t,this.state);return void(e.drag.hasOccurred||!n||i?e.drag.hasOccurred&&!i&&((0,v.N1)(this.state)&&(0,x.Mn)(n,!1)&&(0,v.R)(n,this.state,this.scene,r),this.setState({suggestedBindings:[],startBoundElement:null}),o.locked?this.setState((e=>({draggingElement:null,selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[n.id]:!0})}))):((0,y.z8)(this.canvas),this.setState((e=>({draggingElement:null,activeTool:(0,y.Om)(this.state,{type:"selection"}),selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[n.id]:!0})}))))):((0,f.DR)(n,{points:[...n.points,[r.x-n.x,r.y-n.y]]}),this.setState({multiElement:n,editingElement:this.state.draggingElement})))}if("selection"!==o.type&&n&&(0,g.QD)(n))return this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().slice(0,-1)),void this.setState({draggingElement:null});n&&(0,f.DR)(n,(0,g.Qp)(n)),r&&this.history.resumeRecording(),r&&(0,g.QD)(r)&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter((e=>e.id!==r.id)));const u=e.hit.element;if((0,qe.EN)(this.state)){if(0===(0,F.LW)(this.lastPointerDown.clientX,this.lastPointerDown.clientY,this.lastPointerUp.clientX,this.lastPointerUp.clientY)){const t=(0,y.dE)({clientX:this.lastPointerUp.clientX,clientY:this.lastPointerUp.clientY},this.state);this.getElementsAtPosition(t.x,t.y).forEach((t=>e.elementIdsToErase[t.id]={erase:!0,opacity:t.opacity}))}this.eraseElements(e)}else{if(Object.keys(e.elementIdsToErase).length&&this.restoreReadyToEraseElements(e),u&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!this.state.editingLinearElement||!e.boxSelection.hasOccurred))if(t.shiftKey&&!this.state.editingLinearElement)if(this.state.selectedElementIds[u.id])if((0,m.zq)(this.state,u)){const e=u.groupIds.flatMap((e=>(0,m.Fb)(this.scene.getNonDeletedElements(),e))).map((e=>({[e.id]:!1}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{});this.setState((t=>({selectedGroupIds:Object.assign(Object.assign({},t.selectedElementIds),u.groupIds.map((e=>({[e]:!1}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})),selectedElementIds:Object.assign(Object.assign({},t.selectedElementIds),e)})))}else this.setState((e=>(0,m.bO)(Object.assign(Object.assign({},e),{selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[u.id]:!1})}),this.scene.getNonDeletedElements())));else this.setState((e=>({selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[u.id]:!0})})));else this.setState((e=>Object.assign({},(0,m.bO)(Object.assign(Object.assign({},e),{selectedElementIds:{[u.id]:!0}}),this.scene.getNonDeletedElements()))));this.state.editingLinearElement||e.drag.hasOccurred||this.state.isResizing||!(u&&(0,g.wB)(u,this.state,e.origin.x,e.origin.y)||!u&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!o.locked&&"freedraw"!==o.type&&n&&this.setState((e=>({selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[n.id]:!0})}))),("selection"!==o.type||(0,l.N)(this.scene.getNonDeletedElements(),this.state))&&this.history.resumeRecording(),(e.drag.hasOccurred||a||s)&&((0,v.N1)(this.state)?v.el:v.H)((0,l.eD)(this.scene.getNonDeletedElements(),this.state)),o.locked||"freedraw"===o.type?this.setState({draggingElement:null,suggestedBindings:[]}):((0,y.z8)(this.canvas),this.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,y.Om)(this.state,{type:"selection"})}))):this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}))}maybeSuggestBindingForAll(e){const t=(0,v.ZB)(e);this.setState({suggestedBindings:t})}clearSelection(e){this.setState((t=>({selectedElementIds:{},selectedGroupIds:{},editingGroupId:t.editingGroupId&&null!=e&&(0,m.Nd)(e,t.editingGroupId)?t.editingGroupId:null}))),this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}getTextWysiwygSnappedToCenterPosition(e,t,n,r,i){const o=(0,l.OW)(this.scene.getElementsIncludingDeleted().filter((e=>!(0,g.iB)(e))),e,t);if(o){const r=o.x+o.width/2,i=o.y+o.height/2;if(Math.hypot(e-r,t-i)<N.wZ){const{x:e,y:t}=(0,y._i)({sceneX:r,sceneY:i},n);return{viewportX:e,viewportY:t,elementCenterX:r,elementCenterY:i}}}}getCanvasOffsets(){var e;if(null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current){const e=this.excalidrawContainerRef.current,{left:t,top:n}=e.getBoundingClientRect();return{offsetLeft:t,offsetTop:n}}return{offsetLeft:0,offsetTop:0}}async updateLanguage(){const e=h.Mj.find((e=>e.code===this.props.langCode))||h.Fp;await(0,h.m0)(e),this.setAppState({})}}nr.defaultProps={UIOptions:N.cW};var rr=function(){var e=this;this.canvas=null,this.rc=null,this.unmounted=!1,this.device=Bn,this.excalidrawContainerRef=i().createRef(),this.files={},this.imageCache=new Map,this.lastPointerDown=null,this.lastPointerUp=null,this.contextMenuOpen=!1,this.lastScenePointer=null,this.onChangeEmitter=new Rn,this.onPointerDownEmitter=new Rn,this.onPointerUpEmitter=new Rn,this.focusContainer=()=>{var e;this.props.autoFocus&&(null===(e=this.excalidrawContainerRef.current)||void 0===e||e.focus())},this.getSceneElementsIncludingDeleted=()=>this.scene.getElementsIncludingDeleted(),this.getSceneElements=()=>this.scene.getNonDeletedElements(),this.syncActionResult=(0,y.tH)((e=>{if(this.contextMenuOpen=!1,this.unmounted||!1===e)return;let t=null;if(e.elements&&(e.elements.forEach((e=>{var n;(null===(n=this.state.editingElement)||void 0===n?void 0:n.id)===e.id&&this.state.editingElement!==e&&(0,g.qP)(e)&&(t=e)})),this.scene.replaceAllElements(e.elements),e.commitToHistory&&this.history.resumeRecording()),e.files&&(this.files=e.replaceFiles?e.files:Object.assign(Object.assign({},this.files),e.files),this.addNewImagesToImageCache()),e.appState||t){var n,r,i,o,a,s;e.commitToHistory&&this.history.resumeRecording();let l=(null==e||null===(n=e.appState)||void 0===n?void 0:n.viewModeEnabled)||!1,c=(null==e||null===(r=e.appState)||void 0===r?void 0:r.zenModeEnabled)||!1,d=(null==e||null===(i=e.appState)||void 0===i?void 0:i.gridSize)||null,u=(null==e||null===(o=e.appState)||void 0===o?void 0:o.theme)||N.C6.LIGHT,h=null!==(a=null==e||null===(s=e.appState)||void 0===s?void 0:s.name)&&void 0!==a?a:this.state.name;void 0!==this.props.viewModeEnabled&&(l=this.props.viewModeEnabled),void 0!==this.props.zenModeEnabled&&(c=this.props.zenModeEnabled),void 0!==this.props.gridModeEnabled&&(d=this.props.gridModeEnabled?N.k:null),void 0!==this.props.theme&&(u=this.props.theme),void 0!==this.props.name&&(h=this.props.name),this.setState((n=>{var r;return Object.assign(e.appState||{},{editingElement:t||(null===(r=e.appState)||void 0===r?void 0:r.editingElement)||null,viewModeEnabled:l,zenModeEnabled:c,gridSize:d,theme:u,name:h})}),(()=>{e.syncHistory&&this.history.setCurrentState(this.state,this.scene.getElementsIncludingDeleted())}))}})),this.onBlur=(0,y.tH)((()=>{Zn=!1,this.setState({isBindingEnabled:!0})})),this.onUnload=()=>{this.onBlur()},this.disableEvent=e=>{e.preventDefault()},this.onFontLoaded=()=>{this.scene.getElementsIncludingDeleted().forEach((e=>{(0,g.iB)(e)&&(0,ot.bI)(e)})),this.onSceneUpdated()},this.resetHistory=()=>{this.history.clear()},this.resetScene=(0,y.tH)((e=>{this.scene.replaceAllElements([]),this.setState((t=>Object.assign(Object.assign({},(0,qe.im)()),{isLoading:(null==e||!e.resetLoadingState)&&t.isLoading,theme:this.state.theme}))),this.resetHistory()})),this.initializeScene=async()=>{var e,t,n,r,i;"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer((async e=>{if(!e.files.length)return;const t=e.files[0],n=await t.getFile();this.loadFileToCanvas(new File([n],n.name||"",{type:n.type}),t)})),this.state.isLoading||this.setState({isLoading:!0});let o=null;try{var a;o=await this.props.initialData||null,null!==(a=o)&&void 0!==a&&a.libraryItems&&this.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch((e=>{console.error(e)}))}catch(e){console.error(e),o={appState:{errorMessage:e.message||"Encountered an error during importing or restoring scene data"}}}const s=(0,Qe.nu)(o,null,null);s.appState=Object.assign(Object.assign({},s.appState),{isLibraryOpen:(null===(e=o)||void 0===e||null===(t=e.appState)||void 0===t?void 0:t.isLibraryOpen)||this.state.isLibraryOpen,activeTool:"image"===s.appState.activeTool.type?Object.assign(Object.assign({},s.appState.activeTool),{type:"selection"}):s.appState.activeTool,isLoading:!1,toast:this.state.toast}),null!==(n=o)&&void 0!==n&&n.scrollToContent&&(s.appState=Object.assign(Object.assign({},s.appState),(0,l.W)(s.elements,Object.assign(Object.assign({},s.appState),{width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft}),null))),null!=(null===(r=o)||void 0===r?void 0:r.scrollX)&&(s.appState.scrollX=o.scrollX),null!=(null===(i=o)||void 0===i?void 0:i.scrollY)&&(s.appState.scrollY=o.scrollY),this.resetHistory(),this.syncActionResult(Object.assign(Object.assign({},s),{commitToHistory:!0}))},this.refreshDeviceState=e=>{const{width:t,height:n}=e.getBoundingClientRect(),r=null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:N.sk;this.device=(0,y.v4)(this.device,{isSmScreen:t<N.eF,isMobile:t<N.kV||n<N.Yx&&t<N.sS,canDeviceFitSidebar:t>r})},this.checkIfBrowserZoomed=()=>{if(!this.device.isMobile){const e=10,t=(window.outerWidth-e)/window.innerWidth;t<.75||t>1.1?this.setToast({message:(0,h.t)("alerts.browserZoom"),closable:!0,duration:1/0}):this.setToast(null)}},this.onResize=(0,y.tH)((()=>{this.checkIfBrowserZoomed(),this.scene.getElementsIncludingDeleted().forEach((e=>(0,ot.bI)(e))),this.setState({})})),this.onScroll=(0,y.Ds)((()=>{const{offsetTop:e,offsetLeft:t}=this.getCanvasOffsets();this.setState((n=>n.offsetLeft===t&&n.offsetTop===e?null:{offsetTop:e,offsetLeft:t}))}),N.HM),this.onCut=(0,y.tH)((e=>{var t;(null===(t=this.excalidrawContainerRef.current)||void 0===t?void 0:t.contains(document.activeElement))&&!(0,y.s)(e.target)&&(this.cutAll(),e.preventDefault(),e.stopPropagation())})),this.onCopy=(0,y.tH)((e=>{var t;(null===(t=this.excalidrawContainerRef.current)||void 0===t?void 0:t.contains(document.activeElement))&&!(0,y.s)(e.target)&&(this.copyAll(),e.preventDefault(),e.stopPropagation())})),this.cutAll=()=>{this.actionManager.executeAction(De,"keyboard")},this.copyAll=()=>{this.actionManager.executeAction(Ae,"keyboard")},this.onTapStart=e=>{if(c.Dt||e.preventDefault(),!Fn)return Fn=!0,clearTimeout(Kn),void(Kn=window.setTimeout(nr.resetTapTwice,N.Gj));if(Fn&&1===e.touches.length){const[t]=e.touches;this.handleCanvasDoubleClick({clientX:t.clientX,clientY:t.clientY}),Fn=!1,clearTimeout(Kn)}c.Dt&&e.preventDefault(),2===e.touches.length&&this.setState({selectedElementIds:{}})},this.onTapEnd=e=>{this.resetContextMenuTimer(),e.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:this.state.previousSelectedElementIds}):tr.pointers.clear()},this.pasteFromClipboard=(0,y.tH)((async e=>{var t,n;const r=document.activeElement;if(!(null===(t=this.excalidrawContainerRef.current)||void 0===t?void 0:t.contains(r)))return;const i=document.elementFromPoint(Vn,Yn);if(e&&(!(i instanceof HTMLCanvasElement)||(0,y.s)(r)))return;let o=null==e||null===(n=e.clipboardData)||void 0===n?void 0:n.files[0];const a=await(0,G.mQ)(e);if(!o&&a.text){const e=a.text.trim();e.startsWith("<svg")&&e.endsWith("</svg>")&&(o=(0,q.Pn)(e))}if((0,q.Wr)(o)&&!a.spreadsheet){const{x:e,y:t}=(0,y.dE)({clientX:Vn,clientY:Yn},this.state),n=this.createImageElement({sceneX:e,sceneY:t});return this.insertImageElement(n,o),this.initializeImageDimensions(n),void this.setState({selectedElementIds:{[n.id]:!0}})}if(this.props.onPaste)try{if(!1===await this.props.onPaste(a,e))return}catch(e){console.error(e)}a.errorMessage?this.setState({errorMessage:a.errorMessage}):a.spreadsheet?this.setState({pasteDialog:{data:a.spreadsheet,shown:!0}}):a.elements?this.addElementsFromPasteOrLibrary({elements:a.elements,files:a.files||null,position:"cursor"}):a.text&&this.addTextFromPaste(a.text),this.setActiveTool({type:"selection"}),null==e||e.preventDefault()})),this.addElementsFromPasteOrLibrary=e=>{const t=(0,Qe.ET)(e.elements,null),[n,r,i,o]=(0,g.KP)(t),a=(0,y.TE)(n,i)/2,s=(0,y.TE)(r,o)/2,l="object"==typeof e.position?e.position.clientX:"cursor"===e.position?Vn:this.state.width/2+this.state.offsetLeft,c="object"==typeof e.position?e.position.clientY:"cursor"===e.position?Yn:this.state.height/2+this.state.offsetTop,{x:d,y:u}=(0,y.dE)({clientX:l,clientY:c},this.state),h=d-a,p=u-s,f=new Map,[b,w]=(0,F.wC)(h,p,this.state.gridSize),_=new Map,k=t.map((e=>{const t=(0,g.Sy)(this.state.editingGroupId,f,e,{x:e.x+b-n,y:e.y+w-r});return _.set(e.id,t.id),t}));(0,H.P7)(k,t,_);const E=[...this.scene.getElementsIncludingDeleted(),...k];(0,v.ek)(E,t,_),e.files&&(this.files=Object.assign(Object.assign({},this.files),e.files)),this.scene.replaceAllElements(E),this.history.resumeRecording(),this.setState((0,m.bO)(Object.assign(Object.assign({},this.state),{isLibraryOpen:!(!this.state.isLibraryOpen||!this.device.canDeviceFitSidebar)&&this.state.isLibraryMenuDocked,selectedElementIds:k.reduce(((e,t)=>((0,x.Xh)(t)||(e[t.id]=!0),e)),{}),selectedGroupIds:{}}),this.scene.getNonDeletedElements()),(()=>{e.files&&this.addNewImagesToImageCache()})),this.setActiveTool({type:"selection"})},this.setAppState=e=>{this.setState(e)},this.removePointer=e=>{Jn&&this.resetContextMenuTimer(),tr.pointers.delete(e.pointerId)},this.toggleLock=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ui";e.state.activeTool.locked||(0,Ze.L)("toolbar","toggleLock","".concat(t," (").concat(e.device.isMobile?"mobile":"desktop",")")),e.setState((t=>({activeTool:Object.assign(Object.assign(Object.assign({},t.activeTool),(0,y.Om)(e.state,t.activeTool.locked?{type:"selection"}:t.activeTool)),{locked:!t.activeTool.locked})})))},this.togglePenMode=()=>{this.setState((e=>({penMode:!e.penMode})))},this.scrollToContent=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.scene.getNonDeletedElements();e.setState(Object.assign({},(0,l.W)(Array.isArray(t)?t:[t],e.state,e.canvas)))},this.setToast=e=>{this.setState({toast:e})},this.restoreFileFromShare=async()=>{try{const e=await caches.open("web-share-target"),t=await e.match("shared-file");if(t){const n=await t.blob(),r=new File([n],n.name||"",{type:n.type});this.loadFileToCanvas(r,null),await e.delete("shared-file"),window.history.replaceState(null,N.iC,window.location.pathname)}}catch(e){this.setState({errorMessage:e.message})}},this.addFiles=(0,y.tH)((e=>{const t=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map);this.files=Object.assign(Object.assign({},this.files),Object.fromEntries(t)),this.scene.getNonDeletedElements().forEach((e=>{(0,x.wi)(e)&&t.has(e.fileId)&&(this.imageCache.delete(e.fileId),(0,ot.bI)(e))})),this.scene.informMutation(),this.addNewImagesToImageCache()})),this.updateScene=(0,y.tH)((e=>{e.commitToHistory&&this.history.resumeRecording(),e.appState&&this.setState(e.appState),e.elements&&this.scene.replaceAllElements(e.elements),e.collaborators&&this.setState({collaborators:e.collaborators})})),this.onSceneUpdated=()=>{this.setState({})},this.updateCurrentCursorPosition=(0,y.tH)((e=>{Vn=e.clientX,Yn=e.clientY})),this.onKeyDown=(0,y.tH)((e=>{if("Proxy"in window&&(!e.shiftKey&&/^[A-Z]$/.test(e.key)||e.shiftKey&&/^[a-z]$/.test(e.key))&&(e=new Proxy(e,{get(t,n){const r=t[n];return"function"==typeof r?r.bind(t):"key"===n?e.shiftKey?t.key.toUpperCase():t.key.toLowerCase():r}})),!e[c.tW.CTRL_OR_CMD]||!(0,y.s)(e.target)||e.code!==c.aU.MINUS&&e.code!==c.aU.EQUAL){if(!((0,y.s)(e.target)&&e.key!==c.tW.ESCAPE||(0,c.Wl)(e.key)&&(0,y._Z)(e.target)||(e.key===c.tW.QUESTION_MARK&&this.setState({showHelpDialog:!0}),this.actionManager.handleKeyDown(e)||this.state.viewModeEnabled))){if(e[c.tW.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),e.code===c.aU.ZERO){const e=!this.state.isLibraryOpen;this.setState({isLibraryOpen:e}),e&&(0,Ze.L)("library","toggleLibrary (open)","keyboard (".concat(this.device.isMobile?"mobile":"desktop",")"))}if((0,c.Wl)(e.key)){const t=this.state.gridSize&&(e.shiftKey?N.$e:this.state.gridSize)||(e.shiftKey?N.Iw:N.$e),n=(0,l.eD)(this.scene.getNonDeletedElements(),this.state,!0);let r=0,i=0;e.key===c.tW.ARROW_LEFT?r=-t:e.key===c.tW.ARROW_RIGHT?r=t:e.key===c.tW.ARROW_UP?i=-t:e.key===c.tW.ARROW_DOWN&&(i=t),n.forEach((e=>{(0,f.DR)(e,{x:e.x+r,y:e.y+i}),(0,v.Ww)(e,{simultaneouslyUpdated:n})})),this.maybeSuggestBindingForAll(n),e.preventDefault()}else if(e.key===c.tW.ENTER){const t=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if(1===t.length&&(0,x.bt)(t[0]))this.state.editingLinearElement&&this.state.editingLinearElement.elementId===t[0].id||(this.history.resumeRecording(),this.setState({editingLinearElement:new b._(t[0],this.scene)}));else if(1===t.length&&!(0,x.bt)(t[0])){const n=t[0];return this.startTextEditing({sceneX:n.x+n.width/2,sceneY:n.y+n.height/2,shouldBind:!0}),void e.preventDefault()}}else if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&null===this.state.draggingElement){const t=(e=>{const t=st.find(((t,n)=>e===(n+1).toString()||t.key&&("string"==typeof t.key?t.key===e:t.key.includes(e))));return(null==t?void 0:t.value)||null})(e.key);t?(this.state.activeTool.type!==t&&(0,Ze.L)("toolbar",t,"keyboard (".concat(this.device.isMobile?"mobile":"desktop",")")),this.setActiveTool({type:t}),e.stopPropagation()):e.key===c.tW.Q&&(this.toggleLock("keyboard"),e.stopPropagation())}if(e.key===c.tW.SPACE&&0===tr.pointers.size&&(Zn=!0,(0,y.KJ)(this.canvas,N.oc.GRABBING),e.preventDefault()),!(e.key!==c.tW.G&&e.key!==c.tW.S||e.altKey||e[c.tW.CTRL_OR_CMD])){const t=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if("selection"===this.state.activeTool.type&&!t.length)return;e.key===c.tW.G&&((0,l.$b)(this.state.activeTool.type)||t.some((e=>(0,l.$b)(e.type))))&&(this.setState({openPopup:"backgroundColorPicker"}),e.stopPropagation()),e.key===c.tW.S&&(this.setState({openPopup:"strokeColorPicker"}),e.stopPropagation())}}}else e.preventDefault()})),this.onWheel=(0,y.tH)((e=>{e.target instanceof HTMLCanvasElement||!e.ctrlKey||e.preventDefault()})),this.onKeyUp=(0,y.tH)((e=>{if(e.key===c.tW.SPACE&&(this.state.viewModeEnabled?(0,y.KJ)(this.canvas,N.oc.GRAB):"selection"===this.state.activeTool.type?(0,y.z8)(this.canvas):((0,y.Uk)(this.canvas,this.state),this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Zn=!1),e[c.tW.CTRL_OR_CMD]||this.state.isBindingEnabled||this.setState({isBindingEnabled:!0}),(0,c.Wl)(e.key)){const e=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);(0,v.N1)(this.state)?(0,v.el)(e):(0,v.H)(e),this.setState({suggestedBindings:[]})}})),this.setActiveTool=e=>{const t=(0,y.Om)(this.state,e);Zn||(0,y.Uk)(this.canvas,this.state),(0,y.wO)(document.activeElement)&&this.focusContainer(),(0,x.dt)(t.type)||this.setState({suggestedBindings:[]}),"image"===t.type&&this.onImageAction(),"selection"!==t.type?this.setState({activeTool:t,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):this.setState({activeTool:t})},this.setCursor=e=>{(0,y.KJ)(this.canvas,e)},this.resetCursor=()=>{(0,y.z8)(this.canvas)},this.isTouchScreenMultiTouchGesture=()=>tr.pointers.size>=2,this.onGestureStart=(0,y.tH)((e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:{}}),tr.initialScale=this.state.zoom.value})),this.onGestureChange=(0,y.tH)((e=>{if(e.preventDefault(),this.isTouchScreenMultiTouchGesture())return;const t=tr.initialScale;t&&this.setState((n=>Object.assign({},(0,at.E)({viewportX:Vn,viewportY:Yn,nextZoom:(0,l.j)(t*e.scale)},n))))})),this.onGestureEnd=(0,y.tH)((e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:this.state.previousSelectedElementIds}),tr.initialScale=null})),this.startTextEditing=e=>{var t,n,r,i;let{sceneX:o,sceneY:a,shouldBind:s,insertAtParentCenter:c=!0}=e,d=c&&this.getTextWysiwygSnappedToCenterPosition(o,a,this.state,this.canvas,window.devicePixelRatio),u=null,h=null;const p=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if(u=1===p.length?(0,g.iB)(p[0])?p[0]:(0,x.mG)(p[0],!1)?(0,H.WJ)(p[0]):this.getTextElementAtPosition(o,a):this.getTextElementAtPosition(o,a),h||u||!s&&!d||(h=(0,l.OW)(this.scene.getNonDeletedElements().filter((e=>(0,x.mG)(e,!1)&&!(0,H.WJ)(e))),o,a)),!u&&h){const e={fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily},t=(0,H.AT)((0,y.mO)(e)),n=(0,H.w_)((0,y.mO)(e)),r=Math.max(h.height,n),i=Math.max(h.width,t);(0,f.DR)(h,{height:r,width:i}),o=h.x+i/2,a=h.y+r/2,d&&(d=this.getTextWysiwygSnappedToCenterPosition(o,a,this.state,this.canvas,window.devicePixelRatio))}const m=u||(0,g.VL)({x:d?d.elementCenterX:o,y:d?d.elementCenterY:a,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,text:"",fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:d?"center":this.state.currentItemTextAlign,verticalAlign:d?N.oX.MIDDLE:N.hs,containerId:null!==(t=null===(n=h)||void 0===n?void 0:n.id)&&void 0!==t?t:void 0,groupIds:null!==(r=null===(i=h)||void 0===i?void 0:i.groupIds)&&void 0!==r?r:[],locked:!1});this.setState({editingElement:m}),u||(this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),m]),d||(0,f.DR)(m,{y:m.y-m.baseline/2})),this.setState({editingElement:m}),this.handleTextWysiwyg(m,{isExistingElement:!!u})},this.handleCanvasDoubleClick=e=>{if(this.state.multiElement)return;if("selection"!==this.state.activeTool.type)return;const t=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if(1===t.length&&(0,x.bt)(t[0]))return void(this.state.editingLinearElement&&this.state.editingLinearElement.elementId===t[0].id||(this.history.resumeRecording(),this.setState({editingLinearElement:new b._(t[0],this.scene)})));(0,y.z8)(this.canvas);let{x:n,y:r}=(0,y.dE)(e,this.state);if((0,m.iJ)(this.state).length>0){const e=this.getElementAtPosition(n,r),t=e&&(0,m.YS)(e,this.state.selectedGroupIds);if(t)return void this.setState((n=>(0,m.bO)(Object.assign(Object.assign({},n),{editingGroupId:t,selectedElementIds:{[e.id]:!0},selectedGroupIds:{}}),this.scene.getNonDeletedElements())))}if((0,y.z8)(this.canvas),!e[c.tW.CTRL_OR_CMD]&&!this.state.viewModeEnabled){const t=(0,l.eD)(this.scene.getNonDeletedElements(),this.state);if(1===t.length){const e=t[0];(0,x.Xo)(e)&&(n=e.x+e.width/2,r=e.y+e.height/2)}this.startTextEditing({sceneX:n,sceneY:r,shouldBind:!1,insertAtParentCenter:!e.altKey})}},this.getElementLinkAtPosition=(e,t)=>{const n=this.scene.getNonDeletedElements().slice().reverse();let r=1/0;return n.find(((n,i)=>(t&&n.id===t.id&&(r=i),n.link&&i<=r&&(0,Fe.wq)(n,this.state,[e.x,e.y],this.device.isMobile))))},this.redirectToLink=(e,t)=>{const n=(0,F.LW)(this.lastPointerDown.clientX,this.lastPointerDown.clientY,this.lastPointerUp.clientX,this.lastPointerUp.clientY);if(!this.hitLinkElement||t&&n>N.f||!t&&0!==n)return;const r=(0,y.dE)(this.lastPointerDown,this.state),i=(0,Fe.wq)(this.hitLinkElement,this.state,[r.x,r.y],this.device.isMobile),o=(0,y.dE)(this.lastPointerUp,this.state),a=(0,Fe.wq)(this.hitLinkElement,this.state,[o.x,o.y],this.device.isMobile);if(i&&a){const t=this.hitLinkElement.link;if(t){var s;let n;if(this.props.onLinkOpen&&(n=(0,y.ag)(N.Ks.EXCALIDRAW_LINK,e.nativeEvent),this.props.onLinkOpen(this.hitLinkElement,n)),null===(s=n)||void 0===s||!s.defaultPrevented){const e=(0,Fe.q$)(t)?"_self":"_blank",n=window.open(void 0,e);n&&(n.opener=null,n.location=(0,Fe.$u)(t))}}}},this.handleCanvasPointerMove=e=>{this.savePointer(e.clientX,e.clientY,this.state.cursorButton),tr.pointers.has(e.pointerId)&&tr.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY});const t=tr.initialScale;if(2===tr.pointers.size&&tr.lastCenter&&t&&tr.initialDistance){const e=$e(tr.pointers),n=e.x-tr.lastCenter.x,r=e.y-tr.lastCenter.y;tr.lastCenter=e;const i=et(Array.from(tr.pointers.values())),o="freedraw"===this.state.activeTool.type&&this.state.penMode?1:i/tr.initialDistance,a=o?(0,l.j)(t*o):this.state.zoom.value;this.setState((t=>{const i=(0,at.E)({viewportX:e.x,viewportY:e.y,nextZoom:a},t);return{zoom:i.zoom,scrollX:i.scrollX+n/a,scrollY:i.scrollY+r/a,shouldCacheIgnoreZoom:!0}})),this.resetShouldCacheIgnoreZoomDebounced()}else tr.lastCenter=tr.initialDistance=tr.initialScale=null;if(Zn||Gn||Xn)return;const n=(0,l._4)(qn,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop).isOverEither;this.state.draggingElement||this.state.multiElement||(n?(0,y.z8)(this.canvas):(0,y.Uk)(this.canvas,this.state));const r=(0,y.dE)(e,this.state),{x:i,y:o}=r;if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){const t=b._.handlePointerMove(e,i,o,this.state.editingLinearElement,this.state.gridSize);t!==this.state.editingLinearElement&&this.setState({editingLinearElement:t}),null!=t.lastUncommittedPoint?this.maybeSuggestBindingAtCursor(r):this.setState({suggestedBindings:[]})}if((0,x.Lx)(this.state.activeTool.type)){const{draggingElement:e}=this.state;(0,x.Mn)(e,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(e,[r],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(r)}if(this.state.multiElement){const{multiElement:e}=this.state,{x:t,y:n}=e,{points:r,lastCommittedPoint:a}=e,s=r[r.length-1];return(0,y.Uk)(this.canvas,this.state),void(s===a?(0,F.LW)(i-t,o-n,s[0],s[1])>=N.qx?(0,f.DR)(e,{points:[...r,[i-t,o-n]]}):(0,y.KJ)(this.canvas,N.oc.POINTER):r.length>2&&a&&(0,F.LW)(i-t,o-n,a[0],a[1])<N.qx?((0,y.KJ)(this.canvas,N.oc.POINTER),(0,f.DR)(e,{points:r.slice(0,-1)})):((0,F.g6)(r,this.state.zoom.value)&&(0,y.KJ)(this.canvas,N.oc.POINTER),(0,f.DR)(e,{points:[...r.slice(0,-1),[i-t,o-n]]})))}if(Boolean(e.buttons)||"selection"!==this.state.activeTool.type&&"text"!==this.state.activeTool.type&&"eraser"!==this.state.activeTool.type)return;const a=this.scene.getNonDeletedElements(),s=(0,l.eD)(a,this.state);if(1!==s.length||n||this.state.editingLinearElement){if(s.length>1&&!n){const t=(0,g.n2)((0,g.KP)(s),i,o,this.state.zoom,e.pointerType);if(t)return void(0,y.KJ)(this.canvas,(0,g.Un)({transformHandleType:t}))}}else{const t=(0,g.jt)(a,this.state,i,o,this.state.zoom,e.pointerType);if(t&&t.transformHandleType)return void(0,y.KJ)(this.canvas,(0,g.Un)(t))}const d=this.getElementAtPosition(r.x,r.y);if(this.hitLinkElement=this.getElementLinkAtPosition(r,d),!(0,qe.EN)(this.state))if(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id])(0,y.KJ)(this.canvas,N.oc.POINTER),(0,Fe.Pp)(this.hitLinkElement,this.state);else if((0,Fe.lV)(),d&&d.link&&this.state.selectedElementIds[d.id]&&!this.contextMenuOpen&&!this.state.showHyperlinkPopup)this.setState({showHyperlinkPopup:"info"});else if("text"===this.state.activeTool.type)(0,y.KJ)(this.canvas,(0,g.iB)(d)?N.oc.TEXT:N.oc.CROSSHAIR);else if(this.state.viewModeEnabled)(0,y.KJ)(this.canvas,N.oc.GRAB);else if(n)(0,y.KJ)(this.canvas,N.oc.AUTO);else if(this.state.editingLinearElement){const e=b._.getElement(this.state.editingLinearElement.elementId);e&&(0,Pn.Qu)(e,this.state,[r.x,r.y])?(0,y.KJ)(this.canvas,N.oc.MOVE):(0,y.KJ)(this.canvas,N.oc.AUTO)}else e[c.tW.CTRL_OR_CMD]||!d&&!this.isHittingCommonBoundingBoxOfSelectedElements(r,s)||null!=d&&d.locked?(0,y.KJ)(this.canvas,N.oc.AUTO):(0,y.KJ)(this.canvas,N.oc.MOVE)},this.handleEraser=(e,t,n)=>{const r=n=>{n.forEach((n=>{n.locked||(i.push(n.id),e.altKey?t.elementIdsToErase[n.id]&&t.elementIdsToErase[n.id].erase&&(t.elementIdsToErase[n.id].erase=!1):t.elementIdsToErase[n.id]||(t.elementIdsToErase[n.id]={erase:!0,opacity:n.opacity}))}))},i=[],o=(0,F.LW)(t.lastCoords.x,t.lastCoords.y,n.x,n.y),a=10/this.state.zoom.value,s=Object.assign({},t.lastCoords);let l=0;for(;l<=o;){if(r(this.getElementsAtPosition(s.x,s.y)),l===o)break;l=Math.min(l+a,o);const e=l/o,t=(1-e)*s.x+e*n.x,i=(1-e)*s.y+e*n.y;s.x=t,s.y=i}const c=this.scene.getElementsIncludingDeleted().map((n=>{const r=(0,x.Xh)(n)&&i.includes(n.containerId)?n.containerId:n.id;if(i.includes(r)){if(!e.altKey)return(0,f.BE)(n,{opacity:N.xY});if(t.elementIdsToErase[r]&&!1===t.elementIdsToErase[r].erase)return(0,f.BE)(n,{opacity:t.elementIdsToErase[r].opacity})}return n}));this.scene.replaceAllElements(c),t.lastCoords.x=n.x,t.lastCoords.y=n.y},this.handleTouchMove=e=>{Qn=!0},this.handleCanvasPointerDown=e=>{var t,n;const r=document.getSelection();if(null!=r&&r.anchorNode&&r.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(e),this.maybeCleanupAfterMissingPointerUp(e),this.state.penDetected||"pen"!==e.pointerType||this.setState((e=>({penMode:!0,penDetected:!0}))),!this.device.isTouchScreen&&["pen","touch"].includes(e.pointerType)&&(this.device=(0,y.v4)(this.device,{isTouchScreen:!0})),Gn)return;if(this.lastPointerDown=e,this.setState({lastPointerDownWith:e.pointerType,cursorButton:"down"}),this.savePointer(e.clientX,e.clientY,"down"),this.updateGestureOnPointerDown(e),this.handleCanvasPanUsingWheelOrSpaceDrag(e))return;if(e.button!==N.Oh.MAIN&&e.button!==N.Oh.TOUCH)return;if(tr.pointers.size>1)return;const i=this.initialPointerDownState(e);if(this.handleDraggingScrollBar(e,i))return;if(this.contextMenuOpen=!1,this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(e),this.handleSelectionOnPointerDown(e,i))return;if(!(!this.state.penMode||"touch"!==e.pointerType||"selection"===this.state.activeTool.type||"text"===this.state.activeTool.type||"image"===this.state.activeTool.type))return;if("text"===this.state.activeTool.type)return void this.handleTextOnPointerDown(e,i);if("arrow"===this.state.activeTool.type||"line"===this.state.activeTool.type)this.handleLinearElementOnPointerDown(e,this.state.activeTool.type,i);else if("image"===this.state.activeTool.type){(0,y.KJ)(this.canvas,N.oc.CROSSHAIR);const t=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!t)return;this.setState({draggingElement:t,editingElement:t,pendingImageElementId:null,multiElement:null});const{x:n,y:r}=(0,y.dE)(e,this.state);(0,f.DR)(t,{x:n,y:r})}else"freedraw"===this.state.activeTool.type?this.handleFreeDrawElementOnPointerDown(e,this.state.activeTool.type,i):"custom"===this.state.activeTool.type?(0,y.KJ)(this.canvas,N.oc.AUTO):"eraser"!==this.state.activeTool.type&&this.createGenericElementOnPointerDown(this.state.activeTool.type,i);null===(t=this.props)||void 0===t||null===(n=t.onPointerDown)||void 0===n||n.call(t,this.state.activeTool,i),this.onPointerDownEmitter.trigger(this.state.activeTool,i,e);const o=this.onPointerMoveFromPointerDownHandler(i),a=this.onPointerUpFromPointerDownHandler(i),s=this.onKeyDownFromPointerDownHandler(i),l=this.onKeyUpFromPointerDownHandler(i);er=a,this.state.viewModeEnabled||(window.addEventListener(N.Ks.POINTER_MOVE,o),window.addEventListener(N.Ks.POINTER_UP,a),window.addEventListener(N.Ks.KEYDOWN,s),window.addEventListener(N.Ks.KEYUP,l),i.eventListeners.onMove=o,i.eventListeners.onUp=a,i.eventListeners.onKeyUp=l,i.eventListeners.onKeyDown=s)},this.handleCanvasPointerUp=e=>{if(this.lastPointerUp=e,this.device.isTouchScreen){const t=(0,y.dE)({clientX:e.clientX,clientY:e.clientY},this.state),n=this.getElementAtPosition(t.x,t.y);this.hitLinkElement=this.getElementLinkAtPosition(t,n)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]&&this.redirectToLink(e,this.device.isTouchScreen),this.removePointer(e)},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=e=>{"touch"===e.pointerType&&(Qn=!1,Jn?Qn=!0:Jn=window.setTimeout((()=>{Jn=0,Qn||this.handleCanvasContextMenu(e)}),N.nM))},this.resetContextMenuTimer=()=>{clearTimeout(Jn),Jn=0,Qn=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=e=>{if(!(tr.pointers.size<=1&&(e.button===N.Oh.WHEEL||e.button===N.Oh.MAIN&&Zn||this.state.viewModeEnabled))||(0,g.iB)(this.state.editingElement))return!1;Gn=!0,e.preventDefault();let t=!1;const n=/Linux/.test(window.navigator.platform);(0,y.KJ)(this.canvas,N.oc.GRABBING);let{clientX:r,clientY:i}=e;const o=(0,y.$9)((e=>{const o=r-e.clientX,a=i-e.clientY;if(r=e.clientX,i=e.clientY,n&&!t&&(Math.abs(o)>1||Math.abs(a)>1)){t=!0;const e=t=>{document.body.removeEventListener(N.Ks.PASTE,e),t.stopPropagation()},n=()=>{setTimeout((()=>{document.body.removeEventListener(N.Ks.PASTE,e),window.removeEventListener(N.Ks.POINTER_UP,n)}),100)};document.body.addEventListener(N.Ks.PASTE,e),window.addEventListener(N.Ks.POINTER_UP,n)}this.setState({scrollX:this.state.scrollX-o/this.state.zoom.value,scrollY:this.state.scrollY-a/this.state.zoom.value})})),a=(0,y.tH)(er=()=>{er=null,Gn=!1,Zn||(this.state.viewModeEnabled?(0,y.KJ)(this.canvas,N.oc.GRAB):(0,y.Uk)(this.canvas,this.state)),this.setState({cursorButton:"up"}),this.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(N.Ks.POINTER_MOVE,o),window.removeEventListener(N.Ks.POINTER_UP,a),window.removeEventListener(N.Ks.BLUR,a),o.flush()});return window.addEventListener(N.Ks.BLUR,a),window.addEventListener(N.Ks.POINTER_MOVE,o,{passive:!0}),window.addEventListener(N.Ks.POINTER_UP,a),!0},this.clearSelectionIfNotUsingSelection=()=>{"selection"!==this.state.activeTool.type&&this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})},this.handleSelectionOnPointerDown=(e,t)=>{if("selection"===this.state.activeTool.type){const r=this.scene.getNonDeletedElements(),i=(0,l.eD)(r,this.state);if(1!==i.length||this.state.editingLinearElement)i.length>1&&(t.resize.handleType=(0,g.n2)((0,g.KP)(i),t.origin.x,t.origin.y,this.state.zoom,e.pointerType));else{const n=(0,g.jt)(r,this.state,t.origin.x,t.origin.y,this.state.zoom,e.pointerType);null!=n&&(this.setState({resizingElement:n.element}),t.resize.handleType=n.transformHandleType)}if(t.resize.handleType)(0,y.KJ)(this.canvas,(0,g.Un)({transformHandleType:t.resize.handleType})),t.resize.isResizing=!0,t.resize.offset=(0,y.AK)((0,g.xx)(t.resize.handleType,i,t.origin.x,t.origin.y)),1===i.length&&(0,x.bt)(i[0])&&2===i[0].points.length&&(t.resize.arrowDirection=(0,g.T)(t.resize.handleType,i[0]));else{var n;if(this.state.editingLinearElement){const n=b._.handlePointerDown(e,this.state,(e=>this.setState(e)),this.history,t.origin);if(n.hitElement&&(t.hit.element=n.hitElement),n.didAddPoint)return!0}if(t.hit.element=null!==(n=t.hit.element)&&void 0!==n?n:this.getElementAtPosition(t.origin.x,t.origin.y),t.hit.element){if((0,Fe.wq)(t.hit.element,this.state,[t.origin.x,t.origin.y],this.device.isMobile))return!1;t.hit.hasHitElementInside=(0,Pn.Qu)(t.hit.element,this.state,[t.origin.x,t.origin.y])}t.hit.allHitElements=this.getElementsAtPosition(t.origin.x,t.origin.y);const r=t.hit.element,i=t.hit.allHitElements.some((e=>this.isASelectedElement(e)));if(null!==r&&i||e.shiftKey||t.hit.hasHitCommonBoundingBoxOfSelectedElements||this.clearSelection(r),this.state.editingLinearElement)this.setState({selectedElementIds:{[this.state.editingLinearElement.elementId]:!0}});else if(null!=r){if(e[c.tW.CTRL_OR_CMD])return this.state.selectedElementIds[r.id]||(t.hit.wasAddedToSelection=!0),this.setState((e=>Object.assign(Object.assign({},(0,m.iE)(e,r)),{previousSelectedElementIds:this.state.selectedElementIds}))),!1;this.state.selectedElementIds[r.id]||(this.state.editingGroupId&&!(0,m.Nd)(r,this.state.editingGroupId)&&this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),i||t.hit.hasHitCommonBoundingBoxOfSelectedElements||(this.setState((e=>(0,m.bO)(Object.assign(Object.assign({},e),{selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[r.id]:!0}),showHyperlinkPopup:!!r.link&&"info"}),this.scene.getNonDeletedElements()))),t.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=(e,t)=>{if((0,g.iB)(this.state.editingElement))return;let n=t.origin.x,r=t.origin.y;const i=this.getElementAtPosition(n,r,{includeBoundTextElement:!0});(0,x.Xo)(i)&&(n=i.x+i.width/2,r=i.y+i.height/2),this.startTextEditing({sceneX:n,sceneY:r,shouldBind:!1,insertAtParentCenter:!e.altKey}),(0,y.z8)(this.canvas),this.state.activeTool.locked||this.setState({activeTool:(0,y.Om)(this.state,{type:"selection"})})},this.handleFreeDrawElementOnPointerDown=(e,t,n)=>{const[r,i]=(0,F.wC)(n.origin.x,n.origin.y,null),o=(0,me.KE)({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemLinearStrokeSharpness,simulatePressure:.5===e.pressure,locked:!1});this.setState((e=>({selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[o.id]:!1})})));const a=o.simulatePressure?o.pressures:[...o.pressures,e.pressure];(0,f.DR)(o,{points:[[0,0]],pressures:a});const s=(0,v.Y9)(n.origin,this.scene);this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),o]),this.setState({draggingElement:o,editingElement:o,startBoundElement:s,suggestedBindings:[]})},this.createImageElement=e=>{let{sceneX:t,sceneY:n}=e;const[r,i]=(0,F.wC)(t,n,this.state.gridSize);return(0,g.vw)({type:"image",x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemLinearStrokeSharpness,locked:!1})},this.handleLinearElementOnPointerDown=(e,t,n)=>{if(this.state.multiElement){const{multiElement:e}=this.state;if("line"===e.type&&(0,F.g6)(e.points,this.state.zoom.value))return(0,f.DR)(e,{lastCommittedPoint:e.points[e.points.length-1]}),void this.actionManager.executeAction(K);const{x:t,y:r,lastCommittedPoint:i}=e;if(e.points.length>1&&i&&(0,F.LW)(n.origin.x-t,n.origin.y-r,i[0],i[1])<N.qx)return void this.actionManager.executeAction(K);this.setState((t=>({selectedElementIds:Object.assign(Object.assign({},t.selectedElementIds),{[e.id]:!0})}))),(0,f.DR)(e,{lastCommittedPoint:e.points[e.points.length-1]}),(0,y.KJ)(this.canvas,N.oc.POINTER)}else{const[e,r]=(0,F.wC)(n.origin.x,n.origin.y,this.state.gridSize),{currentItemStartArrowhead:i,currentItemEndArrowhead:o}=this.state,[a,s]="arrow"===t?[i,o]:[null,null],l=(0,g.y8)({type:t,x:e,y:r,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemLinearStrokeSharpness,startArrowhead:a,endArrowhead:s,locked:!1});this.setState((e=>({selectedElementIds:Object.assign(Object.assign({},e.selectedElementIds),{[l.id]:!1})}))),(0,f.DR)(l,{points:[...l.points,[0,0]]});const c=(0,v.Y9)(n.origin,this.scene);this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),l]),this.setState({draggingElement:l,editingElement:l,startBoundElement:c,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=(e,t)=>{const[n,r]=(0,F.wC)(t.origin.x,t.origin.y,this.state.gridSize),i=(0,g.Up)({type:e,x:n,y:r,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,locked:!1});"selection"===i.type?this.setState({selectionElement:i,draggingElement:i}):(this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),i]),this.setState({multiElement:null,draggingElement:i,editingElement:i}))},this.restoreReadyToEraseElements=e=>{const t=this.scene.getElementsIncludingDeleted().map((t=>e.elementIdsToErase[t.id]&&e.elementIdsToErase[t.id].erase?(0,f.BE)(t,{opacity:e.elementIdsToErase[t.id].opacity}):(0,x.Xh)(t)&&e.elementIdsToErase[t.containerId]&&e.elementIdsToErase[t.containerId].erase?(0,f.BE)(t,{opacity:e.elementIdsToErase[t.containerId].opacity}):t));this.scene.replaceAllElements(t)},this.eraseElements=e=>{const t=this.scene.getElementsIncludingDeleted().map((t=>e.elementIdsToErase[t.id]&&e.elementIdsToErase[t.id].erase||(0,x.Xh)(t)&&e.elementIdsToErase[t.containerId]&&e.elementIdsToErase[t.containerId].erase?(0,f.BE)(t,{isDeleted:!0}):t));this.history.resumeRecording(),this.scene.replaceAllElements(t)},this.initializeImage=async e=>{var t,n,r;let{imageFile:i,imageElement:o,showCursorImagePreview:a=!1}=e;if(!(0,q.Wr)(i))throw new Error((0,h.t)("errors.unsupportedFileType"));const s=i.type;if((0,y.KJ)(this.canvas,"wait"),s===N.LO.svg)try{i=(0,q.Pn)(await(0,An.bp)(await i.text()),i.name)}catch(e){throw console.warn(e),new Error((0,h.t)("errors.svgImageInsertError"))}const l=await((null===(t=(n=this.props).generateIdForFile)||void 0===t?void 0:t.call(n,i))||(0,q.tW)(i));if(!l)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,h.t)("errors.imageInsertError"));const c=this.files[l];if(null==c||!c.dataURL){try{i=await(0,q.Tu)(i,{maxWidthOrHeight:N.h6})}catch(e){console.error("error trying to resing image file on insertion",e)}if(i.size>N.$n)throw new Error((0,h.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(N.$n/1024/1024),"MB")}))}if(a){var d;const e=null===(d=this.files[l])||void 0===d?void 0:d.dataURL,t=e&&(0,q.KG)(e);this.setImagePreviewCursor(t||i)}const u=(null===(r=this.files[l])||void 0===r?void 0:r.dataURL)||await(0,q.Sf)(i),p=(0,f.DR)(o,{fileId:l},!1);return new Promise((async(e,t)=>{try{var n;this.files=Object.assign(Object.assign({},this.files),{[l]:{mimeType:s,id:l,dataURL:u,created:Date.now()}});const t=this.imageCache.get(l);t||(this.addNewImagesToImageCache(),await this.updateImageCache([p])),(null==t?void 0:t.image)instanceof Promise&&await t.image,this.state.pendingImageElementId!==p.id&&(null===(n=this.state.draggingElement)||void 0===n?void 0:n.id)!==p.id&&this.initializeImageDimensions(p,!0),e(p)}catch(e){console.error(e),t(new Error((0,h.t)("errors.imageInsertError")))}finally{a||(0,y.z8)(this.canvas)}}))},this.insertImageElement=async(e,t,n)=>{this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(),e]);try{await this.initializeImage({imageFile:t,imageElement:e,showCursorImagePreview:n})}catch(t){(0,f.DR)(e,{isDeleted:!0}),this.actionManager.executeAction(K),this.setState({errorMessage:t.message||(0,h.t)("errors.imageInsertError")})}},this.setImagePreviewCursor=async e=>{const t=await(0,q.Tu)(e,{maxWidthOrHeight:96});let n=await(0,q.Sf)(t);if(e.type===N.LO.svg){const e=await(0,An.PK)(n);let t=Math.min(e.height,96),r=t*(e.width/e.height);r>96&&(r=96,t=r*(e.height/e.width));const i=document.createElement("canvas");i.height=t,i.width=r;i.getContext("2d").drawImage(e,0,0,r,t),n=i.toDataURL(N.LO.svg)}this.state.pendingImageElementId&&(0,y.KJ)(this.canvas,"url(".concat(n,") 4 4, auto"))},this.onImageAction=async function(){let{insertOnCanvasDirectly:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{insertOnCanvasDirectly:!1};try{const n=e.state.width/2+e.state.offsetLeft,r=e.state.height/2+e.state.offsetTop,{x:i,y:o}=(0,y.dE)({clientX:n,clientY:r},e.state),a=await(0,J.I$)({description:"Image",extensions:["jpg","png","svg","gif"]}),s=e.createImageElement({sceneX:i,sceneY:o});t?(e.insertImageElement(s,a),e.initializeImageDimensions(s),e.setState({selectedElementIds:{[s.id]:!0}},(()=>{e.actionManager.executeAction(K)}))):e.setState({pendingImageElementId:s.id},(()=>{e.insertImageElement(s,a,!0)}))}catch(t){"AbortError"!==t.name?console.error(t):console.warn(t),e.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,y.Om)(e.state,{type:"selection"})},(()=>{e.actionManager.executeAction(K)}))}},this.initializeImageDimensions=function(t){var n;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=(0,x.wi)(t)&&(null===(n=e.imageCache.get(t.fileId))||void 0===n?void 0:n.image);if(!i||i instanceof Promise){if(t.width<N.f/e.state.zoom.value&&t.height<N.f/e.state.zoom.value){const n=100/e.state.zoom.value;(0,f.DR)(t,{x:t.x-n/2,y:t.y-n/2,width:n,height:n})}}else if(r||t.width<N.f/e.state.zoom.value&&t.height<N.f/e.state.zoom.value){const n=Math.max(e.state.height-120,160),r=Math.min(n,Math.floor(.5*e.state.height)/e.state.zoom.value),o=Math.min(i.naturalHeight,r),a=o*(i.naturalWidth/i.naturalHeight),s=t.x+t.width/2-a/2,l=t.y+t.height/2-o/2;(0,f.DR)(t,{x:s,y:l,width:a,height:o})}},this.updateImageCache=async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.files;const{updatedFiles:r,erroredFiles:i}=await(0,An.Xx)({imageCache:e.imageCache,fileIds:t.map((e=>e.fileId)),files:n});if(r.size||i.size)for(const e of t)r.has(e.fileId)&&(0,ot.bI)(e);return i.size&&e.scene.replaceAllElements(e.scene.getElementsIncludingDeleted().map((e=>(0,x.wi)(e)&&i.has(e.fileId)?(0,f.BE)(e,{status:"error"}):e))),{updatedFiles:r,erroredFiles:i}},this.addNewImagesToImageCache=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,An.oA)(e.scene.getNonDeletedElements()),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.files;const r=t.filter((t=>!t.isDeleted&&!e.imageCache.has(t.fileId)));if(r.length){const{updatedFiles:t}=await e.updateImageCache(r,n);t.size&&e.scene.informMutation()}},this.scheduleImageRefresh=zn()((()=>{this.addNewImagesToImageCache()}),N.LL),this.updateBindingEnabledOnPointerMove=e=>{const t=(0,v.cz)(e);this.state.isBindingEnabled!==t&&this.setState({isBindingEnabled:t})},this.maybeSuggestBindingAtCursor=e=>{const t=(0,v.Y9)(e,this.scene);this.setState({suggestedBindings:null!=t?[t]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=(e,t,n)=>{if(!t.length)return;const r=t.reduce(((t,r)=>{const i=(0,v.Y9)(r,this.scene);return null==i||(0,v.DK)(e,null==n?void 0:n.id,i)||t.push(i),t}),[]);this.setState({suggestedBindings:r})},this.handleCanvasRef=e=>{var t,n,r;null!==e?(this.canvas=e,this.rc=o.Z.canvas(this.canvas),this.canvas.addEventListener(N.Ks.WHEEL,this.handleWheel,{passive:!1}),this.canvas.addEventListener(N.Ks.TOUCH_START,this.onTapStart),this.canvas.addEventListener(N.Ks.TOUCH_END,this.onTapEnd)):(null===(t=this.canvas)||void 0===t||t.removeEventListener(N.Ks.WHEEL,this.handleWheel),null===(n=this.canvas)||void 0===n||n.removeEventListener(N.Ks.TOUCH_START,this.onTapStart),null===(r=this.canvas)||void 0===r||r.removeEventListener(N.Ks.TOUCH_END,this.onTapEnd))},this.handleAppOnDrop=async e=>{const{file:t,fileHandle:n}=await(0,q.bv)(e);try{if((0,q.Wr)(t)){if((null==t?void 0:t.type)===N.LO.png||(null==t?void 0:t.type)===N.LO.svg)try{const e=await(0,q.cT)(t,this.state,this.scene.getElementsIncludingDeleted(),n);return void this.syncActionResult(Object.assign(Object.assign({},e),{appState:Object.assign(Object.assign({},e.appState||this.state),{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}))}catch(e){if("EncodingError"!==e.name)throw e}const{x:r,y:i}=(0,y.dE)(e,this.state),o=this.createImageElement({sceneX:r,sceneY:i});return this.insertImageElement(o,t),this.initializeImageDimensions(o),void this.setState({selectedElementIds:{[o.id]:!0}})}}catch(e){return this.setState({isLoading:!1,errorMessage:e.message})}const r=e.dataTransfer.getData(N.LO.excalidrawlib);if(r&&"string"==typeof r)try{const t=(0,q.wf)(r);this.addElementsFromPasteOrLibrary({elements:(0,Je.WV)(t),position:e,files:null})}catch(e){this.setState({errorMessage:e.message})}else t&&await this.loadFileToCanvas(t,n)},this.loadFileToCanvas=async(e,t)=>{e=await(0,q.gY)(e);try{const n=await(0,q.ZY)(e,this.state,this.scene.getElementsIncludingDeleted(),t);n.type===N.LO.excalidraw?(this.setState({isLoading:!0}),this.syncActionResult(Object.assign(Object.assign({},n.data),{appState:Object.assign(Object.assign({},n.data.appState||this.state),{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}))):n.type===N.LO.excalidrawlib&&await this.library.updateLibrary({libraryItems:e,merge:!0,openLibraryMenu:!0}).catch((e=>{console.error(e),this.setState({errorMessage:(0,h.t)("errors.importLibraryError")})}))}catch(e){this.setState({isLoading:!1,errorMessage:e.message})}},this.handleCanvasContextMenu=e=>{if(e.preventDefault(),("touch"===e.nativeEvent.pointerType||"pen"===e.nativeEvent.pointerType&&e.button!==N.Oh.SECONDARY)&&"selection"!==this.state.activeTool.type)return;const{x:t,y:n}=(0,y.dE)(e,this.state),r=this.getElementAtPosition(t,n,{preferSelected:!0,includeLockedElements:!0}),i=r?"element":"canvas",o=this.excalidrawContainerRef.current,{top:a,left:s}=o.getBoundingClientRect(),l=e.clientX-s,c=e.clientY-a;r&&!this.state.selectedElementIds[r.id]?this.setState((0,m.bO)(Object.assign(Object.assign({},this.state),{selectedElementIds:{[r.id]:!0}}),this.scene.getNonDeletedElements()),(()=>{this._openContextMenu({top:c,left:l},i)})):this._openContextMenu({top:c,left:l},i)},this.maybeDragNewGenericElement=(e,t)=>{const n=this.state.draggingElement,r=e.lastCoords;if(n)if("selection"===n.type&&"eraser"!==this.state.activeTool.type)(0,g.EJ)(n,this.state.activeTool.type,e.origin.x,e.origin.y,r.x,r.y,(0,y.TE)(e.origin.x,r.x),(0,y.TE)(e.origin.y,r.y),(0,c.E0)(t),(0,c.OA)(t));else{var i;const[o,a]=(0,F.wC)(r.x,r.y,this.state.gridSize),s=(0,x.wi)(n)&&(null===(i=this.imageCache.get(n.fileId))||void 0===i?void 0:i.image),l=!s||s instanceof Promise?null:s.width/s.height;(0,g.EJ)(n,this.state.activeTool.type,e.originInGrid.x,e.originInGrid.y,o,a,(0,y.TE)(e.originInGrid.x,o),(0,y.TE)(e.originInGrid.y,a),(0,x.pC)(n)?!(0,c.E0)(t):(0,c.E0)(t),(0,c.OA)(t),l),this.maybeSuggestBindingForAll([n])}},this.maybeHandleResize=(e,t)=>{const n=(0,l.eD)(this.scene.getNonDeletedElements(),this.state),r=e.resize.handleType;this.setState({isResizing:r&&"rotation"!==r,isRotating:"rotation"===r});const i=e.lastCoords,[o,a]=(0,F.wC)(i.x-e.resize.offset.x,i.y-e.resize.offset.y,this.state.gridSize);return!!(0,g.vY)(e,r,n,e.resize.arrowDirection,(0,c.Ge)(t),(0,c.OA)(t),1===n.length&&(0,x.pC)(n[0])?!(0,c.E0)(t):(0,c.E0)(t),o,a,e.resize.center.x,e.resize.center.y)&&(this.maybeSuggestBindingForAll(n),!0)},this._openContextMenu=(e,t)=>{let{left:n,top:r}=e;this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),this.contextMenuOpen=!0;const i=ue.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),o=he.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),a=Se.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),s=Ie.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),c=We.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),d=Ue.contextItemPredicate(this.actionManager.getElementsIncludingDeleted(),this.actionManager.getAppState()),u="separator",h=this.scene.getNonDeletedElements(),p=(0,l.eD)(this.scene.getNonDeletedElements(),this.state),g=[];if(G.vt&&h.length>0&&g.push(Pe),G.wx&&h.length>0&&g.push(ze),"element"===t&&Re.contextItemPredicate(h,this.state)&&G.wx&&g.push(Re),"canvas"===t){const e=[...g,void 0===this.props.gridModeEnabled&&Be,void 0===this.props.zenModeEnabled&&Ne,void 0===this.props.viewModeEnabled&&On,He];this.state.viewModeEnabled?gt.push({options:e,top:r,left:n,actionManager:this.actionManager,appState:this.state,container:this.excalidrawContainerRef.current,elements:h}):gt.push({options:[this.device.isMobile&&navigator.clipboard&&{trackEvent:!1,name:"paste",perform:(e,t)=>(this.pasteFromClipboard(null),{commitToHistory:!1}),contextItemLabel:"labels.paste"},this.device.isMobile&&navigator.clipboard&&u,G.vt&&h.length>0&&Pe,G.wx&&h.length>0&&ze,G.wx&&p.length>0&&Re,(G.vt&&h.length>0||G.wx&&h.length>0)&&u,B,u,void 0===this.props.gridModeEnabled&&Be,void 0===this.props.zenModeEnabled&&Ne,void 0===this.props.viewModeEnabled&&On,He],top:r,left:n,actionManager:this.actionManager,appState:this.state,container:this.excalidrawContainerRef.current,elements:h})}else"element"===t&&(this.state.viewModeEnabled?gt.push({options:[navigator.clipboard&&Ae,...g],top:r,left:n,actionManager:this.actionManager,appState:this.state,container:this.excalidrawContainerRef.current,elements:h}):gt.push({options:[this.device.isMobile&&De,this.device.isMobile&&navigator.clipboard&&Ae,this.device.isMobile&&navigator.clipboard&&{name:"paste",trackEvent:!1,perform:(e,t)=>(this.pasteFromClipboard(null),{commitToHistory:!1}),contextItemLabel:"labels.paste"},this.device.isMobile&&u,...g,u,ae,se,u,i&&ue,c&&We,d&&Ue,o&&he,(i||o)&&u,be,u,D,z,P,R,u,a&&Se,s&&Ie,(a||s)&&u,Fe.nz.contextItemPredicate(h,this.state)&&Fe.nz,W,Ke,u,k],top:r,left:n,actionManager:this.actionManager,appState:this.state,container:this.excalidrawContainerRef.current,elements:h}))},this.handleWheel=(0,y.tH)((e=>{if(e.preventDefault(),Gn)return;const{deltaX:t,deltaY:n}=e;if(e.metaKey||e.ctrlKey){const e=Math.sign(n),t=10,r=Math.abs(n);let i=n;r>t&&(i=t*e);let o=this.state.zoom.value-i/100;return o+=Math.log10(Math.max(1,this.state.zoom.value))*-e*Math.min(1,r/20),this.setState((e=>Object.assign(Object.assign({},(0,at.E)({viewportX:Vn,viewportY:Yn,nextZoom:(0,l.j)(o)},e)),{shouldCacheIgnoreZoom:!0}))),void this.resetShouldCacheIgnoreZoomDebounced()}e.shiftKey?this.setState((e=>{let{zoom:r,scrollX:i}=e;return{scrollX:i-(n||t)/r.value}})):this.setState((e=>{let{zoom:r,scrollX:i,scrollY:o}=e;return{scrollX:i-t/r.value,scrollY:o-n/r.value}}))})),this.savePointer=(e,t,n)=>{var r,i;if(!e||!t)return;const o=(0,y.dE)({clientX:e,clientY:t},this.state);isNaN(o.x)||isNaN(o.y),null===(r=(i=this.props).onPointerUpdate)||void 0===r||r.call(i,{pointer:o,button:n,pointersMap:tr.pointers})},this.resetShouldCacheIgnoreZoomDebounced=(0,y.Ds)((()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})}),300),this.updateDOMRect=e=>{var t;if(null!==(t=this.excalidrawContainerRef)&&void 0!==t&&t.current){const t=this.excalidrawContainerRef.current,{width:n,height:r,left:i,top:o}=t.getBoundingClientRect(),{width:a,height:s,offsetTop:l,offsetLeft:c}=this.state;if(n===a&&r===s&&i===c&&o===l)return void(e&&e());this.setState({width:n,height:r,offsetLeft:i,offsetTop:o},(()=>{e&&e()}))}},this.refresh=()=>{this.setState(Object.assign({},this.getCanvasOffsets()))}};"production"!==N.Vi.TEST&&"production"!==N.Vi.DEVELOPMENT||(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get(){var e;return null===(e=this.app)||void 0===e?void 0:e.scene.getElementsIncludingDeleted()},set(e){var t;return null===(t=this.app)||void 0===t?void 0:t.scene.replaceAllElements(e)}}}));const ir=nr},5564:(e,t,n)=>{"use strict";n.d(t,{z:()=>m});var r=n(9787),i=n.n(r),o=n(7288),a=n(6340),s=(n(4220),n(6066)),l=n(5202),c=n(56),d=n(1337);const u=(e,t)=>!c.Z[t].includes(e),h=e=>{const t=(new Option).style;return t.color=e,!!t.color},p=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),g=e=>{let{colors:t,color:n,onChange:r,onClose:o,label:c,showInput:h=!0,type:g,elements:m}=e;const b=i().useRef(),v=i().useRef(),x=i().useRef(),y=i().useRef(),[w]=i().useState((()=>"canvasBackground"===g?[]:((e,t)=>{const n=[],r=e.filter((e=>!e.isDeleted)).sort(((e,t)=>t.updated-e.updated));let i=0;const o={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[t];for(;i<r.length&&n.length<5;){const e=r[i];n.length<5&&u(e[o],t)&&!n.includes(e[o])&&n.push(e[o]),i++}return n})(m,g)));i().useEffect((()=>{v.current?v.current.focus():y.current?y.current.focus():x.current&&x.current.focus()}),[]);const _=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map(((e,i)=>{const o=e.replace("#",""),s=t?p[i+15]:p[i],c=t?o:(0,l.t)("colors.".concat(o));return(0,d.jsxs)("button",{className:"color-picker-swatch",onClick:t=>{t.currentTarget.focus(),r(e)},title:"".concat(c).concat((0,a.Qm)(e)?"":" (".concat(e,")")," — ").concat(s.toUpperCase()),"aria-label":c,"aria-keyshortcuts":p[i],style:{color:e},ref:r=>{!t&&r&&0===i&&(b.current=r),r&&e===n&&(v.current=r)},onFocus:()=>{r(e)},children:[(0,a.Qm)(e)?(0,d.jsx)("div",{className:"color-picker-transparent"}):void 0,(0,d.jsx)("span",{className:"color-picker-keybinding",children:s})]},e)}))};return(0,d.jsxs)("div",{className:"color-picker color-picker-type-".concat(g),role:"dialog","aria-modal":"true","aria-label":(0,l.t)("labels.colorPicker"),onKeyDown:e=>{let t=!1;if((0,s.Wl)(e.key)){var n,r,i;t=!0;const{activeElement:o}=document,a=(0,l.G3)().rtl;let u=!1,p=Array.prototype.indexOf.call(null===(n=x.current.querySelector(".color-picker-content--default"))||void 0===n?void 0:n.children,o);var c;if(-1===p)p=Array.prototype.indexOf.call(null===(c=x.current.querySelector(".color-picker-content--canvas-colors"))||void 0===c?void 0:c.children,o),-1!==p&&(u=!0);const g=u?null===(r=x.current)||void 0===r?void 0:r.querySelector(".color-picker-content--canvas-colors"):null===(i=x.current)||void 0===i?void 0:i.querySelector(".color-picker-content--default");if(g&&-1!==p){var d;const t=g.children.length-(h?1:0),n=e.key===(a?s.tW.ARROW_LEFT:s.tW.ARROW_RIGHT)?(p+1)%t:e.key===(a?s.tW.ARROW_RIGHT:s.tW.ARROW_LEFT)?(t+p-1)%t:u||e.key!==s.tW.ARROW_DOWN?u||e.key!==s.tW.ARROW_UP?p:(t+p-5)%t:(p+5)%t;null===(d=g.children[n])||void 0===d||d.focus()}e.preventDefault()}else if(!p.includes(e.key.toLowerCase())||e[s.tW.CTRL_OR_CMD]||e.altKey||(0,a.s)(e.target))e.key!==s.tW.ESCAPE&&e.key!==s.tW.ENTER||(t=!0,e.preventDefault(),o());else{var u,g,f;t=!0;const n=p.indexOf(e.key.toLowerCase()),r=n>=15,i=r?null==x||null===(u=x.current)||void 0===u?void 0:u.querySelector(".color-picker-content--canvas-colors"):null==x||null===(g=x.current)||void 0===g?void 0:g.querySelector(".color-picker-content--default"),o=r?n-15:n;null==i||null===(f=i.children[o])||void 0===f||f.focus(),e.preventDefault()}t&&(e.nativeEvent.stopImmediatePropagation(),e.stopPropagation())},children:[(0,d.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,d.jsx)("div",{className:"color-picker-triangle"}),(0,d.jsxs)("div",{className:"color-picker-content",ref:e=>{e&&(x.current=e)},tabIndex:-1,children:[(0,d.jsx)("div",{className:"color-picker-content--default",children:_(t)}),!!w.length&&(0,d.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,d.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,l.t)("labels.canvasColors")}),(0,d.jsx)("div",{className:"color-picker-content--canvas-colors",children:_(w,!0)})]}),h&&(0,d.jsx)(f,{color:n,label:c,onChange:e=>{r(e)},ref:y})]})]})},f=i().forwardRef(((e,t)=>{let{color:n,onChange:r,label:o}=e;const[s,l]=i().useState(n),c=i().useRef(null);i().useEffect((()=>{l(n)}),[n]),i().useImperativeHandle(t,(()=>c.current));const u=i().useCallback((e=>{const t=e.toLowerCase(),n=(e=>(0,a.Qm)(e)||h(e)?e:h("#".concat(e))?"#".concat(e):null)(t);n&&r(n),l(t)}),[r]);return(0,d.jsxs)("label",{className:"color-input-container",children:[(0,d.jsx)("div",{className:"color-picker-hash",children:"#"}),(0,d.jsx)("input",{spellCheck:!1,className:"color-picker-input","aria-label":o,onChange:e=>u(e.target.value),value:(s||"").replace(/^#/,""),onBlur:()=>l(n),ref:c})]})})),m=e=>{let{type:t,color:n,onChange:r,label:a,isActive:s,setActive:l,elements:u,appState:h}=e;const p=i().useRef(null);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"color-picker-control-container",children:[(0,d.jsx)("button",{className:"color-picker-label-swatch","aria-label":a,style:n?{"--swatch-color":n}:void 0,onClick:()=>l(!s),ref:p}),(0,d.jsx)(f,{color:n,label:a,onChange:e=>{r(e)}})]}),(0,d.jsx)(i().Suspense,{fallback:"",children:s?(0,d.jsx)(o.J,{onCloseRequest:e=>e.target!==p.current&&l(!1),children:(0,d.jsx)(g,{colors:c.Z[t],color:n||null,onChange:e=>{r(e)},onClose:()=>{var e;l(!1),null===(e=p.current)||void 0===e||e.focus()},label:a,showInput:!1,type:t,elements:u})}):null})]})}},4981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(5202),i=n(2939),o=n(1319),a=(n(4678),n(1337)),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const l=e=>{const{onConfirm:t,onCancel:n,children:l,confirmText:c=(0,r.t)("buttons.confirm"),cancelText:d=(0,r.t)("buttons.cancel"),className:u=""}=e,h=s(e,["onConfirm","onCancel","children","confirmText","cancelText","className"]);return(0,a.jsxs)(i.V,Object.assign(Object.assign({onCloseRequest:n,small:!0},h),{className:"confirm-dialog ".concat(u),children:[l,(0,a.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,a.jsx)(o.V,{type:"button",title:d,"aria-label":d,label:d,onClick:n,className:"confirm-dialog--cancel"}),(0,a.jsx)(o.V,{type:"button",title:c,"aria-label":c,label:c,onClick:t,className:"confirm-dialog--confirm"})]})]}))}},4041:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});n(5422);var r=n(5202),i=n(1319),o=n(8288),a=n(1337);const s=e=>{const t=e.title||("dark"===e.value?(0,r.t)("buttons.lightMode"):(0,r.t)("buttons.darkMode"));return(0,a.jsx)(i.V,{type:"icon",icon:e.value===o.C6.LIGHT?l.MOON:l.SUN,title:t,"aria-label":t,onClick:()=>e.onChange(e.value===o.C6.DARK?o.C6.LIGHT:o.C6.DARK),"data-testid":"toggle-dark-mode"})},l={SUN:(0,a.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,a.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:(0,a.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,a.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})}},2939:(e,t,n)=>{"use strict";n.d(t,{V:()=>m});var r=n(741),i=n(9787);var o=n(5202),a=n(7067),s=n(6066),l=(n(196),n(3646)),c=n(1226),d=(n(8328),n(5156)),u=n(8288),h=n(1337);const p=e=>{const{theme:t=u.C6.LIGHT,closeOnClickOutside:n=!0}=e,i=g(t);if(!i)return null;return(0,d.createPortal)((0,h.jsxs)("div",{className:(0,r.Z)("Modal",e.className),role:"dialog","aria-modal":"true",onKeyDown:t=>{t.key===s.tW.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,children:[(0,h.jsx)("div",{className:"Modal__background",onClick:n?e.onCloseRequest:void 0}),(0,h.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(e.maxWidth,"px")},tabIndex:0,children:e.children})]}),i)},g=e=>{const[t,n]=(0,i.useState)(null),r=(0,a.Fy)(),o=(0,i.useRef)(r.isMobile);o.current=r.isMobile;const{container:s}=(0,a.J0)();return(0,i.useLayoutEffect)((()=>{t&&t.classList.toggle("excalidraw--mobile",r.isMobile)}),[t,r.isMobile]),(0,i.useLayoutEffect)((()=>{const t=!(null==s||!s.classList.contains("theme--dark"))||"dark"===e,r=document.createElement("div");return r.classList.add("excalidraw","excalidraw-modal-container"),r.classList.toggle("excalidraw--mobile",o.current),t&&(r.classList.add("theme--dark"),r.classList.add("theme--dark-background-none")),document.body.appendChild(r),n(r),()=>{document.body.removeChild(r)}}),[s,e]),t};var f=n(6340);const m=e=>{const[t,n]=(()=>{const[e,t]=(0,i.useState)(null);return[e,(0,i.useCallback)((e=>t(e)),[])]})(),[d]=(0,i.useState)(document.activeElement),{id:u}=(0,a.J0)();(0,i.useEffect)((()=>{if(!t)return;const n=(0,f.xp)(t);n.length>0&&!1!==e.autofocus&&(n[1]||n[0]).focus();const r=e=>{if(e.key===s.tW.TAB){const n=(0,f.xp)(t),{activeElement:r}=document,i=n.findIndex((e=>e===r));0===i&&e.shiftKey?(n[n.length-1].focus(),e.preventDefault()):i!==n.length-1||e.shiftKey||(n[0].focus(),e.preventDefault())}};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)}),[t,e.autofocus]);const g=()=>{d.focus(),e.onCloseRequest()};return(0,h.jsx)(p,{className:(0,r.Z)("Dialog",e.className),labelledBy:"dialog-title",maxWidth:e.small?550:800,onCloseRequest:g,theme:e.theme,closeOnClickOutside:e.closeOnClickOutside,children:(0,h.jsxs)(c.W,{ref:n,children:[(0,h.jsxs)("h2",{id:"".concat(u,"-dialog-title"),className:"Dialog__title",children:[(0,h.jsx)("span",{className:"Dialog__titleContent",children:e.title}),(0,h.jsx)("button",{className:"Modal__close",onClick:g,"aria-label":(0,o.t)("buttons.close"),children:(0,a.Fy)().isMobile?l.op:l.xv})]}),(0,h.jsx)("div",{className:"Dialog__content",children:e.children})]})})}},1226:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});n(1106);var r=n(9787),i=n.n(r),o=n(741),a=n(1337);const s=i().forwardRef(((e,t)=>{let{children:n,padding:r,className:i,style:s}=e;return(0,a.jsx)("div",{className:(0,o.Z)("Island",i),style:Object.assign({"--padding":r},s),ref:t,children:n})}))},5440:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var r=n(5202),i=n(9787),o=n(9101),a=n(1337);const s=e=>{let{delay:t}=e;const[n,s]=(0,i.useState)(!!t);return(0,i.useEffect)((()=>{if(!t)return;const e=setTimeout((()=>{s(!1)}),t);return()=>clearTimeout(e)}),[t]),n?null:(0,a.jsxs)("div",{className:"LoadingMessage",children:[(0,a.jsx)("div",{children:(0,a.jsx)(o.Z,{})}),(0,a.jsx)("div",{className:"LoadingMessage-text",children:(0,r.t)("labels.loadingScene")})]})}},7288:(e,t,n)=>{"use strict";n.d(t,{J:()=>l});var r=n(9787),i=(n(4301),n(5156)),o=n(6340),a=n(6066),s=n(1337);const l=e=>{let{children:t,left:n,top:l,onCloseRequest:c,fitInViewport:d=!1,offsetLeft:u=0,offsetTop:h=0,viewportWidth:p=window.innerWidth,viewportHeight:g=window.innerHeight}=e;const f=(0,r.useRef)(null),m=f.current;return(0,r.useEffect)((()=>{if(!m)return;const e=e=>{if(e.key===a.tW.TAB){const t=(0,o.xp)(m),{activeElement:n}=document,r=t.findIndex((e=>e===n));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault(),e.stopImmediatePropagation()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault(),e.stopImmediatePropagation())}};return m.addEventListener("keydown",e),()=>m.removeEventListener("keydown",e)}),[m]),(0,r.useLayoutEffect)((()=>{if(d&&f.current){const e=f.current,{x:t,y:n,width:r,height:i}=e.getBoundingClientRect(),{innerWidth:o,innerHeight:a}=window;t+r-u>o&&(e.style.left="".concat(o-r-10,"px")),n+i-h>a&&(e.style.top="".concat(a-i,"px")),i>=a&&(e.style.height="".concat(a-20,"px"),e.style.top="10px",e.style.overflowY="scroll"),r>=o&&(e.style.width="".concat(o,"px"),e.style.left="0px",e.style.overflowX="scroll")}}),[d,p,g,u,h]),(0,r.useEffect)((()=>{if(c){const e=e=>{var t;null!==(t=f.current)&&void 0!==t&&t.contains(e.target)||(0,i.unstable_batchedUpdates)((()=>c(e)))};return document.addEventListener("pointerdown",e,!1),()=>document.removeEventListener("pointerdown",e,!1)}}),[c]),(0,s.jsx)("div",{className:"popover",style:{top:l,left:n},ref:f,children:t})}},9101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});n(371);var r=n(1337);const i=e=>{let{size:t="1em",circleWidth:n=8}=e;return(0,r.jsx)("div",{className:"Spinner",children:(0,r.jsx)("svg",{viewBox:"0 0 100 100",style:{width:t,height:t},children:(0,r.jsx)("circle",{cx:"50",cy:"50",r:50-n/2,strokeWidth:n,fill:"none",strokeMiterlimit:"10"})})})}},1319:(e,t,n)=>{"use strict";n.d(t,{V:()=>d});n(5422);var r=n(9787),i=n.n(r),o=n(741),a=n(7067),s=n(7968),l=n(9101),c=n(1337);const d=i().forwardRef(((e,t)=>{const{id:n}=(0,a.J0)(),d=i().useRef(null);i().useImperativeHandle(t,(()=>d.current));const u="ToolIcon_size_".concat(e.size),[h,p]=(0,r.useState)(!1),g=(0,r.useRef)(!0),f=async t=>{var n;const r="onClick"in e&&(null===(n=e.onClick)||void 0===n?void 0:n.call(e,t));if(r&&"then"in r)try{p(!0),await r}catch(e){if(!(e instanceof s._))throw e;console.warn(e)}finally{g.current&&p(!1)}};(0,r.useEffect)((()=>()=>{g.current=!1}),[]);const m=(0,r.useRef)(null);if("button"===e.type||"icon"===e.type||"submit"===e.type){const t="icon"===e.type?"button":e.type;return(0,c.jsxs)("button",{className:(0,o.Z)("ToolIcon_type_button",u,e.className,e.visible&&!e.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!e.hidden,"ToolIcon--selected":e.selected,"ToolIcon--plain":"icon"===e.type}),"data-testid":e["data-testid"],hidden:e.hidden,title:e.title,"aria-label":e["aria-label"],type:t,onClick:f,ref:d,disabled:h||e.isLoading,children:[(e.icon||e.label)&&(0,c.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[e.icon||e.label,e.keyBindingLabel&&(0,c.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel}),e.isLoading&&(0,c.jsx)(l.Z,{})]}),e.showAriaLabel&&(0,c.jsxs)("div",{className:"ToolIcon__label",children:[e["aria-label"]," ",h&&(0,c.jsx)(l.Z,{})]}),e.children]})}return(0,c.jsxs)("label",{className:(0,o.Z)("ToolIcon",e.className),title:e.title,onPointerDown:t=>{var n;m.current=t.pointerType||null,null===(n=e.onPointerDown)||void 0===n||n.call(e,{pointerType:t.pointerType||null})},onPointerUp:()=>{requestAnimationFrame((()=>{m.current=null}))},children:[(0,c.jsx)("input",{className:"ToolIcon_type_radio ".concat(u),type:"radio",name:e.name,"aria-label":e["aria-label"],"aria-keyshortcuts":e["aria-keyshortcuts"],"data-testid":e["data-testid"],id:"".concat(n,"-").concat(e.id),onChange:()=>{var t;null===(t=e.onChange)||void 0===t||t.call(e,{pointerType:m.current})},checked:e.checked,ref:d}),(0,c.jsxs)("div",{className:"ToolIcon__icon",children:[e.icon,e.keyBindingLabel&&(0,c.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel})]})]})}));d.defaultProps={visible:!0,className:"",size:"medium"}},9910:(e,t,n)=>{"use strict";n.d(t,{bK:()=>o,Js:()=>a,u:()=>s});n(6781);var r=n(9787),i=n(1337);const o=()=>{const e=document.querySelector(".excalidraw-tooltip");if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bottom";const r=e.getBoundingClientRect(),i=window.innerWidth,o=window.innerHeight,a=5;let s,l=t.left+t.width/2-r.width/2;l<0?l=a:l+r.width>=i&&(l=i-r.width-a),"bottom"===n?(s=t.top+t.height+a,s+r.height>=o&&(s=t.top-r.height-a)):(s=t.top-r.height-a,s<0&&(s=t.top+t.height+a)),Object.assign(e.style,{top:"".concat(s,"px"),left:"".concat(l,"px")})},s=e=>{let{children:t,label:n,long:s=!1,style:l}=e;return(0,r.useEffect)((()=>()=>o().classList.remove("excalidraw-tooltip--visible")),[]),(0,i.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:e=>((e,t,n,r)=>{t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=r?"50ch":"10ch",t.style.maxWidth=r?"50ch":"15ch",t.textContent=n;const i=e.getBoundingClientRect();a(t,i)})(e.currentTarget,o(),n,s),onPointerLeave:()=>o().classList.remove("excalidraw-tooltip--visible"),style:l,children:t})}},3646:(e,t,n)=>{"use strict";n.d(t,{eQ:()=>h,p4:()=>p,a1:()=>g,po:()=>f,zD:()=>m,BR:()=>b,_I:()=>v,DG:()=>x,Rb:()=>y,TP:()=>w,kr:()=>_,vG:()=>k,$c:()=>E,GI:()=>C,Yw:()=>S,KX:()=>I,Vl:()=>T,t5:()=>j,Gc:()=>M,IN:()=>L,pw:()=>O,Ct:()=>A,HL:()=>D,xs:()=>z,mh:()=>P,uD:()=>R,W5:()=>B,ST:()=>N,gK:()=>H,rC:()=>W,xv:()=>U,op:()=>F,d9:()=>K,tP:()=>V,BF:()=>Y,RJ:()=>Z,a0:()=>G,np:()=>X,X7:()=>q,tY:()=>J,nu:()=>Q,h0:()=>$,aT:()=>ee,bf:()=>te,kM:()=>ne,W2:()=>re,wr:()=>ie,DS:()=>oe,fr:()=>ae,il:()=>se,tn:()=>le,m:()=>ce,j8:()=>de,q0:()=>ue,nq:()=>he,tW:()=>pe,OA:()=>ge,kK:()=>fe,vo:()=>me,z6:()=>be,rr:()=>ve,o3:()=>xe,oT:()=>ye,EO:()=>we,aA:()=>_e,P7:()=>ke,Nw:()=>Ee,gR:()=>Ce,rn:()=>Se,LE:()=>Ie});var r=n(9787),i=n.n(r),o=n(5284),a=n(741),s=n(8288),l=n(1337);const c=e=>e===s.C6.LIGHT?o.orange[4]:o.orange[9],d=e=>e===s.C6.LIGHT?o.white:"#1e1e1e",u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512;const{width:n=512,height:r=n,mirror:i,style:o}="number"==typeof t?{width:t}:t;return(0,l.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(n," ").concat(r),className:(0,a.Z)({"rtl-mirror":i}),style:o,children:"string"==typeof e?(0,l.jsx)("path",{fill:"currentColor",d:e}):e})},h=u((0,l.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),p=u("M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z",{mirror:!0}),g=u("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),f=u("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),m=u("M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z",{width:576,height:512,mirror:!0}),b=u("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),v=u("M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z",{width:448,height:512}),x=u("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),y=(u("M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z",{width:576,height:512,mirror:!0}),u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-187 44v-64 64z"}),(0,l.jsx)("path",{d:"M384 121.941V128H256V0h6.059c6.362 0 12.471 2.53 16.97 7.029l97.941 97.941a24.01 24.01 0 017.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"})]}),{width:576,height:512,mirror:!0})),w=u("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),_=u("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),k=u("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),E=u("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),C=u("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),S=u("M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z",{mirror:!0}),I=u("M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z",{mirror:!0}),T=u("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),j=(u("M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",{width:24,height:24}),u("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,l.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),u((0,l.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H16v8H8v4.444C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24,mirror:!0})}))),M=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:c(t),stroke:c(t),strokeWidth:"2"}),(0,l.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H9.556C8.696 8 8 8.697 8 9.556v10.888C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})})),L=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M13 21a1 1 0 001 1h7a1 1 0 001-1v-7a1 1 0 00-1-1h-3v5h-5v3zM11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h3V6h5V3z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),O=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:c(t),stroke:c(t),strokeWidth:"2"}),(0,l.jsx)("path",{d:"M11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h8V3zM22 14a1 1 0 00-1-1h-7a1 1 0 00-1 1v7a1 1 0 001 1h8v-8z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})})),A=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M 2,5 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M 6,7 C 5.446,7 5,7.446 5,8 v 9.999992 c 0,0.554 0.446,1 1,1 h 3.0000001 c 0.554,0 0.9999999,-0.446 0.9999999,-1 V 8 C 10,7.446 9.5540001,7 9.0000001,7 Z m 9,0 c -0.554,0 -1,0.446 -1,1 v 5.999992 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 V 8 C 19,7.446 18.554,7 18,7 Z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),D=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M 2,19 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"m 6,16.999992 c -0.554,0 -1,-0.446 -1,-1 V 6 C 5,5.446 5.446,5 6,5 H 9.0000001 C 9.5540001,5 10,5.446 10,6 v 9.999992 c 0,0.554 -0.4459999,1 -0.9999999,1 z m 9,0 c -0.554,0 -1,-0.446 -1,-1 V 10 c 0,-0.554 0.446,-1 1,-1 h 3 c 0.554,0 1,0.446 1,1 v 5.999992 c 0,0.554 -0.446,1 -1,1 z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),z=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M 5,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"m 7.000004,5.999996 c 0,-0.554 0.446,-1 1,-1 h 9.999992 c 0.554,0 1,0.446 1,1 v 3.0000001 c 0,0.554 -0.446,0.9999999 -1,0.9999999 H 8.000004 c -0.554,0 -1,-0.4459999 -1,-0.9999999 z m 0,9 c 0,-0.554 0.446,-1 1,-1 h 5.999992 c 0.554,0 1,0.446 1,1 v 3 c 0,0.554 -0.446,1 -1,1 H 8.000004 c -0.554,0 -1,-0.446 -1,-1 z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24})})),P=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M 19,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"m 16.999996,5.999996 c 0,-0.554 -0.446,-1 -1,-1 H 6.000004 c -0.554,0 -1,0.446 -1,1 v 3.0000001 c 0,0.554 0.446,0.9999999 1,0.9999999 h 9.999992 c 0.554,0 1,-0.4459999 1,-0.9999999 z m 0,9 c 0,-0.554 -0.446,-1 -1,-1 h -5.999992 c -0.554,0 -1,0.446 -1,1 v 3 c 0,0.554 0.446,1 1,1 h 5.999992 c 0.554,0 1,-0.446 1,-1 z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24})})),R=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M19 5V19M5 5V19",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24})})),B=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M5 5L19 5M5 19H19",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:c(t),stroke:c(t),strokeWidth:"2"})]}),{width:24})})),N=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"m 5.000004,16.999996 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -10 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z m 9,-2 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -6 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z",fill:c(t),stroke:c(t),strokeWidth:"2"}),(0,l.jsx)("path",{d:"M 2,12 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24,mirror:!0})})),H=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M 7 5 C 6.446 5 6 5.446 6 6 L 6 9 C 6 9.554 6.446 10 7 10 L 17 10 C 17.554 10 18 9.554 18 9 L 18 6 C 18 5.446 17.554 5 17 5 L 7 5 z M 9 14 C 8.446 14 8 14.446 8 15 L 8 18 C 8 18.554 8.446 19 9 19 L 15 19 C 15.554 19 16 18.554 16 18 L 16 15 C 16 14.446 15.554 14 15 14 L 9 14 z ",fill:c(t),stroke:c(t),strokeWidth:"2"}),(0,l.jsx)("path",{d:"M 12,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24})})),W=u("M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z",{width:640,height:512,mirror:!0}),U=(u("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),u("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),u("M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z",{width:352,height:512})),F=u("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),K=u("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),V=(u("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),u("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512})),Y=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,l.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,l.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsxs)("g",{fill:d(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,l.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),Z=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,l.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,l.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,l.jsxs)("g",{fill:d(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,l.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,l.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),G=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})})),X=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)("g",{fill:"var(--icon-fill-color)",fillRule:"evenodd",clipRule:"evenodd",children:[(0,l.jsx)("path",{d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z"}),(0,l.jsx)("path",{d:"M14.0001 18L3.00006 4.00002L4.5727 2.76438L15.5727 16.7644L14.0001 18ZM25.0001 18L14.0001 4.00002L15.5727 2.76438L26.5727 16.7644L25.0001 18ZM36.0001 18L25.0001 4.00002L26.5727 2.76438L37.5727 16.7644L36.0001 18Z"})]}),{width:40,height:20})})),q=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M2 2H38V18H2V2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})})),J=i().memo((e=>{let{theme:t,strokeWidth:n}=e;return u((0,l.jsx)("path",{d:"M6 10H32",stroke:"var(--icon-fill-color)",strokeWidth:n,strokeLinecap:"round",fill:"none"}),{width:40,height:20})})),Q=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),$=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"10, 8",fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),ee=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M6 10H36",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"2, 4.5",fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),te=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M3.00098 16.1691C6.28774 13.9744 19.6399 2.8905 22.7215 3.00082C25.8041 3.11113 19.1158 15.5488 21.4962 16.8309C23.8757 18.1131 34.4155 11.7148 37.0001 10.6919",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),ne=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M3 17C6.68158 14.8752 16.1296 9.09849 22.0648 6.54922C28 3.99995 22.2896 13.3209 25 14C27.7104 14.6791 36.3757 9.6471 36.3757 9.6471M6.40706 15C13 11.1918 20.0468 1.51045 23.0234 3.0052C26 4.49995 20.457 12.8659 22.7285 16.4329C25 20 36.3757 13 36.3757 13",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),re=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M3 15.6468C6.93692 13.5378 22.5544 2.81528 26.6206 3.00242C30.6877 3.18956 25.6708 15.3346 27.4009 16.7705C29.1309 18.2055 35.4001 12.4762 37 11.6177M3.97143 10.4917C6.61158 9.24563 16.3706 2.61886 19.8104 3.01724C23.2522 3.41472 22.0773 12.2013 24.6181 12.8783C27.1598 13.5536 33.3179 8.04068 35.0571 7.07244",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),ie=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M10 17L10 5L35 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),oe=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M10 17V15C10 8 13 5 21 5L33.5 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),ae=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"}),{width:40,height:20})})),se=i().memo((e=>{let{theme:t,flip:n=!1}=e;return u((0,l.jsxs)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",children:[(0,l.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,l.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})})),le=i().memo((e=>{let{theme:t,flip:n=!1}=e;return u((0,l.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,l.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,l.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})})),ce=i().memo((e=>{let{theme:t,flip:n=!1}=e;return u((0,l.jsx)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",children:(0,l.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"})}),{width:40,height:20})})),de=i().memo((e=>{let{theme:t,flip:n=!1}=e;return u((0,l.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,l.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,l.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})})),ue=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 0 69.092 L 0 55.03 A 124.24 124.24 0 0 0 4.706 57.02 Q 6.826 57.863 8.708 58.5 A 53.466 53.466 0 0 0 12.231 59.571 Q 17.236 60.889 21.387 60.889 A 20.909 20.909 0 0 0 24.265 60.704 Q 25.719 60.502 26.903 60.077 A 8.649 8.649 0 0 0 29.028 58.985 Q 31.689 57.08 31.689 53.321 Q 31.689 51.221 30.518 49.585 A 10.126 10.126 0 0 0 29.282 48.177 Q 28.352 47.287 27.075 46.436 A 23.719 23.719 0 0 0 25.752 45.627 Q 23.774 44.492 20.176 42.735 A 254.44 254.44 0 0 0 17.822 41.602 Q 11.503 38.631 8.236 35.888 A 19.742 19.742 0 0 1 8.008 35.694 A 22.18 22.18 0 0 1 2.783 29.102 Q 0.83 25.342 0.83 20.313 A 22.471 22.471 0 0 1 1.733 13.778 A 17.283 17.283 0 0 1 7.251 5.42 A 21.486 21.486 0 0 1 15.177 1.272 Q 18.361 0.338 22.166 0.09 A 43.573 43.573 0 0 1 25 0 A 42.399 42.399 0 0 1 34.349 1.01 A 39.075 39.075 0 0 1 35.62 1.319 A 67.407 67.407 0 0 1 42.108 3.382 A 83.357 83.357 0 0 1 46.191 5.03 L 41.309 16.797 Q 35.596 14.453 31.86 13.526 A 30.762 30.762 0 0 0 25.417 12.612 A 28.337 28.337 0 0 0 24.512 12.598 A 14.846 14.846 0 0 0 22.022 12.793 Q 19.498 13.224 17.92 14.6 Q 15.625 16.602 15.625 19.824 Q 15.625 21.826 16.553 23.316 Q 17.48 24.805 19.507 26.197 A 18.343 18.343 0 0 0 20.659 26.912 Q 22.596 28.035 26.516 29.953 A 299.99 299.99 0 0 0 29.102 31.201 Q 37.91 35.412 41.841 39.642 A 16.553 16.553 0 0 1 42.822 40.796 A 17.675 17.675 0 0 1 46.301 49.233 A 23.517 23.517 0 0 1 46.533 52.588 A 21.581 21.581 0 0 1 45.471 59.515 A 17.733 17.733 0 0 1 39.575 67.823 Q 33.745 72.486 24.094 73.243 A 49.683 49.683 0 0 1 20.215 73.389 A 51.712 51.712 0 0 1 9.448 72.315 A 40.672 40.672 0 0 1 0 69.092 Z"}),{width:47,height:77})})),he=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 30.225 71.387 L 13.037 15.381 L 12.598 15.381 A 1505.093 1505.093 0 0 1 12.959 22.313 Q 13.426 31.715 13.508 36.4 A 102.991 102.991 0 0 1 13.525 38.184 L 13.525 71.387 L 0 71.387 L 0 0 L 20.605 0 L 37.5 54.59 L 37.793 54.59 L 55.713 0 L 76.318 0 L 76.318 71.387 L 62.207 71.387 L 62.207 37.598 Q 62.207 35.205 62.28 32.08 A 160.703 160.703 0 0 1 62.326 30.544 Q 62.452 26.754 62.866 17.168 A 5390.536 5390.536 0 0 1 62.939 15.479 L 62.5 15.479 L 44.092 71.387 Z"}),{width:77,height:75})})),pe=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 0 71.387 L 0 0 L 15.137 0 L 15.137 58.887 L 44.092 58.887 L 44.092 71.387 Z"}),{width:45,height:75})})),ge=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 42.578 35.4 L 66.699 71.387 L 49.414 71.387 L 32.813 44.385 L 16.211 71.387 L 0 71.387 L 23.682 34.57 L 1.514 0 L 18.213 0 L 33.594 25.684 L 48.682 0 L 64.99 0 L 42.578 35.4 Z M 119.775 71.387 L 75.684 71.387 L 75.684 0 L 90.82 0 L 90.82 58.887 L 119.775 58.887 L 119.775 71.387 Z"}),{width:120,height:75})})),fe=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"}),{width:448,height:512})})),me=i().memo((e=>{let{theme:t}=e;return u((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 63.818 71.68 L 54.492 71.68 L 45.898 49.561 L 17.578 49.561 L 9.082 71.68 L 0 71.68 L 27.881 0 L 35.986 0 L 63.818 71.68 Z M 20.605 41.602 L 43.213 41.602 L 35.205 19.971 L 31.787 9.277 Q 30.322 15.137 28.711 19.971 L 20.605 41.602 Z"}),(0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 68.994 71.68 L 52.686 71.68 L 47.51 54.688 L 21.484 54.688 L 16.309 71.68 L 0 71.68 L 25.195 0 L 43.701 0 L 68.994 71.68 Z M 25.293 41.992 L 43.896 41.992 A 27590.463 27590.463 0 0 1 42.2 36.532 Q 36.965 19.676 35.937 16.273 A 120.932 120.932 0 0 1 35.815 15.869 A 131.65 131.65 0 0 1 35.396 14.435 Q 34.951 12.879 34.675 11.741 A 34.866 34.866 0 0 1 34.521 11.084 A 141.762 141.762 0 0 1 33.706 14.075 Q 31.482 21.957 25.293 41.992 Z"})]}),{width:70,height:78})})),be=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)(l.Fragment,{children:(0,l.jsx)("path",{fill:"var(--icon-fill-color)",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),{width:640,height:512})})),ve=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 00288 339.17v-38.34A12.82 12.82 0 00275.17 288H12.83A12.82 12.82 0 000 300.83v38.34A12.82 12.82 0 0012.83 352zm0-256h262.34A12.82 12.82 0 00288 83.17V44.83A12.82 12.82 0 00275.17 32H12.83A12.82 12.82 0 000 44.83v38.34A12.82 12.82 0 0012.83 96zM432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),xe=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zM108.1 96h231.81A12.09 12.09 0 00352 83.9V44.09A12.09 12.09 0 00339.91 32H108.1A12.09 12.09 0 0096 44.09V83.9A12.1 12.1 0 00108.1 96zm231.81 256A12.09 12.09 0 00352 339.9v-39.81A12.09 12.09 0 00339.91 288H108.1A12.09 12.09 0 0096 300.09v39.81a12.1 12.1 0 0012.1 12.1z",fill:"var(--icon-fill-color)"}),{width:448,height:512})})),ye=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M16 224h416a16 16 0 0016-16v-32a16 16 0 00-16-16H16a16 16 0 00-16 16v32a16 16 0 0016 16zm416 192H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm3.17-384H172.83A12.82 12.82 0 00160 44.83v38.34A12.82 12.82 0 00172.83 96h262.34A12.82 12.82 0 00448 83.17V44.83A12.82 12.82 0 00435.17 32zm0 256H172.83A12.82 12.82 0 00160 300.83v38.34A12.82 12.82 0 00172.83 352h262.34A12.82 12.82 0 00448 339.17v-38.34A12.82 12.82 0 00435.17 288z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),we=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"m16,132l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16zm0,160l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),_e=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{d:"M16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292ZM16,452L432,452C440.837,452 448,444.837 448,436L448,396C448,387.163 440.837,380 432,380L16,380C7.163,380 0,387.163 0,396L0,436C0,444.837 7.163,452 16,452Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),ke=i().memo((e=>{let{theme:t}=e;return u((0,l.jsx)("path",{transform:"matrix(1,0,0,1,0,80)",d:"M16,132L432,132C440.837,132 448,124.837 448,116L448,76C448,67.163 440.837,60 432,60L16,60C7.163,60 0,67.163 0,76L0,116C0,124.837 7.163,132 16,132ZM16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),Ee=u((0,l.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),Ce=u((0,l.jsx)("path",{fill:"currentColor",d:"M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"}),{width:640,height:512}),Se=u((0,l.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),Ie=u("M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z")},8288:(e,t,n)=>{"use strict";n.d(t,{iC:()=>o,f:()=>a,qx:()=>s,Iw:()=>l,$e:()=>c,wZ:()=>d,ay:()=>u,oc:()=>h,Oh:()=>p,Ks:()=>g,Vi:()=>f,$C:()=>m,ut:()=>b,C6:()=>v,_D:()=>x,n5:()=>y,rk:()=>w,Hg:()=>_,hs:()=>k,k:()=>E,LO:()=>C,r8:()=>S,pb:()=>I,LL:()=>T,Gj:()=>j,nM:()=>M,HM:()=>L,V4:()=>O,sA:()=>A,EH:()=>D,ZF:()=>z,UO:()=>P,ah:()=>R,cW:()=>B,eF:()=>N,kV:()=>H,sS:()=>W,Yx:()=>U,sk:()=>F,EE:()=>K,zK:()=>V,ZB:()=>Y,qy:()=>Z,h6:()=>G,jo:()=>X,$n:()=>q,hR:()=>J,Kr:()=>Q,gK:()=>$,oX:()=>ee,xY:()=>te});var r=n(8635),i=n.n(r);const o="Excalidraw",a=10,s=8,l=5,c=1,d=30,u=Math.PI/12,h={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},p={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};let g;!function(e){e.COPY="copy",e.PASTE="paste",e.CUT="cut",e.KEYDOWN="keydown",e.KEYUP="keyup",e.MOUSE_MOVE="mousemove",e.RESIZE="resize",e.UNLOAD="unload",e.FOCUS="focus",e.BLUR="blur",e.DRAG_OVER="dragover",e.DROP="drop",e.GESTURE_END="gestureend",e.BEFORE_UNLOAD="beforeunload",e.GESTURE_START="gesturestart",e.GESTURE_CHANGE="gesturechange",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.STATE_CHANGE="statechange",e.WHEEL="wheel",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.HASHCHANGE="hashchange",e.VISIBILITY_CHANGE="visibilitychange",e.SCROLL="scroll",e.EXCALIDRAW_LINK="excalidraw-link"}(g||(g={}));const f={TEST:"test",DEVELOPMENT:"development"},m={SHAPE_ACTIONS_MENU:"App-menu__left"},b={Virgil:1,Helvetica:2,Cascadia:3},v={LIGHT:"light",DARK:"dark"},x="Segoe UI Emoji",y=20,w=b.Virgil,_="left",k="top",E=20,C={excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",json:"application/json",svg:"image/svg+xml","excalidraw.svg":"image/svg+xml",png:"image/png","excalidraw.png":"image/png",jpg:"image/jpeg",gif:"image/gif",binary:"application/octet-stream"},S={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},I=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,T=500,j=300,M=500,L=100,O=.1,A=300,D={VIEW:"viewMode",ZEN:"zenMode",GRID:"gridMode"},z=i().themeFilter,P={addLibrary:"addLibrary"},R={addLibrary:"addLibrary"},B={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,theme:!0,saveAsImage:!0}},N=640,H=800,W=1e3,U=500,F=1229,K=parseInt(i().rightSidebarWidth),V=2,Y=[1,2,3],Z=10,G=1440,X=[C.png,C.jpg,C.svg,C.gif],q=2097152,J="http://www.w3.org/2000/svg",Q={excalidraw:2,excalidrawLibrary:2},$=5,ee={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},te=20},434:(e,t,n)=>{"use strict";n.d(t,{Qk:()=>f,DQ:()=>m,g8:()=>b,Wr:()=>v,ZY:()=>x,cT:()=>y,wf:()=>w,lV:()=>_,_c:()=>k,tW:()=>E,Sf:()=>C,KG:()=>S,Tu:()=>I,Pn:()=>T,bv:()=>j,gY:()=>A,vZ:()=>D});var r=n(6612),i=n(8897),o=n(8288),a=n(5118),s=n(7968),l=n(5202),c=n(75),d=n(6340),u=n(1393),h=n(5523),p=n(679);const g=async e=>{let t;if(e.type===o.LO.png)try{return await(await Promise.resolve().then(n.bind(n,673))).decodePngMetadata(e)}catch(e){throw"INVALID"===e.message?new DOMException((0,l.t)("alerts.imageDoesNotContainScene"),"EncodingError"):new DOMException((0,l.t)("alerts.cannotRestoreFromImage"),"EncodingError")}else if(t="text"in Blob?await e.text():await new Promise((t=>{const n=new FileReader;n.readAsText(e,"utf8"),n.onloadend=()=>{n.readyState===FileReader.DONE&&t(n.result)}})),e.type===o.LO.svg)try{return await(await Promise.resolve().then(n.bind(n,673))).decodeSvgMetadata({svg:t})}catch(e){throw"INVALID"===e.message?new DOMException((0,l.t)("alerts.imageDoesNotContainScene"),"EncodingError"):new DOMException((0,l.t)("alerts.cannotRestoreFromImage"),"EncodingError")}return t},f=e=>{var t;return e&&(null===(t=e.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===t?void 0:t[1])||null},m=e=>"png"===e||"svg"===e,b=e=>{const t=f(e);return"png"===t||"svg"===t},v=e=>{const{type:t}=e||{};return!!t&&o.jo.includes(t)},x=async(e,t,n,r)=>{const s=await g(e);try{const d=JSON.parse(s);if((0,h.dS)(d))return{type:o.LO.excalidraw,data:(0,p.nu)({elements:(0,a._M)(d.elements||[]),appState:Object.assign(Object.assign({theme:null==t?void 0:t.theme,fileHandle:r||e.handle||null},(0,i.s)(d.appState||{})),t?(0,c.W)(d.elements||[],t,null):{}),files:d.files},t,n)};if((0,h.HT)(d))return{type:o.LO.excalidrawlib,data:d};throw new Error((0,l.t)("alerts.couldNotLoadInvalidFile"))}catch(e){throw console.error(e.message),new Error((0,l.t)("alerts.couldNotLoadInvalidFile"))}},y=async(e,t,n,r)=>{const i=await x(e,t,n,r);if(i.type!==o.LO.excalidraw)throw new Error((0,l.t)("alerts.couldNotLoadInvalidFile"));return i.data},w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished";const n=JSON.parse(e);if(!(0,h.HT)(n))throw new Error("Invalid library");const r=n.libraryItems||n.library;return(0,p.wJ)(r,t)},_=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished";return w(await g(e),t)},k=async e=>new Promise(((t,n)=>{try{e.toBlob((e=>{if(!e)return n(new s.l((0,l.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));t(e)}))}catch(e){n(e)}})),E=async e=>{try{const t=await window.crypto.subtle.digest("SHA-1",await D(e));return(0,d.G3)(new Uint8Array(t))}catch(e){return console.error(e),(0,r.x0)(40)}},C=async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const e=r.result;t(e)},r.onerror=e=>n(e),r.readAsDataURL(e)})),S=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.indexOf(","),r=atob(e.slice(n+1)),i=e.slice(0,n).split(":")[1].split(";")[0],o=new ArrayBuffer(r.length),a=new Uint8Array(o);for(let e=0;e<r.length;e++)a[e]=r.charCodeAt(e);return new File([o],t,{type:i})},I=async(e,t)=>{if(e.type===o.LO.svg)return e;const[r,i]=await Promise.all([n.e(736).then(n.t.bind(n,1852,23)).then((e=>e.default)),n.e(736).then(n.bind(n,1149)).then((e=>e.default))]),a=i({pica:r({features:["js","wasm"]})});if(t.outputType){const{outputType:e}=t;a._create_blob=function(t){return this.pica.toBlob(t.out_canvas,e,.8).then((e=>(t.out_blob=e,t)))}}if(!v(e))throw new Error((0,l.t)("errors.unsupportedFileType"));return new File([await a.toBlob(e,{max:t.maxWidthOrHeight})],e.name,{type:t.outputType||e.type})},T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(e)],t,{type:o.LO.svg})},j=async e=>{const t=e.dataTransfer.files.item(0),n=await M(e);return{file:t?await A(t):null,fileHandle:n}},M=async e=>{if(u.kr)try{const t=e.dataTransfer.items[0];return await t.getAsFileSystemHandle()||null}catch(e){return console.warn(e.name,e.message),null}return null},L=e=>{let t=null;const n="".concat([...new Uint8Array(e).slice(0,8)].join(" ")," "),r="255 216 255 ",i="71 73 70 56 57 97 ";return n==="137 80 78 71 13 10 26 10 "?t=o.LO.png:n.startsWith(r)?t=o.LO.jpg:n.startsWith(i)&&(t=o.LO.gif),t},O=(e,t,n)=>new File([e],n||"",{type:t}),A=async e=>{var t,n,r,i;if(e.type){if(v(e)){const t=await D(e),n=L(t);n&&n!==e.type&&(e=O(t,n,e.name))}}else if(null!==(t=e)&&void 0!==t&&null!==(n=t.name)&&void 0!==n&&n.endsWith(".excalidrawlib"))e=O(await D(e),o.LO.excalidrawlib,e.name);else if(null!==(r=e)&&void 0!==r&&null!==(i=r.name)&&void 0!==i&&i.endsWith(".excalidraw"))e=O(await D(e),o.LO.excalidraw,e.name);else{const t=await D(e),n=L(t);n&&(e=O(t,n,e.name))}return e},D=e=>"arrayBuffer"in e?e.arrayBuffer():new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var r;if(null===(r=e.target)||void 0===r||!r.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(e.target.result)},r.readAsArrayBuffer(e)}))},1393:(e,t,n)=>{"use strict";n.d(t,{I$:()=>c,NL:()=>d,kr:()=>r});const r=(()=>{if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),i=r?n.e(736).then(n.bind(n,2254)):n.e(736).then(n.bind(n,3499));r?n.e(736).then(n.bind(n,6474)):n.e(736).then(n.bind(n,9521));const o=r?n.e(736).then(n.bind(n,9475)):n.e(736).then(n.bind(n,6281));var a=n(8288),s=n(7968),l=n(6340);const c=e=>{var t,n,r;const o=null===(t=e.extensions)||void 0===t?void 0:t.reduce(((e,t)=>(e.push(a.LO[t]),e)),[]),c=null===(n=e.extensions)||void 0===n?void 0:n.reduce(((e,t)=>"jpg"===t?e.concat(".jpg",".jpeg"):e.concat(".".concat(t))),[]);return async function(){return(await i).default(...arguments)}({description:e.description,extensions:c,mimeTypes:o,multiple:null!==(r=e.multiple)&&void 0!==r&&r,legacySetup:(t,n,r)=>{const i=(0,l.Ds)(n,500),o=()=>{c(),document.addEventListener(a.Ks.KEYUP,i),document.addEventListener(a.Ks.POINTER_UP,i),i()},c=()=>{var n;if(null!==(n=r.files)&&void 0!==n&&n.length){const n=e.multiple?[...r.files]:r.files[0];t(n)}};requestAnimationFrame((()=>{window.addEventListener(a.Ks.FOCUS,o)}));const d=window.setInterval((()=>{c()}),500);return e=>{clearInterval(d),i.cancel(),window.removeEventListener(a.Ks.FOCUS,o),document.removeEventListener(a.Ks.KEYUP,i),document.removeEventListener(a.Ks.POINTER_UP,i),e&&(console.warn("Opening the file was canceled (legacy-fs)."),e(new s._))}}})},d=(e,t)=>async function(){return(await o).default(...arguments)}(e,{fileName:"".concat(t.name,".").concat(t.extension),description:t.description,extensions:[".".concat(t.extension)]},t.fileHandle)},673:(e,t,n)=>{"use strict";n.r(t),n.d(t,{decodePngMetadata:()=>v,decodeSvgMetadata:()=>y,encodePngMetadata:()=>b,encodeSvgMetadata:()=>x,getTEXtChunk:()=>m});var r=n(9567),i=n.n(r),o=n(6927),a=n(3070),s=n.n(a),l=n(6934),c=n(8288),d=n(434);const u=e=>new Promise(((t,n)=>{const r="string"==typeof e?new Blob([(new TextEncoder).encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),i=new FileReader;i.onload=e=>{if(!e.target||"string"!=typeof e.target.result)return n(new Error("couldn't convert to byte string"));t(e.target.result)},i.readAsBinaryString(r)})),h=e=>{const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0,r=e.length;t<r;t++)n[t]=e.charCodeAt(t);return t},p=e=>new TextDecoder("utf-8").decode(h(e)),g=async e=>{let t,{text:n,compress:r}=e;if(!1!==r)try{t=await u((0,l.deflate)(n))}catch(e){console.error("encode: cannot deflate",e)}return{version:"1",encoding:"bstring",compressed:!!t,encoded:t||await u(n)}},f=async e=>{let t;if("bstring"!==e.encoding)throw new Error('decode: unknown encoding "'.concat(e.encoding,'"'));return t=e.compressed?e.encoded:await p(e.encoded),e.compressed?(0,l.inflate)(new Uint8Array(h(t)),{to:"string"}):t};const m=async e=>{const t=i()(new Uint8Array(await(0,d.vZ)(e))).find((e=>"tEXt"===e.name));return t?o.decode(t.data):null},b=async e=>{let{blob:t,metadata:n}=e;const r=i()(new Uint8Array(await(0,d.vZ)(t))),a=o.encode(c.LO.excalidraw,JSON.stringify(await g({text:n,compress:!0})));return r.splice(-1,0,a),new Blob([s()(r)],{type:c.LO.png})},v=async e=>{const t=await m(e);if((null==t?void 0:t.keyword)===c.LO.excalidraw)try{const e=JSON.parse(t.text);if(!("encoded"in e)){if("type"in e&&e.type===c.r8.excalidraw)return t.text;throw new Error("FAILED")}return await f(e)}catch(e){throw console.error(e),new Error("FAILED")}throw new Error("INVALID")},x=async e=>{let{text:t}=e;const n=await async function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?window.btoa(e):window.btoa(await u(e))}(JSON.stringify(await g({text:t})),!0);let r="";return r+="\x3c!-- payload-type:".concat(c.LO.excalidraw," --\x3e"),r+="\x3c!-- payload-version:2 --\x3e",r+="\x3c!-- payload-start --\x3e",r+=n,r+="\x3c!-- payload-end --\x3e",r},y=async e=>{let{svg:t}=e;if(t.includes("payload-type:".concat(c.LO.excalidraw))){const e=t.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/);if(!e)throw new Error("INVALID");const n=t.match(/<!-- payload-version:(\d+) -->/),r="1"!==((null==n?void 0:n[1])||"1");try{const t=await async function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?window.atob(e):p(window.atob(e))}(e[1],r),n=JSON.parse(t);if(!("encoded"in n)){if("type"in n&&n.type===c.r8.excalidraw)return t;throw new Error("FAILED")}return await f(n)}catch(e){throw console.error(e),new Error("FAILED")}}throw new Error("INVALID")}},5523:(e,t,n)=>{"use strict";n.d(t,{I_:()=>c,Um:()=>d,n8:()=>u,dS:()=>h,HT:()=>p,NI:()=>g,t1:()=>f});var r=n(1393),i=n(8897),o=n(8288),a=n(5118),s=n(434);const l=(e,t)=>{const n={};for(const r of e)!r.isDeleted&&"fileId"in r&&r.fileId&&t[r.fileId]&&(n[r.fileId]=t[r.fileId]);return n},c=(e,t,n,r)=>{const s={type:o.r8.excalidraw,version:o.Kr.excalidraw,source:o.pb,elements:"local"===r?(0,a._M)(e):(0,a.BQ)(e),appState:"local"===r?(0,i.s)(t):(0,i.eS)(t),files:"local"===r?l(e,n):void 0};return JSON.stringify(s,null,2)},d=async(e,t,n)=>{const i=c(e,t,n,"local"),a=new Blob([i],{type:o.LO.excalidraw});return{fileHandle:await(0,r.NL)(a,{name:t.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,s.g8)(t.fileHandle)?null:t.fileHandle})}},u=async(e,t)=>{const n=await(0,r.I$)({description:"Excalidraw files"});return(0,s.cT)(await(0,s.gY)(n),e,t,n.handle)},h=e=>(null==e?void 0:e.type)===o.r8.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||"object"==typeof e.appState)),p=e=>"object"==typeof e&&e&&e.type===o.r8.excalidrawLibrary&&(1===e.version||2===e.version),g=e=>{const t={type:o.r8.excalidrawLibrary,version:o.Kr.excalidrawLibrary,source:o.pb,libraryItems:e};return JSON.stringify(t,null,2)},f=async e=>{const t=g(e);await(0,r.NL)(new Blob([t],{type:o.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"})}},7053:(e,t,n)=>{"use strict";n.d(t,{rF:()=>h,zh:()=>f,ZP:()=>m,WV:()=>b,Di:()=>v,xS:()=>x});var r=n(434),i=n(679),o=n(6131),a=n(9487),s=n(8925),l=n(7968),c=n(5202),d=n(9787),u=n(8288);const h=(0,o.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),p=e=>JSON.parse(JSON.stringify(e)),g=(e,t)=>!e.find((e=>e.elements.length===t.elements.length&&e.elements.every(((e,n)=>e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce)))),f=(e,t)=>{const n=[];for(const r of t)g(e,r)&&n.push(r);return[...n,...e]};const m=class{constructor(e){this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=()=>this.updateQueue[this.updateQueue.length-1],this.notifyListeners=()=>{if(this.updateQueue.length>0)a.e_.set(h,{status:"loading",libraryItems:this.lastLibraryItems,isInitialized:this.isInitialized});else{this.isInitialized=!0,a.e_.set(h,{status:"loaded",libraryItems:this.lastLibraryItems,isInitialized:this.isInitialized});try{var e,t;null===(e=(t=this.app.props).onLibraryChange)||void 0===e||e.call(t,p(this.lastLibraryItems))}catch(e){console.error(e)}}},this.resetLibrary=()=>this.setLibrary([]),this.getLatestLibrary=()=>new Promise((async e=>{try{const t=await(this.getLastUpdateTask()||this.lastLibraryItems);this.updateQueue.length>0?e(this.getLatestLibrary()):e(p(t))}catch(t){return e(this.lastLibraryItems)}})),this.updateLibrary=async e=>{let{libraryItems:t,prompt:n=!1,merge:o=!1,openLibraryMenu:a=!1,defaultStatus:s="unpublished"}=e;return a&&this.app.setState({isLibraryOpen:!0}),this.setLibrary((()=>new Promise((async(e,a)=>{try{const d=await("function"==typeof t?t(this.lastLibraryItems):t);let u;u=d instanceof Blob?await(0,r.lV)(d,s):(0,i.wJ)(d,s),!n||window.confirm((0,c.t)("alerts.confirmAddLibrary",{numShapes:u.length}))?e(o?f(this.lastLibraryItems,u):u):a(new l._)}catch(e){a(e)}})))).finally((()=>{this.app.focusContainer()}))},this.setLibrary=e=>{const t=new Promise((async(t,n)=>{try{await this.getLastUpdateTask(),"function"==typeof e&&(e=e(this.lastLibraryItems)),this.lastLibraryItems=p(await e),t(this.lastLibraryItems)}catch(e){n(e)}})).catch((e=>{if("AbortError"===e.name)return console.warn("Library update aborted by user"),this.lastLibraryItems;throw e})).finally((()=>{this.updateQueue=this.updateQueue.filter((e=>e!==t)),this.notifyListeners()}));return this.updateQueue.push(t),this.notifyListeners(),t},this.app=e}},b=e=>{const t=Math.ceil(Math.sqrt(e.length)),n=[],r=n=>e.slice(n*t,n*t+t).reduce(((e,t)=>{const{height:n}=(0,s.v2)(t.elements);return Math.max(e,n)}),0),i=n=>{let r=0,i=0,o=0;for(const a of e){if(r%t==0&&(i=0),i===n){const{width:e}=(0,s.v2)(a.elements);o=Math.max(o,e)}r++,i++}return o};let o=0,a=0,l=0,c=0,d=0,u=0,h=0;for(const p of e){d&&d%t==0&&(a+=l+50,o=0,u=0,h++),0===u&&(l=r(h)),c=i(u);const{minX:e,minY:g,width:f,height:m}=(0,s.v2)(p.elements),b=(c-f)/2,v=(l-m)/2;n.push(...p.elements.map((t=>Object.assign(Object.assign({},t),{x:t.x+o+b-e,y:t.y+a+v-g})))),o+=c+50,d++,u++}return n},v=()=>{const e=new URLSearchParams(window.location.hash.slice(1)).get(u.ah.addLibrary)||new URLSearchParams(window.location.search).get(u.UO.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},x=e=>{let{excalidrawAPI:t,getInitialLibraryItems:n}=e;const r=(0,d.useRef)(n);(0,d.useEffect)((()=>{if(!t)return;const e=e=>{let{libraryUrl:n,idToken:r}=e;if(window.location.hash.includes(u.ah.addLibrary)){const e=new URLSearchParams(window.location.hash.slice(1));e.delete(u.ah.addLibrary),window.history.replaceState({},u.iC,"#".concat(e.toString()))}else if(window.location.search.includes(u.UO.addLibrary)){const e=new URLSearchParams(window.location.search);e.delete(u.UO.addLibrary),window.history.replaceState({},u.iC,"?".concat(e.toString()))}t.updateLibrary({libraryItems:new Promise((async(e,t)=>{try{const t=await fetch(decodeURIComponent(n));e(await t.blob())}catch(e){t(e)}})),prompt:r!==t.id,merge:!0,defaultStatus:"published",openLibraryMenu:!0})},n=t=>{t.preventDefault();const n=v();n&&(t.stopImmediatePropagation(),window.history.replaceState({},"",t.oldURL),e(n))};r.current&&t.updateLibrary({libraryItems:r.current()});const i=v();return i&&e(i),window.addEventListener(u.Ks.HASHCHANGE,n),()=>{window.removeEventListener(u.Ks.HASHCHANGE,n)}}),[t])}},679:(e,t,n)=>{"use strict";n.d(t,{ET:()=>g,lY:()=>f,nu:()=>m,wJ:()=>v});var r=n(5118),i=n(1974),o=n(6954),a=n(8288),s=n(8897),l=n(6938),c=n(1935),d=n(6340);const u={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0},h=(e,t)=>{var n,a,s,l,c,u,h,p,g,f,m,b,v,x,y;const w={type:t.type||e.type,version:e.version||1,versionNonce:null!==(n=e.versionNonce)&&void 0!==n?n:0,isDeleted:null!==(a=e.isDeleted)&&void 0!==a&&a,id:e.id||(0,o.kb)(),fillStyle:e.fillStyle||"hachure",strokeWidth:e.strokeWidth||1,strokeStyle:null!==(s=e.strokeStyle)&&void 0!==s?s:"solid",roughness:null!==(l=e.roughness)&&void 0!==l?l:1,opacity:null==e.opacity?100:e.opacity,angle:e.angle||0,x:null!==(c=null!==(u=t.x)&&void 0!==u?u:e.x)&&void 0!==c?c:0,y:null!==(h=null!==(p=t.y)&&void 0!==p?p:e.y)&&void 0!==h?h:0,strokeColor:e.strokeColor,backgroundColor:e.backgroundColor,width:e.width||0,height:e.height||0,seed:null!==(g=e.seed)&&void 0!==g?g:1,groupIds:null!==(f=e.groupIds)&&void 0!==f?f:[],strokeSharpness:null!==(m=e.strokeSharpness)&&void 0!==m?m:(0,i.dt)(e.type)?"round":"sharp",boundElements:e.boundElementIds?e.boundElementIds.map((e=>({type:"arrow",id:e}))):null!==(b=e.boundElements)&&void 0!==b?b:[],updated:null!==(v=e.updated)&&void 0!==v?v:(0,d.C3)(),link:null!==(x=e.link)&&void 0!==x?x:null,locked:null!==(y=e.locked)&&void 0!==y&&y};return Object.assign(Object.assign(Object.assign({},w),(0,r.Qp)(w)),t)},p=e=>{var t,n,r;switch(e.type){case"text":let i=e.fontSize,o=e.fontFamily;if("font"in e){const[t,n]=e.font.split(" ");i=parseInt(t,10),r=n,o=Object.keys(a.ut).includes(r)?a.ut[r]:a.rk}return h(e,{fontSize:i,fontFamily:o,text:null!==(t=e.text)&&void 0!==t?t:"",baseline:e.baseline,textAlign:e.textAlign||a.Hg,verticalAlign:e.verticalAlign||a.hs,containerId:null!==(n=e.containerId)&&void 0!==n?n:null,originalText:e.originalText||e.text});case"freedraw":return h(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return h(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":case"arrow":{const{startArrowhead:t=null,endArrowhead:n=("arrow"===e.type?"arrow":null)}=e;let r=e.x,i=e.y,o=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;return 0===o[0][0]&&0===o[0][1]||({points:o,x:r,y:i}=l._.getNormalizedPoints(e)),h(e,{type:"draw"===e.type?"line":e.type,startBinding:e.startBinding,endBinding:e.endBinding,lastCommittedPoint:null,startArrowhead:t,endArrowhead:n,points:o,x:r,y:i})}case"ellipse":case"rectangle":case"diamond":return h(e,{})}},g=(e,t)=>{const n=t?(0,d.xn)(t):null;return(e||[]).reduce(((e,t)=>{if("selection"!==t.type&&!(0,r.QD)(t)){let r=p(t);if(r){const i=null==n?void 0:n.get(t.id);i&&i.version>r.version&&(r=(0,c.ZP)(r,i.version)),e.push(r)}}return e}),[])},f=(e,t)=>{var n,r,i;e=e||{};const o=(0,s.im)(),a={};for(const[n,r]of Object.entries(o)){const i=e[n],o=t?t[n]:void 0;a[n]=void 0!==i?i:void 0!==o?o:r}return Object.assign(Object.assign({},a),{cursorButton:(null==t?void 0:t.cursorButton)||"up",penDetected:null!==(n=null==t?void 0:t.penDetected)&&void 0!==n?n:!!e.penMode&&(null!==(r=e.penDetected)&&void 0!==r&&r),activeTool:Object.assign(Object.assign({},(0,d.Om)(o,a.activeTool.type&&u[a.activeTool.type]?a.activeTool:{type:"selection"})),{lastActiveToolBeforeEraser:null,locked:null!==(i=a.activeTool.locked)&&void 0!==i&&i}),zoom:"number"==typeof e.zoom?{value:e.zoom}:e.zoom||o.zoom,isLibraryOpen:!!a.isLibraryMenuDocked&&a.isLibraryOpen})},m=(e,t,n)=>({elements:g(null==e?void 0:e.elements,n),appState:f(null==e?void 0:e.appState,t||null),files:(null==e?void 0:e.files)||{}}),b=e=>{const t=g((0,r.Lm)(e.elements),null);return t.length?Object.assign(Object.assign({},e),{elements:t}):null},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n=[];for(const r of e)if(Array.isArray(r)){const e=b({status:t,elements:r,id:(0,o.kb)(),created:Date.now()});e&&n.push(e)}else{const e=r,i=b(Object.assign(Object.assign({},e),{id:e.id||(0,o.kb)(),status:e.status||t,created:e.created||Date.now()}));i&&n.push(i)}return n}},2383:(e,t,n)=>{"use strict";n.d(t,{rj:()=>w,nW:()=>k,$u:()=>C,q$:()=>S,nz:()=>I,sw:()=>j,wq:()=>M,Pp:()=>O,lV:()=>D});var r=n(6340),i=n(1935),o=n(7901),a=n(1319),s=n(3646),l=n(5202),c=n(9787),d=n(741),u=n(6066),h=n(6202),p=n(6552),g=n(8288),f=n(9910),m=n(75),b=n(2325),v=n(5118),x=(n(4404),n(7047)),y=n(1337);const w=document.createElement("img");w.src="data:".concat(g.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));let _=!1;const k=e=>{let{element:t,appState:n,setAppState:o,onLinkOpen:h}=e;const p=t.link||"",[f,m]=(0,c.useState)(p),b=(0,c.useRef)(null),v="editor"===n.showHyperlinkPopup||!p,w=(0,c.useCallback)((()=>{if(!b.current)return;const e=C(b.current.value);!t.link&&e&&(0,x.L)("hyperlink","create"),(0,i.DR)(t,{link:e}),o({showHyperlinkPopup:"info"})}),[t,o]);(0,c.useLayoutEffect)((()=>()=>{w()}),[w]),(0,c.useEffect)((()=>{let e=null;const r=r=>{if(v)return;e&&clearTimeout(e);z(t,n,[r.clientX,r.clientY])&&(e=window.setTimeout((()=>{o({showHyperlinkPopup:!1})}),500))};return window.addEventListener(g.Ks.POINTER_MOVE,r,!1),()=>{window.removeEventListener(g.Ks.POINTER_MOVE,r,!1),e&&clearTimeout(e)}}),[n,t,v,o]);const _=(0,c.useCallback)((()=>{(0,x.L)("hyperlink","delete"),(0,i.DR)(t,{link:null}),v&&(b.current.value=""),o({showHyperlinkPopup:!1})}),[o,t,v]),{x:k,y:I}=E(t,n);return n.draggingElement||n.resizingElement||n.isRotating||n.openMenu?null:(0,y.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(I,"px"),left:"".concat(k,"px"),width:320,padding:5},children:[v?(0,y.jsx)("input",{className:(0,d.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:b,value:f,onChange:e=>m(e.target.value),autoFocus:!0,onKeyDown:e=>{e.stopPropagation(),e[u.tW.CTRL_OR_CMD]&&e.key===u.tW.K&&e.preventDefault(),e.key!==u.tW.ENTER&&e.key!==u.tW.ESCAPE||w()}}):(0,y.jsx)("a",{href:t.link||"",className:(0,d.Z)("excalidraw-hyperlinkContainer-link",{"d-none":v}),target:S(t.link)?"_self":"_blank",onClick:e=>{if(t.link&&h){const n=(0,r.ag)(g.Ks.EXCALIDRAW_LINK,e.nativeEvent);h(t,n),n.defaultPrevented&&e.preventDefault()}},rel:"noopener noreferrer",children:t.link}),(0,y.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!v&&(0,y.jsx)(a.V,{type:"button",title:(0,l.t)("buttons.edit"),"aria-label":(0,l.t)("buttons.edit"),label:(0,l.t)("buttons.edit"),onClick:()=>{(0,x.L)("hyperlink","edit","popup-ui"),o({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:s.gR}),p&&(0,y.jsx)(a.V,{type:"button",title:(0,l.t)("buttons.remove"),"aria-label":(0,l.t)("buttons.remove"),label:(0,l.t)("buttons.remove"),onClick:_,className:"excalidraw-hyperlinkContainer--remove",icon:s._I})]})]})},E=(e,t)=>{const[n,i]=(0,v.qf)(e),{x:o,y:a}=(0,r._i)({sceneX:n+e.width/2,sceneY:i},t);return{x:o-t.offsetLeft-160,y:a-t.offsetTop-85}},C=e=>((e=e.trim())&&(e.includes("://")||/^[[\\/]/.test(e)||(e="https://".concat(e))),e),S=e=>!!(null!=e&&e.includes(location.origin)||null!=e&&e.startsWith("/")),I=(0,o.z)({name:"hyperlink",perform:(e,t)=>"editor"!==t.showHyperlinkPopup&&{elements:e,appState:Object.assign(Object.assign({},t),{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[u.tW.CTRL_OR_CMD]&&e.key===u.tW.K,contextItemLabel:(e,t)=>T(e,t),contextItemPredicate:(e,t)=>1===(0,m.eD)(e,t).length,PanelComponent:e=>{let{elements:t,appState:n,updateData:i}=e;const o=(0,m.eD)(t,n);return(0,y.jsx)(a.V,{type:"button",icon:s.p4,"aria-label":(0,l.t)(T(t,n)),title:"".concat((0,l.t)("labels.link.label")," - ").concat((0,r.uY)("CtrlOrCmd+K")),onClick:()=>i(null),selected:1===o.length&&!!o[0].link})}}),T=(e,t)=>(0,m.eD)(e,t)[0].link?"labels.link.edit":"labels.link.create",j=(e,t,n)=>{let[r,i,o,a]=e;const s=h.Dn,l=s/n.zoom.value,c=s/n.zoom.value,d=s/n.zoom.value,u=(r+o)/2,g=(i+a)/2,f=(s-8)/(2*n.zoom.value),m=4/n.zoom.value,b=o+m-f,v=i-m-d+f,[x,y]=(0,p.U1)(b+l/2,v+c/2,u,g,t);return[x-l/2,y-c/2,l,c]},M=(e,t,n,r)=>{let[i,o]=n;if(!e.link||t.selectedElementIds[e.id])return!1;const a=4/t.zoom.value;if(!r&&t.viewModeEnabled&&(0,b.pX)(e,[i,o],a))return!0;const[s,l,c,d]=(0,v.qf)(e),[u,h,p,g]=j([s,l,c,d],e.angle,t);return i>u-a&&i<u+a+p&&o>h-a&&o<h+g+a};let L=null;const O=(e,t)=>{L&&clearTimeout(L),L=window.setTimeout((()=>A(e,t)),g.sA)},A=(e,t)=>{if(!e.link)return;const n=(0,f.bK)();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=e.link;const[i,o,a,s]=(0,v.qf)(e),[l,c,d,u]=j([i,o,a,s],e.angle,t),h=(0,r._i)({sceneX:l,sceneY:c},t);(0,f.Js)(n,{left:h.x,top:h.y,width:d,height:u},"top"),(0,x.L)("hyperlink","tooltip","link-icon"),_=!0},D=()=>{L&&clearTimeout(L),_&&(_=!1,(0,f.bK)().classList.remove("excalidraw-tooltip--visible"))},z=(e,t,n)=>{let[i,o]=n;const{x:a,y:s}=(0,r.dE)({clientX:i,clientY:o},t),l=15/t.zoom.value;if((0,b.pX)(e,[a,s],l))return!1;const[c,d,u]=(0,v.qf)(e);if(a>=c&&a<=u&&s>=d-85&&s<=d)return!1;const{x:h,y:p}=E(e,t);return!(i>=h-l&&i<=h+320+10+l&&o>=p-l&&o<=p+l+10+42)}},8290:(e,t,n)=>{"use strict";n.d(t,{cz:()=>u,N1:()=>h,HG:()=>g,el:()=>m,R:()=>v,DK:()=>w,H:()=>_,Y9:()=>E,Ww:()=>S,ZB:()=>L,ek:()=>R,$q:()=>N});var r=n(75),i=n(1974),o=n(2325),a=n(1935),s=n(1564),l=n(6938),c=n(6340),d=n(6066);const u=e=>!e[d.tW.CTRL_OR_CMD],h=e=>e.isBindingEnabled,p=(e,t)=>{const n=[];return t.forEach((t=>{const r=e.getNonDeletedElement(t);null!=r&&n.push(r)})),n},g=(e,t,n)=>{const r=new Set,i=new Set;f(e,t,n,"start",r,i),f(e,n,t,"end",r,i);const o=Array.from(i).filter((e=>!r.has(e)));p(s.Z.getScene(e),o).forEach((t=>{var n;(0,a.DR)(t,{boundElements:null===(n=t.boundElements)||void 0===n?void 0:n.filter((t=>"arrow"!==t.type||t.id!==e.id))})}))},f=(e,t,n,r,i,o)=>{if("keep"!==t)if(null!=t)null!=n&&("keep"===n?y(e,t,r):"start"!==r&&n.id===t.id)||(x(e,t,r),i.add(t.id));else{const t=k(e,r);null!=t&&o.add(t)}},m=e=>{e.forEach((e=>{(0,i.Mn)(e)?g(e,A(e,"start"),A(e,"end")):(0,i.f0)(e)&&b(e)}))},b=e=>{z(e).forEach((t=>{let[n,r]=t;return g(n,"end"===r?"keep":e,"start"===r?"keep":e)}))},v=(e,t,n,r)=>{null!=t.startBoundElement&&x(e,t.startBoundElement,"start");const i=E(r,n);null==i||y(e,i,"end")||x(e,i,"end")},x=(e,t,n)=>{(0,a.DR)(e,{["start"===n?"startBinding":"endBinding"]:Object.assign({elementId:t.id},C(e,t,n))});(0,c.xn)(t.boundElements||[]).has(e.id)||(0,a.DR)(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},y=(e,t,n)=>{const r=e["start"===n?"endBinding":"startBinding"];return w(e,null==r?void 0:r.elementId,t)},w=(e,t,n)=>t===n.id&&e.points.length<3,_=e=>{e.forEach((e=>{(0,i.Mn)(e)&&g(e,null,null)}))},k=(e,t)=>{const n="start"===t?"startBinding":"endBinding",r=e[n];return null==r?null:((0,a.DR)(e,{[n]:null}),r.elementId)},E=(e,t)=>(0,r.QG)(t.getNonDeletedElements(),(t=>(0,i.f0)(t,!1)&&(0,o.uu)(t,e))),C=(e,t,n)=>{const r="start"===n?-1:1,i=-1===r?0:e.points.length-1,a=i-r,s=l._.getPointAtIndexGlobalCoordinates(e,i),c=l._.getPointAtIndexGlobalCoordinates(e,a);return{focus:(0,o.T_)(t,c,s),gap:Math.max(1,(0,o.oT)(t,s))}},S=(e,t)=>{var n;const r=(null!==(n=e.boundElements)&&void 0!==n?n:[]).filter((e=>"arrow"===e.type));if(0===r.length)return;const{newSize:o,simultaneouslyUpdated:l}=null!=t?t:{},c=T(l);p(s.Z.getScene(e),r.map((e=>e.id))).forEach((t=>{if(!(0,i.bt)(t))return;const n=e;if(!I(t,n))return;const r=M(n,t.startBinding,o),s=M(n,t.endBinding,o);c.has(t.id)?(0,a.DR)(t,{startBinding:r,endBinding:s}):(j(t,"start",r,e),j(t,"end",s,e))}))},I=(e,t)=>{var n,r;return(null===(n=e.startBinding)||void 0===n?void 0:n.elementId)===t.id||(null===(r=e.endBinding)||void 0===r?void 0:r.elementId)===t.id},T=e=>new Set((e||[]).map((e=>e.id))),j=(e,t,n,r)=>{if(null==n||n.elementId!==r.id&&e.points.length>2)return;const i=s.Z.getScene(e).getElement(n.elementId);if(null==i)return;const a="start"===t?-1:1,c=-1===a?0:e.points.length-1,d=c-a,u=l._.getPointAtIndexGlobalCoordinates(e,d),h=(0,o.j_)(i,n.focus,u);let p;if(0===n.gap)p=h;else{const e=(0,o.MZ)(i,u,h,n.gap);p=0===e.length?h:e[0]}l._.movePoints(e,[{index:c,point:l._.pointFromAbsoluteCoords(e,p)}],{["start"===t?"startBinding":"endBinding"]:n})},M=(e,t,n)=>{if(null==t||null==n)return t;const{gap:r,focus:i,elementId:a}=t,{width:s,height:l}=n,{width:c,height:d}=e;return{elementId:a,gap:Math.max(1,Math.min((0,o.fb)(e,s,l),r*(s<l?s/c:l/d))),focus:i}},L=e=>{const t=new Set(e.map((e=>{let{id:t}=e;return t})));return e.flatMap((e=>(0,i.Mn)(e,!1)?O(e).filter((e=>!t.has(e.id))):(0,i.f0)(e,!1)?z(e).filter((e=>!t.has(e[0].id))):[]))},O=e=>[A(e,"start"),A(e,"end")].filter((e=>null!=e)),A=(e,t)=>E(D(e,t),s.Z.getScene(e)),D=(e,t)=>{const n="start"===t?0:-1;return(0,c.AK)(l._.getPointAtIndexGlobalCoordinates(e,n))},z=e=>s.Z.getScene(e).getNonDeletedElements().map((t=>{if(!(0,i.Mn)(t,!1))return null;const n=P(t,"start",e),r=P(t,"end",e);return n||r?[t,n&&r?"both":n?"start":"end",e]:null})).filter((e=>null!=e)),P=(e,t,n)=>null==e["start"===t?"startBinding":"endBinding"]&&!y(e,n,t)&&(0,o.uu)(n,D(e,t)),R=(e,t,n,r)=>{const o=new Set,s=new Set,l="duplicatesServeAsOld"===r;t.forEach((e=>{const{boundElements:t}=e;if(null!=t&&t.length>0&&(t.forEach((e=>{l&&!n.has(e.id)&&o.add(e.id)})),s.add(n.get(e.id))),(0,i.Mn)(e)){if(null!=e.startBinding){const{elementId:t}=e.startBinding;l&&!n.has(t)&&s.add(t)}if(null!=e.endBinding){const{elementId:t}=e.endBinding;l&&!n.has(t)&&s.add(t)}null==e.startBinding&&null==e.endBinding||o.add(n.get(e.id))}})),e.filter((e=>{let{id:t}=e;return o.has(t)})).forEach((e=>{const{startBinding:t,endBinding:r}=e;(0,a.DR)(e,{startBinding:B(t,n),endBinding:B(r,n)})})),e.filter((e=>{let{id:t}=e;return s.has(t)})).forEach((e=>{const{boundElements:t}=e;null!=t&&t.length>0&&(0,a.DR)(e,{boundElements:t.map((e=>n.has(e.id)?{id:n.get(e.id),type:e.type}:e))})}))},B=(e,t)=>{var n;if(null==e)return null;const{elementId:r,focus:i,gap:o}=e;return{focus:i,gap:o,elementId:null!==(n=t.get(r))&&void 0!==n?n:r}},N=(e,t)=>{const n=new Set(t.map((e=>e.id))),r=new Set;t.forEach((e=>{var t;(0,i.f0)(e)?null===(t=e.boundElements)||void 0===t||t.forEach((e=>{n.has(e.id)||r.add(e.id)})):(0,i.Mn)(e)&&(e.startBinding&&r.add(e.startBinding.elementId),e.endBinding&&r.add(e.endBinding.elementId))})),e.filter((e=>{let{id:t}=e;return r.has(t)})).forEach((e=>{(0,i.f0)(e)?(0,a.DR)(e,{boundElements:W(e.boundElements,n)}):(0,i.Mn)(e)&&(0,a.DR)(e,{startBinding:H(e.startBinding,n),endBinding:H(e.endBinding,n)})}))},H=(e,t)=>null==e||t.has(e.elementId)?null:e,W=(e,t)=>e?e.filter((e=>!t.has(e.id))):null},8925:(e,t,n)=>{"use strict";n.d(t,{qf:()=>l,UC:()=>c,CM:()=>d,Y5:()=>f,Pi:()=>m,KP:()=>b,wC:()=>v,Ut:()=>x,os:()=>y,v2:()=>w});var r=n(6552),i=n(6852),o=n(6202),a=n(1974),s=n(5001);const l=e=>(0,a.F9)(e)?p(e):(0,a.bt)(e)?g(e):[e.x,e.y,e.x+e.width,e.y+e.height],c=e=>{const t=Math.floor(e.width/2)+1,n=e.width,r=Math.floor(e.height/2)+1;return[t,0,n,r,t,e.height,0,r]},d=e=>{for(const t of e.sets)if("path"===t.type)return t.ops;return e.sets[0].ops},u=(e,t)=>{let n=[0,0];const{minX:r,minY:i,maxX:o,maxY:a}=e.reduce(((e,r)=>{let{op:i,data:o}=r;if("move"===i)n=o;else if("bcurveTo"===i){const r=[o[0],o[1]],i=[o[2],o[3]],a=[o[4],o[5]],s=n;n=a;const l=(e,t)=>Math.pow(1-e,3)*a[t]+3*e*Math.pow(1-e,2)*i[t]+3*Math.pow(e,2)*(1-e)*r[t]+s[t]*Math.pow(e,3);let c=0;for(;c<=1;){let n=l(c,0),r=l(c,1);t&&([n,r]=t(n,r)),e.minY=Math.min(e.minY,r),e.minX=Math.min(e.minX,n),e.maxX=Math.max(e.maxX,n),e.maxY=Math.max(e.maxY,r),c+=.1}}return e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[r,i,o,a]},h=e=>{let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const[o,a]of e)t=Math.min(t,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a);return[t,n,r,i]},p=e=>{const[t,n,r,i]=h(e.points);return[t+e.x,n+e.y,r+e.x,i+e.y]},g=e=>{let t;if(e.points.length<2||!(0,o.R2)(e)){const{minX:n,minY:r,maxX:i,maxY:o}=e.points.reduce(((e,t)=>{let[n,r]=t;return e.minY=Math.min(e.minY,r),e.minX=Math.min(e.minX,n),e.maxX=Math.max(e.maxX,n),e.maxY=Math.max(e.maxY,r),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});t=[n+e.x,r+e.y,i+e.x,o+e.y]}else{const n=(0,o.R2)(e),r=d(n[0]),[i,a,s,l]=u(r);t=[i+e.x,a+e.y,s+e.x,l+e.y]}return t},f=(e,t,n,i)=>{const o=d(t[0]);if(o.length<1)return null;const a="start"===n?1:o.length-1,s=o[a].data,l=[s[4],s[5]],c=[s[2],s[3]],u=[s[0],s[1]],h=o[a-1];let p=[0,0];"move"===h.op?p=h.data:"bcurveTo"===h.op&&(p=[h.data[4],h.data[5]]);const g=(e,t)=>Math.pow(1-e,3)*l[t]+3*e*Math.pow(1-e,2)*c[t]+3*Math.pow(e,2)*(1-e)*u[t]+p[t]*Math.pow(e,3),[f,m]="start"===n?p:l,[b,v]=[g(.3,0),g(.3,1)],x=Math.hypot(f-b,m-v),y=(f-b)/x,w=(m-v)/x,_={arrow:30,bar:15,dot:15,triangle:15}[i];let k=0;if("arrow"===i){const[t,n]=e.points[e.points.length-1],[r,i]=e.points.length>1?e.points[e.points.length-2]:[0,0];k=Math.hypot(t-r,n-i)}else for(let t=0;t<e.points.length;t++){const[n,r]=e.points[t-1]||[0,0],[i,o]=e.points[t];k+=Math.hypot(i-n,o-r)}const E=Math.min(_,k/2),C=f-y*E,S=m-w*E;if("dot"===i){return[f,m,Math.hypot(S-m,C-f)+e.strokeWidth]}const I={arrow:20,bar:90,triangle:25}[i],[T,j]=(0,r.U1)(C,S,f,m,-I*Math.PI/180),[M,L]=(0,r.U1)(C,S,f,m,I*Math.PI/180);return[f,m,T,j,M,L]},m=e=>{let t;const[n,i,s,c]=l(e),p=(n+s)/2,g=(i+c)/2;if((0,a.F9)(e)){const[t,n,i,o]=h(e.points.map((t=>{let[n,i]=t;return(0,r.U1)(n,i,p-e.x,g-e.y,e.angle)})));return[t+e.x,n+e.y,i+e.x,o+e.y]}if((0,a.bt)(e))t=((e,t,n)=>{if(e.points.length<2||!(0,o.R2)(e)){const{minX:i,minY:o,maxX:a,maxY:s}=e.points.reduce(((i,o)=>{let[a,s]=o;return[a,s]=(0,r.U1)(e.x+a,e.y+s,t,n,e.angle),i.minY=Math.min(i.minY,s),i.minX=Math.min(i.minX,a),i.maxX=Math.max(i.maxX,a),i.maxY=Math.max(i.maxY,s),i}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[i,o,a,s]}const i=(0,o.R2)(e),a=d(i[0]);return u(a,((i,o)=>(0,r.U1)(e.x+i,e.y+o,t,n,e.angle)))})(e,p,g);else if("diamond"===e.type){const[o,a]=(0,r.U1)(p,i,p,g,e.angle),[l,d]=(0,r.U1)(p,c,p,g,e.angle),[u,h]=(0,r.U1)(n,g,p,g,e.angle),[f,m]=(0,r.U1)(s,g,p,g,e.angle);t=[Math.min(o,l,u,f),Math.min(a,d,h,m),Math.max(o,l,u,f),Math.max(a,d,h,m)]}else if("ellipse"===e.type){const r=(s-n)/2,o=(c-i)/2,a=Math.cos(e.angle),l=Math.sin(e.angle),d=Math.hypot(r*a,o*l),u=Math.hypot(o*a,r*l);t=[p-d,g-u,p+d,g+u]}else{const[o,a]=(0,r.U1)(n,i,p,g,e.angle),[l,d]=(0,r.U1)(n,c,p,g,e.angle),[u,h]=(0,r.U1)(s,c,p,g,e.angle),[f,m]=(0,r.U1)(s,i,p,g,e.angle);t=[Math.min(o,l,u,f),Math.min(a,d,h,m),Math.max(o,l,u,f),Math.max(a,d,h,m)]}return t},b=e=>{if(!e.length)return[0,0,0,0];let t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEach((e=>{const[o,a,s,l]=m(e);t=Math.min(t,o),r=Math.min(r,a),n=Math.max(n,s),i=Math.max(i,l)})),[t,r,n,i]},v=(e,t,n)=>{if(!(0,a.bt)(e)&&!(0,a.F9)(e))return[e.x,e.y,e.x+t,e.y+n];const r=(0,s.z)(0,t,(0,s.z)(1,n,e.points));let l;if((0,a.F9)(e))l=h(r);else{const t=i.Z.generator(),n="sharp"===e.strokeSharpness?t.linearPath(r,(0,o.i)(e)):t.curve(r,(0,o.i)(e)),a=d(n);l=u(a)}const[c,p,g,f]=l;return[c+e.x,p+e.y,g+e.x,f+e.y]},x=(e,t,n)=>{const r=i.Z.generator(),a="sharp"===n?r.linearPath(t,(0,o.i)(e)):r.curve(t,(0,o.i)(e)),s=d(a),[l,c,h,p]=u(s);return[l+e.x,c+e.y,h+e.x,p+e.y]},y=(e,t)=>{if(!e.length)return[0,0,0,0];let n=1/0,i=e[0];return e.forEach((e=>{const[o,a,s,l]=m(e),c=(0,r.LW)((o+s)/2,(a+l)/2,t.x,t.y);c<n&&(n=c,i=e)})),m(i)},w=e=>{const[t,n,r,i]=b(e);return{minX:t,minY:n,maxX:r,maxY:i,width:r-t,height:i-n,midX:(t+r)/2,midY:(n+i)/2}}},2325:(e,t,n)=>{"use strict";n.d(t,{uu:()=>B,T_:()=>te,j_:()=>ne,oT:()=>W,wX:()=>A,MZ:()=>re,wB:()=>D,Qu:()=>z,pX:()=>R,fb:()=>N});const r=(e,t)=>[0,0,0,0,t,e,1,0],i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error("Expected `index` between 0 and 7, got `".concat(t,"`"));return 0!==e&&(n[t]=e),n},o=e=>[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]],a=(e,t)=>g(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]],s=(e,t)=>g(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[l(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]],l=(e,t)=>t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6],c=(e,t)=>[d(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]],d=(e,t)=>e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0],u=e=>Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6])),h=e=>{const t=u(e);if(0===t||1===t)return e;const n=e[6]<0?-1:1;return s(e,n/t)},p=e=>{const t=(e=>Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1])))(e);return 0===t||1===t?e:s(e,1/t)},g=e=>"number"==typeof e,f=(i(1,1),i(1,2),i(1,3),i(1,4),i(1,5),i(1,6),i(1,7),(e,t,n)=>h([0,n,e,t,0,0,0,0])),m=(e,t)=>h(c(t,e)),b=(e,t)=>{return n=e,[(r=t)[0]*n[0]+r[2]*n[2]+r[3]*n[3]-r[6]*n[6],r[1]*n[0]+r[0]*n[1]-r[4]*n[2]+r[5]*n[3]+r[2]*n[4]-r[3]*n[5]-r[7]*n[6]-r[6]*n[7],r[2]*n[0]+r[0]*n[2]-r[6]*n[3]+r[3]*n[6],r[3]*n[0]+r[6]*n[2]+r[0]*n[3]-r[2]*n[6],r[4]*n[0]+r[7]*n[3]+r[0]*n[4]+r[3]*n[7],r[5]*n[0]+r[7]*n[2]+r[0]*n[5]+r[2]*n[7],r[6]*n[0]+r[0]*n[6],r[7]*n[0]+r[0]*n[7]];var n,r},v=e=>{let[t,n]=e;return[0,0,0,0,n,t,1,0]},x=e=>[e[5],e[4]],y=(e,t)=>{return h((n=e,[(r=t)[0]*n[0],r[1]*n[0]+r[0]*n[1],r[2]*n[0]+r[0]*n[2],r[3]*n[0]+r[0]*n[3],r[4]*n[0]+r[2]*n[1]-r[1]*n[2]+r[0]*n[4],r[5]*n[0]-r[3]*n[1]+r[1]*n[3]+r[0]*n[5],r[6]*n[0]+r[3]*n[2]-r[2]*n[3]+r[0]*n[6],r[7]*n[0]+r[6]*n[1]+r[5]*n[2]+r[4]*n[3]+r[3]*n[4]+r[2]*n[5]+r[1]*n[6]]));var n,r},w=(e,t)=>u(c(e,t)),_=(e,t)=>d(e,t),k=e=>[0,0,0,0,e[4],e[5],0,0],E=(e,t)=>{return n=s(e,Math.sin(t/2)),r=Math.cos(t/2),g(r)?[n[0]+r,n[1],n[2],n[3],n[4],n[5],n[6],n[7]]:[n[0]+r[0],n[1]+r[1],n[2]+r[2],n[3]+r[3],n[4]+r[4],n[5]+r[5],n[6]+r[6],n[7]+r[7]];var n,r},C=(e,t)=>h(s(s(e,t),o(e)));var S=n(6552),I=n(6575),T=n(8925),j=n(6202),M=n(1974),L=n(5118),O=n(6340);const A=(e,t,n,r)=>{const i=10/t.zoom.value,o=[n,r];return P(t,e)?R(e,o,i):z(e,t,o)},D=(e,t,n,r)=>{const i=10/t.zoom.value;return!z(e,t,[n,r])&&R(e,[n,r],i)},z=(e,t,n)=>{const r=10/t.zoom.value,i=(0,L.iB)(e)?U:(e=>{if("arrow"===e.type)return!1;if("freedraw"===e.type)return!0;const t=!(0,O.Qm)(e.backgroundColor)||(0,M.Xo)(e);return"line"===e.type?t&&(0,S.g6)(e.points):t||(0,M.pC)(e)})(e)?F:K;return H({element:e,point:n,threshold:r,check:i})},P=(e,t)=>e.selectedElementIds[t.id],R=(e,t,n)=>{let[r,i]=t;const[o,a,s,l]=(0,T.qf)(e),c=(o+s)/2,d=(a+l)/2,[u,h]=(0,S.U1)(r,i,c,d,-e.angle);return u>o-n&&u<s+n&&h>a-n&&h<l+n},B=(e,t)=>{let{x:n,y:r}=t;const i=N(e,e.width,e.height);return H({element:e,point:[n,r],threshold:i,check:V})},N=(e,t,n)=>{const r=("diamond"===e.type?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*r,32))},H=e=>{switch(e.element.type){case"rectangle":case"image":case"text":case"diamond":case"ellipse":const t=W(e.element,e.point);return e.check(t,e.threshold);case"freedraw":return!!e.check(Y(e.element,e.point),e.threshold)&&q(e.element,e.point,e.threshold);case"arrow":case"line":return J(e);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},W=(e,t)=>{switch(e.type){case"rectangle":case"image":case"text":return Y(e,t);case"diamond":return Z(e,t);case"ellipse":return G(e,t)}},U=(e,t)=>e<0,F=(e,t)=>e<t,K=(e,t)=>Math.abs(e)<t,V=(e,t)=>0<=e&&e<t,Y=(e,t)=>{const[,n,r,i]=Q(e,t);return Math.max(_(n,f(0,1,-i)),_(n,f(1,0,-r)))},Z=(e,t)=>{const[,n,r,i]=Q(e,t),o=f(i,r,-i*r);return _(n,o)},G=(e,t)=>{const[n,r]=X(e,t);return i=r,-Math.sign(i[1])*_(n,r);var i},X=(e,t)=>{const[,n,i,o]=Q(e,t),[a,s]=x(n);let l=.707,c=.707;const d=i,u=o;[0,1,2,3].forEach((e=>{const t=(d*d-u*u)*l**3/d,n=(u*u-d*d)*c**3/u,r=d*l-t,i=u*c-n,o=a-t,h=s-n,p=Math.hypot(i,r),g=Math.hypot(h,o);l=Math.min(1,Math.max(0,(o*p/g+t)/d)),c=Math.min(1,Math.max(0,(h*p/g+n)/u));const f=Math.hypot(c,l);l/=f,c/=f}));const h=r(d*l,u*c);var p;return[n,b(m(n,p=h),p)]},q=(e,t,n)=>{let r,i;if(0===e.angle)r=t[0]-e.x,i=t[1]-e.y;else{const[n,o,a,s]=(0,T.qf)(e),l=(0,S.xj)(t,[n+(a-n)/2,o+(s-o)/2],-e.angle);r=l[0]-e.x,i=l[1]-e.y}let o,[a,s]=e.points;if((0,S.LW)(a[0],a[1],r,i)<n||(0,S.LW)(s[0],s[1],r,i)<n)return!0;for(let t=0;t<e.points.length;t++){const l=[s[0]-a[0],s[1]-a[1]],c=Math.hypot(l[1],l[0]),d=[l[0]/c,l[1]/c],u=[r-a[0],i-a[1]],h=(u[0]*d[0]+u[1]*d[1])/Math.hypot(d[1],d[0]);o=[a[0]+d[0]*h,a[1]+d[1]*h];const p=(0,S.LW)(o[0],o[1],a[0],a[1]),g=(0,S.LW)(o[0],o[1],s[0],s[1]);if(o=g<p&&p>c?s:p<g&&g>c?a:o,Math.hypot(i-o[1],r-o[0])<n)return!0;a=s,s=e.points[t+1]}const l=(0,j.R2)(e);return!(!l||!l.sets.length)&&pe(l,r,i,n)},J=e=>{const{element:t,threshold:n}=e;if(!(0,j.R2)(t))return!1;const[r,i,o,a]=Q(e.element,e.point),s=f(0,1,-a),l=f(1,0,-o);if(!F(_(i,s),n)||!F(_(i,l),n))return!1;const[c,d]=x(r),u=(0,j.R2)(t);if(!u)return!1;if(e.check===F){if(u.some((e=>he(e,c,d,t.strokeSharpness))))return!0}return u.some((e=>pe(e,c,d,n)))},Q=(e,t)=>{const n=v(t),r=(0,T.qf)(e),i=ee(r),o=E(i,e.angle),s=C(o,n),l=(e=>[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0])(a(s,k(i))),c=(d=e.x,[0,0,0,0,e.y,d,0,0]);var d;const u=a(s,c),[h,p,g,f]=r;return[u,l,(g-h)/2,(f-p)/2]},$=e=>{const t=(0,T.qf)(e),n=ee(t),r=E(n,e.angle),i=o((e=>[1,0,0,0,-.5*e[5],.5*e[4],0,0])(k(n)));return s(i,r)},ee=e=>{let[t,n,i,o]=e;return r((t+i)/2,(n+o)/2)},te=(e,t,n)=>{const r=$(e),i=C(r,v(t)),o=C(r,v(n)),a=m(i,o),s=e.height/e.width,l=e.width/2,c=e.height/2,d=a[2],u=a[3],h=a[1],p=Math.abs(u),g=Math.abs(d);switch(e.type){case"rectangle":case"image":case"text":return h/(l*(g+s*p));case"diamond":return p<g?h/(g*l):h/(p*c);case"ellipse":return h/(l*Math.sqrt(d**2+s**2*u**2))}},ne=(e,t,n)=>{if(0===t){const t=(0,T.qf)(e),n=ee(t);return x(n)}const r=$(e),i=C(r,v(n)),a=o(r);let s;switch(e.type){case"rectangle":case"image":case"text":case"diamond":s=ue(e,t,i);break;case"ellipse":s=de(e,t,i)}return x(C(a,s))},re=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=$(e),a=C(i,v(t)),s=C(i,v(n)),l=m(a,s),c=o(i),d=ie(e,l,a,r);return d.map((e=>x(C(c,e))))},ie=function(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;switch(e.type){case"rectangle":case"image":case"text":case"diamond":const n=oe(e);r=n.flatMap(((e,r)=>{const o=[e,n[(r+1)%4]];return ae(t,se(o,i))})).concat(n.flatMap((e=>ce(e,i,t))));break;case"ellipse":r=le(e,i,t)}if(r.length<2)return[];const o=r.sort(((e,t)=>w(e,n)-w(t,n)));return[o[0],o[o.length-1]]},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=t*e.width/2,i=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":return[r(n,i),r(n,-i),r(-n,-i),r(-n,i)];case"diamond":return[r(0,i),r(n,0),r(0,-i),r(-n,0)]}},ae=(e,t)=>{const[n,r]=t;return _(n,e)*_(r,e)>=0?[]:[y(e,m(n,r))]},se=(e,t)=>{const[n,r]=e,i=((e,t)=>{const n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]})(((e,t)=>p([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0]))(n,r),t);return[C(i,n),C(i,r)]},le=(e,t,n)=>{const i=e.width/2+t,o=e.height/2+t,a=n[2],s=n[3],l=n[1],c=i*i*a*a+o*o*s*s,d=c-l*l;if(0===c||d<=0)return[];const u=Math.sqrt(d),h=-i*i*a*l,p=-o*o*s*l;return[r((h+i*o*s*u)/c,(p-i*o*a*u)/c),r((h-i*o*s*u)/c,(p+i*o*a*u)/c)]},ce=(e,t,n)=>{if(0===t)return 0===_(n,e)?[e]:[];const i=n[2],o=n[3],a=n[1],[s,l]=x(e),c=i*i+o*o,d=t*t*c-(i*s+o*l+a)**2;if(0===c||d<=0)return[];const u=Math.sqrt(d),h=s*o*o-l*i*o-i*a,p=l*i*i-s*i*o-o*a;return[r((h+o*u)/c,(p-i*u)/c),r((h-o*u)/c,(p+i*u)/c)]},de=(e,t,n)=>{const i=Math.abs(t),o=e.width*i/2,a=e.height*i/2,s=Math.sign(t),[l,c]=x(n),d=0===c?1e-4:c,u=l**2*a**2+d**2*o**2,h=(-l*a**2+s*d*Math.sqrt(Math.max(0,u-o**2*a**2)))/u,p=(-h*l-1)/d,g=-(o**2)*h/(p**2*a**2+h**2*o**2);return r(g,(-h*g-1)/p)},ue=(e,t,n)=>{const r=Math.abs(t),i=Math.sign(t),o=oe(e,r);let a=0,s=null;return o.forEach((e=>{const t=i*m(n,e)[1];t>a&&(a=t,s=e)})),s},he=(e,t,n,r)=>{const i=(0,T.CM)(e),o=[];let a=!1;for(const e of i)"move"===e.op?(a=!a,a&&o.push([e.data[0],e.data[1]])):"bcurveTo"===e.op?a&&(o.push([e.data[0],e.data[1]]),o.push([e.data[2],e.data[3]]),o.push([e.data[4],e.data[5]])):"lineTo"===e.op&&a&&o.push([e.data[0],e.data[1]]);if(o.length>=4){if("sharp"===r)return(0,S.c9)(o,t,n);const e=(0,I.s)(o,10,5);return(0,S.c9)(e,t,n)}return!1},pe=(e,t,n,r)=>{const i=(0,T.CM)(e);let o=[0,0];return i.some(((i,a)=>{let{op:s,data:l}=i;if("move"===s)o=l;else{if("bcurveTo"===s){const e=[l[0],l[1]],i=[l[2],l[3]],a=[l[4],l[5]],s=o;o=a;const c=((e,t,n,r,i,o)=>{let[a,s]=i;const l=(i,o)=>Math.pow(1-i,3)*r[o]+3*i*Math.pow(1-i,2)*n[o]+3*Math.pow(i,2)*(1-i)*t[o]+e[o]*Math.pow(i,3);let c=0;for(;c<=1;){const e=l(c,0),t=l(c,1);if(Math.sqrt(Math.pow(e-a,2)+Math.pow(t-s,2))<o)return!0;c+=.01}return!1})(s,e,i,a,[t,n],r);return c}if("lineTo"===s)return he(e,t,n,"sharp");"qcurveTo"===s&&console.warn("qcurveTo is not implemented yet")}return!1}))}},5637:(e,t,n)=>{"use strict";n.d(t,{PK:()=>a,Xx:()=>s,oA:()=>l,bp:()=>c});var r=n(8288),i=n(5202),o=n(1974);const a=e=>new Promise(((t,n)=>{const r=new Image;r.onload=()=>{t(r)},r.onerror=e=>{n(e)},r.src=e})),s=async e=>{let{fileIds:t,files:n,imageCache:i}=e;const o=new Map,s=new Map;return await Promise.all(t.reduce(((e,t)=>{const l=n[t];return l&&!o.has(t)?(o.set(t,!0),e.concat((async()=>{try{if(l.mimeType===r.LO.binary)throw new Error("Only images can be added to ImageCache");const e=a(l.dataURL),n={image:e,mimeType:l.mimeType};i.set(t,n);const o=await e;i.set(t,Object.assign(Object.assign({},n),{image:o}))}catch(e){s.set(t,!0)}})())):e}),[])),{imageCache:i,updatedFiles:o,erroredFiles:s}},l=e=>e.filter((e=>(0,o.wi)(e))),c=async e=>{const t=(new DOMParser).parseFromString(e,r.LO.svg),n=t.querySelector("svg");if(t.querySelector("parsererror")||"svg"!==(null==(o=n)?void 0:o.nodeName.toLowerCase()))throw new Error((0,i.t)("errors.invalidSVGString"));if(n.hasAttribute("xmlns")||n.setAttribute("xmlns",r.hR),!n.hasAttribute("width")||!n.hasAttribute("height")){const e=n.getAttribute("viewBox");let t=n.getAttribute("width")||"50",r=n.getAttribute("height")||"50";if(e){const n=e.match(/\d+ +\d+ +(\d+) +(\d+)/);n&&([,t,r]=n)}n.setAttribute("width",t),n.setAttribute("height",r)}return n.outerHTML;var o}},5118:(e,t,n)=>{"use strict";n.d(t,{ox:()=>s.ox,BQ:()=>N,_M:()=>H,EJ:()=>k,o8:()=>y,Sy:()=>o.Sy,os:()=>a.os,KP:()=>a.KP,Un:()=>g,$V:()=>_,qf:()=>a.qf,Pi:()=>a.Pi,jt:()=>u,Lm:()=>P,Qp:()=>r.Qp,uK:()=>r.uK,T:()=>f.T,xx:()=>f.xx,Uo:()=>D,n2:()=>h,PC:()=>s.PC,kK:()=>s.kK,n_:()=>z,wX:()=>l.wX,r2:()=>i.r2,wB:()=>l.wB,QD:()=>r.QD,qP:()=>R,iB:()=>i.iB,Up:()=>o.Up,vw:()=>o.vw,y8:()=>o.y8,VL:()=>o.VL,oN:()=>v.oN,RT:()=>A,b_:()=>L,vY:()=>f.vY,N_:()=>o.N_});var r=n(6126),i=n(1974),o=n(2791),a=n(8925),s=n(267),l=n(2325),c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const d=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],u=(e,t,n,r,i,o)=>e.reduce(((e,a)=>{if(e)return e;const l=((e,t,n,r,i,o)=>{if(!t.selectedElementIds[e.id])return!1;const a=(0,s.PC)(e,i,o),{rotation:l}=a,u=c(a,["rotation"]);if(l&&d(l,n,r))return"rotation";const h=Object.keys(u).filter((e=>{const t=u[e];return!!t&&d(t,n,r)}));return h.length>0&&h[0]})(a,t,n,r,i,o);return l?{element:a,transformHandleType:l}:null}),null),h=(e,t,n,r,i)=>{let[o,a,l,c]=e;const u=(0,s.kK)([o,a,l,c],0,r,i,s.ox);return Object.keys(u).find((e=>{const r=u[e];return r&&d(r,t,n)}))||!1},p=["ns","nesw","ew","nwse"],g=e=>{const{element:t,transformHandleType:n}=e,r=t&&Math.sign(t.height)*Math.sign(t.width)==-1;let i=null;switch(n){case"n":case"s":i="ns";break;case"w":case"e":i="ew";break;case"nw":case"se":i=r?"nesw":"nwse";break;case"ne":case"sw":i=r?"nwse":"nesw";break;case"rotation":return"grab"}return i&&t&&(i=((e,t)=>{const n=p.indexOf(e);if(n>=0){const r=Math.round(t/(Math.PI/4));e=p[(n+r)%p.length]}return e})(i,t.angle)),i?"".concat(i,"-resize"):""};var f=n(8634),m=n(8290),b=n(1935),v=n(5710),x=n(242);const y=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7?arguments[7]:void 0;const[c,d]=(0,a.KP)(t),u={x:n-c,y:r-d};t.forEach((n=>{if(w(i,o,s,e,n,u),!n.groupIds.length||l.editingGroupId&&!(0,x.zq)(l,n)){const t=(0,v.WJ)(n);t&&w(i,o,s,e,t,u)}(0,m.Ww)(n,{simultaneouslyUpdated:t})}))},w=(e,t,n,r,i,o)=>{let a,s;if(e){const l=e&&t<n,c=e&&t>n,d=r.originalElements.get(i.id);a=l&&d?d.x:i.x+o.x,s=c&&d?d.y:i.y+o.y}else a=i.x+o.x,s=i.y+o.y;(0,b.DR)(i,{x:a,y:s})},_=(e,t,n)=>{const[r,i]=(0,a.KP)(e);return[t-r,n-i]},k=(e,t,n,i,o,a,s,l,c,d,u)=>{c&&(u?l=s/u:(({width:s,height:l}=(0,r.uK)(t,s,a<i?-l:l)),l<0&&(l=-l)));let h=o<n?n-s:n,p=a<i?i-l:i;d&&(h=n-(s+=s)/2,p=i-(l+=l)/2),0!==s&&0!==l&&(0,b.DR)(e,{x:h,y:p,width:s,height:l})};var E=n(6066),C=n(6340),S=n(1564),I=n(8288),T=n(3917),j=n(828);const M=(e,t,n,r,i,o)=>{const{zoom:a}=r,s=180*n/Math.PI;let l=e*(a.value-1)/2,c=t*(a.value-1)/2;return e>i&&1!==a.value&&(l=i*(a.value-1)/2),t>o&&1!==a.value&&(c=o*(a.value-1)/2),"translate(".concat(l,"px, ").concat(c,"px) scale(").concat(a.value,") rotate(").concat(s,"deg)")},L=e=>{let{id:t,onChange:n,onSubmit:r,getViewportCoords:o,element:a,canvas:s,excalidrawContainer:l,app:c}=e;let d;const u=()=>{var e;const n=c.state,r=null===(e=S.Z.getScene(a))||void 0===e?void 0:e.getElement(t);if(!r)return;const{textAlign:s,verticalAlign:l}=r,u=(0,v.hP)((0,C.mO)(r));if(r&&(0,i.iB)(r)){let e=r.x,t=r.y;const i=(0,v.tl)(r);let a=r.width,c=r.height,p=r.width,g=r.height;if(i&&r.containerId){const n=((e,t)=>{const n=t.style.fontFamily.replace(/"/g,"");return(0,C.$g)({fontFamily:e.fontFamily})!==n||"".concat(e.fontSize,"px")!==t.style.fontSize})(r,h),o=Number(h.style.height.slice(0,-2));if(o>0&&(g=o),n&&(d=i.height,g=r.height),d||(d=i.height),a=i.width-2*I.gK,c=i.height-2*I.gK,p=a,e=i.x+I.gK,g>c){const e=Math.min(g-c,u);return void(0,b.DR)(i,{height:i.height+e})}if(i.height>d&&g<c){const e=Math.min(c-g,u);(0,b.DR)(i,{height:i.height-e})}else l===I.oX.MIDDLE&&(t=i.y+i.height/2-g/2),l===I.oX.BOTTOM&&(t=i.y+i.height-g-I.gK)}const[f,m]=o(e,t),x=h.selectionStart,y=h.selectionEnd,w=h.value.length;if(h.value=r.originalText,x===y&&y!==w){const e=w-y;h.selectionStart=h.value.length-e,h.selectionEnd=h.value.length-e}const _=r.originalText.split("\n"),k=r.containerId?u:r.height/_.length;i||(a=(n.width-8-f)/n.zoom.value);const E=(n.height-m)/n.zoom.value,S=i?i.angle:r.angle;Object.assign(h.style,{font:(0,C.mO)(r),lineHeight:"".concat(k,"px"),width:"".concat(p,"px"),height:"".concat(g,"px"),left:"".concat(f,"px"),top:"".concat(m,"px"),transform:M(p,g,S,n,a,E),textAlign:s,verticalAlign:l,color:r.strokeColor,opacity:r.opacity/100,filter:"var(--theme-filter)",maxWidth:"".concat(a,"px"),maxHeight:"".concat(E,"px")}),(0,C.h2)()&&(h.style.fontFamily=(0,C.$g)(r)),(0,b.DR)(r,{x:e,y:t})}},h=document.createElement("textarea");h.dir="auto",h.tabIndex=0,h.dataset.type="wysiwyg",h.wrap="off",h.classList.add("excalidraw-wysiwyg");let p="pre",g="normal";(0,i.Xh)(a)&&(p="pre-wrap",g="break-word"),Object.assign(h.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:g,whiteSpace:p,overflowWrap:"break-word"}),u(),n&&(h.oninput=()=>{var e;const r=null===(e=S.Z.getScene(a))||void 0===e?void 0:e.getElement(t),o=(0,C.mO)(r),s=Math.round(h.scrollHeight/(0,v.hP)(o));if((0,i.Xh)(a)&&s>1){let e="auto";if(2===s){const t=(0,v.tl)(a);1===(0,v.lD)(h.value,o,t.width).split("\n").length&&(e="".concat(h.scrollHeight/2,"px"))}h.style.height=e,h.style.height="".concat(h.scrollHeight,"px")}n(h.value.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n"))}),h.onkeydown=e=>{if(!e.shiftKey&&j.Lo.keyTest(e))e.preventDefault(),c.actionManager.executeAction(j.Lo),u();else if(!e.shiftKey&&j.CZ.keyTest(e))e.preventDefault(),c.actionManager.executeAction(j.CZ),u();else if(T.Tu.keyTest(e))c.actionManager.executeAction(T.Tu);else if(T.Zq.keyTest(e))c.actionManager.executeAction(T.Zq);else if(e.key===E.tW.ESCAPE)e.preventDefault(),k=!0,L();else if(e.key===E.tW.ENTER&&e[E.tW.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||229===e.keyCode)return;k=!0,L()}else(e.key===E.tW.TAB||e[E.tW.CTRL_OR_CMD]&&(e.code===E.aU.BRACKET_LEFT||e.code===E.aU.BRACKET_RIGHT))&&(e.preventDefault(),e.shiftKey||e.code===E.aU.BRACKET_LEFT?y():x(),h.dispatchEvent(new Event("input")))};const f=" ".repeat(4),m=new RegExp("^ {1,".concat(4,"}")),x=()=>{const{selectionStart:e,selectionEnd:t}=h,n=w();let r=h.value;n.forEach((e=>{const t=r.slice(0,e),n=r.slice(e);r="".concat(t).concat(f).concat(n)})),h.value=r,h.selectionStart=e+4,h.selectionEnd=t+4*n.length},y=()=>{const{selectionStart:e,selectionEnd:t}=h,n=w(),r=[];let i=h.value;n.forEach((e=>{const t=i.slice(e,e+4).match(m);if(t){const n=i.slice(0,e),o=i.slice(e+t[0].length);i="".concat(n).concat(o),r.push(e)}})),h.value=i,r.length&&(e>r[r.length-1]?h.selectionStart=Math.max(e-4,r[r.length-1]):h.selectionStart=e,h.selectionEnd=Math.max(h.selectionStart,t-4*r.length))},w=()=>{let{selectionStart:e,selectionEnd:t,value:n}=h;const r=n.slice(0,e).match(/[^\n]*$/)[0].length;e-=r;return n.slice(e,t).split("\n").reduce(((t,n,r,i)=>t.concat(r?t[r-1]+i[r-1].length+1:e)),[]).reverse()},_=e=>{e.preventDefault(),e.stopPropagation()};let k=!1;const L=()=>{var e;O();const t=null===(e=S.Z.getScene(a))||void 0===e?void 0:e.getElement(a.id);if(!t)return;let n=h.value;const o=(0,v.tl)(t);if(o)if(n=t.text,h.value){const e=(0,v.xB)(o);e&&e===a.id||(0,b.DR)(o,{boundElements:(o.boundElements||[]).concat({type:"text",id:a.id})})}else{var s;(0,b.DR)(o,{boundElements:null===(s=o.boundElements)||void 0===s?void 0:s.filter((e=>!(0,i.iB)(e)))})}r({text:n,viaKeyboard:k,originalText:h.value})},O=()=>{P||(P=!0,h.onblur=null,h.oninput=null,h.onkeydown=null,R&&R.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("wheel",_,!0),window.removeEventListener("pointerdown",D),window.removeEventListener("pointerup",A),window.removeEventListener("blur",L),z(),h.remove())},A=e=>{window.removeEventListener("pointerup",A);const t=null==e?void 0:e.target,n=t instanceof HTMLInputElement&&t.closest(".color-picker-input")&&(0,C.s)(t);setTimeout((()=>{h.onblur=L,t&&n&&(t.onblur=()=>{h.focus()}),n||h.focus()}))},D=e=>{const t=e.target instanceof HTMLInputElement&&e.target.closest(".color-picker-input")&&(0,C.s)(e.target);((e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(".".concat(I.$C.SHAPE_ACTIONS_MENU))&&!(0,C.s)(e.target)||t)&&(h.onblur=null,window.addEventListener("pointerup",A),window.addEventListener("blur",L))},z=S.Z.getScene(a).addCallback((()=>{var e;u();!(null===(e=document.activeElement)||void 0===e||!e.closest(".color-picker-input"))||h.focus()}));let P=!1;h.select(),A();let R=null;s&&"ResizeObserver"in window?(R=new window.ResizeObserver((()=>{u()})),R.observe(s)):window.addEventListener("resize",u),window.addEventListener("pointerdown",D),window.addEventListener("wheel",_,{passive:!1,capture:!0}),null==l||l.querySelector(".excalidraw-textEditorContainer").appendChild(h)};var O=n(75);const A=(e,t)=>Boolean(!e.viewModeEnabled&&"custom"!==e.activeTool.type&&(e.editingElement||"selection"!==e.activeTool.type&&"eraser"!==e.activeTool.type)||(0,O.eD)(t,e).length),D=e=>e.reduce(((e,t)=>e+t.version),0),z=e=>e.filter((e=>!e.isDeleted&&!(0,r.QD)(e))),P=e=>e.filter((e=>!e.isDeleted)),R=e=>!e.isDeleted,B=e=>P(e).map((e=>(0,i.dt)(e.type)?Object.assign(Object.assign({},e),{lastCommittedPoint:null}):e)),N=e=>B(e),H=e=>B(e)},6938:(e,t,n)=>{"use strict";n.d(t,{_:()=>u});var r=n(6552),i=n(5118),o=n(8925),a=n(1935),s=n(1564),l=n(8290),c=n(6340),d=n(1974);class u{constructor(e,t){this.elementId=e.id,s.Z.mapElementToScene(this.elementId,t),u.normalizePoints(e),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1}}static getElement(e){var t;const n=null===(t=s.Z.getScene(e))||void 0===t?void 0:t.getNonDeletedElement(e);return n||null}static handleBoxSelection(e,t,n){var r;if(!t.editingLinearElement||"selection"!==(null===(r=t.draggingElement)||void 0===r?void 0:r.type))return!1;const{editingLinearElement:o}=t,{selectedPointsIndices:a,elementId:s}=o,l=u.getElement(s);if(!l)return!1;const[c,d,h,p]=(0,i.qf)(t.draggingElement),g=u.getPointsGlobalCoordinates(l).reduce(((t,n,r)=>((n[0]>=c&&n[0]<=h&&n[1]>=d&&n[1]<=p||e.shiftKey&&null!=a&&a.includes(r))&&t.push(r),t)),[]);n({editingLinearElement:Object.assign(Object.assign({},o),{selectedPointsIndices:g.length?g:null})})}static handlePointDragging(e,t,n,r,i){if(!e.editingLinearElement)return!1;const{editingLinearElement:o}=e,{selectedPointsIndices:a,elementId:s,isDragging:l}=o,h=u.getElement(s);if(!h)return!1;const p=h.points[o.pointerDownState.lastClickedPoint];if(a&&p){!1===l&&t({editingLinearElement:Object.assign(Object.assign({},o),{isDragging:!0})});const s=u.createPointAt(h,n-o.pointerOffset.x,r-o.pointerOffset.y,e.gridSize),g=s[0]-p[0],f=s[1]-p[1];if(u.movePoints(h,a.map((t=>({index:t,point:t===o.pointerDownState.lastClickedPoint?u.createPointAt(h,n-o.pointerOffset.x,r-o.pointerOffset.y,e.gridSize):[h.points[t][0]+g,h.points[t][1]+f],isDragging:t===o.pointerDownState.lastClickedPoint})))),(0,d.Mn)(h,!1)){const e=[];0===a[0]&&e.push((0,c.AK)(u.getPointGlobalCoordinates(h,h.points[0])));const t=a[a.length-1];t===h.points.length-1&&e.push((0,c.AK)(u.getPointGlobalCoordinates(h,h.points[t]))),e.length&&i(h,e)}return!0}return!1}static handlePointerUp(e,t,n){var i;const{elementId:o,selectedPointsIndices:a,isDragging:d,pointerDownState:h}=t,p=u.getElement(o);if(!p)return t;const g={};if(d&&a)for(const e of a)if(0===e||e===p.points.length-1){(0,r.g6)(p.points,n.zoom.value)&&u.movePoints(p,[{index:e,point:0===e?p.points[p.points.length-1]:p.points[0]}]);const t=(0,l.N1)(n)?(0,l.Y9)((0,c.AK)(u.getPointAtIndexGlobalCoordinates(p,e)),s.Z.getScene(p)):null;g[0===e?"startBindingElement":"endBindingElement"]=t}return Object.assign(Object.assign(Object.assign({},t),g),{selectedPointsIndices:d||e.shiftKey?!d&&e.shiftKey&&null!==(i=h.prevSelectedPointsIndices)&&void 0!==i&&i.includes(h.lastClickedPoint)?a&&a.filter((e=>e!==h.lastClickedPoint)):a:null!=a&&a.includes(h.lastClickedPoint)?[h.lastClickedPoint]:a,isDragging:!1,pointerOffset:{x:0,y:0}})}static handlePointerDown(e,t,n,o,c){var p;const g={didAddPoint:!1,hitElement:null};if(!t.editingLinearElement)return g;const{elementId:f}=t.editingLinearElement,m=u.getElement(f);if(!m)return g;if(e.altKey)return null==t.editingLinearElement.lastUncommittedPoint&&(0,a.DR)(m,{points:[...m.points,u.createPointAt(m,c.x,c.y,t.gridSize)]}),o.resumeRecording(),n({editingLinearElement:Object.assign(Object.assign({},t.editingLinearElement),{pointerDownState:{prevSelectedPointsIndices:t.editingLinearElement.selectedPointsIndices,lastClickedPoint:-1},selectedPointsIndices:[m.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,l.Y9)(c,s.Z.getScene(m))})}),g.didAddPoint=!0,g;const b=u.getPointIndexUnderCursor(m,t.zoom,c.x,c.y);if(b>-1)g.hitElement=m;else{const{startBindingElement:e,endBindingElement:n}=t.editingLinearElement;(0,l.N1)(t)&&(0,d.Mn)(m)&&(0,l.HG)(m,e,n)}const[v,x,y,w]=(0,i.qf)(m),_=(v+y)/2,k=(x+w)/2,E=b>-1&&(0,r.U1)(m.x+m.points[b][0],m.y+m.points[b][1],_,k,m.angle),C=b>-1||e.shiftKey?e.shiftKey||null!==(p=t.editingLinearElement.selectedPointsIndices)&&void 0!==p&&p.includes(b)?h([...t.editingLinearElement.selectedPointsIndices||[],b]):[b]:null;return n({editingLinearElement:Object.assign(Object.assign({},t.editingLinearElement),{pointerDownState:{prevSelectedPointsIndices:t.editingLinearElement.selectedPointsIndices,lastClickedPoint:b},selectedPointsIndices:C,pointerOffset:E?{x:c.x-E[0],y:c.y-E[1]}:{x:0,y:0}})}),g}static handlePointerMove(e,t,n,r,i){const{elementId:o,lastUncommittedPoint:a}=r,s=u.getElement(o);if(!s)return r;const{points:l}=s,c=l[l.length-1];if(!e.altKey)return c===a&&u.deletePoints(s,[l.length-1]),Object.assign(Object.assign({},r),{lastUncommittedPoint:null});const d=u.createPointAt(s,t-r.pointerOffset.x,n-r.pointerOffset.y,i);return c===a?u.movePoints(s,[{index:s.points.length-1,point:d}]):u.addPoints(s,[{point:d}]),Object.assign(Object.assign({},r),{lastUncommittedPoint:s.points[s.points.length-1]})}static getPointGlobalCoordinates(e,t){const[n,o,a,s]=(0,i.qf)(e),l=(n+a)/2,c=(o+s)/2;let{x:d,y:u}=e;return[d,u]=(0,r.U1)(d+t[0],u+t[1],l,c,e.angle),[d,u]}static getPointsGlobalCoordinates(e){const[t,n,o,a]=(0,i.qf)(e),s=(t+o)/2,l=(n+a)/2;return e.points.map((t=>{let{x:n,y:i}=e;return[n,i]=(0,r.U1)(n+t[0],i+t[1],s,l,e.angle),[n,i]}))}static getPointAtIndexGlobalCoordinates(e,t){const n=t<0?e.points.length+t:t,[o,a,s,l]=(0,i.qf)(e),c=(o+s)/2,d=(a+l)/2,u=e.points[n],{x:h,y:p}=e;return(0,r.U1)(h+u[0],p+u[1],c,d,e.angle)}static pointFromAbsoluteCoords(e,t){const[n,o,a,s]=(0,i.qf)(e),l=(n+a)/2,c=(o+s)/2,[d,u]=(0,r.U1)(t[0],t[1],l,c,-e.angle);return[d-e.x,u-e.y]}static getPointIndexUnderCursor(e,t,n,i){const o=this.getPointsGlobalCoordinates(e);let a=o.length;for(;--a>-1;){const e=o[a];if((0,r.LW)(n,i,e[0],e[1])*t.value<this.POINT_HANDLE_SIZE/2+1)return a}return-1}static createPointAt(e,t,n,o){const a=(0,r.wC)(t,n,o),[s,l,c,d]=(0,i.qf)(e),u=(s+c)/2,h=(l+d)/2,[p,g]=(0,r.U1)(a[0],a[1],u,h,-e.angle);return[p-e.x,g-e.y]}static getNormalizedPoints(e){const{points:t}=e,n=t[0][0],r=t[0][1];return{points:t.map(((e,t)=>[e[0]-n,e[1]-r])),x:e.x+n,y:e.y+r}}static normalizePoints(e){(0,a.DR)(e,u.getNormalizedPoints(e))}static duplicateSelectedPoints(e){if(!e.editingLinearElement)return!1;const{selectedPointsIndices:t,elementId:n}=e.editingLinearElement,r=u.getElement(n);if(!r||null===t)return!1;const{points:i}=r,o=[];let s=!1,l=-1;const c=i.reduce(((e,n,r)=>{++l,e.push(n);if(t.includes(r)){const t=i[r+1];t||(s=!0),e.push(t?[(n[0]+t[0])/2,(n[1]+t[1])/2]:[n[0],n[1]]),o.push(l+1),++l}return e}),[]);if((0,a.DR)(r,{points:c}),s){const e=r.points[r.points.length-1];u.movePoints(r,[{index:r.points.length-1,point:[e[0]+30,e[1]+30]}])}return{appState:Object.assign(Object.assign({},e),{editingLinearElement:Object.assign(Object.assign({},e.editingLinearElement),{selectedPointsIndices:o})})}}static deletePoints(e,t){let n=0,r=0;if(t.includes(0)){const i=e.points.find(((e,n)=>!t.includes(n)));i&&(n=i[0],r=i[1])}const i=e.points.reduce(((e,i,o)=>(t.includes(o)||e.push(e.length?[i[0]-n,i[1]-r]:[0,0]),e)),[]);u._updatePoints(e,i,n,r)}static addPoints(e,t){const n=[...e.points,...t.map((e=>e.point))];u._updatePoints(e,n,0,0)}static movePoints(e,t,n){const{points:r}=e;let i=0,o=0;const a=t.find((e=>{let{index:t}=e;return 0===t}));a&&(i=a.point[0]-r[a.index][0],o=a.point[1]-r[a.index][1]);const s=r.map(((e,n)=>{const s=t.find((e=>e.index===n));if(s){if(a)return e;const t=s.point[0]-r[s.index][0],n=s.point[1]-r[s.index][1];return[e[0]+t,e[1]+n]}return i||o?[e[0]-i,e[1]-o]:e}));u._updatePoints(e,s,i,o,n)}static _updatePoints(e,t,n,i,s){const l=(0,o.Ut)(e,t,e.strokeSharpness||"round"),c=(0,o.Ut)(e,e.points,e.strokeSharpness||"round"),d=(l[0]+l[2])/2,u=(l[1]+l[3])/2,h=(c[0]+c[2])/2-d,p=(c[1]+c[3])/2-u,g=(0,r.U1)(n,i,h,p,e.angle);(0,a.DR)(e,Object.assign(Object.assign({},s),{points:t,x:e.x+g[0],y:e.y+g[1]}))}}u.POINT_HANDLE_SIZE=20;const h=e=>{let t=[...new Set(e.filter((e=>null!==e&&-1!==e)))];return t=t.sort(((e,t)=>e-t)),t.length?t:null}},1935:(e,t,n)=>{"use strict";n.d(t,{DR:()=>l,BE:()=>c,ZP:()=>d});var r=n(6202),i=n(1564),o=n(5001),a=n(6954),s=n(6340);const l=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=!1;const{points:c,fileId:d}=t;void 0!==c&&(t=Object.assign(Object.assign({},(0,o.k)(c)),t));for(const n in t){const r=t[n];if(void 0!==r){if(e[n]===r&&("object"!=typeof r||null===r||"groupIds"===n||"scale"===n))continue;if("scale"===n){const t=e[n],i=r;if(t[0]===i[0]&&t[1]===i[1])continue}else if("points"===n){const t=e[n],i=r;if(t.length===i.length){let e=!1,n=t.length;for(;--n;){const r=t[n],o=i[n];if(r[0]!==o[0]||r[1]!==o[1]){e=!0;break}}if(!e)continue}}e[n]=r,l=!0}}if(!l)return e;var u;(void 0===t.height&&void 0===t.width&&void 0===d&&void 0===c||(0,r.bI)(e),e.version++,e.versionNonce=(0,a.LU)(),e.updated=(0,s.C3)(),n)&&(null===(u=i.Z.getScene(e))||void 0===u||u.informMutation());return e},c=(e,t)=>{let n=!1;for(const r in t){const i=t[r];if(void 0!==i){if(e[r]===i&&("object"!=typeof i||null===i))continue;n=!0}}return n?Object.assign(Object.assign(Object.assign({},e),t),{updated:(0,s.C3)(),version:e.version+1,versionNonce:(0,a.LU)()}):e},d=(e,t)=>(e.version=(null!=t?t:e.version)+1,e.versionNonce=(0,a.LU)(),e.updated=(0,s.C3)(),e)},2791:(e,t,n)=>{"use strict";n.d(t,{Up:()=>g,VL:()=>m,N_:()=>b,KE:()=>v,y8:()=>x,vw:()=>y,OL:()=>w,Sy:()=>_});var r=n(6340),i=n(6954),o=n(1935),a=n(242),s=n(5118),l=n(6552),c=n(8925),d=n(5710),u=n(8288),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const p=(e,t)=>{var n,o;let{x:a,y:s,strokeColor:l,backgroundColor:c,fillStyle:d,strokeWidth:u,strokeStyle:p,roughness:g,opacity:f,width:m=0,height:b=0,angle:v=0,groupIds:x=[],strokeSharpness:y,boundElements:w=null,link:_=null,locked:k}=t,E=h(t,["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","strokeSharpness","boundElements","link","locked"]);return{id:E.id||(0,i.kb)(),type:e,x:a,y:s,width:m,height:b,angle:v,strokeColor:l,backgroundColor:c,fillStyle:d,strokeWidth:u,strokeStyle:p,roughness:g,opacity:f,groupIds:x,strokeSharpness:y,seed:null!==(n=E.seed)&&void 0!==n?n:(0,i.LU)(),version:E.version||1,versionNonce:null!==(o=E.versionNonce)&&void 0!==o?o:0,isDeleted:!1,boundElements:w,updated:(0,r.C3)(),link:_,locked:k}},g=e=>p(e.type,e),f=(e,t)=>({x:"center"===e.textAlign?t.width/2:"right"===e.textAlign?t.width:0,y:"middle"===e.verticalAlign?t.height/2:0}),m=e=>{const t=(0,d.X1)(e.text,(0,r.mO)(e)),n=f(e,t);return(0,o.BE)(Object.assign(Object.assign({},p("text",e)),{text:e.text,fontSize:e.fontSize,fontFamily:e.fontFamily,textAlign:e.textAlign,verticalAlign:e.verticalAlign,x:e.x-n.x,y:e.y-n.y,width:t.width,height:t.height,baseline:t.baseline,containerId:e.containerId||null,originalText:e.text}),{})},b=(e,t)=>{let{text:n,isDeleted:i,originalText:a}=t;const h=(0,d.tl)(e);h&&(n=(0,d.lD)(n,(0,r.mO)(e),h.width));const p=((e,t)=>{let n=null;const i=(0,d.tl)(e);i&&(n=i.width-2*u.gK);const{width:a,height:h,baseline:p}=(0,d.X1)(t,(0,r.mO)(e),n),{textAlign:g,verticalAlign:m}=e;let b,v;if("center"!==g||m!==u.oX.MIDDLE||e.containerId){const[t,n,r,i]=(0,s.qf)(e),[o,d,u,p]=(0,c.wC)(e,a,h),f=(t-o)/2,m=(n-d)/2,x=(r-u)/2,y=(i-p)/2;[b,v]=(0,l.yq)({s:!0,e:"center"===g||"left"===g,w:"center"===g||"right"===g},e.x,e.y,e.angle,f,m,x,y)}else{const t=(0,d.X1)(e.text,(0,r.mO)(e),n),i=f(e,{width:a-t.width,height:h-t.height});b=e.x-i.x,v=e.y-i.y}if(i){let e=i.height,t=i.width;h>e-2*u.gK&&(e=h+2*u.gK),a>t-2*u.gK&&(t=a+2*u.gK),e===i.height&&t===i.width||(0,o.DR)(i,{height:e,width:t})}return{width:a,height:h,x:Number.isFinite(b)?b:e.x,y:Number.isFinite(v)?v:e.y,baseline:p}})(e,n);return(0,o.BE)(e,Object.assign({text:n,originalText:a,isDeleted:null!=i?i:e.isDeleted},p))},v=e=>Object.assign(Object.assign({},p(e.type,e)),{points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null}),x=e=>Object.assign(Object.assign({},p(e.type,e)),{points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead,endArrowhead:e.endArrowhead}),y=e=>Object.assign(Object.assign({},p("image",e)),{strokeColor:"transparent",status:"pending",fileId:null,scale:[1,1]}),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null==e||"object"!=typeof e)return e;if("[object Object]"===Object.prototype.toString.call(e)){const n="function"==typeof e.constructor?Object.create(Object.getPrototypeOf(e)):{};for(const r in e)if(e.hasOwnProperty(r)){if(0===t&&("shape"===r||"canvas"===r))continue;n[r]=w(e[r],t+1)}return n}if(Array.isArray(e)){let n=e.length;const r=new Array(n);for(;n--;)r[n]=w(e[n],t+1);return r}return e},_=(e,t,n,o)=>{let s=w(n);var l,c;(0,r.h2)()?(s.id="".concat(s.id,"_copy"),null!==(l=window.h)&&void 0!==l&&null!==(c=l.app)&&void 0!==c&&c.getSceneElementsIncludingDeleted().find((e=>e.id===s.id))&&(s.id+="_copy")):s.id=(0,i.kb)();return s.updated=(0,r.C3)(),s.seed=(0,i.LU)(),s.groupIds=(0,a.Qy)(s.groupIds,e,(e=>(t.has(e)||t.set(e,(0,i.kb)()),t.get(e)))),o&&(s=Object.assign(s,o)),s}},8634:(e,t,n)=>{"use strict";n.d(t,{LW:()=>g,vY:()=>f,l2:()=>w,xx:()=>E,T:()=>C});var r=n(8288),i=n(5001),o=n(6552),a=n(8925),s=n(1974),l=n(1935),c=n(6126),d=n(6340),u=n(8290),h=n(1564),p=n(5710);const g=e=>e>=2*Math.PI?e-2*Math.PI:e,f=(e,t,n,r,i,o,a,l,c,d,h)=>{if(1===n.length){const[d]=n;return"rotation"===t?(m(d,l,c,i),(0,u.Ww)(d)):!(0,s.bt)(d)||2!==d.points.length||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?!(0,s.iB)(d)||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?t&&w(e.originalElements,a,d,t,o,l,c):(y(d,t,o,l,c),(0,u.Ww)(d)):b(d,r,i,l,c),!0}if(n.length>1){if("rotation"===t)return k(e,n,l,c,i,d,h),!0;if("nw"===t||"ne"===t||"sw"===t||"se"===t)return _(n,t,l,c),!0}return!1},m=(e,t,n,i)=>{const[o,s,c,d]=(0,a.qf)(e),u=(o+c)/2,f=(s+d)/2;let m=5*Math.PI/2+Math.atan2(n-f,t-u);i&&(m+=r.ay/2,m-=m%r.ay),m=g(m),(0,l.DR)(e,{angle:m});const b=(0,p.xB)(e);if(b){const t=h.Z.getScene(e).getElement(b);(0,l.DR)(t,{angle:m})}},b=(e,t,n,r,i)=>{const[s,d,u,h]=(0,a.qf)(e),p=(s+u)/2,g=(d+h)/2,[f,m]=(0,o.U1)(r,i,p,g,-e.angle);let[b,v]="end"===t?[f-e.x,m-e.y]:[e.x+e.points[1][0]-f,e.y+e.points[1][1]-m];n&&([b,v]=((e,t,n,r)=>{const i=(0,c.uK)(e,...(0,o.U1)(t,n,0,0,r));return(0,o.U1)(i.width,i.height,0,0,-r)})(e.type,b,v,e.angle));const[x,y]=(0,o.yq)("end"===t?{s:!0,e:!0}:{n:!0,w:!0},e.x,e.y,e.angle,0,0,(e.points[1][0]-b)/2,(e.points[1][1]-v)/2);(0,l.DR)(e,{x,y,points:[[0,0],[b,v]]})},v=(e,t,n)=>(0,s.bt)(e)||(0,s.F9)(e)?{points:(0,i.z)(0,t,(0,i.z)(1,n,e.points))}:{},x=(e,t,n)=>{const r=e.fontSize*(t/e.width);if(r<1)return null;const i=(0,p.X1)(e.text,(0,d.mO)({fontSize:r,fontFamily:e.fontFamily}),e.containerId?e.width:null);return{size:r,baseline:i.baseline+(n-i.height)}},y=(e,t,n,r,i)=>{const[s,c,d,u]=(0,a.qf)(e),h=(s+d)/2,p=(c+u)/2,[g,f]=(0,o.U1)(r,i,h,p,-e.angle);let m;switch(t){case"se":m=Math.max((g-s)/(d-s),(f-c)/(u-c));break;case"nw":m=Math.max((d-g)/(d-s),(u-f)/(u-c));break;case"ne":m=Math.max((g-s)/(d-s),(u-f)/(u-c));break;case"sw":m=Math.max((d-g)/(d-s),(f-c)/(u-c))}if(m>0){const r=e.width*m,i=e.height*m,h=x(e,r,i);if(null===h)return;const[p,g,f,b]=(0,a.wC)(e,r,i),v=(s-p)/2,y=(c-g)/2,w=(d-f)/2,_=(u-b)/2,[k,E]=(0,o.yq)(((e,t)=>({n:/^(n|ne|nw)$/.test(e)||t&&/^(s|se|sw)$/.test(e),s:/^(s|se|sw)$/.test(e)||t&&/^(n|ne|nw)$/.test(e),w:/^(w|nw|sw)$/.test(e)||t&&/^(e|ne|se)$/.test(e),e:/^(e|ne|se)$/.test(e)||t&&/^(w|nw|sw)$/.test(e)}))(t,n),e.x,e.y,e.angle,v,y,w,_);(0,l.DR)(e,{fontSize:h.size,width:r,height:i,baseline:h.baseline,x:k,y:E})}},w=(e,t,n,i,s,c,h)=>{const g=e.get(n.id),[f,m,b,y]=(0,a.wC)(g,g.width,g.height),w=[f,m],_=[b,y],k=(0,o.H5)(w,_),E=(0,o.xj)([c,h],k,-g.angle),[C,S,I,T]=(0,a.wC)(n,n.width,n.height),j=I-C,M=T-S;let L=(_[0]-w[0])/j,O=(_[1]-w[1])/M,A={};const D=(0,p.WJ)(n);i.includes("e")&&(L=(E[0]-w[0])/j),i.includes("s")&&(O=(E[1]-w[1])/M),i.includes("w")&&(L=(_[0]-E[0])/j),i.includes("n")&&(O=(_[1]-E[1])/M);const z=g.width,P=g.height;let R=n.width*L,B=n.height*O;if(s&&(R=2*R-z,B=2*B-P),t){const e=Math.abs(R)/z,t=Math.abs(B)/P;if(1===i.length&&(B*=e,R*=t),2===i.length){const n=Math.max(e,t);R=z*n*Math.sign(R),B=P*n*Math.sign(B)}}if(D){const n=e.get(D.id);if(n&&(A={fontSize:n.fontSize,baseline:n.baseline}),t){const e=x(D,R-2*r.gK,B-2*r.gK);if(null===e)return;A={fontSize:e.size,baseline:e.baseline}}else{const e=(0,p.AT)((0,d.mO)(D)),t=(0,p.w_)((0,d.mO)(D));R=Math.ceil(Math.max(R,e)),B=Math.ceil(Math.max(B,t))}}const[N,H,W,U]=(0,a.wC)(g,R,B),F=W-N,K=U-H;let V=[...w];if(["n","w","nw"].includes(i)&&(V=[_[0]-Math.abs(F),_[1]-Math.abs(K)]),"ne"===i){const e=[w[0],_[1]];V=[e[0],e[1]-Math.abs(K)]}if("sw"===i){const e=[_[0],w[1]];V=[e[0]-Math.abs(F),e[1]]}t&&(["s","n"].includes(i)&&(V[0]=k[0]-F/2),["e","w"].includes(i)&&(V[1]=k[1]-K/2)),R<0&&(i.includes("e")&&(V[0]-=Math.abs(F)),i.includes("w")&&(V[0]+=Math.abs(F))),B<0&&(i.includes("s")&&(V[1]-=Math.abs(K)),i.includes("n")&&(V[1]+=Math.abs(K))),s&&(V[0]=k[0]-Math.abs(F)/2,V[1]=k[1]-Math.abs(K)/2);const Y=g.angle,Z=(0,o.xj)(V,k,Y),G=[V[0]+Math.abs(F)/2,V[1]+Math.abs(K)/2],X=(0,o.xj)(G,k,Y);V=(0,o.xj)(Z,X,-Y);const q=v(g,R,B),J=[...V];J[0]+=g.x-N,J[1]+=g.y-H;const Q=Object.assign({width:Math.abs(R),height:Math.abs(B),x:J[0],y:J[1]},q);"scale"in n&&"scale"in g&&(0,l.DR)(n,{scale:[(Math.sign(L)||g.scale[0])*g.scale[0],(Math.sign(O)||g.scale[1])*g.scale[1]]}),0!==Q.width&&0!==Q.height&&Number.isFinite(Q.x)&&Number.isFinite(Q.y)&&((0,u.Ww)(n,{newSize:{width:Q.width,height:Q.height}}),(0,l.DR)(n,Q),D&&A&&(0,l.DR)(D,{fontSize:A.fontSize}),(0,p.RB)(n,i))},_=(e,t,n,i)=>{const[o,c,d,h]=(0,a.KP)(e);let g,f;switch(t){case"se":g=Math.max((n-o)/(d-o),(i-c)/(h-c)),f=(e,t,n)=>{let[r,i]=t,[a,s]=n;return{x:e.x+(r-o)*(g-1)+r-a,y:e.y+(i-c)*(g-1)+i-s}};break;case"nw":g=Math.max((d-n)/(d-o),(h-i)/(h-c)),f=(e,t,n)=>{let[,,r,i]=t,[,,o,a]=n;return{x:e.x-(d-r)*(g-1)+r-o,y:e.y-(h-i)*(g-1)+i-a}};break;case"ne":g=Math.max((n-o)/(d-o),(h-i)/(h-c)),f=(e,t,n)=>{let[r,,,i]=t,[a,,,s]=n;return{x:e.x+(r-o)*(g-1)+r-a,y:e.y-(h-i)*(g-1)+i-s}};break;case"sw":g=Math.max((d-n)/(d-o),(i-c)/(h-c)),f=(e,t,n)=>{let[,r,i]=t,[,o,a]=n;return{x:e.x-(d-i)*(g-1)+i-a,y:e.y+(r-c)*(g-1)+r-o}}}if(g>0){const n=e.reduce(((t,n)=>{if(!t)return t;const i=n.width*g,o=n.height*g,l=(0,p.WJ)(n);let c={};if(l){const e=x(l,i-2*r.gK,o-2*r.gK);if(null===e)return null;c={fontSize:e.size,baseline:e.baseline}}if((0,s.iB)(n)){const e=x(n,i,o);if(null===e)return null;c={fontSize:e.size,baseline:e.baseline}}const d=(0,a.qf)(n),h=v(n,i,o);(0,u.Ww)(n,{newSize:{width:i,height:o},simultaneouslyUpdated:e});const m=(0,a.wC)(Object.assign(Object.assign({},n),h),i,o),{x:b,y}=f(n,d,m);return[...t,Object.assign(Object.assign({width:i,height:o,x:b,y},h),c)]}),[]);n&&e.forEach(((e,r)=>{(0,l.DR)(e,n[r]);const i=(0,p.WJ)(e);i&&((0,l.DR)(i,{fontSize:n[r].fontSize,baseline:n[r].baseline}),(0,p.RB)(e,t))}))}},k=(e,t,n,i,s,c,d)=>{let u=5*Math.PI/2+Math.atan2(i-d,n-c);s&&(u+=r.ay/2,u-=u%r.ay),t.forEach(((t,n)=>{var r,i;const[s,f,m,b]=(0,a.qf)(t),v=(s+m)/2,x=(f+b)/2,y=null!==(r=null===(i=e.originalElements.get(t.id))||void 0===i?void 0:i.angle)&&void 0!==r?r:t.angle,[w,_]=(0,o.U1)(v,x,c,d,u+y-t.angle);(0,l.DR)(t,{x:t.x+(w-v),y:t.y+(_-x),angle:g(u+y)});const k=(0,p.xB)(t);if(k){const e=h.Z.getScene(t).getElement(k);(0,l.DR)(e,{x:e.x+(w-v),y:e.y+(_-x),angle:g(u+y)})}}))},E=(e,t,n,r)=>{const[i,s,l,c]=1===t.length?(0,a.qf)(t[0]):(0,a.KP)(t),d=(i+l)/2,u=(s+c)/2,h=1===t.length?t[0].angle:0;switch([n,r]=(0,o.U1)(n,r,d,u,-h),e){case"n":return(0,o.U1)(n-(i+l)/2,r-s,0,0,h);case"s":return(0,o.U1)(n-(i+l)/2,r-c,0,0,h);case"w":return(0,o.U1)(n-i,r-(s+c)/2,0,0,h);case"e":return(0,o.U1)(n-l,r-(s+c)/2,0,0,h);case"nw":return(0,o.U1)(n-i,r-s,0,0,h);case"ne":return(0,o.U1)(n-l,r-s,0,0,h);case"sw":return(0,o.U1)(n-i,r-c,0,0,h);case"se":return(0,o.U1)(n-l,r-c,0,0,h);default:return[0,0]}},C=(e,t)=>{const[,[n,r]]=t.points;return"nw"===e&&(n<0||r<0)||"ne"===e&&n>=0||"sw"===e&&n<=0||"se"===e&&(n>0||r>0)?"end":"origin"}},6126:(e,t,n)=>{"use strict";n.d(t,{QD:()=>o,uK:()=>a,Qp:()=>s});n(1935);var r=n(1974),i=n(8288);const o=e=>(0,r.bt)(e)||(0,r.F9)(e)?e.points.length<2:0===e.width&&0===e.height,a=(e,t,n)=>{const r=Math.abs(t),o=Math.abs(n);if("line"===e||"arrow"===e||"freedraw"===e){const e=Math.round(Math.atan(o/r)/i.ay)*i.ay;0===e?n=0:e===Math.PI/2?t=0:n=Math.round(r*Math.tan(e))*Math.sign(n)||n}else"selection"!==e&&(n=r*Math.sign(n));return{width:t,height:n}},s=e=>{const t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){const n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){const n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t}},5710:(e,t,n)=>{"use strict";n.d(t,{oN:()=>l,P7:()=>c,RB:()=>d,X1:()=>u,hP:()=>g,lD:()=>b,AT:()=>x,w_:()=>y,xB:()=>_,WJ:()=>k,tl:()=>E});var r=n(6340),i=n(1935),o=n(8288),a=n(1564),s=n(5118);const l=(e,t)=>{const n=t?t.width-2*o.gK:void 0;let a=e.text;t&&(a=b(e.originalText,(0,r.mO)(e),t.width));const s=u(e.originalText,(0,r.mO)(e),n);let l=e.y,c=e.x;if(t){let n=t.height;c=t.x+o.gK,e.verticalAlign===o.oX.TOP?l=t.y+o.gK:e.verticalAlign===o.oX.BOTTOM?l=t.y+t.height-s.height-o.gK:(l=t.y+t.height/2-s.height/2,s.height>t.height-2*o.gK&&(n=s.height+2*o.gK,l=t.y+n/2-s.height/2)),(0,i.DR)(t,{height:n})}(0,i.DR)(e,{width:s.width,height:s.height,baseline:s.baseline,y:l,x:c,text:a})},c=(e,t,n)=>{const o=(0,r.xn)(e);t.forEach((e=>{const t=n.get(e.id),r=_(e);if(r){const l=n.get(r);if(l){const n=o.get(t);var a;if(n)(0,i.DR)(n,{boundElements:null===(a=e.boundElements)||void 0===a?void 0:a.concat({type:"text",id:l})});const r=o.get(l);r&&(0,s.iB)(r)&&(0,i.DR)(r,{containerId:n?t:null})}}}))},d=(e,t)=>{const n=_(e);if(n){const s=a.Z.getScene(e).getElement(n);if(s&&s.text){if(!e)return;let n,a=s.text,l=s.height,c=e.height,d=s.baseline;if("n"!==t&&"s"!==t){a&&(a=b(s.originalText,(0,r.mO)(s),e.width));const t=u(a,(0,r.mO)(s),e.width);l=t.height,d=t.baseline}if(l>e.height-2*o.gK){c=l+2*o.gK;const n=c-e.height,r="ne"===t||"nw"===t||"n"===t?e.y-n:e.y;(0,i.DR)(e,{height:c,y:r})}n=s.verticalAlign===o.oX.TOP?e.y+o.gK:s.verticalAlign===o.oX.BOTTOM?e.y+e.height-l-o.gK:e.y+e.height/2-l/2,(0,i.DR)(s,{text:a,width:e.width-2*o.gK,height:l,x:e.x+o.gK,y:n,baseline:d})}}},u=(e,t,n)=>{e=e.split("\n").map((e=>e||" ")).join("\n");const r=document.createElement("div");if(r.style.position="absolute",r.style.whiteSpace="pre",r.style.font=t,r.style.minHeight="1em",n){const e=g(t);r.style.width="".concat(String(n),"px"),r.style.maxWidth="".concat(String(n),"px"),r.style.overflow="hidden",r.style.wordBreak="break-word",r.style.lineHeight="".concat(String(e),"px"),r.style.whiteSpace="pre-wrap"}document.body.appendChild(r),r.innerText=e;const i=document.createElement("span");i.style.display="inline-block",i.style.overflow="hidden",i.style.width="1px",i.style.height="1px",r.appendChild(i);const o=i.offsetTop+i.offsetHeight,a=r.offsetWidth,s=r.offsetHeight;return document.body.removeChild(r),{width:a,height:s,baseline:o}},h="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),p={},g=e=>(p[e]||(p[e]=u(h,e,null).height),p[e]);let f;const m=(e,t)=>{f||(f=document.createElement("canvas"));const n=f.getContext("2d");n.font=t;const i=n.measureText(e);return(0,r.h2)()?10*i.width:i.width},b=(e,t,n)=>{const r=n-2*o.gK,i=[],a=e.split("\n"),s=m(" ",t);return a.forEach((e=>{const n=e.split(" ");if(1===n.length&&""===n[0])i.push(n[0]);else{let e="",o=0,a=0;for(;a<n.length;){if(m(n[a],t)>=r){for(e&&i.push(e),e="",o=0;n[a].length>0;){const s=n[a][0],l=v.calculate(s,t);o+=l,n[a]=n[a].slice(1),o>=r?(" "===e.slice(-1)&&(e=e.slice(0,-1)),i.push(e),e=s,o=l,o===r&&(e="",o=0)):e+=s}o+s>=r?(i.push(e),e="",o=0):(e+=" ",o+=s),a++}else{for(;o<r&&a<n.length;){const l=n[a];if(o=m(e+l,t),o>=r){i.push(e),o=0,e="";break}if(a++,e+="".concat(l," "),o+s>=r){i.push(e.slice(0,-1)),e="",o=0;break}}o===r&&(e="",o=0)}}e&&(" "===e.slice(-1)&&(e=e.slice(0,-1)),i.push(e))}})),i.join("\n")},v=(()=>{const e={};return{calculate:(t,n)=>{const r=t.charCodeAt(0);if(e[n]||(e[n]=[]),!e[n][r]){const i=m(t,n);e[n][r]=i}return e[n][r]},getCache:t=>e[t]}})(),x=e=>{const t=w(e);return 0===t?u(h.split("").join("\n"),e).width+2*o.gK:t+2*o.gK},y=e=>g(e)+2*o.gK,w=e=>{const t=v.getCache(e);if(!t)return 0;const n=t.filter((e=>void 0!==e));return Math.max(...n)},_=e=>{var t,n,r;return null!=e&&null!==(t=e.boundElements)&&void 0!==t&&t.length&&(null==e||null===(n=e.boundElements)||void 0===n||null===(r=n.filter((e=>"text"===e.type))[0])||void 0===r?void 0:r.id)||null},k=e=>{if(!e)return null;const t=_(e);var n;return t&&(null===(n=a.Z.getScene(e))||void 0===n?void 0:n.getElement(t))||null},E=e=>{return e&&e.containerId&&(null===(t=a.Z.getScene(e))||void 0===t?void 0:t.getElement(e.containerId))||null;var t}},267:(e,t,n)=>{"use strict";n.d(t,{ox:()=>s,kK:()=>h,PC:()=>p});var r=n(8925),i=n(6552),o=n(5118);const a={mouse:8,pen:16,touch:28},s={e:!0,s:!0,n:!0,w:!0},l={e:!0,s:!0,n:!0,w:!0},c={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},d={e:!0,s:!0,n:!0,w:!0,ne:!0,sw:!0},u=(e,t,n,r,o,a,s)=>{const[l,c]=(0,i.U1)(e+n/2,t+r/2,o,a,s);return[l-n/2,c-r/2,n,r]},h=function(e,t,n,r){let[i,o,s,l]=e,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const d=a[r],h=d/n.value,p=d/n.value,g=d/n.value,f=d/n.value,m=s-i,b=l-o,v=(i+s)/2,x=(o+l)/2,y=4/n.value,w=(d-8)/(2*n.value),_={nw:c.nw?void 0:u(i-y-g+w,o-y-f+w,h,p,v,x,t),ne:c.ne?void 0:u(s+y-w,o-y-f+w,h,p,v,x,t),sw:c.sw?void 0:u(i-y-g+w,l+y-w,h,p,v,x,t),se:c.se?void 0:u(s+y-w,l+y-w,h,p,v,x,t),rotation:c.rotation?void 0:u(i+m/2-h/2,o-y-f+w-16/n.value,h,p,v,x,t)},k=5*a.mouse/n.value;return Math.abs(m)>k&&(c.n||(_.n=u(i+m/2-h/2,o-y-f+w,h,p,v,x,t)),c.s||(_.s=u(i+m/2-h/2,l+y-w,h,p,v,x,t))),Math.abs(b)>k&&(c.w||(_.w=u(i-y-g+w,o+b/2-p/2,h,p,v,x,t)),c.e||(_.e=u(s+y-w,o+b/2-p/2,h,p,v,x,t))),_},p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mouse";if(e.locked)return{};let i={};if("arrow"===e.type||"line"===e.type||"freedraw"===e.type){if(2===e.points.length){const[,t]=e.points;0===t[0]||0===t[1]?i=d:t[0]>0&&t[1]<0?i=c:t[0]>0&&t[1]>0?i=d:t[0]<0&&t[1]>0?i=c:t[0]<0&&t[1]<0&&(i=d)}}else(0,o.iB)(e)&&(i=l);return h((0,r.qf)(e),e.angle,t,n,i)}},1974:(e,t,n)=>{"use strict";n.d(t,{wi:()=>r,pC:()=>i,iB:()=>o,F9:()=>a,bt:()=>l,dt:()=>c,Mn:()=>d,Lx:()=>u,f0:()=>h,mG:()=>p,r2:()=>g,Xo:()=>f,Xh:()=>m});const r=e=>!!e&&"image"===e.type&&!!e.fileId,i=e=>!!e&&"image"===e.type,o=e=>null!=e&&"text"===e.type,a=e=>null!=e&&s(e.type),s=e=>"freedraw"===e,l=e=>null!=e&&c(e.type),c=e=>"arrow"===e||"line"===e,d=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&u(e.type)},u=e=>"arrow"===e,h=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type&&("text"!==e.type||e.containerId))},p=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type)},g=e=>"text"===(null==e?void 0:e.type)||"diamond"===(null==e?void 0:e.type)||"rectangle"===(null==e?void 0:e.type)||"ellipse"===(null==e?void 0:e.type)||"arrow"===(null==e?void 0:e.type)||"freedraw"===(null==e?void 0:e.type)||"line"===(null==e?void 0:e.type),f=e=>{var t;return h(e)&&!(null===(t=e.boundElements)||void 0===t||!t.some((e=>{let{type:t}=e;return"text"===t})))},m=e=>null!==e&&o(e)&&null!==e.containerId},7968:(e,t,n)=>{"use strict";n.d(t,{l:()=>r,_:()=>i});class r extends Error{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";super(),this.name=t,this.message=e}}class i extends DOMException{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request Aborted","AbortError")}}},242:(e,t,n)=>{"use strict";n.d(t,{F$:()=>o,zq:()=>a,yO:()=>s,iJ:()=>l,bO:()=>c,iE:()=>d,Nd:()=>u,Fb:()=>h,YS:()=>p,Qy:()=>g,S_:()=>f,h6:()=>m,AI:()=>b});var r=n(75),i=n(5710);const o=(e,t,n)=>{const r=n.filter((t=>t.groupIds.includes(e)));return r.length<2?t.selectedGroupIds[e]||t.editingGroupId===e?Object.assign(Object.assign({},t),{selectedGroupIds:Object.assign(Object.assign({},t.selectedGroupIds),{[e]:!1}),editingGroupId:null}):t:Object.assign(Object.assign({},t),{selectedGroupIds:Object.assign(Object.assign({},t.selectedGroupIds),{[e]:!0}),selectedElementIds:Object.assign(Object.assign({},t.selectedElementIds),Object.fromEntries(r.map((e=>[e.id,!0]))))})},a=(e,t)=>null!=s(e,t),s=(e,t)=>t.groupIds.filter((t=>t!==e.editingGroupId)).find((t=>e.selectedGroupIds[t])),l=e=>Object.entries(e.selectedGroupIds).filter((e=>{let[t,n]=e;return n})).map((e=>{let[t,n]=e;return t})),c=(e,t)=>{let n=Object.assign(Object.assign({},e),{selectedGroupIds:{}});const i=(0,r.eD)(t,e);if(!i.length)return Object.assign(Object.assign({},n),{editingGroupId:null});for(const r of i){let i=r.groupIds;if(e.editingGroupId){const t=i.indexOf(e.editingGroupId);t>-1&&(i=i.slice(0,t))}if(i.length>0){const e=i[i.length-1];n=o(e,n,t)}}return n},d=(e,t)=>Object.assign(Object.assign({},e),{editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:{[t.id]:!0}}),u=(e,t)=>e.groupIds.includes(t),h=(e,t)=>e.filter((e=>u(e,t))),p=(e,t)=>e.groupIds.find((e=>t[e])),g=(e,t,n)=>{const r=[...e],i=t?e.indexOf(t):-1,o=i>-1?i:e.length;for(let e=0;e<o;e++)r[e]=n(r[e]);return r},f=(e,t,n)=>{const r=[...e],i=n?r.indexOf(n):-1,o=i>-1?i:r.length;return r.splice(o,0,t),r},m=(e,t)=>e.filter((e=>!t[e])),b=e=>{const t=new Map;return e.forEach((e=>{const n=0===e.groupIds.length?e.id:e.groupIds[e.groupIds.length-1],r=t.get(n)||[],o=(0,i.WJ)(e);o&&r.push(o),t.set(n,[...r,e])})),Array.from(t.values())}},5202:(e,t,n)=>{"use strict";n.d(t,{Fp:()=>a,G3:()=>h,Mj:()=>s,m0:()=>u,t:()=>g});var r=n(1463);const i=JSON.parse('{"ar-SA":91,"bg-BG":58,"bn-BD":0,"ca-ES":97,"cs-CZ":24,"da-DK":34,"de-DE":100,"el-GR":82,"en":100,"es-ES":99,"eu-ES":98,"fa-IR":98,"fi-FI":98,"fr-FR":100,"gl-ES":45,"he-IL":94,"hi-IN":62,"hu-HU":94,"id-ID":100,"it-IT":100,"ja-JP":98,"kab-KAB":95,"kk-KZ":22,"ko-KR":98,"lt-LT":22,"lv-LV":100,"mr-IN":100,"my-MM":44,"nb-NO":100,"nl-NL":86,"nn-NO":95,"oc-FR":98,"pa-IN":87,"pl-PL":88,"pt-BR":95,"pt-PT":80,"ro-RO":100,"ru-RU":100,"si-LK":8,"sk-SK":100,"sl-SI":100,"sv-SE":100,"ta-IN":98,"tr-TR":99,"uk-UA":99,"vi-VN":13,"zh-CN":100,"zh-HK":27,"zh-TW":100}');var o=n(8288);const a={code:"en",label:"English"},s=[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].concat([a]).sort(((e,t)=>e.label>t.label?1:-1)).filter((e=>i[e.code]>=85)),l="__test__";"production"===o.Vi.DEVELOPMENT&&s.unshift({code:l,label:"test language"},{code:"".concat(l,".rtl"),label:"test language (rtl)",rtl:!0});let c=a,d={};const u=async e=>{c=e,document.documentElement.dir=c.rtl?"rtl":"ltr",document.documentElement.lang=c.code,d=e.code.startsWith(l)?{}:await Promise.resolve().then(n.t.bind(n,1463,19))},h=()=>c,p=(e,t)=>{for(let n=0;n<t.length;++n){const r=t[n];if(void 0===e[r])return;e=e[r]}if("string"==typeof e)return e},g=(e,t)=>{if(c.code.startsWith(l)){const n=t?"".concat(e,"(").concat(JSON.stringify(t).slice(1,-1),")"):e;return"[[".concat(n,"]]")}const n=e.split(".");let i=p(d,n)||p(r,n);if(void 0===i)throw new Error("Can't find translation for ".concat(e));if(t)for(const e in t)i=i.replace("{{".concat(e,"}}"),String(t[e]));return i}},9487:(e,t,n)=>{"use strict";n.d(t,{yE:()=>i,e_:()=>o});var r=n(6131);n(9787);const i=Symbol(),o=(0,r.Vv)()},6066:(e,t,n)=>{"use strict";n.d(t,{Um:()=>r,ED:()=>i,Dt:()=>o,aU:()=>a,tW:()=>s,Wl:()=>l,OA:()=>c,E0:()=>d,Ge:()=>u});const r=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i=/^Win/.test(window.navigator.platform),o=/\b(android)\b/i.test(navigator.userAgent),a={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",G:"KeyG",F:"KeyF",H:"KeyH",V:"KeyV",X:"KeyX",Z:"KeyZ",R:"KeyR"},s={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:r?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",A:"a",D:"d",E:"e",G:"g",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k"},l=e=>e===s.ARROW_LEFT||e===s.ARROW_RIGHT||e===s.ARROW_DOWN||e===s.ARROW_UP,c=e=>e.altKey,d=e=>e.shiftKey,u=e=>e.shiftKey},6552:(e,t,n)=>{"use strict";n.d(t,{U1:()=>i,xj:()=>o,yq:()=>a,LW:()=>s,H5:()=>l,g6:()=>c,c9:()=>d,wC:()=>g});var r=n(8288);const i=(e,t,n,r,i)=>[(e-n)*Math.cos(i)-(t-r)*Math.sin(i)+n,(e-n)*Math.sin(i)+(t-r)*Math.cos(i)+r],o=(e,t,n)=>i(e[0],e[1],t[0],t[1],n),a=(e,t,n,r,i,o,a,s)=>{const l=Math.cos(r),c=Math.sin(r);return e.e&&e.w?t+=i+a:e.e?(t+=i*(1+l),n+=i*c,t+=a*(1-l),n+=a*-c):e.w&&(t+=i*(1-l),n+=i*-c,t+=a*(1+l),n+=a*c),e.n&&e.s?n+=o+s:e.n?(t+=o*c,n+=o*(1-l),t+=s*-c,n+=s*(1+l)):e.s&&(t+=o*-c,n+=o*(1+l),t+=s*c,n+=s*(1-l)),[t,n]},s=(e,t,n,r)=>{const i=n-e,o=r-t;return Math.hypot(i,o)},l=(e,t)=>[(e[0]+t[0])/2,(e[1]+t[1])/2],c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length>=3){const[n,i]=[e[0],e[e.length-1]];return s(n[0],n[1],i[0],i[1])<=r.qx/t}return!1},d=(e,t,n)=>{const r=e.length;if(r<3)return!1;const i=[Number.MAX_SAFE_INTEGER,n],o=[t,n];let a=0;for(let t=0;t<r;t++){const n=e[t],s=e[(t+1)%r];if(p(n,s,o,i)){if(0===h(n,o,s))return u(n,o,s);a++}}return a%2==1},u=(e,t,n)=>t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1]),h=(e,t,n)=>{const r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return 0===r?0:r>0?1:2},p=(e,t,n,r)=>{const i=h(e,t,n),o=h(e,t,r),a=h(n,r,e),s=h(n,r,t);return i!==o&&a!==s||(!(0!==i||!u(e,n,t))||(!(0!==o||!u(e,r,t))||(!(0!==a||!u(n,e,r))||!(0!==s||!u(n,t,r)))))},g=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t]},769:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&a[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},7157:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},5370:e=>{"use strict";e.exports=function(e){return e[1]}},3024:(e,t,n)=>{"use strict";n.d(t,{NL:()=>g,Fl:()=>f,$D:()=>m,i1:()=>b,I_:()=>c.I_,NI:()=>c.NI,cT:()=>u.cT,ZY:()=>u.ZY,lV:()=>u.lV,N7:()=>h.N7,zh:()=>p.zh});var r=n(4162),i=n(8897),o=n(5118),a=n(679),s=n(8288),l=n(673),c=n(5523),d=n(6665),u=n(434),h=n(6202),p=n(7053);const g=e=>{let{elements:t,appState:n,files:i,maxWidthOrHeight:s,getDimensions:l}=e;const{elements:c,appState:d}=(0,a.nu)({elements:t,appState:n},null,null),{exportBackground:u,viewBackgroundColor:h}=d;return(0,r.NL)((0,o.Lm)(c),Object.assign(Object.assign({},d),{offsetTop:0,offsetLeft:0,width:0,height:0}),i||{},{exportBackground:u,viewBackgroundColor:h},((e,t)=>{var n;const r=document.createElement("canvas");if(s){"function"==typeof l&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");const n=Math.max(e,t),i=s/n;return r.width=e*i,r.height=t*i,{canvas:r,scale:i}}const i=(null==l?void 0:l(e,t))||{width:e,height:t};return r.width=i.width,r.height=i.height,{canvas:r,scale:null!==(n=i.scale)&&void 0!==n?n:1}}))},f=async e=>{var t;let{mimeType:n=s.LO.png,quality:r}=e;n===s.LO.png&&"number"==typeof r&&console.warn('"quality" will be ignored for "'.concat(s.LO.png,'" mimeType')),"image/jpg"===n&&(n=s.LO.jpg),n!==s.LO.jpg||null!==(t=e.appState)&&void 0!==t&&t.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(s.LO.jpg,'" mimeType')),e=Object.assign(Object.assign({},e),{appState:Object.assign(Object.assign({},e.appState),{exportBackground:!0})}));const i=await g(e);return r=r||(/image\/jpe?g/.test(n)?.92:.8),new Promise(((t,o)=>{i.toBlob((async r=>{var i;if(!r)return o(new Error("couldn't export to blob"));r&&n===s.LO.png&&null!==(i=e.appState)&&void 0!==i&&i.exportEmbedScene&&(r=await(0,l.encodePngMetadata)({blob:r,metadata:(0,c.I_)(e.elements,e.appState,e.files||{},"local")})),t(r)}),n,r)}))},m=async e=>{let{elements:t,appState:n=(0,i.im)(),files:s={},exportPadding:l}=e;const{elements:c,appState:d}=(0,a.nu)({elements:t,appState:n},null,null);return(0,r.$D)((0,o.Lm)(c),Object.assign(Object.assign({},d),{exportPadding:l}),s)},b=async e=>{if("svg"===e.type){const t=await m(e);await(0,d.dd)(t.outerHTML)}else if("png"===e.type)await(0,d.uR)(f(e));else{if("json"!==e.type)throw new Error("Invalid export type");{const t=Object.assign(Object.assign({offsetTop:0,offsetLeft:0,width:0,height:0},(0,i.im)()),e.appState);await(0,d.vQ)(e.elements,t,e.files)}}}},5001:(e,t,n)=>{"use strict";n.d(t,{k:()=>r,z:()=>i});const r=e=>{const t=e.map((e=>e[0])),n=e.map((e=>e[1]));return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},i=(e,t,n)=>{const r=n.map((t=>t[e])),i=Math.max(...r),o=Math.min(...r),a=i-o,s=0===a?1:t/a;let l=1/0;const c=n.map((t=>t.map(((t,n)=>{if(n!==e)return t;const r=t*s;return l=Math.min(r,l),r}))));if(2===c.length)return c;const d=o-l;return c.map((t=>t.map(((t,n)=>n===e?t+d:t))))}},6954:(e,t,n)=>{"use strict";n.d(t,{LU:()=>l,kb:()=>c});var r=n(8136),i=n(6612),o=n(6340);let a=new r.k(Date.now()),s=0;const l=()=>Math.floor(a.next()*2**31),c=()=>(0,o.h2)()?"id".concat(s++):(0,i.x0)()},6202:(e,t,n)=>{"use strict";n.d(t,{Dn:()=>N,aL:()=>G,i:()=>X,N7:()=>ie,R2:()=>V,bI:()=>Z,lw:()=>$,Rg:()=>te});var r=n(1974),i=n(8925),o=n(6340),a=n(6552),s=n(6852),l=n(8897),c=n(8288);function d(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e=>e;return e*r(.5-t*(.5-n))}function u(e){return[-e[0],-e[1]]}function h(e,t){return[e[0]+t[0],e[1]+t[1]]}function p(e,t){return[e[0]-t[0],e[1]-t[1]]}function g(e,t){return[e[0]*t,e[1]*t]}function f(e){return[e[1],-e[0]]}function m(e,t){return e[0]*t[0]+e[1]*t[1]}function b(e,t){return e[0]===t[0]&&e[1]===t[1]}function v(e,t){return function(e){return e[0]*e[0]+e[1]*e[1]}(p(e,t))}function x(e){return function(e,t){return[e[0]/t,e[1]/t]}(e,function(e){return Math.hypot(e[0],e[1])}(e))}function y(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function w(e,t,n){let r=Math.sin(n),i=Math.cos(n),o=e[0]-t[0],a=e[1]-t[1],s=o*r+a*i;return[o*i-a*r+t[0],s+t[1]]}function _(e,t,n){return h(e,g(p(t,e),n))}function k(e,t,n){return h(e,g(t,n))}var{min:E,PI:C}=Math,S=.275,I=C+1e-4;function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:o=!0,easing:a=(e=>e),start:s={},end:l={},last:c=!1}=t,{cap:b=!0,taper:y=0,easing:C=(e=>e*(2-e))}=s,{cap:T=!0,taper:j=0,easing:M=(e=>--e*e*e+1)}=l;if(0===e.length||n<=0)return[];let L,O=e[e.length-1].runningLength,A=Math.pow(n*r,2),D=[],z=[],P=e.slice(0,10).reduce(((e,t)=>{let r=t.pressure;if(o){let i=E(1,t.distance/n),o=E(1,1-i);r=E(1,e+i*S*(o-e))}return(e+r)/2}),e[0].pressure),R=d(n,i,e[e.length-1].pressure,a),B=e[0].vector,N=e[0].point,H=N,W=N,U=H;for(let t=0;t<e.length;t++){let{pressure:r}=e[t],{point:s,vector:l,distance:c,runningLength:u}=e[t];if(t<e.length-1&&O-u<3)continue;if(i){if(o){let e=E(1,c/n),t=E(1,1-e);r=E(1,P+e*S*(t-P))}R=d(n,i,r,a)}else R=n/2;void 0===L&&(L=R);let b=u<y?C(u/y):1,x=O-u<j?M((O-u)/j):1;if(R=Math.max(.01,R*Math.min(b,x)),t===e.length-1){let e=g(f(l),R);D.push(p(s,e)),z.push(h(s,e));continue}let k=e[t+1].vector,T=m(l,k);if(T<0){let e=g(f(B),R);for(let t=1/13,n=0;n<=1;n+=t)W=w(p(s,e),s,I*n),D.push(W),U=w(h(s,e),s,I*-n),z.push(U);N=W,H=U;continue}let F=g(f(_(k,l,T)),R);W=p(s,F),(t<=1||v(N,W)>A)&&(D.push(W),N=W),U=h(s,F),(t<=1||v(H,U)>A)&&(z.push(U),H=U),P=r,B=l}let F=e[0].point.slice(0,2),K=e.length>1?e[e.length-1].point.slice(0,2):h(e[0].point,[1,1]),V=[],Y=[];if(1===e.length){if(!y&&!j||c){let e=k(F,x(f(p(F,K))),-(L||R)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(w(e,F,2*I*r));return t}}else{if(!(y||j&&1===e.length))if(b)for(let e=1/13,t=e;t<=1;t+=e){let e=w(z[0],F,I*t);V.push(e)}else{let e=p(D[0],z[0]),t=g(e,.5),n=g(e,.51);V.push(p(F,t),p(F,n),h(F,n),h(F,t))}let t=f(u(e[e.length-1].vector));if(j||y&&1===e.length)Y.push(K);else if(T){let e=k(K,t,R);for(let t=1/29,n=t;n<1;n+=t)Y.push(w(e,K,3*I*n))}else Y.push(h(K,g(t,R)),h(K,g(t,.99*R)),p(K,g(t,.99*R)),p(K,g(t,R)))}return D.concat(Y,z.reverse(),V)}function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;let{streamline:r=.5,size:i=16,last:o=!1}=t;if(0===e.length)return[];let a=.15+.85*(1-r),s=Array.isArray(e[0])?e:e.map((e=>{let{x:t,y:n,pressure:r=.5}=e;return[t,n,r]}));if(2===s.length){let e=s[1];s=s.slice(0,-1);for(let t=1;t<5;t++)s.push(_(s[0],e,t/4))}1===s.length&&(s=[...s,[...h(s[0],[1,1]),...s[0].slice(2)]]);let l=[{point:[s[0][0],s[0][1]],pressure:s[0][2]>=0?s[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,d=0,u=l[0],g=s.length-1;for(let e=1;e<s.length;e++){let t=o&&e===g?s[e].slice(0,2):_(u.point,s[e],a);if(b(u.point,t))continue;let n=y(t,u.point);if(d+=n,e<g&&!c){if(d<i)continue;c=!0}u={point:t,pressure:s[e][2]>=0?s[e][2]:.5,vector:x(p(u.point,t)),distance:n,runningLength:d},l.push(u)}return l[0].vector=(null==(n=l[1])?void 0:n.vector)||[0,0],l}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T(j(e,t),t)}var L=n(5710);const O="invert(100%) hue-rotate(180deg) saturate(1.25)",A=(0,l.im)(),D=(e,t)=>(0,r.wi)(e)&&!t.imageCache.has(e.fileId),z=(e,t)=>{var n;return"dark"===t.theme&&(0,r.wi)(e)&&!D(e,t)&&(null===(n=t.imageCache.get(e.fileId))||void 0===n?void 0:n.mimeType)!==c.LO.svg},P=e=>[8,8+e],R=e=>[1.5,6+e],B=e=>"freedraw"===e.type?12*e.strokeWidth:20,N=14,H=document.createElement("img");H.src="data:".concat(c.LO.svg,",").concat(encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>'));const W=document.createElement("img");W.src="data:".concat(c.LO.svg,",").concat(encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>'));const U=(e,t,n,i)=>{switch(n.globalAlpha=e.opacity/100,e.type){case"rectangle":case"diamond":case"ellipse":n.lineJoin="round",n.lineCap="round",t.draw(V(e));break;case"arrow":case"line":n.lineJoin="round",n.lineCap="round",V(e).forEach((e=>{t.draw(e)}));break;case"freedraw":{n.save(),n.fillStyle=e.strokeColor;const r=function(e){return ne.get(e)}(e),i=V(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(r),n.restore();break}case"image":{var a;const t=(0,r.wi)(e)?null===(a=i.imageCache.get(e.fileId))||void 0===a?void 0:a.image:void 0;null==t||t instanceof Promise?((e,t,n)=>{t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);const r=Math.min(e.width,e.height),i=Math.min(r,Math.min(.4*r,100));t.drawImage("error"===e.status?W:H,e.width/2-i/2,e.height/2-i/2,i,i)})(e,n,i.zoom.value):n.drawImage(t,0,0,e.width,e.height);break}default:if(!(0,r.iB)(e))throw new Error("Unimplemented type ".concat(e.type));{const t=(0,o.dZ)(e.text),r=t&&!n.canvas.isConnected;r&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",t?"rtl":"ltr"),n.save(),n.font=(0,o.mO)(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;const i=e.text.replace(/\r\n?/g,"\n").split("\n"),a=e.containerId?(0,L.hP)((0,o.mO)(e)):e.height/i.length;let s=e.height-e.baseline;e.verticalAlign===c.oX.BOTTOM&&(s=c.gK);const l="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0;for(let e=0;e<i.length;e++)n.fillText(i[e],l,(e+1)*a-s);n.restore(),r&&n.canvas.remove()}}n.globalAlpha=1};let F=new WeakMap,K=new WeakMap;const V=e=>K.get(e),Y=(e,t)=>K.set(e,t),Z=e=>K.delete(e),G=()=>{F=new WeakMap,K=new WeakMap,ne=new WeakMap},X=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={seed:e.seed,strokeLineDash:"dashed"===e.strokeStyle?P(e.strokeWidth):"dotted"===e.strokeStyle?R(e.strokeWidth):void 0,disableMultiStroke:"solid"!==e.strokeStyle,strokeWidth:"solid"!==e.strokeStyle?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:4*e.strokeWidth,roughness:e.roughness,stroke:e.strokeColor,preserveVertices:t};switch(e.type){case"rectangle":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor,"ellipse"===e.type&&(n.curveFitting=1),n;case"line":case"freedraw":return(0,a.g6)(e.points)&&(n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error("Unimplemented type ".concat(e.type))}},q=(e,t)=>{let n=K.get(e);if(void 0===n)switch(F.delete(e),e.type){case"rectangle":if("round"===e.strokeSharpness){const r=e.width,i=e.height,o=.25*Math.min(r,i);n=t.path("M ".concat(o," 0 L ").concat(r-o," 0 Q ").concat(r," 0, ").concat(r," ").concat(o," L ").concat(r," ").concat(i-o," Q ").concat(r," ").concat(i,", ").concat(r-o," ").concat(i," L ").concat(o," ").concat(i," Q 0 ").concat(i,", 0 ").concat(i-o," L 0 ").concat(o," Q 0 0, ").concat(o," 0"),X(e,!0))}else n=t.rectangle(0,0,e.width,e.height,X(e));Y(e,n);break;case"diamond":{const[r,o,a,s,l,c,d,u]=(0,i.UC)(e);n="round"===e.strokeSharpness?t.path("M ".concat(r+.25*(a-r)," ").concat(o+.25*(s-o)," L ").concat(a-.25*(a-r)," ").concat(s-.25*(s-o),"\n C ").concat(a," ").concat(s,", ").concat(a," ").concat(s,", ").concat(a-.25*(a-l)," ").concat(s+.25*(c-s),"\n L ").concat(l+.25*(a-l)," ").concat(c-.25*(c-s),"\n C ").concat(l," ").concat(c,", ").concat(l," ").concat(c,", ").concat(l-.25*(l-d)," ").concat(c-.25*(c-u),"\n L ").concat(d+.25*(l-d)," ").concat(u+.25*(c-u),"\n C ").concat(d," ").concat(u,", ").concat(d," ").concat(u,", ").concat(d+.25*(r-d)," ").concat(u-.25*(u-o),"\n L ").concat(r-.25*(r-d)," ").concat(o+.25*(u-o),"\n C ").concat(r," ").concat(o,", ").concat(r," ").concat(o,", ").concat(r+.25*(a-r)," ").concat(o+.25*(s-o)),X(e,!0)):t.polygon([[r,o],[a,s],[l,c],[d,u]],X(e)),Y(e,n);break}case"ellipse":n=t.ellipse(e.width/2,e.height/2,e.width,e.height,X(e)),Y(e,n);break;case"line":case"arrow":{const r=X(e),o=e.points.length?e.points:[[0,0]];if(n="sharp"===e.strokeSharpness?r.fill?[t.polygon(o,r)]:[t.linearPath(o,r)]:[t.curve(o,r)],"arrow"===e.type){const{startArrowhead:o=null,endArrowhead:a="arrow"}=e,s=(e,n,o,a)=>{const s=(0,i.Y5)(e,n,o,a);if(null===s)return[];if("dot"===a){const[n,i,o]=s;return[t.circle(n,i,o,Object.assign(Object.assign({},r),{fill:e.strokeColor,fillStyle:"solid",stroke:"none"}))]}if("triangle"===a){const[n,i,o,a,l,c]=s;return delete r.strokeLineDash,[t.polygon([[n,i],[o,a],[l,c],[n,i]],Object.assign(Object.assign({},r),{fill:e.strokeColor,fillStyle:"solid"}))]}const[l,c,d,u,h,p]=s;if("dotted"===e.strokeStyle){const t=R(e.strokeWidth-1);r.strokeLineDash=[t[0],t[1]-1]}else delete r.strokeLineDash;return[t.line(d,u,l,c,r),t.line(h,p,l,c,r)]};if(null!==o){const t=s(e,n,"start",o);n.push(...t)}if(null!==a){const t=s(e,n,"end",a);n.push(...t)}}Y(e,n);break}case"freedraw":re(e),n=(0,a.g6)(e.points)?t.polygon(e.points,Object.assign(Object.assign({},X(e)),{stroke:"none"})):null,Y(e,n);break;case"text":case"image":Y(e,null)}},J=(e,t)=>{const n=t?t.zoom:A.zoom,a=F.get(e),l=a&&a.canvasZoom!==n.value&&!(null!=t&&t.shouldCacheIgnoreZoom);if(!a||l||a.theme!==t.theme){const a=((e,t,n)=>{const a=document.createElement("canvas"),l=a.getContext("2d"),c=B(e);let d=0,u=0;if((0,r.bt)(e)||(0,r.F9)(e)){const[n,r,s,h]=(0,i.qf)(e);a.width=(0,o.TE)(n,s)*window.devicePixelRatio*t.value+c*t.value*2,a.height=(0,o.TE)(r,h)*window.devicePixelRatio*t.value+c*t.value*2,d=e.x>n?(0,o.TE)(e.x,n)*window.devicePixelRatio*t.value:0,u=e.y>r?(0,o.TE)(e.y,r)*window.devicePixelRatio*t.value:0,l.translate(d,u)}else a.width=e.width*window.devicePixelRatio*t.value+c*t.value*2,a.height=e.height*window.devicePixelRatio*t.value+c*t.value*2;l.save(),l.translate(c*t.value,c*t.value),l.scale(window.devicePixelRatio*t.value,window.devicePixelRatio*t.value);const h=s.Z.canvas(a);return z(e,n)&&(l.filter=O),U(e,h,l,n),l.restore(),{element:e,canvas:a,theme:n.theme,canvasZoom:t.value,canvasOffsetX:d,canvasOffsetY:u}})(e,n,t);return F.set(e,a),a}return a},Q=(e,t,n,o)=>{const a=e.element,s=B(a);let[l,c,d,u]=(0,i.qf)(a);(0,r.F9)(a)&&(l=Math.floor(l),d=Math.ceil(d),c=Math.floor(c),u=Math.ceil(u));const h=((l+d)/2+o.scrollX)*window.devicePixelRatio,p=((c+u)/2+o.scrollY)*window.devicePixelRatio,g=D(a,o),f="scale"in e.element&&!g?e.element.scale[0]:1,m="scale"in e.element&&!g?e.element.scale[1]:1;n.save(),n.scale(1/window.devicePixelRatio*f,1/window.devicePixelRatio*m),n.translate(h*f,p*m),n.rotate(a.angle*f*m),n.drawImage(e.canvas,-(d-l)/2*window.devicePixelRatio-s*e.canvasZoom/e.canvasZoom,-(u-c)/2*window.devicePixelRatio-s*e.canvasZoom/e.canvasZoom,e.canvas.width/e.canvasZoom,e.canvas.height/e.canvasZoom),n.restore()},$=(e,t,n,r)=>{const o=t.generator;switch(e.type){case"selection":n.save(),n.translate(e.x+r.scrollX,e.y+r.scrollY),n.fillStyle="rgba(0, 0, 255, 0.10)",n.fillRect(0,0,e.width,e.height),n.restore();break;case"freedraw":if(q(e,o),r.isExporting){const t=J(e,r);Q(t,0,n,r)}else{const[o,a,s,l]=(0,i.qf)(e),c=(o+s)/2+r.scrollX,d=(a+l)/2+r.scrollY,u=(s-o)/2-(e.x-o),h=(l-a)/2-(e.y-a);n.save(),n.translate(c,d),n.rotate(e.angle),n.translate(-u,-h),U(e,t,n,r),n.restore()}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":if(q(e,o),r.isExporting){const[o,a,s,l]=(0,i.qf)(e),c=(o+s)/2+r.scrollX,d=(a+l)/2+r.scrollY,u=(s-o)/2-(e.x-o),h=(l-a)/2-(e.y-a);n.save(),n.translate(c,d),n.rotate(e.angle),n.translate(-u,-h),z(e,r)&&(n.filter="none"),U(e,t,n,r),n.restore()}else{const t=J(e,r);Q(t,0,n,r)}break;default:throw new Error("Unimplemented type ".concat(e.type))}},ee=(e,t,n)=>{if(void 0===n)return e.draw(t);const r={sets:t.sets,shape:t.shape,options:Object.assign(Object.assign({},t.options),{fixedDecimalPlaceDigits:n})};return e.draw(r)},te=(e,t,n,s,l,d,u)=>{const[h,p,g,f]=(0,i.qf)(e),m=(g-h)/2-(e.x-h),b=(f-p)/2-(e.y-p),v=180*e.angle/Math.PI,x=t.generator;let y=n;if(e.link){const t=n.ownerDocument.createElementNS(c.hR,"a");t.setAttribute("href",e.link),y.appendChild(t),y=t}switch(e.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":{q(e,x);const n=ee(t,V(e),c.zK),r=e.opacity/100;1!==r&&(n.setAttribute("stroke-opacity","".concat(r)),n.setAttribute("fill-opacity","".concat(r))),n.setAttribute("stroke-linecap","round"),n.setAttribute("transform","translate(".concat(l||0," ").concat(d||0,") rotate(").concat(v," ").concat(m," ").concat(b,")")),y.appendChild(n);break}case"line":case"arrow":{q(e,x);const r=n.ownerDocument.createElementNS(c.hR,"g"),i=e.opacity/100;r.setAttribute("stroke-linecap","round"),V(e).forEach((n=>{const o=ee(t,n,c.zK);1!==i&&(o.setAttribute("stroke-opacity","".concat(i)),o.setAttribute("fill-opacity","".concat(i))),o.setAttribute("transform","translate(".concat(l||0," ").concat(d||0,") rotate(").concat(v," ").concat(m," ").concat(b,")")),"line"===e.type&&(0,a.g6)(e.points)&&"transparent"!==e.backgroundColor&&o.setAttribute("fill-rule","evenodd"),r.appendChild(o)})),y.appendChild(r);break}case"freedraw":{q(e,x),re(e);const r=e.opacity/100,i=V(e),o=i?ee(t,i,c.zK):n.ownerDocument.createElementNS(c.hR,"g");1!==r&&(o.setAttribute("stroke-opacity","".concat(r)),o.setAttribute("fill-opacity","".concat(r))),o.setAttribute("transform","translate(".concat(l||0," ").concat(d||0,") rotate(").concat(v," ").concat(m," ").concat(b,")")),o.setAttribute("stroke","none");const a=n.ownerDocument.createElementNS(c.hR,"path");a.setAttribute("fill",e.strokeColor),a.setAttribute("d",ie(e)),o.appendChild(a),y.appendChild(o);break}case"image":{const t=(0,r.wi)(e)&&s[e.fileId];if(t){const r="image-".concat(t.id);let i=n.querySelector("#".concat(r));if(!i){i=n.ownerDocument.createElementNS(c.hR,"symbol"),i.id=r;const e=n.ownerDocument.createElementNS(c.hR,"image");e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("href",t.dataURL),i.appendChild(e),y.prepend(i)}const o=n.ownerDocument.createElementNS(c.hR,"use");o.setAttribute("href","#".concat(r)),u&&t.mimeType!==c.LO.svg&&o.setAttribute("filter",O),o.setAttribute("width","".concat(Math.round(e.width))),o.setAttribute("height","".concat(Math.round(e.height))),o.setAttribute("transform","translate(".concat(l||0," ").concat(d||0,") rotate(").concat(v," ").concat(m," ").concat(b,")")),y.appendChild(o)}break}default:if(!(0,r.iB)(e))throw new Error("Unimplemented type ".concat(e.type));{const t=e.opacity/100,r=n.ownerDocument.createElementNS(c.hR,"g");1!==t&&(r.setAttribute("stroke-opacity","".concat(t)),r.setAttribute("fill-opacity","".concat(t))),r.setAttribute("transform","translate(".concat(l||0," ").concat(d||0,") rotate(").concat(v," ").concat(m," ").concat(b,")"));const i=e.text.replace(/\r\n?/g,"\n").split("\n"),a=e.height/i.length,s=e.height-e.baseline,u="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,h=(0,o.dZ)(e.text)?"rtl":"ltr",p="center"===e.textAlign?"middle":"right"===e.textAlign||"rtl"===h?"end":"start";for(let t=0;t<i.length;t++){const l=n.ownerDocument.createElementNS(c.hR,"text");l.textContent=i[t],l.setAttribute("x","".concat(u)),l.setAttribute("y","".concat((t+1)*a-s)),l.setAttribute("font-family",(0,o.$g)(e)),l.setAttribute("font-size","".concat(e.fontSize,"px")),l.setAttribute("fill",e.strokeColor),l.setAttribute("text-anchor",p),l.setAttribute("style","white-space: pre;"),l.setAttribute("direction",h),r.appendChild(l)}y.appendChild(r)}}};let ne=new WeakMap([]);function re(e){const t=ie(e),n=new Path2D(t);return ne.set(e,n),n}function ie(e){return function(e){if(!e.length)return"";const t=e.length-1;return e.reduce(((e,n,r,i)=>(r===t?e.push(n,oe(n,i[0]),"L",i[0],"Z"):e.push(n,oe(n,i[r+1])),e)),["M",e[0],"Q"]).join(" ").replace(ae,"$1")}(M(e.simulatePressure?e.points:e.points.length?e.points.map(((t,n)=>{let[r,i]=t;return[r,i,e.pressures[n]]})):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:4.25*e.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:e=>Math.sin(e*Math.PI/2),last:!!e.lastCommittedPoint}))}function oe(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}const ae=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:(e,t,n)=>{"use strict";n.d(t,{Eu:()=>_,M_:()=>L});var r=n(5284),i=n(5118);var o=n(756),a=n(1868),s=n(6202),l=n(8982),c=n(6938),d=n(242),u=n(2325),h=n(8290),p=n(6340);let g;!function(e){e.ACTIVE="active",e.AWAY="away",e.IDLE="idle"}(g||(g={}));var f=n(8288),m=n(2383);const b=(0,p.Q5)(),v=function(e,t,n,r,i,o,a,s){let l=arguments.length>8&&void 0!==arguments[8]&&arguments[8];e.save(),e.translate(o,a),e.rotate(s),l&&e.fillRect(t-o,n-a,r,i),e.strokeRect(t-o,n-a,r,i),e.restore()},x=(e,t,n,r)=>{e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fill(),e.stroke()},y=(e,t,n,u,p,m,y)=>{if(null===m)return{atLeastOneVisibleElement:!1};const{renderScrollbars:w=!0,renderSelection:_=!0,renderGrid:S=!0,isExporting:I}=y,T=m.getContext("2d");T.setTransform(1,0,0,1,0,0),T.save(),T.scale(u,u);const L=m.width/u,O=m.height/u;if(I&&"dark"===y.theme&&(T.filter=f.ZF),"string"==typeof y.viewBackgroundColor){("transparent"===y.viewBackgroundColor||5===y.viewBackgroundColor.length||9===y.viewBackgroundColor.length||/(hsla|rgba)\(/.test(y.viewBackgroundColor))&&T.clearRect(0,0,L,O),T.save(),T.fillStyle=y.viewBackgroundColor,T.fillRect(0,0,L,O),T.restore()}else T.clearRect(0,0,L,O);T.save(),T.scale(y.zoom.value,y.zoom.value),S&&t.gridSize&&((e,t,n,r,i,o)=>{e.save(),e.strokeStyle="rgba(0,0,0,0.1)",e.beginPath();for(let a=n;a<n+i+2*t;a+=t)e.moveTo(a,r-t),e.lineTo(a,r+o+2*t);for(let a=r;a<r+o+2*t;a+=t)e.moveTo(n-t,a),e.lineTo(n+i+2*t,a);e.stroke(),e.restore()})(T,t.gridSize,-Math.ceil(y.zoom.value/t.gridSize)*t.gridSize+y.scrollX%t.gridSize,-Math.ceil(y.zoom.value/t.gridSize)*t.gridSize+y.scrollY%t.gridSize,L/y.zoom.value,O/y.zoom.value);const A=e.filter((e=>M(e,L,O,{zoom:y.zoom,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,scrollX:y.scrollX,scrollY:y.scrollY})));if(A.forEach((e=>{try{(0,s.lw)(e,p,T,y),I||j(e,T,t)}catch(e){console.error(e)}})),t.editingLinearElement){const e=c._.getElement(t.editingLinearElement.elementId);e&&((e,t,n,r)=>{e.save(),e.translate(n.scrollX,n.scrollY),e.lineWidth=1/n.zoom.value,c._.getPointsGlobalCoordinates(r).forEach(((r,i)=>{var o,a;e.strokeStyle="red",e.setLineDash([]),e.fillStyle=null!==(o=t.editingLinearElement)&&void 0!==o&&null!==(a=o.selectedPointsIndices)&&void 0!==a&&a.includes(i)?"rgba(255, 127, 127, 0.9)":"rgba(255, 255, 255, 0.9)";const{POINT_HANDLE_SIZE:s}=c._;x(e,r[0],r[1],s/2/n.zoom.value)})),e.restore()})(T,t,y,e)}if(n)try{(0,s.lw)(n,p,T,y)}catch(e){console.error(e)}if((0,h.N1)(t)&&t.suggestedBindings.filter((e=>null!=e)).forEach((e=>{C(T,y,e)})),_&&!t.multiElement&&!t.editingLinearElement){const n=e.reduce(((e,n)=>{const o=[];if(t.selectedElementIds[n.id]&&!(0,d.zq)(t,n)&&o.push(r.black),y.remoteSelectedElementIds[n.id]&&o.push(...y.remoteSelectedElementIds[n.id].map((e=>{var n;const r=null===(n=t.collaborators.get(e))||void 0===n?void 0:n.avatarUrl,{background:i}=(0,l.X)(r||e,t);return i}))),o.length){const[t,r,a,s]=(0,i.qf)(n);e.push({angle:n.angle,elementX1:t,elementY1:r,elementX2:a,elementY2:s,selectionColors:o})}return e}),[]),o=t=>{const o=(0,d.Fb)(e,t),[a,s,l,c]=(0,i.KP)(o);n.push({angle:0,elementX1:a,elementX2:l,elementY1:s,elementY2:c,selectionColors:[r.black]})};for(const e of(0,d.iJ)(t))o(e);t.editingGroupId&&o(t.editingGroupId),n.forEach((e=>E(T,y,e)));const s=(0,a.eD)(e,t);if(T.save(),T.translate(y.scrollX,y.scrollY),1===s.length){T.fillStyle=r.white;const e=(0,i.PC)(s[0],y.zoom,"mouse");t.viewModeEnabled||k(T,y,e,s[0].angle)}else if(s.length>1&&!t.isRotating){const e=4/y.zoom.value;T.fillStyle=r.white;const[t,n,o,a]=(0,i.KP)(s),l=T.getLineDash();T.setLineDash([2/y.zoom.value]);const c=T.lineWidth;T.lineWidth=1/y.zoom.value,v(T,t-e,n-e,o-t+2*e,a-n+2*e,(t+o)/2,(n+a)/2,0),T.lineWidth=c,T.setLineDash(l);const d=(0,i.kK)([t,n,o,a],0,y.zoom,"mouse",i.ox);s.some((e=>!e.locked))&&k(T,y,d,0)}T.restore()}T.restore();for(const e in y.remotePointerViewportCoords){var D;let{x:n,y:i}=y.remotePointerViewportCoords[e];n-=t.offsetLeft,i-=t.offsetTop;const o=9,a=14,s=n<0||n>L-o||i<0||i>O-a;n=Math.max(n,0),n=Math.min(n,L-o),i=Math.max(i,0),i=Math.min(i,O-a);const c=null===(D=t.collaborators.get(e))||void 0===D?void 0:D.avatarUrl,{background:d,stroke:u}=(0,l.X)(c||e,t);T.save(),T.strokeStyle=u,T.fillStyle=d;const h=y.remotePointerUserStates[e];(s||h===g.AWAY)&&(T.globalAlpha=.48),y.remotePointerButton&&"down"===y.remotePointerButton[e]&&(T.beginPath(),T.arc(n,i,15,0,2*Math.PI,!1),T.lineWidth=3,T.strokeStyle="#ffffff88",T.stroke(),T.closePath(),T.beginPath(),T.arc(n,i,15,0,2*Math.PI,!1),T.lineWidth=1,T.strokeStyle=u,T.stroke(),T.closePath()),T.beginPath(),T.moveTo(n,i),T.lineTo(n+1,i+14),T.lineTo(n+4,i+9),T.lineTo(n+9,i+10),T.lineTo(n,i),T.fill(),T.stroke();const p=y.remotePointerUsernames[e];let f="";h===g.AWAY?f=b?"⚫️":" (".concat(g.AWAY,")"):h===g.IDLE?f=b?"💤":" (".concat(g.IDLE,")"):h===g.ACTIVE&&(f=b?"🟢":"");const m="".concat(p?"".concat(p," "):"").concat(f);if(!s&&m){const e=n+o,t=i+a,s=4,l=4,c=T.measureText(m),h=c.actualBoundingBoxDescent+c.actualBoundingBoxAscent;T.fillStyle=u,T.fillRect(e-1,t-1,c.width+2*s+2,h+2*l+2),T.fillStyle=d,T.fillRect(e,t,c.width+2*s,h+2*l),T.fillStyle=r.white,T.fillText(m,e+s,t+l+c.actualBoundingBoxAscent)}T.restore(),T.closePath()}let z;return w&&(z=(0,o.tJ)(e,L,O,y),T.save(),T.fillStyle=o.w1,T.strokeStyle="rgba(255,255,255,0.8)",[z.horizontal,z.vertical].forEach((e=>{e&&((e,t,n,r,i,o)=>{e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill(),e.stroke()})(T,e.x,e.y,e.width,e.height,o.nn/2)})),T.restore()),T.restore(),{atLeastOneVisibleElement:A.length>0,scrollBars:z}},w=(0,p.hR)(((e,t,n,r,i,o,a,s)=>{const l=y(e,t,n,r,i,o,a);null==s||s(l)}),{trailing:!0}),_=(e,t,n,r,i,o,a,s,l)=>{if(l)return void w(e,t,n,r,i,o,a,s);const c=y(e,t,n,r,i,o,a);return null==s||s(c),c},k=(e,t,n,r)=>{Object.keys(n).forEach((i=>{const o=n[i];void 0!==o&&(e.save(),e.lineWidth=1/t.zoom.value,"rotation"===i?x(e,o[0]+o[2]/2,o[1]+o[3]/2,o[2]/2):v(e,o[0],o[1],o[2],o[3],o[0]+o[2]/2,o[1]+o[3]/2,r,!0),e.restore())}))},E=(e,t,n)=>{const{angle:r,elementX1:i,elementY1:o,elementX2:a,elementY2:s,selectionColors:l}=n,c=a-i,d=s-o,u=4/t.zoom.value,h=8/t.zoom.value,p=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;const g=l.length;for(let t=0;t<g;++t)e.strokeStyle=l[t],e.setLineDash([h,p+(h+p)*(g-1)]),e.lineDashOffset=(h+p)*t,v(e,i-u,o-u,c+2*u,d+2*u,i+c/2,o+d/2,r);e.restore()},C=(e,t,n)=>{const r=Array.isArray(n)?I:S;e.save(),e.translate(t.scrollX,t.scrollY),r(e,n),e.restore()},S=(e,t)=>{const[n,r,o,a]=(0,i.qf)(t),s=o-n,l=a-r,c=(0,u.fb)(t,s,l);e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=c-4;const d=2+c/2;switch(t.type){case"rectangle":case"text":case"image":v(e,n-d,r-d,s+2*d,l+2*d,n+s/2,r+l/2,t.angle);break;case"diamond":const i=Math.hypot(s,l);((e,t,n,r,i,o)=>{e.save(),e.translate(r,i),e.rotate(o),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()})(e,s+2*(d*i/l),l+2*(d*i/s),n+s/2,r+l/2,t.angle);break;case"ellipse":((e,t,n,r,i,o)=>{e.beginPath(),e.ellipse(r,i,t/2,n/2,o,0,2*Math.PI),e.stroke()})(e,s+2*d,l+2*d,n+s/2,r+l/2,t.angle)}},I=(e,t)=>{const[n,r,i]=t,o=(0,u.fb)(i,i.width,i.height);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)";("both"===r?[0,-1]:"start"===r?[0]:[-1]).forEach((t=>{const[r,i]=c._.getPointAtIndexGlobalCoordinates(n,t);x(e,r,i,o)}))};let T;const j=(e,t,n)=>{if(e.link&&!n.selectedElementIds[e.id]){const[r,o,a,s]=(0,i.qf)(e),[l,c,d,u]=(0,m.sw)([r,o,a,s],e.angle,n),h=l+d/2,p=c+u/2;if(t.save(),t.translate(n.scrollX+h,n.scrollY+p),t.rotate(e.angle),T&&T.zoom===n.zoom.value)t.drawImage(T,l-h,c-p,d,u);else{T=document.createElement("canvas"),T.zoom=n.zoom.value,T.width=d*window.devicePixelRatio*n.zoom.value,T.height=u*window.devicePixelRatio*n.zoom.value;const e=T.getContext("2d");e.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),e.fillStyle="#fff",e.fillRect(0,0,d,u),e.drawImage(m.rj,0,0,d,u),e.restore(),t.drawImage(T,l-h,c-p,d,u)}t.restore()}},M=(e,t,n,r)=>{const[o,a,s,l]=(0,i.Pi)(e),c=(0,p.dE)({clientX:r.offsetLeft,clientY:r.offsetTop},r),d=(0,p.dE)({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return c.x<=s&&c.y<=l&&d.x>=o&&d.y>=a},L=function(e,t,n,r){let{offsetX:i=0,offsetY:o=0,exportWithDarkMode:a=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};n&&e.forEach((e=>{if(!e.isDeleted)try{(0,s.Rg)(e,t,n,r,e.x+i,e.y+o,a)}catch(e){console.error(e)}}))}},1564:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5118);const i=e=>"string"==typeof e;class o{constructor(){this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.elementsMap=new Map}static mapElementToScene(e,t){i(e)?this.sceneMapById.set(e,t):this.sceneMapByElement.set(e,t)}static getScene(e){return i(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}getElementsIncludingDeleted(){return this.elements}getNonDeletedElements(){return this.nonDeletedElements}getElement(e){return this.elementsMap.get(e)||null}getNonDeletedElement(e){const t=this.getElement(e);return t&&(0,r.qP)(t)?t:null}replaceAllElements(e){this.elements=e,this.elementsMap.clear(),e.forEach((e=>{this.elementsMap.set(e.id,e),o.mapElementToScene(e,this)})),this.nonDeletedElements=(0,r.Lm)(this.elements),this.informMutation()}informMutation(){for(const e of Array.from(this.callbacks))e()}addCallback(e){if(this.callbacks.has(e))throw new Error;return this.callbacks.add(e),()=>{if(!this.callbacks.has(e))throw new Error;this.callbacks.delete(e)}}destroy(){o.sceneMapById.forEach(((e,t)=>{e===this&&o.sceneMapById.delete(t)})),this.callbacks.clear()}}o.sceneMapByElement=new WeakMap,o.sceneMapById=new Map;const a=o},8120:(e,t,n)=>{"use strict";n.d(t,{$b:()=>o,PD:()=>a,Zd:()=>s,M9:()=>l,gP:()=>c,bZ:()=>d,Un:()=>u,QG:()=>h,CJ:()=>p,OW:()=>g});var r=n(5118),i=n(1974);const o=e=>"rectangle"===e||"ellipse"===e||"diamond"===e||"line"===e||"freedraw"===e,a=e=>"image"!==e,s=e=>"rectangle"===e||"ellipse"===e||"diamond"===e||"freedraw"===e||"arrow"===e||"line"===e,l=e=>"rectangle"===e||"ellipse"===e||"diamond"===e||"arrow"===e||"line"===e,c=e=>"rectangle"===e||"arrow"===e||"line"===e||"diamond"===e,d=e=>"text"===e,u=e=>"arrow"===e,h=(e,t)=>{let n=null;for(let r=e.length-1;r>=0;--r){const i=e[r];if(!i.isDeleted&&t(i)){n=i;break}}return n},p=(e,t)=>e.filter((e=>!e.isDeleted&&t(e))),g=(e,t,n)=>{let o=null;for(let i=e.length-1;i>=0;--i){if(e[i].isDeleted)continue;const[a,s,l,c]=(0,r.qf)(e[i]);if(a<t&&t<l&&s<n&&n<c){o=e[i];break}}return(0,i.mG)(o,!1)?o:null}},4162:(e,t,n)=>{"use strict";n.d(t,{oj:()=>u,NL:()=>h,$D:()=>p,Cg:()=>f});var r=n(6852),i=n(8925),o=n(3547),a=n(6340),s=n(8288),l=n(8897),c=n(5523),d=n(5637);const u="\x3c!-- svg-source:excalidraw --\x3e",h=async function(e,t,n,i){let{exportBackground:a,exportPadding:c=s.qy,viewBackgroundColor:u}=i,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(e,n)=>{const r=document.createElement("canvas");return r.width=e*t.exportScale,r.height=n*t.exportScale,{canvas:r,scale:t.exportScale}};const[p,f,m,b]=g(e,c),{canvas:v,scale:x=1}=h(m,b),y=(0,l.im)(),{imageCache:w}=await(0,d.Xx)({imageCache:new Map,fileIds:(0,d.oA)(e).map((e=>e.fileId)),files:n});return(0,o.Eu)(e,t,null,x,r.Z.canvas(v),v,{viewBackgroundColor:a?u:null,scrollX:-p+c,scrollY:-f+c,zoom:y.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:t.exportWithDarkMode?"dark":"light",imageCache:w,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}),v},p=async(e,t,i)=>{const{exportPadding:a=s.qy,viewBackgroundColor:l,exportScale:d=1,exportEmbedScene:h}=t;let p="";if(h)try{p=await(await Promise.resolve().then(n.bind(n,673))).encodeSvgMetadata({text:(0,c.I_)(e,t,i||{},"local")})}catch(e){console.error(e)}const[f,m,b,v]=g(e,a),x=document.createElementNS(s.hR,"svg");x.setAttribute("version","1.1"),x.setAttribute("xmlns",s.hR),x.setAttribute("viewBox","0 0 ".concat(b," ").concat(v)),x.setAttribute("width","".concat(b*d)),x.setAttribute("height","".concat(v*d)),t.exportWithDarkMode&&x.setAttribute("filter",s.ZF);let y="https://excalidraw.com/";var w;if(y=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@dwelle/excalidraw","@").concat("0.3.76"),null!==(w=y)&&void 0!==w&&w.startsWith("/")&&(y=y.replace("/","".concat(window.location.origin,"/"))),y="".concat(y,"/dist/excalidraw-assets/"),x.innerHTML="\n ".concat(u,"\n ").concat(p,'\n <defs>\n <style>\n @font-face {\n font-family: "Virgil";\n src: url("https://excalidraw.com/Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("https://excalidraw.com/Cascadia.woff2");\n }\n </style>\n </defs>\n '),t.exportBackground&&l){const e=x.ownerDocument.createElementNS(s.hR,"rect");e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("width","".concat(b)),e.setAttribute("height","".concat(v)),e.setAttribute("fill",l),x.appendChild(e)}const _=r.Z.svg(x);return(0,o.M_)(e,_,x,i||{},{offsetX:-f+a,offsetY:-m+a,exportWithDarkMode:t.exportWithDarkMode}),x},g=(e,t)=>{const[n,r,o,s]=(0,i.KP)(e);return[n,r,(0,a.TE)(n,o)+2*t,(0,a.TE)(r,s)+t+t]},f=(e,t,n)=>{const[,,r,i]=g(e,t).map((e=>Math.trunc(e*n)));return[r,i]}},75:(e,t,n)=>{"use strict";n.d(t,{_4:()=>r._4,N:()=>i.N,Yp:()=>i.Yp,PR:()=>i.PR,eD:()=>i.eD,Zs:()=>i.Zs,W:()=>o.W,$b:()=>a.$b,Zd:()=>a.Zd,M9:()=>a.M9,Un:()=>a.Un,gP:()=>a.gP,QG:()=>a.QG,OW:()=>a.OW,bZ:()=>a.bZ,CJ:()=>a.CJ,j:()=>s.j});var r=n(756),i=n(1868),o=n(2264),a=n(8120),s=n(746)},2264:(e,t,n)=>{"use strict";n.d(t,{s:()=>o,W:()=>a});var r=n(5118),i=n(6340);const o=e=>{let{scenePoint:t,viewportDimensions:n,zoom:r}=e;return{scrollX:n.width/2*(1/r.value)-t.x,scrollY:n.height/2*(1/r.value)-t.y}},a=(e,t,n)=>{if(!(e=(0,r.n_)(e)).length)return{scrollX:0,scrollY:0};let[a,s,l,c]=(0,r.KP)(e);((e,t,n)=>{const[r,o,a,s]=n,{x:l,y:c}=(0,i._i)({sceneX:r,sceneY:o},e),{x:d,y:u}=(0,i._i)({sceneX:a,sceneY:s},e);return d-l>e.width||u-c>e.height})(t,0,[a,s,l,c])&&([a,s,l,c]=(0,r.os)(e,(0,i.dE)({clientX:t.scrollX,clientY:t.scrollY},t)));return o({scenePoint:{x:(a+l)/2,y:(s+c)/2},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})}},756:(e,t,n)=>{"use strict";n.d(t,{WM:()=>a,nn:()=>s,w1:()=>l,tJ:()=>c,_4:()=>d});var r=n(5118),i=n(6340),o=n(5202);const a=4,s=6,l="rgba(0,0,0,0.3)",c=(e,t,n,l)=>{let{scrollX:c,scrollY:d,zoom:u}=l;if(0===e.length)return{horizontal:null,vertical:null};const[h,p,g,f]=(0,r.KP)(e),m=t/u.value,b=n/u.value,v=t-m,x=n-b,y={top:parseInt((0,i.IH)("sat")),bottom:parseInt((0,i.IH)("sab")),left:parseInt((0,i.IH)("sal")),right:parseInt((0,i.IH)("sar"))},w=(0,o.G3)().rtl,_=v/2-c+y.left,k=x/2-d+y.top,E=_+m-y.right,C=k+b-y.bottom,S=Math.min(h,_),I=Math.min(p,k),T=Math.max(g,E),j=Math.max(f,C);return{horizontal:_===S&&E===T?null:{x:Math.max(y.left,a)+(_-S)/(T-S)*t,y:n-s-Math.max(a,y.bottom),width:(E-_)/(T-S)*t-Math.max(2*a,y.left+y.right),height:s},vertical:k===I&&C===j?null:{x:w?Math.max(y.left,a):t-s-Math.max(y.right,a),y:(k-I)/(j-I)*n+Math.max(y.top,a),width:s,height:(C-k)/(j-I)*n-Math.max(2*a,y.top+y.bottom)}}},d=(e,t,n)=>{const[r,i]=[e.horizontal,e.vertical].map((e=>null!=e&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height));return{isOverEither:r||i,isOverHorizontal:r,isOverVertical:i}}},1868:(e,t,n)=>{"use strict";n.d(t,{Yp:()=>o,N:()=>a,PR:()=>s,eD:()=>l,Zs:()=>c});var r=n(5118),i=n(1974);const o=(e,t)=>{const[n,o,a,s]=(0,r.qf)(t);return e.filter((e=>{const[t,l,c,d]=(0,r.Pi)(e);return!1===e.locked&&"selection"!==e.type&&!(0,i.Xh)(e)&&n<=t&&o<=l&&a>=c&&s>=d}))},a=(e,t)=>e.some((e=>t.selectedElementIds[e.id])),s=(e,t,n)=>{const r=Array.from(new Set(l(e,t).map((e=>n(e)))));return 1===r.length?r[0]:null},l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.filter((e=>t.selectedElementIds[e.id]||n&&(0,i.Xh)(e)&&t.selectedElementIds[null==e?void 0:e.containerId]?e:null))},c=(e,t)=>t.editingElement?[t.editingElement]:l(e,t,!0)},746:(e,t,n)=>{"use strict";n.d(t,{j:()=>r,E:()=>i});const r=e=>Math.max(.1,Math.min(e,30)),i=(e,t)=>{let{viewportX:n,viewportY:r,nextZoom:i}=e;const o=n-t.offsetLeft,a=r-t.offsetTop,s=t.zoom.value;return{scrollX:t.scrollX+(o-o/s)+-(o-o/i),scrollY:t.scrollY+(a-a/s)+-(a-a/i),zoom:{value:i}}}},6340:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>c,Oo:()=>d,wO:()=>u,_Z:()=>h,s:()=>p,$g:()=>g,mO:()=>f,Ds:()=>m,hR:()=>b,yo:()=>v,TE:()=>x,Om:()=>y,z8:()=>w,KJ:()=>_,OF:()=>C,Uk:()=>S,rB:()=>I,wo:()=>T,Pr:()=>j,uY:()=>M,dE:()=>L,_i:()=>O,IH:()=>A,dZ:()=>z,AK:()=>P,FG:()=>R,cx:()=>B,qr:()=>N,Qm:()=>H,PI:()=>W,tH:()=>U,$9:()=>F,Q5:()=>K,Ip:()=>V,qz:()=>Y,G3:()=>Z,C3:()=>G,xn:()=>X,h2:()=>q,ag:()=>J,v4:()=>Q,$h:()=>$,y8:()=>ee,xp:()=>te});var r=n(5284),i=n(56),o=n(8288),a=n(5156),s=n(6066);let l=null;const c=()=>{if(l)return l;const e=new Date,t=e.getFullYear(),n="".concat(e.getMonth()+1).padStart(2,"0"),r="".concat(e.getDate()).padStart(2,"0"),i="".concat(e.getHours()).padStart(2,"0"),o="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(i).concat(o)},d=e=>e.charAt(0).toUpperCase()+e.slice(1),u=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),h=e=>e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,p=e=>e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&("text"===e.type||"number"===e.type),g=e=>{let{fontFamily:t}=e;for(const[e,n]of Object.entries(o.ut))if(n===t)return"".concat(e,", ").concat(o._D);return o._D},f=e=>{let{fontSize:t,fontFamily:n}=e;return"".concat(t,"px ").concat(g({fontFamily:n}))},m=(e,t)=>{let n=0,r=null;const i=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];r=o,clearTimeout(n),n=window.setTimeout((()=>{r=null,e(...o)}),t)};return i.flush=()=>{if(clearTimeout(n),r){const t=r;r=null,e(...t)}},i.cancel=()=>{r=null,clearTimeout(n)},i},b=(e,t)=>{let n=null,r=null,i=null;const o=t=>{n=window.requestAnimationFrame((()=>{n=null,e(...t),r=null,i&&(r=i,i=null,o(r))}))},a=function(){for(var e=arguments.length,a=new Array(e),s=0;s<e;s++)a[s]=arguments[s];r=a,null===n?o(r):null!=t&&t.trailing&&(i=a)};return a.flush=()=>{null!==n&&(cancelAnimationFrame(n),n=null),r&&(e(...i||r),r=i=null)},a.cancel=()=>{r=i=null,null!==n&&(cancelAnimationFrame(n),n=null)},a},v=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0;const i=Array(Math.ceil(e.length/t));for(;n<e.length;)i[r++]=e.slice(n,n+=t);return i},x=(e,t)=>Math.abs(e-t),y=(e,t)=>"custom"===t.type?Object.assign(Object.assign({},e.activeTool),{type:"custom",customType:t.customType}):Object.assign(Object.assign({},e.activeTool),{lastActiveToolBeforeEraser:void 0===t.lastActiveToolBeforeEraser?e.activeTool.lastActiveToolBeforeEraser:t.lastActiveToolBeforeEraser,type:t.type,customType:null}),w=e=>{e&&(e.style.cursor="")},_=(e,t)=>{e&&(e.style.cursor=t)};let k,E;const C=(e,t)=>{k&&k.theme===t||(()=>{const e=t===o.C6.DARK;k=document.createElement("canvas"),k.theme=t,k.height=20,k.width=20;const n=k.getContext("2d");n.lineWidth=1,n.beginPath(),n.arc(k.width/2,k.height/2,5,0,2*Math.PI),n.fillStyle=e?r.black:r.white,n.fill(),n.strokeStyle=e?r.white:r.black,n.stroke(),E=k.toDataURL(o.LO.svg)})(),_(e,"url(".concat(E,") ").concat(10," ").concat(10,", auto"))},S=(e,t)=>{e&&("selection"===t.activeTool.type?w(e):"eraser"===t.activeTool.type?C(e,t.theme):["image","custom"].includes(t.activeTool.type)||(e.style.cursor=o.oc.CROSSHAIR))},I=()=>{var e;return"HTML"===(null===(e=document.fullscreenElement)||void 0===e?void 0:e.nodeName)},T=()=>document.documentElement.requestFullscreen(),j=()=>document.exitFullscreen(),M=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter").replace(/\bDel\b/i,"Delete"),s.Um?e.replace(/\bCtrlOrCmd\b/i,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/i,"Ctrl")),L=(e,t)=>{let{clientX:n,clientY:r}=e,{zoom:i,offsetLeft:o,offsetTop:a,scrollX:s,scrollY:l}=t;const c=1/i.value;return{x:(n-o)*c-s,y:(r-a)*c-l}},O=(e,t)=>{let{sceneX:n,sceneY:r}=e,{zoom:i,offsetLeft:o,offsetTop:a,scrollX:s,scrollY:l}=t;return{x:(n+s)*i.value+o,y:(r+l)*i.value+a}},A=e=>getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)),D=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),z=e=>D.test(e),P=e=>{const[t,n]=e;return{x:t,y:n}},R=e=>{if("AbortError"!==(null==e?void 0:e.name))throw e;console.warn(e)},B=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},N=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},H=e=>{const t=5===e.length&&"0"===e.substr(4,1),n=9===e.length&&"00"===e.substr(7,2);return t||n||e===i.Z.elementBackground[0]},W=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},U=e=>t=>{(0,a.unstable_batchedUpdates)(e,t)},F=e=>b((t=>{(0,a.unstable_batchedUpdates)(e,t)})),K=()=>{const e=document.createElement("canvas").getContext("2d");if(!e)return!1;return e.fillStyle="#f00",e.textBaseline="top",e.font="32px Arial",e.fillText("😀",0,0),0!==e.getImageData(12,12,1,1).data[0]},V=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;const{overflowY:e}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&("auto"===e||"scroll"===e||"overlay"===e))return t;t=t.parentElement}return document},Y=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1)return void t.focus();t=t.parentElement}},Z=e=>Array.from(e).map((e=>"0".concat(e.toString(16)).slice(-2))).join(""),G=()=>q()?1:Date.now(),X=e=>e.reduce(((e,t)=>(e.set("string"==typeof t?t:t.id,t),e)),new Map),q=()=>{var e;return"undefined"!=typeof process&&"test"===(null===(e={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.3.76",IS_EXCALIDRAW_NPM_PACKAGE:!0})||void 0===e?void 0:e.NODE_ENV)},J=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),Q=(e,t)=>{let n=!1;for(const r in t){const i=t[r];if(void 0!==i){if(e[r]===i&&("object"!=typeof i||null===i))continue;n=!0}}return n?Object.assign(Object.assign({},e),t):e},$=()=>{try{return window.self===window.top?"top":"iframe"}catch(e){return"iframe"}},ee=e=>!!e&&"object"==typeof e&&"then"in e&&"catch"in e&&"finally"in e,te=e=>{const t=null==e?void 0:e.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter((e=>e.tabIndex>-1&&!e.disabled)):[]}},9669:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:e=>{"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},1639:e=>{"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},3147:(e,t,n)=>{"use strict";e.exports=n.p+"excalidraw-assets/Cascadia.woff2"},3940:(e,t,n)=>{"use strict";e.exports=n.p+"excalidraw-assets/Virgil.woff2"},9787:t=>{"use strict";t.exports=e},5156:e=>{"use strict";e.exports=t},6612:(e,t,n)=>{"use strict";n.d(t,{x0:()=>r});let r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")}},5284:e=>{"use strict";e.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},1463:e=>{"use strict";e.exports=JSON.parse('{"labels":{"paste":"Paste","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Sharing","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Save as image","export":"Export","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save (to active file)","saveAs":"Save as","load":"Load","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","roomDialog":"Sharing","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","browserZoom":"Your browser\'s zoom level is not set to 100% which may cause the board to display incorrectly"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library"},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Prevent pinch-zoom and accept freedraw input only from pen","link":"Add/ Update link for a selected shape","eraser":"Eraser"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Double-click or press Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain_pre":"Encountered an error. Try ","headingMain_button":"reloading the page.","clearCanvasMessage":"If reloading doesn\'t work, try ","clearCanvasMessage_button":"clearing the canvas.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry_pre":"The error with identifier ","trackedToSentry_post":" was tracked on our system.","openIssueMessage_pre":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our ","openIssueMessage_button":"bug tracker.","openIssueMessage_post":" Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editSelectedShape":"Edit selected shape (text/arrow/line)","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":{"pre":"Submit your library to be included in the ","link":"public library repository","post":"for other people to use in their drawings."},"noteGuidelines":{"pre":"The library needs to be manually approved first. Please read the ","link":"guidelines","post":" before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required."},"noteLicense":{"pre":"By submitting, you agree the library will be published under the ","link":"MIT License, ","post":"which in short means anyone can use them without restrictions."},"noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status","link":"here"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection"},"colors":{"495057":"Gray 7","ffffff":"White","f8f9fa":"Gray 0","f1f3f5":"Gray 1","fff5f5":"Red 0","fff0f6":"Pink 0","f8f0fc":"Grape 0","f3f0ff":"Violet 0","edf2ff":"Indigo 0","e7f5ff":"Blue 0","e3fafc":"Cyan 0","e6fcf5":"Teal 0","ebfbee":"Green 0","f4fce3":"Lime 0","fff9db":"Yellow 0","fff4e6":"Orange 0","transparent":"Transparent","ced4da":"Gray 4","868e96":"Gray 6","fa5252":"Red 6","e64980":"Pink 6","be4bdb":"Grape 6","7950f2":"Violet 6","4c6ef5":"Indigo 6","228be6":"Blue 6","15aabf":"Cyan 6","12b886":"Teal 6","40c057":"Green 6","82c91e":"Lime 6","fab005":"Yellow 6","fd7e14":"Orange 6","000000":"Black","343a40":"Gray 8","c92a2a":"Red 9","a61e4d":"Pink 9","862e9c":"Grape 9","5f3dc4":"Violet 9","364fc7":"Indigo 9","1864ab":"Blue 9","0b7285":"Cyan 9","087f5b":"Teal 9","2b8a3e":"Green 9","5c940d":"Lime 9","e67700":"Yellow 9","d9480f":"Orange 9"}}')}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=a,l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);l.r(i);var o={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,l.d(i,o),i},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>"excalidraw-assets/vendor-6644c8f79d52085cf653.js",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},o="ExcalidrawLib:",l.l=(e,t,n,r)=>{if(i[e])i[e].push(t);else{var a,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+n){a=u;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,l.nc&&a.setAttribute("nonce",l.nc),a.setAttribute("data-webpack",o+n),a.src=e),i[e]=[t];var h=(t,n)=>{a.onerror=a.onload=null,clearTimeout(p);var r=i[e];if(delete i[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.p="",(()=>{l.b=document.baseURI||self.location.href;var e={388:0};l.f.j=(t,n)=>{var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=l.p+l.u(t),a=new Error;l.l(o,(n=>{if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,a,s]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in a)l.o(a,r)&&(l.m[r]=a[r]);if(s)s(l)}for(t&&t(n);c<o.length;c++)i=o[c],l.o(e,i)&&e[i]&&e[i][0](),e[o[c]]=0},n=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var c={};return(()=>{"use strict";l.r(c),l.d(c,{Excalidraw:()=>E,FONT_FAMILY:()=>e.ut,MIME_TYPES:()=>e.LO,THEME:()=>e.C6,bumpVersion:()=>m.ZP,cleanAppStateForExport:()=>x.s,clearAppStateForLocalStorage:()=>x.fx,defaultLang:()=>i.Fp,exportToBlob:()=>g.Fl,exportToCanvas:()=>g.NL,exportToClipboard:()=>g.i1,exportToSvg:()=>g.$D,getDefaultAppState:()=>x.im,getFreeDrawSvgPath:()=>g.N7,getNonDeletedElements:()=>h.Lm,getSceneVersion:()=>h.Uo,isInvisiblySmallElement:()=>h.QD,isLinearElement:()=>f.bt,jotaiScope:()=>u.yE,jotaiStore:()=>u.e_,languages:()=>i.Mj,libraryItemsAtom:()=>b.rF,loadFromBlob:()=>g.cT,loadLibraryFromBlob:()=>g.lV,loadSceneOrLibraryFromBlob:()=>g.ZY,mergeLibraryItems:()=>g.zh,mutateElement:()=>m.DR,newElementWith:()=>m.BE,parseLibraryTokensFromUrl:()=>b.Di,restore:()=>p.nu,restoreAppState:()=>p.lY,restoreElements:()=>p.ET,restoreLibraryItems:()=>p.wJ,sceneCoordsToViewportCoords:()=>v._i,serializeAsJSON:()=>g.I_,serializeLibraryAsJSON:()=>g.NI,useHandleLibrary:()=>b.xS,viewportCoordsToSceneCoords:()=>v.dE});var e=l(8288);"production"!==e.Vi.TEST&&(l.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@dwelle/excalidraw","@").concat("0.3.76","/dist/"));l(8336);var t=l(9787),n=l.n(t),r=l(5440),i=l(5202),o=l(1337);const a=e=>{const[n,a]=(0,t.useState)(!0);return(0,t.useEffect)((()=>{const t=i.Mj.find((t=>t.code===e.langCode))||i.Fp;(async()=>{await(0,i.m0)(t),a(!1)})()}),[e.langCode]),n?(0,o.jsx)(r.z,{}):e.children};var s=l(7067),d=(l(4285),l(3313),l(6131)),u=l(9487),h=l(5118),p=l(679),g=l(3024),f=l(1974),m=l(1935),b=l(7053),v=l(6340),x=l(8897),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const w=n=>{var r;const{onHomeButtonClick:l,onChange:c,initialData:h,excalidrawRef:p,onCollabButtonClick:g,isCollaborating:f=!1,onPointerUpdate:m,renderTopRightUI:b,renderFooter:v,langCode:x=i.Fp.code,viewModeEnabled:y,zenModeEnabled:w,gridModeEnabled:_,libraryReturnUrl:k,theme:E,name:C,renderCustomStats:S,onPaste:I,detectScroll:T=!0,handleKeyboardGlobally:j=!1,onLibraryChange:M,autoFocus:L=!1,generateIdForFile:O,onLinkOpen:A,onPointerDown:D,onScrollChange:z,id:P}=n,R=null===(r=n.UIOptions)||void 0===r?void 0:r.canvasActions,B=Object.assign(Object.assign({},n.UIOptions),{canvasActions:Object.assign(Object.assign({},e.cW.canvasActions),R)});var N;R&&"object"==typeof R.export&&(R.export.saveFileToDisk=(null===(N=R.export)||void 0===N?void 0:N.saveFileToDisk)||e.cW.canvasActions.export.saveFileToDisk);return(0,t.useEffect)((()=>{const e=e=>{"number"==typeof e.scale&&1!==e.scale&&e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),()=>{document.removeEventListener("touchmove",e)}}),[]),(0,o.jsx)(a,{langCode:x,children:(0,o.jsx)(d.zt,{unstable_createStore:()=>u.e_,scope:u.yE,children:(0,o.jsx)(s.ZP,{id:P,onHomeButtonClick:l,onChange:c,initialData:h,excalidrawRef:p,onCollabButtonClick:g,isCollaborating:f,onPointerUpdate:m,renderTopRightUI:b,renderFooter:v,langCode:x,viewModeEnabled:y,zenModeEnabled:w,gridModeEnabled:_,libraryReturnUrl:k,theme:E,name:C,renderCustomStats:S,UIOptions:B,onPaste:I,detectScroll:T,handleKeyboardGlobally:j,onLibraryChange:M,autoFocus:L,generateIdForFile:O,onLinkOpen:A,onPointerDown:D,onScrollChange:z})})})},_=(e,t)=>{const{initialData:n,UIOptions:r={}}=e,i=y(e,["initialData","UIOptions"]),{initialData:o,UIOptions:a={}}=t,s=y(t,["initialData","UIOptions"]),l=Object.keys(r),c=Object.keys(a);if(l.length!==c.length)return!1;const d=l.every((e=>{if("canvasActions"===e){Object.keys(r.canvasActions).every((e=>{var t,n,i,o;return null!=r&&r.canvasActions&&null!=a&&a.canvasActions?"export"===e&&null!=r&&null!==(t=r.canvasActions)&&void 0!==t&&t.export&&null!=a&&null!==(n=a.canvasActions)&&void 0!==n&&n.export?"function"==typeof r.canvasActions.export||"function"==typeof a.canvasActions.export?r.canvasActions.export===a.canvasActions.export:r.canvasActions.export.saveFileToDisk===a.canvasActions.export.saveFileToDisk:(null==r||null===(i=r.canvasActions)||void 0===i?void 0:i[e])===(null==a||null===(o=a.canvasActions)||void 0===o?void 0:o[e]):(null==r?void 0:r.canvasActions)===(null==a?void 0:a.canvasActions)}))}return!0})),u=Object.keys(e),h=Object.keys(t);return d&&u.length===h.length&&u.every((e=>i[e]===s[e]))},k=(0,t.forwardRef)(((e,t)=>(0,o.jsx)(w,Object.assign(Object.assign({},e),{excalidrawRef:t})))),E=n().memo(k,_);E.displayName="Excalidraw"})(),c})()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ExcalidrawLib=t(require("react"),require("react-dom")):e.ExcalidrawLib=t(e.React,e.ReactDOM)}(self,(function(e,t){return function(){var n,r,o,i,a={8336:function(e,t,n){var r=n(487),o=n(4295);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},554:function(e,t,n){var r=n(487),o=n(9135);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},2789:function(e,t,n){var r=n(487),o=n(3729);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},5080:function(e,t,n){var r=n(487),o=n(4241);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},7225:function(e,t,n){var r=n(487),o=n(6029);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},778:function(e,t,n){var r=n(487),o=n(9609);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4220:function(e,t,n){var r=n(487),o=n(2345);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4678:function(e,t,n){var r=n(487),o=n(9393);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},1292:function(e,t,n){var r=n(487),o=n(6578);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},196:function(e,t,n){var r=n(487),o=n(9482);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},2205:function(e,t,n){var r=n(487),o=n(7955);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},1310:function(e,t,n){var r=n(487),o=n(3195);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},3922:function(e,t,n){var r=n(487),o=n(2978);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},7096:function(e,t,n){var r=n(487),o=n(1587);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},7117:function(e,t,n){var r=n(487),o=n(9478);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},1106:function(e,t,n){var r=n(487),o=n(7369);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},3336:function(e,t,n){var r=n(487),o=n(1434);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4406:function(e,t,n){var r=n(487),o=n(8923);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},6043:function(e,t,n){var r=n(487),o=n(5605);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},694:function(e,t,n){var r=n(487),o=n(5644);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},8328:function(e,t,n){var r=n(487),o=n(6843);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},8051:function(e,t,n){var r=n(487),o=n(8461);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4301:function(e,t,n){var r=n(487),o=n(9935);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},9966:function(e,t,n){var r=n(487),o=n(532);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},9295:function(e,t,n){var r=n(487),o=n(7589);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},47:function(e,t,n){var r=n(487),o=n(5741);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},9781:function(e,t,n){var r=n(487),o=n(8465);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},371:function(e,t,n){var r=n(487),o=n(5892);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4623:function(e,t,n){var r=n(487),o=n(3874);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},1528:function(e,t,n){var r=n(487),o=n(2681);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},518:function(e,t,n){var r=n(487),o=n(4477);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},9757:function(e,t,n){var r=n(487),o=n(9650);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},5422:function(e,t,n){var r=n(487),o=n(2044);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},276:function(e,t,n){var r=n(487),o=n(9144);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},6781:function(e,t,n){var r=n(487),o=n(6626);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},580:function(e,t,n){var r=n(487),o=n(6359);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4285:function(e,t,n){var r=n(487),o=n(9915);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},3313:function(e,t,n){var r=n(487),o=n(9310);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},8635:function(e,t,n){var r=n(487),o=n(6464);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},4404:function(e,t,n){var r=n(487),o=n(5260);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},487:function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],c=t.base?i[0]+t.base:i[0],s=n[c]||0,u="".concat(c," ").concat(s);n[c]=s+1;var d=l(u),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:m(f,t),references:1}),r.push(u)}return r}function s(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function f(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,v=0;function m(e,t){var n,r,o;if(t.singleton){var i=v++;n=h||(h=s(t)),r=f.bind(null,n,i,!1),o=f.bind(null,n,i,!0)}else n=s(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);a[o].references--}for(var i=c(e,t),s=0;s<n.length;s++){var u=l(n[s]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=i}}}},940:function(e,t,n){var r={"./ar-SA.json":[7822,91],"./bg-BG.json":[1203,628],"./bn-BD.json":[8525,429],"./ca-ES.json":[510,130],"./cs-CZ.json":[7605,265],"./da-DK.json":[2392,790],"./de-DE.json":[2853,82],"./el-GR.json":[9876,513],"./en.json":[1463],"./es-ES.json":[9952,759],"./eu-ES.json":[5658,81],"./fa-IR.json":[3747,330],"./fi-FI.json":[9490,512],"./fr-FR.json":[7830,682],"./gl-ES.json":[5199,943],"./he-IL.json":[1994,312],"./hi-IN.json":[4646,828],"./hu-HU.json":[6373,368],"./id-ID.json":[3247,808],"./it-IT.json":[3257,239],"./ja-JP.json":[198,204],"./kab-KAB.json":[228,551],"./kk-KZ.json":[8972,22],"./ko-KR.json":[7596,844],"./lt-LT.json":[3755,340],"./lv-LV.json":[2327,768],"./mr-IN.json":[5297,397],"./my-MM.json":[7704,477],"./nb-NO.json":[1167,359],"./nl-NL.json":[290,24],"./nn-NO.json":[4481,885],"./oc-FR.json":[2284,690],"./pa-IN.json":[6773,162],"./percentages.json":[4451],"./pl-PL.json":[3661,674],"./pt-BR.json":[8881,721],"./pt-PT.json":[5622,395],"./ro-RO.json":[2013,89],"./ru-RU.json":[2253,124],"./si-LK.json":[5497,302],"./sk-SK.json":[4570,750],"./sl-SI.json":[1984,71],"./sv-SE.json":[6006,534],"./ta-IN.json":[3952,404],"./tr-TR.json":[7315,977],"./uk-UA.json":[334,579],"./vi-VN.json":[456,0],"./zh-CN.json":[1037,680],"./zh-HK.json":[5334,920],"./zh-TW.json":[931,421]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n.t(o,19)}))}o.keys=function(){return Object.keys(r)},o.id=940,e.exports=o},4295:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i),l=n(7157),c=n.n(l),s=new URL(n(3940),n.b),u=new URL(n(3147),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,'@font-face{font-family:"Virgil";src:url('+f+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+p+");font-display:swap}",""]),t.default=d},9135:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]),t.default=a},3729:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:2.5rem;height:2.5rem;border-radius:1.25rem;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.8rem;font-weight:500}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}",""]),t.default=a},4241:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",""]),t.default=a},6029:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]),t.default=a},9609:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#40c057;color:#fff;font-size:.6em;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]),t.default=a},2345:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i),l=n(7157),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:-10px}:root[dir=ltr] .excalidraw .color-picker-triangle{left:12px}:root[dir=rtl] .excalidraw .color-picker-triangle{right:12px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-11px}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, auto);grid-gap:.5rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+d+') left center}.excalidraw .color-picker-hash{background:var(--input-border-color);height:1.875rem;width:1.875rem;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:4px 0 0 4px}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 4px 4px 0}.excalidraw .color-input-container:focus-within .color-picker-hash{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-input-container:focus-within .color-picker-hash::before,.excalidraw .color-input-container:focus-within .color-picker-hash::after{content:"";width:1px;height:100%;position:absolute;top:0}.excalidraw .color-input-container:focus-within .color-picker-hash::before{background:var(--input-border-color)}:root[dir=ltr] .excalidraw .color-input-container:focus-within .color-picker-hash::before{right:-1px}:root[dir=rtl] .excalidraw .color-input-container:focus-within .color-picker-hash::before{left:-1px}.excalidraw .color-input-container:focus-within .color-picker-hash::after{background:var(--input-bg-color)}:root[dir=ltr] .excalidraw .color-input-container:focus-within .color-picker-hash::after{right:-2px}:root[dir=rtl] .excalidraw .color-input-container:focus-within .color-picker-hash::after{left:-2px}.excalidraw .color-input-container{display:flex}.excalidraw .color-picker-input{width:11ch;margin:0;font-size:1rem;background-color:var(--input-bg-color);color:var(--text-primary-color);border:0;outline:none;height:1.75em;box-shadow:var(--input-border-color) 0 0 0 1px inset;float:left;padding:1px;-webkit-padding-start:.5em;padding-inline-start:.5em;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 4px 4px 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:4px 0 0 4px}.excalidraw .color-picker-label-swatch{height:1.875rem;width:1.875rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem;border:1px solid #dee2e6;position:relative;overflow:hidden;background-color:rgba(0,0,0,0) !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#000}',""]),t.default=u},9393:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .confirm-dialog .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .confirm-dialog .ToolIcon_type_button{margin-left:.8rem;padding:0 .5rem}.excalidraw .confirm-dialog__content{font-size:1rem}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button{background-color:#fa5252}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button:hover{background-color:#e03131}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button .ToolIcon__icon{color:#fff}",""]),t.default=a},6578:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-option{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-option.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-option.dangerous .context-menu-option__label{color:#f03e3e}.excalidraw .context-menu-option .context-menu-option__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-option .context-menu-option__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-option:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-option:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-option:hover.dangerous .context-menu-option__label{color:var(--popup-bg-color)}.excalidraw .context-menu-option:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-option{display:block}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__shortcut{display:none}.excalidraw .context-menu-option-separator{border:none;border-top:1px solid #adb5bd}',""]),t.default=a},9482:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{display:grid;align-items:center;margin-top:0;grid-template-columns:1fr calc(var(--space-factor)*7);grid-gap:var(--metric);padding:calc(var(--space-factor)*2);text-align:center;font-variant:small-caps;font-size:1.2em}.excalidraw .Dialog__titleContent{flex:1}.excalidraw .Dialog .Modal__close{color:var(--icon-fill-color);margin:0}.excalidraw .Dialog__content{padding:0 16px 16px}.excalidraw--mobile.excalidraw .Dialog{--metric: calc(var(--space-factor) * 4);--inset-left: max(var(--metric), var(--sal));--inset-right: max(var(--metric), var(--sar))}.excalidraw--mobile.excalidraw .Dialog__title{grid-template-columns:calc(var(--space-factor)*7) 1fr calc(var(--space-factor)*7);position:-webkit-sticky;position:sticky;top:0;padding:calc(var(--space-factor)*2);background:var(--island-bg-color);font-size:1.25em;box-sizing:border-box;border-bottom:1px solid var(--button-gray-2);z-index:1}.excalidraw--mobile.excalidraw .Dialog__titleContent{text-align:center}.excalidraw--mobile.excalidraw .Dialog .Island{width:100vw;height:100%;box-sizing:border-box;overflow-y:auto;padding-left:max(calc(var(--padding) * var(--space-factor)), var(--sal));padding-right:max(calc(var(--padding) * var(--space-factor)), var(--sar));padding-bottom:max(calc(var(--padding) * var(--space-factor)), var(--sab))}.excalidraw--mobile.excalidraw .Dialog .Modal__close{order:-1}",""]),t.default=a},7955:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i),l=n(7157),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+d+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3)}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{width:5rem;height:5rem;margin:0 .2em;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]),t.default=u},3195:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--space-factor);top:var(--space-factor);right:var(--space-factor);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]),t.default=a},2978:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog h3{border-bottom:1px solid var(--button-gray-2);padding-bottom:4px}.excalidraw .HelpDialog--island{border:1px solid var(--button-gray-2);margin-bottom:16px}.excalidraw .HelpDialog--island-title{margin:0;padding:4px;background-color:var(--button-gray-1);text-align:center}.excalidraw .HelpDialog--shortcut{border-top:1px solid var(--button-gray-2)}.excalidraw .HelpDialog--key{word-break:keep-all;border:1px solid var(--button-gray-2);padding:2px 8px;margin:auto 4px;background-color:var(--button-gray-1);border-radius:2px;font-size:.8em;min-height:26px;box-sizing:border-box;display:flex;align-items:center;font-family:inherit}.excalidraw .HelpDialog--header{display:flex;flex-direction:row;justify-content:space-evenly;margin-bottom:32px;padding-bottom:16px}.excalidraw .HelpDialog--btn{border:1px solid var(--link-color);padding:8px 32px;border-radius:4px}.excalidraw .HelpDialog--btn:hover{text-decoration:none}",""]),t.default=a},1587:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:6px;text-align:center;color:#868e96;font-size:.8rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2em}.excalidraw .HintViewer>span{padding:.2rem .4rem;background-color:var(--overlay-bg-color);border-radius:4px}",""]),t.default=a},9478:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;opacity:.6;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label=transparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label=transparent] .picker-keybinding{color:#000}',""]),t.default=a},7369:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .Island{--padding: 0;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]),t.default=a},1434:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.layer-ui__sidebar{position:absolute;top:var(--sat);bottom:var(--sab);right:var(--sar);z-index:5;box-shadow:var(--shadow-island);overflow:hidden;border-radius:var(--border-radius-lg);margin:var(--space-factor);width:calc(302px - var(--space-factor) * 2)}.layer-ui__sidebar .Island{box-shadow:none}.layer-ui__sidebar .ToolIcon__icon{border-radius:var(--border-radius-md)}.layer-ui__sidebar .ToolIcon__icon__close .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;justify-content:center;align-items:center;color:var(--color-text)}.layer-ui__sidebar .Island{--padding: 0;background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(-76px, 0);transform:translate(-76px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(76px, 0);transform:translate(76px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center{pointer-events:none}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center>*{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left{margin-bottom:.2em}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto;-webkit-margin-end:1em;margin-inline-end:1em}",""]),t.default=a},8923:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .layer-ui__library{display:flex;align-items:center;justify-content:center}.excalidraw .layer-ui__library .layer-ui__library-header{display:flex;align-items:center;width:100%;margin:2px 0 15px 0}.excalidraw .layer-ui__library .layer-ui__library-header .Spinner{margin-right:1rem}.excalidraw .layer-ui__library .layer-ui__library-header button{margin:0 2px}.excalidraw .layer-ui__sidebar .layer-ui__library{padding:0;height:100%}.excalidraw .layer-ui__sidebar .library-menu-items-container{height:100%;width:100%}.excalidraw .layer-ui__library-message{padding:2em 4em;min-width:200px;display:flex;flex-direction:column;align-items:center}.excalidraw .layer-ui__library-message .Spinner{margin-bottom:1em}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-browse-button{width:80%;min-height:22px;margin:0 auto;margin-top:1rem;padding:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw .library-menu-browse-button--mobile{min-height:22px;margin-left:auto}.excalidraw .library-menu-browse-button--mobile a{padding-right:0}",""]),t.default=a},5605:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .library-menu-items-container{display:flex;flex-direction:column;height:100%;padding:.5rem;box-sizing:border-box}.excalidraw .library-menu-items-container .library-actions{width:100%;display:flex;margin-right:auto;align-items:center}.excalidraw .library-menu-items-container .library-actions button .library-actions-counter{position:absolute;right:2px;bottom:2px;border-radius:50%;width:1em;height:1em;padding:1px;font-size:.7rem;background:#fff}.excalidraw .library-menu-items-container .library-actions--remove{background-color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--remove:hover{background-color:#e03131}.excalidraw .library-menu-items-container .library-actions--remove:active{background-color:#c92a2a}.excalidraw .library-menu-items-container .library-actions--remove svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--remove .library-actions-counter{color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--export{background-color:#94d82d}.excalidraw .library-menu-items-container .library-actions--export:hover{background-color:#74b816}.excalidraw .library-menu-items-container .library-actions--export:active{background-color:#66a80f}.excalidraw .library-menu-items-container .library-actions--export svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--export .library-actions-counter{color:#94d82d}.excalidraw .library-menu-items-container .library-actions--publish{background-color:#15aabf}.excalidraw .library-menu-items-container .library-actions--publish:hover{background-color:#1098ad}.excalidraw .library-menu-items-container .library-actions--publish:active{background-color:#0b7285}.excalidraw .library-menu-items-container .library-actions--publish svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--publish label{margin-left:-0.2em;margin-right:1.1em;color:#fff;font-size:.86em}.excalidraw .library-menu-items-container .library-actions--publish .library-actions-counter{color:#15aabf}.excalidraw .library-menu-items-container .library-actions--load{background-color:#228be6}.excalidraw .library-menu-items-container .library-actions--load:hover{background-color:#1c7ed6}.excalidraw .library-menu-items-container .library-actions--load:active{background-color:#1864ab}.excalidraw .library-menu-items-container .library-actions--load svg{color:#fff}.excalidraw .library-menu-items-container__items{flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}",""]),t.default=a},5644:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:63px;height:63px}.excalidraw .library-unit--hover{box-shadow:inset 0px 0px 0px 2px #339af0;border-color:#339af0}.excalidraw .library-unit--selected{box-shadow:inset 0px 0px 0px 2px #1971c2;border-color:#1971c2}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;left:2.3rem;bottom:2.3rem}.excalidraw .library-unit__checkbox .Checkbox-box{width:13px;height:13px;border-radius:2px;margin:.5em .5em .2em .2em;background-color:#d0ebff}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite}.excalidraw .library-unit__adder{position:absolute;left:40%;top:40%;width:2rem;height:2rem;margin-left:-10px;margin-top:-10px;pointer-events:none}.excalidraw .library-unit:hover .library-unit__adder{fill:#1c7ed6}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8);fill:#000}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}",""]),t.default=a},6843:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.7)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:0 2px 10px rgba(0,0,0,.25);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.excalidraw .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;align-items:center;justify-content:center}.excalidraw .Modal__close svg{height:calc(var(--space-factor)*5)}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",""]),t.default=a},8461:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",""]),t.default=a},9935:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px}",""]),t.default=a},532:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",""]),t.default=a},7589:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;padding:0 .8rem;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em;font-style:italic;font-size:14px;display:block}",""]),t.default=a},5741:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__sidebar-lock-button{margin-right:.2rem}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon_type_floating .side_lock_icon{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7)}.excalidraw .ToolIcon_type_floating .side_lock_icon svg{-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.side_lock_icon{background-color:var(--color-primary)}",""]),t.default=a},8465:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]),t.default=a},5892:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",""]),t.default=a},3874:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]),t.default=a},2681:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]),t.default=a},4477:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]),t.default=a},9650:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",""]),t.default=a},2044:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon{background-color:var(--button-gray-1)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:hover,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__icon{width:2.5rem;height:2.5rem;color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;height:1em;fill:var(--icon-fill-color);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit}.excalidraw .excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button:hover,.excalidraw .Modal .ToolIcon_type_button:hover,.excalidraw .ToolIcon_type_button:hover{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{visibility:hidden}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_radio:focus-visible+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:focus-visible+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_radio:active+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:active+.ToolIcon__icon{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.5em;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}@media(max-width: 425px){.excalidraw .Shape .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .Shape .ToolIcon__icon svg{height:.8em}}@media(max-width: 760px){.excalidraw .ToolIcon.ToolIcon_type_floating{display:inline-block;position:absolute;right:-8px;margin-left:0;border-radius:20px 0 0 20px;z-index:1;background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:hover{background-color:var(--button-gray-1)}.excalidraw .ToolIcon.ToolIcon_type_floating:active{background-color:var(--button-gray-2)}.excalidraw .ToolIcon.ToolIcon_type_floating .ToolIcon__icon{border-radius:inherit}.excalidraw .ToolIcon.ToolIcon_type_floating svg{position:static}.excalidraw .ToolIcon.ToolIcon__library{top:calc(var(--sat) + 100px)}.excalidraw .ToolIcon.ToolIcon__lock{top:calc(var(--sat) + 60px)}.excalidraw .ToolIcon.ToolIcon__penMode{top:calc(var(--sat) + 140px)}}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}",""]),t.default=a},9144:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar-container .ToolIcon_type_floating:not(.is-mobile) .ToolIcon__icon{padding:1px;background-color:var(--island-bg-color);box-shadow:1px 3px 4px 0px rgba(0,0,0,.15);border-radius:50%;transition:box-shadow .5s ease,-webkit-transform .5s ease;transition:box-shadow .5s ease,transform .5s ease;transition:box-shadow .5s ease,transform .5s ease,-webkit-transform .5s ease}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:focus-within+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:focus-within+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .App-toolbar-container .ToolIcon__hidden{box-shadow:none !important;background-color:rgba(0,0,0,0) !important;pointer-events:none !important}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock.ToolIcon_type_floating{margin-left:.1rem}.excalidraw .App-toolbar-container .ToolIcon__library{-webkit-margin-start:var(--space-factor);margin-inline-start:var(--space-factor)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon__icon{box-shadow:none;-webkit-transform:scale(0.9);transform:scale(0.9)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon_type_checkbox:not(:checked):not(:hover):not(:active)+.ToolIcon__icon svg{fill:#adb5bd;color:#adb5bd}.excalidraw .App-toolbar{border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px rgba(0,0,0,.01),1px 1px 5px rgba(0,0,0,.15)}.excalidraw .App-toolbar .ToolIcon:hover{--icon-fill-color: var( --color-primary-contrast-offset, var(--color-primary) );--keybinding-color: var( --color-primary-contrast-offset, var(--color-primary) )}.excalidraw .App-toolbar .ToolIcon:active{--icon-fill-color: #212529;--keybinding-color: #212529}.excalidraw .App-toolbar .ToolIcon .ToolIcon__icon{background:rgba(0,0,0,0);border-radius:var(--border-radius-lg)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw.theme--dark .App-toolbar .ToolIcon:active{--icon-fill-color: #dee2e6;--keybinding-color: #dee2e6}",""]),t.default=a},6626:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",""]),t.default=a},6359:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end}.excalidraw .UserList:empty{display:none}.excalidraw .UserList>*{pointer-events:all;margin:0 0 var(--space-factor) var(--space-factor)}.excalidraw .UserList_mobile{padding:0;justify-content:normal}.excalidraw .UserList_mobile>*{margin:0 var(--space-factor) var(--space-factor) 0}",""]),t.default=a},9915:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}",""]),t.default=a},9310:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i),l=n(7157),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: #868e96;--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: #212529;--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: #adb5bd;--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0 0 0 1px rgba(0, 0, 0, 0.01), 1px 1px 5px rgb(0 0 0 / 12%);--space-factor: 0.25rem;--text-primary-color: #343a40;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e2e1fc;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}.excalidraw.theme--dark{background:#000}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: #212529;--dropdown-icon: url("+p+');--focus-highlight-color: #228be6;--icon-fill-color: #ced4da;--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: rgba(30, 30, 30, 0.98);--keybinding-color: #868e96;--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 1px 1px 5px rgba(0, 0, 0, 0.3);--text-primary-color: #ced4da;--color-primary: #5650f0;--color-primary-darker: #4b46d8;--color-primary-darkest: #3e39be;--color-primary-light: #3f3d64}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin-top:.333rem;margin-bottom:.333rem;font-size:.75rem;color:var(--text-primary-color);font-weight:bold;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn h3:first-child,.excalidraw .panelColumn legend:first-child,.excalidraw .panelColumn .control-label:first-child{margin-top:0}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap}.excalidraw .panelColumn .buttonList label{margin-right:.25rem;font-size:.75rem;display:inline-block}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn .buttonList .ToolIcon{margin:0;-webkit-margin-end:8px;margin-inline-end:8px}.excalidraw .panelColumn .buttonList .ToolIcon:focus{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .panelColumn .buttonList .ToolIcon:hover{background-color:var(--button-gray-2)}.excalidraw .panelColumn .buttonList .ToolIcon:active{background-color:var(--button-gray-3)}.excalidraw .panelColumn .buttonList .ToolIcon:disabled{cursor:not-allowed}.excalidraw .panelColumn .buttonList .ToolIcon__icon{width:28px;height:28px}.excalidraw .panelColumn fieldset{margin:0;margin-top:.333rem;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button,.excalidraw .buttonList label{-webkit-user-select:none;user-select:none;background-color:var(--button-gray-1);border:0;border-radius:var(--border-radius-md);margin:.125rem 0;padding:.25rem;white-space:nowrap;cursor:pointer}.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button:hover,.excalidraw .buttonList label:hover{background-color:var(--button-gray-2)}.excalidraw button:active,.excalidraw .buttonList label:active{background-color:var(--button-gray-3)}.excalidraw button:disabled,.excalidraw .buttonList label:disabled{cursor:not-allowed}.excalidraw .active,.excalidraw .buttonList label.active{background-color:var(--color-primary);--icon-fill-color: #ffffff}.excalidraw .active:hover,.excalidraw .buttonList label.active:hover{background-color:var(--color-primary-darker)}.excalidraw .active:active,.excalidraw .buttonList label.active:active{background-color:var(--color-primary-darkest)}.excalidraw .buttonList.buttonListIcon label{display:inline-flex;justify-content:center;align-items:center}.excalidraw .buttonList.buttonListIcon label svg{width:35px;height:14px;padding:2px;opacity:.6}.excalidraw .buttonList.buttonListIcon label.active svg{opacity:1}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%;box-sizing:border-box}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .App-menu_top{grid-template-columns:auto -webkit-max-content auto;grid-template-columns:auto max-content auto;grid-gap:4px;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top>*{pointer-events:all}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:0;grid-template-columns:-webkit-min-content auto -webkit-min-content;grid-template-columns:min-content auto min-content;grid-gap:15px;align-items:flex-start;cursor:default;pointer-events:none !important}:root[dir=ltr] .excalidraw .App-menu_bottom{left:.25rem}:root[dir=rtl] .excalidraw .App-menu_bottom{right:.25rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;box-shadow:var(--shadow-island)}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .zIndexButton{margin:0;-webkit-margin-end:8px;margin-inline-end:8px;padding:5px;display:inline-flex;align-items:center;justify-content:center}.excalidraw .zIndexButton svg{width:18px;height:18px}.excalidraw .scroll-back-to-content{color:var(--popup-text-color);position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);padding:10px 20px;pointer-events:all}.excalidraw .help-icon{display:flex;cursor:pointer;fill:#868e96;padding:0;margin:0;background:none;color:var(--icon-fill-color)}.excalidraw .help-icon svg{width:1.5rem;height:1.5rem}.excalidraw .help-icon:hover{background:none}.excalidraw .reset-zoom-button{padding:.2em;background:rgba(0,0,0,0);color:var(--text-primary-color);font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:5px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--button-gray-2);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--button-gray-3)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--button-gray-2)}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',""]),t.default=d},6464:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,"",""]),a.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"},t.default=a},5260:function(e,t,n){"use strict";n.r(t);var r=n(5370),o=n.n(r),i=n(769),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]),t.default=a},3152:function(e,t,n){e.exports=n(7608)},741:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8758);function o(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"===(0,r.Z)(e))if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}},3868:function(e,t,n){"use strict";n.r(t);var r,o=n(8758);r=function(e){e.version="0.3.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n="undefined"!=typeof Buffer;function r(e){for(var n=-1,r=0,o=e.length-7;r<o;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])];for(;r<o+7;)n=n>>>8^t[255&(n^e[r++])];return-1^n}e.table=t,e.bstr=function(e){if(e.length>32768&&n)return r(new Buffer(e));for(var o=-1,i=e.length-1,a=0;a<i;)o=t[255&(o^e.charCodeAt(a++))]^o>>>8,o=t[255&(o^e.charCodeAt(a++))]^o>>>8;return a===i&&(o=o>>>8^t[255&(o^e.charCodeAt(a))]),-1^o},e.buf=function(e){if(e.length>1e4)return r(e);for(var n=-1,o=0,i=e.length-3;o<i;)n=(n=(n=(n=n>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o<i+3;)n=n>>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e){for(var n,r,o=-1,i=0,a=e.length;i<a;)(n=e.charCodeAt(i++))<128?o=o>>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),r=1023&e.charCodeAt(i++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|r>>6&15|3&n))])>>>8^t[255&(o^(128|63&r))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===("undefined"==typeof exports?"undefined":(0,o.Z)(exports))?r(exports):"function"==typeof define&&n.amdO?define((function(){var e={};return r(e),e})):r({}):r({})},6131:function(e,t,n){"use strict";n.d(t,{KO:function(){return K},Vv:function(){return C},cn:function(){return W},zt:function(){return B}});var r=n(489),o=n(668),i=n(9787);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=Symbol(),s=function(e){return!!e[c]},u=function(e){var t,n;null==(n=(t=e[c]).c)||n.call(t)},d=function e(t,n){var r=t[c].o,o=n[c].o;return r===o||t===o||s(r)&&e(r,n)},f=function(e){var t={o:e,c:null},n=new Promise((function(n){t.c=function(){t.c=null,n()},e.then(t.c,t.c)}));return n[c]=t,n},p=Object.defineProperty,h=Object.defineProperties,v=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,y=function(e,t,n){return t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},x=function(e){return"init"in e},w="r",k="w",_="c",E="s",S=function(e){var t,n,i=new WeakMap,l=new WeakMap,p=new Map;if(t=new Set,n=new Set,e){var S,C=a(e);try{for(C.s();!(S=C.n()).done;){var O=(0,o.Z)(S.value,2),j=O[0],I={v:O[1],r:0,d:new Map};Object.freeze(I),x(j)||console.warn("Found initial value for derived atom which can cause unexpected behavior",j),i.set(j,I)}}catch(e){C.e(e)}finally{C.f()}}var T,M=new WeakMap,L=new WeakMap,A=function(e){var t=L.get(e);return t||(t=new Map,L.set(e,t)),t},P=function e(t,n){if(t){var r=A(t),o=r.get(n);return o||(o=e(t.p,n))&&("p"in o&&o.p.then((function(){return r.delete(n)})),r.set(n,o)),o}return i.get(n)},D=function(e,t,n){if(Object.freeze(n),e){A(e).set(t,n)}else{var r=i.get(t);i.set(t,n),p.has(t)||p.set(t,r)}},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=arguments.length>2?arguments[2]:void 0;if(!n)return t;var r=new Map,o=!1;return n.forEach((function(n){var i,a=(null==(i=P(e,n))?void 0:i.r)||0;r.set(n,a),t.get(n)!==a&&(o=!0)})),t.size!==r.size||o?r:t},R=function(e,t,n,r,o){var i=P(e,t);if(i){if(o&&(!("p"in i)||!d(i.p,o)))return i;"p"in i&&u(i.p)}var a={v:n,r:(null==i?void 0:i.r)||0,d:z(e,null==i?void 0:i.d,r)};return i&&"v"in i&&Object.is(i.v,n)?a.d===i.d||a.d.size===i.d.size&&Array.from(a.d.keys()).every((function(e){return i.d.has(e)}))||Promise.resolve().then((function(){$(e)})):(++a.r,a.d.has(t)&&(a.d=new Map(a.d).set(t,a.r))),D(e,t,a),a},Z=function(e,t,n,r,o){var i=P(e,t);if(i){if(o&&(!("p"in i)||!d(i.p,o)))return i;"p"in i&&u(i.p)}var a={e:n,r:(null==i?void 0:i.r)||0,d:z(e,null==i?void 0:i.d,r)};return D(e,t,a),a},N=function(e,t,n,r){var o=P(e,t);if(o&&"p"in o){if(d(o.p,n))return o;u(o.p)}!function(e,t,n){var r=M.get(t);r||(r=new Map,M.set(t,r)),n.then((function(){r.get(e)===n&&(r.delete(e),r.size||M.delete(t))})),r.set(e,n)}(e,t,n);var i={p:n,r:(null==o?void 0:o.r)||0,d:z(e,null==o?void 0:o.d,r)};return D(e,t,i),i},B=function(e,t,n,r){if(n instanceof Promise){var o=f(n.then((function(n){R(e,t,n,r,o),$(e)})).catch((function(n){if(n instanceof Promise)return s(n)?n.then((function(){W(e,t,!0)})):n;Z(e,t,n,r,o),$(e)})));return N(e,t,o,r)}return R(e,t,n,r)},H=function(e,t){var n,r,o=P(e,t);if(o){"p"in o&&u(o.p);var i=(n=function(e,t){for(var n in t||(t={}))g.call(t,n)&&y(e,n,t[n]);if(m){var r,o=a(m(t));try{for(o.s();!(r=o.n()).done;)n=r.value,b.call(t,n)&&y(e,n,t[n])}catch(e){o.e(e)}finally{o.f()}}return e}({},o),r={i:o.r},h(n,v(r)));D(e,t,i)}else console.warn("[Bug] could not invalidate non existing atom",t)},W=function e(t,n,r){if(!r){var i=P(t,n);if(i){if(i.r!==i.i&&"p"in i&&!function(e){return!e[c].c}(i.p))return i;if(i.d.forEach((function(r,o){if(o!==n)if(l.has(o)){var i=P(t,o);i&&i.r===i.i&&e(t,o)}else e(t,o)})),Array.from(i.d).every((function(e){var n=(0,o.Z)(e,2),r=n[0],i=n[1],a=P(t,r);return a&&"v"in a&&a.r===i})))return i}}var a=new Set;try{var s=n.read((function(r){a.add(r);var o=r===n?P(t,r):e(t,r);if(o){if("e"in o)throw o.e;if("p"in o)throw o.p;return o.v}if(x(r))return r.init;throw new Error("no atom init")}));return B(t,n,s,a)}catch(e){if(e instanceof Promise){var u=f(e);return N(t,n,u,a)}return Z(t,n,e,a)}},U=function(e,t){return W(t,e)},F=function(e,t){return!t.l.size&&(!t.t.size||1===t.t.size&&t.t.has(e))},K=function e(t,n){var r=l.get(n);null==r||r.t.forEach((function(r){r!==n&&(H(t,r),e(t,r))}))},V=function e(t,n,r){var o=!0,i=n.write((function e(n,r){var o=W(t,n);if("e"in o)throw o.e;if("p"in o){if(null==r?void 0:r.unstable_promise)return o.p.then((function(){return e(n,r)}));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",n),o.p}if("v"in o)return o.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",n),new Error("no value found")}),(function(r,i){var a;if(r===n){if(!x(r))throw new Error("atom not writable");var l=function(e){var t=new Set,n=M.get(e);return n&&(M.delete(e),n.forEach((function(e,n){u(e),t.add(n)}))),t}(r);l.forEach((function(e){e!==t&&B(e,r,i)})),B(t,r,i),K(t,r)}else a=e(t,r,i);return o||$(t),a}),r);return o=!1,t=void 0,i},Y=function(e,t,n){var r=V(n,e,t);return $(n),r},G=function e(t,r){var o={t:new Set(r&&[r]),l:new Set};if(l.set(t,o),n.add(t),W(void 0,t).d.forEach((function(n,r){var o=l.get(r);o?o.t.add(t):r!==t&&e(r,t)})),function(e){return!!e.write}(t)&&t.onMount){var i=t.onMount((function(e){return Y(t,e)}));i&&(o.u=i)}return o},X=function e(t){var r,o=null==(r=l.get(t))?void 0:r.u;o&&o(),l.delete(t),n.delete(t);var i=P(void 0,t);i?i.d.forEach((function(n,r){if(r!==t){var o=l.get(r);o&&(o.t.delete(t),F(r,o)&&e(r))}})):console.warn("[Bug] could not find atom state to unmount",t)},q=function(e,t,n){var r=new Set(t.d.keys());null==n||n.forEach((function(t,n){if(r.has(n))r.delete(n);else{var o=l.get(n);o&&(o.t.delete(e),F(n,o)&&X(n))}})),r.forEach((function(t){var n=l.get(t);n?n.t.add(e):l.has(e)&&G(t,e)}))},$=function(e){if(e){A(e).forEach((function(t,n){if(t!==i.get(n)){var r=l.get(n);null==r||r.l.forEach((function(t){return t(e)}))}}))}else{for(;p.size;){var n=Array.from(p);p.clear(),n.forEach((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1],i=P(void 0,n);i&&i.d!==(null==r?void 0:r.d)&&q(n,i,null==r?void 0:r.d);var a=l.get(n);null==a||a.l.forEach((function(e){return e()}))}))}t.forEach((function(e){return e()}))}},J=function(e,t){t&&function(e){A(e).forEach((function(e,t){var n=i.get(t);(e.r>((null==n?void 0:n.r)||0)||"v"in e&&e.r===(null==n?void 0:n.r)&&e.d!==(null==n?void 0:n.d))&&(i.set(t,e),e.d!==(null==n?void 0:n.d)&&q(t,e,null==n?void 0:n.d))}))}(t),$(void 0)},Q=function(e,t){var n=function(e){var t=l.get(e);return t||(t=G(e)),t}(e).l;return n.add(t),function(){n.delete(t),function(e){var t=l.get(e);t&&F(e,t)&&X(e)}(e)}},ee=function(e,t){var n,r=a(e);try{for(r.s();!(n=r.n()).done;){var i=(0,o.Z)(n.value,2),l=i[0],c=i[1];x(l)&&(B(t,l,c),K(t,l))}}catch(e){r.e(e)}finally{r.f()}$(t)};return T={},(0,r.Z)(T,w,U),(0,r.Z)(T,k,Y),(0,r.Z)(T,_,J),(0,r.Z)(T,E,Q),(0,r.Z)(T,"h",ee),(0,r.Z)(T,"n",(function(e){return t.add(e),function(){t.delete(e)}})),(0,r.Z)(T,"l",(function(){return n.values()})),(0,r.Z)(T,"a",(function(e){return i.get(e)})),(0,r.Z)(T,"m",(function(e){return l.get(e)})),T},C=function(e){var t=S(e);return{get:function(e){var n=t.r(e);if("e"in n)throw n.e;if(!("p"in n))return n.v},asyncGet:function e(n){return new Promise((function(r,o){var i=t.r(n);"e"in i?o(i.e):r("p"in i?i.p.then((function(){return e(n)})):i.v)}))},set:function(e,n){return t.w(e,n)},sub:function(e,n){return t.s(e,n)},SECRET_INTERNAL_store:t}},O=function(e,t){return{s:t?t(e).SECRET_INTERNAL_store:S(e)}},j=new Map,I=function(e){return j.has(e)||j.set(e,(0,i.createContext)(O())),j.get(e)},T=Object.defineProperty,M=Object.defineProperties,L=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,z=function(e,t,n){return t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},R=function(e,t){for(var n in t||(t={}))P.call(t,n)&&z(e,n,t[n]);if(A){var r,o=a(A(t));try{for(o.s();!(r=o.n()).done;){n=r.value;D.call(t,n)&&z(e,n,t[n])}}catch(e){o.e(e)}finally{o.f()}}return e},Z=function(e){return e.debugLabel||e.toString()},N=function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return Object.fromEntries(r.flatMap((function(e){var t,r,o=null==(t=n.m)?void 0:t.call(n,e);if(!o)return[];var i,a,l=o.t,c=(null==(r=n.a)?void 0:r.call(n,e))||{};return[[Z(e),(i=R(R(R({},"e"in c&&{error:c.e}),"p"in c&&{promise:c.p}),"v"in c&&{value:c.v}),a={dependents:Array.from(l).map(Z)},M(i,L(a)))]]})))},B=function(e){var t=e.children,n=e.initialValues,r=e.scope,a=e.unstable_createStore,l=e.unstable_enableVersionedWrite,c=(0,i.useState)(),s=(0,o.Z)(c,2),u=s[0],d=s[1];(0,i.useEffect)((function(){u&&(b.current.s.c(null,u),delete u.p)}),[u]);var f,p,h,v,m,g,b=(0,i.useRef)();b.current||(b.current=O(n,a),l&&(b.current.w=function(e){d((function(t){var n=t?{p:t}:{};return e(n),n}))})),l||(f=b.current,p=f.s,h=(0,i.useState)([]),v=(0,o.Z)(h,2),m=v[0],g=v[1],(0,i.useEffect)((function(){var e,t=function(){var e;g(Array.from((null==(e=p.l)?void 0:e.call(p))||[]))},n=null==(e=p.n)?void 0:e.call(p,t);return t(),n}),[p]),(0,i.useDebugValue)([p,m],N));var y=I(r);return(0,i.createElement)(y.Provider,{value:b.current},t)},H=0;function W(e,t){var n="atom".concat(++H),r={toString:function(){return n}};return"function"==typeof e?r.read=e:(r.init=e,r.read=function(e){return e(r)},r.write=function(e,t,n){return t(r,"function"==typeof n?n(e(r)):n)}),t&&(r.write=t),r}function U(e,t){var n=I(t),r=(0,i.useContext)(n).s,a=(0,i.useCallback)((function(t){var n=r.r(e,t);if("e"in n)throw n.e;if("p"in n)throw n.p;if("v"in n)return n.v;throw new Error("no atom value")}),[r,e]),l=(0,i.useReducer)((0,i.useCallback)((function(t,n){var r=a(n);return Object.is(t[1],r)&&t[2]===e?t:[n,r,e]}),[a,e]),void 0,(function(){var t=void 0;return[t,a(t),e]})),c=(0,o.Z)(l,2),s=(0,o.Z)(c[0],3),u=s[0],d=s[1],f=s[2],p=c[1];return f!==e&&p(void 0),(0,i.useEffect)((function(){var t=r.s(e,p);return p(void 0),t}),[r,e]),(0,i.useEffect)((function(){r.c(e,u)})),(0,i.useDebugValue)(d),d}function F(e,t){var n=I(t),r=(0,i.useContext)(n),o=r.s,a=r.w;return(0,i.useCallback)((function(t){if(!("write"in e))throw new Error("not writable atom");var n=function(n){return o.w(e,t,n)};return a?a(n):n()}),[o,a,e])}function K(e,t){return"scope"in e&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),t=e.scope),[U(e,t),F(e,t)]}},8409:function(e,t,n){"use strict";var r=n(8758);e=n.hmd(e);var o="Expected a function",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,u="object"==(void 0===n.g?"undefined":(0,r.Z)(n.g))&&n.g&&n.g.Object===Object&&n.g,d="object"==("undefined"==typeof self?"undefined":(0,r.Z)(self))&&self&&self.Object===Object&&self,f=u||d||Function("return this")(),p=Object.prototype.toString,h=Math.max,v=Math.min,m=function(){return f.Date.now()};function g(e,t,n){var r,i,a,l,c,s,u=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new TypeError(o);function g(t){var n=r,o=i;return r=i=void 0,u=t,l=e.apply(o,n)}function y(e){return u=e,c=setTimeout(k,t),d?g(e):l}function w(e){var n=e-s;return void 0===s||n>=t||n<0||f&&e-u>=a}function k(){var e=m();if(w(e))return _(e);c=setTimeout(k,function(e){var n=t-(e-s);return f?v(n,a-(e-u)):n}(e))}function _(e){return c=void 0,p&&r?g(e):(r=i=void 0,l)}function E(){var e=m(),n=w(e);if(r=arguments,i=this,s=e,n){if(void 0===c)return y(s);if(f)return c=setTimeout(k,t),g(s)}return void 0===c&&(c=setTimeout(k,t)),l}return t=x(t)||0,b(n)&&(d=!!n.leading,a=(f="maxWait"in n)?h(x(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),E.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=s=i=c=void 0},E.flush=function(){return void 0===c?l:_(m())},E}function b(e){var t=(0,r.Z)(e);return!!e&&("object"==t||"function"==t)}function y(e){return"symbol"==(0,r.Z)(e)||function(e){return!!e&&"object"==(0,r.Z)(e)}(e)&&"[object Symbol]"==p.call(e)}function x(e){if("number"==typeof e)return e;if(y(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=l.test(e);return n||c.test(e)?s(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(o);return b(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),g(e,t,{leading:r,maxWait:t,trailing:i})}},6963:function(e,t,n){"use strict";var r=n(8758);e=n.hmd(e),function(){var t,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,c=32,s=64,u=128,d=256,f=1/0,p=9007199254740991,h=NaN,v=4294967295,m=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",s],["rearg",d]],g="[object Arguments]",b="[object Array]",y="[object Boolean]",x="[object Date]",w="[object Error]",k="[object Function]",_="[object GeneratorFunction]",E="[object Map]",S="[object Number]",C="[object Object]",O="[object Promise]",j="[object RegExp]",I="[object Set]",T="[object String]",M="[object Symbol]",L="[object WeakMap]",A="[object ArrayBuffer]",P="[object DataView]",D="[object Float32Array]",z="[object Float64Array]",R="[object Int8Array]",Z="[object Int16Array]",N="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",U="[object Uint32Array]",F=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,X=RegExp(Y.source),q=RegExp(G.source),$=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),ie=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="['’]",Te="[\\ud800-\\udfff]",Me="["+je+"]",Le="["+_e+"]",Ae="\\d+",Pe="[\\u2700-\\u27bf]",De="["+Se+"]",ze="[^\\ud800-\\udfff"+je+Ae+Ee+Se+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",Ze="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",We="(?:"+De+"|"+ze+")",Ue="(?:"+He+"|"+ze+")",Fe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ke="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Le+"|"+Re+")"+"?",Ye="[\\ufe0e\\ufe0f]?",Ge=Ye+Ve+("(?:\\u200d(?:"+[Ze,Ne,Be].join("|")+")"+Ye+Ve+")*"),Xe="(?:"+[Pe,Ne,Be].join("|")+")"+Ge,qe="(?:"+[Ze+Le+"?",Le,Ne,Be,Te].join("|")+")",$e=RegExp(Ie,"g"),Je=RegExp(Le,"g"),Qe=RegExp(Re+"(?="+Re+")|"+qe+Ge,"g"),et=RegExp([He+"?"+De+"+"+Fe+"(?="+[Me,He,"$"].join("|")+")",Ue+"+"+Ke+"(?="+[Me,He+We,"$"].join("|")+")",He+"?"+We+"+"+Fe,He+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,Xe].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+_e+Oe+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,it={};it[D]=it[z]=it[R]=it[Z]=it[N]=it[B]=it[H]=it[W]=it[U]=!0,it[g]=it[b]=it[A]=it[y]=it[P]=it[x]=it[w]=it[k]=it[E]=it[S]=it[C]=it[j]=it[I]=it[T]=it[L]=!1;var at={};at[g]=at[b]=at[A]=at[P]=at[y]=at[x]=at[D]=at[z]=at[R]=at[Z]=at[N]=at[E]=at[S]=at[C]=at[j]=at[I]=at[T]=at[M]=at[B]=at[H]=at[W]=at[U]=!0,at[w]=at[k]=at[L]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,st=parseInt,ut="object"==(void 0===n.g?"undefined":(0,r.Z)(n.g))&&n.g&&n.g.Object===Object&&n.g,dt="object"==("undefined"==typeof self?"undefined":(0,r.Z)(self))&&self&&self.Object===Object&&self,ft=ut||dt||Function("return this")(),pt="object"==("undefined"==typeof exports?"undefined":(0,r.Z)(exports))&&exports&&!exports.nodeType&&exports,ht=pt&&"object"==(0,r.Z)(e)&&e&&!e.nodeType&&e,vt=ht&&ht.exports===pt,mt=vt&&ut.process,gt=function(){try{var e=ht&&ht.require&&ht.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),bt=gt&>.isArrayBuffer,yt=gt&>.isDate,xt=gt&>.isMap,wt=gt&>.isRegExp,kt=gt&>.isSet,_t=gt&>.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Ct(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Tt(e,t){return!!(null==e?0:e.length)&&Bt(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function At(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Pt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Dt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function zt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Ft("length");function Zt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Nt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Bt(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Wt,n)}function Ht(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:h}function Ft(e){return function(n){return null==n?t:n[e]}}function Kt(e){return function(n){return null==e?t:e[n]}}function Vt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Yt(e,n){for(var r,o=-1,i=e.length;++o<i;){var a=n(e[o]);a!==t&&(r=r===t?a:r+a)}return r}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e?e.slice(0,hn(e)+1).replace(ie,""):e}function qt(e){return function(t){return e(t)}}function $t(e,t){return Lt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var nn=Kt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+lt[e]}function an(e){return tt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var l=e[n];l!==t&&l!==a||(e[n]=a,i[o++]=n)}return i}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return an(e)?function(e){var t=Qe.lastIndex=0;for(;Qe.test(e);)++t;return t}(e):Rt(e)}function pn(e){return an(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mn=function e(n){var ae,_e=(n=null==n?ft:mn.defaults(ft.Object(),n,mn.pick(ft,rt))).Array,Ee=n.Date,Se=n.Error,Ce=n.Function,Oe=n.Math,je=n.Object,Ie=n.RegExp,Te=n.String,Me=n.TypeError,Le=_e.prototype,Ae=Ce.prototype,Pe=je.prototype,De=n["__core-js_shared__"],ze=Ae.toString,Re=Pe.hasOwnProperty,Ze=0,Ne=(ae=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+ae:"",Be=Pe.toString,He=ze.call(je),We=ft._,Ue=Ie("^"+ze.call(Re).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=vt?n.Buffer:t,Ke=n.Symbol,Ve=n.Uint8Array,Ye=Fe?Fe.allocUnsafe:t,Ge=cn(je.getPrototypeOf,je),Xe=je.create,qe=Pe.propertyIsEnumerable,Qe=Le.splice,tt=Ke?Ke.isConcatSpreadable:t,lt=Ke?Ke.iterator:t,ut=Ke?Ke.toStringTag:t,dt=function(){try{var e=vi(je,"defineProperty");return e({},"",{}),e}catch(e){}}(),pt=n.clearTimeout!==ft.clearTimeout&&n.clearTimeout,ht=Ee&&Ee.now!==ft.Date.now&&Ee.now,mt=n.setTimeout!==ft.setTimeout&&n.setTimeout,gt=Oe.ceil,Rt=Oe.floor,Kt=je.getOwnPropertySymbols,gn=Fe?Fe.isBuffer:t,bn=n.isFinite,yn=Le.join,xn=cn(je.keys,je),wn=Oe.max,kn=Oe.min,_n=Ee.now,En=n.parseInt,Sn=Oe.random,Cn=Le.reverse,On=vi(n,"DataView"),jn=vi(n,"Map"),In=vi(n,"Promise"),Tn=vi(n,"Set"),Mn=vi(n,"WeakMap"),Ln=vi(je,"create"),An=Mn&&new Mn,Pn={},Dn=Wi(On),zn=Wi(jn),Rn=Wi(In),Zn=Wi(Tn),Nn=Wi(Mn),Bn=Ke?Ke.prototype:t,Hn=Bn?Bn.valueOf:t,Wn=Bn?Bn.toString:t;function Un(e){if(il(e)&&!Ga(e)&&!(e instanceof Yn)){if(e instanceof Vn)return e;if(Re.call(e,"__wrapped__"))return Ui(e)}return new Vn(e)}var Fn=function(){function e(){}return function(n){if(!ol(n))return{};if(Xe)return Xe(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Kn(){}function Vn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Xn(e);this.size=t.size}function Qn(e,t){var n=Ga(e),r=!n&&Ya(e),o=!n&&!r&&Ja(e),i=!n&&!r&&!o&&pl(e),a=n||r||o||i,l=a?Gt(e.length,Te):[],c=l.length;for(var s in e)!t&&!Re.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ki(s,c))||l.push(s);return l}function er(e){var n=e.length;return n?e[$r(0,n-1)]:t}function tr(e,t){return Ni(Ao(e),ur(t,0,e.length))}function nr(e){return Ni(Ao(e))}function rr(e,n,r){(r!==t&&!Fa(e[n],r)||r===t&&!(n in e))&&cr(e,n,r)}function or(e,n,r){var o=e[n];Re.call(e,n)&&Fa(o,r)&&(r!==t||n in e)||cr(e,n,r)}function ir(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function ar(e,t,n,r){return vr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function lr(e,t){return e&&Po(t,Dl(t),e)}function cr(e,t,n){"__proto__"==t&&dt?dt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,n){for(var r=-1,o=n.length,i=_e(o),a=null==e;++r<o;)i[r]=a?t:Tl(e,n[r]);return i}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function dr(e,n,r,o,i,a){var l,c=1&n,s=2&n,u=4&n;if(r&&(l=i?r(e,o,i,a):r(e)),l!==t)return l;if(!ol(e))return e;var d=Ga(e);if(d){if(l=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Ao(e,l)}else{var f=bi(e),p=f==k||f==_;if(Ja(e))return Oo(e,c);if(f==C||f==g||p&&!i){if(l=s||p?{}:xi(e),!c)return s?function(e,t){return Po(e,gi(e),t)}(e,function(e,t){return e&&Po(t,zl(t),e)}(l,e)):function(e,t){return Po(e,mi(e),t)}(e,lr(l,e))}else{if(!at[f])return i?e:{};l=function(e,t,n){var r=e.constructor;switch(t){case A:return jo(e);case y:case x:return new r(+e);case P:return function(e,t){var n=t?jo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case z:case R:case Z:case N:case B:case H:case W:case U:return Io(e,n);case E:return new r;case S:case T:return new r(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new r;case M:return o=e,Hn?je(Hn.call(o)):{}}var o}(e,f,c)}}a||(a=new Jn);var h=a.get(e);if(h)return h;a.set(e,l),ul(e)?e.forEach((function(t){l.add(dr(t,n,r,t,e,a))})):al(e)&&e.forEach((function(t,o){l.set(o,dr(t,n,r,o,e,a))}));var v=d?t:(u?s?ci:li:s?zl:Dl)(e);return Ct(v||e,(function(t,o){v&&(t=e[o=t]),or(l,o,dr(t,n,r,o,e,a))})),l}function fr(e,n,r){var o=r.length;if(null==e)return!o;for(e=je(e);o--;){var i=r[o],a=n[i],l=e[i];if(l===t&&!(i in e)||!a(l))return!1}return!0}function pr(e,n,r){if("function"!=typeof e)throw new Me(o);return Di((function(){e.apply(t,r)}),n)}function hr(e,t,n,r){var o=-1,i=Tt,a=!0,l=e.length,c=[],s=t.length;if(!l)return c;n&&(t=Lt(t,qt(n))),r?(i=Mt,a=!1):t.length>=200&&(i=Jt,a=!1,t=new $n(t));e:for(;++o<l;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var f=s;f--;)if(t[f]===d)continue e;c.push(u)}else i(t,d,r)||c.push(u)}return c}Un.templateSettings={escape:$,evaluate:J,interpolate:Q,variable:"",imports:{_:Un}},Un.prototype=Kn.prototype,Un.prototype.constructor=Un,Vn.prototype=Fn(Kn.prototype),Vn.prototype.constructor=Vn,Yn.prototype=Fn(Kn.prototype),Yn.prototype.constructor=Yn,Gn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var n=this.__data__;if(Ln){var r=n[e];return r===i?t:r}return Re.call(n,e)?n[e]:t},Gn.prototype.has=function(e){var n=this.__data__;return Ln?n[e]!==t:Re.call(n,e)},Gn.prototype.set=function(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ln&&n===t?i:n,this},Xn.prototype.clear=function(){this.__data__=[],this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},Xn.prototype.get=function(e){var n=this.__data__,r=ir(n,e);return r<0?t:n[r][1]},Xn.prototype.has=function(e){return ir(this.__data__,e)>-1},Xn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(jn||Xn),string:new Gn}},qn.prototype.delete=function(e){var t=pi(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return pi(this,e).get(e)},qn.prototype.has=function(e){return pi(this,e).has(e)},qn.prototype.set=function(e,t){var n=pi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,i),this},$n.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!jn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var vr=Ro(_r),mr=Ro(Er,!0);function gr(e,t){var n=!0;return vr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function br(e,n,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],l=n(a);if(null!=l&&(c===t?l==l&&!fl(l):r(l,c)))var c=l,s=a}return s}function yr(e,t){var n=[];return vr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function xr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=wi),o||(o=[]);++i<a;){var l=e[i];t>0&&n(l)?t>1?xr(l,t-1,n,r,o):At(o,l):r||(o[o.length]=l)}return o}var wr=Zo(),kr=Zo(!0);function _r(e,t){return e&&wr(e,t,Dl)}function Er(e,t){return e&&kr(e,t,Dl)}function Sr(e,t){return It(t,(function(t){return tl(e[t])}))}function Cr(e,n){for(var r=0,o=(n=_o(n,e)).length;null!=e&&r<o;)e=e[Hi(n[r++])];return r&&r==o?e:t}function Or(e,t,n){var r=t(e);return Ga(e)?r:At(r,n(e))}function jr(e){return null==e?e===t?"[object Undefined]":"[object Null]":ut&&ut in je(e)?function(e){var n=Re.call(e,ut),r=e[ut];try{e[ut]=t;var o=!0}catch(e){}var i=Be.call(e);o&&(n?e[ut]=r:delete e[ut]);return i}(e):function(e){return Be.call(e)}(e)}function Ir(e,t){return e>t}function Tr(e,t){return null!=e&&Re.call(e,t)}function Mr(e,t){return null!=e&&t in je(e)}function Lr(e,n,r){for(var o=r?Mt:Tt,i=e[0].length,a=e.length,l=a,c=_e(a),s=1/0,u=[];l--;){var d=e[l];l&&n&&(d=Lt(d,qt(n))),s=kn(d.length,s),c[l]=!r&&(n||i>=120&&d.length>=120)?new $n(l&&d):t}d=e[0];var f=-1,p=c[0];e:for(;++f<i&&u.length<s;){var h=d[f],v=n?n(h):h;if(h=r||0!==h?h:0,!(p?Jt(p,v):o(u,v,r))){for(l=a;--l;){var m=c[l];if(!(m?Jt(m,v):o(e[l],v,r)))continue e}p&&p.push(v),u.push(h)}}return u}function Ar(e,n,r){var o=null==(e=Mi(e,n=_o(n,e)))?e:e[Hi(ea(n))];return null==o?t:Et(o,e,r)}function Pr(e){return il(e)&&jr(e)==g}function Dr(e,n,r,o,i){return e===n||(null==e||null==n||!il(e)&&!il(n)?e!=e&&n!=n:function(e,n,r,o,i,a){var l=Ga(e),c=Ga(n),s=l?b:bi(e),u=c?b:bi(n),d=(s=s==g?C:s)==C,f=(u=u==g?C:u)==C,p=s==u;if(p&&Ja(e)){if(!Ja(n))return!1;l=!0,d=!1}if(p&&!d)return a||(a=new Jn),l||pl(e)?ii(e,n,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!i(new Ve(e),new Ve(t)));case y:case x:case S:return Fa(+e,+t);case w:return e.name==t.name&&e.message==t.message;case j:case T:return e==t+"";case E:var l=ln;case I:var c=1&r;if(l||(l=un),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var u=ii(l(e),l(t),r,o,i,a);return a.delete(e),u;case M:if(Hn)return Hn.call(e)==Hn.call(t)}return!1}(e,n,s,r,o,i,a);if(!(1&r)){var h=d&&Re.call(e,"__wrapped__"),v=f&&Re.call(n,"__wrapped__");if(h||v){var m=h?e.value():e,k=v?n.value():n;return a||(a=new Jn),i(m,k,r,o,a)}}if(!p)return!1;return a||(a=new Jn),function(e,n,r,o,i,a){var l=1&r,c=li(e),s=c.length,u=li(n).length;if(s!=u&&!l)return!1;var d=s;for(;d--;){var f=c[d];if(!(l?f in n:Re.call(n,f)))return!1}var p=a.get(e),h=a.get(n);if(p&&h)return p==n&&h==e;var v=!0;a.set(e,n),a.set(n,e);var m=l;for(;++d<s;){var g=e[f=c[d]],b=n[f];if(o)var y=l?o(b,g,f,n,e,a):o(g,b,f,e,n,a);if(!(y===t?g===b||i(g,b,r,o,a):y)){v=!1;break}m||(m="constructor"==f)}if(v&&!m){var x=e.constructor,w=n.constructor;x==w||!("constructor"in e)||!("constructor"in n)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(v=!1)}return a.delete(e),a.delete(n),v}(e,n,r,o,i,a)}(e,n,r,o,Dr,i))}function zr(e,n,r,o){var i=r.length,a=i,l=!o;if(null==e)return!a;for(e=je(e);i--;){var c=r[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var s=(c=r[i])[0],u=e[s],d=c[1];if(l&&c[2]){if(u===t&&!(s in e))return!1}else{var f=new Jn;if(o)var p=o(u,d,s,e,n,f);if(!(p===t?Dr(d,u,3,o,f):p))return!1}}return!0}function Rr(e){return!(!ol(e)||(t=e,Ne&&Ne in t))&&(tl(e)?Ue:ge).test(Wi(e));var t}function Zr(e){return"function"==typeof e?e:null==e?lc:"object"==(0,r.Z)(e)?Ga(e)?Fr(e[0],e[1]):Ur(e):mc(e)}function Nr(e){if(!Oi(e))return xn(e);var t=[];for(var n in je(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Br(e){if(!ol(e))return function(e){var t=[];if(null!=e)for(var n in je(e))t.push(n);return t}(e);var t=Oi(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Hr(e,t){return e<t}function Wr(e,t){var n=-1,r=qa(e)?_e(e.length):[];return vr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Ur(e){var t=hi(e);return 1==t.length&&t[0][2]?Ii(t[0][0],t[0][1]):function(n){return n===e||zr(n,e,t)}}function Fr(e,n){return Ei(e)&&ji(n)?Ii(Hi(e),n):function(r){var o=Tl(r,e);return o===t&&o===n?Ml(r,e):Dr(n,o,3)}}function Kr(e,n,r,o,i){e!==n&&wr(n,(function(a,l){if(i||(i=new Jn),ol(a))!function(e,n,r,o,i,a,l){var c=Ai(e,r),s=Ai(n,r),u=l.get(s);if(u)return void rr(e,r,u);var d=a?a(c,s,r+"",e,n,l):t,f=d===t;if(f){var p=Ga(s),h=!p&&Ja(s),v=!p&&!h&&pl(s);d=s,p||h||v?Ga(c)?d=c:$a(c)?d=Ao(c):h?(f=!1,d=Oo(s,!0)):v?(f=!1,d=Io(s,!0)):d=[]:cl(s)||Ya(s)?(d=c,Ya(c)?d=wl(c):ol(c)&&!tl(c)||(d=xi(s))):f=!1}f&&(l.set(s,d),i(d,s,o,a,l),l.delete(s));rr(e,r,d)}(e,n,l,r,Kr,o,i);else{var c=o?o(Ai(e,l),a,l+"",e,n,i):t;c===t&&(c=a),rr(e,l,c)}}),zl)}function Vr(e,n){var r=e.length;if(r)return ki(n+=n<0?r:0,r)?e[n]:t}function Yr(e,t,n){t=t.length?Lt(t,(function(e){return Ga(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[lc];var r=-1;t=Lt(t,qt(fi()));var o=Wr(e,(function(e,n,o){var i=Lt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,l=n.length;for(;++r<a;){var c=To(o[r],i[r]);if(c)return r>=l?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],l=Cr(e,a);n(l,a)&&no(i,_o(a,e),l)}return i}function Xr(e,t,n,r){var o=r?Ht:Bt,i=-1,a=t.length,l=e;for(e===t&&(t=Ao(t)),n&&(l=Lt(e,qt(n)));++i<a;)for(var c=0,s=t[i],u=n?n(s):s;(c=o(l,u,c,r))>-1;)l!==e&&Qe.call(l,c,1),Qe.call(e,c,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ki(o)?Qe.call(e,o,1):vo(e,o)}}return e}function $r(e,t){return e+Rt(Sn()*(t-e+1))}function Jr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=Rt(t/2))&&(e+=e)}while(t);return n}function Qr(e,t){return zi(Ti(e,t,lc),e+"")}function eo(e){return er(Fl(e))}function to(e,t){var n=Fl(e);return Ni(n,ur(t,0,n.length))}function no(e,n,r,o){if(!ol(e))return e;for(var i=-1,a=(n=_o(n,e)).length,l=a-1,c=e;null!=c&&++i<a;){var s=Hi(n[i]),u=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=l){var d=c[s];(u=o?o(d,s,c):t)===t&&(u=ol(d)?d:ki(n[i+1])?[]:{})}or(c,s,u),c=c[s]}return e}var ro=An?function(e,t){return An.set(e,t),e}:lc,oo=dt?function(e,t){return dt(e,"toString",{configurable:!0,enumerable:!1,value:oc(t),writable:!0})}:lc;function io(e){return Ni(Fl(e))}function ao(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=_e(o);++r<o;)i[r]=e[r+t];return i}function lo(e,t){var n;return vr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function co(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!fl(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return so(e,t,lc,n)}function so(e,n,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var l=(n=r(n))!=n,c=null===n,s=fl(n),u=n===t;i<a;){var d=Rt((i+a)/2),f=r(e[d]),p=f!==t,h=null===f,v=f==f,m=fl(f);if(l)var g=o||v;else g=u?v&&(o||p):c?v&&p&&(o||!h):s?v&&p&&!h&&(o||!m):!h&&!m&&(o?f<=n:f<n);g?i=d+1:a=d}return kn(a,4294967294)}function uo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!Fa(l,c)){var c=l;i[o++]=0===a?0:a}}return i}function fo(e){return"number"==typeof e?e:fl(e)?h:+e}function po(e){if("string"==typeof e)return e;if(Ga(e))return Lt(e,po)+"";if(fl(e))return Wn?Wn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ho(e,t,n){var r=-1,o=Tt,i=e.length,a=!0,l=[],c=l;if(n)a=!1,o=Mt;else if(i>=200){var s=t?null:Qo(e);if(s)return un(s);a=!1,o=Jt,c=new $n}else c=t?[]:l;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),l.push(u)}else o(c,d,n)||(c!==l&&c.push(d),l.push(u))}return l}function vo(e,t){return null==(e=Mi(e,t=_o(t,e)))||delete e[Hi(ea(t))]}function mo(e,t,n,r){return no(e,t,n(Cr(e,t)),r)}function go(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ao(e,r?0:i,r?i+1:o):ao(e,r?i+1:0,r?o:i)}function bo(e,t){var n=e;return n instanceof Yn&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,At([e],t.args))}),n)}function yo(e,t,n){var r=e.length;if(r<2)return r?ho(e[0]):[];for(var o=-1,i=_e(r);++o<r;)for(var a=e[o],l=-1;++l<r;)l!=o&&(i[o]=hr(i[o]||a,e[l],t,n));return ho(xr(i,1),t,n)}function xo(e,n,r){for(var o=-1,i=e.length,a=n.length,l={};++o<i;){var c=o<a?n[o]:t;r(l,e[o],c)}return l}function wo(e){return $a(e)?e:[]}function ko(e){return"function"==typeof e?e:lc}function _o(e,t){return Ga(e)?e:Ei(e,t)?[e]:Bi(kl(e))}var Eo=Qr;function So(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:ao(e,n,r)}var Co=pt||function(e){return ft.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var n=e.length,r=Ye?Ye(n):new e.constructor(n);return e.copy(r),r}function jo(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Io(e,t){var n=t?jo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,a=fl(e),l=n!==t,c=null===n,s=n==n,u=fl(n);if(!c&&!u&&!a&&e>n||a&&l&&s&&!c&&!u||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!u&&e<n||u&&r&&i&&!o&&!a||c&&r&&i||!l&&i||!s)return-1}return 0}function Mo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,l=-1,c=t.length,s=wn(i-a,0),u=_e(c+s),d=!r;++l<c;)u[l]=t[l];for(;++o<a;)(d||o<i)&&(u[n[o]]=e[o]);for(;s--;)u[l++]=e[o++];return u}function Lo(e,t,n,r){for(var o=-1,i=e.length,a=-1,l=n.length,c=-1,s=t.length,u=wn(i-l,0),d=_e(u+s),f=!r;++o<u;)d[o]=e[o];for(var p=o;++c<s;)d[p+c]=t[c];for(;++a<l;)(f||o<i)&&(d[p+n[a]]=e[o++]);return d}function Ao(e,t){var n=-1,r=e.length;for(t||(t=_e(r));++n<r;)t[n]=e[n];return t}function Po(e,n,r,o){var i=!r;r||(r={});for(var a=-1,l=n.length;++a<l;){var c=n[a],s=o?o(r[c],e[c],c,r,e):t;s===t&&(s=e[c]),i?cr(r,c,s):or(r,c,s)}return r}function Do(e,t){return function(n,r){var o=Ga(n)?St:ar,i=t?t():{};return o(n,e,fi(r,2),i)}}function zo(e){return Qr((function(n,r){var o=-1,i=r.length,a=i>1?r[i-1]:t,l=i>2?r[2]:t;for(a=e.length>3&&"function"==typeof a?(i--,a):t,l&&_i(r[0],r[1],l)&&(a=i<3?t:a,i=1),n=je(n);++o<i;){var c=r[o];c&&e(n,c,o,a)}return n}))}function Ro(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=je(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Zo(e){return function(t,n,r){for(var o=-1,i=je(t),a=r(t),l=a.length;l--;){var c=a[e?l:++o];if(!1===n(i[c],c,i))break}return t}}function No(e){return function(n){var r=an(n=kl(n))?pn(n):t,o=r?r[0]:n.charAt(0),i=r?So(r,1).join(""):n.slice(1);return o[e]()+i}}function Bo(e){return function(t){return Pt(tc(Yl(t).replace($e,"")),e,"")}}function Ho(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ol(r)?r:n}}function Wo(e){return function(n,r,o){var i=je(n);if(!qa(n)){var a=fi(r,3);n=Dl(n),r=function(e){return a(i[e],e,i)}}var l=e(n,r,o);return l>-1?i[a?n[l]:l]:t}}function Uo(e){return ai((function(n){var r=n.length,i=r,a=Vn.prototype.thru;for(e&&n.reverse();i--;){var l=n[i];if("function"!=typeof l)throw new Me(o);if(a&&!c&&"wrapper"==ui(l))var c=new Vn([],!0)}for(i=c?i:r;++i<r;){var s=ui(l=n[i]),u="wrapper"==s?si(l):t;c=u&&Si(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ui(u[0])].apply(c,u[3]):1==l.length&&Si(l)?c[s]():c.thru(l)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Ga(t))return c.plant(t).value();for(var o=0,i=r?n[o].apply(this,e):t;++o<r;)i=n[o].call(this,i);return i}}))}function Fo(e,n,r,o,i,a,l,c,s,d){var f=n&u,p=1&n,h=2&n,v=24&n,m=512&n,g=h?t:Ho(e);return function t(){for(var u=arguments.length,b=_e(u),y=u;y--;)b[y]=arguments[y];if(v)var x=di(t),w=tn(b,x);if(o&&(b=Mo(b,o,i,v)),a&&(b=Lo(b,a,l,v)),u-=w,v&&u<d){var k=sn(b,x);return $o(e,n,Fo,t.placeholder,r,b,k,c,s,d-u)}var _=p?r:this,E=h?_[e]:e;return u=b.length,c?b=Li(b,c):m&&u>1&&b.reverse(),f&&s<u&&(b.length=s),this&&this!==ft&&this instanceof t&&(E=g||Ho(E)),E.apply(_,b)}}function Ko(e,t){return function(n,r){return function(e,t,n,r){return _r(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Vo(e,n){return function(r,o){var i;if(r===t&&o===t)return n;if(r!==t&&(i=r),o!==t){if(i===t)return o;"string"==typeof r||"string"==typeof o?(r=po(r),o=po(o)):(r=fo(r),o=fo(o)),i=e(r,o)}return i}}function Yo(e){return ai((function(t){return t=Lt(t,qt(fi())),Qr((function(n){var r=this;return e(t,(function(e){return Et(e,r,n)}))}))}))}function Go(e,n){var r=(n=n===t?" ":po(n)).length;if(r<2)return r?Jr(n,e):n;var o=Jr(n,gt(e/fn(n)));return an(n)?So(pn(o),0,e).join(""):o.slice(0,e)}function Xo(e){return function(n,r,o){return o&&"number"!=typeof o&&_i(n,r,o)&&(r=o=t),n=gl(n),r===t?(r=n,n=0):r=gl(r),function(e,t,n,r){for(var o=-1,i=wn(gt((t-e)/(n||1)),0),a=_e(i);i--;)a[r?i:++o]=e,e+=n;return a}(n,r,o=o===t?n<r?1:-1:gl(o),e)}}function qo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=xl(t),n=xl(n)),e(t,n)}}function $o(e,n,r,o,i,a,l,u,d,f){var p=8&n;n|=p?c:s,4&(n&=~(p?s:c))||(n&=-4);var h=[e,n,i,p?a:t,p?l:t,p?t:a,p?t:l,u,d,f],v=r.apply(t,h);return Si(e)&&Pi(v,h),v.placeholder=o,Ri(v,e,n)}function Jo(e){var t=Oe[e];return function(e,n){if(e=xl(e),(n=null==n?0:kn(bl(n),292))&&bn(e)){var r=(kl(e)+"e").split("e");return+((r=(kl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qo=Tn&&1/un(new Tn([,-0]))[1]==f?function(e){return new Tn(e)}:fc;function ei(e){return function(t){var n=bi(t);return n==E?ln(t):n==I?dn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ti(e,n,r,i,f,p,h,v){var m=2&n;if(!m&&"function"!=typeof e)throw new Me(o);var g=i?i.length:0;if(g||(n&=-97,i=f=t),h=h===t?h:wn(bl(h),0),v=v===t?v:bl(v),g-=f?f.length:0,n&s){var b=i,y=f;i=f=t}var x=m?t:si(e),w=[e,n,r,i,f,b,y,p,h,v];if(x&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,l=r==u&&8==n||r==u&&n==d&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!l)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var s=e[3];e[3]=s?Mo(s,c,t[4]):c,e[4]=s?sn(e[3],a):t[4]}(c=t[5])&&(s=e[5],e[5]=s?Lo(s,c,t[6]):c,e[6]=s?sn(e[5],a):t[6]);(c=t[7])&&(e[7]=c);r&u&&(e[8]=null==e[8]?t[8]:kn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(w,x),e=w[0],n=w[1],r=w[2],i=w[3],f=w[4],!(v=w[9]=w[9]===t?m?0:e.length:wn(w[9]-g,0))&&24&n&&(n&=-25),n&&1!=n)k=8==n||n==l?function(e,n,r){var o=Ho(e);return function i(){for(var a=arguments.length,l=_e(a),c=a,s=di(i);c--;)l[c]=arguments[c];var u=a<3&&l[0]!==s&&l[a-1]!==s?[]:sn(l,s);return(a-=u.length)<r?$o(e,n,Fo,i.placeholder,t,l,u,t,t,r-a):Et(this&&this!==ft&&this instanceof i?o:e,this,l)}}(e,n,v):n!=c&&33!=n||f.length?Fo.apply(t,w):function(e,t,n,r){var o=1&t,i=Ho(e);return function t(){for(var a=-1,l=arguments.length,c=-1,s=r.length,u=_e(s+l),d=this&&this!==ft&&this instanceof t?i:e;++c<s;)u[c]=r[c];for(;l--;)u[c++]=arguments[++a];return Et(d,o?n:this,u)}}(e,n,r,i);else var k=function(e,t,n){var r=1&t,o=Ho(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,n,r);return Ri((x?ro:Pi)(k,w),e,n)}function ni(e,n,r,o){return e===t||Fa(e,Pe[r])&&!Re.call(o,r)?n:e}function ri(e,n,r,o,i,a){return ol(e)&&ol(n)&&(a.set(n,e),Kr(e,n,t,ri,a),a.delete(n)),e}function oi(e){return cl(e)?t:e}function ii(e,n,r,o,i,a){var l=1&r,c=e.length,s=n.length;if(c!=s&&!(l&&s>c))return!1;var u=a.get(e),d=a.get(n);if(u&&d)return u==n&&d==e;var f=-1,p=!0,h=2&r?new $n:t;for(a.set(e,n),a.set(n,e);++f<c;){var v=e[f],m=n[f];if(o)var g=l?o(m,v,f,n,e,a):o(v,m,f,e,n,a);if(g!==t){if(g)continue;p=!1;break}if(h){if(!zt(n,(function(e,t){if(!Jt(h,t)&&(v===e||i(v,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(v!==m&&!i(v,m,r,o,a)){p=!1;break}}return a.delete(e),a.delete(n),p}function ai(e){return zi(Ti(e,t,Xi),e+"")}function li(e){return Or(e,Dl,mi)}function ci(e){return Or(e,zl,gi)}var si=An?function(e){return An.get(e)}:fc;function ui(e){for(var t=e.name+"",n=Pn[t],r=Re.call(Pn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function di(e){return(Re.call(Un,"placeholder")?Un:e).placeholder}function fi(){var e=Un.iteratee||cc;return e=e===cc?Zr:e,arguments.length?e(arguments[0],arguments[1]):e}function pi(e,t){var n,o,i=e.__data__;return n=t,("string"==(o=(0,r.Z)(n))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function hi(e){for(var t=Dl(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ji(o)]}return t}function vi(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Rr(r)?r:t}var mi=Kt?function(e){return null==e?[]:(e=je(e),It(Kt(e),(function(t){return qe.call(e,t)})))}:yc,gi=Kt?function(e){for(var t=[];e;)At(t,mi(e)),e=Ge(e);return t}:yc,bi=jr;function yi(e,t,n){for(var r=-1,o=(t=_o(t,e)).length,i=!1;++r<o;){var a=Hi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&rl(o)&&ki(a,o)&&(Ga(e)||Ya(e))}function xi(e){return"function"!=typeof e.constructor||Oi(e)?{}:Fn(Ge(e))}function wi(e){return Ga(e)||Ya(e)||!!(tt&&e&&e[tt])}function ki(e,t){var n=(0,r.Z)(e);return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function _i(e,t,n){if(!ol(n))return!1;var o=(0,r.Z)(t);return!!("number"==o?qa(n)&&ki(t,n.length):"string"==o&&t in n)&&Fa(n[t],e)}function Ei(e,t){if(Ga(e))return!1;var n=(0,r.Z)(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fl(e))||(te.test(e)||!ee.test(e)||null!=t&&e in je(t))}function Si(e){var t=ui(e),n=Un[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var r=si(n);return!!r&&e===r[0]}(On&&bi(new On(new ArrayBuffer(1)))!=P||jn&&bi(new jn)!=E||In&&bi(In.resolve())!=O||Tn&&bi(new Tn)!=I||Mn&&bi(new Mn)!=L)&&(bi=function(e){var n=jr(e),r=n==C?e.constructor:t,o=r?Wi(r):"";if(o)switch(o){case Dn:return P;case zn:return E;case Rn:return O;case Zn:return I;case Nn:return L}return n});var Ci=De?tl:xc;function Oi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function ji(e){return e==e&&!ol(e)}function Ii(e,n){return function(r){return null!=r&&(r[e]===n&&(n!==t||e in je(r)))}}function Ti(e,n,r){return n=wn(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=wn(t.length-n,0),a=_e(i);++o<i;)a[o]=t[n+o];o=-1;for(var l=_e(n+1);++o<n;)l[o]=t[o];return l[n]=r(a),Et(e,this,l)}}function Mi(e,t){return t.length<2?e:Cr(e,ao(t,0,-1))}function Li(e,n){for(var r=e.length,o=kn(n.length,r),i=Ao(e);o--;){var a=n[o];e[o]=ki(a,r)?i[a]:t}return e}function Ai(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Pi=Zi(ro),Di=mt||function(e,t){return ft.setTimeout(e,t)},zi=Zi(oo);function Ri(e,t,n){var r=t+"";return zi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ct(m,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(se):[]}(r),n)))}function Zi(e){var n=0,r=0;return function(){var o=_n(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Ni(e,n){var r=-1,o=e.length,i=o-1;for(n=n===t?o:n;++r<n;){var a=$r(r,i),l=e[a];e[a]=e[r],e[r]=l}return e.length=n,e}var Bi=function(e){var t=Za(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,o){t.push(r?o.replace(fe,"$1"):n||e)})),t}));function Hi(e){if("string"==typeof e||fl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Wi(e){if(null!=e){try{return ze.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ui(e){if(e instanceof Yn)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Ao(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Qr((function(e,t){return $a(e)?hr(e,xr(t,1,$a,!0)):[]})),Ki=Qr((function(e,n){var r=ea(n);return $a(r)&&(r=t),$a(e)?hr(e,xr(n,1,$a,!0),fi(r,2)):[]})),Vi=Qr((function(e,n){var r=ea(n);return $a(r)&&(r=t),$a(e)?hr(e,xr(n,1,$a,!0),t,r):[]}));function Yi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:bl(n);return o<0&&(o=wn(r+o,0)),Nt(e,fi(t,3),o)}function Gi(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=bl(r),i=r<0?wn(o+i,0):kn(i,o-1)),Nt(e,fi(n,3),i,!0)}function Xi(e){return(null==e?0:e.length)?xr(e,1):[]}function qi(e){return e&&e.length?e[0]:t}var $i=Qr((function(e){var t=Lt(e,wo);return t.length&&t[0]===e[0]?Lr(t):[]})),Ji=Qr((function(e){var n=ea(e),r=Lt(e,wo);return n===ea(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Lr(r,fi(n,2)):[]})),Qi=Qr((function(e){var n=ea(e),r=Lt(e,wo);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Lr(r,t,n):[]}));function ea(e){var n=null==e?0:e.length;return n?e[n-1]:t}var ta=Qr(na);function na(e,t){return e&&e.length&&t&&t.length?Xr(e,t):e}var ra=ai((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return qr(e,Lt(t,(function(e){return ki(e,n)?+e:e})).sort(To)),r}));function oa(e){return null==e?e:Cn.call(e)}var ia=Qr((function(e){return ho(xr(e,1,$a,!0))})),aa=Qr((function(e){var n=ea(e);return $a(n)&&(n=t),ho(xr(e,1,$a,!0),fi(n,2))})),la=Qr((function(e){var n=ea(e);return n="function"==typeof n?n:t,ho(xr(e,1,$a,!0),t,n)}));function ca(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if($a(e))return t=wn(e.length,t),!0})),Gt(t,(function(t){return Lt(e,Ft(t))}))}function sa(e,n){if(!e||!e.length)return[];var r=ca(e);return null==n?r:Lt(r,(function(e){return Et(n,t,e)}))}var ua=Qr((function(e,t){return $a(e)?hr(e,t):[]})),da=Qr((function(e){return yo(It(e,$a))})),fa=Qr((function(e){var n=ea(e);return $a(n)&&(n=t),yo(It(e,$a),fi(n,2))})),pa=Qr((function(e){var n=ea(e);return n="function"==typeof n?n:t,yo(It(e,$a),t,n)})),ha=Qr(ca);var va=Qr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,sa(e,r)}));function ma(e){var t=Un(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var ba=ai((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return sr(t,e)};return!(n>1||this.__actions__.length)&&o instanceof Yn&&ki(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:ga,args:[i],thisArg:t}),new Vn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)}));var ya=Do((function(e,t,n){Re.call(e,n)?++e[n]:cr(e,n,1)}));var xa=Wo(Yi),wa=Wo(Gi);function ka(e,t){return(Ga(e)?Ct:vr)(e,fi(t,3))}function _a(e,t){return(Ga(e)?Ot:mr)(e,fi(t,3))}var Ea=Do((function(e,t,n){Re.call(e,n)?e[n].push(t):cr(e,n,[t])}));var Sa=Qr((function(e,t,n){var r=-1,o="function"==typeof t,i=qa(e)?_e(e.length):[];return vr(e,(function(e){i[++r]=o?Et(t,e,n):Ar(e,t,n)})),i})),Ca=Do((function(e,t,n){cr(e,n,t)}));function Oa(e,t){return(Ga(e)?Lt:Wr)(e,fi(t,3))}var ja=Do((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_i(e,t[0],t[1])?t=[]:n>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),Yr(e,xr(t,1),[])})),Ta=ht||function(){return ft.Date.now()};function Ma(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,ti(e,u,t,t,t,t,n)}function La(e,n){var r;if("function"!=typeof n)throw new Me(o);return e=bl(e),function(){return--e>0&&(r=n.apply(this,arguments)),e<=1&&(n=t),r}}var Aa=Qr((function(e,t,n){var r=1;if(n.length){var o=sn(n,di(Aa));r|=c}return ti(e,r,t,n,o)})),Pa=Qr((function(e,t,n){var r=3;if(n.length){var o=sn(n,di(Pa));r|=c}return ti(t,r,e,n,o)}));function Da(e,n,r){var i,a,l,c,s,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Me(o);function v(n){var r=i,o=a;return i=a=t,d=n,c=e.apply(o,r)}function m(e){return d=e,s=Di(b,n),f?v(e):c}function g(e){var r=e-u;return u===t||r>=n||r<0||p&&e-d>=l}function b(){var e=Ta();if(g(e))return y(e);s=Di(b,function(e){var t=n-(e-u);return p?kn(t,l-(e-d)):t}(e))}function y(e){return s=t,h&&i?v(e):(i=a=t,c)}function x(){var e=Ta(),r=g(e);if(i=arguments,a=this,u=e,r){if(s===t)return m(u);if(p)return Co(s),s=Di(b,n),v(u)}return s===t&&(s=Di(b,n)),c}return n=xl(n)||0,ol(r)&&(f=!!r.leading,l=(p="maxWait"in r)?wn(xl(r.maxWait)||0,n):l,h="trailing"in r?!!r.trailing:h),x.cancel=function(){s!==t&&Co(s),d=0,i=u=a=s=t},x.flush=function(){return s===t?c:y(Ta())},x}var za=Qr((function(e,t){return pr(e,1,t)})),Ra=Qr((function(e,t,n){return pr(e,xl(t)||0,n)}));function Za(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(o);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Za.Cache||qn),n}function Na(e){if("function"!=typeof e)throw new Me(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Za.Cache=qn;var Ba=Eo((function(e,t){var n=(t=1==t.length&&Ga(t[0])?Lt(t[0],qt(fi())):Lt(xr(t,1),qt(fi()))).length;return Qr((function(r){for(var o=-1,i=kn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Et(e,this,r)}))})),Ha=Qr((function(e,n){var r=sn(n,di(Ha));return ti(e,c,t,n,r)})),Wa=Qr((function(e,n){var r=sn(n,di(Wa));return ti(e,s,t,n,r)})),Ua=ai((function(e,n){return ti(e,d,t,t,t,n)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Ka=qo(Ir),Va=qo((function(e,t){return e>=t})),Ya=Pr(function(){return arguments}())?Pr:function(e){return il(e)&&Re.call(e,"callee")&&!qe.call(e,"callee")},Ga=_e.isArray,Xa=bt?qt(bt):function(e){return il(e)&&jr(e)==A};function qa(e){return null!=e&&rl(e.length)&&!tl(e)}function $a(e){return il(e)&&qa(e)}var Ja=gn||xc,Qa=yt?qt(yt):function(e){return il(e)&&jr(e)==x};function el(e){if(!il(e))return!1;var t=jr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!cl(e)}function tl(e){if(!ol(e))return!1;var t=jr(e);return t==k||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function nl(e){return"number"==typeof e&&e==bl(e)}function rl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ol(e){var t=(0,r.Z)(e);return null!=e&&("object"==t||"function"==t)}function il(e){return null!=e&&"object"==(0,r.Z)(e)}var al=xt?qt(xt):function(e){return il(e)&&bi(e)==E};function ll(e){return"number"==typeof e||il(e)&&jr(e)==S}function cl(e){if(!il(e)||jr(e)!=C)return!1;var t=Ge(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ze.call(n)==He}var sl=wt?qt(wt):function(e){return il(e)&&jr(e)==j};var ul=kt?qt(kt):function(e){return il(e)&&bi(e)==I};function dl(e){return"string"==typeof e||!Ga(e)&&il(e)&&jr(e)==T}function fl(e){return"symbol"==(0,r.Z)(e)||il(e)&&jr(e)==M}var pl=_t?qt(_t):function(e){return il(e)&&rl(e.length)&&!!it[jr(e)]};var hl=qo(Hr),vl=qo((function(e,t){return e<=t}));function ml(e){if(!e)return[];if(qa(e))return dl(e)?pn(e):Ao(e);if(lt&&e[lt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[lt]());var t=bi(e);return(t==E?ln:t==I?un:Fl)(e)}function gl(e){return e?(e=xl(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function bl(e){var t=gl(e),n=t%1;return t==t?n?t-n:t:0}function yl(e){return e?ur(bl(e),0,v):0}function xl(e){if("number"==typeof e)return e;if(fl(e))return h;if(ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=me.test(e);return n||be.test(e)?st(e.slice(2),n?2:8):ve.test(e)?h:+e}function wl(e){return Po(e,zl(e))}function kl(e){return null==e?"":po(e)}var _l=zo((function(e,t){if(Oi(t)||qa(t))Po(t,Dl(t),e);else for(var n in t)Re.call(t,n)&&or(e,n,t[n])})),El=zo((function(e,t){Po(t,zl(t),e)})),Sl=zo((function(e,t,n,r){Po(t,zl(t),e,r)})),Cl=zo((function(e,t,n,r){Po(t,Dl(t),e,r)})),Ol=ai(sr);var jl=Qr((function(e,n){e=je(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&_i(n[0],n[1],i)&&(o=1);++r<o;)for(var a=n[r],l=zl(a),c=-1,s=l.length;++c<s;){var u=l[c],d=e[u];(d===t||Fa(d,Pe[u])&&!Re.call(e,u))&&(e[u]=a[u])}return e})),Il=Qr((function(e){return e.push(t,ri),Et(Zl,t,e)}));function Tl(e,n,r){var o=null==e?t:Cr(e,n);return o===t?r:o}function Ml(e,t){return null!=e&&yi(e,t,Mr)}var Ll=Ko((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=n}),oc(lc)),Al=Ko((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),fi),Pl=Qr(Ar);function Dl(e){return qa(e)?Qn(e):Nr(e)}function zl(e){return qa(e)?Qn(e,!0):Br(e)}var Rl=zo((function(e,t,n){Kr(e,t,n)})),Zl=zo((function(e,t,n,r){Kr(e,t,n,r)})),Nl=ai((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=_o(t,e),r||(r=t.length>1),t})),Po(e,ci(e),n),r&&(n=dr(n,7,oi));for(var o=t.length;o--;)vo(n,t[o]);return n}));var Bl=ai((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ml(e,n)}))}(e,t)}));function Hl(e,t){if(null==e)return{};var n=Lt(ci(e),(function(e){return[e]}));return t=fi(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Wl=ei(Dl),Ul=ei(zl);function Fl(e){return null==e?[]:$t(e,Dl(e))}var Kl=Bo((function(e,t,n){return t=t.toLowerCase(),e+(n?Vl(t):t)}));function Vl(e){return ec(kl(e).toLowerCase())}function Yl(e){return(e=kl(e))&&e.replace(xe,nn).replace(Je,"")}var Gl=Bo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Xl=Bo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ql=No("toLowerCase");var $l=Bo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Jl=Bo((function(e,t,n){return e+(n?" ":"")+ec(t)}));var Ql=Bo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),ec=No("toUpperCase");function tc(e,n,r){return e=kl(e),(n=r?t:n)===t?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(n)||[]}var nc=Qr((function(e,n){try{return Et(e,t,n)}catch(e){return el(e)?e:new Se(e)}})),rc=ai((function(e,t){return Ct(t,(function(t){t=Hi(t),cr(e,t,Aa(e[t],e))})),e}));function oc(e){return function(){return e}}var ic=Uo(),ac=Uo(!0);function lc(e){return e}function cc(e){return Zr("function"==typeof e?e:dr(e,1))}var sc=Qr((function(e,t){return function(n){return Ar(n,e,t)}})),uc=Qr((function(e,t){return function(n){return Ar(e,n,t)}}));function dc(e,t,n){var r=Dl(t),o=Sr(t,r);null!=n||ol(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Sr(t,Dl(t)));var i=!(ol(n)&&"chain"in n&&!n.chain),a=tl(e);return Ct(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Ao(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,At([this.value()],arguments))})})),e}function fc(){}var pc=Yo(Lt),hc=Yo(jt),vc=Yo(zt);function mc(e){return Ei(e)?Ft(Hi(e)):function(e){return function(t){return Cr(t,e)}}(e)}var gc=Xo(),bc=Xo(!0);function yc(){return[]}function xc(){return!1}var wc=Vo((function(e,t){return e+t}),0),kc=Jo("ceil"),_c=Vo((function(e,t){return e/t}),1),Ec=Jo("floor");var Sc,Cc=Vo((function(e,t){return e*t}),1),Oc=Jo("round"),jc=Vo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Me(o);return e=bl(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Ma,Un.assign=_l,Un.assignIn=El,Un.assignInWith=Sl,Un.assignWith=Cl,Un.at=Ol,Un.before=La,Un.bind=Aa,Un.bindAll=rc,Un.bindKey=Pa,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Un.chain=ma,Un.chunk=function(e,n,r){n=(r?_i(e,n,r):n===t)?1:wn(bl(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,a=0,l=_e(gt(o/n));i<o;)l[a++]=ao(e,i,i+=n);return l},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=_e(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return At(Ga(n)?Ao(n):[n],xr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=fi();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new Me(o);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Et(o[0],this,n))return Et(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Dl(e);return function(n){return fr(n,e,t)}}(dr(e,1))},Un.constant=oc,Un.countBy=ya,Un.create=function(e,t){var n=Fn(e);return null==t?n:lr(n,t)},Un.curry=function e(n,r,o){var i=ti(n,8,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},Un.curryRight=function e(n,r,o){var i=ti(n,l,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},Un.debounce=Da,Un.defaults=jl,Un.defaultsDeep=Il,Un.defer=za,Un.delay=Ra,Un.difference=Fi,Un.differenceBy=Ki,Un.differenceWith=Vi,Un.drop=function(e,n,r){var o=null==e?0:e.length;return o?ao(e,(n=r||n===t?1:bl(n))<0?0:n,o):[]},Un.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?ao(e,0,(n=o-(n=r||n===t?1:bl(n)))<0?0:n):[]},Un.dropRightWhile=function(e,t){return e&&e.length?go(e,fi(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?go(e,fi(t,3),!0):[]},Un.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&_i(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=bl(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:bl(o))<0&&(o+=i),o=r>o?0:yl(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Un.filter=function(e,t){return(Ga(e)?It:yr)(e,fi(t,3))},Un.flatMap=function(e,t){return xr(Oa(e,t),1)},Un.flatMapDeep=function(e,t){return xr(Oa(e,t),f)},Un.flatMapDepth=function(e,n,r){return r=r===t?1:bl(r),xr(Oa(e,n),r)},Un.flatten=Xi,Un.flattenDeep=function(e){return(null==e?0:e.length)?xr(e,f):[]},Un.flattenDepth=function(e,n){return(null==e?0:e.length)?xr(e,n=n===t?1:bl(n)):[]},Un.flip=function(e){return ti(e,512)},Un.flow=ic,Un.flowRight=ac,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:Sr(e,Dl(e))},Un.functionsIn=function(e){return null==e?[]:Sr(e,zl(e))},Un.groupBy=Ea,Un.initial=function(e){return(null==e?0:e.length)?ao(e,0,-1):[]},Un.intersection=$i,Un.intersectionBy=Ji,Un.intersectionWith=Qi,Un.invert=Ll,Un.invertBy=Al,Un.invokeMap=Sa,Un.iteratee=cc,Un.keyBy=Ca,Un.keys=Dl,Un.keysIn=zl,Un.map=Oa,Un.mapKeys=function(e,t){var n={};return t=fi(t,3),_r(e,(function(e,r,o){cr(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=fi(t,3),_r(e,(function(e,r,o){cr(n,r,t(e,r,o))})),n},Un.matches=function(e){return Ur(dr(e,1))},Un.matchesProperty=function(e,t){return Fr(e,dr(t,1))},Un.memoize=Za,Un.merge=Rl,Un.mergeWith=Zl,Un.method=sc,Un.methodOf=uc,Un.mixin=dc,Un.negate=Na,Un.nthArg=function(e){return e=bl(e),Qr((function(t){return Vr(t,e)}))},Un.omit=Nl,Un.omitBy=function(e,t){return Hl(e,Na(fi(t)))},Un.once=function(e){return La(2,e)},Un.orderBy=function(e,n,r,o){return null==e?[]:(Ga(n)||(n=null==n?[]:[n]),Ga(r=o?t:r)||(r=null==r?[]:[r]),Yr(e,n,r))},Un.over=pc,Un.overArgs=Ba,Un.overEvery=hc,Un.overSome=vc,Un.partial=Ha,Un.partialRight=Wa,Un.partition=ja,Un.pick=Bl,Un.pickBy=Hl,Un.property=mc,Un.propertyOf=function(e){return function(n){return null==e?t:Cr(e,n)}},Un.pull=ta,Un.pullAll=na,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Xr(e,t,fi(n,2)):e},Un.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Xr(e,n,t,r):e},Un.pullAt=ra,Un.range=gc,Un.rangeRight=bc,Un.rearg=Ua,Un.reject=function(e,t){return(Ga(e)?It:yr)(e,Na(fi(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=fi(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return qr(e,o),n},Un.rest=function(e,n){if("function"!=typeof e)throw new Me(o);return Qr(e,n=n===t?n:bl(n))},Un.reverse=oa,Un.sampleSize=function(e,n,r){return n=(r?_i(e,n,r):n===t)?1:bl(n),(Ga(e)?tr:to)(e,n)},Un.set=function(e,t,n){return null==e?e:no(e,t,n)},Un.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:no(e,n,r,o)},Un.shuffle=function(e){return(Ga(e)?nr:io)(e)},Un.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_i(e,n,r)?(n=0,r=o):(n=null==n?0:bl(n),r=r===t?o:bl(r)),ao(e,n,r)):[]},Un.sortBy=Ia,Un.sortedUniq=function(e){return e&&e.length?uo(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?uo(e,fi(t,2)):[]},Un.split=function(e,n,r){return r&&"number"!=typeof r&&_i(e,n,r)&&(n=r=t),(r=r===t?v:r>>>0)?(e=kl(e))&&("string"==typeof n||null!=n&&!sl(n))&&!(n=po(n))&&an(e)?So(pn(e),0,r):e.split(n,r):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Me(o);return t=null==t?0:wn(bl(t),0),Qr((function(n){var r=n[t],o=So(n,0,t);return r&&At(o,r),Et(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},Un.take=function(e,n,r){return e&&e.length?ao(e,0,(n=r||n===t?1:bl(n))<0?0:n):[]},Un.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?ao(e,(n=o-(n=r||n===t?1:bl(n)))<0?0:n,o):[]},Un.takeRightWhile=function(e,t){return e&&e.length?go(e,fi(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?go(e,fi(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Me(o);return ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Da(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=ga,Un.toArray=ml,Un.toPairs=Wl,Un.toPairsIn=Ul,Un.toPath=function(e){return Ga(e)?Lt(e,Hi):fl(e)?[e]:Ao(Bi(kl(e)))},Un.toPlainObject=wl,Un.transform=function(e,t,n){var r=Ga(e),o=r||Ja(e)||pl(e);if(t=fi(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ol(e)&&tl(i)?Fn(Ge(e)):{}}return(o?Ct:_r)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Ma(e,1)},Un.union=ia,Un.unionBy=aa,Un.unionWith=la,Un.uniq=function(e){return e&&e.length?ho(e):[]},Un.uniqBy=function(e,t){return e&&e.length?ho(e,fi(t,2)):[]},Un.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?ho(e,t,n):[]},Un.unset=function(e,t){return null==e||vo(e,t)},Un.unzip=ca,Un.unzipWith=sa,Un.update=function(e,t,n){return null==e?e:mo(e,t,ko(n))},Un.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:mo(e,n,ko(r),o)},Un.values=Fl,Un.valuesIn=function(e){return null==e?[]:$t(e,zl(e))},Un.without=ua,Un.words=tc,Un.wrap=function(e,t){return Ha(ko(t),e)},Un.xor=da,Un.xorBy=fa,Un.xorWith=pa,Un.zip=ha,Un.zipObject=function(e,t){return xo(e||[],t||[],or)},Un.zipObjectDeep=function(e,t){return xo(e||[],t||[],no)},Un.zipWith=va,Un.entries=Wl,Un.entriesIn=Ul,Un.extend=El,Un.extendWith=Sl,dc(Un,Un),Un.add=wc,Un.attempt=nc,Un.camelCase=Kl,Un.capitalize=Vl,Un.ceil=kc,Un.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=xl(r))==r?r:0),n!==t&&(n=(n=xl(n))==n?n:0),ur(xl(e),n,r)},Un.clone=function(e){return dr(e,4)},Un.cloneDeep=function(e){return dr(e,5)},Un.cloneDeepWith=function(e,n){return dr(e,5,n="function"==typeof n?n:t)},Un.cloneWith=function(e,n){return dr(e,4,n="function"==typeof n?n:t)},Un.conformsTo=function(e,t){return null==t||fr(e,t,Dl(t))},Un.deburr=Yl,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=_c,Un.endsWith=function(e,n,r){e=kl(e),n=po(n);var o=e.length,i=r=r===t?o:ur(bl(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Un.eq=Fa,Un.escape=function(e){return(e=kl(e))&&q.test(e)?e.replace(G,rn):e},Un.escapeRegExp=function(e){return(e=kl(e))&&oe.test(e)?e.replace(re,"\\$&"):e},Un.every=function(e,n,r){var o=Ga(e)?jt:gr;return r&&_i(e,n,r)&&(n=t),o(e,fi(n,3))},Un.find=xa,Un.findIndex=Yi,Un.findKey=function(e,t){return Zt(e,fi(t,3),_r)},Un.findLast=wa,Un.findLastIndex=Gi,Un.findLastKey=function(e,t){return Zt(e,fi(t,3),Er)},Un.floor=Ec,Un.forEach=ka,Un.forEachRight=_a,Un.forIn=function(e,t){return null==e?e:wr(e,fi(t,3),zl)},Un.forInRight=function(e,t){return null==e?e:kr(e,fi(t,3),zl)},Un.forOwn=function(e,t){return e&&_r(e,fi(t,3))},Un.forOwnRight=function(e,t){return e&&Er(e,fi(t,3))},Un.get=Tl,Un.gt=Ka,Un.gte=Va,Un.has=function(e,t){return null!=e&&yi(e,t,Tr)},Un.hasIn=Ml,Un.head=qi,Un.identity=lc,Un.includes=function(e,t,n,r){e=qa(e)?e:Fl(e),n=n&&!r?bl(n):0;var o=e.length;return n<0&&(n=wn(o+n,0)),dl(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:bl(n);return o<0&&(o=wn(r+o,0)),Bt(e,t,o)},Un.inRange=function(e,n,r){return n=gl(n),r===t?(r=n,n=0):r=gl(r),function(e,t,n){return e>=kn(t,n)&&e<wn(t,n)}(e=xl(e),n,r)},Un.invoke=Pl,Un.isArguments=Ya,Un.isArray=Ga,Un.isArrayBuffer=Xa,Un.isArrayLike=qa,Un.isArrayLikeObject=$a,Un.isBoolean=function(e){return!0===e||!1===e||il(e)&&jr(e)==y},Un.isBuffer=Ja,Un.isDate=Qa,Un.isElement=function(e){return il(e)&&1===e.nodeType&&!cl(e)},Un.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ga(e)||"string"==typeof e||"function"==typeof e.splice||Ja(e)||pl(e)||Ya(e)))return!e.length;var t=bi(e);if(t==E||t==I)return!e.size;if(Oi(e))return!Nr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Dr(e,t)},Un.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Dr(e,n,t,r):!!o},Un.isError=el,Un.isFinite=function(e){return"number"==typeof e&&bn(e)},Un.isFunction=tl,Un.isInteger=nl,Un.isLength=rl,Un.isMap=al,Un.isMatch=function(e,t){return e===t||zr(e,t,hi(t))},Un.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,zr(e,n,hi(n),r)},Un.isNaN=function(e){return ll(e)&&e!=+e},Un.isNative=function(e){if(Ci(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=ll,Un.isObject=ol,Un.isObjectLike=il,Un.isPlainObject=cl,Un.isRegExp=sl,Un.isSafeInteger=function(e){return nl(e)&&e>=-9007199254740991&&e<=p},Un.isSet=ul,Un.isString=dl,Un.isSymbol=fl,Un.isTypedArray=pl,Un.isUndefined=function(e){return e===t},Un.isWeakMap=function(e){return il(e)&&bi(e)==L},Un.isWeakSet=function(e){return il(e)&&"[object WeakSet]"==jr(e)},Un.join=function(e,t){return null==e?"":yn.call(e,t)},Un.kebabCase=Gl,Un.last=ea,Un.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=bl(r))<0?wn(o+i,0):kn(i,o-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,n,i):Nt(e,Wt,i,!0)},Un.lowerCase=Xl,Un.lowerFirst=ql,Un.lt=hl,Un.lte=vl,Un.max=function(e){return e&&e.length?br(e,lc,Ir):t},Un.maxBy=function(e,n){return e&&e.length?br(e,fi(n,2),Ir):t},Un.mean=function(e){return Ut(e,lc)},Un.meanBy=function(e,t){return Ut(e,fi(t,2))},Un.min=function(e){return e&&e.length?br(e,lc,Hr):t},Un.minBy=function(e,n){return e&&e.length?br(e,fi(n,2),Hr):t},Un.stubArray=yc,Un.stubFalse=xc,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Cc,Un.nth=function(e,n){return e&&e.length?Vr(e,bl(n)):t},Un.noConflict=function(){return ft._===this&&(ft._=We),this},Un.noop=fc,Un.now=Ta,Un.pad=function(e,t,n){e=kl(e);var r=(t=bl(t))?fn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Go(Rt(o),n)+e+Go(gt(o),n)},Un.padEnd=function(e,t,n){e=kl(e);var r=(t=bl(t))?fn(e):0;return t&&r<t?e+Go(t-r,n):e},Un.padStart=function(e,t,n){e=kl(e);var r=(t=bl(t))?fn(e):0;return t&&r<t?Go(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(kl(e).replace(ie,""),t||0)},Un.random=function(e,n,r){if(r&&"boolean"!=typeof r&&_i(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=gl(e),n===t?(n=e,e=0):n=gl(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=Sn();return kn(e+i*(n-e+ct("1e-"+((i+"").length-1))),n)}return $r(e,n)},Un.reduce=function(e,t,n){var r=Ga(e)?Pt:Vt,o=arguments.length<3;return r(e,fi(t,4),n,o,vr)},Un.reduceRight=function(e,t,n){var r=Ga(e)?Dt:Vt,o=arguments.length<3;return r(e,fi(t,4),n,o,mr)},Un.repeat=function(e,n,r){return n=(r?_i(e,n,r):n===t)?1:bl(n),Jr(kl(e),n)},Un.replace=function(){var e=arguments,t=kl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,n,r){var o=-1,i=(n=_o(n,e)).length;for(i||(i=1,e=t);++o<i;){var a=null==e?t:e[Hi(n[o])];a===t&&(o=i,a=r),e=tl(a)?a.call(e):a}return e},Un.round=Oc,Un.runInContext=e,Un.sample=function(e){return(Ga(e)?er:eo)(e)},Un.size=function(e){if(null==e)return 0;if(qa(e))return dl(e)?fn(e):e.length;var t=bi(e);return t==E||t==I?e.size:Nr(e).length},Un.snakeCase=$l,Un.some=function(e,n,r){var o=Ga(e)?zt:lo;return r&&_i(e,n,r)&&(n=t),o(e,fi(n,3))},Un.sortedIndex=function(e,t){return co(e,t)},Un.sortedIndexBy=function(e,t,n){return so(e,t,fi(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=co(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return co(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return so(e,t,fi(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=co(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Un.startCase=Jl,Un.startsWith=function(e,t,n){return e=kl(e),n=null==n?0:ur(bl(n),0,e.length),t=po(t),e.slice(n,n+t.length)==t},Un.subtract=jc,Un.sum=function(e){return e&&e.length?Yt(e,lc):0},Un.sumBy=function(e,t){return e&&e.length?Yt(e,fi(t,2)):0},Un.template=function(e,n,r){var o=Un.templateSettings;r&&_i(e,n,r)&&(n=t),e=kl(e),n=Sl({},n,o,ni);var i,a,l=Sl({},n.imports,o.imports,ni),c=Dl(l),s=$t(l,c),u=0,d=n.interpolate||we,f="__p += '",p=Ie((n.escape||we).source+"|"+d.source+"|"+(d===Q?pe:we).source+"|"+(n.evaluate||we).source+"|$","g"),h="//# sourceURL="+(Re.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,o,l,c){return r||(r=o),f+=e.slice(u,c).replace(ke,on),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),l&&(a=!0,f+="';\n"+l+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),f+="';\n";var v=Re.call(n,"variable")&&n.variable;if(v){if(de.test(v))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(F,""):f).replace(K,"$1").replace(V,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=nc((function(){return Ce(c,h+"return "+f).apply(t,s)}));if(m.source=f,el(m))throw m;return m},Un.times=function(e,t){if((e=bl(e))<1||e>p)return[];var n=v,r=kn(e,v);t=fi(t),e-=v;for(var o=Gt(r,t);++n<e;)t(n);return o},Un.toFinite=gl,Un.toInteger=bl,Un.toLength=yl,Un.toLower=function(e){return kl(e).toLowerCase()},Un.toNumber=xl,Un.toSafeInteger=function(e){return e?ur(bl(e),-9007199254740991,p):0===e?e:0},Un.toString=kl,Un.toUpper=function(e){return kl(e).toUpperCase()},Un.trim=function(e,n,r){if((e=kl(e))&&(r||n===t))return Xt(e);if(!e||!(n=po(n)))return e;var o=pn(e),i=pn(n);return So(o,Qt(o,i),en(o,i)+1).join("")},Un.trimEnd=function(e,n,r){if((e=kl(e))&&(r||n===t))return e.slice(0,hn(e)+1);if(!e||!(n=po(n)))return e;var o=pn(e);return So(o,0,en(o,pn(n))+1).join("")},Un.trimStart=function(e,n,r){if((e=kl(e))&&(r||n===t))return e.replace(ie,"");if(!e||!(n=po(n)))return e;var o=pn(e);return So(o,Qt(o,pn(n))).join("")},Un.truncate=function(e,n){var r=30,o="...";if(ol(n)){var i="separator"in n?n.separator:i;r="length"in n?bl(n.length):r,o="omission"in n?po(n.omission):o}var a=(e=kl(e)).length;if(an(e)){var l=pn(e);a=l.length}if(r>=a)return e;var c=r-fn(o);if(c<1)return o;var s=l?So(l,0,c).join(""):e.slice(0,c);if(i===t)return s+o;if(l&&(c+=s.length-c),sl(i)){if(e.slice(c).search(i)){var u,d=s;for(i.global||(i=Ie(i.source,kl(he.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;s=s.slice(0,f===t?c:f)}}else if(e.indexOf(po(i),c)!=c){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+o},Un.unescape=function(e){return(e=kl(e))&&X.test(e)?e.replace(Y,vn):e},Un.uniqueId=function(e){var t=++Ze;return kl(e)+t},Un.upperCase=Ql,Un.upperFirst=ec,Un.each=ka,Un.eachRight=_a,Un.first=qi,dc(Un,(Sc={},_r(Un,(function(e,t){Re.call(Un.prototype,t)||(Sc[t]=e)})),Sc),{chain:!1}),Un.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),Ct(["drop","take"],(function(e,n){Yn.prototype[e]=function(r){r=r===t?1:wn(bl(r),0);var o=this.__filtered__&&!n?new Yn(this):this.clone();return o.__filtered__?o.__takeCount__=kn(r,o.__takeCount__):o.__views__.push({size:kn(r,v),type:e+(o.__dir__<0?"Right":"")}),o},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:fi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ct(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}})),Yn.prototype.compact=function(){return this.filter(lc)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Yn(this):this.map((function(n){return Ar(n,e,t)}))})),Yn.prototype.reject=function(e){return this.filter(Na(fi(e)))},Yn.prototype.slice=function(e,n){e=bl(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Yn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=bl(n))<0?r.dropRight(-n):r.take(n-e)),r)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(v)},_r(Yn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Un[o?"take"+("last"==n?"Right":""):n],a=o||/^find/.test(n);i&&(Un.prototype[n]=function(){var n=this.__wrapped__,l=o?[1]:arguments,c=n instanceof Yn,s=l[0],u=c||Ga(n),d=function(e){var t=i.apply(Un,At([e],l));return o&&f?t[0]:t};u&&r&&"function"==typeof s&&1!=s.length&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,v=c&&!p;if(!a&&u){n=v?n:new Yn(this);var m=e.apply(n,l);return m.__actions__.push({func:ga,args:[d],thisArg:t}),new Vn(m,f)}return h&&v?e.apply(this,l):(m=this.thru(d),h?o?m.value()[0]:m.value():m)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ga(o)?o:[],e)}return this[n]((function(n){return t.apply(Ga(n)?n:[],e)}))}})),_r(Yn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Re.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Fo(t,2).name]=[{name:"wrapper",func:t}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Ao(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ao(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ao(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ga(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=kn(t,e+a);break;case"takeRight":e=wn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,l=i.end,c=l-a,s=r?l:a-1,u=this.__iteratees__,d=u.length,f=0,p=kn(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return bo(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var v=-1,m=e[s+=t];++v<d;){var g=u[v],b=g.iteratee,y=g.type,x=b(m);if(2==y)m=x;else if(!x){if(1==y)continue e;break e}}h[f++]=m}return h},Un.prototype.at=ba,Un.prototype.chain=function(){return ma(this)},Un.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===t&&(this.__values__=ml(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var n,r=this;r instanceof Kn;){var o=Ui(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var n=e;return this.__actions__.length&&(n=new Yn(this)),(n=n.reverse()).__actions__.push({func:ga,args:[oa],thisArg:t}),new Vn(n,this.__chain__)}return this.thru(oa)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return bo(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,lt&&(Un.prototype[lt]=function(){return this}),Un}();"function"==typeof define&&"object"==(0,r.Z)(n.amdO)&&n.amdO?(ft._=mn,define((function(){return mn}))):ht?((ht.exports=mn)._=mn,pt._=mn):ft._=mn}.call(void 0)},6934:function(e,t,n){"use strict";var r={};(0,n(319).assign)(r,n(5186),n(9254),n(3417)),e.exports=r},5186:function(e,t,n){"use strict";var r=n(5926),o=n(319),i=n(1519),a=n(994),l=n(13),c=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new s(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}s.prototype.push=function(e,t){var n,a,l=this.strm,s=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new o.Buf8(s),l.next_out=0,l.avail_out=s),1!==(n=r.deflate(l,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(l.output,l.next_out))):this.onData(o.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),l.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=s,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},9254:function(e,t,n){"use strict";var r=n(1361),o=n(319),i=n(1519),a=n(3417),l=n(994),c=n(13),s=n(4414),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(l[n]);if(this.header=new s,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(l[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}d.prototype.push=function(e,t){var n,l,c,s,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,v=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new o.Buf8(p),f.next_out=0,f.avail_out=p),(n=r.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===v&&(n=a.Z_OK,v=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||l!==a.Z_FINISH&&l!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(f.output,f.next_out),s=f.next_out-c,d=i.buf2string(f.output,c),f.next_out=s,f.avail_out=p-s,s&&o.arraySet(f.output,f.output,c,s,0),this.onData(d)):this.onData(o.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(v=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(l=a.Z_FINISH),l===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):l!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},319:function(e,t,n){"use strict";n.r(t);var r=n(8758),o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}exports.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==(0,r.Z)(n))throw new TypeError(n+"must be non-object");for(var o in n)i(n,o)&&(e[o]=n[o])}}return e},exports.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),o);else for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},l={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};exports.setTyped=function(e){e?(exports.Buf8=Uint8Array,exports.Buf16=Uint16Array,exports.Buf32=Int32Array,exports.assign(exports,a)):(exports.Buf8=Array,exports.Buf16=Array,exports.Buf32=Array,exports.assign(exports,l))},exports.setTyped(o)},1519:function(e,t,n){"use strict";var r=n(319),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new r.Buf8(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,o,i,a,l=e.length,c=0;for(i=0;i<l;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,i=0;a<c;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,o,i,l=t||e.length,s=new Array(2*l);for(r=0,n=0;n<l;)if((o=e[n++])<128)s[r++]=o;else if((i=a[o])>4)s[r++]=65533,n+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&n<l;)o=o<<6|63&e[n++],i--;i>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}return c(s,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},9643:function(e){"use strict";e.exports=function(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(o=o+t[r++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},3417:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},7690:function(e){"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,o){var i=t,a=o+r;e^=-1;for(var l=o;l<a;l++)e=e>>>8^i[255&(e^n[l])];return-1^e}},5926:function(e,t,n){"use strict";var r,o=n(319),i=n(762),a=n(9643),l=n(7690),c=n(994),s=-2,u=258,d=262,f=103,p=113,h=666;function v(e,t){return e.msg=c[t],t}function m(e){return(e<<1)-(e>4?9:0)}function g(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function x(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,s=e.window,f=e.w_mask,p=e.prev,h=e.strstart+u,v=s[i+a-1],m=s[i+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do{if(s[(n=t)+a]===m&&s[n+a-1]===v&&s[n]===s[i]&&s[++n]===s[i+1]){i+=2,n++;do{}while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<h);if(r=u-(h-i),i=h-u,r>a){if(e.match_start=t,a=r,r>=l)break;v=s[i+a-1],m=s[i+a]}}}while((t=p[t&f])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead}function _(e){var t,n,r,i,c,s,u,f,p,h,v=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=v+(v-d)){o.arraySet(e.window,e.window,v,v,0),e.match_start-=v,e.strstart-=v,e.block_start-=v,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=v?r-v:0}while(--n);t=n=v;do{r=e.prev[--t],e.prev[t]=r>=v?r-v:0}while(--n);i+=v}if(0===e.strm.avail_in)break;if(s=e.strm,u=e.window,f=e.strstart+e.lookahead,p=i,h=void 0,(h=s.avail_in)>p&&(h=p),n=0===h?0:(s.avail_in-=h,o.arraySet(u,s.input,s.next_in,h,f),1===s.state.wrap?s.adler=a(s.adler,u,h,f):2===s.state.wrap&&(s.adler=l(s.adler,u,h,f)),s.next_in+=h,s.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function E(e,t){for(var n,r;;){if(e.lookahead<d){if(_(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n)),e.match_length>=3)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,o;;){if(e.lookahead<d){if(_(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=i._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),g(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):v(e,s)}function I(e){var t,n=j(e);return 0===n&&((t=e.state).window_size=2*t.w_size,g(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function T(e,t,n,r,i,a){if(!e)return s;var l=1;if(-1===t&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return v(e,s);8===r&&(r=9);var c=new O;return e.state=c,c.strm=e,c.wrap=l,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=i+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new o.Buf8(2*c.w_size),c.head=new o.Buf16(c.hash_size),c.prev=new o.Buf16(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new o.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,I(e)}r=[new C(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,E),new C(4,5,16,8,E),new C(4,6,32,32,E),new C(4,4,16,16,S),new C(8,16,32,32,S),new C(8,16,128,128,S),new C(8,32,128,256,S),new C(32,128,258,1024,S),new C(32,258,258,4096,S)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=I,t.deflateResetKeep=j,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},t.deflate=function(e,t){var n,o,a,c;if(!e||!e.state||t>5||t<0)return e?v(e,s):s;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===h&&4!==t)return v(e,0===e.avail_out?-5:s);if(o.strm=e,n=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,x(o,31),x(o,139),x(o,8),o.gzhead?(x(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),x(o,255&o.gzhead.time),x(o,o.gzhead.time>>8&255),x(o,o.gzhead.time>>16&255),x(o,o.gzhead.time>>24&255),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(x(o,255&o.gzhead.extra.length),x(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=l(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(x(o,0),x(o,0),x(o,0),x(o,0),x(o,0),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,3),o.status=p);else{var d=8+(o.w_bits-8<<4)<<8;d|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=p,w(o,d),0!==o.strstart&&(w(o,e.adler>>>16),w(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending!==o.pending_buf_size));)x(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.status=f)}else o.status=f;if(o.status===f&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&b(e),o.pending+2<=o.pending_buf_size&&(x(o,255&e.adler),x(o,e.adler>>8&255),e.adler=0,o.status=p)):o.status=p),0!==o.pending){if(b(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(n)&&4!==t)return v(e,-5);if(o.status===h&&0!==e.avail_in)return v(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&o.status!==h){var k=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(_(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,l=e.window;;){if(e.lookahead<=u){if(_(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=l[o=e.strstart-1])===l[++o]&&r===l[++o]&&r===l[++o]){a=e.strstart+u;do{}while(r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&o<a);e.match_length=u-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):r[o.level].func(o,t);if(3!==k&&4!==k||(o.status=h),1===k||3===k)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===k&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(g(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),b(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(x(o,255&e.adler),x(o,e.adler>>8&255),x(o,e.adler>>16&255),x(o,e.adler>>24&255),x(o,255&e.total_in),x(o,e.total_in>>8&255),x(o,e.total_in>>16&255),x(o,e.total_in>>24&255)):(w(o,e.adler>>>16),w(o,65535&e.adler)),b(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?v(e,s):(e.state=null,t===p?v(e,-3):0):s},t.deflateSetDictionary=function(e,t){var n,r,i,l,c,u,d,f,p=t.length;if(!e||!e.state)return s;if(2===(l=(n=e.state).wrap)||1===l&&42!==n.status||n.lookahead)return s;for(1===l&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===l&&(g(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new o.Buf8(n.w_size),o.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),c=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,_(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,_(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=d,e.avail_in=c,n.wrap=l,0},t.deflateInfo="pako deflate (from Nodeca project)"},4414:function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},3030:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,a,l,c,s,u,d,f,p,h,v,m,g,b,y,x,w,k,_,E,S,C;n=e.state,r=e.next_in,S=e.input,o=r+(e.avail_in-5),i=e.next_out,C=e.output,a=i-(t-e.avail_out),l=i+(e.avail_out-257),c=n.dmax,s=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,v=n.lencode,m=n.distcode,g=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=v[p&g];t:for(;;){if(p>>>=x=y>>>24,h-=x,0===(x=y>>>16&255))C[i++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=v[(65535&y)+(p&(1<<x)-1)];continue t}if(32&x){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&y,(x&=15)&&(h<x&&(p+=S[r++]<<h,h+=8),w+=p&(1<<x)-1,p>>>=x,h-=x),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=m[p&b];n:for(;;){if(p>>>=x=y>>>24,h-=x,!(16&(x=y>>>16&255))){if(0==(64&x)){y=m[(65535&y)+(p&(1<<x)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,h<(x&=15)&&(p+=S[r++]<<h,(h+=8)<x&&(p+=S[r++]<<h,h+=8)),(k+=p&(1<<x)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=x,h-=x,k>(x=i-a)){if((x=k-x)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(_=0,E=f,0===d){if(_+=s-x,x<w){w-=x;do{C[i++]=f[_++]}while(--x);_=i-k,E=C}}else if(d<x){if(_+=s+d-x,(x-=d)<w){w-=x;do{C[i++]=f[_++]}while(--x);if(_=0,d<w){w-=x=d;do{C[i++]=f[_++]}while(--x);_=i-k,E=C}}}else if(_+=d-x,x<w){w-=x;do{C[i++]=f[_++]}while(--x);_=i-k,E=C}for(;w>2;)C[i++]=E[_++],C[i++]=E[_++],C[i++]=E[_++],w-=3;w&&(C[i++]=E[_++],w>1&&(C[i++]=E[_++]))}else{_=i-k;do{C[i++]=C[_++],C[i++]=C[_++],C[i++]=C[_++],w-=3}while(w>2);w&&(C[i++]=C[_++],w>1&&(C[i++]=C[_++]))}break}}break}}while(r<o&&i<l);r-=w=h>>3,p&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=i<l?l-i+257:257-(i-l),n.hold=p,n.bits=h}},1361:function(e,t,n){"use strict";var r=n(319),o=n(9643),i=n(7690),a=n(3030),l=n(9853),c=-2,s=12,u=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):c}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):c}function v(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):c}function m(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=v(e,t))&&(e.state=null),n):c}var g,b,y=!0;function x(e){if(y){var t;for(g=new r.Buf32(512),b=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=g,e.lenbits=9,e.distcode=b,e.distbits=5}function w(e,t,n,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),o>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),r.arraySet(a.window,t,n-o,i,a.wnext),(o-=i)?(r.arraySet(a.window,t,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=h,t.inflateReset2=v,t.inflateResetKeep=p,t.inflateInit=function(e){return m(e,15)},t.inflateInit2=m,t.inflate=function(e,t){var n,f,p,h,v,m,g,b,y,k,_,E,S,C,O,j,I,T,M,L,A,P,D,z,R=0,Z=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(n=e.state).mode===s&&(n.mode=13),v=e.next_out,p=e.output,g=e.avail_out,h=e.next_in,f=e.input,m=e.avail_in,b=n.hold,y=n.bits,k=m,_=g,P=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;y<16;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(2&n.wrap&&35615===b){n.check=0,Z[0]=255&b,Z[1]=b>>>8&255,n.check=i(n.check,Z,2,0),b=0,y=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",n.mode=u;break}if(8!=(15&b)){e.msg="unknown compression method",n.mode=u;break}if(y-=4,A=8+(15&(b>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){e.msg="invalid window size",n.mode=u;break}n.dmax=1<<A,e.adler=n.check=1,n.mode=512&b?10:s,b=0,y=0;break;case 2:for(;y<16;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(n.flags=b,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=u;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=u;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(Z[0]=255&b,Z[1]=b>>>8&255,n.check=i(n.check,Z,2,0)),b=0,y=0,n.mode=3;case 3:for(;y<32;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.head&&(n.head.time=b),512&n.flags&&(Z[0]=255&b,Z[1]=b>>>8&255,Z[2]=b>>>16&255,Z[3]=b>>>24&255,n.check=i(n.check,Z,4,0)),b=0,y=0,n.mode=4;case 4:for(;y<16;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(Z[0]=255&b,Z[1]=b>>>8&255,n.check=i(n.check,Z,2,0)),b=0,y=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(Z[0]=255&b,Z[1]=b>>>8&255,n.check=i(n.check,Z,2,0)),b=0,y=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((E=n.length)>m&&(E=m),E&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,E,A)),512&n.flags&&(n.check=i(n.check,f,E,h)),m-=E,h+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===m)break e;E=0;do{A=f[h+E++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A))}while(A&&E<m);if(512&n.flags&&(n.check=i(n.check,f,E,h)),m-=E,h+=E,A)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===m)break e;E=0;do{A=f[h+E++],n.head&&A&&n.length<65536&&(n.head.comment+=String.fromCharCode(A))}while(A&&E<m);if(512&n.flags&&(n.check=i(n.check,f,E,h)),m-=E,h+=E,A)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;y<16;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(b!==(65535&n.check)){e.msg="header crc mismatch",n.mode=u;break}b=0,y=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=s;break;case 10:for(;y<32;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}e.adler=n.check=d(b),b=0,y=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=g,e.next_in=h,e.avail_in=m,n.hold=b,n.bits=y,2;e.adler=n.check=1,n.mode=s;case s:if(5===t||6===t)break e;case 13:if(n.last){b>>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}switch(n.last=1&b,y-=1,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=u}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",n.mode=u;break}if(n.length=65535&b,b=0,y=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(E=n.length){if(E>m&&(E=m),E>g&&(E=g),0===E)break e;r.arraySet(p,f,h,E,v),m-=E,h+=E,g-=E,v+=E,n.length-=E;break}n.mode=s;break;case 17:for(;y<14;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(n.nlen=257+(31&b),b>>>=5,y-=5,n.ndist=1+(31&b),b>>>=5,y-=5,n.ncode=4+(15&b),b>>>=4,y-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=u;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;y<3;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.lens[N[n.have++]]=7&b,b>>>=3,y-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},P=l(0,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,P){e.msg="invalid code lengths set",n.mode=u;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;j=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(I<16)b>>>=O,y-=O,n.lens[n.have++]=I;else{if(16===I){for(z=O+2;y<z;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(b>>>=O,y-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=u;break}A=n.lens[n.have-1],E=3+(3&b),b>>>=2,y-=2}else if(17===I){for(z=O+3;y<z;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}y-=O,A=0,E=3+(7&(b>>>=O)),b>>>=3,y-=3}else{for(z=O+7;y<z;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}y-=O,A=0,E=11+(127&(b>>>=O)),b>>>=7,y-=7}if(n.have+E>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=u;break}for(;E--;)n.lens[n.have++]=A}}if(n.mode===u)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=u;break}if(n.lenbits=9,D={bits:n.lenbits},P=l(1,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,P){e.msg="invalid literal/lengths set",n.mode=u;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},P=l(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,P){e.msg="invalid distances set",n.mode=u;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(m>=6&&g>=258){e.next_out=v,e.avail_out=g,e.next_in=h,e.avail_in=m,n.hold=b,n.bits=y,a(e,_),v=e.next_out,p=e.output,g=e.avail_out,h=e.next_in,f=e.input,m=e.avail_in,b=n.hold,y=n.bits,n.mode===s&&(n.back=-1);break}for(n.back=0;j=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(j&&0==(240&j)){for(T=O,M=j,L=I;j=(R=n.lencode[L+((b&(1<<T+M)-1)>>T)])>>>16&255,I=65535&R,!(T+(O=R>>>24)<=y);){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=O,y-=O,n.back+=O,n.length=I,0===j){n.mode=26;break}if(32&j){n.back=-1,n.mode=s;break}if(64&j){e.msg="invalid literal/length code",n.mode=u;break}n.extra=15&j,n.mode=22;case 22:if(n.extra){for(z=n.extra;y<z;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;j=(R=n.distcode[b&(1<<n.distbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(0==(240&j)){for(T=O,M=j,L=I;j=(R=n.distcode[L+((b&(1<<T+M)-1)>>T)])>>>16&255,I=65535&R,!(T+(O=R>>>24)<=y);){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=O,y-=O,n.back+=O,64&j){e.msg="invalid distance code",n.mode=u;break}n.offset=I,n.extra=15&j,n.mode=24;case 24:if(n.extra){for(z=n.extra;y<z;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=u;break}n.mode=25;case 25:if(0===g)break e;if(E=_-g,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=u;break}E>n.wnext?(E-=n.wnext,S=n.wsize-E):S=n.wnext-E,E>n.length&&(E=n.length),C=n.window}else C=p,S=v-n.offset,E=n.length;E>g&&(E=g),g-=E,n.length-=E;do{p[v++]=C[S++]}while(--E);0===n.length&&(n.mode=21);break;case 26:if(0===g)break e;p[v++]=n.length,g--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===m)break e;m--,b|=f[h++]<<y,y+=8}if(_-=g,e.total_out+=_,n.total+=_,_&&(e.adler=n.check=n.flags?i(n.check,p,_,v-_):o(n.check,p,_,v-_)),_=g,(n.flags?b:d(b))!==n.check){e.msg="incorrect data check",n.mode=u;break}b=0,y=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;y<32;){if(0===m)break e;m--,b+=f[h++]<<y,y+=8}if(b!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=u;break}b=0,y=0}n.mode=29;case 29:P=1;break e;case u:P=-3;break e;case 31:return-4;default:return c}return e.next_out=v,e.avail_out=g,e.next_in=h,e.avail_in=m,n.hold=b,n.bits=y,(n.wsize||_!==e.avail_out&&n.mode<u&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,_-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,_-=e.avail_out,e.total_in+=k,e.total_out+=_,n.total+=_,n.wrap&&_&&(e.adler=n.check=n.flags?i(n.check,p,_,e.next_out-_):o(n.check,p,_,e.next_out-_)),e.data_type=n.bits+(n.last?64:0)+(n.mode===s?128:0)+(20===n.mode||15===n.mode?256:0),(0===k&&0===_||4===t)&&0===P&&(P=-5),P)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?c:(n.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?c:11===n.mode&&o(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},9853:function(e,t,n){"use strict";var r=n(319),o=15,i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,s,u,d,f,p){var h,v,m,g,b,y,x,w,k,_=p.bits,E=0,S=0,C=0,O=0,j=0,I=0,T=0,M=0,L=0,A=0,P=null,D=0,z=new r.Buf16(16),R=new r.Buf16(16),Z=null,N=0;for(E=0;E<=o;E++)z[E]=0;for(S=0;S<s;S++)z[t[n+S]]++;for(j=_,O=o;O>=1&&0===z[O];O--);if(j>O&&(j=O),0===O)return u[d++]=20971520,u[d++]=20971520,p.bits=1,0;for(C=1;C<O&&0===z[C];C++);for(j<C&&(j=C),M=1,E=1;E<=o;E++)if(M<<=1,(M-=z[E])<0)return-1;if(M>0&&(0===e||1!==O))return-1;for(R[1]=0,E=1;E<o;E++)R[E+1]=R[E]+z[E];for(S=0;S<s;S++)0!==t[n+S]&&(f[R[t[n+S]]++]=S);if(0===e?(P=Z=f,y=19):1===e?(P=i,D-=257,Z=a,N-=257,y=256):(P=l,Z=c,y=-1),A=0,S=0,E=C,b=d,I=j,T=0,m=-1,g=(L=1<<j)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){x=E-T,f[S]<y?(w=0,k=f[S]):f[S]>y?(w=Z[N+f[S]],k=P[D+f[S]]):(w=96,k=0),h=1<<E-T,C=v=1<<I;do{u[b+(A>>T)+(v-=h)]=x<<24|w<<16|k|0}while(0!==v);for(h=1<<E-1;A&h;)h>>=1;if(0!==h?(A&=h-1,A+=h):A=0,S++,0==--z[E]){if(E===O)break;E=t[n+f[S]]}if(E>j&&(A&g)!==m){for(0===T&&(T=j),b+=C,M=1<<(I=E-T);I+T<O&&!((M-=z[I+T])<=0);)I++,M<<=1;if(L+=1<<I,1===e&&L>852||2===e&&L>592)return 1;u[m=A&g]=j<<24|I<<16|b-d|0}}return 0!==A&&(u[b+A]=E-T<<24|64<<16|0),p.bits=j,0}},994:function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},762:function(e,t,n){"use strict";var r=n(319);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,l=30,c=15,s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var h=new Array(60);o(h);var v=new Array(512);o(v);var m=new Array(256);o(m);var g=new Array(29);o(g);var b,y,x,w=new Array(l);function k(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function _(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?v[e]:v[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function C(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function O(e,t,n){C(e,n[2*t],n[2*t+1])}function j(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function I(e,t,n){var r,o,i=new Array(16),a=0;for(r=1;r<=c;r++)i[r]=a=a+n[r-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=j(i[l]++,l))}}function T(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<l;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function M(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function L(e,t,n,r){var o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function A(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&L(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!L(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function P(e,t,n){var r,o,a,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===r?O(e,o,t):(O(e,(a=m[o])+i+1,t),0!==(l=s[a])&&C(e,o-=g[a],l),O(e,a=E(--r),n),0!==(l=u[a])&&C(e,r-=w[a],l))}while(c<e.last_lit);O(e,256,t)}function D(e,t){var n,r,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<s;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)A(e,i,n);o=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],A(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,A(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,o,i,a,l,s=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,v=t.stat_desc.max_length,m=0;for(i=0;i<=c;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(i=s[2*s[2*(r=e.heap[n])+1]+1]+1)>v&&(i=v,m++),s[2*r+1]=i,r>u||(e.bl_count[i]++,a=0,r>=h&&(a=p[r-h]),l=s[2*r],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(d[2*r+1]+a)));if(0!==m){do{for(i=v-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[v]--,m-=2}while(m>0);for(i=v;0!==i;i--)for(r=e.bl_count[i];0!==r;)(o=e.heap[--n])>u||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),r--)}}(e,t),I(i,u,e.bl_count)}function z(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++l<c&&o===a||(l<s?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function R(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++l<c&&o===a)){if(l<s)do{O(e,o,e.bl_tree)}while(0!=--l);else 0!==o?(o!==i&&(O(e,o,e.bl_tree),l--),O(e,16,e.bl_tree),C(e,l-3,2)):l<=10?(O(e,17,e.bl_tree),C(e,l-3,3)):(O(e,18,e.bl_tree),C(e,l-11,7));l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}o(w);var Z=!1;function N(e,t,n,o){C(e,0+(o?1:0),3),function(e,t,n,o){M(e),o&&(S(e,n),S(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){Z||(!function(){var e,t,n,r,o,i=new Array(16);for(n=0,r=0;r<28;r++)for(g[r]=n,e=0;e<1<<s[r];e++)m[n++]=r;for(m[n-1]=r,o=0,r=0;r<16;r++)for(w[r]=o,e=0;e<1<<u[r];e++)v[o++]=r;for(o>>=7;r<l;r++)for(w[r]=o<<7,e=0;e<1<<u[r]-7;e++)v[256+o++]=r;for(t=0;t<=c;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(I(p,287,i),e=0;e<l;e++)h[2*e+1]=5,h[2*e]=j(e,5);b=new k(p,s,257,a,c),y=new k(h,u,0,l,c),x=new k(new Array(0),d,0,19,7)}(),Z=!0),e.l_desc=new _(e.dyn_ltree,b),e.d_desc=new _(e.dyn_dtree,y),e.bl_desc=new _(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,T(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var o,a,l=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),D(e,e.l_desc),D(e,e.d_desc),l=function(e){var t;for(z(e,e.dyn_ltree,e.l_desc.max_code),z(e,e.dyn_dtree,e.d_desc.max_code),D(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?N(e,t,n,r):4===e.strategy||a===o?(C(e,2+(r?1:0),3),P(e,p,h)):(C(e,4+(r?1:0),3),function(e,t,n,r){var o;for(C(e,t-257,5),C(e,n-1,5),C(e,r-4,4),o=0;o<r;o++)C(e,e.bl_tree[2*f[o]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),P(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&M(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+i+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){C(e,2,3),O(e,256,p),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},13:function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},8281:function(e){e.exports=function(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",o=0;o<e.length;o++){var i=e[o];if(t)i?r+=String.fromCharCode(i):t=!1;else{if(!i)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");n+=String.fromCharCode(i)}}return{keyword:r,text:n}}},5813:function(e){e.exports=function(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n,r=e.length+t.length+1,o=new Uint8Array(r),i=0,a=0;a<e.length;a++){if(!(n=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");o[i++]=n}o[i++]=0;for(var l=0;l<t.length;l++){if(!(n=t.charCodeAt(l)))throw new Error("0x00 character is not permitted in tEXt content");o[i++]=n}return{name:"tEXt",data:o}}},6927:function(e,t,n){t.encode=n(5813),t.decode=n(8281)},3070:function(e,t,n){var r=n(885),o=n(3868);e.exports=function(e){var t,n=8,c=n;for(t=0;t<e.length;t++)n+=e[t].data.length,n+=12;var s=new Uint8Array(n);for(s[0]=137,s[1]=80,s[2]=78,s[3]=71,s[4]=13,s[5]=10,s[6]=26,s[7]=10,t=0;t<e.length;t++){var u=e[t],d=u.name,f=u.data,p=f.length,h=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)];l[0]=p,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0],s[c++]=h[0],s[c++]=h[1],s[c++]=h[2],s[c++]=h[3];for(var v=0;v<p;)s[c++]=f[v++];var m=h.concat(r(f)),g=o.buf(m);a[0]=g,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0]}return s};var i=new Uint8Array(4),a=new Int32Array(i.buffer),l=new Uint32Array(i.buffer)},9567:function(e,t,n){var r=n(3868);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],l=8;for(;l<e.length;){o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var c=a[0]+4,s=new Uint8Array(c);s[0]=e[l++],s[1]=e[l++],s[2]=e[l++],s[3]=e[l++];var u=String.fromCharCode(s[0])+String.fromCharCode(s[1])+String.fromCharCode(s[2])+String.fromCharCode(s[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<c;d++)s[d]=e[l++];o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var f=i[0];if(r.buf(s)!==f)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(s.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var o=new Uint8Array(4),i=new Int32Array(o.buffer),a=new Uint32Array(o.buffer)},6575:function(e,t,n){"use strict";function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function o(e,t,n){var o=r(t,n);if(0===o)return r(e,t);var a=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/o;return r(e,i(t,n,a=Math.max(0,Math.min(1,a))))}function i(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function a(e,t,n,o){var l=o||[];if(function(e,t){var n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3],a=3*r[0]-2*n[0]-i[0];a*=a;var l=3*r[1]-2*n[1]-i[1];l*=l;var c=3*o[0]-2*i[0]-n[0];c*=c;var s=3*o[1]-2*i[1]-n[1];return a<c&&(a=c),l<(s*=s)&&(l=s),a+l}(e,t)<n){var c=e[t+0];if(l.length){var s=function(e,t){return Math.sqrt(r(e,t))}(l[l.length-1],c);s>1&&l.push(c)}else l.push(c);l.push(e[t+3])}else{var u=.5,d=e[t+0],f=e[t+1],p=e[t+2],h=e[t+3],v=i(d,f,u),m=i(f,p,u),g=i(p,h,u),b=i(v,m,u),y=i(m,g,u),x=i(b,y,u);a([d,v,b,x],0,n,l),a([x,y,g,h],0,n,l)}return l}function l(e,t){return c(e,0,e.length,t)}function c(e,t,n,r,i){for(var a=i||[],l=e[t],s=e[n-1],u=0,d=1,f=t+1;f<n-1;++f){var p=o(e[f],l,s);p>u&&(u=p,d=f)}return Math.sqrt(u)>r?(c(e,t,d+1,r,a),c(e,d,n,r,a)):(a.length||a.push(l),a.push(s)),a}function s(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15,n=arguments.length>2?arguments[2]:void 0,r=[],o=(e.length-1)/3,i=0;i<o;i++){var l=3*i;a(e,l,t,r)}return n&&n>0?c(r,0,r.length,n):r}n.d(t,{o:function(){return l},s:function(){return s}})},9636:function(e,t,n){"use strict";var r=n(9787),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},1337:function(e,t,n){"use strict";e.exports=n(9636)},7608:function(e,t,n){"use strict";n.r(t);var r=n(8758);e=n.hmd(e);var o=function(e){var t,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new I(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=C(a,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=d(e,t,n);if("normal"===c.type){if(r=n.done?v:p,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=v,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function g(){}function b(){}function y(){}var x={};x[a]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(T([])));k&&k!==n&&o.call(k,a)&&(x=k);var _=y.prototype=g.prototype=Object.create(x);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,l,c){var s=d(e[i],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===(0,r.Z)(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(f).then((function(e){u.value=e,l(u)}),(function(e){return n("throw",e,l,c)}))}c(s.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=d(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(o.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:M}}function M(){return{value:t,done:!0}}return b.prototype=_.constructor=y,y.constructor=b,b.displayName=s(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},E(S.prototype),S.prototype[l]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new S(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(_),s(_,c,"Generator"),_[a]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}("object"===(0,r.Z)(e)?e.exports:{});try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}},8136:function(e,t,n){"use strict";n.d(t,{W:function(){return i},k:function(){return a}});var r=n(7775),o=n(6967);function i(){return Math.floor(Math.random()*Math.pow(2,31))}var a=function(){function e(t){(0,r.Z)(this,e),this.seed=t}return(0,o.Z)(e,[{key:"next",value:function(){return this.seed?(Math.pow(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Math.pow(2,31):Math.random()}}]),e}()},6852:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ce}});var r=n(7775),o=n(6967),i=n(668),a=n(5858);function l(e,t,n){if(e&&e.length){var r=(0,i.Z)(t,2),o=r[0],a=r[1],l=Math.PI/180*n,c=Math.cos(l),s=Math.sin(l);e.forEach((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];e[0]=(n-o)*c-(r-a)*s+o,e[1]=(n-o)*s+(r-a)*c+a}))}}function c(e){var t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var o=[0,0];if(n){var i,c=s(e);try{for(c.s();!(i=c.n()).done;){l(i.value,o,n)}}catch(e){c.e(e)}finally{c.f()}}var u=function(e,t){var n,r=[],o=s(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,l=(0,a.Z)(i);l[0].join(",")!==l[l.length-1].join(",")&&l.push([l[0][0],l[0][1]]),l.length>2&&r.push(l)}}catch(e){o.e(e)}finally{o.f()}var c=[];t=Math.max(t,.1);for(var u=[],d=0,f=r;d<f.length;d++)for(var p=f[d],h=0;h<p.length-1;h++){var v=p[h],m=p[h+1];if(v[1]!==m[1]){var g=Math.min(v[1],m[1]);u.push({ymin:g,ymax:Math.max(v[1],m[1]),x:g===v[1]?v[0]:m[0],islope:(m[0]-v[0])/(m[1]-v[1])})}}if(u.sort((function(e,t){return e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)})),!u.length)return c;var b=[],y=u[0].ymin;for(;b.length||u.length;){if(u.length){for(var x=-1,w=0;w<u.length&&!(u[w].ymin>y);w++)x=w;u.splice(0,x+1).forEach((function(e){b.push({s:y,edge:e})}))}if((b=b.filter((function(e){return!(e.edge.ymax<=y)}))).sort((function(e,t){return e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)})),b.length>1)for(var k=0;k<b.length;k+=2){var _=k+1;if(_>=b.length)break;var E=b[k].edge,S=b[_].edge;c.push([[Math.round(E.x),y],[Math.round(S.x),y]])}y+=t,b.forEach((function(e){e.edge.x=e.edge.x+t*e.edge.islope}))}return c}(e,r);if(n){var d,f=s(e);try{for(f.s();!(d=f.n()).done;){l(d.value,o,-n)}}catch(e){f.e(e)}finally{f.f()}!function(e,t,n){var r=[];e.forEach((function(e){return r.push.apply(r,(0,a.Z)(e))})),l(r,t,n)}(u,o,-n)}return u}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(){function e(t){(0,r.Z)(this,e),this.helper=t}return(0,o.Z)(e,[{key:"fillPolygons",value:function(e,t){return this._fillPolygons(e,t)}},{key:"_fillPolygons",value:function(e,t){var n=d(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}},{key:"renderLines",value:function(e,t){var n,r=[],o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.push.apply(r,(0,a.Z)(this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],t)))}}catch(e){o.e(e)}finally{o.f()}return r}}]),e}(),v=n(8875),m=n(4653),g=n(3164);function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,g.Z)(e);if(t){var o=(0,g.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,m.Z)(this,n)}}var w=function(e){(0,v.Z)(n,e);var t=x(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"fillPolygons",value:function(e,t){var n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);var r,o=d(e,Object.assign({},t,{hachureGap:n})),l=Math.PI/180*t.hachureAngle,s=[],u=.5*n*Math.cos(l),f=.5*n*Math.sin(l),p=b(o);try{for(p.s();!(r=p.n()).done;){var h=(0,i.Z)(r.value,2),v=h[0],m=h[1];c([v,m])&&s.push([[v[0]-u,v[1]+f],(0,a.Z)(m)],[[v[0]+u,v[1]-f],(0,a.Z)(m)])}}catch(e){p.e(e)}finally{p.f()}return{type:"fillSketch",ops:this.renderLines(s,t)}}}]),n}(h);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,g.Z)(e);if(t){var o=(0,g.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,m.Z)(this,n)}}var _=function(e){(0,v.Z)(n,e);var t=k(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"fillPolygons",value:function(e,t){var n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),o=this._fillPolygons(e,r);return n.ops=n.ops.concat(o.ops),n}}]),n}(h);function E(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=function(){function e(t){(0,r.Z)(this,e),this.helper=t}return(0,o.Z)(e,[{key:"fillPolygons",value:function(e,t){var n=d(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}},{key:"dotsOnLines",value:function(e,t){var n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var o=t.fillWeight;o<0&&(o=t.strokeWidth/2);var i,l=r/4,s=E(e);try{for(s.s();!(i=s.n()).done;)for(var u=i.value,d=c(u),f=d/r,p=Math.ceil(f)-1,h=d-p*r,v=(u[0][0]+u[1][0])/2-r/4,m=Math.min(u[0][1],u[1][1]),g=0;g<p;g++){var b=m+h+g*r,y=v-l+2*Math.random()*l,x=b-l+2*Math.random()*l,w=this.helper.ellipse(y,x,o,o,t);n.push.apply(n,(0,a.Z)(w.ops))}}catch(e){s.e(e)}finally{s.f()}return{type:"fillSketch",ops:n}}}]),e}(),O=function(){function e(t){(0,r.Z)(this,e),this.helper=t}return(0,o.Z)(e,[{key:"fillPolygons",value:function(e,t){var n=d(e,t);return{type:"fillSketch",ops:this.dashedLine(n,t)}}},{key:"dashedLine",value:function(e,t){var n=this,r=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,o=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((function(e){var l=c(e),s=Math.floor(l/(r+o)),u=(l+o-s*(r+o))/2,d=e[0],f=e[1];d[0]>f[0]&&(d=e[1],f=e[0]);for(var p=Math.atan((f[1]-d[1])/(f[0]-d[0])),h=0;h<s;h++){var v=h*(r+o),m=v+r,g=[d[0]+v*Math.cos(p)+u*Math.cos(p),d[1]+v*Math.sin(p)+u*Math.sin(p)],b=[d[0]+m*Math.cos(p)+u*Math.cos(p),d[1]+m*Math.sin(p)+u*Math.sin(p)];i.push.apply(i,(0,a.Z)(n.helper.doubleLineOps(g[0],g[1],b[0],b[1],t)))}})),i}}]),e}(),j=function(){function e(t){(0,r.Z)(this,e),this.helper=t}return(0,o.Z)(e,[{key:"fillPolygons",value:function(e,t){var n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,o=d(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(o,r,t)}}},{key:"zigzagLines",value:function(e,t,n){var r=this,o=[];return e.forEach((function(e){var i=c(e),l=Math.round(i/(2*t)),s=e[0],u=e[1];s[0]>u[0]&&(s=e[1],u=e[0]);for(var d=Math.atan((u[1]-s[1])/(u[0]-s[0])),f=0;f<l;f++){var p=2*f*t,h=2*(f+1)*t,v=Math.sqrt(2*Math.pow(t,2)),m=[s[0]+p*Math.cos(d),s[1]+p*Math.sin(d)],g=[s[0]+h*Math.cos(d),s[1]+h*Math.sin(d)],b=[m[0]+v*Math.cos(d+Math.PI/4),m[1]+v*Math.sin(d+Math.PI/4)];o.push.apply(o,(0,a.Z)(r.helper.doubleLineOps(m[0],m[1],b[0],b[1],n)).concat((0,a.Z)(r.helper.doubleLineOps(b[0],b[1],g[0],g[1],n))))}})),o}}]),e}(),I={};var T=n(8136);var M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function L(e,t){return e.type===t}function A(e){for(var t=[],n=function(e){for(var t=new Array;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:"".concat(parseFloat(RegExp.$1))},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e),r="BOD",o=0,i=n[o];!L(i,2);){var a=0,l=[];if("BOD"===r){if("M"!==i.text&&"m"!==i.text)return A("M0,0"+e);o++,a=M[i.text],r=i.text}else L(i,1)?a=M[r]:(o++,a=M[i.text],r=i.text);if(!(o+a<n.length))throw new Error("Path data ended short");for(var c=o;c<o+a;c++){var s=n[c];if(!L(s,1))throw new Error("Param not a number: "+r+","+s.text);l[l.length]=+s.text}if("number"!=typeof M[r])throw new Error("Bad segment: "+r);var u={key:r,data:l};t.push(u),i=n[o+=a],"M"===r&&(r="L"),"m"===r&&(r="l")}return t}function P(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e){var t,n=0,r=0,o=0,l=0,c=[],s=P(e);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.key,f=u.data;switch(d){case"M":c.push({key:"M",data:(0,a.Z)(f)});var p=(0,i.Z)(f,2);n=p[0],r=p[1];var h=(0,i.Z)(f,2);o=h[0],l=h[1];break;case"m":n+=f[0],r+=f[1],c.push({key:"M",data:[n,r]}),o=n,l=r;break;case"L":c.push({key:"L",data:(0,a.Z)(f)});var v=(0,i.Z)(f,2);n=v[0],r=v[1];break;case"l":n+=f[0],r+=f[1],c.push({key:"L",data:[n,r]});break;case"C":c.push({key:"C",data:(0,a.Z)(f)}),n=f[4],r=f[5];break;case"c":var m=f.map((function(e,t){return t%2?e+r:e+n}));c.push({key:"C",data:m}),n=m[4],r=m[5];break;case"Q":c.push({key:"Q",data:(0,a.Z)(f)}),n=f[2],r=f[3];break;case"q":var g=f.map((function(e,t){return t%2?e+r:e+n}));c.push({key:"Q",data:g}),n=g[2],r=g[3];break;case"A":c.push({key:"A",data:(0,a.Z)(f)}),n=f[5],r=f[6];break;case"a":n+=f[5],r+=f[6],c.push({key:"A",data:[f[0],f[1],f[2],f[3],f[4],n,r]});break;case"H":c.push({key:"H",data:(0,a.Z)(f)}),n=f[0];break;case"h":n+=f[0],c.push({key:"H",data:[n]});break;case"V":c.push({key:"V",data:(0,a.Z)(f)}),r=f[0];break;case"v":r+=f[0],c.push({key:"V",data:[r]});break;case"S":c.push({key:"S",data:(0,a.Z)(f)}),n=f[2],r=f[3];break;case"s":var b=f.map((function(e,t){return t%2?e+r:e+n}));c.push({key:"S",data:b}),n=b[2],r=b[3];break;case"T":c.push({key:"T",data:(0,a.Z)(f)}),n=f[0],r=f[1];break;case"t":n+=f[0],r+=f[1],c.push({key:"T",data:[n,r]});break;case"Z":case"z":c.push({key:"Z",data:[]}),n=o,r=l}}}catch(e){s.e(e)}finally{s.f()}return c}function R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e){var t,n=[],r="",o=0,l=0,c=0,s=0,u=0,d=0,f=R(e);try{for(f.s();!(t=f.n()).done;){var p=t.value,h=p.key,v=p.data;switch(h){case"M":n.push({key:"M",data:(0,a.Z)(v)});var m=(0,i.Z)(v,2);o=m[0],l=m[1];var g=(0,i.Z)(v,2);c=g[0],s=g[1];break;case"C":n.push({key:"C",data:(0,a.Z)(v)}),o=v[4],l=v[5],u=v[2],d=v[3];break;case"L":n.push({key:"L",data:(0,a.Z)(v)});var b=(0,i.Z)(v,2);o=b[0],l=b[1];break;case"H":o=v[0],n.push({key:"L",data:[o,l]});break;case"V":l=v[0],n.push({key:"L",data:[o,l]});break;case"S":var y=0,x=0;"C"===r||"S"===r?(y=o+(o-u),x=l+(l-d)):(y=o,x=l),n.push({key:"C",data:[y,x].concat((0,a.Z)(v))}),u=v[0],d=v[1],o=v[2],l=v[3];break;case"T":var w=(0,i.Z)(v,2),k=w[0],_=w[1],E=0,S=0;"Q"===r||"T"===r?(E=o+(o-u),S=l+(l-d)):(E=o,S=l);var C=o+2*(E-o)/3,O=l+2*(S-l)/3,j=k+2*(E-k)/3,I=_+2*(S-_)/3;n.push({key:"C",data:[C,O,j,I,k,_]}),u=E,d=S,o=k,l=_;break;case"Q":var T=(0,i.Z)(v,4),M=T[0],L=T[1],A=T[2],P=T[3],D=o+2*(M-o)/3,z=l+2*(L-l)/3,Z=A+2*(M-A)/3,N=P+2*(L-P)/3;n.push({key:"C",data:[D,z,Z,N,A,P]}),u=M,d=L,o=A,l=P;break;case"A":var B=Math.abs(v[0]),W=Math.abs(v[1]),U=v[2],F=v[3],K=v[4],V=v[5],Y=v[6];if(0===B||0===W)n.push({key:"C",data:[o,l,V,Y,V,Y]}),o=V,l=Y;else if(o!==V||l!==Y)H(o,l,V,Y,B,W,U,F,K).forEach((function(e){n.push({key:"C",data:e})})),o=V,l=Y;break;case"Z":n.push({key:"Z",data:[]}),o=c,l=s}r=h}}catch(e){f.e(e)}finally{f.f()}return n}function B(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function H(e,t,n,r,o,a,l,c,s,u){var d,f=(d=l,Math.PI*d/180),p=[],h=0,v=0,m=0,g=0;if(u){var b=(0,i.Z)(u,4);h=b[0],v=b[1],m=b[2],g=b[3]}else{var y=B(e,t,-f),x=(0,i.Z)(y,2);e=x[0],t=x[1];var w=B(n,r,-f),k=(0,i.Z)(w,2),_=(e-(n=k[0]))/2,E=(t-(r=k[1]))/2,S=_*_/(o*o)+E*E/(a*a);S>1&&(o*=S=Math.sqrt(S),a*=S);var C=o*o,O=a*a,j=C*O-C*E*E-O*_*_,I=C*E*E+O*_*_,T=(c===s?-1:1)*Math.sqrt(Math.abs(j/I));m=T*o*E/a+(e+n)/2,g=T*-a*_/o+(t+r)/2,h=Math.asin(parseFloat(((t-g)/a).toFixed(9))),v=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<m&&(h=Math.PI-h),n<m&&(v=Math.PI-v),h<0&&(h=2*Math.PI+h),v<0&&(v=2*Math.PI+v),s&&h>v&&(h-=2*Math.PI),!s&&v>h&&(v-=2*Math.PI)}var M=v-h;if(Math.abs(M)>120*Math.PI/180){var L=v,A=n,P=r;v=s&&v>h?h+120*Math.PI/180*1:h+120*Math.PI/180*-1,p=H(n=m+o*Math.cos(v),r=g+a*Math.sin(v),A,P,o,a,l,0,s,[v,L,m,g])}M=v-h;var D=Math.cos(h),z=Math.sin(h),R=Math.cos(v),Z=Math.sin(v),N=Math.tan(M/4),W=4/3*o*N,U=4/3*a*N,F=[e,t],K=[e+W*z,t-U*D],V=[n+W*Z,r-U*R],Y=[n,r];if(K[0]=2*F[0]-K[0],K[1]=2*F[1]-K[1],u)return[K,V,Y].concat(p);p=[K,V,Y].concat(p);for(var G=[],X=0;X<p.length;X+=3){var q=B(p[X][0],p[X][1],f),$=B(p[X+1][0],p[X+1][1],f),J=B(p[X+2][0],p[X+2][1],f);G.push([q[0],q[1],$[0],$[1],J[0],J[1]])}return G}function W(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F={randOffset:function(e,t){return re(e,t)},randOffsetWithRange:function(e,t,n){return ne(e,t,n)},ellipse:function(e,t,n,r,o){var i=X(n,r,o);return q(e,t,o,i).opset},doubleLineOps:function(e,t,n,r,o){return oe(e,t,n,r,o,!0)}};function K(e,t,n,r,o){return{type:"path",ops:oe(e,t,n,r,o)}}function V(e,t,n){var r=(e||[]).length;if(r>2){for(var o=[],i=0;i<r-1;i++)o.push.apply(o,(0,a.Z)(oe(e[i][0],e[i][1],e[i+1][0],e[i+1][1],n)));return t&&o.push.apply(o,(0,a.Z)(oe(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n))),{type:"path",ops:o}}return 2===r?K(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function Y(e,t,n,r,o){return function(e,t){return V(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],o)}function G(e,t){var n=ae(e,1*(1+.2*t.roughness),t);if(!t.disableMultiStroke){var r=ae(e,1.5*(1+.22*t.roughness),function(e){var t=Object.assign({},e);t.randomizer=void 0,e.seed&&(t.seed=e.seed+1);return t}(t));n=n.concat(r)}return{type:"path",ops:n}}function X(e,t,n){var r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=2*Math.PI/o,a=Math.abs(e/2),l=Math.abs(t/2),c=1-n.curveFitting;return{increment:i,rx:a+=re(a*c,n),ry:l+=re(l*c,n)}}function q(e,t,n,r){var o=ce(r.increment,e,t,r.rx,r.ry,1,r.increment*ne(.1,ne(.4,1,n),n),n),a=(0,i.Z)(o,2),l=a[0],c=a[1],s=le(l,null,n);if(!n.disableMultiStroke&&0!==n.roughness){var u=ce(r.increment,e,t,r.rx,r.ry,1.5,0,n),d=le((0,i.Z)(u,1)[0],null,n);s=s.concat(d)}return{estimatedPoints:c,opset:{type:"path",ops:s}}}function $(e,t,n,r,o,i,l,c,s){var u=e,d=t,f=Math.abs(n/2),p=Math.abs(r/2);f+=re(.01*f,s),p+=re(.01*p,s);for(var h=o,v=i;h<0;)h+=2*Math.PI,v+=2*Math.PI;v-h>2*Math.PI&&(h=0,v=2*Math.PI);var m=2*Math.PI/s.curveStepCount,g=Math.min(m/2,(v-h)/2),b=se(g,u,d,f,p,h,v,1,s);if(!s.disableMultiStroke){var y=se(g,u,d,f,p,h,v,1.5,s);b.push.apply(b,(0,a.Z)(y))}return l&&(c?b.push.apply(b,(0,a.Z)(oe(u,d,u+f*Math.cos(h),d+p*Math.sin(h),s)).concat((0,a.Z)(oe(u,d,u+f*Math.cos(v),d+p*Math.sin(v),s)))):b.push({op:"lineTo",data:[u,d]},{op:"lineTo",data:[u+f*Math.cos(h),d+p*Math.sin(h)]})),{type:"path",ops:b}}function J(e,t){var n,r=[],o=W(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.length){var a=t.maxRandomnessOffset||0,l=i.length;if(l>2){r.push({op:"move",data:[i[0][0]+re(a,t),i[0][1]+re(a,t)]});for(var c=1;c<l;c++)r.push({op:"lineTo",data:[i[c][0]+re(a,t),i[c][1]+re(a,t)]})}}}}catch(e){o.e(e)}finally{o.f()}return{type:"fillPath",ops:r}}function Q(e,t){return function(e,t){var n=e.fillStyle||"hachure";if(!I[n])switch(n){case"zigzag":I[n]||(I[n]=new w(t));break;case"cross-hatch":I[n]||(I[n]=new _(t));break;case"dots":I[n]||(I[n]=new C(t));break;case"dashed":I[n]||(I[n]=new O(t));break;case"zigzag-line":I[n]||(I[n]=new j(t));break;default:I[n="hachure"]||(I[n]=new h(t))}return I[n]}(t,F).fillPolygons(e,t)}function ee(e,t,n,r,o,i,a){var l=e,c=t,s=Math.abs(n/2),u=Math.abs(r/2);s+=re(.01*s,a),u+=re(.01*u,a);for(var d=o,f=i;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);for(var p=(f-d)/a.curveStepCount,h=[],v=d;v<=f;v+=p)h.push([l+s*Math.cos(v),c+u*Math.sin(v)]);return h.push([l+s*Math.cos(f),c+u*Math.sin(f)]),h.push([l,c]),Q([h],a)}function te(e){return e.randomizer||(e.randomizer=new T.k(e.seed||0)),e.randomizer.next()}function ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return n.roughness*r*(te(n)*(t-e)+e)}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return ne(-e,e,t,n)}function oe(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=i?o.disableMultiStrokeFill:o.disableMultiStroke,l=ie(e,t,n,r,o,!0,!1);if(a)return l;var c=ie(e,t,n,r,o,!0,!0);return l.concat(c)}function ie(e,t,n,r,o,i,a){var l=Math.pow(e-n,2)+Math.pow(t-r,2),c=Math.sqrt(l),s=1;s=c<200?1:c>500?.4:-.0016668*c+1.233334;var u=o.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);var d=u/2,f=.2+.2*te(o),p=o.bowing*o.maxRandomnessOffset*(r-t)/200,h=o.bowing*o.maxRandomnessOffset*(e-n)/200;p=re(p,o,s),h=re(h,o,s);var v=[],m=function(){return re(d,o,s)},g=function(){return re(u,o,s)},b=o.preserveVertices;return i&&(a?v.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):v.push({op:"move",data:[e+(b?0:re(u,o,s)),t+(b?0:re(u,o,s))]})),a?v.push({op:"bcurveTo",data:[p+e+(n-e)*f+m(),h+t+(r-t)*f+m(),p+e+2*(n-e)*f+m(),h+t+2*(r-t)*f+m(),n+(b?0:m()),r+(b?0:m())]}):v.push({op:"bcurveTo",data:[p+e+(n-e)*f+g(),h+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),h+t+2*(r-t)*f+g(),n+(b?0:g()),r+(b?0:g())]}),v}function ae(e,t,n){var r=[];r.push([e[0][0]+re(t,n),e[0][1]+re(t,n)]),r.push([e[0][0]+re(t,n),e[0][1]+re(t,n)]);for(var o=1;o<e.length;o++)r.push([e[o][0]+re(t,n),e[o][1]+re(t,n)]),o===e.length-1&&r.push([e[o][0]+re(t,n),e[o][1]+re(t,n)]);return le(r,null,n)}function le(e,t,n){var r=e.length,o=[];if(r>3){var i=[],l=1-n.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(var c=1;c+2<r;c++){var s=e[c];i[0]=[s[0],s[1]],i[1]=[s[0]+(l*e[c+1][0]-l*e[c-1][0])/6,s[1]+(l*e[c+1][1]-l*e[c-1][1])/6],i[2]=[e[c+1][0]+(l*e[c][0]-l*e[c+2][0])/6,e[c+1][1]+(l*e[c][1]-l*e[c+2][1])/6],i[3]=[e[c+1][0],e[c+1][1]],o.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&2===t.length){var u=n.maxRandomnessOffset;o.push({op:"lineTo",data:[t[0]+re(u,n),t[1]+re(u,n)]})}}else 3===r?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&o.push.apply(o,(0,a.Z)(oe(e[0][0],e[0][1],e[1][0],e[1][1],n)));return o}function ce(e,t,n,r,o,i,a,l){var c=[],s=[];if(0===l.roughness){e/=4,s.push([t+r*Math.cos(-e),n+o*Math.sin(-e)]);for(var u=0;u<=2*Math.PI;u+=e){var d=[t+r*Math.cos(u),n+o*Math.sin(u)];c.push(d),s.push(d)}s.push([t+r*Math.cos(0),n+o*Math.sin(0)]),s.push([t+r*Math.cos(e),n+o*Math.sin(e)])}else{var f=re(.5,l)-Math.PI/2;s.push([re(i,l)+t+.9*r*Math.cos(f-e),re(i,l)+n+.9*o*Math.sin(f-e)]);for(var p=2*Math.PI+f-.01,h=f;h<p;h+=e){var v=[re(i,l)+t+r*Math.cos(h),re(i,l)+n+o*Math.sin(h)];c.push(v),s.push(v)}s.push([re(i,l)+t+r*Math.cos(f+2*Math.PI+.5*a),re(i,l)+n+o*Math.sin(f+2*Math.PI+.5*a)]),s.push([re(i,l)+t+.98*r*Math.cos(f+a),re(i,l)+n+.98*o*Math.sin(f+a)]),s.push([re(i,l)+t+.9*r*Math.cos(f+.5*a),re(i,l)+n+.9*o*Math.sin(f+.5*a)])}return[s,c]}function se(e,t,n,r,o,i,a,l,c){var s=i+re(.1,c),u=[];u.push([re(l,c)+t+.9*r*Math.cos(s-e),re(l,c)+n+.9*o*Math.sin(s-e)]);for(var d=s;d<=a;d+=e)u.push([re(l,c)+t+r*Math.cos(d),re(l,c)+n+o*Math.sin(d)]);return u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),le(u,null,c)}function ue(e,t,n,r,o,i,a,l){for(var c=[],s=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],u=[0,0],d=l.disableMultiStroke?1:2,f=l.preserveVertices,p=0;p<d;p++)0===p?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:re(s[0],l)),a[1]+(f?0:re(s[0],l))]}),u=f?[o,i]:[o+re(s[p],l),i+re(s[p],l)],c.push({op:"bcurveTo",data:[e+re(s[p],l),t+re(s[p],l),n+re(s[p],l),r+re(s[p],l),u[0],u[1]]});return c}function de(e){return(0,a.Z)(e)}var fe=n(6575);function pe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return he(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ve(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge="none",be=function(){function e(t){(0,r.Z)(this,e),this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}return(0,o.Z)(e,[{key:"_o",value:function(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}},{key:"_d",value:function(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}},{key:"line",value:function(e,t,n,r,o){var i=this._o(o);return this._d("line",[K(e,t,n,r,i)],i)}},{key:"rectangle",value:function(e,t,n,r,o){var i=this._o(o),a=[],l=Y(e,t,n,r,i);if(i.fill){var c=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===i.fillStyle?a.push(J([c],i)):a.push(Q([c],i))}return i.stroke!==ge&&a.push(l),this._d("rectangle",a,i)}},{key:"ellipse",value:function(e,t,n,r,o){var i=this._o(o),a=[],l=X(n,r,i),c=q(e,t,i,l);if(i.fill)if("solid"===i.fillStyle){var s=q(e,t,i,l).opset;s.type="fillPath",a.push(s)}else a.push(Q([c.estimatedPoints],i));return i.stroke!==ge&&a.push(c.opset),this._d("ellipse",a,i)}},{key:"circle",value:function(e,t,n,r){var o=this.ellipse(e,t,n,n,r);return o.shape="circle",o}},{key:"linearPath",value:function(e,t){var n=this._o(t);return this._d("linearPath",[V(e,!1,n)],n)}},{key:"arc",value:function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7?arguments[7]:void 0,c=this._o(l),s=[],u=$(e,t,n,r,o,i,a,!0,c);if(a&&c.fill)if("solid"===c.fillStyle){var d=Object.assign({},c);d.disableMultiStroke=!0;var f=$(e,t,n,r,o,i,!0,!1,d);f.type="fillPath",s.push(f)}else s.push(ee(e,t,n,r,o,i,c));return c.stroke!==ge&&s.push(u),this._d("arc",s,c)}},{key:"curve",value:function(e,t){var n=this._o(t),r=[],o=G(e,n);if(n.fill&&n.fill!==ge&&e.length>=3){var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length;if(n<3)throw new Error("A curve must have at least three points.");var r=[];if(3===n)r.push(de(e[0]),de(e[1]),de(e[2]),de(e[2]));else{var o=[];o.push(e[0],e[0]);for(var i=1;i<e.length;i++)o.push(e[i]),i===e.length-1&&o.push(e[i]);var a=[],l=1-t;r.push(de(o[0]));for(var c=1;c+2<o.length;c++){var s=o[c];a[0]=[s[0],s[1]],a[1]=[s[0]+(l*o[c+1][0]-l*o[c-1][0])/6,s[1]+(l*o[c+1][1]-l*o[c-1][1])/6],a[2]=[o[c+1][0]+(l*o[c][0]-l*o[c+2][0])/6,o[c+1][1]+(l*o[c][1]-l*o[c+2][1])/6],a[3]=[o[c+1][0],o[c+1][1]],r.push(a[1],a[2],a[3])}}return r}(e),a=(0,fe.s)(i,10,(1+n.roughness)/2);"solid"===n.fillStyle?r.push(J([a],n)):r.push(Q([a],n))}return n.stroke!==ge&&r.push(o),this._d("curve",r,n)}},{key:"polygon",value:function(e,t){var n=this._o(t),r=[],o=V(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(J([e],n)):r.push(Q([e],n))),n.stroke!==ge&&r.push(o),this._d("polygon",r,n)}},{key:"path",value:function(e,t){var n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");var o=n.fill&&"transparent"!==n.fill&&n.fill!==ge,l=n.stroke!==ge,c=!!(n.simplification&&n.simplification<1),s=function(e,t,n){var r,o=N(z(A(e))),i=[],l=[],c=[0,0],s=[],u=function(){var e;s.length>=4&&(e=l).push.apply(e,(0,a.Z)((0,fe.s)(s,t))),s=[]},d=function(){u(),l.length&&(i.push(l),l=[])},f=pe(o);try{for(f.s();!(r=f.n()).done;){var p=r.value,h=p.key,v=p.data;switch(h){case"M":d(),c=[v[0],v[1]],l.push(c);break;case"L":u(),l.push([v[0],v[1]]);break;case"C":if(!s.length){var m=l.length?l[l.length-1]:c;s.push([m[0],m[1]])}s.push([v[0],v[1]]),s.push([v[2],v[3]]),s.push([v[4],v[5]]);break;case"Z":u(),l.push([c[0],c[1]])}}}catch(e){f.e(e)}finally{f.f()}if(d(),!n)return i;for(var g=[],b=0,y=i;b<y.length;b++){var x=y[b],w=(0,fe.o)(x,n);w.length&&g.push(w)}return g}(e,1,c?4-4*n.simplification:(1+n.roughness)/2);return o&&("solid"===n.fillStyle?r.push(J(s,n)):r.push(Q(s,n))),l&&(c?s.forEach((function(e){r.push(V(e,!1,n))})):r.push(function(e,t){var n,r=N(z(A(e))),o=[],l=[0,0],c=[0,0],s=W(r);try{for(s.s();!(n=s.n()).done;){var u=n.value,d=u.key,f=u.data;switch(d){case"M":if("break"===function(){var e=1*(t.maxRandomnessOffset||0),n=t.preserveVertices;return o.push({op:"move",data:f.map((function(r){return r+(n?0:re(e,t))}))}),c=[f[0],f[1]],l=[f[0],f[1]],"break"}())break;case"L":o.push.apply(o,(0,a.Z)(oe(c[0],c[1],f[0],f[1],t))),c=[f[0],f[1]];break;case"C":var p=(0,i.Z)(f,6),h=p[0],v=p[1],m=p[2],g=p[3],b=p[4],y=p[5];o.push.apply(o,(0,a.Z)(ue(h,v,m,g,b,y,c,t))),c=[b,y];break;case"Z":o.push.apply(o,(0,a.Z)(oe(c[0],c[1],l[0],l[1],t))),c=[l[0],l[1]]}}}catch(e){s.e(e)}finally{s.f()}return{type:"path",ops:o}}(e,n))),this._d("path",r,n)}},{key:"opsToPath",value:function(e,t){var n,r="",o=ve(e.ops);try{for(o.s();!(n=o.n()).done;){var i=n.value,a="number"==typeof t&&t>=0?i.data.map((function(e){return+e.toFixed(t)})):i.data;switch(i.op){case"move":r+="M".concat(a[0]," ").concat(a[1]," ");break;case"bcurveTo":r+="C".concat(a[0]," ").concat(a[1],", ").concat(a[2]," ").concat(a[3],", ").concat(a[4]," ").concat(a[5]," ");break;case"lineTo":r+="L".concat(a[0]," ").concat(a[1]," ")}}}catch(e){o.e(e)}finally{o.f()}return r.trim()}},{key:"toPaths",value:function(e){var t,n=e.sets||[],r=e.options||this.defaultOptions,o=[],i=ve(n);try{for(i.s();!(t=i.n()).done;){var a=t.value,l=null;switch(a.type){case"path":l={d:this.opsToPath(a),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:ge};break;case"fillPath":l={d:this.opsToPath(a),stroke:ge,strokeWidth:0,fill:r.fill||ge};break;case"fillSketch":l=this.fillSketch(a,r)}l&&o.push(l)}}catch(e){i.e(e)}finally{i.f()}return o}},{key:"fillSketch",value:function(e,t){var n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||ge,strokeWidth:n,fill:ge}}}],[{key:"newSeed",value:function(){return(0,T.W)()}}]),e}();function ye(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var we=function(){function e(t,n){(0,r.Z)(this,e),this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new be(n)}return(0,o.Z)(e,[{key:"draw",value:function(e){var t,n=e.sets||[],r=e.options||this.getDefaultOptions(),o=this.ctx,i=e.options.fixedDecimalPlaceDigits,a=ye(n);try{for(a.s();!(t=a.n()).done;){var l=t.value;switch(l.type){case"path":o.save(),o.strokeStyle="none"===r.stroke?"transparent":r.stroke,o.lineWidth=r.strokeWidth,r.strokeLineDash&&o.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(o.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(o,l,i),o.restore();break;case"fillPath":o.save(),o.fillStyle=r.fill||"";var c="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(o,l,i,c),o.restore();break;case"fillSketch":this.fillSketch(o,l,r)}}}catch(e){a.e(e)}finally{a.f()}}},{key:"fillSketch",value:function(e,t,n){var r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}},{key:"_drawToContext",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"nonzero";e.beginPath();var o,i=ye(t.ops);try{for(i.s();!(o=i.n()).done;){var a=o.value,l="number"==typeof n&&n>=0?a.data.map((function(e){return+e.toFixed(n)})):a.data;switch(a.op){case"move":e.moveTo(l[0],l[1]);break;case"bcurveTo":e.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case"lineTo":e.lineTo(l[0],l[1])}}}catch(e){i.e(e)}finally{i.f()}"fillPath"===t.type?e.fill(r):e.stroke()}},{key:"generator",get:function(){return this.gen}},{key:"getDefaultOptions",value:function(){return this.gen.defaultOptions}},{key:"line",value:function(e,t,n,r,o){var i=this.gen.line(e,t,n,r,o);return this.draw(i),i}},{key:"rectangle",value:function(e,t,n,r,o){var i=this.gen.rectangle(e,t,n,r,o);return this.draw(i),i}},{key:"ellipse",value:function(e,t,n,r,o){var i=this.gen.ellipse(e,t,n,r,o);return this.draw(i),i}},{key:"circle",value:function(e,t,n,r){var o=this.gen.circle(e,t,n,r);return this.draw(o),o}},{key:"linearPath",value:function(e,t){var n=this.gen.linearPath(e,t);return this.draw(n),n}},{key:"polygon",value:function(e,t){var n=this.gen.polygon(e,t);return this.draw(n),n}},{key:"arc",value:function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7?arguments[7]:void 0,c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c),c}},{key:"curve",value:function(e,t){var n=this.gen.curve(e,t);return this.draw(n),n}},{key:"path",value:function(e,t){var n=this.gen.path(e,t);return this.draw(n),n}}]),e}(),ke="http://www.w3.org/2000/svg";function _e(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Se=function(){function e(t,n){(0,r.Z)(this,e),this.svg=t,this.gen=new be(n)}return(0,o.Z)(e,[{key:"draw",value:function(e){var t,n=e.sets||[],r=e.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,i=o.createElementNS(ke,"g"),a=e.options.fixedDecimalPlaceDigits,l=_e(n);try{for(l.s();!(t=l.n()).done;){var c=t.value,s=null;switch(c.type){case"path":(s=o.createElementNS(ke,"path")).setAttribute("d",this.opsToPath(c,a)),s.setAttribute("stroke",r.stroke),s.setAttribute("stroke-width",r.strokeWidth+""),s.setAttribute("fill","none"),r.strokeLineDash&&s.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&s.setAttribute("stroke-dashoffset","".concat(r.strokeLineDashOffset));break;case"fillPath":(s=o.createElementNS(ke,"path")).setAttribute("d",this.opsToPath(c,a)),s.setAttribute("stroke","none"),s.setAttribute("stroke-width","0"),s.setAttribute("fill",r.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||s.setAttribute("fill-rule","evenodd");break;case"fillSketch":s=this.fillSketch(o,c,r)}s&&i.appendChild(s)}}catch(e){l.e(e)}finally{l.f()}return i}},{key:"fillSketch",value:function(e,t,n){var r=n.fillWeight;r<0&&(r=n.strokeWidth/2);var o=e.createElementNS(ke,"path");return o.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",r+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset","".concat(n.fillLineDashOffset)),o}},{key:"generator",get:function(){return this.gen}},{key:"getDefaultOptions",value:function(){return this.gen.defaultOptions}},{key:"opsToPath",value:function(e,t){return this.gen.opsToPath(e,t)}},{key:"line",value:function(e,t,n,r,o){var i=this.gen.line(e,t,n,r,o);return this.draw(i)}},{key:"rectangle",value:function(e,t,n,r,o){var i=this.gen.rectangle(e,t,n,r,o);return this.draw(i)}},{key:"ellipse",value:function(e,t,n,r,o){var i=this.gen.ellipse(e,t,n,r,o);return this.draw(i)}},{key:"circle",value:function(e,t,n,r){var o=this.gen.circle(e,t,n,r);return this.draw(o)}},{key:"linearPath",value:function(e,t){var n=this.gen.linearPath(e,t);return this.draw(n)}},{key:"polygon",value:function(e,t){var n=this.gen.polygon(e,t);return this.draw(n)}},{key:"arc",value:function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7?arguments[7]:void 0,c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c)}},{key:"curve",value:function(e,t){var n=this.gen.curve(e,t);return this.draw(n)}},{key:"path",value:function(e,t){var n=this.gen.path(e,t);return this.draw(n)}}]),e}(),Ce={canvas:function(e,t){return new we(e,t)},svg:function(e,t){return new Se(e,t)},generator:function(e){return new be(e)},newSeed:function(){return be.newSeed()}}},885:function(e){e.exports=function(e,t,n){var r=[],o=e.length;if(0===o)return r;var i=t<0?Math.max(0,t+o):t||0;for(void 0!==n&&(o=n<0?n+o:n);o-- >i;)r[o-i]=e[o];return r}},828:function(e,t,n){"use strict";n.d(t,{Lo:function(){return I},CZ:function(){return T}});var r=n(668),o=n(489),i=n(5564),a=n(3646),l=n(1319),c=n(4041),s=n(8288),u=n(5118),d=n(8211),f=n(6066),p=n(75),h=n(2264),v=n(746),m=n(6340),g=n(7901),b=n(9910),y=n(1935),x=n(8897),w=n(9787),k=n(9660),_=n(4981),E=n(1337),S=function(e){var t=e.onConfirm,n=(0,w.useState)(!1),o=(0,r.Z)(n,2),i=o[0],c=o[1],s=function(){c(!i)};return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(l.V,{type:"button",icon:a._I,title:(0,d.t)("buttons.clearReset"),"aria-label":(0,d.t)("buttons.clearReset"),showAriaLabel:(0,k.Fy)().isMobile,onClick:s,"data-testid":"clear-canvas-button"}),i&&(0,E.jsx)(_.Z,{onConfirm:function(){t(),s()},onCancel:s,title:(0,d.t)("clearCanvasDialog.title"),children:(0,E.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,d.t)("alerts.clearReset")]})})]})},C=n(741);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,g.z)({name:"changeViewBackgroundColor",trackEvent:!1,perform:function(e,t,n){return{appState:j(j({},t),n),commitToHistory:!!n.viewBackgroundColor}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,E.jsx)("div",{style:{position:"relative"},children:(0,E.jsx)(i.z,{label:(0,d.t)("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:function(e){return r({viewBackgroundColor:e})},isActive:"canvasColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"canvasColorPicker":null})},"data-testid":"canvas-background-picker",elements:t,appState:n})})}}),(0,g.z)({name:"clearCanvas",trackEvent:{category:"canvas"},perform:function(e,t,n,r){return r.imageCache.clear(),{elements:e.map((function(e){return(0,y.BE)(e,{isDeleted:!0})})),appState:j(j({},(0,x.im)()),{},{files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,showStats:t.showStats,pasteDialog:t.pasteDialog,activeTool:"image"===t.activeTool.type?j(j({},t.activeTool),{},{type:"selection"}):t.activeTool}),commitToHistory:!0}},PanelComponent:function(e){var t=e.updateData;return(0,E.jsx)(S,{onConfirm:t})}});var I=(0,g.z)({name:"zoomIn",trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:j(j({},t),(0,v.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,p.j)(t.zoom.value+s.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,E.jsx)(l.V,{type:"button",icon:a.kr,title:"".concat((0,d.t)("buttons.zoomIn")," — ").concat((0,m.uY)("CtrlOrCmd++")),"aria-label":(0,d.t)("buttons.zoomIn"),onClick:function(){t(null)},size:"small"})},keyTest:function(e){return(e.code===f.aU.EQUAL||e.code===f.aU.NUM_ADD)&&(e[f.tW.CTRL_OR_CMD]||e.shiftKey)}}),T=(0,g.z)({name:"zoomOut",trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:j(j({},t),(0,v.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,p.j)(t.zoom.value-s.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,E.jsx)(l.V,{type:"button",icon:a.vG,title:"".concat((0,d.t)("buttons.zoomOut")," — ").concat((0,m.uY)("CtrlOrCmd+-")),"aria-label":(0,d.t)("buttons.zoomOut"),onClick:function(){t(null)},size:"small"})},keyTest:function(e){return(e.code===f.aU.MINUS||e.code===f.aU.NUM_SUBTRACT)&&(e[f.tW.CTRL_OR_CMD]||e.shiftKey)}}),M=((0,g.z)({name:"resetZoom",trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:j(j({},t),(0,v.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,p.j)(1)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,E.jsx)(b.u,{label:(0,d.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,E.jsxs)(l.V,{type:"button",className:"reset-zoom-button",title:(0,d.t)("buttons.resetZoom"),"aria-label":(0,d.t)("buttons.resetZoom"),onClick:function(){t(null)},size:"small",children:[(100*n.zoom.value).toFixed(0),"%"]})})},keyTest:function(e){return(e.code===f.aU.ZERO||e.code===f.aU.NUM_ZERO)&&(e[f.tW.CTRL_OR_CMD]||e.shiftKey)}}),function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],l=n[3],c=a-o,u=t.width/c,d=l-i,f=t.height/d,p=Math.min(u,f),h=Math.floor(p/s.V4)*s.V4;return Math.min(Math.max(h,s.V4),1)}),L=function(e,t,n){var o=(0,u.Lm)(e),i=(0,p.eD)(o,t),a=n&&i.length>0?(0,u.KP)(i):(0,u.KP)(o),l={value:M(a,{width:t.width,height:t.height})},c=(0,r.Z)(a,4),s=c[0],d=c[1],f=(s+c[2])/2,v=(d+c[3])/2;return{appState:j(j(j({},t),(0,h.s)({scenePoint:{x:f,y:v},viewportDimensions:{width:t.width,height:t.height},zoom:l})),{},{zoom:l}),commitToHistory:!1}};(0,g.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(e,t){return L(e,t,!0)},keyTest:function(e){return e.code===f.aU.TWO&&e.shiftKey&&!e.altKey&&!e[f.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFit",trackEvent:{category:"canvas"},perform:function(e,t){return L(e,t,!1)},keyTest:function(e){return e.code===f.aU.ONE&&e.shiftKey&&!e.altKey&&!e[f.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"toggleTheme",trackEvent:{category:"canvas"},perform:function(e,t,n){return{appState:j(j({},t),{},{theme:n||(t.theme===s.C6.LIGHT?s.C6.DARK:s.C6.LIGHT)}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,E.jsx)("div",{style:{marginInlineStart:"0.25rem"},children:(0,E.jsx)(c.J,{value:t.theme,onChange:function(e){n(e)}})})},keyTest:function(e){return e.altKey&&e.shiftKey&&e.code===f.aU.D}}),(0,g.z)({name:"eraser",trackEvent:{category:"toolbar"},perform:function(e,t){var n;return n=(0,x.EN)(t)?(0,m.Om)(t,j(j({},t.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,m.Om)(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:j(j({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:n}),commitToHistory:!0}},keyTest:function(e){return e.key===f.tW.E},PanelComponent:function(e){e.elements;var t=e.appState,n=e.updateData,r=e.data;return(0,E.jsx)(l.V,{type:"button",icon:a.rn,className:(0,C.Z)("eraser",{active:(0,x.EN)(t)}),title:"".concat((0,d.t)("toolBar.eraser"),"-").concat((0,m.uY)("E")),"aria-label":(0,d.t)("toolBar.eraser"),onClick:function(){n(null)},size:(null==r?void 0:r.size)||"medium"})}})},3917:function(e,t,n){"use strict";n.d(t,{Tu:function(){return D},Zq:function(){return z}});var r=n(5858),o=n(489),i=n(741),a=n(1337),l=function(e){var t=e.options,n=e.value,r=e.onChange,o=e.group;return(0,a.jsx)("div",{className:"buttonList buttonListIcon",children:t.map((function(e){return(0,a.jsxs)("label",{className:(0,i.Z)({active:n===e.value}),title:e.text,children:[(0,a.jsx)("input",{type:"radio",name:o,onChange:function(){return r(e.value)},checked:n===e.value,"data-testid":e.testId}),e.icon]},e.text)}))})},c=n(5564),s=n(668),u=n(9787),d=n.n(u),f=n(7288),p=(n(7117),n(6066)),h=n(8211);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=e.options,n=e.value,r=e.label,o=e.onChange,i=e.onClose,l=d().useRef(),c=d().useRef(),s=d().useRef(null);d().useEffect((function(){c.current?c.current.focus():s.current&&s.current.focus()}),[]);return(0,a.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":r,onKeyDown:function(e){var n=t.find((function(t){return t.keyBinding===e.key.toLowerCase()}));if(e.metaKey||e.altKey||e.ctrlKey||!n)if(e.key===p.tW.TAB)setTimeout((function(){c.current!==document.activeElement&&i()}),0);else if((0,p.Wl)(e.key)){var r=document.activeElement,o=(0,h.G3)().rtl,a=Array.prototype.indexOf.call(s.current.children,r);if(-1!==a){var l=t.length,u=a;switch(e.key){case o?p.tW.ARROW_LEFT:p.tW.ARROW_RIGHT:case p.tW.ARROW_DOWN:u=(a+1)%l;break;case o?p.tW.ARROW_RIGHT:p.tW.ARROW_LEFT:case p.tW.ARROW_UP:u=(l+a-1)%l}s.current.children[u].focus()}e.preventDefault()}else e.key!==p.tW.ESCAPE&&e.key!==p.tW.ENTER||(e.preventDefault(),i());else{var d=t.indexOf(n);s.current.children[d].focus(),e.preventDefault()}e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},children:(0,a.jsx)("div",{className:"picker-content",ref:s,children:t.map((function(e,t){return(0,a.jsxs)("button",{className:"picker-option",onClick:function(t){t.currentTarget.focus(),o(e.value)},title:"".concat(e.text," — ").concat(e.keyBinding.toUpperCase()),"aria-label":e.text||"none","aria-keyshortcuts":e.keyBinding,ref:function(r){r&&0===t&&(l.current=r),r&&e.value===n&&(c.current=r)},onFocus:function(){o(e.value)},children:[e.icon,(0,a.jsx)("span",{className:"picker-keybinding",children:e.keyBinding})]},e.text)}))})})}function b(e){var t,n=e.value,r=e.label,o=e.options,i=e.onChange,l=e.group,c=void 0===l?"":l,u=d().useState(!1),p=(0,s.Z)(u,2),v=p[0],b=p[1],y=d().useRef(null),x=(0,h.G3)().rtl;return(0,a.jsxs)("label",{className:"picker-container",children:[(0,a.jsx)("button",{name:c,className:v?"active":"","aria-label":r,onClick:function(){return b(!v)},ref:y,children:null===(t=o.find((function(e){return e.value===n})))||void 0===t?void 0:t.icon}),(0,a.jsx)(d().Suspense,{fallback:"",children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.J,m(m({onCloseRequest:function(e){return e.target!==y.current&&b(!1)}},x?{right:5.5}:{left:-5.5}),{},{children:(0,a.jsx)(g,{options:o,value:n,label:r,onChange:i,onClose:function(){var e;b(!1),null===(e=y.current)||void 0===e||e.focus()}})})),(0,a.jsx)("div",{className:"picker-triangle"})]}):null})]})}var y=n(3646),x=n(8288),w=n(5118),k=n(1935),_=n(5710),E=n(1974),S=n(6954),C=n(75),O=n(8120),j=n(6340),I=n(7901);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(0,j.xn)((0,C.eD)(e,t,r));return e.map((function(e){var r;return o.get(e.id)||e.id===(null===(r=t.editingElement)||void 0===r?void 0:r.id)?n(e):e}))},A=function(e,t,n,r){var o,i,a=t.editingElement,l=(0,w.Lm)(e);return null!==(o=null!==(i=a&&n(a))&&void 0!==i?i:(0,C.N)(l,t)?(0,C.PR)(l,t,n):r)&&void 0!==o?o:null},P=function(e,t,n,o){var i=new Set;return{elements:L(e,t,(function(e){if((0,w.iB)(e)){var t=n(e);i.add(t);var r=(0,k.BE)(e,{fontSize:t});return(0,w.oN)(r,(0,_.tl)(e)),o=e,a=r,r=(0,E.Xh)(a)?a:(0,k.DR)(a,{x:"left"===o.textAlign?o.x:o.x+(o.width-a.width)/("center"===o.textAlign?2:1),y:o.y+(o.height-a.height)/2},!1)}var o,a;return e}),!0),appState:M(M({},t),{},{currentItemFontSize:1===i.size?(0,r.Z)(i)[0]:null!=o?o:t.currentItemFontSize}),commitToHistory:!0}},D=((0,I.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(e,t,n){return M(M({},n.currentItemStrokeColor&&{elements:L(e,t,(function(e){return(0,O.PD)(e.type)?(0,k.BE)(e,{strokeColor:n.currentItemStrokeColor}):e}),!0)}),{},{appState:M(M({},t),n),commitToHistory:!!n.currentItemStrokeColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{"aria-hidden":"true",children:(0,h.t)("labels.stroke")}),(0,a.jsx)(c.z,{type:"elementStroke",label:(0,h.t)("labels.stroke"),color:A(t,n,(function(e){return e.strokeColor}),n.currentItemStrokeColor),onChange:function(e){return r({currentItemStrokeColor:e})},isActive:"strokeColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"strokeColorPicker":null})},elements:t,appState:n})]})}}),(0,I.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(e,t,n){return M(M({},n.currentItemBackgroundColor&&{elements:L(e,t,(function(e){return(0,k.BE)(e,{backgroundColor:n.currentItemBackgroundColor})}))}),{},{appState:M(M({},t),n),commitToHistory:!!n.currentItemBackgroundColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{"aria-hidden":"true",children:(0,h.t)("labels.background")}),(0,a.jsx)(c.z,{type:"elementBackground",label:(0,h.t)("labels.background"),color:A(t,n,(function(e){return e.backgroundColor}),n.currentItemBackgroundColor),onChange:function(e){return r({currentItemBackgroundColor:e})},isActive:"backgroundColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"backgroundColorPicker":null})},elements:t,appState:n})]})}}),(0,I.z)({name:"changeFillStyle",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){return(0,k.BE)(e,{fillStyle:n})})),appState:M(M({},t),{},{currentItemFillStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.fill")}),(0,a.jsx)(l,{options:[{value:"hachure",text:(0,h.t)("labels.hachure"),icon:(0,a.jsx)(y.a0,{theme:n.theme})},{value:"cross-hatch",text:(0,h.t)("labels.crossHatch"),icon:(0,a.jsx)(y.np,{theme:n.theme})},{value:"solid",text:(0,h.t)("labels.solid"),icon:(0,a.jsx)(y.X7,{theme:n.theme})}],group:"fill",value:A(t,n,(function(e){return e.fillStyle}),n.currentItemFillStyle),onChange:function(e){r(e)}})]})}}),(0,I.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){return(0,k.BE)(e,{strokeWidth:n})})),appState:M(M({},t),{},{currentItemStrokeWidth:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.strokeWidth")}),(0,a.jsx)(l,{group:"stroke-width",options:[{value:1,text:(0,h.t)("labels.thin"),icon:(0,a.jsx)(y.tY,{theme:n.theme,strokeWidth:2})},{value:2,text:(0,h.t)("labels.bold"),icon:(0,a.jsx)(y.tY,{theme:n.theme,strokeWidth:6})},{value:4,text:(0,h.t)("labels.extraBold"),icon:(0,a.jsx)(y.tY,{theme:n.theme,strokeWidth:10})}],value:A(t,n,(function(e){return e.strokeWidth}),n.currentItemStrokeWidth),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeSloppiness",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){return(0,k.BE)(e,{seed:(0,S.LU)(),roughness:n})})),appState:M(M({},t),{},{currentItemRoughness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.sloppiness")}),(0,a.jsx)(l,{group:"sloppiness",options:[{value:0,text:(0,h.t)("labels.architect"),icon:(0,a.jsx)(y.bf,{theme:n.theme})},{value:1,text:(0,h.t)("labels.artist"),icon:(0,a.jsx)(y.kM,{theme:n.theme})},{value:2,text:(0,h.t)("labels.cartoonist"),icon:(0,a.jsx)(y.W2,{theme:n.theme})}],value:A(t,n,(function(e){return e.roughness}),n.currentItemRoughness),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){return(0,k.BE)(e,{strokeStyle:n})})),appState:M(M({},t),{},{currentItemStrokeStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.strokeStyle")}),(0,a.jsx)(l,{group:"strokeStyle",options:[{value:"solid",text:(0,h.t)("labels.strokeStyle_solid"),icon:(0,a.jsx)(y.nu,{theme:n.theme})},{value:"dashed",text:(0,h.t)("labels.strokeStyle_dashed"),icon:(0,a.jsx)(y.h0,{theme:n.theme})},{value:"dotted",text:(0,h.t)("labels.strokeStyle_dotted"),icon:(0,a.jsx)(y.aT,{theme:n.theme})}],value:A(t,n,(function(e){return e.strokeStyle}),n.currentItemStrokeStyle),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeOpacity",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){return(0,k.BE)(e,{opacity:n})}),!0),appState:M(M({},t),{},{currentItemOpacity:n}),commitToHistory:!0}},PanelComponent:function(e){var t,n=e.elements,r=e.appState,o=e.updateData;return(0,a.jsxs)("label",{className:"control-label",children:[(0,h.t)("labels.opacity"),(0,a.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(e){return o(+e.target.value)},value:null!==(t=A(n,r,(function(e){return e.opacity}),r.currentItemOpacity))&&void 0!==t?t:void 0})]})}}),(0,I.z)({name:"changeFontSize",trackEvent:!1,perform:function(e,t,n){return P(e,t,(function(){return n}),n)},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.fontSize")}),(0,a.jsx)(l,{group:"font-size",options:[{value:16,text:(0,h.t)("labels.small"),icon:(0,a.jsx)(y.q0,{theme:n.theme}),testId:"fontSize-small"},{value:20,text:(0,h.t)("labels.medium"),icon:(0,a.jsx)(y.nq,{theme:n.theme}),testId:"fontSize-medium"},{value:28,text:(0,h.t)("labels.large"),icon:(0,a.jsx)(y.tW,{theme:n.theme}),testId:"fontSize-large"},{value:36,text:(0,h.t)("labels.veryLarge"),icon:(0,a.jsx)(y.OA,{theme:n.theme}),testId:"fontSize-veryLarge"}],value:A(t,n,(function(e){if((0,w.iB)(e))return e.fontSize;var t=(0,_.WJ)(e);return t?t.fontSize:null}),n.currentItemFontSize||x.n5),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(e,t,n){return P(e,t,(function(e){return Math.round(1/1.1*e.fontSize)}))},keyTest:function(e){return e[p.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===p.tW.CHEVRON_LEFT||e.key===p.tW.COMMA)}})),z=(0,I.z)({name:"increaseFontSize",trackEvent:!1,perform:function(e,t,n){return P(e,t,(function(e){return Math.round(1.1*e.fontSize)}))},keyTest:function(e){return e[p.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===p.tW.CHEVRON_RIGHT||e.key===p.tW.PERIOD)}});(0,I.z)({name:"changeFontFamily",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){if((0,w.iB)(e)){var t=(0,k.BE)(e,{fontFamily:n});return(0,w.oN)(t,(0,_.tl)(e)),t}return e}),!0),appState:M(M({},t),{},{currentItemFontFamily:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=[{value:x.ut.Virgil,text:(0,h.t)("labels.handDrawn"),icon:(0,a.jsx)(y.kK,{theme:n.theme})},{value:x.ut.Helvetica,text:(0,h.t)("labels.normal"),icon:(0,a.jsx)(y.vo,{theme:n.theme})},{value:x.ut.Cascadia,text:(0,h.t)("labels.code"),icon:(0,a.jsx)(y.z6,{theme:n.theme})}];return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.fontFamily")}),(0,a.jsx)(l,{group:"font-family",options:o,value:A(t,n,(function(e){if((0,w.iB)(e))return e.fontFamily;var t=(0,_.WJ)(e);return t?t.fontFamily:null}),n.currentItemFontFamily||x.rk),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeTextAlign",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){if((0,w.iB)(e)){var t=(0,k.BE)(e,{textAlign:n});return(0,w.oN)(t,(0,_.tl)(e)),t}return e}),!0),appState:M(M({},t),{},{currentItemTextAlign:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.textAlign")}),(0,a.jsx)(l,{group:"text-align",options:[{value:"left",text:(0,h.t)("labels.left"),icon:(0,a.jsx)(y.rr,{theme:n.theme})},{value:"center",text:(0,h.t)("labels.center"),icon:(0,a.jsx)(y.o3,{theme:n.theme})},{value:"right",text:(0,h.t)("labels.right"),icon:(0,a.jsx)(y.oT,{theme:n.theme})}],value:A(t,n,(function(e){if((0,w.iB)(e))return e.textAlign;var t=(0,_.WJ)(e);return t?t.textAlign:null}),n.currentItemTextAlign),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(e,t,n){return{elements:L(e,t,(function(e){if((0,w.iB)(e)){var t=(0,k.BE)(e,{verticalAlign:n});return(0,w.oN)(t,(0,_.tl)(e)),t}return e}),!0),appState:M({},t),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsx)("fieldset",{children:(0,a.jsx)(l,{group:"text-align",options:[{value:x.oX.TOP,text:(0,h.t)("labels.alignTop"),icon:(0,a.jsx)(y.EO,{theme:n.theme})},{value:x.oX.MIDDLE,text:(0,h.t)("labels.centerVertically"),icon:(0,a.jsx)(y.P7,{theme:n.theme})},{value:x.oX.BOTTOM,text:(0,h.t)("labels.alignBottom"),icon:(0,a.jsx)(y.aA,{theme:n.theme})}],value:A(t,n,(function(e){if((0,w.iB)(e)&&e.containerId)return e.verticalAlign;var t=(0,_.WJ)(e);return t?t.verticalAlign:null})),onChange:function(e){return r(e)}})})}}),(0,I.z)({name:"changeSharpness",trackEvent:!1,perform:function(e,t,n){var r=(0,C.Zs)((0,w.Lm)(e),t),o=r.length?r.every((function(e){return!(0,E.bt)(e)})):!(0,E.dt)(t.activeTool.type),i=r.length?r.every(E.bt):(0,E.dt)(t.activeTool.type);return{elements:L(e,t,(function(e){return(0,k.BE)(e,{strokeSharpness:n})})),appState:M(M({},t),{},{currentItemStrokeSharpness:o?n:t.currentItemStrokeSharpness,currentItemLinearStrokeSharpness:i?n:t.currentItemLinearStrokeSharpness}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.edges")}),(0,a.jsx)(l,{group:"edges",options:[{value:"sharp",text:(0,h.t)("labels.sharp"),icon:(0,a.jsx)(y.wr,{theme:n.theme})},{value:"round",text:(0,h.t)("labels.round"),icon:(0,a.jsx)(y.DS,{theme:n.theme})}],value:A(t,n,(function(e){return e.strokeSharpness}),(0,C.gP)(n.activeTool.type)&&((0,E.dt)(n.activeTool.type)?n.currentItemLinearStrokeSharpness:n.currentItemStrokeSharpness)||null),onChange:function(e){return r(e)}})]})}}),(0,I.z)({name:"changeArrowhead",trackEvent:!1,perform:function(e,t,n){return{elements:L(e,t,(function(e){if((0,E.bt)(e)){var t=n.position,r=n.type;if("start"===t)return(0,k.BE)(e,{startArrowhead:r});if("end"===t)return(0,k.BE)(e,{endArrowhead:r})}return e})),appState:M(M({},t),{},(0,o.Z)({},"start"===n.position?"currentItemStartArrowhead":"currentItemEndArrowhead",n.type)),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,h.G3)().rtl;return(0,a.jsxs)("fieldset",{children:[(0,a.jsx)("legend",{children:(0,h.t)("labels.arrowheads")}),(0,a.jsxs)("div",{className:"iconSelectList",children:[(0,a.jsx)(b,{label:"arrowhead_start",options:[{value:null,text:(0,h.t)("labels.arrowhead_none"),icon:(0,a.jsx)(y.fr,{theme:n.theme}),keyBinding:"q"},{value:"arrow",text:(0,h.t)("labels.arrowhead_arrow"),icon:(0,a.jsx)(y.il,{theme:n.theme,flip:!o}),keyBinding:"w"},{value:"bar",text:(0,h.t)("labels.arrowhead_bar"),icon:(0,a.jsx)(y.m,{theme:n.theme,flip:!o}),keyBinding:"e"},{value:"dot",text:(0,h.t)("labels.arrowhead_dot"),icon:(0,a.jsx)(y.tn,{theme:n.theme,flip:!o}),keyBinding:"r"},{value:"triangle",text:(0,h.t)("labels.arrowhead_triangle"),icon:(0,a.jsx)(y.j8,{theme:n.theme,flip:!o}),keyBinding:"t"}],value:A(t,n,(function(e){return(0,E.bt)(e)&&(0,C.Un)(e.type)?e.startArrowhead:n.currentItemStartArrowhead}),n.currentItemStartArrowhead),onChange:function(e){return r({position:"start",type:e})}}),(0,a.jsx)(b,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,h.t)("labels.arrowhead_none"),keyBinding:"q",icon:(0,a.jsx)(y.fr,{theme:n.theme})},{value:"arrow",text:(0,h.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,a.jsx)(y.il,{theme:n.theme,flip:o})},{value:"bar",text:(0,h.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,a.jsx)(y.m,{theme:n.theme,flip:o})},{value:"dot",text:(0,h.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,a.jsx)(y.tn,{theme:n.theme,flip:o})},{value:"triangle",text:(0,h.t)("labels.arrowhead_triangle"),icon:(0,a.jsx)(y.j8,{theme:n.theme,flip:o}),keyBinding:"t"}],value:A(t,n,(function(e){return(0,E.bt)(e)&&(0,C.Un)(e.type)?e.endArrowhead:n.currentItemEndArrowhead}),n.currentItemEndArrowhead),onChange:function(e){return r({position:"end",type:e})}})]})]})}})},7901:function(e,t,n){"use strict";n.d(t,{N:function(){return r},z:function(){return o}});var r=[],o=function(e){return r=r.concat(e),e}},7047:function(e,t,n){"use strict";var r,o;n.d(t,{L:function(){return i}});var i="undefined"!=typeof process&&null!==(r={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.12.0-fork",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==r&&r.REACT_APP_GOOGLE_ANALYTICS_ID&&"undefined"!=typeof window&&window.gtag?function(e,t,n,r){try{window.gtag("event",t,{event_category:e,event_label:n,value:r})}catch(e){console.error("error logging to ga",e)}}:("undefined"!=typeof process&&null!==(o={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.12.0-fork",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==o&&o.JEST_WORKER_ID,function(e,t,n,r){})},8897:function(e,t,n){"use strict";n.d(t,{EN:function(){return p},eS:function(){return f},im:function(){return c},s:function(){return d}});var r=n(5284),o=n(8288),i=n(8211),a=n(6340),l=o.ZB.includes(devicePixelRatio)?devicePixelRatio:1,c=function(){return{theme:o.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:"transparent",currentItemEndArrowhead:"arrow",currentItemFillStyle:"hachure",currentItemFontFamily:o.rk,currentItemFontSize:o.n5,currentItemLinearStrokeSharpness:"round",currentItemOpacity:100,currentItemRoughness:1,currentItemStartArrowhead:null,currentItemStrokeColor:r.black,currentItemStrokeSharpness:"sharp",currentItemStrokeStyle:"solid",currentItemStrokeWidth:1,currentItemTextAlign:o.Hg,cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:!1,lastActiveToolBeforeEraser:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:l,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,isLibraryOpen:!1,isLibraryMenuDocked:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,i.t)("labels.untitled"),"-").concat((0,a.Fc)()),openMenu:null,openPopup:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showHelpDialog:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toast:null,viewBackgroundColor:r.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null}},s={theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemLinearStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeSharpness:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},isLibraryOpen:{browser:!0,export:!1,server:!1},isLibraryMenuDocked:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showHelpDialog:{browser:!1,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1}},u=function(e,t){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r],a=s[i];if(null!=a&&a[t]){var l=e[i];n[i]=l}}return n},d=function(e){return u(e,"export")},f=function(e){return u(e,"server")},p=function(e){return"eraser"===e.activeTool.type}},5674:function(e,t,n){"use strict";n.d(t,{dz:function(){return k},i$:function(){return b},ps:function(){return O}});var r=n(5858),o=n(489),i=n(668),a=n(56),l=n(8288),c=n(5118),s=n(6954);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=32,v=12,m=256,g="NOT_SPREADSHEET",b="VALID_SPREADSHEET",y=function(e){var t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat("".concat((t[1]||t[2])+t[3]).replace(/,/g,"")):null},x=function(e,t){return e.slice(1).every((function(e){return null!==y(e[t])}))},w=function(e){var t=e[0].length;if(t>2)return{type:g,reason:"More than 2 columns"};if(1===t){if(!x(e,0))return{type:g,reason:"Value is not numeric"};var n=null===y(e[0][0]),r=(n?e.slice(1):e).map((function(e){return y(e[0])}));return r.length<2?{type:g,reason:"Less than two rows"}:{type:b,spreadsheet:{title:n?e[0][0]:null,labels:null,values:r}}}var o=x(e,0),a=x(e,1);if(!o&&!a)return{type:g,reason:"Value is not numeric"};var l=a?[0,1]:[1,0],c=(0,i.Z)(l,2),s=c[0],u=c[1],d=null===y(e[0][u]),f=d?e.slice(1):e;return f.length<2?{type:g,reason:"Less than 2 rows"}:{type:b,spreadsheet:{title:d?e[0][u]:null,labels:f.map((function(e){return e[s]})),values:f.map((function(e){return y(e[u])}))}}},k=function(e){var t=e.trim().split("\n").map((function(e){return e.trim().split("\t")}));if(t.length&&2!==t[0].length&&(t=e.trim().split("\n").map((function(e){return e.trim().split(",")}))),0===t.length)return{type:g,reason:"No values"};var n=t[0].length;if(!t.every((function(e){return e.length===n})))return{type:g,reason:"All rows don't have same number of columns"};var r=w(t);if(r.type!==b){var o=w(function(e){for(var t=[],n=0;n<e[0].length;n++){for(var r=[],o=0;o<e.length;o++)r.push(e[o][n]);t.push(r)}return t}(t));if(o.type===b)return o}return r},_=a.Z.elementBackground.slice(2,a.Z.elementBackground.length),E={fillStyle:"hachure",fontFamily:l.rk,fontSize:l.n5,opacity:100,roughness:1,strokeColor:a.Z.elementStroke[0],strokeSharpness:"sharp",strokeStyle:"solid",strokeWidth:1,verticalAlign:l.oX.MIDDLE,locked:!1},S=function(e){return{chartWidth:44*e.values.length+v,chartHeight:280}},C=function(e,t,n,o,i,s){var u=S(e),d=u.chartWidth,f=u.chartHeight,g=e.title?(0,c.VL)(p(p({backgroundColor:i,groupIds:[o]},E),{},{text:e.title,x:t+d/2,y:n-m-24-l.n5,strokeSharpness:"sharp",strokeStyle:"solid",textAlign:"center"})):null,b=s?(0,c.Up)(p(p({backgroundColor:i,groupIds:[o]},E),{},{type:"rectangle",x:t,y:n-f,width:d,height:f,strokeColor:a.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[].concat((0,r.Z)(b?[b]:[]),(0,r.Z)(g?[g]:[]),(0,r.Z)(function(e,t,n,r,o){var i;return(null===(i=e.labels)||void 0===i?void 0:i.map((function(e,i){return(0,c.VL)(p(p({groupIds:[r],backgroundColor:o},E),{},{text:e.length>8?"".concat(e.slice(0,5),"..."):e,x:t+44*i+24,y:n+6,width:h,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))})))||[]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,o,i){var a=(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},E),{},{x:t-v,y:n-v,text:"0",textAlign:"right"}));return[a,(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},E),{},{x:t-v,y:n-m-a.height/2,text:Math.max.apply(Math,(0,r.Z)(e.values)).toLocaleString(),textAlign:"right"}))]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,r,o){var i=S(e),a=i.chartWidth,l=i.chartHeight;return[(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},E),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,width:a,points:[[0,0],[a,0]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},E),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,height:l,points:[[0,0],[0,-l]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},E),{},{type:"line",x:t,y:n-m-v,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:a,opacity:50,points:[[0,0],[a,0]]}))]}(e,t,n,o,i)))},O=function(e,t,n,o){return"line"===e?function(e,t,n){var o,i=Math.max.apply(Math,(0,r.Z)(e.values)),a=(0,s.kb)(),d=_[Math.floor(Math.random()*_.length)],f=0,h=[],g=u(e.values);try{for(g.s();!(o=g.n()).done;){var b=o.value,y=44*f,x=-b/i*m;h.push([y,x]),f++}}catch(e){g.e(e)}finally{g.f()}var w=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),k=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),S=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),O=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),j=(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},E),{},{type:"line",x:t+v+16,y:n-v,startArrowhead:null,endArrowhead:null,height:k-O,width:w-S,strokeWidth:2,points:h})),I=e.values.map((function(e,r){var o=44*r+6,l=-e/i*m+6;return(0,c.Up)(p(p({backgroundColor:d,groupIds:[a]},E),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+o+16,y:n+l-24,width:v,height:v}))})),T=e.values.map((function(e,r){var o=44*r+6,l=e/i*m+6+v;return(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},E),{},{type:"line",x:t+o+16+6,y:n-l,startArrowhead:null,endArrowhead:null,height:l,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,l]]}))}));return[].concat((0,r.Z)(C(e,t,n,a,d,"production"===l.Vi.DEVELOPMENT)),[j],(0,r.Z)(T),(0,r.Z)(I))}(t,n,o):function(e,t,n){var o=Math.max.apply(Math,(0,r.Z)(e.values)),i=(0,s.kb)(),a=_[Math.floor(Math.random()*_.length)],u=e.values.map((function(e,r){var l=e/o*m;return(0,c.Up)(p(p({backgroundColor:a,groupIds:[i]},E),{},{type:"rectangle",x:t+44*r+v,y:n-l-v,width:h,height:l}))}));return[].concat((0,r.Z)(u),(0,r.Z)(C(e,t,n,i,a,"production"===l.Vi.DEVELOPMENT)))}(t,n,o)}},8982:function(e,t,n){"use strict";n.d(t,{X:function(){return o},f:function(){return i}});var r=n(56),o=function(e,t){if(null!=t&&t.collaborators){var n=t.collaborators.get(e);if(null!=n&&n.color)return n.color}var o=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),i=r.Z.elementBackground.slice(1),a=r.Z.elementStroke.slice(1);return{background:i[o%i.length],stroke:a[o%a.length]}},i=function(e){if(!e)return"?";var t=e.trim().split(" ");if(t.length<2)return t[0].substring(0,2).toUpperCase();var n=t[0],r=t[t.length-1];return(n[0]+r[0]).toUpperCase()}},6665:function(e,t,n){"use strict";n.d(t,{dd:function(){return w},mQ:function(){return y},uR:function(){return x},vQ:function(){return m},vt:function(){return v},wx:function(){return h}});var r=n(489),o=n(6759),i=n(3152),a=n(4162),l=n(5674),c=n(8288),s=n(1974),u=n(6340),d="",f=!1,p="clipboard"in navigator&&"readText"in navigator.clipboard,h="clipboard"in navigator&&"writeText"in navigator.clipboard,v="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,m=function(){var e=(0,o.Z)(i.default.mark((function e(t,n,r){var o,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={type:c.r8.excalidrawClipboard,elements:t,files:r?t.reduce((function(e,t){return(0,s.wi)(t)&&r[t.fileId]&&(e[t.fileId]=r[t.fileId]),e}),{}):void 0},a=JSON.stringify(o),d=a,e.prev=3,f=!1,e.next=7,w(a);case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),f=!0,console.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n,r){return e.apply(this,arguments)}}(),g=function(){if(!d)return{};try{return JSON.parse(d)}catch(e){return console.error(e),{}}},b=function(){var e=(0,o.Z)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=5;break}e.t0=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/plain").trim(),e.next=11;break;case 5:if(e.t1=p,!e.t1){e.next=10;break}return e.next=9,navigator.clipboard.readText();case 9:e.t1=e.sent;case 10:e.t0=e.t1;case 11:return r=e.t0,e.abrupt("return",r||"");case 15:return e.prev=15,e.t2=e.catch(0),e.abrupt("return","");case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,o.Z)(i.default.mark((function e(t){var n,r,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(t);case 2:if((n=e.sent)&&!n.includes(a.oj)){e.next=5;break}return e.abrupt("return",g());case 5:if(u=n,d=void 0,d=(0,l.dz)(u),!(r=d.type===l.i$?{spreadsheet:d.spreadsheet}:null)){e.next=8;break}return e.abrupt("return",r);case 8:if(o=g(),e.prev=9,s=JSON.parse(n),i=s,![c.r8.excalidraw,c.r8.excalidrawClipboard].includes(null==i?void 0:i.type)||!Array.isArray(i.elements)){e.next=13;break}return e.abrupt("return",{elements:s.elements,files:s.files});case 13:return e.abrupt("return",o);case 16:return e.prev=16,e.t0=e.catch(9),e.abrupt("return",f&&o.elements?o:{text:n});case 19:case"end":return e.stop()}var i,u,d}),e,null,[[9,16]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,o.Z)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=navigator.clipboard.write([new window.ClipboardItem((0,r.Z)({},c.LO.png,t))]),e.next=23;break;case 4:if(e.prev=4,e.t0=e.catch(0),!(0,u.y8)(t)){e.next=22;break}return e.t1=navigator.clipboard,e.t2=window.ClipboardItem,e.t3=r.Z,e.t4={},e.t5=c.LO.png,e.next=14,t;case 14:return e.t6=e.sent,e.t7=(0,e.t3)(e.t4,e.t5,e.t6),e.t8=new e.t2(e.t7),e.t9=[e.t8],e.next=20,e.t1.write.call(e.t1,e.t9);case 20:e.next=23;break;case 22:throw e.t0;case 23:return e.next=25,n;case 25:case"end":return e.stop()}}),e,null,[[0,4]])})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,o.Z)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,!h){e.next=11;break}return e.prev=2,e.next=5,navigator.clipboard.writeText(t||"");case 5:n=!0,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:if(n||k(t||" ")){e.next=13;break}throw new Error("couldn't copy");case 13:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),k=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;n.style.top="".concat(r,"px"),n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);var o=!1;try{n.select(),n.setSelectionRange(0,n.value.length),o=document.execCommand("copy")}catch(e){console.error(e)}return n.remove(),o}},56:function(e,t,n){"use strict";var r=n(5858),o=n(5284),i=function(e){return[o.red[e],o.pink[e],o.grape[e],o.violet[e],o.indigo[e],o.blue[e],o.cyan[e],o.teal[e],o.green[e],o.lime[e],o.yellow[e],o.orange[e]]};t.Z={canvasBackground:[o.white,o.gray[0],o.gray[1]].concat((0,r.Z)(i(0))),elementBackground:["transparent",o.gray[4],o.gray[6]].concat((0,r.Z)(i(6))),elementStroke:[o.black,o.gray[8],o.gray[7]].concat((0,r.Z)(i(9)))}},9660:function(e,t,n){"use strict";n.d(t,{ZP:function(){return Ao},Fy:function(){return vo},J0:function(){return go}});var r=n(8758),o=n(668),i=n(5858),a=n(6759),l=n(489),c=n(7775),s=n(6967),u=n(1510),d=n(8875),f=n(4653),p=n(3164),h=n(3152),v=n(9787),m=n.n(v),g=n(5156),b=n(6852),y=n(741),x=n(6612),w=n(75),k=n(6066),_=n(1319),E=n(3646),S=n(8211),C=n(7901),O=n(5118),j=n(1935),I=n(242),T=n(6938),M=n(8290),L=n(1974),A=n(6340),P=n(1337);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=function(e,t){if(e.editingGroupId){var n=(0,I.Fb)((0,O.Lm)(t),e.editingGroupId);if(n.length)return z(z({},e),{},{selectedElementIds:(0,l.Z)({},n[0].id,!0)})}return e},Z=(0,C.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(e,t){if(t.editingLinearElement){var n=t.editingLinearElement,r=n.elementId,o=n.selectedPointsIndices,i=n.startBindingElement,a=n.endBindingElement,l=T._.getElement(r);if(!l)return!1;if(null==o||l.points.length<2){var c=e.filter((function(e){return e.id!==l.id}));return{elements:c,appState:z(z({},R(t,c)),{},{editingLinearElement:null}),commitToHistory:!1}}var s={startBindingElement:null!=o&&o.includes(0)?null:i,endBindingElement:null!=o&&o.includes(l.points.length-1)?null:a};return T._.deletePoints(l,o),{elements:e,appState:z(z({},t),{},{editingLinearElement:z(z(z({},t.editingLinearElement),s),{},{selectedPointsIndices:(null==o?void 0:o[0])>0?[o[0]-1]:[0]})}),commitToHistory:!0}}var u=function(e,t){return{elements:e.map((function(e){return t.selectedElementIds[e.id]||(0,L.Xh)(e)&&t.selectedElementIds[e.containerId]?(0,j.BE)(e,{isDeleted:!0}):e})),appState:z(z({},t),{},{selectedElementIds:{}})}}(e,t),d=u.elements,f=u.appState;return(0,M.$q)(d,e.filter((function(e){var n=e.id;return t.selectedElementIds[n]}))),{elements:d,appState:z(z({},f=R(f,d)),{},{activeTool:(0,A.Om)(t,{type:"selection"}),multiElement:null}),commitToHistory:(0,w.N)((0,O.Lm)(e),t)}},contextItemLabel:"labels.delete",keyTest:function(e){return e.key===k.tW.BACKSPACE||e.key===k.tW.DELETE},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{type:"button",icon:E._I,title:(0,S.t)("labels.delete"),"aria-label":(0,S.t)("labels.delete"),onClick:function(){return r(null)},visible:(0,w.N)((0,O.Lm)(t),n)})}}),N=n(1564),B=function(e,t){for(var n=[],r=[],o=null,i=-1,a=(0,A.xn)((0,w.eD)(e,t,!0));++i<e.length;)a.get(e[i].id)?(r.length&&(n=n.concat(r),r=[]),n.push(i),o=i+1):e[i].isDeleted&&o===i?(o=i+1,r.push(i)):r=[];return n},H=function(e,t,n){if("containerId"in e&&e.containerId){if("left"!==n)return t.indexOf(e);var r=N.Z.getScene(e).getElement(e.containerId);if(r)return t.indexOf(r)}else{var o,i,a=null===(o=e.boundElements)||void 0===o||null===(i=o.find((function(e){return"arrow"!==e.type})))||void 0===i?void 0:i.id;if(a){if("left"===n)return t.indexOf(e);var l=N.Z.getScene(e).getElement(a);if(l)return t.indexOf(l)}}},W=function(e,t){return t.reduce((function(t,n){var r=e[n];return t[r.id]=r,t}),{})},U=function(e,t,n){var r,o,a=B(t,e),l=W(t,a),c=(o=0,(r=a).reduce((function(e,t,n){return n>0&&r[n-1]!==t-1&&(o=++o),(e[o]||(e[o]=[])).push(t),e}),[]));return"right"===n&&(c=c.reverse()),c.forEach((function(r,o){var a=r[0],l=r[r.length-1],c="left"===n?a:l,s=function(e,t,n,r){var o,i=t[n],a=function(t){return!t.isDeleted&&(!e.editingGroupId||t.groupIds.includes(e.editingGroupId))},l="left"===r?(0,A.qr)(t,a,Math.max(0,n-1)):(0,A.cx)(t,a,n+1),c=t[l];if(!c)return-1;if(e.editingGroupId){var s;if((null==i?void 0:i.groupIds.join(""))===(null==c?void 0:c.groupIds.join("")))return null!==(s=H(c,t,r))&&void 0!==s?s:l;if(null==c||!c.groupIds.includes(e.editingGroupId))return-1}if(!c.groupIds.length)return null!==(o=H(c,t,r))&&void 0!==o?o:l;var u=e.editingGroupId?c.groupIds[c.groupIds.indexOf(e.editingGroupId)-1]:c.groupIds[c.groupIds.length-1],d=(0,I.Fb)(t,u);return d.length?"left"===r?t.indexOf(d[0]):t.indexOf(d[d.length-1]):l}(e,t,c,n);if(-1!==s&&c!==s){var u="left"===n?t.slice(0,s):t.slice(0,a),d=t.slice(a,l+1),f="left"===n?t.slice(s,a):t.slice(l+1,s+1),p="left"===n?t.slice(l+1):t.slice(s+1);t="left"===n?[].concat((0,i.Z)(u),(0,i.Z)(d),(0,i.Z)(f),(0,i.Z)(p)):[].concat((0,i.Z)(u),(0,i.Z)(f),(0,i.Z)(d),(0,i.Z)(p))}})),t.map((function(e){return l[e.id]?(0,j.ZP)(e):e}))},F=function(e,t,n){var r,o,a=B(e,t),l=W(e,a),c=[];if("left"===n){if(t.editingGroupId){var s=(0,I.Fb)(e,t.editingGroupId);if(!s.length)return e;r=e.indexOf(s[0])}else r=0;o=a[a.length-1]}else{if(t.editingGroupId){var u=(0,I.Fb)(e,t.editingGroupId);if(!u.length)return e;o=e.indexOf(u[u.length-1])}else o=e.length-1;r=a[0]}for(var d=r;d<o+1;d++)a.includes(d)||c.push(e[d]);var f=Object.values(l).map((function(e){return(0,j.ZP)(e)})),p=e.slice(0,r),h=e.slice(o+1);return"left"===n?[].concat((0,i.Z)(p),(0,i.Z)(f),c,(0,i.Z)(h)):[].concat((0,i.Z)(p),c,(0,i.Z)(f),(0,i.Z)(h))},K=function(e,t){return U(t,e,"left")},V=function(e,t){return U(t,e,"right")},Y=function(e,t){return F(e,t,"left")},G=function(e,t){return F(e,t,"right")},X=(0,C.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(e,t){return{elements:K(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===k.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,S.t)("labels.sendBackward")," — ").concat((0,A.uY)("CtrlOrCmd+[")),children:(0,P.jsx)(E.Gc,{theme:n.theme})})}}),q=(0,C.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(e,t){return{elements:V(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===k.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,S.t)("labels.bringForward")," — ").concat((0,A.uY)("CtrlOrCmd+]")),children:(0,P.jsx)(E.t5,{theme:n.theme})})}}),$=(0,C.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(e,t){return{elements:Y(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(e){return k.Um?e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.BRACKET_LEFT:e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===k.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,S.t)("labels.sendToBack")," — ").concat(k.Um?(0,A.uY)("CtrlOrCmd+Alt+["):(0,A.uY)("CtrlOrCmd+Shift+[")),children:(0,P.jsx)(E.pw,{theme:n.theme})})}}),J=(0,C.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(e,t){return{elements:G(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(e){return k.Um?e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.BRACKET_RIGHT:e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===k.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(e){return t(null)},title:"".concat((0,S.t)("labels.bringToFront")," — ").concat(k.Um?(0,A.uY)("CtrlOrCmd+Alt+]"):(0,A.uY)("CtrlOrCmd+Shift+]")),children:(0,P.jsx)(E.IN,{theme:n.theme})})}});function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=(0,C.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(e,t,n,r){if(t.editingLinearElement)return!1;var o=e.reduce((function(e,t){return t.isDeleted||(0,O.iB)(t)&&t.containerId||t.locked||(e[t.id]=!0),e}),{});return{appState:(0,I.bO)(ee(ee({},t),{},{selectedLinearElement:1===Object.keys(o).length&&(0,L.bt)(e[0])?new T._(e[0],r.scene):null,editingGroupId:null,selectedElementIds:o}),(0,O.Lm)(e)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.key===k.tW.A}}),ne=n(8288),re=n(5710);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=(0,C.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(e,t){if(t.editingLinearElement){var n=T._.duplicateSelectedPoints(t);return!!n&&{elements:e,appState:n.appState,commitToHistory:!0}}return ie(ie({},le(e,t)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.key===k.tW.D},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{type:"button",icon:E.d9,title:"".concat((0,S.t)("labels.duplicateSelection")," — ").concat((0,A.uY)("CtrlOrCmd+D")),"aria-label":(0,S.t)("labels.duplicateSelection"),onClick:function(){return r(null)},visible:(0,w.N)((0,O.Lm)(t),n)})}}),le=function(e,t){for(var n=new Map,r=[],o=[],a=new Map,l=function(e){var i=(0,O.Sy)(t.editingGroupId,n,e,{x:e.x+ne.k/2,y:e.y+ne.k/2});return a.set(e.id,i.id),o.push(e),r.push(i),i},c=[],s=0,u=(0,A.xn)((0,w.eD)(e,t,!0));s<e.length;){var d=e[s];if(u.get(d.id)){if(d.groupIds.length){var f=(0,I.yO)(t,d);if(f){var p=(0,I.Fb)(e,f);c.push.apply(c,(0,i.Z)(p).concat((0,i.Z)(p.map((function(e){return l(e)}))))),s+=p.length;continue}}c.push(d,l(d))}else c.push(d);s++}return(0,re.P7)(c,o,a),(0,M.ek)(c,o,a),{elements:c,appState:(0,I.bO)(ie(ie({},t),{},{selectedGroupIds:{},selectedElementIds:r.reduce((function(e,t){return(0,L.Xh)(t)||(e[t.id]=!0),e}),{})}),(0,O.Lm)(c))}},ce=(n(3917),n(828),n(6552));function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var de=(0,C.z)({name:"finalize",trackEvent:!1,perform:function(e,t,n,r){var i,a=r.canvas,c=r.focusContainer,s=r.scene;if(t.editingLinearElement){var u=t.editingLinearElement,d=u.elementId,f=u.startBindingElement,p=u.endBindingElement,h=T._.getElement(d);if(h)return(0,L.Mn)(h)&&(0,M.HG)(h,f,p),{elements:h.points.length<2||(0,O.QD)(h)?e.filter((function(e){return e.id!==h.id})):void 0,appState:ue(ue({},t),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}var v=e,m=t.pendingImageElementId&&s.getElement(t.pendingImageElementId);m&&(0,j.DR)(m,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&c();var g,b=t.multiElement?t.multiElement:"freedraw"===(null===(i=t.editingElement)||void 0===i?void 0:i.type)?t.editingElement:null;if(b){if("freedraw"!==b.type&&"touch"!==t.lastPointerDownWith){var y=b.points,x=b.lastCommittedPoint;x&&y[y.length-1]===x||(0,j.DR)(b,{points:b.points.slice(0,-1)})}(0,O.QD)(b)&&(v=v.slice(0,-1));var w=(0,ce.g6)(b.points,t.zoom.value);if(("line"===b.type||"freedraw"===b.type)&&w){var k=b.points,_=k[0];(0,j.DR)(b,{points:k.map((function(e,t){return t===k.length-1?[_[0],_[1]]:e}))})}if((0,L.Mn)(b)&&!w&&b.points.length>1){var E=T._.getPointAtIndexGlobalCoordinates(b,-1),S=(0,o.Z)(E,2),C=S[0],I=S[1];(0,M.R)(b,t,N.Z.getScene(b),{x:C,y:I})}t.activeTool.locked||"freedraw"===t.activeTool.type||(t.selectedElementIds[b.id]=!0)}return(t.activeTool.locked||"freedraw"===t.activeTool.type)&&b||(0,A.z8)(a),g="eraser"===t.activeTool.type?(0,A.Om)(t,ue(ue({},t.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,A.Om)(t,{type:"selection"}),{elements:v,appState:ue(ue({},t),{},{cursorButton:"up",activeTool:(t.activeTool.locked||"freedraw"===t.activeTool.type)&&b?t.activeTool:g,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:b&&!t.activeTool.locked&&"freedraw"!==t.activeTool.type?ue(ue({},t.selectedElementIds),{},(0,l.Z)({},b.id,!0)):t.selectedElementIds,selectedLinearElement:b&&(0,L.bt)(b)?new T._(b,s):t.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===t.activeTool.type}},keyTest:function(e,t){return e.key===k.tW.ESCAPE&&(null!==t.editingLinearElement||!t.draggingElement&&null===t.multiElement)||(e.key===k.tW.ESCAPE||e.key===k.tW.ENTER)&&null!==t.multiElement},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data;return(0,P.jsx)(_.V,{type:"button",icon:E.$c,title:(0,S.t)("buttons.done"),"aria-label":(0,S.t)("buttons.done"),onClick:n,visible:null!=t.multiElement,size:(null==r?void 0:r.size)||"medium"})}}),fe=(n(518),n(9966),function(e){var t=go().id,n=(0,v.useState)(e.value),r=(0,o.Z)(n,2),i=r[0],a=r[1];return(0,P.jsxs)("div",{className:"ProjectName",children:[(0,P.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(e.label).concat(e.isNameEditable?"":":")}),e.isNameEditable?(0,P.jsx)("input",{type:"text",className:"TextInput",onBlur:function(t){(0,A.qz)(t.target);var n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:function(e){if("Enter"===e.key){if(e.preventDefault(),e.nativeEvent.isComposing||229===e.keyCode)return;e.currentTarget.blur()}},id:"".concat(t,"-filename"),value:i,onChange:function(e){return a(e.target.value)}}):(0,P.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(t,"-filename"),children:e.value})]})}),pe=(n(5422),n(9910)),he=n(4041),ve=n(6665),me=n(4162),ge=n(434),be=n(1393),ye=n(5523),xe=function(){var e=(0,a.Z)(h.default.mark((function e(t,r,o,i,a){var l,c,s,u,d,f,p,v,m,g,b;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=a.exportBackground,c=a.exportPadding,s=void 0===c?ne.qy:c,u=a.viewBackgroundColor,d=a.name,f=a.fileHandle,p=void 0===f?null:f,0!==r.length){e.next=3;break}throw new Error((0,S.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==t&&"clipboard-svg"!==t){e.next=17;break}return e.next=6,(0,me.$D)(r,{exportBackground:l,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:u,exportPadding:s,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&"svg"===t},i);case 6:if(v=e.sent,"svg"!==t){e.next=13;break}return e.next=10,(0,be.NL)(new Blob([v.outerHTML],{type:ne.LO.svg}),{description:"Export to SVG",name:d,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:p});case 10:return e.abrupt("return",e.sent);case 13:if("clipboard-svg"!==t){e.next=17;break}return e.next=16,(0,ve.dd)(v.outerHTML);case 16:return e.abrupt("return");case 17:return e.next=19,(0,me.NL)(r,o,i,{exportBackground:l,viewBackgroundColor:u,exportPadding:s});case 19:if((m=e.sent).style.display="none",document.body.appendChild(m),"png"!==t){e.next=38;break}return e.next=25,(0,ge._c)(m);case 25:if(g=e.sent,m.remove(),!o.exportEmbedScene){e.next=33;break}return e.next=30,Promise.resolve().then(n.bind(n,673));case 30:return e.next=32,e.sent.encodePngMetadata({blob:g,metadata:(0,ye.I_)(r,o,i,"local")});case 32:g=e.sent;case 33:return e.next=35,(0,be.NL)(g,{description:"Export to PNG",name:d,extension:o.exportEmbedScene?"excalidraw.png":"png",fileHandle:p});case 35:return e.abrupt("return",e.sent);case 38:if("clipboard"!==t){e.next=55;break}return e.prev=39,b=(0,ge._c)(m),e.next=43,(0,ve.uR)(b);case 43:e.next=50;break;case 45:if(e.prev=45,e.t0=e.catch(39),"CANVAS_POSSIBLY_TOO_BIG"!==e.t0.name){e.next=49;break}throw e.t0;case 49:throw new Error((0,S.t)("alerts.couldNotCopyToClipboard"));case 50:return e.prev=50,m.remove(),e.finish(50);case 53:e.next=57;break;case 55:throw m.remove(),new Error("Unsupported export type");case 57:case"end":return e.stop()}}),e,null,[[39,45,50,53]])})));return function(t,n,r,o,i){return e.apply(this,arguments)}}();function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=function(){var e=(0,a.Z)(h.default.mark((function e(t,n,r){var o,i,a,l,c,s;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(o=n).exportBackground,a=o.viewBackgroundColor,l=o.name,c=o.fileHandle,s=(0,ge.Qk)(c),c&&(0,ge.DQ)(s)){e.next=4;break}throw new Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return n=ke(ke({},n),{},{exportEmbedScene:!0}),e.next=7,xe(s,(0,O.Lm)(t),n,r,{exportBackground:i,viewBackgroundColor:a,name:l,fileHandle:c});case 7:return e.abrupt("return",{fileHandle:c});case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Ee=(n(7225),function(e){var t=e.children,n=e.checked,r=e.onChange,o=e.className;return(0,P.jsxs)("div",{className:(0,y.Z)("Checkbox",o,{"is-checked":n}),onClick:function(e){r(!n,e),e.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,P.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":n,children:E.eQ}),(0,P.jsx)("div",{className:"Checkbox-label",children:t})]})});n(4623);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,P.jsx)("div",{className:(0,y.Z)("Stack Stack_horizontal",i),style:Ce({"--gap":n,alignItems:r,justifyContent:o},a),children:t})},je=function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,P.jsx)("div",{className:(0,y.Z)("Stack Stack_vertical",i),style:Ce({"--gap":n,justifyItems:r,justifyContent:o},a),children:t})},Ie=(n(554),function(e){var t=e.fileName,n=e.onSave;return(0,P.jsxs)(Oe,{className:"ActiveFile",gap:1,align:"center",children:[(0,P.jsxs)("span",{className:"ActiveFile__fileName",children:[E.tP,(0,P.jsx)("span",{children:t})]}),(0,P.jsx)(_.V,{type:"icon",icon:E.a1,title:(0,S.t)("buttons.save"),"aria-label":(0,S.t)("buttons.save"),onClick:n,"data-testid":"save-button"})]})});function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,C.z)({name:"changeProjectName",trackEvent:!1,perform:function(e,t,n){return{appState:Me(Me({},t),{},{name:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.appProps;return(0,P.jsx)(fe,{label:(0,S.t)("labels.fileTitle"),value:t.name||"Unnamed",onChange:function(e){return n(e)},isNameEditable:void 0===r.name&&!t.viewModeEnabled})}}),(0,C.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(e,t,n){return{appState:Me(Me({},t),{},{exportScale:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,i=(0,O.Lm)(t),a=(0,w.N)(i,n)?(0,w.eD)(i,n):i;return(0,P.jsx)(P.Fragment,{children:ne.ZB.map((function(e){var t=(0,me.Cg)(a,ne.qy,e),i=(0,o.Z)(t,2),l=i[0],c=i[1],s="".concat((0,S.t)("buttons.scale")," ").concat(e,"x (").concat(l,"x").concat(c,")");return(0,P.jsx)(_.V,{size:"small",type:"radio",icon:"".concat(e,"x"),name:"export-canvas-scale",title:s,"aria-label":s,id:"export-canvas-scale",checked:e===n.exportScale,onChange:function(){return r(e)}},e)}))})}}),(0,C.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(e,t,n){return{appState:Me(Me({},t),{},{exportBackground:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)(Ee,{checked:t.exportBackground,onChange:function(e){return n(e)},children:(0,S.t)("labels.withBackground")})}}),(0,C.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(e,t,n){return{appState:Me(Me({},t),{},{exportEmbedScene:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsxs)(Ee,{checked:t.exportEmbedScene,onChange:function(e){return n(e)},children:[(0,S.t)("labels.exportEmbedScene"),(0,P.jsx)(pe.u,{label:(0,S.t)("labels.exportEmbedScene_details"),long:!0,children:(0,P.jsx)("div",{className:"excalidraw-tooltip-icon",children:E.Vl})})]})}}),(0,C.z)({name:"saveToActiveFile",trackEvent:{category:"export"},perform:(Le=(0,a.Z)(h.default.mark((function e(t,n,r,o){var i,a,l;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!n.fileHandle,e.prev=1,!(0,ge.g8)(n.fileHandle)){e.next=8;break}return e.next=5,_e(t,n,o.files);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,ye.Um)(t,n,o.files);case 10:e.t0=e.sent;case 11:return a=e.t0,l=a.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:Me(Me({},n),{},{fileHandle:l,toast:i?{message:null!=l&&l.name?(0,S.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(l.name,'"')):(0,S.t)("toast.fileSaved")}:null})});case 16:return e.prev=16,e.t1=e.catch(1),"AbortError"!==(null===e.t1||void 0===e.t1?void 0:e.t1.name)?console.error(e.t1):console.warn(e.t1),e.abrupt("return",{commitToHistory:!1});case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),function(e,t,n,r){return Le.apply(this,arguments)}),keyTest:function(e){return e.key===k.tW.S&&e[k.tW.CTRL_OR_CMD]&&!e.shiftKey},PanelComponent:function(e){var t,n=e.updateData,r=e.appState;return(0,P.jsx)(Ie,{onSave:function(){return n(null)},fileName:null===(t=r.fileHandle)||void 0===t?void 0:t.name})}});var Le,Ae,Pe,De=(0,C.z)({name:"saveFileToDisk",trackEvent:{category:"export"},perform:(Ae=(0,a.Z)(h.default.mark((function e(t,n,r,o){var i,a;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,ye.Um)(t,Me(Me({},n),{},{fileHandle:null}),o.files);case 3:return i=e.sent,a=i.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:Me(Me({},n),{},{fileHandle:a})});case 8:return e.prev=8,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)?console.error(e.t0):console.warn(e.t0),e.abrupt("return",{commitToHistory:!1});case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,n,r){return Ae.apply(this,arguments)}),keyTest:function(e){return e.key===k.tW.S&&e.shiftKey&&e[k.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.updateData;return(0,P.jsx)(_.V,{type:"button",icon:E.po,title:(0,S.t)("buttons.saveAs"),"aria-label":(0,S.t)("buttons.saveAs"),showAriaLabel:vo().isMobile,hidden:!be.kr,onClick:function(){return t(null)},"data-testid":"save-as-button"})}});(0,C.z)({name:"loadScene",trackEvent:{category:"export"},perform:(Pe=(0,a.Z)(h.default.mark((function e(t,n,r,o){var i,a,l,c;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,ye.n8)(n,t);case 3:return i=e.sent,a=i.elements,l=i.appState,c=i.files,e.abrupt("return",{elements:a,appState:l,files:c,commitToHistory:!0});case 10:if(e.prev=10,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}return console.warn(e.t0),e.abrupt("return",!1);case 15:return e.abrupt("return",{elements:t,appState:Me(Me({},n),{},{errorMessage:e.t0.message}),files:o.files,commitToHistory:!1});case 16:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(e,t,n,r){return Pe.apply(this,arguments)}),keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.key===k.tW.O},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,P.jsx)(_.V,{type:"button",icon:E.zD,title:(0,S.t)("buttons.load"),"aria-label":(0,S.t)("buttons.load"),showAriaLabel:vo().isMobile,onClick:t,"data-testid":"load-button"})}}),(0,C.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(e,t,n){return{appState:Me(Me({},t),{},{exportWithDarkMode:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,P.jsx)(he.J,{value:t.exportWithDarkMode?ne.C6.DARK:ne.C6.LIGHT,onChange:function(e){n(e===ne.C6.DARK)},title:(0,S.t)("labels.toggleExportColorScheme")})})}});function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ze="{}",Ne=(0,C.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(e,t){var n=[],r=e.find((function(e){return t.selectedElementIds[e.id]}));if(n.push(r),r&&(0,L.Xo)(r)){var o=(0,re.WJ)(r);n.push(o)}return r&&(Ze=JSON.stringify(n)),{appState:Re(Re({},t),{},{toast:{message:(0,S.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.C}}),Be=(0,C.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(e,t){var n=JSON.parse(Ze),r=n[0],o=n[1];if(!(0,O.r2)(r))return{elements:e,commitToHistory:!1};var i=(0,w.eD)(e,t,!0),a=i.map((function(e){return e.id}));return{elements:e.map((function(e){if(a.includes(e.id)){var t,n,l,c,s,u,d,f=r;if((0,O.iB)(e)&&e.containerId&&(f=o),!f)return e;var p=(0,j.BE)(e,{backgroundColor:null===(t=f)||void 0===t?void 0:t.backgroundColor,strokeWidth:null===(n=f)||void 0===n?void 0:n.strokeWidth,strokeColor:null===(l=f)||void 0===l?void 0:l.strokeColor,strokeStyle:null===(c=f)||void 0===c?void 0:c.strokeStyle,fillStyle:null===(s=f)||void 0===s?void 0:s.fillStyle,opacity:null===(u=f)||void 0===u?void 0:u.opacity,roughness:null===(d=f)||void 0===d?void 0:d.roughness});if((0,O.iB)(p)){var h,v,m,g=null;(p=(0,j.BE)(p,{fontSize:(null===(h=f)||void 0===h?void 0:h.fontSize)||ne.n5,fontFamily:(null===(v=f)||void 0===v?void 0:v.fontFamily)||ne.rk,textAlign:(null===(m=f)||void 0===m?void 0:m.textAlign)||ne.Hg})).containerId&&(g=i.find((function(e){return(0,O.iB)(p)&&e.id===p.containerId}))||null),(0,O.oN)(p,g)}return"arrow"===p.type&&(p=(0,j.BE)(p,{startArrowhead:f.startArrowhead,endArrowhead:f.endArrowhead})),p}return e})),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.V}}),He=function(e){return(0,P.jsx)("button",{className:"help-icon",onClick:e.onClick,type:"button",title:"".concat(e.title," — ?"),"aria-label":e.title,children:E.Vl})};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,C.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:Ue(Ue({},t),{},{openMenu:"canvas"===t.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)(_.V,{type:"button",icon:E.GI,"aria-label":(0,S.t)("buttons.menu"),onClick:n,selected:"canvas"===t.openMenu})}}),(0,C.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:Ue(Ue({},t),{},{openMenu:"shape"===t.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{visible:(0,O.RT)(n,(0,O.Lm)(t)),type:"button",icon:E.DG,"aria-label":(0,S.t)("buttons.edit"),onClick:r,selected:"shape"===n.openMenu})}}),(0,C.z)({name:"toggleFullScreen",trackEvent:{category:"canvas",predicate:function(e){return!(0,A.rB)()}},perform:function(){return(0,A.rB)()||(0,A.wo)(),(0,A.rB)()&&(0,A.Pr)(),{commitToHistory:!1}},keyTest:function(e){return e.code===k.aU.F&&!e[k.tW.CTRL_OR_CMD]}}),(0,C.z)({name:"toggleShortcuts",trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(e,t,n,r){var o=r.focusContainer;return t.showHelpDialog&&o(),{appState:Ue(Ue({},t),{},{showHelpDialog:!t.showHelpDialog}),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,P.jsx)(He,{title:(0,S.t)("helpDialog.title"),onClick:t})},keyTest:function(e){return e.key===k.tW.QUESTION_MARK}});var Fe=n(6954);function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ye(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xe=function(e,t){var n=(0,w.eD)((0,O.Lm)(e),t,!0);return n.length>=2&&!function(e){if(e.length>=2){var t,n=Ye(e[0].groupIds);try{var o=function(){var n=t.value;if(e.reduce((function(e,t){return e&&(0,I.Nd)(t,n)}),!0))return{v:!0}};for(n.s();!(t=n.n()).done;){var i=o();if("object"===(0,r.Z)(i))return i.v}}catch(e){n.e(e)}finally{n.f()}}return!1}(n)},qe=(0,C.z)({name:"group",trackEvent:{category:"element"},perform:function(e,t){var n=(0,w.eD)((0,O.Lm)(e),t,!0);if(n.length<2)return{appState:t,elements:e,commitToHistory:!1};var r=(0,I.iJ)(t);if(1===r.length){var o=r[0],a=new Set((0,I.Fb)(e,o).map((function(e){return e.id}))),l=new Set(n.map((function(e){return e.id})));if(new Set([].concat((0,i.Z)(Array.from(a)),(0,i.Z)(Array.from(l)))).size===a.size)return{appState:t,elements:e,commitToHistory:!1}}var c=(0,Fe.kb)(),s=(0,A.xn)(n),u=e.map((function(e){return s.get(e.id)?(0,j.BE)(e,{groupIds:(0,I.S_)(e.groupIds,c,t.editingGroupId)}):e})),d=(0,I.Fb)(u,c),f=d[d.length-1],p=u.lastIndexOf(f),h=u.slice(p+1),v=u.slice(0,p).filter((function(e){return!(0,I.Nd)(e,c)})),m=[].concat((0,i.Z)(v),(0,i.Z)(d),(0,i.Z)(h));return{appState:(0,I.F$)(c,Ve(Ve({},t),{},{selectedGroupIds:{}}),(0,O.Lm)(m)),elements:m,commitToHistory:!0}},contextItemLabel:"labels.group",contextItemPredicate:function(e,t){return Xe(e,t)},keyTest:function(e){return!e.shiftKey&&e[k.tW.CTRL_OR_CMD]&&e.code===k.aU.G},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!Xe(t,n),type:"button",icon:(0,P.jsx)(E.BF,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.group")," — ").concat((0,A.uY)("CtrlOrCmd+G")),"aria-label":(0,S.t)("labels.group"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),$e=(0,C.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(e,t){if(0===(0,I.iJ)(t).length)return{appState:t,elements:e,commitToHistory:!1};var n=[],r=e.map((function(e){(0,L.Xh)(e)&&n.push(e.id);var r=(0,I.h6)(e.groupIds,t.selectedGroupIds);return r.length===e.groupIds.length?e:(0,j.BE)(e,{groupIds:r})})),o=(0,I.bO)(Ve(Ve({},t),{},{selectedGroupIds:{}}),(0,O.Lm)(r));return n.forEach((function(e){return o.selectedElementIds[e]=!1})),{appState:o,elements:r,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e[k.tW.CTRL_OR_CMD]&&e.code===k.aU.G},contextItemLabel:"labels.ungroup",contextItemPredicate:function(e,t){return(0,I.iJ)(t).length>0},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{type:"button",hidden:0===(0,I.iJ)(n).length,icon:(0,P.jsx)(E.RJ,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.ungroup")," — ").concat((0,A.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,S.t)("labels.ungroup"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),Je=n(8982),Qe=(n(2789),function(e){var t=e.color,n=e.border,r=e.onClick,i=e.name,a=e.src,l=(0,Je.f)(i),c=(0,v.useState)(!1),s=(0,o.Z)(c,2),u=s[0],d=s[1],f=!u&&a,p=f?void 0:{background:t,border:"1px solid ".concat(n)};return(0,P.jsx)("div",{className:"Avatar",style:p,onClick:r,children:f?(0,P.jsx)("img",{className:"Avatar-img",src:a,alt:l,referrerPolicy:"no-referrer",onError:function(){return d(!0)}}):l})}),et=n(2264);function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,C.z)({name:"goToCollaborator",trackEvent:{category:"collab"},perform:function(e,t,n){var r=n;return r?{appState:nt(nt(nt({},t),(0,et.s)({scenePoint:r,viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})),{},{openMenu:"canvas"===t.openMenu?null:t.openMenu}),commitToHistory:!1}:{appState:t,commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data,i=(0,o.Z)(r,2),a=i[0],l=i[1],c=(0,Je.X)(a,t),s=c.background,u=c.stroke;return(0,P.jsx)(Qe,{color:s,border:u,onClick:function(){return n(l.pointer)},name:l.username||"",src:l.avatarUrl})}});var rt=n(2791);function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=(0,C.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=(0,w.eD)((0,O.Lm)(e),t,!0);return o.some((function(e){return"image"===e.type}))?{commitToHistory:!1,appState:it(it({},t),{},{errorMessage:"Support for adding images to the library coming soon!"})}:r.library.getLatestLibrary().then((function(e){return r.library.setLibrary([{id:(0,Fe.kb)(),status:"unpublished",elements:o.map(rt.OL),created:Date.now()}].concat((0,i.Z)(e)))})).then((function(){return{commitToHistory:!1,appState:it(it({},t),{},{toast:{message:(0,S.t)("toast.addedToLibrary")}})}})).catch((function(e){return{commitToHistory:!1,appState:it(it({},t),{},{errorMessage:e.message})}}))},contextItemLabel:"labels.addToLibrary"}),lt=n(8925);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut=function(e,t,n){var r=n.axis,i=n.position,a=(0,lt.v2)(e),c="x"===r?["minX","maxX"]:["minY","maxY"],s=(0,o.Z)(c,2),u=s[0],d=s[1],f={x:0,y:0};return st(st({},f),{},"start"===i?(0,l.Z)({},r,t[u]-a[u]):"end"===i?(0,l.Z)({},r,t[d]-a[d]):(0,l.Z)({},r,(t[u]+t[d])/2-(a[u]+a[d])/2))},dt=function(e,t){return(0,w.eD)((0,O.Lm)(e),t).length>1},ft=function(e,t,n){var r=function(e,t){var n=(0,I.AI)(e),r=(0,lt.v2)(e);return n.flatMap((function(e){var n=ut(e,r,t);return e.map((function(e){return(0,j.BE)(e,{x:e.x+n.x,y:e.y+n.y})}))}))}((0,w.eD)((0,O.Lm)(e),t),n),o=(0,A.xn)(r);return e.map((function(e){return o.get(e.id)||e}))};(0,C.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===k.tW.ARROW_UP},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.Ct,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.alignTop")," — ").concat((0,A.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,S.t)("labels.alignTop"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===k.tW.ARROW_DOWN},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.HL,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.alignBottom")," — ").concat((0,A.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,S.t)("labels.alignBottom"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===k.tW.ARROW_LEFT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.xs,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.alignLeft")," — ").concat((0,A.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,S.t)("labels.alignLeft"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===k.tW.ARROW_RIGHT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.mh,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.alignRight")," — ").concat((0,A.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,S.t)("labels.alignRight"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.ST,{theme:n.theme}),onClick:function(){return r(null)},title:(0,S.t)("labels.centerVertically"),"aria-label":(0,S.t)("labels.centerVertically"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:ft(e,t,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!dt(t,n),type:"button",icon:(0,P.jsx)(E.gK,{theme:n.theme}),onClick:function(){return r(null)},title:(0,S.t)("labels.centerHorizontally"),"aria-label":(0,S.t)("labels.centerHorizontally"),visible:(0,w.N)((0,O.Lm)(t),n)})}});function pt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ht(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vt=function(e,t){return(0,w.eD)((0,O.Lm)(e),t).length>1},mt=function(e,t,n){var r=function(e,t){var n,r="x"===t.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3],u=(0,lt.v2)(e),d=(0,I.AI)(e).map((function(e){return[e,(0,lt.v2)(e)]})).sort((function(e,t){return e[1][l]-t[1][l]})),f=0,p=pt(d);try{for(p.s();!(n=p.n()).done;)f+=n.value[1][s]}catch(e){p.e(e)}finally{p.f()}var h=(u[s]-f)/(d.length-1);if(h<0){var v=d.findIndex((function(e){return e[1][a]===u[a]})),m=d.findIndex((function(e){return e[1][c]===u[c]})),g=(d[m][1][l]-d[v][1][l])/(d.length-1),b=d[v][1][l];return d.flatMap((function(e,n){var r=(0,o.Z)(e,2),i=r[0],a=r[1],c={x:0,y:0};return n!==v&&n!==m&&(b+=g,c[t.axis]=b-a[l]),i.map((function(e){return(0,j.BE)(e,{x:e.x+c.x,y:e.y+c.y})}))}))}var y=u[a];return d.flatMap((function(e){var n=(0,o.Z)(e,2),r=n[0],i=n[1],l={x:0,y:0};return l[t.axis]=y-i[a],y+=h,y+=i[s],r.map((function(e){return(0,j.BE)(e,{x:e.x+l.x,y:e.y+l.y})}))}))}((0,w.eD)((0,O.Lm)(e),t),n),i=(0,A.xn)(r);return e.map((function(e){return i.get(e.id)||e}))},gt=((0,C.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:mt(e,t,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return!e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.H},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!vt(t,n),type:"button",icon:(0,P.jsx)(E.uD,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.distributeHorizontally")," — ").concat((0,A.uY)("Alt+H")),"aria-label":(0,S.t)("labels.distributeHorizontally"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),(0,C.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:mt(e,t,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return!e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.V},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(_.V,{hidden:!vt(t,n),type:"button",icon:(0,P.jsx)(E.W5,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,S.t)("labels.distributeVertically")," — ").concat((0,A.uY)("Alt+V")),"aria-label":(0,S.t)("labels.distributeVertically"),visible:(0,w.N)((0,O.Lm)(t),n)})}}),n(8634)),bt=n(267),yt=(0,C.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(e,t){return{elements:wt(e,t,"horizontal"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&"KeyH"===e.code},contextItemLabel:"labels.flipHorizontal",contextItemPredicate:function(e,t){return function(e,t){var n=(0,w.eD)((0,O.Lm)(e),t);return 1===n.length&&"text"!==n[0].type}(e,t)}}),xt=(0,C.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(e,t){return{elements:wt(e,t,"vertical"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&"KeyV"===e.code},contextItemLabel:"labels.flipVertical",contextItemPredicate:function(e,t){return function(e,t){return 1===(0,w.eD)((0,O.Lm)(e),t).length}(e,t)}}),wt=function(e,t,n){var r=(0,w.eD)((0,O.Lm)(e),t);if(r.length>1)return e;var o=kt(r,t,n),i=(0,A.xn)(o);return e.map((function(e){return i.get(e.id)||e}))},kt=function(e,t,n){return e.forEach((function(e){_t(e,t),"vertical"===n&&Et(e,Math.PI)})),e},_t=function(e,t){var n=e.x,r=e.y,o=e.width,i=e.height,a=(0,gt.LW)(e.angle),l=0;((0,L.bt)(e)||(0,L.F9)(e))&&(l=2*e.points.reduce((function(e,t){return Math.max(e,t[0])}),0)-e.width),(0,j.DR)(e,{angle:(0,gt.LW)(0)});var c=(0,bt.PC)(e,t.zoom),s=!0,u=0,d=c.nw;if(d||(s=!1,d=c.ne)){if((0,L.bt)(e)){for(var f=1;f<e.points.length;f++)T._.movePoints(e,[{index:f,point:[-e.points[f][0],e.points[f][1]]}]);T._.normalizePoints(e)}else u=s?e.x+2*o:e.x-2*o,(0,gt.l2)((new Map).set(e.id,e),!0,e,s?"nw":"ne",!1,u,d[1]),(0,j.DR)(e,{width:o,height:i});var p=(0,gt.LW)(2*Math.PI-a);p<0&&(p=(0,gt.LW)(p+2*Math.PI)),(0,j.DR)(e,{angle:p}),(0,j.DR)(e,{x:n+l,y:r}),(0,M.Ww)(e)}else(0,j.DR)(e,{angle:a})},Et=function(e,t){var n=e.x,r=e.y,o=(0,gt.LW)(e.angle+t);o<0&&(o=(0,gt.LW)(2*Math.PI+o)),(0,j.DR)(e,{angle:o}),(0,j.DR)(e,{x:n,y:r})},St=n(1868);function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jt=(0,C.z)({name:"copy",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=(0,St.eD)(e,t,!0);return(0,ve.vQ)(o,t,r.files),{commitToHistory:!1}},contextItemLabel:"labels.copy",keyTest:void 0}),It=(0,C.z)({name:"cut",trackEvent:{category:"element"},perform:function(e,t,n,r){return jt.perform(e,t,n,r),Z.perform(e,t)},contextItemLabel:"labels.cut",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.code===k.aU.X}}),Tt=(0,C.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:function(){var e=(0,a.Z)(h.default.mark((function e(t,n,r,o){var i;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,St.eD)((0,O.Lm)(t),n,!0),e.prev=3,e.next=6,xe("clipboard-svg",i.length?i:(0,O.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:Ot(Ot({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsSvg"}),Mt=(0,C.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:function(){var e=(0,a.Z)(h.default.mark((function e(t,n,r,o){var i;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,St.eD)((0,O.Lm)(t),n,!0),e.prev=3,e.next=6,xe("clipboard",i.length?i:(0,O.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{appState:Ot(Ot({},n),{},{toast:{message:(0,S.t)("toast.copyToClipboardAsPng",{exportSelection:i.length?(0,S.t)("toast.selection"):(0,S.t)("toast.canvas"),exportColorScheme:n.exportWithDarkMode?(0,S.t)("buttons.darkMode"):(0,S.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:Ot(Ot({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsPng",keyTest:function(e){return e.code===k.aU.C&&e.altKey&&e.shiftKey}}),Lt=(0,C.z)({name:"copyText",trackEvent:{category:"element"},perform:function(e,t){var n=(0,St.eD)((0,O.Lm)(e),t,!0).reduce((function(e,t){return(0,O.iB)(t)&&e.push(t.text),e}),[]).join("\n\n");return(0,ve.dd)(n),{commitToHistory:!1}},contextItemPredicate:function(e,t){return ve.wx&&(0,St.eD)(e,t,!0).some(O.iB)},contextItemLabel:"labels.copyText"});function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dt=(0,C.z)({name:"gridMode",trackEvent:{category:"canvas",predicate:function(e){return!e.gridSize}},perform:function(e,t){return{appState:Pt(Pt({},t),{},{gridSize:this.checked(t)?null:ne.k}),commitToHistory:!1}},checked:function(e){return null!==e.gridSize},contextItemLabel:"labels.showGrid",keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.code===k.aU.QUOTE}});function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zt=(0,C.z)({name:"zenMode",trackEvent:{category:"canvas",predicate:function(e){return!e.zenModeEnabled}},perform:function(e,t){return{appState:Rt(Rt({},t),{},{zenModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(e){return!e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.Z}});function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ht=(0,C.z)({name:"stats",trackEvent:{category:"menu"},perform:function(e,t){return{appState:Bt(Bt({},t),{},{showStats:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.showStats},contextItemLabel:"stats.title",keyTest:function(e){return!e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.SLASH}});function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ft=(0,C.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},contextItemPredicate:function(e,t){return(0,w.eD)(e,t).some((function(e){return(0,L.Xo)(e)}))},perform:function(e,t){return(0,w.eD)((0,O.Lm)(e),t).forEach((function(e){var t=(0,re.WJ)(e);if(t){var n,r=(0,re.X1)(t.originalText,(0,A.mO)(t)),o=r.width,i=r.height,a=r.baseline;(0,j.DR)(t,{containerId:null,width:o,height:i,baseline:a,text:t.originalText}),(0,j.DR)(e,{boundElements:null===(n=e.boundElements)||void 0===n?void 0:n.filter((function(e){return e.id!==t.id}))})}})),{elements:e,appState:t,commitToHistory:!0}}}),Kt=(0,C.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},contextItemPredicate:function(e,t){var n=(0,w.eD)(e,t);if(2===n.length){var r,o=(0,O.iB)(n[0])||(0,O.iB)(n[1]);if((0,L.mG)(n[0])?r=n[0]:(0,L.mG)(n[1])&&(r=n[1]),o&&r&&null===(0,re.WJ)(r))return!0}return!1},perform:function(e,t){var n,r,o=(0,w.eD)((0,O.Lm)(e),t);(0,O.iB)(o[0])&&(0,L.mG)(o[1])?(n=o[0],r=o[1]):(n=o[1],r=o[0]),(0,j.DR)(n,{containerId:r.id,verticalAlign:ne.oX.MIDDLE}),(0,j.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:n.id})}),(0,re.oN)(n,r);var i=e.slice(),a=i.findIndex((function(e){return e.id===n.id}));i.splice(a,1);var c=i.findIndex((function(e){return e.id===r.id}));return i.splice(c+1,0,n),{elements:i,appState:Ut(Ut({},t),{},{selectedElementIds:(0,l.Z)({},r.id,!0)}),commitToHistory:!0}}}),Vt=n(2383);function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xt=(0,C.z)({name:"toggleLock",trackEvent:{category:"element"},perform:function(e,t){var n=(0,w.eD)(e,t,!0);if(!n.length)return!1;var r=qt(n),o=(0,A.xn)(n),i="lock"===r;return{elements:e.map((function(e){return o.has(e.id)?(0,j.BE)(e,{locked:i}):e})),appState:Gt(Gt({},t),{},{selectedLinearElement:i?null:t.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(e,t){var n=(0,w.eD)(e,t,!1);if(1===n.length)return n[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock";if(n.length>1)return"lock"===qt(n)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll";throw new Error("Unexpected zero elements to lock/unlock. This should never happen.")},keyTest:function(e,t,n){return e.key.toLocaleLowerCase()===k.tW.L&&e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&(0,w.eD)(n,t,!1).length>0}}),qt=function(e){return e.some((function(e){return!e.locked}))?"lock":"unlock"};function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qt=function(e,t,n){var r=!1;if(!(t.multiElement||t.resizingElement||t.editingElement||t.draggingElement)){var o=n();if(null===o)return{commitToHistory:r};var i=(0,A.xn)(e),a=o.elements,l=(0,A.xn)(a),c=e.filter((function(e){return!l.has(e.id)})),s=a.map((function(e){return(0,j.BE)(i.get(e.id)||e,e)})).concat(c.map((function(e){return(0,j.BE)(e,{isDeleted:!0})})));return(0,M.$q)(s,c),{elements:s,appState:Jt(Jt({},t),o.appState),commitToHistory:r,syncHistory:!0}}return{commitToHistory:r}},en=n(7047),tn=function(e,t,n,o,i,a){if(e.trackEvent)try{if("object"===(0,r.Z)(e.trackEvent))(!e.trackEvent.predicate||e.trackEvent.predicate(n,o,a))&&(0,en.L)(e.trackEvent.category,e.trackEvent.action||e.name,"".concat(t," (").concat(i.device.isMobile?"mobile":"desktop",")"))}catch(e){console.error("error while logging action:",e)}},nn=function(){function e(t,n,r,o){var i=this;(0,c.Z)(this,e),this.actions={},this.renderAction=function(e,t){var n=i.app.props.UIOptions.canvasActions;if(i.actions[e]&&"PanelComponent"in i.actions[e]&&(!(e in n)||n[e])){var r=i.actions[e],o=r.PanelComponent,a=i.getElementsIncludingDeleted(),l=i.getAppState();return(0,P.jsx)(o,{elements:i.getElementsIncludingDeleted(),appState:i.getAppState(),updateData:function(e){tn(r,"ui",l,a,i.app,e),i.updater(r.perform(i.getElementsIncludingDeleted(),i.getAppState(),e,i.app))},appProps:i.app.props,data:t})}return null},this.updater=function(e){if(!e||!("then"in e))return t(e);e.then((function(e){return t(e)}))},this.getAppState=n,this.getElementsIncludingDeleted=r,this.app=o}return(0,s.Z)(e,[{key:"registerAction",value:function(e){this.actions[e.name]=e}},{key:"registerAll",value:function(e){var t=this;e.forEach((function(e){return t.registerAction(e)}))}},{key:"handleKeyDown",value:function(e){var t=this,n=this.app.props.UIOptions.canvasActions,r=Object.values(this.actions).sort((function(e,t){return(t.keyPriority||0)-(e.keyPriority||0)})).filter((function(r){return(!(r.name in n)||n[r.name])&&r.keyTest&&r.keyTest(e,t.getAppState(),t.getElementsIncludingDeleted())}));if(1!==r.length)return r.length>1&&console.warn("Canceling as multiple actions match this shortcut",r),!1;var o=r[0];if(this.getAppState().viewModeEnabled&&!Object.values(ne.EH).includes(r[0].name))return!1;var i=this.getElementsIncludingDeleted(),a=this.getAppState();return tn(o,"keyboard",a,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(r[0].perform(i,a,null,this.app)),!0}},{key:"executeAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=this.getElementsIncludingDeleted(),r=this.getAppState(),o=null;tn(e,t,r,n,this.app,o),this.updater(e.perform(n,r,o,this.app))}}]),e}(),rn=n(8897),on=n(7053),an=n(679),ln=function(e){var t=Array.from(e.values());return{x:sn(t,(function(e){return e.x}))/t.length,y:sn(t,(function(e){return e.y}))/t.length}},cn=function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return Math.hypot(n.x-r.x,n.y-r.y)},sn=function(e,t){return e.reduce((function(e,n){return e+t(n)}),0)};function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fn=function(e){return{selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,viewBackgroundColor:e.viewBackgroundColor,editingLinearElement:e.editingLinearElement,editingGroupId:e.editingGroupId,name:e.name}},pn=function(){function e(){var t=this;(0,c.Z)(this,e),this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=function(e,n){return t.dehydrateHistoryEntry({appState:fn(e),elements:n.reduce((function(t,n){if((0,L.bt)(n)&&e.multiElement&&e.multiElement.id===n.id){if(e.multiElement&&e.multiElement.id===n.id&&n.points.length<2)return t;t.push(dn(dn({},n),{},{points:n.lastCommittedPoint!==n.points[n.points.length-1]?n.points.slice(0,-1):n.points}))}else t.push(n);return t}),[])})}}return(0,s.Z)(e,[{key:"hydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.parse(n),elements:r.map((function(e){var n,r=null===(n=t.elementCache.get(e.id))||void 0===n?void 0:n.get(e.versionNonce);if(!r)throw new Error("Element not found: ".concat(e.id,":").concat(e.versionNonce));return r}))}}},{key:"dehydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.stringify(n),elements:r.map((function(e){t.elementCache.has(e.id)||t.elementCache.set(e.id,new Map);var n=t.elementCache.get(e.id);return n.has(e.versionNonce)||n.set(e.versionNonce,(0,rt.OL)(e)),{id:e.id,versionNonce:e.versionNonce}}))}}},{key:"getSnapshotForTest",value:function(){var e=this;return{recording:this.recording,stateHistory:this.stateHistory.map((function(t){return e.hydrateHistoryEntry(t)})),redoStack:this.redoStack.map((function(t){return e.hydrateHistoryEntry(t)}))}}},{key:"clear",value:function(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(e){var t,n=this.lastEntry;if(!n)return!0;if(e.elements.length!==n.elements.length)return!0;for(var r=e.elements.length-1;r>-1;r--){var o=e.elements[r],i=n.elements[r];if(!o||!i||o.id!==i.id||o.versionNonce!==i.versionNonce)return!0}for(t in e.appState){var a,l;if("editingLinearElement"===t)if((null===(a=e.appState[t])||void 0===a?void 0:a.elementId)===(null===(l=n.appState[t])||void 0===l?void 0:l.elementId))continue;if("selectedElementIds"!==t&&"selectedGroupIds"!==t&&e.appState[t]!==n.appState[t])return!0}return!1}},{key:"pushEntry",value:function(e,t){var n=this.generateEntry(e,t),r=this.hydrateHistoryEntry(n);if(r){if(!this.shouldCreateEntry(r))return;this.stateHistory.push(n),this.lastEntry=r,this.clearRedoStack()}}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var e=this.redoStack.pop();return void 0!==e?(this.stateHistory.push(e),this.hydrateHistoryEntry(e)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var e=this.stateHistory.pop(),t=this.stateHistory[this.stateHistory.length-1];return void 0!==e?(this.redoStack.push(e),this.hydrateHistoryEntry(t)):null}},{key:"setCurrentState",value:function(e,t){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(e,t))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(e,t){this.recording&&(this.pushEntry(e,t),this.recording=!1)}}]),e}(),hn=n(3547),vn=n(6202),mn=n(746),gn=[{icon:(0,P.jsx)("svg",{viewBox:"0 0 320 512",className:"",children:(0,P.jsx)("path",{d:"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"})}),value:"selection",key:k.tW.V},{icon:(0,P.jsx)("svg",{viewBox:"0 0 448 512",children:(0,P.jsx)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})}),value:"rectangle",key:k.tW.R},{icon:(0,P.jsx)("svg",{viewBox:"0 0 223.646 223.646",children:(0,P.jsx)("path",{d:"M111.823 0L16.622 111.823 111.823 223.646 207.025 111.823z"})}),value:"diamond",key:k.tW.D},{icon:(0,P.jsx)("svg",{viewBox:"0 0 512 512",children:(0,P.jsx)("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})}),value:"ellipse",key:k.tW.O},{icon:(0,P.jsx)("svg",{viewBox:"0 0 448 512",className:"rtl-mirror",children:(0,P.jsx)("path",{d:"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"})}),value:"arrow",key:k.tW.A},{icon:(0,P.jsx)("svg",{viewBox:"0 0 6 6",children:(0,P.jsx)("line",{x1:"0",y1:"3",x2:"6",y2:"3",stroke:"currentColor",strokeLinecap:"round"})}),value:"line",key:[k.tW.P,k.tW.L]},{icon:(0,P.jsx)("svg",{viewBox:"0 0 512 512",children:(0,P.jsx)("path",{fill:"currentColor",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"})}),value:"freedraw",key:[k.tW.X,k.tW.P.toUpperCase()]},{icon:(0,P.jsx)("svg",{viewBox:"0 0 448 512",children:(0,P.jsx)("path",{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"})}),value:"text",key:k.tW.T},{icon:(0,P.jsx)("svg",{viewBox:"0 0 512 512",children:(0,P.jsx)("path",{fill:"currentColor",d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"})}),value:"image",key:null}],bn=n(7288),yn=(n(1292),{cut:[(0,A.uY)("CtrlOrCmd+X")],copy:[(0,A.uY)("CtrlOrCmd+C")],paste:[(0,A.uY)("CtrlOrCmd+V")],copyStyles:[(0,A.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,A.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,A.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,A.uY)("Del")],duplicateSelection:[(0,A.uY)("CtrlOrCmd+D"),(0,A.uY)("Alt+".concat((0,S.t)("helpDialog.drag")))],sendBackward:[(0,A.uY)("CtrlOrCmd+[")],bringForward:[(0,A.uY)("CtrlOrCmd+]")],sendToBack:[k.Um?(0,A.uY)("CtrlOrCmd+Alt+["):(0,A.uY)("CtrlOrCmd+Shift+[")],bringToFront:[k.Um?(0,A.uY)("CtrlOrCmd+Alt+]"):(0,A.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,A.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,A.uY)("CtrlOrCmd+G")],ungroup:[(0,A.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,A.uY)("CtrlOrCmd+'")],zenMode:[(0,A.uY)("Alt+Z")],stats:[(0,A.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,A.uY)("Shift+H")],flipVertical:[(0,A.uY)("Shift+V")],viewMode:[(0,A.uY)("Alt+R")],hyperlink:[(0,A.uY)("CtrlOrCmd+K")],toggleLock:[(0,A.uY)("CtrlOrCmd+Shift+L")]}),xn=function(e){var t=e.options,n=e.onCloseRequest,r=e.top,o=e.left,i=e.actionManager,a=e.appState,l=e.elements;return(0,P.jsx)(bn.J,{onCloseRequest:n,top:r,left:o,fitInViewport:!0,offsetLeft:a.offsetLeft,offsetTop:a.offsetTop,viewportWidth:a.width,viewportHeight:a.height,children:(0,P.jsx)("ul",{className:"context-menu",onContextMenu:function(e){return e.preventDefault()},children:t.map((function(e,t){var r;if("separator"===e)return(0,P.jsx)("hr",{className:"context-menu-option-separator"},t);var o,c,s=e.name,u="";return e.contextItemLabel&&(u="function"==typeof e.contextItemLabel?(0,S.t)(e.contextItemLabel(l,a)):(0,S.t)(e.contextItemLabel)),(0,P.jsx)("li",{"data-testid":s,onClick:n,children:(0,P.jsxs)("button",{className:(0,y.Z)("context-menu-option",{dangerous:"deleteSelectedElements"===s,checkmark:null===(r=e.checked)||void 0===r?void 0:r.call(e,a)}),onClick:function(){return i.executeAction(e,"contextMenu")},children:[(0,P.jsx)("div",{className:"context-menu-option__label",children:u}),(0,P.jsx)("kbd",{className:"context-menu-option__shortcut",children:s?(o=s,c=yn[o],c&&c.length>0?c[0]:""):""})]})},t)}))})})},wn=new WeakMap,kn=function(e){var t,n,r=Array.of();e.options.forEach((function(e){e&&r.push(e)})),r.length&&(0,g.render)((0,P.jsx)(xn,{top:e.top,left:e.left,options:r,onCloseRequest:function(){return t=e.container,void((n=wn.get(t))&&((0,g.unmountComponentAtNode)(n),n.remove(),wn.delete(t)));var t,n},actionManager:e.actionManager,appState:e.appState,elements:e.elements}),(t=e.container,(n=wn.get(t))||(n=document.createElement("div"),t.querySelector(".excalidraw-contextMenuContainer").appendChild(n),wn.set(t,n),n)))},_n=n(8357),En=n(8120);function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function On(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return jn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var In=function(e){var t,n=e.appState,r=e.elements,o=e.renderAction,i=e.activeTool,a=(0,w.Zs)((0,O.Lm)(r),n),l=!1;2===a.length&&((0,L.Xo)(a[0])||(0,L.Xo)(a[1]))&&(l=!0);var c,s=Boolean(n.editingElement),u=vo(),d="rtl"===document.documentElement.getAttribute("dir"),f=(0,w.$b)(i)||a.some((function(e){return(0,w.$b)(e.type)&&!(0,A.Qm)(e.backgroundColor)})),p=(0,w.$b)(i)||a.some((function(e){return(0,w.$b)(e.type)})),h=1===a.length||l,v=(null===(t=a[0])||void 0===t?void 0:t.type)||null,m=On(a);try{for(m.s();!(c=m.n()).done;){if(c.value.type!==v){v=null;break}}}catch(e){m.e(e)}finally{m.f()}return(0,P.jsxs)("div",{className:"panelColumn",children:[((0,En.PD)(i)&&"image"!==i&&"image"!==v||a.some((function(e){return(0,En.PD)(e.type)})))&&o("changeStrokeColor"),p&&o("changeBackgroundColor"),f&&o("changeFillStyle"),((0,w.Zd)(i)||a.some((function(e){return(0,w.Zd)(e.type)})))&&o("changeStrokeWidth"),("freedraw"===i||a.some((function(e){return"freedraw"===e.type})))&&o("changeStrokeShape"),((0,w.M9)(i)||a.some((function(e){return(0,w.M9)(e.type)})))&&(0,P.jsxs)(P.Fragment,{children:[o("changeStrokeStyle"),o("changeSloppiness")]}),((0,w.gP)(i)||a.some((function(e){return(0,w.gP)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeSharpness")}),((0,w.bZ)(i)||a.some((function(e){return(0,w.bZ)(e.type)})))&&(0,P.jsxs)(P.Fragment,{children:[o("changeFontSize"),o("changeFontFamily"),o("changeTextAlign")]}),a.some((function(e){return(0,L.Xo)(e)||(0,L.Xh)(e)}))&&o("changeVerticalAlign"),((0,w.Un)(i)||a.some((function(e){return(0,w.Un)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeArrowhead")}),o("changeOpacity"),(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.layers")}),(0,P.jsxs)("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringToFront"),o("bringForward")]})]}),a.length>1&&!l&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.align")}),(0,P.jsxs)("div",{className:"buttonList",children:[d?(0,P.jsxs)(P.Fragment,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):(0,P.jsxs)(P.Fragment,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),a.length>2&&o("distributeHorizontally"),(0,P.jsxs)("div",{className:"iconRow",children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),a.length>2&&o("distributeVertically")]})]})]}),!s&&a.length>0&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.actions")}),(0,P.jsxs)("div",{className:"buttonList",children:[!u.isMobile&&o("duplicateSelection"),!u.isMobile&&o("deleteSelectedElements"),o("group"),o("ungroup"),h&&o("hyperlink")]})]})]})},Tn=function(e){var t=e.canvas,n=e.activeTool,r=e.setAppState,o=e.onImageAction,i=e.appState;return(0,P.jsx)(P.Fragment,{children:gn.map((function(e,a){var l=e.value,c=e.icon,s=e.key,u=(0,S.t)("toolBar.".concat(l)),d=s&&("string"==typeof s?s:s[0]),f=d?"".concat((0,A.Oo)(d)," ").concat((0,S.t)("helpDialog.or")," ").concat(a+1):"".concat(a+1);return(0,P.jsx)(_.V,{className:"Shape",type:"radio",icon:c,checked:n.type===l,name:"editor-current-shape",title:"".concat((0,A.Oo)(u)," — ").concat(f),keyBindingLabel:"".concat(a+1),"aria-label":(0,A.Oo)(u),"aria-keyshortcuts":f,"data-testid":l,onPointerDown:function(e){var t=e.pointerType;i.penDetected||"pen"!==t||r({penDetected:!0,penMode:!0})},onChange:function(e){var n=e.pointerType;i.activeTool.type!==l&&(0,en.L)("toolbar",l,"ui");var a=(0,A.Om)(i,{type:l});r({activeTool:a,multiElement:null,selectedElementIds:{}}),(0,A.Uk)(t,Cn(Cn({},i),{},{activeTool:a})),"image"===l&&o({pointerType:n})}},l)}))})},Mn=function(e){var t=e.renderAction;e.zoom;return(0,P.jsx)(je,{gap:1,children:(0,P.jsxs)(Oe,{gap:1,align:"center",children:[t("zoomOut"),t("zoomIn"),t("resetZoom")]})})},Ln=function(e){e.appState,e.setAppState;var t=e.actionManager,n=e.showThemeBtn;return(0,P.jsxs)("div",{style:{display:"flex"},children:[t.renderAction("changeViewBackgroundColor"),n&&t.renderAction("toggleTheme")]})},An=(n(778),function(e){var t=e.isCollaborating,n=e.collaboratorCount,r=e.onClick;return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(_.V,{className:(0,y.Z)("CollabButton",{"is-collaborating":t}),onClick:r,icon:E.rC,type:"button",title:(0,S.t)("labels.liveCollaboration"),"aria-label":(0,S.t)("labels.liveCollaboration"),showAriaLabel:vo().isMobile,children:t&&(0,P.jsx)("div",{className:"CollabButton-collaborators",children:n})})})}),Pn=n(2939),Dn=function(e){var t=e.message,n=e.onClose,r=(0,v.useState)(!!t),i=(0,o.Z)(r,2),a=i[0],l=i[1],c=go().container,s=m().useCallback((function(){l(!1),n&&n(),null==c||c.focus()}),[n,c]);return(0,P.jsx)(P.Fragment,{children:a&&(0,P.jsx)(Pn.V,{small:!0,onCloseRequest:s,title:(0,S.t)("errorDialog.title"),children:(0,P.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:t})})})},zn=n(9519),Rn=(n(2205),n(5284)),Zn="filter"in document.createElement("canvas").getContext("2d"),Nn=function(){return(0,P.jsxs)("div",{children:[(0,P.jsx)("h3",{children:(0,S.t)("canvasError.cannotShowPreview")}),(0,P.jsx)("p",{children:(0,P.jsx)("span",{children:(0,S.t)("canvasError.canvasTooBig")})}),(0,P.jsxs)("em",{children:["(",(0,S.t)("canvasError.canvasTooBigTip"),")"]})]})},Bn=function(e,t){(0,g.unmountComponentAtNode)(t),t.innerHTML="",e instanceof HTMLCanvasElement?t.appendChild(e):(0,g.render)((0,P.jsx)(Nn,{}),t)},Hn=function(e){var t,n=e.children,r=e.title,o=e.onClick,i=e.color,a=e.shade,c=void 0===a?6:a;return(0,P.jsx)("button",{className:"ExportDialog-imageExportButton",style:(t={},(0,l.Z)(t,"--button-color",Rn[i][c]),(0,l.Z)(t,"--button-color-darker",Rn[i][c+1]),(0,l.Z)(t,"--button-color-darkest",Rn[i][c+2]),t),title:r,"aria-label":r,onClick:o,children:n})},Wn=function(e){var t=e.elements,n=e.appState,r=e.files,i=e.exportPadding,a=void 0===i?ne.qy:i,l=e.actionManager,c=e.onExportToPng,s=e.onExportToSvg,u=e.onExportToClipboard,d=(0,w.N)(t,n),f=(0,v.useState)(d),p=(0,o.Z)(f,2),h=p[0],m=p[1],g=(0,v.useRef)(null),b=n.exportBackground,y=n.viewBackgroundColor,x=h?(0,w.eD)(t,n,!0):t;return(0,v.useEffect)((function(){m(d)}),[d]),(0,v.useEffect)((function(){var e=g.current;e&&(0,me.NL)(x,n,r,{exportBackground:b,viewBackgroundColor:y,exportPadding:a}).then((function(t){return(0,ge._c)(t).then((function(){Bn(t,e)}))})).catch((function(t){console.error(t),Bn(new zn.l,e)}))}),[n,r,x,b,a,y]),(0,P.jsxs)("div",{className:"ExportDialog",children:[(0,P.jsx)("div",{className:"ExportDialog__preview",ref:g}),Zn&&l.renderAction("exportWithDarkMode"),(0,P.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},children:(0,P.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[l.renderAction("changeExportBackground"),d&&(0,P.jsx)(Ee,{checked:h,onChange:function(e){return m(e)},children:(0,S.t)("labels.onlySelected")}),l.renderAction("changeExportEmbedScene")]})}),(0,P.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,P.jsx)(Oe,{gap:2,children:l.renderAction("changeExportScale")}),(0,P.jsx)("p",{style:{marginLeft:"1em",userSelect:"none"},children:(0,S.t)("buttons.scale")})]}),(0,P.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!be.kr&&l.renderAction("changeProjectName")}),(0,P.jsxs)(Oe,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,P.jsx)(Hn,{color:"indigo",title:(0,S.t)("buttons.exportToPng"),"aria-label":(0,S.t)("buttons.exportToPng"),onClick:function(){return c(x)},children:"PNG"}),(0,P.jsx)(Hn,{color:"red",title:(0,S.t)("buttons.exportToSvg"),"aria-label":(0,S.t)("buttons.exportToSvg"),onClick:function(){return s(x)},children:"SVG"}),ve.vt&&(0,P.jsx)(Hn,{title:(0,S.t)("buttons.copyPngToClipboard"),onClick:function(){return u(x)},color:"gray",shade:7,children:E.BR})]})]})},Un=function(e){var t=e.elements,n=e.appState,r=e.files,i=e.exportPadding,a=void 0===i?ne.qy:i,l=e.actionManager,c=e.onExportToPng,s=e.onExportToSvg,u=e.onExportToClipboard,d=(0,v.useState)(!1),f=(0,o.Z)(d,2),p=f[0],h=f[1],g=m().useCallback((function(){h(!1)}),[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_.V,{onClick:function(){h(!0)},"data-testid":"image-export-button",icon:E.Rb,type:"button","aria-label":(0,S.t)("buttons.exportImage"),showAriaLabel:vo().isMobile,title:(0,S.t)("buttons.exportImage")}),p&&(0,P.jsx)(Pn.V,{onCloseRequest:g,title:(0,S.t)("buttons.exportImage"),children:(0,P.jsx)(Wn,{elements:t,appState:n,files:r,exportPadding:a,actionManager:l,onExportToPng:c,onExportToSvg:s,onExportToClipboard:u,onCloseRequest:g})})]})},Fn=(n(1310),function(e){var t=e.children,n=e.side,r=e.className;return(0,P.jsx)("div",{className:(0,y.Z)("FixedSideContainer","FixedSideContainer_side_".concat(n),r),children:t})}),Kn=(n(7096),function(e){var t=function(e){var t=e.appState,n=e.elements,r=e.isMobile,o=t.activeTool,i=t.isResizing,a=t.isRotating,l=t.lastPointerDownWith,c=null!==t.multiElement;if(t.isLibraryOpen)return null;if((0,rn.EN)(t))return(0,S.t)("hints.eraserRevert");if("arrow"===o.type||"line"===o.type)return c?(0,S.t)("hints.linearElementMulti"):(0,S.t)("hints.linearElement");if("freedraw"===o.type)return(0,S.t)("hints.freeDraw");if("text"===o.type)return(0,S.t)("hints.text");if("image"===t.activeTool.type&&t.pendingImageElementId)return(0,S.t)("hints.placeImage");var s=(0,w.eD)(n,t);if(i&&"mouse"===l&&1===s.length){var u=s[0];return(0,L.bt)(u)&&2===u.points.length?(0,S.t)("hints.lockAngle"):(0,L.pC)(u)?(0,S.t)("hints.resizeImage"):(0,S.t)("hints.resize")}if(a&&"mouse"===l)return(0,S.t)("hints.rotate");if(1===s.length&&(0,L.iB)(s[0]))return(0,S.t)("hints.text_selected");if(t.editingElement&&(0,L.iB)(t.editingElement))return(0,S.t)("hints.text_editing");if("selection"===o.type){var d;if("selection"===(null===(d=t.draggingElement)||void 0===d?void 0:d.type)&&!t.editingElement&&!t.editingLinearElement)return(0,S.t)("hints.deepBoxSelect");if(!s.length&&!r)return(0,S.t)("hints.canvasPanning")}if(1===s.length){if((0,L.bt)(s[0]))return t.editingLinearElement?t.editingLinearElement.selectedPointsIndices?(0,S.t)("hints.lineEditor_pointSelected"):(0,S.t)("hints.lineEditor_nothingSelected"):(0,S.t)("hints.lineEditor_info");if((0,L.mG)(s[0]))return(0,S.t)("hints.bindTextToElement")}return null}({appState:e.appState,elements:e.elements,isMobile:e.isMobile});return t?(t=(0,A.uY)(t),(0,P.jsx)("div",{className:"HintViewer",children:(0,P.jsx)("span",{children:t})})):null}),Vn=n(1226),Yn=n(5440),Gn={CHECKED:(0,P.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)("path",{d:"M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"})}),UNCHECKED:(0,P.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:(0,P.jsx)("path",{d:"M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"})})},Xn=function(e){return(0,P.jsxs)("label",{className:(0,y.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title," — Q"),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:e.checked?Gn.CHECKED:Gn.UNCHECKED})]})},qn=["heading","children"];function $n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$n(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qn=function(e){var t=e.heading,n=e.children,r=(0,_n.Z)(e,qn),o=go().id,i=(0,P.jsx)("h2",{className:"visually-hidden",id:"".concat(o,"-").concat(t,"-title"),children:(0,S.t)("headings.".concat(t))});return(0,P.jsx)("section",Jn(Jn({},r),{},{"aria-labelledby":"".concat(o,"-").concat(t,"-title"),children:"function"==typeof n?n(i):(0,P.jsxs)(P.Fragment,{children:[i,n]})}))},er=n(756),tr=(n(580),function(e){var t=e.className,n=e.mobile,r=e.collaborators,i=e.actionManager,a=new Map;r.forEach((function(e,t){a.set(e.id||t,e)}));var l=a.size>0&&Array.from(a).filter((function(e){var t=(0,o.Z)(e,2),n=(t[0],t[1]);return 0!==Object.keys(n).length})).map((function(e){var t=(0,o.Z)(e,2),r=t[0],a=t[1],l=i.renderAction("goToCollaborator",[r,a]);return n?(0,P.jsx)(pe.u,{label:a.username||"Unknown user",children:l},r):(0,P.jsx)(m().Fragment,{children:l},r)}));return(0,P.jsx)("div",{className:(0,y.Z)("UserList",t,{UserList_mobile:n}),children:l})}),nr=(0,P.jsx)("svg",{viewBox:"0 0 576 512",children:(0,P.jsx)("path",{fill:"currentColor",d:"M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"})}),rr=function(e){var t=e.appState,n=e.setAppState,r=e.isMobile,o=vo();return(0,P.jsxs)("label",{className:(0,y.Z)("ToolIcon ToolIcon_type_floating ToolIcon__library","ToolIcon_size_medium",{"is-mobile":r}),title:"".concat((0,A.Oo)((0,S.t)("toolBar.library"))," — 0"),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:"editor-library",onChange:function(e){var t;null===(t=document.querySelector(".layer-ui__wrapper"))||void 0===t||t.classList.remove("animate");var r=e.target.checked;n({isLibraryOpen:r}),r&&(0,en.L)("library","toggleLibrary (open)","toolbar (".concat(o.isMobile?"mobile":"desktop",")"))},checked:t.isLibraryOpen,"aria-label":(0,A.Oo)((0,S.t)("toolBar.library")),"aria-keyshortcuts":"0"}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:nr})]})},or="medium",ir={CHECKED:(0,P.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",children:[(0,P.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,P.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,P.jsx)("path",{d:"M125 145h70v50h-70"}),(0,P.jsx)("path",{d:"M190 145v-30l-10-20h-40l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),UNCHECKED:(0,P.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:[(0,P.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,P.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,P.jsx)("path",{d:"M125 145h70v50h-70"}),(0,P.jsx)("path",{d:"M145 145v-30l-10-20H95l-10 20v30h15v-30l5-5h20l5 5v30h15"})]})},ar=function(e){return e.penDetected?(0,P.jsxs)("label",{className:(0,y.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat(or),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:e.checked?ir.CHECKED:ir.UNCHECKED})]}):e.isMobile?null:(0,P.jsx)("label",{className:(0,y.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat(or),{"is-mobile":e.isMobile}),children:(0,P.jsx)("div",{className:"ToolIcon__icon ToolIcon__hidden"})})};function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var cr=function(e){var t,n=e.appState,r=e.elements,o=e.libraryMenu,i=e.actionManager,a=e.renderJSONExportDialog,c=e.renderImageExportDialog,s=e.setAppState,u=e.onCollabButtonClick,d=e.onLockToggle,f=e.onPenModeToggle,p=e.canvas,h=e.isCollaborating,v=e.renderCustomFooter,m=e.showThemeBtn,g=e.onImageAction,b=e.renderTopRightUI,y=e.renderStats;return(0,P.jsxs)(P.Fragment,{children:[!n.viewModeEnabled&&(0,P.jsxs)(Fn,{side:"top",className:"App-top-bar",children:[(0,P.jsx)(Qn,{heading:"shapes",children:function(e){return(0,P.jsxs)(je,{gap:4,align:"center",children:[(0,P.jsxs)(Oe,{gap:1,className:"App-toolbar-container",children:[(0,P.jsxs)(Vn.W,{padding:1,className:"App-toolbar",children:[e,(0,P.jsx)(Oe,{gap:1,children:(0,P.jsx)(Tn,{appState:n,canvas:p,activeTool:n.activeTool,setAppState:s,onImageAction:function(e){var t=e.pointerType;g({insertOnCanvasDirectly:"mouse"!==t})}})})]}),b&&b(!0,n),(0,P.jsx)(Xn,{checked:n.activeTool.locked,onChange:d,title:(0,S.t)("toolBar.lock"),isMobile:!0}),(0,P.jsx)(rr,{appState:n,setAppState:s,isMobile:!0}),(0,P.jsx)(ar,{checked:n.penMode,onChange:f,title:(0,S.t)("toolBar.penMode"),isMobile:!0,penDetected:n.penDetected})]}),o]})}}),(0,P.jsx)(Kn,{appState:n,elements:r,isMobile:!0})]}),y(),(0,P.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:er.nn+2*er.WM,marginLeft:er.nn+2*er.WM,marginRight:er.nn+2*er.WM},children:(0,P.jsxs)(Vn.W,{padding:0,children:["canvas"===n.openMenu?(0,P.jsx)(Qn,{className:"App-mobile-menu",heading:"canvasActions",children:(0,P.jsx)("div",{className:"panelColumn",children:(0,P.jsxs)(je,{gap:4,children:[n.viewModeEnabled?(0,P.jsxs)(P.Fragment,{children:[a(),c()]}):(0,P.jsxs)(P.Fragment,{children:[i.renderAction("clearCanvas"),i.renderAction("loadScene"),a(),c(),u&&(0,P.jsx)(An,{isCollaborating:h,collaboratorCount:n.collaborators.size,onClick:u}),(0,P.jsx)(Ln,{actionManager:i,appState:n,setAppState:s,showThemeBtn:m})]}),null==v?void 0:v(!0,n),n.collaborators.size>0&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.collaborators")}),(0,P.jsx)(tr,{mobile:!0,collaborators:n.collaborators,actionManager:i})]})]})})}):"shape"===n.openMenu&&!n.viewModeEnabled&&(0,O.RT)(n,r)?(0,P.jsx)(Qn,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,P.jsx)(In,{appState:n,elements:r,renderAction:i.renderAction,activeTool:n.activeTool.type})}):null,(0,P.jsxs)("footer",{className:"App-toolbar",children:[(t=!n.viewModeEnabled&&!n.editingElement&&0===(0,w.eD)(r,n).length,n.viewModeEnabled?(0,P.jsx)("div",{className:"App-toolbar-content",children:i.renderAction("toggleCanvasMenu")}):(0,P.jsxs)("div",{className:"App-toolbar-content",children:[i.renderAction("toggleCanvasMenu"),i.renderAction("toggleEditMenu"),i.renderAction("undo"),i.renderAction("redo"),t&&i.renderAction("eraser"),i.renderAction(n.multiElement?"finalize":"duplicateSelection"),i.renderAction("deleteSelectedElements")]})),n.scrolledOutside&&!n.openMenu&&!n.isLibraryOpen&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,w.W)(r,n,p)))},children:(0,S.t)("buttons.scrollBackToContent")})]})]})})]})},sr=n(5674),ur=(n(8051),function(e){var t=(0,v.useRef)(null),n=(0,v.useState)(null),r=(0,o.Z)(n,2),i=r[0],l=r[1];return(0,v.useLayoutEffect)((function(){if(e.spreadsheet){var n,r=(0,sr.ps)(e.chartType,e.spreadsheet,0,0);l(r);var o=t.current;return(0,a.Z)(h.default.mark((function t(){return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,me.$D)(r,{exportBackground:!1,viewBackgroundColor:Rn.white},null);case 2:n=t.sent,o.replaceChildren(),o.appendChild(n),e.selected&&o.parentNode.focus();case 6:case"end":return t.stop()}}),t)})))(),function(){o.replaceChildren()}}}),[e.spreadsheet,e.chartType,e.selected]),(0,P.jsx)("button",{className:"ChartPreview",onClick:function(){i&&e.onClick(e.chartType,i)},children:(0,P.jsx)("div",{ref:t})})}),dr=function(e){var t=e.setAppState,n=e.appState,r=e.onClose,o=e.onInsertChart,i=m().useCallback((function(){r&&r()}),[r]),a=function(e,n){o(n),(0,en.L)("magic","chart",e),t({currentChartType:e,pasteDialog:{shown:!1,data:null}})};return(0,P.jsx)(Pn.V,{small:!0,onCloseRequest:i,title:(0,S.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,P.jsxs)("div",{className:"container",children:[(0,P.jsx)(ur,{chartType:"bar",spreadsheet:n.pasteDialog.data,selected:"bar"===n.currentChartType,onClick:a}),(0,P.jsx)(ur,{chartType:"line",spreadsheet:n.pasteDialog.data,selected:"line"===n.currentChartType,onClick:a})]})})};n(3922);function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var pr=function(){return(0,P.jsxs)("div",{className:"HelpDialog--header",children:[(0,P.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("helpDialog.documentation")}),(0,P.jsx)("a",{className:"HelpDialog--btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("helpDialog.blog")}),(0,P.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("helpDialog.github")})]})},hr=function(e){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("h3",{children:e.title}),e.children]})},vr=function(e){return(0,P.jsx)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},children:e.children})},mr=function(e){return(0,P.jsx)("div",{style:{width:"49%"},children:e.children})},gr=function(e){return(0,P.jsxs)("div",{className:"HelpDialog--island",children:[(0,P.jsx)("h3",{className:"HelpDialog--island-title",children:e.caption}),e.children]})},br=function(e){return(0,P.jsx)("div",{className:"HelpDialog--shortcut",children:(0,P.jsxs)("div",{style:{display:"flex",margin:"0",padding:"4px 8px",alignItems:"center"},children:[(0,P.jsx)("div",{style:{lineHeight:1.4},children:e.label}),(0,P.jsx)("div",{style:{display:"flex",flex:"0 0 auto",justifyContent:"flex-end",marginInlineStart:"auto",minWidth:"30%"},children:e.shortcuts.map((function(t,n){return(0,P.jsxs)(m().Fragment,{children:[(0,P.jsx)(yr,{children:t}),e.isOr&&n!==e.shortcuts.length-1&&(0,S.t)("helpDialog.or")]},n)}))})]})})};br.defaultProps={isOr:!0};var yr=function(e){return(0,P.jsx)("kbd",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:"HelpDialog--key"},e))},xr=function(e){var t=e.onClose,n=m().useCallback((function(){t&&t()}),[t]);return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(Pn.V,{onCloseRequest:n,title:(0,S.t)("helpDialog.title"),className:"HelpDialog",children:[(0,P.jsx)(pr,{}),(0,P.jsx)(hr,{title:(0,S.t)("helpDialog.shortcuts"),children:(0,P.jsxs)(vr,{children:[(0,P.jsxs)(mr,{children:[(0,P.jsxs)(gr,{caption:(0,S.t)("helpDialog.tools"),children:[(0,P.jsx)(br,{label:(0,S.t)("toolBar.selection"),shortcuts:["V","1"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.rectangle"),shortcuts:["R","2"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.diamond"),shortcuts:["D","3"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.ellipse"),shortcuts:["O","4"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.arrow"),shortcuts:["A","5"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.line"),shortcuts:["P","6"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.freedraw"),shortcuts:["Shift + P","X","7"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.text"),shortcuts:["T","8"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.image"),shortcuts:["9"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.library"),shortcuts:["0"]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.eraser"),shortcuts:[(0,A.uY)("E")]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.editSelectedShape"),shortcuts:[(0,A.uY)("Enter"),(0,S.t)("helpDialog.doubleClick")]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.textNewLine"),shortcuts:[(0,A.uY)("Enter"),(0,A.uY)("Shift+Enter")]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.textFinish"),shortcuts:[(0,A.uY)("Esc"),(0,A.uY)("CtrlOrCmd+Enter")]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.curvedLine"),shortcuts:["L",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.lock"),shortcuts:["Q"]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.preventBinding"),shortcuts:[(0,A.uY)("CtrlOrCmd")]}),(0,P.jsx)(br,{label:(0,S.t)("toolBar.link"),shortcuts:[(0,A.uY)("CtrlOrCmd+K")]})]}),(0,P.jsxs)(gr,{caption:(0,S.t)("helpDialog.view"),children:[(0,P.jsx)(br,{label:(0,S.t)("buttons.zoomIn"),shortcuts:[(0,A.uY)("CtrlOrCmd++")]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.zoomOut"),shortcuts:[(0,A.uY)("CtrlOrCmd+-")]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.resetZoom"),shortcuts:[(0,A.uY)("CtrlOrCmd+0")]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.zenMode"),shortcuts:[(0,A.uY)("Alt+Z")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.showGrid"),shortcuts:[(0,A.uY)("CtrlOrCmd+'")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.viewMode"),shortcuts:[(0,A.uY)("Alt+R")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.toggleTheme"),shortcuts:[(0,A.uY)("Alt+Shift+D")]}),(0,P.jsx)(br,{label:(0,S.t)("stats.title"),shortcuts:[(0,A.uY)("Alt+/")]})]})]}),(0,P.jsx)(mr,{children:(0,P.jsxs)(gr,{caption:(0,S.t)("helpDialog.editor"),children:[(0,P.jsx)(br,{label:(0,S.t)("labels.selectAll"),shortcuts:[(0,A.uY)("CtrlOrCmd+A")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.multiSelect"),shortcuts:[(0,A.uY)("Shift+".concat((0,S.t)("helpDialog.click")))]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.deepSelect"),shortcuts:[(0,A.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.click")))]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,A.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.drag")))]}),(0,P.jsx)(br,{label:(0,S.t)("labels.moveCanvas"),shortcuts:[(0,A.uY)("Space+".concat((0,S.t)("helpDialog.drag"))),(0,A.uY)("Wheel+".concat((0,S.t)("helpDialog.drag")))],isOr:!0}),(0,P.jsx)(br,{label:(0,S.t)("labels.cut"),shortcuts:[(0,A.uY)("CtrlOrCmd+X")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.copy"),shortcuts:[(0,A.uY)("CtrlOrCmd+C")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.paste"),shortcuts:[(0,A.uY)("CtrlOrCmd+V")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.copyAsPng"),shortcuts:[(0,A.uY)("Shift+Alt+C")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.copyStyles"),shortcuts:[(0,A.uY)("CtrlOrCmd+Alt+C")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.pasteStyles"),shortcuts:[(0,A.uY)("CtrlOrCmd+Alt+V")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.delete"),shortcuts:[(0,A.uY)("Del")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.sendToBack"),shortcuts:[k.Um?(0,A.uY)("CtrlOrCmd+Alt+["):(0,A.uY)("CtrlOrCmd+Shift+[")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.bringToFront"),shortcuts:[k.Um?(0,A.uY)("CtrlOrCmd+Alt+]"):(0,A.uY)("CtrlOrCmd+Shift+]")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.sendBackward"),shortcuts:[(0,A.uY)("CtrlOrCmd+[")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.bringForward"),shortcuts:[(0,A.uY)("CtrlOrCmd+]")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.alignTop"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+Up")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.alignBottom"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+Down")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.alignLeft"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+Left")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.alignRight"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+Right")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.duplicateSelection"),shortcuts:[(0,A.uY)("CtrlOrCmd+D"),(0,A.uY)("Alt+".concat((0,S.t)("helpDialog.drag")))]}),(0,P.jsx)(br,{label:(0,S.t)("helpDialog.toggleElementLock"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+L")]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.undo"),shortcuts:[(0,A.uY)("CtrlOrCmd+Z")]}),(0,P.jsx)(br,{label:(0,S.t)("buttons.redo"),shortcuts:k.ED?[(0,A.uY)("CtrlOrCmd+Y"),(0,A.uY)("CtrlOrCmd+Shift+Z")]:[(0,A.uY)("CtrlOrCmd+Shift+Z")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.group"),shortcuts:[(0,A.uY)("CtrlOrCmd+G")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.ungroup"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+G")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.flipHorizontal"),shortcuts:[(0,A.uY)("Shift+H")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.flipVertical"),shortcuts:[(0,A.uY)("Shift+V")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.showStroke"),shortcuts:[(0,A.uY)("S")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.showBackground"),shortcuts:[(0,A.uY)("G")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.decreaseFontSize"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+<")]}),(0,P.jsx)(br,{label:(0,S.t)("labels.increaseFontSize"),shortcuts:[(0,A.uY)("CtrlOrCmd+Shift+>")]})]})})]})})]})})},wr=(n(5080),function(e){var t,n=e.children,r=e.color;return(0,P.jsx)("div",{className:"Card",style:(t={},(0,l.Z)(t,"--card-color","primary"===r?"var(--color-primary)":Rn[r][7]),(0,l.Z)(t,"--card-color-darker","primary"===r?"var(--color-primary-darker)":Rn[r][8]),(0,l.Z)(t,"--card-color-darkest","primary"===r?"var(--color-primary-darkest)":Rn[r][9]),t),children:n})}),kr=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=i.onExportToBackend;return(0,P.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,P.jsxs)("div",{className:"ExportDialog-cards",children:[i.saveFileToDisk&&(0,P.jsxs)(wr,{color:"lime",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.TP}),(0,P.jsx)("h2",{children:(0,S.t)("exportDialog.disk_title")}),(0,P.jsxs)("div",{className:"Card-details",children:[(0,S.t)("exportDialog.disk_details"),!be.kr&&o.renderAction("changeProjectName")]}),(0,P.jsx)(_.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.disk_button"),"aria-label":(0,S.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){o.executeAction(De,"ui")}})]}),l&&(0,P.jsxs)(wr,{color:"pink",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.p4}),(0,P.jsx)("h2",{children:(0,S.t)("exportDialog.link_title")}),(0,P.jsx)("div",{className:"Card-details",children:(0,S.t)("exportDialog.link_details")}),(0,P.jsx)(_.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.link_button"),"aria-label":(0,S.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){l(t,n,r,a),(0,en.L)("export","link","ui (".concat((0,A.$h)(),")"))}})]}),i.renderCustomUI&&i.renderCustomUI(t,n,r,a)]})})},_r=function(e){var t=e.elements,n=e.appState,r=e.files,i=e.actionManager,a=e.exportOpts,l=e.canvas,c=(0,v.useState)(!1),s=(0,o.Z)(c,2),u=s[0],d=s[1],f=m().useCallback((function(){d(!1)}),[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_.V,{onClick:function(){d(!0)},"data-testid":"json-export-button",icon:E.WD,type:"button","aria-label":(0,S.t)("buttons.export"),showAriaLabel:vo().isMobile,title:(0,S.t)("buttons.export")}),u&&(0,P.jsx)(Pn.V,{onCloseRequest:f,title:(0,S.t)("buttons.export"),children:(0,P.jsx)(kr,{elements:t,appState:n,files:r,actionManager:i,onCloseRequest:f,exportOpts:a,canvas:l})})]})},Er=n(3024);n(9295),n(9781);function Sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Or=function(e){var t=e.libItem,n=e.appState,r=e.index,o=e.onChange,i=e.onRemove,l=(0,v.useRef)(null),c=(0,v.useRef)(null);return(0,v.useEffect)((function(){var e=l.current;e&&(0,a.Z)(h.default.mark((function r(){var o;return h.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Er.$D)({elements:t.elements,appState:Cr(Cr({},n),{},{viewBackgroundColor:Rn.white,exportBackground:!0}),files:null});case 2:o=r.sent,e.innerHTML=o.outerHTML;case 4:case"end":return r.stop()}}),r)})))()}),[t.elements,n]),(0,P.jsxs)("div",{className:"single-library-item",children:["published"===t.status&&(0,P.jsx)("span",{className:"single-library-item-status",children:(0,S.t)("labels.statusPublished")}),(0,P.jsx)("div",{ref:l,className:"single-library-item__svg"}),(0,P.jsx)(_.V,{"aria-label":(0,S.t)("buttons.remove"),type:"button",icon:E.xv,className:"single-library-item--remove",onClick:i.bind(null,t.id),title:(0,S.t)("buttons.remove")}),(0,P.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0.3rem",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,P.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,P.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,P.jsx)("span",{style:{fontWeight:500,color:Rn.gray[6]},children:(0,S.t)("publishDialog.itemName")}),(0,P.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,P.jsx)("input",{type:"text",ref:c,style:{width:"80%",padding:"0.2rem"},defaultValue:t.name,placeholder:"Item name",onChange:function(e){o(e.target.value,r)}})]}),(0,P.jsx)("span",{className:"error",children:t.error})]})]})};function jr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Lr="publish-library-data",Ar=function(){var e=(0,a.Z)(h.default.mark((function e(t){var n,r,i,a,l,c,s,u,d,f,p,v,m,g,b,y,x;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=6,r=128,i=Math.round(r/16),a=Math.max(Math.round(r/64),2),l=(0,A.yo)(t,n),(c=document.createElement("canvas")).width=l[0].length*r+(l[0].length+1)*(2*i)-2*i,c.height=l.length*r+(l.length+1)*(2*i)-2*i,(s=c.getContext("2d")).fillStyle=Rn.white,s.fillRect(0,0,c.width,c.height),u=Tr(t.entries()),e.prev=12,u.s();case 14:if((d=u.n()).done){e.next=28;break}return f=(0,o.Z)(d.value,2),p=f[0],v=f[1],e.next=18,(0,Er.NL)({elements:v.elements,files:null,maxWidthOrHeight:r});case 18:m=e.sent,g=m.width,b=m.height,y=Math.floor(p/n)*(r+2*i),x=p%n*(r+2*i),s.drawImage(m,x+(r-g)/2+i,y+(r-b)/2+i),s.lineWidth=a,s.strokeStyle=Rn.gray[4],s.strokeRect(x+i/2,y+i/2,r+i,r+i);case 26:e.next=14;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(12),u.e(e.t0);case 33:return e.prev=33,u.f(),e.finish(33);case 36:return e.t1=ge.Tu,e.t2=File,e.next=40,(0,ge._c)(c);case 40:return e.t3=e.sent,e.t4=[e.t3],e.t5={type:ne.LO.png},e.t6=new e.t2(e.t4,"preview",e.t5),e.t7={outputType:ne.LO.jpg,maxWidthOrHeight:5e3},e.next=47,(0,e.t1)(e.t6,e.t7);case 47:return e.abrupt("return",e.sent);case 48:case"end":return e.stop()}}),e,null,[[12,30,33,36]])})));return function(t){return e.apply(this,arguments)}}(),Pr=function(e){var t=e.onClose,n=e.libraryItems,r=e.appState,i=e.onSuccess,c=e.onError,s=e.updateItemsInStorage,u=e.onRemove,d=(0,v.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),f=(0,o.Z)(d,2),p=f[0],m=f[1],g=(0,v.useState)(!1),b=(0,o.Z)(g,2),y=b[0],x=b[1];(0,v.useEffect)((function(){var e=function(){try{var e=localStorage.getItem(Lr);if(e)return JSON.parse(e)}catch(e){console.error(e)}return null}();e&&m(e)}),[]);var w=(0,v.useState)(n.slice()),k=(0,o.Z)(w,2),E=k[0],C=k[1];(0,v.useEffect)((function(){C(n.slice())}),[n]);var O,j=function(e){m(Ir(Ir({},p),{},(0,l.Z)({},e.target.name,e.target.value)))},I=function(){var e=(0,a.Z)(h.default.mark((function e(t){var n,r,o,a,l,s,u;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),x(!0),n=[],r=!1,E.forEach((function(e){var t="";e.name||(t=(0,S.t)("publishDialog.errors.required"),r=!0),n.push(Ir(Ir({},e),{},{error:t}))})),!r){e.next=9;break}return C(n),x(!1),e.abrupt("return");case 9:return e.next=11,Ar(E);case 11:o=e.sent,a={type:ne.r8.excalidrawLibrary,version:ne.Kr.excalidrawLibrary,source:ne.pb,libraryItems:E},l=JSON.stringify(a,null,2),s=new Blob([l],{type:"application/json"}),(u=new FormData).append("excalidrawLib",s),u.append("previewImage",o),u.append("previewImageType",o.type),u.append("title",p.name),u.append("authorName",p.authorName),u.append("githubHandle",p.githubHandle),u.append("name",p.name),u.append("description",p.description),u.append("twitterHandle",p.twitterHandle),u.append("website",p.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:u}).then((function(e){return e.ok?e.json().then((function(e){var t=e.url;localStorage.removeItem(Lr),i({url:t,authorName:p.authorName,items:E})})):e.json().catch((function(){throw new Error(e.statusText||"something went wrong")})).then((function(t){throw new Error(t.message||e.statusText||"something went wrong")}))}),(function(e){console.error(e),c(e),x(!1)})).catch((function(e){console.error(e),c(e),x(!1)}));case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=(0,v.useCallback)((function(){s(E),function(e){try{localStorage.setItem(Lr,JSON.stringify(e))}catch(e){console.error(e)}}(p),t()}),[E,t,s,p]),M=!!n.length,L=n.some((function(e){return"published"===e.status}));return(0,P.jsx)(Pn.V,{onCloseRequest:T,title:(0,S.t)("publishDialog.title"),className:"publish-library",children:M?(0,P.jsxs)("form",{onSubmit:I,children:[(0,P.jsxs)("div",{className:"publish-library-note",children:[(0,S.t)("publishDialog.noteDescription.pre"),(0,P.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("publishDialog.noteDescription.link")})," ",(0,S.t)("publishDialog.noteDescription.post")]}),(0,P.jsxs)("span",{className:"publish-library-note",children:[(0,S.t)("publishDialog.noteGuidelines.pre"),(0,P.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("publishDialog.noteGuidelines.link")}),(0,S.t)("publishDialog.noteGuidelines.post")]}),(0,P.jsx)("div",{className:"publish-library-note",children:(0,S.t)("publishDialog.noteItems")}),L&&(0,P.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,S.t)("publishDialog.republishWarning")}),(O=[],E.forEach((function(e,t){O.push((0,P.jsx)("div",{className:"single-library-item-wrapper",children:(0,P.jsx)(Or,{libItem:e,appState:r,index:t,onChange:function(e,t){var n=E.slice();n[t].name=e,C(n)},onRemove:u})},t))})),(0,P.jsx)("div",{className:"selected-library-items",children:O})),(0,P.jsxs)("div",{className:"publish-library__fields",children:[(0,P.jsxs)("label",{children:[(0,P.jsxs)("div",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.libraryName")}),(0,P.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,P.jsx)("input",{type:"text",name:"name",required:!0,value:p.name,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.libraryName")})]}),(0,P.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,P.jsxs)("div",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.libraryDesc")}),(0,P.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,P.jsx)("textarea",{name:"description",rows:4,required:!0,value:p.description,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.libraryDesc")})]}),(0,P.jsxs)("label",{children:[(0,P.jsxs)("div",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.authorName")}),(0,P.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,P.jsx)("input",{type:"text",name:"authorName",required:!0,value:p.authorName,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.authorName")})]}),(0,P.jsxs)("label",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.githubUsername")}),(0,P.jsx)("input",{type:"text",name:"githubHandle",value:p.githubHandle,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.githubHandle")})]}),(0,P.jsxs)("label",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.twitterUsername")}),(0,P.jsx)("input",{type:"text",name:"twitterHandle",value:p.twitterHandle,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.twitterHandle")})]}),(0,P.jsxs)("label",{children:[(0,P.jsx)("span",{children:(0,S.t)("publishDialog.website")}),(0,P.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,S.t)("publishDialog.errors.website"),value:p.website,onChange:j,placeholder:(0,S.t)("publishDialog.placeholder.website")})]}),(0,P.jsxs)("span",{className:"publish-library-note",children:[(0,S.t)("publishDialog.noteLicense.pre"),(0,P.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("publishDialog.noteLicense.link")}),(0,S.t)("publishDialog.noteLicense.post")]})]}),(0,P.jsxs)("div",{className:"publish-library__buttons",children:[(0,P.jsx)(_.V,{type:"button",title:(0,S.t)("buttons.cancel"),"aria-label":(0,S.t)("buttons.cancel"),label:(0,S.t)("buttons.cancel"),onClick:T,"data-testid":"cancel-clear-canvas-button",className:"publish-library__buttons--cancel"}),(0,P.jsx)(_.V,{type:"submit",title:(0,S.t)("buttons.submit"),"aria-label":(0,S.t)("buttons.submit"),label:(0,S.t)("buttons.submit"),className:"publish-library__buttons--confirm",isLoading:y})]})]}):(0,P.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,S.t)("publishDialog.atleastOneLibItem")})})},Dr=(n(4406),n(6963)),zr=n(4981),Rr=(n(694),(0,P.jsx)("svg",{viewBox:"0 0 1792 1792",children:(0,P.jsx)("path",{d:"M1600 736v192c0 26.667-9.33 49.333-28 68-18.67 18.67-41.33 28-68 28h-416v416c0 26.67-9.33 49.33-28 68s-41.33 28-68 28H800c-26.667 0-49.333-9.33-68-28s-28-41.33-28-68v-416H288c-26.667 0-49.333-9.33-68-28-18.667-18.667-28-41.333-28-68V736c0-26.667 9.333-49.333 28-68s41.333-28 68-28h416V224c0-26.667 9.333-49.333 28-68s41.333-28 68-28h192c26.67 0 49.33 9.333 68 28s28 41.333 28 68v416h416c26.67 0 49.33 9.333 68 28s28 41.333 28 68Z",style:{stroke:"#fff",strokeWidth:140},transform:"translate(0 64)"})})),Zr=function(e){var t=e.id,n=e.elements,r=e.files,i=e.isPending,l=e.onClick,c=e.selected,s=e.onToggle,u=e.onDrag,d=(0,v.useRef)(null);(0,v.useEffect)((function(){var e=d.current;if(e)return(0,a.Z)(h.default.mark((function t(){var o;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,me.$D)(n,{exportBackground:!1,viewBackgroundColor:Rn.white},r);case 4:o=t.sent,e.innerHTML=o.outerHTML;case 6:case"end":return t.stop()}}),t)})))(),function(){e.innerHTML=""}}),[n,r]);var f=(0,v.useState)(!1),p=(0,o.Z)(f,2),m=p[0],g=p[1],b=vo().isMobile,x=i&&(0,P.jsx)("div",{className:"library-unit__adder",children:Rr});return(0,P.jsxs)("div",{className:(0,y.Z)("library-unit",{"library-unit__active":n,"library-unit--hover":n&&m,"library-unit--selected":c}),onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},children:[(0,P.jsx)("div",{className:(0,y.Z)("library-unit__dragger",{"library-unit__pulse":!!i}),ref:d,draggable:!!n,onClick:n||i?function(e){t&&e.shiftKey?s(t,e):l()}:void 0,onDragStart:function(e){t?(g(!1),u(t,e)):e.preventDefault()}}),x,t&&n&&(m||b||c)&&(0,P.jsx)(Ee,{checked:c,onChange:function(e,n){return s(t,n)},className:"library-unit__checkbox"})]})},Nr=(n(6043),n(9101)),Br=(n(47),(0,P.jsx)("svg",{viewBox:"0 0 24 24",fill:"#ffffff",children:(0,P.jsx)("path",{d:"M19 22H5a3 3 0 01-3-3V5a3 3 0 013-3h14a3 3 0 013 3v14a3 3 0 01-3 3zm0-18h-9v16h9a1.01 1.01 0 001-1V5a1.01 1.01 0 00-1-1z"})})),Hr=function(e){return(0,P.jsxs)(pe.u,{label:(0,S.t)("labels.sidebarLock"),children:[(0,P.jsxs)("label",{className:(0,y.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium")),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:e.onChange,checked:e.checked,"aria-label":(0,S.t)("labels.sidebarLock")})," ",(0,P.jsx)("div",{className:"ToolIcon__icon side_lock_icon",tabIndex:0,children:Br})," "]})," "]})},Wr=function(e){var t,n,r,l=e.isLoading,c=e.libraryItems,s=e.onRemoveFromLibrary,u=e.onAddToLibrary,d=e.onInsertLibraryItems,f=e.pendingElements,p=e.theme,m=e.setAppState,g=e.appState,b=e.libraryReturnUrl,y=e.library,x=e.files,w=e.id,k=e.selectedItems,C=e.onSelectItems,O=e.onPublish,j=e.resetLibrary,I=(0,v.useCallback)((function(){var e=k.length?(0,S.t)("alerts.removeItemsFromsLibrary",{count:k.length}):(0,S.t)("alerts.resetLibrary"),t=k.length?(0,S.t)("confirmDialog.removeItemsFromLib"):(0,S.t)("confirmDialog.resetLibrary");return(0,P.jsx)(zr.Z,{onConfirm:function(){k.length?s():j(),D(!1)},onCancel:function(){D(!1)},title:t,children:(0,P.jsx)("p",{children:e})})}),[k,s,j]),T=(0,v.useState)(!1),M=(0,o.Z)(T,2),L=M[0],D=M[1],z=vo(),R=z.isMobile&&!z.isSmScreen?6:4,Z=b||window.location.origin+window.location.pathname,N=(0,v.useState)(null),B=(0,o.Z)(N,2),H=B[0],W=B[1],U=function(e,t){var n=!k.includes(e),r=[].concat((0,i.Z)(Y),(0,i.Z)(G));if(n){if(t.shiftKey&&H){var o=r.findIndex((function(e){return e.id===H})),a=r.findIndex((function(t){return t.id===e}));if(-1===o||-1===a)return void C([].concat((0,i.Z)(k),[e]));var l=(0,A.xn)(k),c=r.reduce((function(e,t,n){return(n>=o&&n<=a||l.has(t.id))&&e.push(t.id),e}),[]);C(c)}else C([].concat((0,i.Z)(k),[e]));W(e)}else W(null),C(k.filter((function(t){return t!==e})))},F=function(e){return k.includes(e)?c.filter((function(e){return k.includes(e.id)})):c.filter((function(t){return t.id===e}))},K=function(e){var t,n,r,o,i;return(0,P.jsx)(je,{children:(0,P.jsx)(Zr,{elements:null===(t=e.item)||void 0===t?void 0:t.elements,files:x,isPending:!(null!==(n=e.item)&&void 0!==n&&n.id||null===(r=e.item)||void 0===r||!r.elements),onClick:e.onClick||function(){},id:(null===(o=e.item)||void 0===o?void 0:o.id)||null,selected:!(null===(i=e.item)||void 0===i||!i.id)&&k.includes(e.item.id),onToggle:U,onDrag:function(e,t){t.dataTransfer.setData(ne.LO.excalidrawlib,(0,ye.NI)(F(e)))}})},e.key)},V=function(e){var t=e.map((function(e){return e.id?K({item:e,onClick:function(){return d(F(e.id))},key:e.id}):K({key:"__pending__item__",item:e,onClick:function(){return u(f)}})})),n=(0,Dr.y)(t,R);return n.length||(n=[[]]),n.map((function(e,t,n){return t===n.length-1&&(e=e.concat(new Array(R-e.length).fill(null).map((function(e,t){return K({key:"empty_".concat(t),item:null})})))),(0,P.jsx)(Oe,{align:"center",gap:1,children:e},t)}))},Y=c.filter((function(e){return"published"!==e.status})),G=c.filter((function(e){return"published"===e.status}));return(0,P.jsxs)("div",{className:"library-menu-items-container",style:z.isMobile?{minHeight:"200px",maxHeight:"70vh"}:void 0,children:[L&&I(),(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)("div",{className:"layer-ui__library-header",children:[(t=!!k.length,n=t?c.filter((function(e){return k.includes(e.id)})):c,r=t?(0,S.t)("buttons.remove"):(0,S.t)("buttons.resetLibrary"),(0,P.jsxs)("div",{className:"library-actions",children:[!t&&(0,P.jsx)(_.V,{type:"button",title:(0,S.t)("buttons.load"),"aria-label":(0,S.t)("buttons.load"),icon:E.zD,onClick:(0,a.Z)(h.default.mark((function e(){return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,y.updateLibrary({libraryItems:(0,be.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=10;break}return console.warn(e.t0),e.abrupt("return");case 10:m({errorMessage:(0,S.t)("errors.importLibraryError")});case 11:case"end":return e.stop()}}),e,null,[[0,5]])}))),className:"library-actions--load"},"import"),!!n.length&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_.V,{type:"button",title:(0,S.t)("buttons.export"),"aria-label":(0,S.t)("buttons.export"),icon:E.TP,onClick:(0,a.Z)(h.default.mark((function e(){var r;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=n,e.next=7;break;case 4:return e.next=6,y.getLatestLibrary();case 6:e.t0=e.sent;case 7:r=e.t0,(0,ye.t1)(r).catch(A.FG).catch((function(e){m({errorMessage:e.message})}));case 9:case"end":return e.stop()}}),e)}))),className:"library-actions--export",children:k.length>0&&(0,P.jsx)("span",{className:"library-actions-counter",children:k.length})},"export"),(0,P.jsx)(_.V,{type:"button",title:r,"aria-label":r,icon:E._I,onClick:function(){return D(!0)},className:"library-actions--remove",children:k.length>0&&(0,P.jsx)("span",{className:"library-actions-counter",children:k.length})},"reset")]}),t&&(0,P.jsx)(pe.u,{label:(0,S.t)("hints.publishLibrary"),children:(0,P.jsxs)(_.V,{type:"button","aria-label":(0,S.t)("buttons.publishLibrary"),label:(0,S.t)("buttons.publishLibrary"),icon:E.Nw,className:"library-actions--publish",onClick:O,children:[!z.isMobile&&(0,P.jsx)("label",{children:(0,S.t)("buttons.publishLibrary")}),k.length>0&&(0,P.jsx)("span",{className:"library-actions-counter",children:k.length})]})}),z.isMobile&&(0,P.jsx)("div",{className:"library-menu-browse-button--mobile",children:(0,P.jsx)("a",{href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(Z,"&useHash=true&token=").concat(w,"&theme=").concat(p,"&version=").concat(ne.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,S.t)("labels.libraries")})})]})),z.canDeviceFitSidebar&&(0,P.jsx)(P.Fragment,{children:(0,P.jsx)("div",{className:"layer-ui__sidebar-lock-button",children:(0,P.jsx)(Hr,{checked:g.isLibraryMenuDocked,onChange:function(){var e;null===(e=document.querySelector(".layer-ui__wrapper"))||void 0===e||e.classList.add("animate");var t=!g.isLibraryMenuDocked;m({isLibraryMenuDocked:t}),(0,en.L)("library","toggleLibraryDock (".concat(t?"dock":"undock",")"),"sidebar (".concat(z.isMobile?"mobile":"desktop",")"))}})})}),!z.isMobile&&(0,P.jsx)("div",{className:"ToolIcon__icon__close",children:(0,P.jsx)("button",{className:"Modal__close",onClick:function(){return m({isLibraryOpen:!1})},"aria-label":(0,S.t)("buttons.close"),children:E.xv})})]},"library-header")}),(0,P.jsxs)(je,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:G.length>0?1:"0 1 auto",marginBottom:0},children:[(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"separator",children:[(f.length>0||Y.length>0||G.length>0)&&(0,P.jsx)("div",{children:(0,S.t)("labels.personalLib")}),l&&(0,P.jsx)("div",{style:{marginLeft:"auto",marginRight:"1rem",display:"flex",alignItems:"center",fontWeight:"normal"},children:(0,P.jsx)("div",{style:{transform:"translateY(2px)"},children:(0,P.jsx)(Nr.Z,{})})})]}),f.length||Y.length?V([].concat((0,i.Z)(f.length?[{id:null,elements:f}]:[]),(0,i.Z)(Y))):(0,P.jsxs)("div",{style:{height:65,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:[(0,S.t)("library.noItems"),(0,P.jsx)("div",{style:{margin:".6rem 0",fontSize:".8em",width:"70%",textAlign:"center"},children:G.length>0?(0,S.t)("library.hint_emptyPrivateLibrary"):(0,S.t)("library.hint_emptyLibrary")})]})]}),(0,P.jsxs)(P.Fragment,{children:[(G.length>0||!z.isMobile&&(f.length>0||Y.length>0))&&(0,P.jsx)("div",{className:"separator",children:(0,S.t)("labels.excalidrawLib")}),G.length>0?V(G):Y.length>0?(0,P.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,S.t)("library.noItems")}):null]})]}),!z.isMobile&&(0,P.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(Z,"&useHash=true&token=").concat(w,"&theme=").concat(p,"&version=").concat(ne.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,S.t)("labels.libraries")})]})},Ur=n(6131),Fr=n(9487),Kr=function(e,t){return e.filter((function(e){return t.includes(e.id)}))},Vr=(0,v.forwardRef)((function(e,t){var n=e.children;return(0,P.jsx)(Vn.W,{padding:1,ref:t,className:"layer-ui__library",children:n})})),Yr=function(e){var t=e.onClose,n=e.onInsertLibraryItems,r=e.pendingElements,l=e.onAddToLibrary,c=e.theme,s=e.setAppState,u=e.files,d=e.libraryReturnUrl,f=e.focusContainer,p=e.library,m=e.id,g=e.appState,b=(0,v.useRef)(null),y=vo();!function(e,t){(0,v.useEffect)((function(){var n=function(n){e.current&&(n.target instanceof Element&&(e.current.contains(n.target)||!document.body.contains(n.target))||t(n))};return document.addEventListener("pointerdown",n,!1),function(){document.removeEventListener("pointerdown",n)}}),[e,t])}(b,(0,v.useCallback)((function(e){e.target.closest(".ToolIcon__library")||g.isLibraryMenuDocked&&y.canDeviceFitSidebar||t()}),[t,g.isLibraryMenuDocked,y.canDeviceFitSidebar])),(0,v.useEffect)((function(){var e=function(e){e.key!==k.tW.ESCAPE||g.isLibraryMenuDocked&&y.canDeviceFitSidebar||t()};return document.addEventListener(ne.Ks.KEYDOWN,e),function(){document.removeEventListener(ne.Ks.KEYDOWN,e)}}),[t,g.isLibraryMenuDocked,y.canDeviceFitSidebar]);var x=(0,v.useState)([]),w=(0,o.Z)(x,2),E=w[0],C=w[1],O=(0,v.useState)(!1),j=(0,o.Z)(O,2),I=j[0],T=j[1],M=(0,v.useState)(null),L=(0,o.Z)(M,2),A=L[0],D=L[1],z=(0,Ur.KO)(on.rF,Fr.yE),R=(0,o.Z)(z,1)[0],Z=(0,v.useCallback)(function(){var e=(0,a.Z)(h.default.mark((function e(t){var n;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.filter((function(e){return!E.includes(e.id)})),p.setLibrary(n).catch((function(){s({errorMessage:(0,S.t)("alerts.errorRemovingFromLibrary")})})),C([]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[p,s,E,C]),N=(0,v.useCallback)((function(){p.resetLibrary(),f()}),[p,f]),B=(0,v.useCallback)(function(){var e=(0,a.Z)(h.default.mark((function e(t,n){var r;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,en.L)("element","addToLibrary","ui"),!t.some((function(e){return"image"===e.type}))){e.next=3;break}return e.abrupt("return",s({errorMessage:"Support for adding images to the library coming soon!"}));case 3:r=[{status:"unpublished",elements:t,id:(0,Fe.kb)(),created:Date.now()}].concat((0,i.Z)(n)),l(),p.setLibrary(r).catch((function(){s({errorMessage:(0,S.t)("alerts.errorAddingToLibrary")})}));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[l,p,s]),H=(0,v.useCallback)((function(){return(0,P.jsxs)(Pn.V,{onCloseRequest:function(){return D(null)},title:(0,S.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,P.jsxs)("p",{children:[(0,S.t)("publishSuccessDialog.content",{authorName:A.authorName})," ",(0,P.jsx)("a",{href:null==A?void 0:A.url,target:"_blank",rel:"noopener noreferrer",children:(0,S.t)("publishSuccessDialog.link")})]}),(0,P.jsx)(_.V,{type:"button",title:(0,S.t)("buttons.close"),"aria-label":(0,S.t)("buttons.close"),label:(0,S.t)("buttons.close"),onClick:function(){return D(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})}),[D,A]),W=(0,v.useCallback)((function(e,t){T(!1),D({url:e.url,authorName:e.authorName});var n=t.slice();n.forEach((function(e){E.includes(e.id)&&(e.status="published")})),p.setLibrary(n)}),[T,D,E,p]);return"loading"!==R.status||R.isInitialized?(0,P.jsxs)(Vr,{ref:b,children:[I&&(0,P.jsx)(Pr,{onClose:function(){return T(!1)},libraryItems:Kr(R.libraryItems,E),appState:g,onSuccess:function(e){return W(e,R.libraryItems)},onError:function(e){return window.alert(e)},updateItemsInStorage:function(){return p.setLibrary(R.libraryItems)},onRemove:function(e){return C(E.filter((function(t){return t!==e})))}}),A&&H(),(0,P.jsx)(Wr,{isLoading:"loading"===R.status,libraryItems:R.libraryItems,onRemoveFromLibrary:function(){return Z(R.libraryItems)},onAddToLibrary:function(e){return B(e,R.libraryItems)},onInsertLibraryItems:n,pendingElements:r,setAppState:s,appState:g,libraryReturnUrl:d,library:p,theme:c,files:u,id:m,selectedItems:E,onSelectItems:function(e){return C(e)},onPublish:function(){return T(!0)},resetLibrary:N})]}):(0,P.jsx)(Vr,{ref:b,children:(0,P.jsxs)("div",{className:"layer-ui__library-message",children:[(0,P.jsx)(Nr.Z,{size:"2em"}),(0,P.jsx)("span",{children:(0,S.t)("labels.libraryLoadingMessage")})]})})},Gr=(n(3336),n(276),n(1528),function(e){var t,n=vo(),r=(0,lt.KP)(e.elements),o=(0,w.Zs)(e.elements,e.appState),i=(0,lt.KP)(o);return n.isMobile&&e.appState.openMenu?null:(0,P.jsx)("div",{className:"Stats",children:(0,P.jsxs)(Vn.W,{padding:2,children:[(0,P.jsx)("div",{className:"close",onClick:e.onClose,children:E.xv}),(0,P.jsx)("h3",{children:(0,S.t)("stats.title")}),(0,P.jsx)("table",{children:(0,P.jsxs)("tbody",{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.scene")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,P.jsx)("td",{children:e.elements.length})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(r[2])-Math.round(r[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(r[3])-Math.round(r[1])})]}),1===o.length&&(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.element")})}),o.length>1&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.selected")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,P.jsx)("td",{children:o.length})]})]}),o.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"x"}),(0,P.jsx)("td",{children:Math.round(i[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"y"}),(0,P.jsx)("td",{children:Math.round(i[1])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(i[2]-i[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(i[3]-i[1])})]})]}),1===o.length&&(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.angle")}),(0,P.jsx)("td",{children:"".concat(Math.round(180*o[0].angle/Math.PI),"°")})]}),null===(t=e.renderCustomStats)||void 0===t?void 0:t.call(e,e.elements,e.appState)]})})]})})}),Xr=["suggestedBindings","startBoundElement"];function qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $r=function(e){var t,n=e.actionManager,r=e.appState,o=e.files,i=e.setAppState,c=e.canvas,s=e.elements,u=e.onCollabButtonClick,d=e.onLockToggle,f=e.onPenModeToggle,p=e.onInsertElements,m=e.showExitZenModeBtn,g=e.showThemeBtn,b=e.isCollaborating,x=e.renderTopRightUI,k=e.renderCustomFooter,_=e.renderCustomStats,E=e.libraryReturnUrl,C=e.UIOptions,j=e.focusContainer,I=e.library,T=e.id,M=e.onImageAction,L=vo(),D=function(){return C.canvasActions.export?(0,P.jsx)(_r,{elements:s,appState:r,files:o,actionManager:n,exportOpts:C.canvasActions.export,canvas:c}):null},z=function(){if(!C.canvasActions.saveAsImage)return null;var e=function(e){return function(){var t=(0,a.Z)(h.default.mark((function t(n){var a;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,en.L)("export",e,"ui"),t.next=3,xe(e,n,r,o,{exportBackground:r.exportBackground,name:r.name,viewBackgroundColor:r.viewBackgroundColor}).catch(A.FG).catch((function(e){console.error(e),i({errorMessage:e.message})}));case 3:a=t.sent,r.exportEmbedScene&&a&&(0,ge.g8)(a)&&i({fileHandle:a});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};return(0,P.jsx)(Un,{elements:s,appState:r,files:o,actionManager:n,onExportToPng:e("png"),onExportToSvg:e("svg"),onExportToClipboard:e("clipboard")})},R=function(){return(0,P.jsx)("div",{style:{width:".625em"}})},Z=(0,v.useCallback)((function(){!!document.querySelector(".Dialog")||i({isLibraryOpen:!1})}),[i]),N=(0,v.useCallback)((function(){i({selectedElementIds:{},selectedGroupIds:{}})}),[i]),B=r.isLibraryOpen?(0,P.jsx)(Yr,{pendingElements:(0,w.eD)(s,r,!0),onClose:Z,onInsertLibraryItems:function(e){p((0,on.WV)(e))},onAddToLibrary:N,setAppState:i,libraryReturnUrl:E,focusContainer:j,library:I,theme:r.theme,files:o,id:T,appState:r}):null,H=(0,P.jsxs)(P.Fragment,{children:[r.isLoading&&(0,P.jsx)(Yn.z,{delay:250}),r.errorMessage&&(0,P.jsx)(Dn,{message:r.errorMessage,onClose:function(){return i({errorMessage:null})}}),r.showHelpDialog&&(0,P.jsx)(xr,{onClose:function(){i({showHelpDialog:!1})}}),r.pasteDialog.shown&&(0,P.jsx)(dr,{setAppState:i,appState:r,onInsertChart:p,onClose:function(){return i({pasteDialog:{shown:!1,data:null}})}})]}),W=function(){return r.showStats?(0,P.jsx)(Gr,{appState:r,setAppState:i,elements:s,onClose:function(){n.executeAction(Ht)},renderCustomStats:_}):null};return L.isMobile?(0,P.jsxs)(P.Fragment,{children:[H,(0,P.jsx)(cr,{appState:r,elements:s,actionManager:n,libraryMenu:B,renderJSONExportDialog:D,renderImageExportDialog:z,setAppState:i,onCollabButtonClick:u,onLockToggle:function(){return d()},onPenModeToggle:f,canvas:c,isCollaborating:b,renderCustomFooter:k,showThemeBtn:g,onImageAction:M,renderTopRightUI:x,renderStats:W})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:(0,y.Z)("layer-ui__wrapper",{"disable-pointerEvents":r.draggingElement||r.resizingElement||r.editingElement&&!(0,O.iB)(r.editingElement)}),style:r.isLibraryOpen&&r.isLibraryMenuDocked&&L.canDeviceFitSidebar?{width:"calc(100% - ".concat(ne.EE,"px)")}:{},children:[H,(t=(0,O.RT)(r,s),(0,P.jsx)(Fn,{side:"top",children:(0,P.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,P.jsxs)(je,{gap:4,className:(0,y.Z)({"disable-pointerEvents":r.zenModeEnabled}),children:[r.viewModeEnabled?(0,P.jsx)(Qn,{heading:"canvasActions",className:(0,y.Z)("zen-mode-transition",{"transition-left":r.zenModeEnabled}),children:(0,P.jsx)(Vn.W,{padding:2,style:{zIndex:1},children:(0,P.jsx)(je,{gap:4,children:(0,P.jsxs)(Oe,{gap:1,justifyContent:"space-between",children:[D(),z()]})})})}):(0,P.jsx)(Qn,{heading:"canvasActions",className:(0,y.Z)("zen-mode-transition",{"transition-left":r.zenModeEnabled}),children:(0,P.jsx)(Vn.W,{padding:2,style:{zIndex:1},children:(0,P.jsxs)(je,{gap:4,children:[(0,P.jsxs)(Oe,{gap:1,justifyContent:"space-between",children:[n.renderAction("clearCanvas"),(0,P.jsx)(R,{}),n.renderAction("loadScene"),D(),z(),(0,P.jsx)(R,{}),u&&(0,P.jsx)(An,{isCollaborating:b,collaboratorCount:r.collaborators.size,onClick:u})]}),(0,P.jsx)(Ln,{actionManager:n,appState:r,setAppState:i,showThemeBtn:g}),r.fileHandle&&(0,P.jsx)(P.Fragment,{children:n.renderAction("saveToActiveFile")})]})})}),t&&(0,P.jsx)(Qn,{heading:"selectedShapeActions",className:(0,y.Z)("zen-mode-transition",{"transition-left":r.zenModeEnabled}),children:(0,P.jsx)(Vn.W,{className:ne.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(r.height-(r.fileHandle?248:200),"px")},children:(0,P.jsx)(In,{appState:r,elements:s,renderAction:n.renderAction,activeTool:r.activeTool.type})})})]}),!r.viewModeEnabled&&(0,P.jsx)(Qn,{heading:"shapes",children:function(e){return(0,P.jsx)(je,{gap:4,align:"start",children:(0,P.jsxs)(Oe,{gap:1,className:(0,y.Z)("App-toolbar-container",{"zen-mode":r.zenModeEnabled}),children:[(0,P.jsx)(ar,{zenModeEnabled:r.zenModeEnabled,checked:r.penMode,onChange:f,title:(0,S.t)("toolBar.penMode"),penDetected:r.penDetected}),(0,P.jsx)(Xn,{zenModeEnabled:r.zenModeEnabled,checked:r.activeTool.locked,onChange:function(){return d()},title:(0,S.t)("toolBar.lock")}),(0,P.jsxs)(Vn.W,{padding:1,className:(0,y.Z)("App-toolbar",{"zen-mode":r.zenModeEnabled}),children:[(0,P.jsx)(Kn,{appState:r,elements:s,isMobile:L.isMobile}),e,(0,P.jsx)(Oe,{gap:1,children:(0,P.jsx)(Tn,{appState:r,canvas:c,activeTool:r.activeTool,setAppState:i,onImageAction:function(e){var t=e.pointerType;M({insertOnCanvasDirectly:"mouse"!==t})}})})]}),(0,P.jsx)(rr,{appState:r,setAppState:i})]})})}}),(0,P.jsxs)("div",{className:(0,y.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":r.zenModeEnabled}),children:[(0,P.jsx)(tr,{collaborators:r.collaborators,actionManager:n}),null==x?void 0:x(L.isMobile,r)]})]})})),(0,P.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,P.jsx)("div",{className:(0,y.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":r.zenModeEnabled}),children:(0,P.jsx)(je,{gap:2,children:(0,P.jsxs)(Qn,{heading:"canvasActions",children:[(0,P.jsx)(Vn.W,{padding:1,children:(0,P.jsx)(Mn,{renderAction:n.renderAction,zoom:r.zoom})}),!r.viewModeEnabled&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:(0,y.Z)("undo-redo-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":r.zenModeEnabled}),children:[n.renderAction("undo",{size:"small"}),n.renderAction("redo",{size:"small"})]}),(0,P.jsx)("div",{className:(0,y.Z)("eraser-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":r.zenModeEnabled}),children:n.renderAction("eraser",{size:"small"})})]}),!r.viewModeEnabled&&r.multiElement&&L.isTouchScreen&&(0,P.jsx)("div",{className:(0,y.Z)("finalize-button zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":r.zenModeEnabled}),children:n.renderAction("finalize",{size:"small"})})]})})}),(0,P.jsx)("div",{className:(0,y.Z)("layer-ui__wrapper__footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":r.zenModeEnabled}),children:null==k?void 0:k(!1,r)}),(0,P.jsx)("div",{className:(0,y.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":r.zenModeEnabled}),children:n.renderAction("toggleShortcuts")}),(0,P.jsx)("button",{className:(0,y.Z)("disable-zen-mode",{"disable-zen-mode--visible":m}),onClick:function(){return n.executeAction(Zt)},children:(0,S.t)("buttons.exitZenMode")})]}),W(),r.scrolledOutside&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){i(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qr(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,w.W)(s,r,c)))},children:(0,S.t)("buttons.scrollBackToContent")})]}),r.isLibraryOpen&&(0,P.jsx)("div",{className:"layer-ui__sidebar",children:B})]})},Jr=function(e,t){var n=function(e){e.suggestedBindings,e.startBoundElement;return(0,_n.Z)(e,Xr)},r=n(e.appState),o=n(t.appState),i=Object.keys(r);return e.renderCustomFooter===t.renderCustomFooter&&e.langCode===t.langCode&&e.elements===t.elements&&e.files===t.files&&i.every((function(e){return r[e]===o[e]}))},Qr=m().memo($r,Jr),eo=(n(9757),function(e){var t=e.message,n=e.onClose,r=e.closable,o=void 0!==r&&r,i=e.duration,a=void 0===i?5e3:i,l=(0,v.useRef)(0),c=a!==1/0,s=(0,v.useCallback)((function(){c&&(l.current=window.setTimeout((function(){return n()}),a))}),[n,a,c]);(0,v.useEffect)((function(){if(c)return s(),function(){return clearTimeout(l.current)}}),[s,t,a,c]);var u=c?function(){return clearTimeout(null==l?void 0:l.current)}:void 0,d=c?s:void 0;return(0,P.jsxs)("div",{className:"Toast",onMouseEnter:u,onMouseLeave:d,children:[(0,P.jsx)("p",{className:"Toast__message",children:t}),o&&(0,P.jsx)(_.V,{icon:E.xv,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})});function to(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function no(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?to(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):to(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ro=(0,C.z)({name:"viewMode",trackEvent:{category:"canvas",predicate:function(e){return!e.viewModeEnabled}},perform:function(e,t){return{appState:no(no({},t),{},{viewModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(e){return!e[k.tW.CTRL_OR_CMD]&&e.altKey&&e.code===k.aU.R}}),oo=n(7812),io=n(8409),ao=n(2325);function lo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return co(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function so(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?so(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,p.Z)(e);if(t){var o=(0,p.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,f.Z)(this,n)}}var po={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},ho=m().createContext(po),vo=function(){return(0,v.useContext)(ho)},mo=m().createContext({container:null,id:null}),go=function(){return(0,v.useContext)(mo)},bo=!1,yo=0,xo=0,wo=0,ko=!1,_o=!1,Eo=!1,So={horizontal:null,vertical:null},Co=0,Oo=!1,jo=!0,Io=null,To={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},Mo=function(e){(0,d.Z)(f,e);var t,n,r=fo(f);function f(e){var t;(0,c.Z)(this,f),t=r.call(this,e),Lo.call((0,u.Z)(t));var n,o=(0,rn.im)(),i=e.excalidrawRef,a=e.viewModeEnabled,l=void 0!==a&&a,s=e.zenModeEnabled,d=void 0!==s&&s,p=e.gridModeEnabled,h=void 0!==p&&p,v=e.theme,m=void 0===v?o.theme:v,g=e.name,b=void 0===g?o.name:g;if(t.state=uo(uo(uo({},o),{},{theme:m,isLoading:!0},t.getCanvasOffsets()),{},{viewModeEnabled:l,zenModeEnabled:d,gridSize:h?ne.k:null,name:b,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,isLibraryMenuDocked:!1}),t.id=(0,x.x0)(),t.library=new on.ZP((0,u.Z)(t)),i){var y,w="current"in i&&(null===(y=i.current)||void 0===y?void 0:y.readyPromise)||(0,A.PI)(),O={ready:!0,readyPromise:w,updateScene:t.updateScene,updateLibrary:t.library.updateLibrary,addFiles:t.addFiles,resetScene:t.resetScene,getSceneElementsIncludingDeleted:t.getSceneElementsIncludingDeleted,history:{clear:t.resetHistory},scrollToContent:t.scrollToContent,getSceneElements:t.getSceneElements,getAppState:function(){return t.state},getFiles:function(){return t.files},refresh:t.refresh,setToast:t.setToast,id:t.id,setActiveTool:t.setActiveTool,setCursor:t.setCursor,resetCursor:t.resetCursor};"function"==typeof i?i(O):i.current=O,w.resolve(O)}return t.excalidrawContainerValue={container:t.excalidrawContainerRef.current,id:t.id},t.scene=new N.Z,t.history=new pn,t.actionManager=new nn(t.syncActionResult,(function(){return t.state}),(function(){return t.scene.getElementsIncludingDeleted()}),(0,u.Z)(t)),t.actionManager.registerAll(C.N),t.actionManager.registerAction((n=t.history,{name:"undo",trackEvent:{category:"history"},perform:function(e,t){return Qt(e,t,(function(){return n.undoOnce()}))},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.key.toLowerCase()===k.tW.Z&&!e.shiftKey},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(_.V,{type:"button",icon:E.Yw,"aria-label":(0,S.t)("buttons.undo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}})),t.actionManager.registerAction(function(e){return{name:"redo",trackEvent:{category:"history"},perform:function(t,n){return Qt(t,n,(function(){return e.redoOnce()}))},keyTest:function(e){return e[k.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===k.tW.Z||k.ED&&e.ctrlKey&&!e.shiftKey&&e.key===k.tW.Y},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(_.V,{type:"button",icon:E.KX,"aria-label":(0,S.t)("buttons.redo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}}}(t.history)),t}return(0,s.Z)(f,[{key:"renderCanvas",value:function(){var e=window.devicePixelRatio,t=this.state,n=t.width,r=t.height,o=n*e,i=r*e;return t.viewModeEnabled?(0,P.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r,cursor:ne.oc.GRAB},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,S.t)("labels.drawingCanvas")}):(0,P.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,S.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var e,t,n=this,r=(0,w.eD)(this.scene.getNonDeletedElements(),this.state),o=this.props,i=o.onCollabButtonClick,a=o.renderTopRightUI,l=o.renderFooter,c=o.renderCustomStats;return(0,P.jsx)("div",{className:(0,y.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,P.jsx)(mo.Provider,{value:this.excalidrawContainerValue,children:(0,P.jsxs)(ho.Provider,{value:this.device,children:[(0,P.jsx)(Qr,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onCollabButtonClick:i,onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onInsertElements:function(e){return n.addElementsFromPasteOrLibrary({elements:e,position:"center",files:null})},langCode:(0,S.G3)().code,isCollaborating:this.props.isCollaborating,renderTopRightUI:a,renderCustomFooter:l,renderCustomStats:c,showExitZenModeBtn:void 0===(null===(e=this.props)||void 0===e?void 0:e.zenModeEnabled)&&this.state.zenModeEnabled,showThemeBtn:void 0===(null===(t=this.props)||void 0===t?void 0:t.theme)&&this.props.UIOptions.canvasActions.theme,libraryReturnUrl:this.props.libraryReturnUrl,UIOptions:this.props.UIOptions,focusContainer:this.focusContainer,library:this.library,id:this.id,onImageAction:this.onImageAction}),(0,P.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,P.jsx)("div",{className:"excalidraw-contextMenuContainer"}),1===r.length&&this.state.showHyperlinkPopup&&(0,P.jsx)(Vt.nW,{element:r[0],appState:this.state,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},r[0].id),null!==this.state.toast&&(0,P.jsx)(eo,{message:this.state.toast.message,onClose:function(){return n.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),(0,P.jsx)("main",{children:this.renderCanvas()})]})})})}},{key:"componentDidMount",value:(n=(0,a.Z)(h.default.mark((function e(){var t,n,r,o,i,a,l=this;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"!==ne.Vi.TEST&&"production"!==ne.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return l.state}},setState:{configurable:!0,value:function(){return l.setState.apply(l,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(t=this.excalidrawContainerRef)&&void 0!==t&&t.current?(this.resizeObserver=new ResizeObserver((function(){jo=!1,l.refreshDeviceState(l.excalidrawContainerRef.current),l.updateDOMRect()})),null===(n=this.resizeObserver)||void 0===n||n.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(r=window.matchMedia("(max-width: ".concat(ne.kV,"px), (max-height: ").concat(ne.Yx,"px) and (max-width: ").concat(ne.sS,"px)")),o=window.matchMedia("(max-width: ".concat(ne.eF,"px)")),i=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:ne.sk,"px)")),a=function(){l.excalidrawContainerRef.current.getBoundingClientRect(),l.device=(0,A.v4)(l.device,{isSmScreen:o.matches,isMobile:r.matches,canDeviceFitSidebar:i.matches})},r.addListener(a),this.detachIsMobileMqHandler=function(){return r.removeListener(a)}),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene);case 10:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var e;this.files={},this.imageCache.clear(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),clearTimeout(Co),Co=0}},{key:"removeEventListeners",value:function(){var e,t,n,r,o;document.removeEventListener(ne.Ks.POINTER_UP,this.removePointer),document.removeEventListener(ne.Ks.COPY,this.onCopy),document.removeEventListener(ne.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(ne.Ks.CUT,this.onCut),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.removeEventListener(ne.Ks.WHEEL,this.onWheel),null===(t=this.nearestScrollableContainer)||void 0===t||t.removeEventListener(ne.Ks.SCROLL,this.onScroll),document.removeEventListener(ne.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(ne.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(ne.Ks.KEYUP,this.onKeyUp),window.removeEventListener(ne.Ks.RESIZE,this.onResize,!1),window.removeEventListener(ne.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(ne.Ks.BLUR,this.onBlur,!1),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.removeEventListener(ne.Ks.DRAG_OVER,this.disableEvent,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.removeEventListener(ne.Ks.DROP,this.disableEvent,!1),document.removeEventListener(ne.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(ne.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(ne.Ks.GESTURE_END,this.onGestureEnd,!1),null===(o=this.detachIsMobileMqHandler)||void 0===o||o.call(this)}},{key:"addEventListeners",value:function(){var e,t,n,r,o;this.removeEventListeners(),document.addEventListener(ne.Ks.POINTER_UP,this.removePointer),document.addEventListener(ne.Ks.COPY,this.onCopy),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.addEventListener(ne.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(ne.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(ne.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(ne.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),null===(t=document.fonts)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"loadingdone",this.onFontLoaded),document.addEventListener(ne.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(ne.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(ne.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(ne.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(ne.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,A.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(ne.Ks.SCROLL,this.onScroll)),window.addEventListener(ne.Ks.RESIZE,this.onResize,!1),window.addEventListener(ne.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(ne.Ks.BLUR,this.onBlur,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.addEventListener(ne.Ks.DRAG_OVER,this.disableEvent,!1),null===(o=this.excalidrawContainerRef.current)||void 0===o||o.addEventListener(ne.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i=this;(this.excalidrawContainerRef.current&&e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),t.scrollX!==this.state.scrollX||t.scrollY!==this.state.scrollY)&&(null===(r=this.props)||void 0===r||null===(o=r.onScrollChange)||void 0===o||o.call(r,this.state.scrollX,this.state.scrollY));Object.keys(this.state.selectedElementIds).length&&(0,rn.EN)(this.state)&&this.setState({activeTool:(0,A.Om)(this.state,{type:"selection"})}),"eraser"===this.state.activeTool.type&&t.theme!==this.state.theme&&(0,A.OF)(this.canvas,this.state.theme),"selection"===t.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),t.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?ne.k:null}),this.props.name&&e.name!==this.props.name&&this.setState({name:this.props.name}),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.classList.toggle("theme--dark","dark"===this.state.theme),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout((function(){i.actionManager.executeAction(de)})),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});var a=t.multiElement;t.activeTool!==this.state.activeTool&&null!=a&&(0,M.N1)(this.state)&&(0,L.Mn)(a,!1)&&(0,M.R)(a,this.state,this.scene,(0,A.AK)(T._.getPointAtIndexGlobalCoordinates(a,-1)));var l={},c={},s={},u={},d={};this.state.collaborators.forEach((function(e,t){if(e.selectedElementIds)for(var n=0,r=Object.keys(e.selectedElementIds);n<r.length;n++){var o=r[n];o in s||(s[o]=[]),s[o].push(t)}e.pointer&&(e.username&&(u[t]=e.username),e.userState&&(d[t]=e.userState),c[t]=(0,A._i)({sceneX:e.pointer.x,sceneY:e.pointer.y},i.state),l[t]=e.button)}));var f,p,h=this.scene.getNonDeletedElements().filter((function(e){return(!(0,L.pC)(e)||i.state.pendingImageElementId!==e.id)&&(!i.state.editingElement||"text"!==i.state.editingElement.type||e.id!==i.state.editingElement.id)}));((0,hn.Eu)(h,this.state,this.state.selectionElement,window.devicePixelRatio,this.rc,this.canvas,{scrollX:this.state.scrollX,scrollY:this.state.scrollY,viewBackgroundColor:this.state.viewBackgroundColor,zoom:this.state.zoom,remotePointerViewportCoords:c,remotePointerButton:l,remoteSelectedElementIds:s,remotePointerUsernames:u,remotePointerUserStates:d,shouldCacheIgnoreZoom:this.state.shouldCacheIgnoreZoom,theme:this.state.theme,imageCache:this.imageCache,isExporting:!1,renderScrollbars:!this.device.isMobile},(function(e){var t=e.atLeastOneVisibleElement,n=e.scrollBars;n&&(So=n);var r=!(0,O.iB)(i.state.editingElement)&&(!t&&h.length>0);i.state.scrolledOutside!==r&&i.setState({scrolledOutside:r}),i.scheduleImageRefresh()}),jo&&!0===window.EXCALIDRAW_THROTTLE_RENDER),jo||(jo=!0),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||(null===(f=(p=this.props).onChange)||void 0===f||f.call(p,this.scene.getElementsIncludingDeleted(),this.state,this.files))}},{key:"addTextFromPaste",value:function(e){var t=(0,A.dE)({clientX:xo,clientY:wo},this.state),n=t.x,r=t.y,o=(0,O.VL)({x:n,y:r,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:ne.hs,locked:!1});this.scene.replaceAllElements([].concat((0,i.Z)(this.scene.getElementsIncludingDeleted()),[o])),this.setState({selectedElementIds:(0,l.Z)({},o.id,!0)}),this.history.resumeRecording()}},{key:"handleTextWysiwyg",value:function(e,t){var n=this,r=t.isExistingElement,o=void 0!==r&&r,a=function(t,r,o){n.scene.replaceAllElements((0,i.Z)(n.scene.getElementsIncludingDeleted().map((function(n){return n.id===e.id&&(0,O.iB)(n)?(0,O.N_)(n,{text:t,isDeleted:o,originalText:r}):n}))))};(0,O.b_)({id:e.id,canvas:this.canvas,getViewportCoords:function(e,t){var r=(0,A._i)({sceneX:e,sceneY:t},n.state),o=r.x,i=r.y;return[o-n.state.offsetLeft,i-n.state.offsetTop]},onChange:(0,A.tH)((function(t){a(t,t,!1),(0,O.qP)(e)&&(0,M.Ww)(e)})),onSubmit:(0,A.tH)((function(t){var r=t.text,i=t.viaKeyboard,c=t.originalText,s=!r.trim();if(a(r,c,s),!s&&i){var u=e.containerId?e.containerId:e.id;n.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},u,!0))}}))}s&&(0,M.$q)(n.scene.getNonDeletedElements(),[e]),s&&!o||n.history.resumeRecording(),n.setState({draggingElement:null,editingElement:null}),n.state.activeTool.locked&&(0,A.Uk)(n.canvas,n.state),n.focusContainer()})),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),a(e.text,e.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(e,t){var n=this.getElementAtPosition(e,t,{includeBoundTextElement:!0});return n&&(0,O.iB)(n)&&!n.isDeleted?n:null}},{key:"getElementAtPosition",value:function(e,t,n){var r=this.getElementsAtPosition(e,t,null==n?void 0:n.includeBoundTextElement,null==n?void 0:n.includeLockedElements);if(r.length>1){if(null!=n&&n.preferSelected)for(var o=r.length-1;o>-1;o--)if(this.state.selectedElementIds[r[o].id])return r[o];var i=r[r.length-1];return(0,O.wB)(i,this.state,e,t)?r[r.length-2]:i}return 1===r.length?r[0]:null}},{key:"getElementsAtPosition",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r&&o?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter((function(e){return(o||!e.locked)&&(r||!((0,O.iB)(e)&&e.containerId))}));return(0,w.CJ)(i,(function(r){return(0,O.wX)(r,n.state,e,t)}))}},{key:"handleHoverSelectedLinearElement",value:function(e,t,n){var r=T._.getElement(e.elementId);if(r)if(this.state.selectedLinearElement){var o=-1;(0,ao.Qu)(r,this.state,[t,n])&&((o=T._.getPointIndexUnderCursor(r,this.state.zoom,t,n))>=0?(0,A.KJ)(this.canvas,ne.oc.POINTER):(0,A.KJ)(this.canvas,ne.oc.MOVE)),this.state.selectedLinearElement.hoverPointIndex!==o&&this.setState({selectedLinearElement:uo(uo({},this.state.selectedLinearElement),{},{hoverPointIndex:o})})}else(0,A.KJ)(this.canvas,ne.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(e){null!==Io&&Io(e)}},{key:"updateGestureOnPointerDown",value:function(e){To.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===To.pointers.size&&(To.lastCenter=ln(To.pointers),To.initialScale=this.state.zoom.value,To.initialDistance=cn(Array.from(To.pointers.values())))}},{key:"initialPointerDownState",value:function(e){var t=(0,A.dE)(e,this.state),n=(0,w.eD)(this.scene.getNonDeletedElements(),this.state),r=(0,O.KP)(n),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return{origin:t,withCmdOrCtrl:e[k.tW.CTRL_OR_CMD],originInGrid:(0,A.AK)((0,ce.wC)(t.x,t.y,this.state.gridSize)),scrollbars:(0,w._4)(So,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:uo({},t),originalElements:this.scene.getNonDeletedElements().reduce((function(e,t){return e.set(t.id,(0,rt.OL)(t)),e}),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(c+a)/2,y:(s+l)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(t,n),hasHitElementInside:!1},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(e,t){var n=this;if(!t.scrollbars.isOverEither||this.state.multiElement)return!1;Eo=!0,t.lastCoords.x=e.clientX,t.lastCoords.y=e.clientY;var r=(0,A.$9)((function(e){e.target instanceof HTMLElement&&n.handlePointerMoveOverScrollbars(e,t)})),o=(0,A.tH)((function(){Eo=!1,(0,A.Uk)(n.canvas,n.state),Io=null,n.setState({cursorButton:"up"}),n.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(ne.Ks.POINTER_MOVE,r),window.removeEventListener(ne.Ks.POINTER_UP,o),r.flush()}));return Io=o,window.addEventListener(ne.Ks.POINTER_MOVE,r),window.addEventListener(ne.Ks.POINTER_UP,o),!0}},{key:"isASelectedElement",value:function(e){return null!=e&&this.state.selectedElementIds[e.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(e,t){if(t.length<2)return!1;var n=10/this.state.zoom.value,r=(0,O.KP)(t),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return e.x>a-n&&e.x<c+n&&e.y>l-n&&e.y<s+n}},{key:"onKeyDownFromPointerDownHandler",value:function(e){var t=this;return(0,A.tH)((function(n){t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onKeyUpFromPointerDownHandler",value:function(e){var t=this;return(0,A.tH)((function(n){n.key===k.tW.ALT&&n.preventDefault(),t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onPointerMoveFromPointerDownHandler",value:function(e){var t=this;return(0,A.$9)((function(n){var r,a,c,s;if(null===e.drag.offset&&(e.drag.offset=(0,A.AK)((0,O.$V)((0,w.eD)(t.scene.getNonDeletedElements(),t.state),e.origin.x,e.origin.y))),n.target instanceof HTMLElement&&!t.handlePointerMoveOverScrollbars(n,e)){var u=(0,A.dE)(n,t.state);if((0,rn.EN)(t.state))t.handleEraser(n,e,u);else{var d=(0,ce.wC)(u.x,u.y,t.state.gridSize),f=(0,o.Z)(d,2),p=f[0],h=f[1];if(e.drag.hasOccurred||"arrow"!==t.state.activeTool.type&&"line"!==t.state.activeTool.type||!((0,ce.LW)(u.x,u.y,e.origin.x,e.origin.y)<ne.f)){if(e.resize.isResizing&&(e.lastCoords.x=u.x,e.lastCoords.y=u.y,t.maybeHandleResize(e,n)))return!0;if(t.state.selectedLinearElement){var v=t.state.editingLinearElement||t.state.selectedLinearElement,m=T._.handlePointDragging(t.state,u.x,u.y,(function(e,n){t.maybeSuggestBindingsForLinearElementAtCoords(e,n)}),v);if(m)return e.lastCoords.x=u.x,e.lastCoords.y=u.y,t.state.editingLinearElement&&!t.state.editingLinearElement.isDragging&&t.setState({editingLinearElement:uo(uo({},t.state.editingLinearElement),{},{isDragging:!0})}),void(t.state.selectedLinearElement.isDragging||t.setState({selectedLinearElement:uo(uo({},t.state.selectedLinearElement),{},{isDragging:!0})}))}var g=e.hit.allHitElements.some((function(e){return t.isASelectedElement(e)}));if((g||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&(!t.state.editingLinearElement||!n.shiftKey)&&(!t.state.editingLinearElement||(null===(r=t.state.editingLinearElement)||void 0===r?void 0:r.elementId)!==(null===(a=e.hit.element)||void 0===a?void 0:a.id)||e.hit.hasHitElementInside)&&(!t.state.selectedLinearElement||(null===(c=t.state.selectedLinearElement)||void 0===c?void 0:c.elementId)!==(null===(s=e.hit.element)||void 0===s?void 0:s.id)||e.hit.hasHitElementInside)){var b=(0,w.eD)(t.scene.getNonDeletedElements(),t.state);if(b.every((function(e){return e.locked})))return;if(e.drag.hasOccurred=!0,b.length>0&&!e.withCmdOrCtrl){var y=(0,ce.wC)(u.x-e.drag.offset.x,u.y-e.drag.offset.y,t.state.gridSize),x=(0,o.Z)(y,2),_=x[0],E=x[1],S=[Math.abs(u.x-e.origin.x),Math.abs(u.y-e.origin.y)],C=S[0],P=S[1],D=n.shiftKey;if((0,O.o8)(e,b,_,E,D,C,P,t.state),t.maybeSuggestBindingForAll(b),n.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;var z,R=[],Z=[],N=new Map,B=new Map,H=e.hit.element,W=t.scene.getElementsIncludingDeleted(),U=(0,w.eD)(W,t.state,!0).map((function(e){return e.id})),F=lo(W);try{for(F.s();!(z=F.n()).done;){var K=z.value;if(U.includes(K.id)||K.id===(null==H?void 0:H.id)&&e.hit.wasAddedToSelection){var V=(0,O.Sy)(t.state.editingGroupId,N,K),Y=(0,ce.wC)(e.origin.x-e.drag.offset.x,e.origin.y-e.drag.offset.y,t.state.gridSize),G=(0,o.Z)(Y,2),X=G[0],q=G[1];(0,j.DR)(V,{x:V.x+(X-_),y:V.y+(q-E)}),R.push(V),Z.push(K),B.set(K.id,V.id)}else R.push(K)}}catch(e){F.e(e)}finally{F.f()}var $=[].concat(R,Z);(0,re.P7)(R,Z,B),(0,M.ek)($,Z,B,"duplicatesServeAsOld"),t.scene.replaceAllElements($)}return}}var J=t.state.draggingElement;if(J){if("freedraw"===J.type){var Q=J.points,ee=u.x-J.x,te=u.y-J.y,oe=Q.length>0&&Q[Q.length-1];if(!(oe&&oe[0]===ee&&oe[1]===te)){var ie=J.simulatePressure?J.pressures:[].concat((0,i.Z)(J.pressures),[n.pressure]);(0,j.DR)(J,{points:[].concat((0,i.Z)(Q),[[ee,te]]),pressures:ie})}}else if((0,L.bt)(J)){e.drag.hasOccurred=!0;var ae=J.points,le=p-J.x,se=h-J.y;if((0,k.Ge)(n)&&2===ae.length){var ue=(0,O.o4)(J.x,J.y,u.x,u.y);le=ue.width,se=ue.height}1===ae.length?(0,j.DR)(J,{points:[].concat((0,i.Z)(ae),[[le,se]])}):ae.length>1&&(0,j.DR)(J,{points:[].concat((0,i.Z)(ae.slice(0,-1)),[[le,se]])}),(0,L.Mn)(J,!1)&&t.maybeSuggestBindingsForLinearElementAtCoords(J,[u],t.state.startBoundElement)}else e.lastCoords.x=u.x,e.lastCoords.y=u.y,t.maybeDragNewGenericElement(e,n);if("selection"===t.state.activeTool.type){e.boxSelection.hasOccurred=!0;var de=t.scene.getNonDeletedElements();if(n.shiftKey||t.state.editingLinearElement||!(0,w.N)(de,t.state)||(e.withCmdOrCtrl&&e.hit.element?t.setState((function(n){return(0,I.bO)(uo(uo({},n),{},{selectedElementIds:(0,l.Z)({},e.hit.element.id,!0)}),t.scene.getNonDeletedElements())})):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),t.state.editingLinearElement)T._.handleBoxSelection(n,t.state,t.setState.bind(t));else{var fe=(0,w.Yp)(de,J);t.setState((function(n){return(0,I.bO)(uo(uo({},n),{},{selectedElementIds:uo(uo(uo({},n.selectedElementIds),fe.reduce((function(e,t){return e[t.id]=!0,e}),{})),e.hit.element?(0,l.Z)({},e.hit.element.id,!fe.length):null),showHyperlinkPopup:!(1!==fe.length||!fe[0].link)&&"info",selectedLinearElement:1===fe.length&&(0,L.bt)(fe[0])?new T._(fe[0],t.scene):null}),t.scene.getNonDeletedElements())}))}}}}}}}))}},{key:"handlePointerMoveOverScrollbars",value:function(e,t){if(t.scrollbars.isOverHorizontal){var n=e.clientX,r=n-t.lastCoords.x;return this.setState({scrollX:this.state.scrollX-r/this.state.zoom.value}),t.lastCoords.x=n,!0}if(t.scrollbars.isOverVertical){var o=e.clientY,i=o-t.lastCoords.y;return this.setState({scrollY:this.state.scrollY-i/this.state.zoom.value}),t.lastCoords.y=o,!0}return!1}},{key:"onPointerUpFromPointerDownHandler",value:function(e){var t=this;return(0,A.tH)((function(n){var r,o,a,c=t.state,s=c.draggingElement,u=c.resizingElement,d=c.multiElement,f=c.activeTool,p=c.isResizing,h=c.isRotating;if(t.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:d||(0,O.iB)(t.state.editingElement)?t.state.editingElement:null}),t.savePointer(n.clientX,n.clientY,"up"),t.state.editingLinearElement)if(e.boxSelection.hasOccurred||(null===(o=e.hit)||void 0===o||null===(a=o.element)||void 0===a?void 0:a.id)===t.state.editingLinearElement.elementId&&e.hit.hasHitElementInside){var v=T._.handlePointerUp(n,t.state.editingLinearElement,t.state);v!==t.state.editingLinearElement&&t.setState({editingLinearElement:v,suggestedBindings:[]})}else t.actionManager.executeAction(de);else if(t.state.selectedLinearElement){var m,g;if(e.boxSelection.hasOccurred||(null===(m=e.hit)||void 0===m||null===(g=m.element)||void 0===g?void 0:g.id)===t.state.selectedLinearElement.elementId&&e.hit.hasHitElementInside){var b=T._.handlePointerUp(n,t.state.selectedLinearElement,t.state),y=b.startBindingElement,x=b.endBindingElement,k=t.scene.getElement(b.elementId);(0,L.Mn)(k)&&(0,M.HG)(k,y,x),b!==t.state.selectedLinearElement&&t.setState({selectedLinearElement:b,suggestedBindings:[]})}else{(0,w.eD)(t.scene.getNonDeletedElements(),t.state).length>1&&t.setState({selectedLinearElement:null})}}if(Io=null,e.eventListeners.onMove&&e.eventListeners.onMove.flush(),window.removeEventListener(ne.Ks.POINTER_MOVE,e.eventListeners.onMove),window.removeEventListener(ne.Ks.POINTER_UP,e.eventListeners.onUp),window.removeEventListener(ne.Ks.KEYDOWN,e.eventListeners.onKeyDown),window.removeEventListener(ne.Ks.KEYUP,e.eventListeners.onKeyUp),t.state.pendingImageElementId&&t.setState({pendingImageElementId:null}),"freedraw"===(null==s?void 0:s.type)){var _=(0,A.dE)(n,t.state),E=s.points,S=_.x-s.x,C=_.y-s.y;S===E[0][0]&&C===E[0][1]&&(C+=1e-4,S+=1e-4);var P=s.simulatePressure?[]:[].concat((0,i.Z)(s.pressures),[n.pressure]);return(0,j.DR)(s,{points:[].concat((0,i.Z)(E),[[S,C]]),pressures:P,lastCommittedPoint:[S,C]}),void t.actionManager.executeAction(de)}if((0,L.pC)(s)){var D=s;try{t.initializeImageDimensions(D),t.setState({selectedElementIds:(0,l.Z)({},D.id,!0)},(function(){t.actionManager.executeAction(de)}))}catch(e){console.error(e),t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==D.id}))),t.actionManager.executeAction(de)}}else if((0,L.bt)(s)){s.points.length>1&&t.history.resumeRecording();var z=(0,A.dE)(n,t.state);e.drag.hasOccurred||!s||d?e.drag.hasOccurred&&!d&&((0,M.N1)(t.state)&&(0,L.Mn)(s,!1)&&(0,M.R)(s,t.state,t.scene,z),t.setState({suggestedBindings:[],startBoundElement:null}),f.locked?t.setState((function(e){return{draggingElement:null,selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},s.id,!0))}})):((0,A.z8)(t.canvas),t.setState((function(e){return{draggingElement:null,activeTool:(0,A.Om)(t.state,{type:"selection"}),selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},s.id,!0)),selectedLinearElement:new T._(s,t.scene)}})))):((0,j.DR)(s,{points:[].concat((0,i.Z)(s.points),[[z.x-s.x,z.y-s.y]])}),t.setState({multiElement:s,editingElement:t.state.draggingElement}))}else{if("selection"!==f.type&&s&&(0,O.QD)(s))return t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().slice(0,-1)),void t.setState({draggingElement:null});s&&(0,j.DR)(s,(0,O.Qp)(s)),u&&t.history.resumeRecording(),u&&(0,O.QD)(u)&&t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==u.id})));var R=e.hit.element;if((null===(r=t.state.selectedLinearElement)||void 0===r?void 0:r.elementId)!==(null==R?void 0:R.id)&&(0,L.bt)(R))1===(0,w.eD)(t.scene.getNonDeletedElements(),t.state).length&&t.setState({selectedLinearElement:new T._(R,t.scene)});if((0,rn.EN)(t.state)){if(0===(0,ce.LW)(t.lastPointerDown.clientX,t.lastPointerDown.clientY,t.lastPointerUp.clientX,t.lastPointerUp.clientY)){var Z=(0,A.dE)({clientX:t.lastPointerUp.clientX,clientY:t.lastPointerUp.clientY},t.state);t.getElementsAtPosition(Z.x,Z.y).forEach((function(t){return e.elementIdsToErase[t.id]={erase:!0,opacity:t.opacity}}))}t.eraseElements(e)}else{if(Object.keys(e.elementIdsToErase).length&&t.restoreReadyToEraseElements(e),R&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!t.state.editingLinearElement||!e.boxSelection.hasOccurred))if(n.shiftKey&&!t.state.editingLinearElement)if(t.state.selectedElementIds[R.id])if((0,I.zq)(t.state,R)){var N=R.groupIds.flatMap((function(e){return(0,I.Fb)(t.scene.getNonDeletedElements(),e)})).map((function(e){return(0,l.Z)({},e.id,!1)})).reduce((function(e,t){return uo(uo({},e),t)}),{});t.setState((function(e){return{selectedGroupIds:uo(uo({},e.selectedElementIds),R.groupIds.map((function(e){return(0,l.Z)({},e,!1)})).reduce((function(e,t){return uo(uo({},e),t)}),{})),selectedElementIds:uo(uo({},e.selectedElementIds),N)}}))}else t.setState((function(e){var n=uo(uo({},e.selectedElementIds),{},(0,l.Z)({},R.id,!1)),r=(0,w.eD)(t.scene.getNonDeletedElements(),uo(uo({},e),{},{selectedElementIds:n}));return(0,I.bO)(uo(uo({},e),{},{selectedElementIds:n,selectedLinearElement:1===r.length&&(0,L.bt)(r[0])?new T._(r[0],t.scene):e.selectedLinearElement}),t.scene.getNonDeletedElements())}));else t.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},R.id,!0))}}));else t.setState((function(e){var n;return uo({},(0,I.bO)(uo(uo({},e),{},{selectedElementIds:(0,l.Z)({},R.id,!0),selectedLinearElement:(0,L.bt)(R)&&(null===(n=t.state.selectedLinearElement)||void 0===n?void 0:n.elementId)!==R.id?new T._(R,t.scene):t.state.selectedLinearElement}),t.scene.getNonDeletedElements()))}));t.state.selectedLinearElement||t.state.editingLinearElement||e.drag.hasOccurred||t.state.isResizing||!(R&&(0,O.wB)(R,t.state,e.origin.x,e.origin.y)||!R&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!f.locked&&"freedraw"!==f.type&&s&&t.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},s.id,!0))}})),("selection"!==f.type||(0,w.N)(t.scene.getNonDeletedElements(),t.state))&&t.history.resumeRecording(),(e.drag.hasOccurred||p||h)&&((0,M.N1)(t.state)?M.el:M.H)((0,w.eD)(t.scene.getNonDeletedElements(),t.state)),f.locked||"freedraw"===f.type?t.setState({draggingElement:null,suggestedBindings:[]}):((0,A.z8)(t.canvas),t.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,A.Om)(t.state,{type:"selection"})}))):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}}))}},{key:"maybeSuggestBindingForAll",value:function(e){var t=(0,M.ZB)(e);this.setState({suggestedBindings:t})}},{key:"clearSelection",value:function(e){this.setState((function(t){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:t.editingGroupId&&null!=e&&(0,I.Nd)(e,t.editingGroupId)?t.editingGroupId:null}})),this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(e,t,n,r,o){var i=(0,w.OW)(this.scene.getElementsIncludingDeleted().filter((function(e){return!(0,O.iB)(e)})),e,t);if(i){var a=i.x+i.width/2,l=i.y+i.height/2;if(Math.hypot(e-a,t-l)<ne.wZ){var c=(0,A._i)({sceneX:a,sceneY:l},n);return{viewportX:c.x,viewportY:c.y,elementCenterX:a,elementCenterY:l}}}}},{key:"getCanvasOffsets",value:function(){var e;if(null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current){var t=this.excalidrawContainerRef.current.getBoundingClientRect();return{offsetLeft:t.left,offsetTop:t.top}}return{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(t=(0,a.Z)(h.default.mark((function e(){var t,n=this;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S.Mj.find((function(e){return e.code===n.props.langCode}))||S.Fp,e.next=3,(0,S.m0)(t);case 3:this.setAppState({});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){bo=!1}}]),f}(m().Component);Mo.defaultProps={UIOptions:ne.cW};var Lo=function(){var e=this;this.canvas=null,this.rc=null,this.unmounted=!1,this.device=po,this.excalidrawContainerRef=m().createRef(),this.files={},this.imageCache=new Map,this.lastPointerDown=null,this.lastPointerUp=null,this.contextMenuOpen=!1,this.lastScenePointer=null,this.focusContainer=function(){var t;e.props.autoFocus&&(null===(t=e.excalidrawContainerRef.current)||void 0===t||t.focus())},this.getSceneElementsIncludingDeleted=function(){return e.scene.getElementsIncludingDeleted()},this.getSceneElements=function(){return e.scene.getNonDeletedElements()},this.syncActionResult=(0,A.tH)((function(t){if(e.contextMenuOpen=!1,!e.unmounted&&!1!==t){var n=null;if(t.elements&&(t.elements.forEach((function(t){var r;(null===(r=e.state.editingElement)||void 0===r?void 0:r.id)===t.id&&e.state.editingElement!==t&&(0,O.qP)(t)&&(n=t)})),e.scene.replaceAllElements(t.elements),t.commitToHistory&&e.history.resumeRecording()),t.files&&(e.files=t.replaceFiles?t.files:uo(uo({},e.files),t.files),e.addNewImagesToImageCache()),t.appState||n){var r,o,i,a,l,c;t.commitToHistory&&e.history.resumeRecording();var s=(null==t||null===(r=t.appState)||void 0===r?void 0:r.viewModeEnabled)||!1,u=(null==t||null===(o=t.appState)||void 0===o?void 0:o.zenModeEnabled)||!1,d=(null==t||null===(i=t.appState)||void 0===i?void 0:i.gridSize)||null,f=(null==t||null===(a=t.appState)||void 0===a?void 0:a.theme)||ne.C6.LIGHT,p=null!==(l=null==t||null===(c=t.appState)||void 0===c?void 0:c.name)&&void 0!==l?l:e.state.name;void 0!==e.props.viewModeEnabled&&(s=e.props.viewModeEnabled),void 0!==e.props.zenModeEnabled&&(u=e.props.zenModeEnabled),void 0!==e.props.gridModeEnabled&&(d=e.props.gridModeEnabled?ne.k:null),void 0!==e.props.theme&&(f=e.props.theme),void 0!==e.props.name&&(p=e.props.name),e.setState((function(e){var r;return Object.assign(t.appState||{},{editingElement:n||(null===(r=t.appState)||void 0===r?void 0:r.editingElement)||null,viewModeEnabled:s,zenModeEnabled:u,gridSize:d,theme:f,name:p})}),(function(){t.syncHistory&&e.history.setCurrentState(e.state,e.scene.getElementsIncludingDeleted())}))}}})),this.onBlur=(0,A.tH)((function(){ko=!1,e.setState({isBindingEnabled:!0})})),this.onUnload=function(){e.onBlur()},this.disableEvent=function(e){e.preventDefault()},this.onFontLoaded=function(){e.scene.getElementsIncludingDeleted().forEach((function(e){(0,O.iB)(e)&&(0,vn.bI)(e)})),e.onSceneUpdated()},this.resetHistory=function(){e.history.clear()},this.resetScene=(0,A.tH)((function(t){e.scene.replaceAllElements([]),e.setState((function(n){return uo(uo({},(0,rn.im)()),{},{isLoading:(null==t||!t.resetLoadingState)&&n.isLoading,theme:e.state.theme})})),e.resetHistory()})),this.initializeScene=(0,a.Z)(h.default.mark((function t(){var n,r,o,i,l,c;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.files.length){t.next=2;break}return t.abrupt("return");case 2:return r=n.files[0],t.next=5,r.getFile();case 5:o=t.sent,e.loadFileToCanvas(new File([o],o.name||"",{type:o.type}),r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.state.isLoading||e.setState({isLoading:!0}),i=null,t.prev=3,t.next=6,e.props.initialData;case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0=null;case 9:i=t.t0,null!==(l=i)&&void 0!==l&&l.libraryItems&&e.library.updateLibrary({libraryItems:i.libraryItems,merge:!0}).catch((function(e){console.error(e)})),t.next=17;break;case 13:t.prev=13,t.t1=t.catch(3),console.error(t.t1),i={appState:{errorMessage:t.t1.message||"Encountered an error during importing or restoring scene data"}};case 17:(c=(0,an.nu)(i,null,null)).appState=uo(uo({},c.appState),{},{isLibraryOpen:(null===(n=i)||void 0===n||null===(r=n.appState)||void 0===r?void 0:r.isLibraryOpen)||e.state.isLibraryOpen,activeTool:"image"===c.appState.activeTool.type?uo(uo({},c.appState.activeTool),{},{type:"selection"}):c.appState.activeTool,isLoading:!1,toast:e.state.toast}),null!==(o=i)&&void 0!==o&&o.scrollToContent&&(c.appState=uo(uo({},c.appState),(0,w.W)(c.elements,uo(uo({},c.appState),{},{width:e.state.width,height:e.state.height,offsetTop:e.state.offsetTop,offsetLeft:e.state.offsetLeft}),null))),e.resetHistory(),e.syncActionResult(uo(uo({},c),{},{commitToHistory:!0}));case 22:case"end":return t.stop()}}),t,null,[[3,13]])}))),this.refreshDeviceState=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height,i=null!=e.props.UIOptions.dockedSidebarBreakpoint?e.props.UIOptions.dockedSidebarBreakpoint:ne.sk;e.device=(0,A.v4)(e.device,{isSmScreen:r<ne.eF,isMobile:r<ne.kV||o<ne.Yx&&r<ne.sS,canDeviceFitSidebar:r>i})},this.onResize=(0,A.tH)((function(){e.scene.getElementsIncludingDeleted().forEach((function(e){return(0,vn.bI)(e)})),e.setState({})})),this.onScroll=(0,A.Ds)((function(){var t=e.getCanvasOffsets(),n=t.offsetTop,r=t.offsetLeft;e.setState((function(e){return e.offsetLeft===r&&e.offsetTop===n?null:{offsetTop:n,offsetLeft:r}}))}),ne.HM),this.onCut=(0,A.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,A.s)(t.target)&&(e.cutAll(),t.preventDefault(),t.stopPropagation())})),this.onCopy=(0,A.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,A.s)(t.target)&&(e.copyAll(),t.preventDefault(),t.stopPropagation())})),this.cutAll=function(){e.actionManager.executeAction(It,"keyboard")},this.copyAll=function(){e.actionManager.executeAction(jt,"keyboard")},this.onTapStart=function(t){if(k.Dt||t.preventDefault(),!bo)return bo=!0,clearTimeout(yo),void(yo=window.setTimeout(Mo.resetTapTwice,ne.Gj));if(bo&&1===t.touches.length){var n=(0,o.Z)(t.touches,1)[0];e.handleCanvasDoubleClick({clientX:n.clientX,clientY:n.clientY}),bo=!1,clearTimeout(yo)}k.Dt&&t.preventDefault(),2===t.touches.length&&e.setState({selectedElementIds:{}})},this.onTapEnd=function(t){e.resetContextMenuTimer(),t.touches.length>0?e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}):To.pointers.clear()},this.pasteFromClipboard=(0,A.tH)(function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o,i,a,c,s,u,d,f,p,v;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=document.activeElement,null===(r=e.excalidrawContainerRef.current)||void 0===r?void 0:r.contains(i)){t.next=4;break}return t.abrupt("return");case 4:if(a=document.elementFromPoint(xo,wo),!n||a instanceof HTMLCanvasElement&&!(0,A.s)(i)){t.next=7;break}return t.abrupt("return");case 7:return c=null==n||null===(o=n.clipboardData)||void 0===o?void 0:o.files[0],t.next=10,(0,ve.mQ)(n);case 10:if(s=t.sent,!c&&s.text&&(u=s.text.trim()).startsWith("<svg")&&u.endsWith("</svg>")&&(c=(0,ge.Pn)(u)),!(0,ge.Wr)(c)||s.spreadsheet){t.next=19;break}return d=(0,A.dE)({clientX:xo,clientY:wo},e.state),f=d.x,p=d.y,v=e.createImageElement({sceneX:f,sceneY:p}),e.insertImageElement(v,c),e.initializeImageDimensions(v),e.setState({selectedElementIds:(0,l.Z)({},v.id,!0)}),t.abrupt("return");case 19:if(!e.props.onPaste){t.next=31;break}return t.prev=20,t.next=23,e.props.onPaste(s,n);case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}return t.abrupt("return");case 26:t.next=31;break;case 28:t.prev=28,t.t1=t.catch(20),console.error(t.t1);case 31:s.errorMessage?e.setState({errorMessage:s.errorMessage}):s.spreadsheet?e.setState({pasteDialog:{data:s.spreadsheet,shown:!0}}):s.elements?e.addElementsFromPasteOrLibrary({elements:s.elements,files:s.files||null,position:"cursor"}):s.text&&e.addTextFromPaste(s.text),e.setActiveTool({type:"selection"}),null==n||n.preventDefault();case 34:case"end":return t.stop()}}),t,null,[[20,28]])})));return function(e){return t.apply(this,arguments)}}()),this.addElementsFromPasteOrLibrary=function(t){var n=(0,an.ET)(t.elements,null),a=(0,O.KP)(n),l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,A.TE)(c,u)/2,p=(0,A.TE)(s,d)/2,h="object"===(0,r.Z)(t.position)?t.position.clientX:"cursor"===t.position?xo:e.state.width/2+e.state.offsetLeft,v="object"===(0,r.Z)(t.position)?t.position.clientY:"cursor"===t.position?wo:e.state.height/2+e.state.offsetTop,m=(0,A.dE)({clientX:h,clientY:v},e.state),g=m.x-f,b=m.y-p,y=new Map,x=(0,ce.wC)(g,b,e.state.gridSize),w=(0,o.Z)(x,2),k=w[0],_=w[1],E=new Map,S=n.map((function(t){var n=(0,O.Sy)(e.state.editingGroupId,y,t,{x:t.x+k-c,y:t.y+_-s});return E.set(t.id,n.id),n}));(0,re.P7)(S,n,E);var C=[].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),(0,i.Z)(S));(0,M.ek)(C,n,E),t.files&&(e.files=uo(uo({},e.files),t.files)),e.scene.replaceAllElements(C),e.history.resumeRecording(),e.setState((0,I.bO)(uo(uo({},e.state),{},{isLibraryOpen:!(!e.state.isLibraryOpen||!e.device.canDeviceFitSidebar)&&e.state.isLibraryMenuDocked,selectedElementIds:S.reduce((function(e,t){return(0,L.Xh)(t)||(e[t.id]=!0),e}),{}),selectedGroupIds:{}}),e.scene.getNonDeletedElements()),(function(){t.files&&e.addNewImagesToImageCache()})),e.setActiveTool({type:"selection"})},this.setAppState=function(t){e.setState(t)},this.removePointer=function(t){Co&&e.resetContextMenuTimer(),To.pointers.delete(t.pointerId)},this.toggleLock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ui";e.state.activeTool.locked||(0,en.L)("toolbar","toggleLock","".concat(t," (").concat(e.device.isMobile?"mobile":"desktop",")")),e.setState((function(t){return{activeTool:uo(uo(uo({},t.activeTool),(0,A.Om)(e.state,t.activeTool.locked?{type:"selection"}:t.activeTool)),{},{locked:!t.activeTool.locked})}}))},this.togglePenMode=function(){e.setState((function(e){return{penMode:!e.penMode}}))},this.scrollToContent=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.scene.getNonDeletedElements();e.setState(uo({},(0,w.W)(Array.isArray(t)?t:[t],e.state,e.canvas)))},this.setToast=function(t){e.setState({toast:t})},this.restoreFileFromShare=(0,a.Z)(h.default.mark((function t(){var n,r,o,i;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,caches.open("web-share-target");case 3:return n=t.sent,t.next=6,n.match("shared-file");case 6:if(!(r=t.sent)){t.next=16;break}return t.next=10,r.blob();case 10:return o=t.sent,i=new File([o],o.name||"",{type:o.type}),e.loadFileToCanvas(i,null),t.next=15,n.delete("shared-file");case 15:window.history.replaceState(null,ne.iC,window.location.pathname);case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),e.setState({errorMessage:t.t0.message});case 21:case"end":return t.stop()}}),t,null,[[0,18]])}))),this.addFiles=(0,A.tH)((function(t){var n=t.reduce((function(e,t){return e.set(t.id,t),e}),new Map);e.files=uo(uo({},e.files),Object.fromEntries(n)),e.scene.getNonDeletedElements().forEach((function(t){(0,L.wi)(t)&&n.has(t.fileId)&&(e.imageCache.delete(t.fileId),(0,vn.bI)(t))})),e.scene.informMutation(),e.addNewImagesToImageCache()})),this.updateScene=(0,A.tH)((function(t){t.commitToHistory&&e.history.resumeRecording(),t.appState&&e.setState(t.appState),t.elements&&e.scene.replaceAllElements(t.elements),t.collaborators&&e.setState({collaborators:t.collaborators})})),this.onSceneUpdated=function(){e.setState({})},this.updateCurrentCursorPosition=(0,A.tH)((function(e){xo=e.clientX,wo=e.clientY})),this.onKeyDown=(0,A.tH)((function(t){if("Proxy"in window&&(!t.shiftKey&&/^[A-Z]$/.test(t.key)||t.shiftKey&&/^[a-z]$/.test(t.key))&&(t=new Proxy(t,{get:function(e,n){var r=e[n];return"function"==typeof r?r.bind(e):"key"===n?t.shiftKey?e.key.toUpperCase():e.key.toLowerCase():r}})),!t[k.tW.CTRL_OR_CMD]||!(0,A.s)(t.target)||t.code!==k.aU.MINUS&&t.code!==k.aU.EQUAL){if(!((0,A.s)(t.target)&&t.key!==k.tW.ESCAPE||(0,k.Wl)(t.key)&&(0,A._Z)(t.target)||(t.key===k.tW.QUESTION_MARK&&e.setState({showHelpDialog:!0}),e.actionManager.handleKeyDown(t)||e.state.viewModeEnabled))){if(t[k.tW.CTRL_OR_CMD]&&e.state.isBindingEnabled&&e.setState({isBindingEnabled:!1}),t.code===k.aU.ZERO){var n=!e.state.isLibraryOpen;e.setState({isLibraryOpen:n}),n&&(0,en.L)("library","toggleLibrary (open)","keyboard (".concat(e.device.isMobile?"mobile":"desktop",")"))}if((0,k.Wl)(t.key)){var r=e.state.gridSize&&(t.shiftKey?ne.$e:e.state.gridSize)||(t.shiftKey?ne.Iw:ne.$e),o=(0,w.eD)(e.scene.getNonDeletedElements(),e.state,!0),i=0,a=0;t.key===k.tW.ARROW_LEFT?i=-r:t.key===k.tW.ARROW_RIGHT?i=r:t.key===k.tW.ARROW_UP?a=-r:t.key===k.tW.ARROW_DOWN&&(a=r),o.forEach((function(e){(0,j.DR)(e,{x:e.x+i,y:e.y+a}),(0,M.Ww)(e,{simultaneouslyUpdated:o})})),e.maybeSuggestBindingForAll(o),t.preventDefault()}else if(t.key===k.tW.ENTER){var l=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);if(1===l.length){if(!(0,L.bt)(l[0])){var c=l[0];return e.startTextEditing({sceneX:c.x+c.width/2,sceneY:c.y+c.height/2,shouldBind:!0}),void t.preventDefault()}e.state.editingLinearElement&&e.state.editingLinearElement.elementId===l[0].id||(e.history.resumeRecording(),e.setState({editingLinearElement:new T._(l[0],e.scene)}))}}else if(!t.ctrlKey&&!t.altKey&&!t.metaKey&&null===e.state.draggingElement){var s=function(e){var t=gn.find((function(t,n){return e===(n+1).toString()||t.key&&("string"==typeof t.key?t.key===e:t.key.includes(e))}));return(null==t?void 0:t.value)||null}(t.key);s?(e.state.activeTool.type!==s&&(0,en.L)("toolbar",s,"keyboard (".concat(e.device.isMobile?"mobile":"desktop",")")),e.setActiveTool({type:s}),t.stopPropagation()):t.key===k.tW.Q&&(e.toggleLock("keyboard"),t.stopPropagation())}if(t.key===k.tW.SPACE&&0===To.pointers.size&&(ko=!0,(0,A.KJ)(e.canvas,ne.oc.GRABBING),t.preventDefault()),!(t.key!==k.tW.G&&t.key!==k.tW.S||t.altKey||t[k.tW.CTRL_OR_CMD])){var u=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);if("selection"===e.state.activeTool.type&&!u.length)return;t.key===k.tW.G&&((0,w.$b)(e.state.activeTool.type)||u.some((function(e){return(0,w.$b)(e.type)})))&&(e.setState({openPopup:"backgroundColorPicker"}),t.stopPropagation()),t.key===k.tW.S&&(e.setState({openPopup:"strokeColorPicker"}),t.stopPropagation())}}}else t.preventDefault()})),this.onWheel=(0,A.tH)((function(e){e.target instanceof HTMLCanvasElement||!e.ctrlKey||e.preventDefault()})),this.onKeyUp=(0,A.tH)((function(t){if(t.key===k.tW.SPACE&&(e.state.viewModeEnabled?(0,A.KJ)(e.canvas,ne.oc.GRAB):"selection"===e.state.activeTool.type?(0,A.z8)(e.canvas):((0,A.Uk)(e.canvas,e.state),e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),ko=!1),t[k.tW.CTRL_OR_CMD]||e.state.isBindingEnabled||e.setState({isBindingEnabled:!0}),(0,k.Wl)(t.key)){var n=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);(0,M.N1)(e.state)?(0,M.el)(n):(0,M.H)(n),e.setState({suggestedBindings:[]})}})),this.setActiveTool=function(t){var n=(0,A.Om)(e.state,t);ko||(0,A.Uk)(e.canvas,e.state),(0,A.wO)(document.activeElement)&&e.focusContainer(),(0,L.dt)(n.type)||e.setState({suggestedBindings:[]}),"image"===n.type&&e.onImageAction(),"selection"!==n.type?e.setState({activeTool:n,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):e.setState({activeTool:n})},this.setCursor=function(t){(0,A.KJ)(e.canvas,t)},this.resetCursor=function(){(0,A.z8)(e.canvas)},this.isTouchScreenMultiTouchGesture=function(){return To.pointers.size>=2},this.onGestureStart=(0,A.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({selectedElementIds:{}}),To.initialScale=e.state.zoom.value})),this.onGestureChange=(0,A.tH)((function(t){if(t.preventDefault(),!e.isTouchScreenMultiTouchGesture()){var n=To.initialScale;n&&e.setState((function(e){return uo({},(0,mn.E)({viewportX:xo,viewportY:wo,nextZoom:(0,w.j)(n*t.scale)},e))}))}})),this.onGestureEnd=(0,A.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}),To.initialScale=null})),this.startTextEditing=function(t){var n,r,o,a,l=t.sceneX,c=t.sceneY,s=t.shouldBind,u=t.insertAtParentCenter,d=(void 0===u||u)&&e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,e.canvas,window.devicePixelRatio),f=null,p=null,h=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);if(f=1===h.length?(0,O.iB)(h[0])?h[0]:(0,L.mG)(h[0],!1)?(0,re.WJ)(h[0]):e.getTextElementAtPosition(l,c):e.getTextElementAtPosition(l,c),p||f||!s&&!d||(p=(0,w.OW)(e.scene.getNonDeletedElements().filter((function(e){return(0,L.mG)(e,!1)&&!(0,re.WJ)(e)})),l,c)),!f&&p){var v={fontSize:e.state.currentItemFontSize,fontFamily:e.state.currentItemFontFamily},m=(0,re.AT)((0,A.mO)(v)),g=(0,re.w_)((0,A.mO)(v)),b=Math.max(p.height,g),y=Math.max(p.width,m);(0,j.DR)(p,{height:b,width:y}),l=p.x+y/2,c=p.y+b/2,d&&(d=e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,e.canvas,window.devicePixelRatio))}var x=f||(0,O.VL)({x:d?d.elementCenterX:l,y:d?d.elementCenterY:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,strokeSharpness:e.state.currentItemStrokeSharpness,text:"",fontSize:e.state.currentItemFontSize,fontFamily:e.state.currentItemFontFamily,textAlign:d?"center":e.state.currentItemTextAlign,verticalAlign:d?ne.oX.MIDDLE:ne.hs,containerId:null!==(n=null===(r=p)||void 0===r?void 0:r.id)&&void 0!==n?n:void 0,groupIds:null!==(o=null===(a=p)||void 0===a?void 0:a.groupIds)&&void 0!==o?o:[],locked:!1});e.setState({editingElement:x}),f||(e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[x])),d||(0,j.DR)(x,{y:x.y-x.baseline/2})),e.setState({editingElement:x}),e.handleTextWysiwyg(x,{isExistingElement:!!f})},this.handleCanvasDoubleClick=function(t){if(!e.state.multiElement&&"selection"===e.state.activeTool.type){var n=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);if(1===n.length&&(0,L.bt)(n[0]))e.state.editingLinearElement&&e.state.editingLinearElement.elementId===n[0].id||(e.history.resumeRecording(),e.setState({editingLinearElement:new T._(n[0],e.scene)}));else{(0,A.z8)(e.canvas);var r=(0,A.dE)(t,e.state),o=r.x,i=r.y;if((0,I.iJ)(e.state).length>0){var a=e.getElementAtPosition(o,i),c=a&&(0,I.YS)(a,e.state.selectedGroupIds);if(c)return void e.setState((function(t){return(0,I.bO)(uo(uo({},t),{},{editingGroupId:c,selectedElementIds:(0,l.Z)({},a.id,!0),selectedGroupIds:{}}),e.scene.getNonDeletedElements())}))}if((0,A.z8)(e.canvas),!t[k.tW.CTRL_OR_CMD]&&!e.state.viewModeEnabled){var s=(0,w.eD)(e.scene.getNonDeletedElements(),e.state);if(1===s.length){var u=s[0];(0,L.Xo)(u)&&(o=u.x+u.width/2,i=u.y+u.height/2)}e.startTextEditing({sceneX:o,sceneY:i,shouldBind:!1,insertAtParentCenter:!t.altKey})}}}},this.getElementLinkAtPosition=function(t,n){var r=e.scene.getNonDeletedElements().slice().reverse(),o=1/0;return r.find((function(r,i){return n&&r.id===n.id&&(o=i),r.link&&i<=o&&(0,Vt.wq)(r,e.state,[t.x,t.y],e.device.isMobile)}))},this.redirectToLink=function(t,n){var r=(0,ce.LW)(e.lastPointerDown.clientX,e.lastPointerDown.clientY,e.lastPointerUp.clientX,e.lastPointerUp.clientY);if(!(!e.hitLinkElement||n&&r>ne.f||!n&&0!==r)){var o=(0,A.dE)(e.lastPointerDown,e.state),i=(0,Vt.wq)(e.hitLinkElement,e.state,[o.x,o.y],e.device.isMobile),a=(0,A.dE)(e.lastPointerUp,e.state),l=(0,Vt.wq)(e.hitLinkElement,e.state,[a.x,a.y],e.device.isMobile);if(i&&l){var c,s,u=e.hitLinkElement.link;if(u)if(e.props.onLinkOpen&&(s=(0,A.ag)(ne.Ks.EXCALIDRAW_LINK,t.nativeEvent),e.props.onLinkOpen(e.hitLinkElement,s)),null===(c=s)||void 0===c||!c.defaultPrevented){var d=(0,Vt.q$)(u)?"_self":"_blank",f=window.open(void 0,d);f&&(f.opener=null,f.location=(0,Vt.$u)(u))}}}},this.handleCanvasPointerMove=function(t){e.savePointer(t.clientX,t.clientY,e.state.cursorButton),To.pointers.has(t.pointerId)&&To.pointers.set(t.pointerId,{x:t.clientX,y:t.clientY});var n=To.initialScale;if(2===To.pointers.size&&To.lastCenter&&n&&To.initialDistance){var r=ln(To.pointers),a=r.x-To.lastCenter.x,l=r.y-To.lastCenter.y;To.lastCenter=r;var c=cn(Array.from(To.pointers.values())),s="freedraw"===e.state.activeTool.type&&e.state.penMode?1:c/To.initialDistance,u=s?(0,w.j)(n*s):e.state.zoom.value;e.setState((function(e){var t=(0,mn.E)({viewportX:r.x,viewportY:r.y,nextZoom:u},e);return{zoom:t.zoom,scrollX:t.scrollX+a/u,scrollY:t.scrollY+l/u,shouldCacheIgnoreZoom:!0}})),e.resetShouldCacheIgnoreZoomDebounced()}else To.lastCenter=To.initialDistance=To.initialScale=null;if(!(ko||_o||Eo)){var d=(0,w._4)(So,t.clientX-e.state.offsetLeft,t.clientY-e.state.offsetTop).isOverEither;e.state.draggingElement||e.state.multiElement||(d?(0,A.z8)(e.canvas):(0,A.Uk)(e.canvas,e.state));var f=(0,A.dE)(t,e.state),p=f.x,h=f.y;if(e.state.editingLinearElement&&!e.state.editingLinearElement.isDragging){var v=T._.handlePointerMove(t,p,h,e.state.editingLinearElement,e.state.gridSize);v!==e.state.editingLinearElement&&(0,g.flushSync)((function(){e.setState({editingLinearElement:v})})),null!=v.lastUncommittedPoint?e.maybeSuggestBindingAtCursor(f):e.setState({suggestedBindings:[]})}if((0,L.Lx)(e.state.activeTool.type)){var m=e.state.draggingElement;(0,L.Mn)(m,!1)?e.maybeSuggestBindingsForLinearElementAtCoords(m,[f],e.state.startBoundElement):e.maybeSuggestBindingAtCursor(f)}if(e.state.multiElement){var b=e.state.multiElement,y=b.x,x=b.y,_=b.points,E=b.lastCommittedPoint,S=_[_.length-1];if((0,A.Uk)(e.canvas,e.state),S===E)(0,ce.LW)(p-y,h-x,S[0],S[1])>=ne.qx?(0,j.DR)(b,{points:[].concat((0,i.Z)(_),[[p-y,h-x]])}):(0,A.KJ)(e.canvas,ne.oc.POINTER);else if(_.length>2&&E&&(0,ce.LW)(p-y,h-x,E[0],E[1])<ne.qx)(0,A.KJ)(e.canvas,ne.oc.POINTER),(0,j.DR)(b,{points:_.slice(0,-1)});else{var C,I=(0,ce.wC)(p,h,e.state.gridSize),M=(0,o.Z)(I,2),P=M[0],D=M[1],z=null!==(C=null==b?void 0:b.lastCommittedPoint)&&void 0!==C?C:[0,0],R=(0,o.Z)(z,2),Z=R[0],N=R[1],B=P-y-Z,H=D-x-N;if((0,k.Ge)(t)){var W=(0,O.o4)(Z+y,N+x,P,D);B=W.width,H=W.height}(0,ce.g6)(_,e.state.zoom.value)&&(0,A.KJ)(e.canvas,ne.oc.POINTER),(0,j.DR)(b,{points:[].concat((0,i.Z)(_.slice(0,-1)),[[Z+B,N+H]])})}}else{if(!(Boolean(t.buttons)||"selection"!==e.state.activeTool.type&&"text"!==e.state.activeTool.type&&"eraser"!==e.state.activeTool.type)){var U=e.scene.getNonDeletedElements(),F=(0,w.eD)(U,e.state);if(1!==F.length||d||e.state.editingLinearElement){if(F.length>1&&!d){var K=(0,O.n2)((0,O.KP)(F),p,h,e.state.zoom,t.pointerType);if(K)return void(0,A.KJ)(e.canvas,(0,O.Un)({transformHandleType:K}))}}else{var V=(0,O.jt)(U,e.state,p,h,e.state.zoom,t.pointerType);if(V&&V.transformHandleType)return void(0,A.KJ)(e.canvas,(0,O.Un)(V))}var Y=e.getElementAtPosition(f.x,f.y);e.hitLinkElement=e.getElementLinkAtPosition(f,Y),(0,rn.EN)(e.state)||(e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]?((0,A.KJ)(e.canvas,ne.oc.POINTER),(0,Vt.Pp)(e.hitLinkElement,e.state)):((0,Vt.lV)(),Y&&Y.link&&e.state.selectedElementIds[Y.id]&&!e.contextMenuOpen&&!e.state.showHyperlinkPopup?e.setState({showHyperlinkPopup:"info"}):"text"===e.state.activeTool.type?(0,A.KJ)(e.canvas,(0,O.iB)(Y)?ne.oc.TEXT:ne.oc.CROSSHAIR):e.state.viewModeEnabled?(0,A.KJ)(e.canvas,ne.oc.GRAB):d?(0,A.KJ)(e.canvas,ne.oc.AUTO):e.state.selectedLinearElement?e.handleHoverSelectedLinearElement(e.state.selectedLinearElement,p,h):t[k.tW.CTRL_OR_CMD]||!Y&&!e.isHittingCommonBoundingBoxOfSelectedElements(f,F)||null!=Y&&Y.locked?(0,A.KJ)(e.canvas,ne.oc.AUTO):(0,A.KJ)(e.canvas,ne.oc.MOVE)))}}}},this.handleEraser=function(t,n,r){for(var o=function(e){e.forEach((function(e){e.locked||(i.push(e.id),t.altKey?n.elementIdsToErase[e.id]&&n.elementIdsToErase[e.id].erase&&(n.elementIdsToErase[e.id].erase=!1):n.elementIdsToErase[e.id]||(n.elementIdsToErase[e.id]={erase:!0,opacity:e.opacity}))}))},i=[],a=(0,ce.LW)(n.lastCoords.x,n.lastCoords.y,r.x,r.y),l=10/e.state.zoom.value,c=uo({},n.lastCoords),s=0;s<=a;){if(o(e.getElementsAtPosition(c.x,c.y)),s===a)break;var u=(s=Math.min(s+l,a))/a,d=(1-u)*c.x+u*r.x,f=(1-u)*c.y+u*r.y;c.x=d,c.y=f}var p=e.scene.getElementsIncludingDeleted().map((function(e){var r=(0,L.Xh)(e)&&i.includes(e.containerId)?e.containerId:e.id;if(i.includes(r)){if(!t.altKey)return(0,j.BE)(e,{opacity:ne.xY});if(n.elementIdsToErase[r]&&!1===n.elementIdsToErase[r].erase)return(0,j.BE)(e,{opacity:n.elementIdsToErase[r].opacity})}return e}));e.scene.replaceAllElements(p),n.lastCoords.x=r.x,n.lastCoords.y=r.y},this.handleTouchMove=function(e){Oo=!0},this.handleCanvasPointerDown=function(t){var n,r,o=document.getSelection();if(null!=o&&o.anchorNode&&o.removeAllRanges(),e.maybeOpenContextMenuAfterPointerDownOnTouchDevices(t),e.maybeCleanupAfterMissingPointerUp(t),e.state.penDetected||"pen"!==t.pointerType||e.setState((function(e){return{penMode:!0,penDetected:!0}})),!e.device.isTouchScreen&&["pen","touch"].includes(t.pointerType)&&(e.device=(0,A.v4)(e.device,{isTouchScreen:!0})),!_o&&(e.lastPointerDown=t,e.setState({lastPointerDownWith:t.pointerType,cursorButton:"down"}),e.savePointer(t.clientX,t.clientY,"down"),e.updateGestureOnPointerDown(t),!e.handleCanvasPanUsingWheelOrSpaceDrag(t)&&!(t.button!==ne.Oh.MAIN&&t.button!==ne.Oh.TOUCH||To.pointers.size>1))){var i=e.initialPointerDownState(t);if(!e.handleDraggingScrollBar(t,i))if(e.contextMenuOpen=!1,e.clearSelectionIfNotUsingSelection(),e.updateBindingEnabledOnPointerMove(t),!e.handleSelectionOnPointerDown(t,i))if(!e.state.penMode||"touch"!==t.pointerType||"selection"===e.state.activeTool.type||"text"===e.state.activeTool.type||"image"===e.state.activeTool.type)if("text"!==e.state.activeTool.type){if("arrow"===e.state.activeTool.type||"line"===e.state.activeTool.type)e.handleLinearElementOnPointerDown(t,e.state.activeTool.type,i);else if("image"===e.state.activeTool.type){(0,A.KJ)(e.canvas,ne.oc.CROSSHAIR);var a=e.state.pendingImageElementId&&e.scene.getElement(e.state.pendingImageElementId);if(!a)return;e.setState({draggingElement:a,editingElement:a,pendingImageElementId:null,multiElement:null});var l=(0,A.dE)(t,e.state),c=l.x,s=l.y;(0,j.DR)(a,{x:c,y:s})}else"freedraw"===e.state.activeTool.type?e.handleFreeDrawElementOnPointerDown(t,e.state.activeTool.type,i):"custom"===e.state.activeTool.type?(0,A.KJ)(e.canvas,ne.oc.AUTO):"eraser"!==e.state.activeTool.type&&e.createGenericElementOnPointerDown(e.state.activeTool.type,i);null===(n=e.props)||void 0===n||null===(r=n.onPointerDown)||void 0===r||r.call(n,e.state.activeTool,i);var u=e.onPointerMoveFromPointerDownHandler(i),d=e.onPointerUpFromPointerDownHandler(i),f=e.onKeyDownFromPointerDownHandler(i),p=e.onKeyUpFromPointerDownHandler(i);Io=d,e.state.viewModeEnabled||(window.addEventListener(ne.Ks.POINTER_MOVE,u),window.addEventListener(ne.Ks.POINTER_UP,d),window.addEventListener(ne.Ks.KEYDOWN,f),window.addEventListener(ne.Ks.KEYUP,p),i.eventListeners.onMove=u,i.eventListeners.onUp=d,i.eventListeners.onKeyUp=p,i.eventListeners.onKeyDown=f)}else e.handleTextOnPointerDown(t,i)}},this.handleCanvasPointerUp=function(t){if(e.lastPointerUp=t,e.device.isTouchScreen){var n=(0,A.dE)({clientX:t.clientX,clientY:t.clientY},e.state),r=e.getElementAtPosition(n.x,n.y);e.hitLinkElement=e.getElementLinkAtPosition(n,r)}e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]&&e.redirectToLink(t,e.device.isTouchScreen),e.removePointer(t)},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(t){"touch"===t.pointerType&&(Oo=!1,Co?Oo=!0:Co=window.setTimeout((function(){Co=0,Oo||e.handleCanvasContextMenu(t)}),ne.nM))},this.resetContextMenuTimer=function(){clearTimeout(Co),Co=0,Oo=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=function(t){if(!(To.pointers.size<=1&&(t.button===ne.Oh.WHEEL||t.button===ne.Oh.MAIN&&ko||e.state.viewModeEnabled))||(0,O.iB)(e.state.editingElement))return!1;_o=!0,t.preventDefault();var n=!1,r=/Linux/.test(window.navigator.platform);(0,A.KJ)(e.canvas,ne.oc.GRABBING);var o=t.clientX,i=t.clientY,a=(0,A.$9)((function(t){var a=o-t.clientX,l=i-t.clientY;if(o=t.clientX,i=t.clientY,r&&!n&&(Math.abs(a)>1||Math.abs(l)>1)){n=!0;var c=function e(t){document.body.removeEventListener(ne.Ks.PASTE,e),t.stopPropagation()};document.body.addEventListener(ne.Ks.PASTE,c),window.addEventListener(ne.Ks.POINTER_UP,(function e(){setTimeout((function(){document.body.removeEventListener(ne.Ks.PASTE,c),window.removeEventListener(ne.Ks.POINTER_UP,e)}),100)}))}e.setState({scrollX:e.state.scrollX-a/e.state.zoom.value,scrollY:e.state.scrollY-l/e.state.zoom.value})})),l=(0,A.tH)(Io=function(){Io=null,_o=!1,ko||(e.state.viewModeEnabled?(0,A.KJ)(e.canvas,ne.oc.GRAB):(0,A.Uk)(e.canvas,e.state)),e.setState({cursorButton:"up"}),e.savePointer(t.clientX,t.clientY,"up"),window.removeEventListener(ne.Ks.POINTER_MOVE,a),window.removeEventListener(ne.Ks.POINTER_UP,l),window.removeEventListener(ne.Ks.BLUR,l),a.flush()});return window.addEventListener(ne.Ks.BLUR,l),window.addEventListener(ne.Ks.POINTER_MOVE,a,{passive:!0}),window.addEventListener(ne.Ks.POINTER_UP,l),!0},this.clearSelectionIfNotUsingSelection=function(){"selection"!==e.state.activeTool.type&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})},this.handleSelectionOnPointerDown=function(t,n){if("selection"===e.state.activeTool.type){var r=e.scene.getNonDeletedElements(),o=(0,w.eD)(r,e.state);if(1!==o.length||e.state.editingLinearElement)o.length>1&&(n.resize.handleType=(0,O.n2)((0,O.KP)(o),n.origin.x,n.origin.y,e.state.zoom,t.pointerType));else{var i=(0,O.jt)(r,e.state,n.origin.x,n.origin.y,e.state.zoom,t.pointerType);null!=i&&(e.setState({resizingElement:i.element}),n.resize.handleType=i.transformHandleType)}if(n.resize.handleType)(0,A.KJ)(e.canvas,(0,O.Un)({transformHandleType:n.resize.handleType})),n.resize.isResizing=!0,n.resize.offset=(0,A.AK)((0,O.xx)(n.resize.handleType,o,n.origin.x,n.origin.y)),1===o.length&&(0,L.bt)(o[0])&&2===o[0].points.length&&(n.resize.arrowDirection=(0,O.T)(n.resize.handleType,o[0]));else{var a;if(e.state.selectedLinearElement){var c=e.state.editingLinearElement||e.state.selectedLinearElement,s=T._.handlePointerDown(t,e.state,e.history,n.origin,c);if(s.hitElement&&(n.hit.element=s.hitElement),s.linearElementEditor&&(e.setState({selectedLinearElement:s.linearElementEditor}),e.state.editingLinearElement&&e.setState({editingLinearElement:s.linearElementEditor})),s.didAddPoint)return!0}if(n.hit.element=null!==(a=n.hit.element)&&void 0!==a?a:e.getElementAtPosition(n.origin.x,n.origin.y),n.hit.element){if((0,Vt.wq)(n.hit.element,e.state,[n.origin.x,n.origin.y],e.device.isMobile))return!1;n.hit.hasHitElementInside=(0,ao.Qu)(n.hit.element,e.state,[n.origin.x,n.origin.y])}n.hit.allHitElements=e.getElementsAtPosition(n.origin.x,n.origin.y);var u=n.hit.element,d=n.hit.allHitElements.some((function(t){return e.isASelectedElement(t)}));if(null!==u&&d||t.shiftKey||n.hit.hasHitCommonBoundingBoxOfSelectedElements||e.clearSelection(u),e.state.editingLinearElement)e.setState({selectedElementIds:(0,l.Z)({},e.state.editingLinearElement.elementId,!0)});else if(null!=u){if(t[k.tW.CTRL_OR_CMD])return e.state.selectedElementIds[u.id]||(n.hit.wasAddedToSelection=!0),e.setState((function(t){return uo(uo({},(0,I.iE)(t,u)),{},{previousSelectedElementIds:e.state.selectedElementIds})})),!1;e.state.selectedElementIds[u.id]||(e.state.editingGroupId&&!(0,I.Nd)(u,e.state.editingGroupId)&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),d||n.hit.hasHitCommonBoundingBoxOfSelectedElements||(e.setState((function(t){return(0,I.bO)(uo(uo({},t),{},{selectedElementIds:uo(uo({},t.selectedElementIds),{},(0,l.Z)({},u.id,!0)),showHyperlinkPopup:!!u.link&&"info"}),e.scene.getNonDeletedElements())})),n.hit.wasAddedToSelection=!0))}e.setState({previousSelectedElementIds:e.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=function(t,n){if(!(0,O.iB)(e.state.editingElement)){var r=n.origin.x,o=n.origin.y,i=e.getElementAtPosition(r,o,{includeBoundTextElement:!0});(0,L.Xo)(i)&&(r=i.x+i.width/2,o=i.y+i.height/2),e.startTextEditing({sceneX:r,sceneY:o,shouldBind:!1,insertAtParentCenter:!t.altKey}),(0,A.z8)(e.canvas),e.state.activeTool.locked||e.setState({activeTool:(0,A.Om)(e.state,{type:"selection"})})}},this.handleFreeDrawElementOnPointerDown=function(t,n,r){var a=(0,ce.wC)(r.origin.x,r.origin.y,null),c=(0,o.Z)(a,2),s=c[0],u=c[1],d=(0,rt.KE)({type:n,x:s,y:u,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,strokeSharpness:e.state.currentItemLinearStrokeSharpness,simulatePressure:.5===t.pressure,locked:!1});e.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},d.id,!1))}}));var f=d.simulatePressure?d.pressures:[].concat((0,i.Z)(d.pressures),[t.pressure]);(0,j.DR)(d,{points:[[0,0]],pressures:f});var p=(0,M.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[d])),e.setState({draggingElement:d,editingElement:d,startBoundElement:p,suggestedBindings:[]})},this.createImageElement=function(t){var n=t.sceneX,r=t.sceneY,i=(0,ce.wC)(n,r,e.state.gridSize),a=(0,o.Z)(i,2),l=a[0],c=a[1];return(0,O.vw)({type:"image",x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,strokeSharpness:e.state.currentItemLinearStrokeSharpness,locked:!1})},this.handleLinearElementOnPointerDown=function(t,n,r){if(e.state.multiElement){var a=e.state.multiElement;if("line"===a.type&&(0,ce.g6)(a.points,e.state.zoom.value))return(0,j.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),void e.actionManager.executeAction(de);var c=a.x,s=a.y,u=a.lastCommittedPoint;if(a.points.length>1&&u&&(0,ce.LW)(r.origin.x-c,r.origin.y-s,u[0],u[1])<ne.qx)return void e.actionManager.executeAction(de);e.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},a.id,!0))}})),(0,j.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),(0,A.KJ)(e.canvas,ne.oc.POINTER)}else{var d=(0,ce.wC)(r.origin.x,r.origin.y,e.state.gridSize),f=(0,o.Z)(d,2),p=f[0],h=f[1],v=e.state,m=v.currentItemStartArrowhead,g=v.currentItemEndArrowhead,b="arrow"===n?[m,g]:[null,null],y=(0,o.Z)(b,2),x=y[0],w=y[1],k=(0,O.y8)({type:n,x:p,y:h,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,strokeSharpness:e.state.currentItemLinearStrokeSharpness,startArrowhead:x,endArrowhead:w,locked:!1});e.setState((function(e){return{selectedElementIds:uo(uo({},e.selectedElementIds),{},(0,l.Z)({},k.id,!1))}})),(0,j.DR)(k,{points:[].concat((0,i.Z)(k.points),[[0,0]])});var _=(0,M.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[k])),e.setState({draggingElement:k,editingElement:k,startBoundElement:_,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=function(t,n){var r=(0,ce.wC)(n.origin.x,n.origin.y,e.state.gridSize),a=(0,o.Z)(r,2),l=a[0],c=a[1],s=(0,O.Up)({type:t,x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,strokeSharpness:e.state.currentItemStrokeSharpness,locked:!1});"selection"===s.type?e.setState({selectionElement:s,draggingElement:s}):(e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[s])),e.setState({multiElement:null,draggingElement:s,editingElement:s}))},this.restoreReadyToEraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase?(0,j.BE)(e,{opacity:t.elementIdsToErase[e.id].opacity}):(0,L.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,j.BE)(e,{opacity:t.elementIdsToErase[e.containerId].opacity}):e}));e.scene.replaceAllElements(n)},this.eraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase||(0,L.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,j.BE)(e,{isDeleted:!0}):e}));e.history.resumeRecording(),e.scene.replaceAllElements(n)},this.initializeImage=function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o,i,c,s,u,d,f,p,v,m,g,b,y,x;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=n.imageFile,s=n.imageElement,u=n.showCursorImagePreview,d=void 0!==u&&u,(0,ge.Wr)(c)){t.next=3;break}throw new Error((0,S.t)("errors.unsupportedFileType"));case 3:if(f=c.type,(0,A.KJ)(e.canvas,"wait"),f!==ne.LO.svg){t.next=23;break}return t.prev=6,t.t0=ge.Pn,t.t1=oo.bp,t.next=11,c.text();case 11:return t.t2=t.sent,t.next=14,(0,t.t1)(t.t2);case 14:t.t3=t.sent,t.t4=c.name,c=(0,t.t0)(t.t3,t.t4),t.next=23;break;case 19:throw t.prev=19,t.t5=t.catch(6),console.warn(t.t5),new Error((0,S.t)("errors.svgImageInsertError"));case 23:return t.next=25,(null===(r=(o=e.props).generateIdForFile)||void 0===r?void 0:r.call(o,c))||(0,ge.tW)(c);case 25:if(p=t.sent){t.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,S.t)("errors.imageInsertError"));case 29:if(null!=(v=e.files[p])&&v.dataURL){t.next=42;break}return t.prev=31,t.next=34,(0,ge.Tu)(c,{maxWidthOrHeight:ne.h6});case 34:c=t.sent,t.next=40;break;case 37:t.prev=37,t.t6=t.catch(31),console.error("error trying to resing image file on insertion",t.t6);case 40:if(!(c.size>ne.$n)){t.next=42;break}throw new Error((0,S.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(ne.$n/1024/1024),"MB")}));case 42:if(d&&(g=null===(m=e.files[p])||void 0===m?void 0:m.dataURL,b=g&&(0,ge.KG)(g),e.setImagePreviewCursor(b||c)),t.t7=null===(i=e.files[p])||void 0===i?void 0:i.dataURL,t.t7){t.next=48;break}return t.next=47,(0,ge.Sf)(c);case 47:t.t7=t.sent;case 48:return y=t.t7,x=(0,j.DR)(s,{fileId:p},!1),t.abrupt("return",new Promise(function(){var t=(0,a.Z)(h.default.mark((function t(n,r){var o,i;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.files=uo(uo({},e.files),{},(0,l.Z)({},p,{mimeType:f,id:p,dataURL:y,created:Date.now()})),i=e.imageCache.get(p)){t.next=7;break}return e.addNewImagesToImageCache(),t.next=7,e.updateImageCache([x]);case 7:if(!((null==i?void 0:i.image)instanceof Promise)){t.next=10;break}return t.next=10,i.image;case 10:e.state.pendingImageElementId!==x.id&&(null===(o=e.state.draggingElement)||void 0===o?void 0:o.id)!==x.id&&e.initializeImageDimensions(x,!0),n(x),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),console.error(t.t0),r(new Error((0,S.t)("errors.imageInsertError")));case 18:return t.prev=18,d||(0,A.z8)(e.canvas),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[0,14,18,21]])})));return function(e,n){return t.apply(this,arguments)}}()));case 51:case"end":return t.stop()}}),t,null,[[6,19],[31,37]])})));return function(e){return t.apply(this,arguments)}}(),this.insertImageElement=function(){var t=(0,a.Z)(h.default.mark((function t(n,r,o){return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[n])),t.prev=1,t.next=4,e.initializeImage({imageFile:r,imageElement:n,showCursorImagePreview:o});case 4:t.next=11;break;case 6:t.prev=6,t.t0=t.catch(1),(0,j.DR)(n,{isDeleted:!0}),e.actionManager.executeAction(de),e.setState({errorMessage:t.t0.message||(0,S.t)("errors.imageInsertError")});case 11:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e,n,r){return t.apply(this,arguments)}}(),this.setImagePreviewCursor=function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o,i,a,l,c,s;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=96,t.next=3,(0,ge.Tu)(n,{maxWidthOrHeight:r});case 3:return o=t.sent,t.next=6,(0,ge.Sf)(o);case 6:if(i=t.sent,n.type!==ne.LO.svg){t.next=20;break}return t.next=10,(0,oo.PK)(i);case 10:a=t.sent,l=Math.min(a.height,r),(c=l*(a.width/a.height))>r&&(l=(c=r)*(a.height/a.width)),(s=document.createElement("canvas")).height=l,s.width=c,s.getContext("2d").drawImage(a,0,0,c,l),i=s.toDataURL(ne.LO.svg);case 20:e.state.pendingImageElementId&&(0,A.KJ)(e.canvas,"url(".concat(i,") 4 4, auto"));case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onImageAction=(0,a.Z)(h.default.mark((function t(){var n,r,o,i,a,c,s,u,d,f=arguments;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=f.length>0&&void 0!==f[0]?f[0]:{insertOnCanvasDirectly:!1},r=n.insertOnCanvasDirectly,t.prev=1,o=e.state.width/2+e.state.offsetLeft,i=e.state.height/2+e.state.offsetTop,a=(0,A.dE)({clientX:o,clientY:i},e.state),c=a.x,s=a.y,t.next=7,(0,be.I$)({description:"Image",extensions:["jpg","png","svg","gif"]});case 7:u=t.sent,d=e.createImageElement({sceneX:c,sceneY:s}),r?(e.insertImageElement(d,u),e.initializeImageDimensions(d),e.setState({selectedElementIds:(0,l.Z)({},d.id,!0)},(function(){e.actionManager.executeAction(de)}))):e.setState({pendingImageElementId:d.id},(function(){e.insertImageElement(d,u,!0)})),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),"AbortError"!==t.t0.name?console.error(t.t0):console.warn(t.t0),e.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,A.Om)(e.state,{type:"selection"})},(function(){e.actionManager.executeAction(de)}));case 16:case"end":return t.stop()}}),t,null,[[1,12]])}))),this.initializeImageDimensions=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,L.wi)(t)&&(null===(n=e.imageCache.get(t.fileId))||void 0===n?void 0:n.image);if(!o||o instanceof Promise){if(t.width<ne.f/e.state.zoom.value&&t.height<ne.f/e.state.zoom.value){var i=100/e.state.zoom.value;(0,j.DR)(t,{x:t.x-i/2,y:t.y-i/2,width:i,height:i})}}else if(r||t.width<ne.f/e.state.zoom.value&&t.height<ne.f/e.state.zoom.value){var a=Math.max(e.state.height-120,160),l=Math.min(a,Math.floor(.5*e.state.height)/e.state.zoom.value),c=Math.min(o.naturalHeight,l),s=c*(o.naturalWidth/o.naturalHeight),u=t.x+t.width/2-s/2,d=t.y+t.height/2-c/2;(0,j.DR)(t,{x:u,y:d,width:s,height:c})}},this.updateImageCache=function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o,i,a,l,c,s,u=arguments;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:e.files,t.next=3,(0,oo.Xx)({imageCache:e.imageCache,fileIds:n.map((function(e){return e.fileId})),files:r});case 3:if(o=t.sent,i=o.updatedFiles,a=o.erroredFiles,i.size||a.size){l=lo(n);try{for(l.s();!(c=l.n()).done;)s=c.value,i.has(s.fileId)&&(0,vn.bI)(s)}catch(e){l.e(e)}finally{l.f()}}return a.size&&e.scene.replaceAllElements(e.scene.getElementsIncludingDeleted().map((function(e){return(0,L.wi)(e)&&a.has(e.fileId)?(0,j.BE)(e,{status:"error"}):e}))),t.abrupt("return",{updatedFiles:i,erroredFiles:a});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.addNewImagesToImageCache=(0,a.Z)(h.default.mark((function t(){var n,r,o,i,a=arguments;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:(0,oo.oA)(e.scene.getNonDeletedElements()),r=a.length>1&&void 0!==a[1]?a[1]:e.files,!(o=n.filter((function(t){return!t.isDeleted&&!e.imageCache.has(t.fileId)}))).length){t.next=9;break}return t.next=6,e.updateImageCache(o,r);case 6:i=t.sent,i.updatedFiles.size&&e.scene.informMutation();case 9:case"end":return t.stop()}}),t)}))),this.scheduleImageRefresh=(0,io.Z)((function(){e.addNewImagesToImageCache()}),ne.LL),this.updateBindingEnabledOnPointerMove=function(t){var n=(0,M.cz)(t);e.state.isBindingEnabled!==n&&e.setState({isBindingEnabled:n})},this.maybeSuggestBindingAtCursor=function(t){var n=(0,M.Y9)(t,e.scene);e.setState({suggestedBindings:null!=n?[n]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=function(t,n,r){if(n.length){var o=n.reduce((function(n,o){var i=(0,M.Y9)(o,e.scene);return null==i||(0,M.DK)(t,null==r?void 0:r.id,i)||n.push(i),n}),[]);e.setState({suggestedBindings:o})}},this.handleCanvasRef=function(t){var n,r,o;null!==t?(e.canvas=t,e.rc=b.Z.canvas(e.canvas),e.canvas.addEventListener(ne.Ks.WHEEL,e.handleWheel,{passive:!1}),e.canvas.addEventListener(ne.Ks.TOUCH_START,e.onTapStart),e.canvas.addEventListener(ne.Ks.TOUCH_END,e.onTapEnd)):(null===(n=e.canvas)||void 0===n||n.removeEventListener(ne.Ks.WHEEL,e.handleWheel),null===(r=e.canvas)||void 0===r||r.removeEventListener(ne.Ks.TOUCH_START,e.onTapStart),null===(o=e.canvas)||void 0===o||o.removeEventListener(ne.Ks.TOUCH_END,e.onTapEnd))},this.handleAppOnDrop=function(){var t=(0,a.Z)(h.default.mark((function t(n){var r,o,i,a,c,s,u,d,f,p;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,ge.bv)(n);case 2:if(r=t.sent,o=r.file,i=r.fileHandle,t.prev=5,!(0,ge.Wr)(o)){t.next=26;break}if((null==o?void 0:o.type)!==ne.LO.png&&(null==o?void 0:o.type)!==ne.LO.svg){t.next=20;break}return t.prev=8,t.next=11,(0,ge.cT)(o,e.state,e.scene.getElementsIncludingDeleted(),i);case 11:return a=t.sent,e.syncActionResult(uo(uo({},a),{},{appState:uo(uo({},a.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.abrupt("return");case 16:if(t.prev=16,t.t0=t.catch(8),"EncodingError"===t.t0.name){t.next=20;break}throw t.t0;case 20:return c=(0,A.dE)(n,e.state),s=c.x,u=c.y,d=e.createImageElement({sceneX:s,sceneY:u}),e.insertImageElement(d,o),e.initializeImageDimensions(d),e.setState({selectedElementIds:(0,l.Z)({},d.id,!0)}),t.abrupt("return");case 26:t.next=31;break;case 28:return t.prev=28,t.t1=t.catch(5),t.abrupt("return",e.setState({isLoading:!1,errorMessage:t.t1.message}));case 31:if(!(f=n.dataTransfer.getData(ne.LO.excalidrawlib))||"string"!=typeof f){t.next=35;break}try{p=(0,ge.wf)(f),e.addElementsFromPasteOrLibrary({elements:(0,on.WV)(p),position:n,files:null})}catch(t){e.setState({errorMessage:t.message})}return t.abrupt("return");case 35:if(!o){t.next=38;break}return t.next=38,e.loadFileToCanvas(o,i);case 38:case"end":return t.stop()}}),t,null,[[5,28],[8,16]])})));return function(e){return t.apply(this,arguments)}}(),this.loadFileToCanvas=function(){var t=(0,a.Z)(h.default.mark((function t(n,r){var o;return h.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,ge.gY)(n);case 2:return n=t.sent,t.prev=3,t.next=6,(0,ge.ZY)(n,e.state,e.scene.getElementsIncludingDeleted(),r);case 6:if((o=t.sent).type!==ne.LO.excalidraw){t.next=12;break}e.setState({isLoading:!0}),e.syncActionResult(uo(uo({},o.data),{},{appState:uo(uo({},o.data.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.next=15;break;case 12:if(o.type!==ne.LO.excalidrawlib){t.next=15;break}return t.next=15,e.library.updateLibrary({libraryItems:n,merge:!0,openLibraryMenu:!0}).catch((function(t){console.error(t),e.setState({errorMessage:(0,S.t)("errors.importLibraryError")})}));case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(3),e.setState({isLoading:!1,errorMessage:t.t0.message});case 20:case"end":return t.stop()}}),t,null,[[3,17]])})));return function(e,n){return t.apply(this,arguments)}}(),this.handleCanvasContextMenu=function(t){if(t.preventDefault(),"touch"!==t.nativeEvent.pointerType&&("pen"!==t.nativeEvent.pointerType||t.button===ne.Oh.SECONDARY)||"selection"===e.state.activeTool.type){var n=(0,A.dE)(t,e.state),r=n.x,o=n.y,i=e.getElementAtPosition(r,o,{preferSelected:!0,includeLockedElements:!0}),a=i?"element":"canvas",c=e.excalidrawContainerRef.current.getBoundingClientRect(),s=c.top,u=c.left,d=t.clientX-u,f=t.clientY-s;i&&!e.state.selectedElementIds[i.id]?e.setState((0,I.bO)(uo(uo({},e.state),{},{selectedElementIds:(0,l.Z)({},i.id,!0),selectedLinearElement:(0,L.bt)(i)?new T._(i,e.scene):null}),e.scene.getNonDeletedElements()),(function(){e._openContextMenu({top:f,left:d},a)})):e._openContextMenu({top:f,left:d},a)}},this.maybeDragNewGenericElement=function(t,n){var r=e.state.draggingElement,i=t.lastCoords;if(r)if("selection"===r.type&&"eraser"!==e.state.activeTool.type)(0,O.EJ)(r,e.state.activeTool.type,t.origin.x,t.origin.y,i.x,i.y,(0,A.TE)(t.origin.x,i.x),(0,A.TE)(t.origin.y,i.y),(0,k.E0)(n),(0,k.OA)(n));else{var a,l=(0,ce.wC)(i.x,i.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1],d=(0,L.wi)(r)&&(null===(a=e.imageCache.get(r.fileId))||void 0===a?void 0:a.image),f=!d||d instanceof Promise?null:d.width/d.height;(0,O.EJ)(r,e.state.activeTool.type,t.originInGrid.x,t.originInGrid.y,s,u,(0,A.TE)(t.originInGrid.x,s),(0,A.TE)(t.originInGrid.y,u),(0,L.pC)(r)?!(0,k.E0)(n):(0,k.E0)(n),(0,k.OA)(n),f),e.maybeSuggestBindingForAll([r])}},this.maybeHandleResize=function(t,n){var r=(0,w.eD)(e.scene.getNonDeletedElements(),e.state),i=t.resize.handleType;e.setState({isResizing:i&&"rotation"!==i,isRotating:"rotation"===i});var a=t.lastCoords,l=(0,ce.wC)(a.x-t.resize.offset.x,a.y-t.resize.offset.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];return!!(0,O.vY)(t,i,r,t.resize.arrowDirection,(0,k.Ge)(n),(0,k.OA)(n),1===r.length&&(0,L.pC)(r[0])?!(0,k.E0)(n):(0,k.E0)(n),s,u,t.resize.center.x,t.resize.center.y)&&(e.maybeSuggestBindingForAll(r),!0)},this._openContextMenu=function(t,n){var r=t.left,o=t.top;e.state.showHyperlinkPopup&&e.setState({showHyperlinkPopup:!1}),e.contextMenuOpen=!0;var i=qe.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),a=$e.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),l=yt.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),c=xt.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),s=Ft.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),u=Kt.contextItemPredicate(e.actionManager.getElementsIncludingDeleted(),e.actionManager.getAppState()),d="separator",f=e.scene.getNonDeletedElements(),p=(0,w.eD)(e.scene.getNonDeletedElements(),e.state),h=[];if(ve.vt&&f.length>0&&h.push(Mt),ve.wx&&f.length>0&&h.push(Tt),"element"===n&&Lt.contextItemPredicate(f,e.state)&&ve.wx&&h.push(Lt),"canvas"===n){var v=[].concat(h,[void 0===e.props.gridModeEnabled&&Dt,void 0===e.props.zenModeEnabled&&Zt,void 0===e.props.viewModeEnabled&&ro,Ht]);e.state.viewModeEnabled?kn({options:v,top:o,left:r,actionManager:e.actionManager,appState:e.state,container:e.excalidrawContainerRef.current,elements:f}):kn({options:[e.device.isMobile&&navigator.clipboard&&{trackEvent:!1,name:"paste",perform:function(t,n){return e.pasteFromClipboard(null),{commitToHistory:!1}},contextItemLabel:"labels.paste"},e.device.isMobile&&navigator.clipboard&&d,ve.vt&&f.length>0&&Mt,ve.wx&&f.length>0&&Tt,ve.wx&&p.length>0&&Lt,(ve.vt&&f.length>0||ve.wx&&f.length>0)&&d,te,d,void 0===e.props.gridModeEnabled&&Dt,void 0===e.props.zenModeEnabled&&Zt,void 0===e.props.viewModeEnabled&&ro,Ht],top:o,left:r,actionManager:e.actionManager,appState:e.state,container:e.excalidrawContainerRef.current,elements:f})}else"element"===n&&(e.state.viewModeEnabled?kn({options:[navigator.clipboard&&jt].concat(h),top:o,left:r,actionManager:e.actionManager,appState:e.state,container:e.excalidrawContainerRef.current,elements:f}):kn({options:[e.device.isMobile&&It,e.device.isMobile&&navigator.clipboard&&jt,e.device.isMobile&&navigator.clipboard&&{name:"paste",trackEvent:!1,perform:function(t,n){return e.pasteFromClipboard(null),{commitToHistory:!1}},contextItemLabel:"labels.paste"},e.device.isMobile&&d].concat(h,[d,Ne,Be,d,i&&qe,s&&Ft,u&&Kt,a&&$e,(i||a)&&d,at,d,X,q,$,J,d,l&&yt,c&&xt,(l||c)&&d,Vt.nz.contextItemPredicate(f,e.state)&&Vt.nz,ae,Xt,d,Z]),top:o,left:r,actionManager:e.actionManager,appState:e.state,container:e.excalidrawContainerRef.current,elements:f}))},this.handleWheel=(0,A.tH)((function(t){if(t.preventDefault(),!_o){var n=t.deltaX,r=t.deltaY;if(t.metaKey||t.ctrlKey){var o=Math.sign(r),i=Math.abs(r),a=r;i>10&&(a=10*o);var l=e.state.zoom.value-a/100;return l+=Math.log10(Math.max(1,e.state.zoom.value))*-o*Math.min(1,i/20),e.setState((function(e){return uo(uo({},(0,mn.E)({viewportX:xo,viewportY:wo,nextZoom:(0,w.j)(l)},e)),{},{shouldCacheIgnoreZoom:!0})})),void e.resetShouldCacheIgnoreZoomDebounced()}t.shiftKey?e.setState((function(e){var t=e.zoom;return{scrollX:e.scrollX-(r||n)/t.value}})):e.setState((function(e){var t=e.zoom,o=e.scrollX,i=e.scrollY;return{scrollX:o-n/t.value,scrollY:i-r/t.value}}))}})),this.savePointer=function(t,n,r){var o,i;if(t&&n){var a=(0,A.dE)({clientX:t,clientY:n},e.state);isNaN(a.x)||isNaN(a.y),null===(o=(i=e.props).onPointerUpdate)||void 0===o||o.call(i,{pointer:a,button:r,pointersMap:To.pointers})}},this.resetShouldCacheIgnoreZoomDebounced=(0,A.Ds)((function(){e.unmounted||e.setState({shouldCacheIgnoreZoom:!1})}),300),this.updateDOMRect=function(t){var n;if(null!==(n=e.excalidrawContainerRef)&&void 0!==n&&n.current){var r=e.excalidrawContainerRef.current.getBoundingClientRect(),o=r.width,i=r.height,a=r.left,l=r.top,c=e.state,s=c.width,u=c.height,d=c.offsetTop,f=c.offsetLeft;if(o===s&&i===u&&a===f&&l===d)return void(t&&t());e.setState({width:o,height:i,offsetLeft:a,offsetTop:l},(function(){t&&t()}))}},this.refresh=function(){e.setState(uo({},e.getCanvasOffsets()))}};"production"!==ne.Vi.TEST&&"production"!==ne.Vi.DEVELOPMENT||(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.scene.getElementsIncludingDeleted()},set:function(e){var t;return null===(t=this.app)||void 0===t?void 0:t.scene.replaceAllElements(e)}}}));var Ao=Mo},5564:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var r=n(668),o=n(9787),i=n.n(o),a=n(7288),l=n(6340),c=(n(4220),n(6066)),s=n(8211),u=n(56),d=n(1337),f=function(e,t){return!u.Z[t].includes(e)},p=function(e){var t=(new Option).style;return t.color=e,!!t.color},h=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),v=function(e){var t=e.colors,n=e.color,o=e.onChange,a=e.onClose,u=e.label,p=e.showInput,v=void 0===p||p,g=e.type,b=e.elements,y=i().useRef(),x=i().useRef(),w=i().useRef(),k=i().useRef(),_=i().useState((function(){return"canvasBackground"===g?[]:function(e,t){for(var n=[],r=e.filter((function(e){return!e.isDeleted})).sort((function(e,t){return t.updated-e.updated})),o=0,i={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[t];o<r.length&&n.length<5;){var a=r[o];n.length<5&&f(a[i],t)&&!n.includes(a[i])&&n.push(a[i]),o++}return n}(b,g)})),E=(0,r.Z)(_,1)[0];i().useEffect((function(){x.current?x.current.focus():k.current?k.current.focus():w.current&&w.current.focus()}),[]);var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map((function(e,r){var i=e.replace("#",""),a=t?h[r+15]:h[r],c=t?i:(0,s.t)("colors.".concat(i));return(0,d.jsxs)("button",{className:"color-picker-swatch",onClick:function(t){t.currentTarget.focus(),o(e)},title:"".concat(c).concat((0,l.Qm)(e)?"":" (".concat(e,")")," — ").concat(a.toUpperCase()),"aria-label":c,"aria-keyshortcuts":h[r],style:{color:e},ref:function(o){!t&&o&&0===r&&(y.current=o),o&&e===n&&(x.current=o)},onFocus:function(){o(e)},children:[(0,l.Qm)(e)?(0,d.jsx)("div",{className:"color-picker-transparent"}):void 0,(0,d.jsx)("span",{className:"color-picker-keybinding",children:a})]},e)}))};return(0,d.jsxs)("div",{className:"color-picker color-picker-type-".concat(g),role:"dialog","aria-modal":"true","aria-label":(0,s.t)("labels.colorPicker"),onKeyDown:function(e){var t=!1;if((0,c.Wl)(e.key)){var n,r,o;t=!0;var i,u=document.activeElement,d=(0,s.G3)().rtl,f=!1,p=Array.prototype.indexOf.call(null===(n=w.current.querySelector(".color-picker-content--default"))||void 0===n?void 0:n.children,u);if(-1===p)-1!==(p=Array.prototype.indexOf.call(null===(i=w.current.querySelector(".color-picker-content--canvas-colors"))||void 0===i?void 0:i.children,u))&&(f=!0);var m=f?null===(r=w.current)||void 0===r?void 0:r.querySelector(".color-picker-content--canvas-colors"):null===(o=w.current)||void 0===o?void 0:o.querySelector(".color-picker-content--default");if(m&&-1!==p){var g,b=m.children.length-(v?1:0),y=e.key===(d?c.tW.ARROW_LEFT:c.tW.ARROW_RIGHT)?(p+1)%b:e.key===(d?c.tW.ARROW_RIGHT:c.tW.ARROW_LEFT)?(b+p-1)%b:f||e.key!==c.tW.ARROW_DOWN?f||e.key!==c.tW.ARROW_UP?p:(b+p-5)%b:(p+5)%b;null===(g=m.children[y])||void 0===g||g.focus()}e.preventDefault()}else if(!h.includes(e.key.toLowerCase())||e[c.tW.CTRL_OR_CMD]||e.altKey||(0,l.s)(e.target))e.key!==c.tW.ESCAPE&&e.key!==c.tW.ENTER||(t=!0,e.preventDefault(),a());else{var x,k,_;t=!0;var E=h.indexOf(e.key.toLowerCase()),S=E>=15,C=S?null==w||null===(x=w.current)||void 0===x?void 0:x.querySelector(".color-picker-content--canvas-colors"):null==w||null===(k=w.current)||void 0===k?void 0:k.querySelector(".color-picker-content--default"),O=S?E-15:E;null==C||null===(_=C.children[O])||void 0===_||_.focus(),e.preventDefault()}t&&(e.nativeEvent.stopImmediatePropagation(),e.stopPropagation())},children:[(0,d.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,d.jsx)("div",{className:"color-picker-triangle"}),(0,d.jsxs)("div",{className:"color-picker-content",ref:function(e){e&&(w.current=e)},tabIndex:-1,children:[(0,d.jsx)("div",{className:"color-picker-content--default",children:S(t)}),!!E.length&&(0,d.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,d.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,s.t)("labels.canvasColors")}),(0,d.jsx)("div",{className:"color-picker-content--canvas-colors",children:S(E,!0)})]}),v&&(0,d.jsx)(m,{color:n,label:u,onChange:function(e){o(e)},ref:k})]})]})},m=i().forwardRef((function(e,t){var n=e.color,o=e.onChange,a=e.label,c=i().useState(n),s=(0,r.Z)(c,2),u=s[0],f=s[1],h=i().useRef(null);i().useEffect((function(){f(n)}),[n]),i().useImperativeHandle(t,(function(){return h.current}));var v=i().useCallback((function(e){var t=e.toLowerCase(),n=function(e){return(0,l.Qm)(e)||p(e)?e:p("#".concat(e))?"#".concat(e):null}(t);n&&o(n),f(t)}),[o]);return(0,d.jsxs)("label",{className:"color-input-container",children:[(0,d.jsx)("div",{className:"color-picker-hash",children:"#"}),(0,d.jsx)("input",{spellCheck:!1,className:"color-picker-input","aria-label":a,onChange:function(e){return v(e.target.value)},value:(u||"").replace(/^#/,""),onBlur:function(){return f(n)},ref:h})]})})),g=function(e){var t=e.type,n=e.color,r=e.onChange,o=e.label,l=e.isActive,c=e.setActive,s=e.elements,f=(e.appState,i().useRef(null));return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"color-picker-control-container",children:[(0,d.jsx)("button",{className:"color-picker-label-swatch","aria-label":o,style:n?{"--swatch-color":n}:void 0,onClick:function(){return c(!l)},ref:f}),(0,d.jsx)(m,{color:n,label:o,onChange:function(e){r(e)}})]}),(0,d.jsx)(i().Suspense,{fallback:"",children:l?(0,d.jsx)(a.J,{onCloseRequest:function(e){return e.target!==f.current&&c(!1)},children:(0,d.jsx)(v,{colors:u.Z[t],color:n||null,onChange:function(e){r(e)},onClose:function(){var e;c(!1),null===(e=f.current)||void 0===e||e.focus()},label:o,showInput:!1,type:t,elements:s})}):null})]})}},4981:function(e,t,n){"use strict";var r=n(489),o=n(8357),i=n(8211),a=n(2939),l=n(1319),c=(n(4678),n(1337)),s=["onConfirm","onCancel","children","confirmText","cancelText","className"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.onConfirm,n=e.onCancel,r=e.children,u=e.confirmText,f=void 0===u?(0,i.t)("buttons.confirm"):u,p=e.cancelText,h=void 0===p?(0,i.t)("buttons.cancel"):p,v=e.className,m=void 0===v?"":v,g=(0,o.Z)(e,s);return(0,c.jsxs)(a.V,d(d({onCloseRequest:n,small:!0},g),{},{className:"confirm-dialog ".concat(m),children:[r,(0,c.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,c.jsx)(l.V,{type:"button",title:h,"aria-label":h,label:h,onClick:n,className:"confirm-dialog--cancel"}),(0,c.jsx)(l.V,{type:"button",title:f,"aria-label":f,label:f,onClick:t,className:"confirm-dialog--confirm"})]})]}))}},4041:function(e,t,n){"use strict";n.d(t,{J:function(){return l}});n(5422);var r=n(8211),o=n(1319),i=n(8288),a=n(1337),l=function(e){var t=e.title||("dark"===e.value?(0,r.t)("buttons.lightMode"):(0,r.t)("buttons.darkMode"));return(0,a.jsx)(o.V,{type:"icon",icon:e.value===i.C6.LIGHT?c.MOON:c.SUN,title:t,"aria-label":t,onClick:function(){return e.onChange(e.value===i.C6.DARK?i.C6.LIGHT:i.C6.DARK)},"data-testid":"toggle-dark-mode"})},c={SUN:(0,a.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,a.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:(0,a.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,a.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})}},2939:function(e,t,n){"use strict";n.d(t,{V:function(){return g}});var r=n(668),o=n(741),i=n(9787),a=n(8211),l=n(9660),c=n(6066),s=(n(196),n(3646)),u=n(1226),d=(n(8328),n(5156)),f=n(8288),p=n(1337),h=function(e){var t=e.theme,n=void 0===t?f.C6.LIGHT:t,r=e.closeOnClickOutside,i=void 0===r||r,a=v(n);if(!a)return null;return(0,d.createPortal)((0,p.jsxs)("div",{className:(0,o.Z)("Modal",e.className),role:"dialog","aria-modal":"true",onKeyDown:function(t){t.key===c.tW.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,children:[(0,p.jsx)("div",{className:"Modal__background",onClick:i?e.onCloseRequest:void 0}),(0,p.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(e.maxWidth,"px")},tabIndex:0,children:e.children})]}),a)},v=function(e){var t=(0,i.useState)(null),n=(0,r.Z)(t,2),o=n[0],a=n[1],c=(0,l.Fy)(),s=(0,i.useRef)(c.isMobile);s.current=c.isMobile;var u=(0,l.J0)().container;return(0,i.useLayoutEffect)((function(){o&&o.classList.toggle("excalidraw--mobile",c.isMobile)}),[o,c.isMobile]),(0,i.useLayoutEffect)((function(){var t=!(null==u||!u.classList.contains("theme--dark"))||"dark"===e,n=document.createElement("div");return n.classList.add("excalidraw","excalidraw-modal-container"),n.classList.toggle("excalidraw--mobile",s.current),t&&(n.classList.add("theme--dark"),n.classList.add("theme--dark-background-none")),document.body.appendChild(n),a(n),function(){document.body.removeChild(n)}}),[u,e]),o},m=n(6340),g=function(e){var t=function(){var e=(0,i.useState)(null),t=(0,r.Z)(e,2),n=t[0],o=t[1];return[n,(0,i.useCallback)((function(e){return o(e)}),[])]}(),n=(0,r.Z)(t,2),d=n[0],f=n[1],v=(0,i.useState)(document.activeElement),g=(0,r.Z)(v,1)[0],b=(0,l.J0)().id;(0,i.useEffect)((function(){if(d){var t=(0,m.xp)(d);t.length>0&&!1!==e.autofocus&&(t[1]||t[0]).focus();var n=function(e){if(e.key===c.tW.TAB){var t=(0,m.xp)(d),n=document.activeElement,r=t.findIndex((function(e){return e===n}));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault())}};return d.addEventListener("keydown",n),function(){return d.removeEventListener("keydown",n)}}}),[d,e.autofocus]);var y=function(){g.focus(),e.onCloseRequest()};return(0,p.jsx)(h,{className:(0,o.Z)("Dialog",e.className),labelledBy:"dialog-title",maxWidth:e.small?550:800,onCloseRequest:y,theme:e.theme,closeOnClickOutside:e.closeOnClickOutside,children:(0,p.jsxs)(u.W,{ref:f,children:[(0,p.jsxs)("h2",{id:"".concat(b,"-dialog-title"),className:"Dialog__title",children:[(0,p.jsx)("span",{className:"Dialog__titleContent",children:e.title}),(0,p.jsx)("button",{className:"Modal__close",onClick:y,title:(0,a.t)("buttons.close"),"aria-label":(0,a.t)("buttons.close"),children:(0,l.Fy)().isMobile?s.op:s.xv})]}),(0,p.jsx)("div",{className:"Dialog__content",children:e.children})]})})}},1226:function(e,t,n){"use strict";n.d(t,{W:function(){return u}});var r=n(489),o=(n(1106),n(9787)),i=n.n(o),a=n(741),l=n(1337);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=i().forwardRef((function(e,t){var n=e.children,r=e.padding,o=e.className,i=e.style;return(0,l.jsx)("div",{className:(0,a.Z)("Island",o),style:s({"--padding":r},i),ref:t,children:n})}))},5440:function(e,t,n){"use strict";n.d(t,{z:function(){return c}});var r=n(668),o=n(8211),i=n(9787),a=n(9101),l=n(1337),c=function(e){var t=e.delay,n=(0,i.useState)(!!t),c=(0,r.Z)(n,2),s=c[0],u=c[1];return(0,i.useEffect)((function(){if(t){var e=setTimeout((function(){u(!1)}),t);return function(){return clearTimeout(e)}}}),[t]),s?null:(0,l.jsxs)("div",{className:"LoadingMessage",children:[(0,l.jsx)("div",{children:(0,l.jsx)(a.Z,{})}),(0,l.jsx)("div",{className:"LoadingMessage-text",children:(0,o.t)("labels.loadingScene")})]})}},7288:function(e,t,n){"use strict";n.d(t,{J:function(){return c}});var r=n(9787),o=(n(4301),n(5156)),i=n(6340),a=n(6066),l=n(1337),c=function(e){var t=e.children,n=e.left,c=e.top,s=e.onCloseRequest,u=e.fitInViewport,d=void 0!==u&&u,f=e.offsetLeft,p=void 0===f?0:f,h=e.offsetTop,v=void 0===h?0:h,m=e.viewportWidth,g=void 0===m?window.innerWidth:m,b=e.viewportHeight,y=void 0===b?window.innerHeight:b,x=(0,r.useRef)(null),w=x.current;return(0,r.useEffect)((function(){if(w){var e=function(e){if(e.key===a.tW.TAB){var t=(0,i.xp)(w),n=document.activeElement,r=t.findIndex((function(e){return e===n}));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault(),e.stopImmediatePropagation()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault(),e.stopImmediatePropagation())}};return w.addEventListener("keydown",e),function(){return w.removeEventListener("keydown",e)}}}),[w]),(0,r.useLayoutEffect)((function(){if(d&&x.current){var e=x.current,t=e.getBoundingClientRect(),n=t.x,r=t.y,o=t.width,i=t.height;n+o-p>g&&(e.style.left="".concat(g-o-10,"px")),r+i-v>y&&(e.style.top="".concat(y-i,"px")),i>=y&&(e.style.height="".concat(y-20,"px"),e.style.top="10px",e.style.overflowY="scroll"),o>=g&&(e.style.width="".concat(g,"px"),e.style.left="0px",e.style.overflowX="scroll")}}),[d,g,y,p,v]),(0,r.useEffect)((function(){if(s){var e=function(e){var t;null!==(t=x.current)&&void 0!==t&&t.contains(e.target)||(0,o.unstable_batchedUpdates)((function(){return s(e)}))};return document.addEventListener("pointerdown",e,!1),function(){return document.removeEventListener("pointerdown",e,!1)}}}),[s]),(0,l.jsx)("div",{className:"popover",style:{top:c,left:n},ref:x,children:t})}},9101:function(e,t,n){"use strict";n(371);var r=n(1337);t.Z=function(e){var t=e.size,n=void 0===t?"1em":t,o=e.circleWidth,i=void 0===o?8:o;return(0,r.jsx)("div",{className:"Spinner",children:(0,r.jsx)("svg",{viewBox:"0 0 100 100",style:{width:n,height:n},children:(0,r.jsx)("circle",{cx:"50",cy:"50",r:50-i/2,strokeWidth:i,fill:"none",strokeMiterlimit:"10"})})})}},1319:function(e,t,n){"use strict";n.d(t,{V:function(){return p}});var r=n(6759),o=n(668),i=n(3152),a=(n(5422),n(9787)),l=n.n(a),c=n(741),s=n(9660),u=n(9519),d=n(9101),f=n(1337),p=l().forwardRef((function(e,t){var n=(0,s.J0)().id,p=l().useRef(null);l().useImperativeHandle(t,(function(){return p.current}));var h="ToolIcon_size_".concat(e.size),v=(0,a.useState)(!1),m=(0,o.Z)(v,2),g=m[0],b=m[1],y=(0,a.useRef)(!0),x=function(){var t=(0,r.Z)(i.default.mark((function t(n){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o="onClick"in e&&(null===(r=e.onClick)||void 0===r?void 0:r.call(e,n)))||!("then"in o)){t.next=18;break}return t.prev=2,b(!0),t.next=6,o;case 6:t.next=15;break;case 8:if(t.prev=8,t.t0=t.catch(2),t.t0 instanceof u._){t.next=14;break}throw t.t0;case 14:console.warn(t.t0);case 15:return t.prev=15,y.current&&b(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,8,15,18]])})));return function(e){return t.apply(this,arguments)}}();(0,a.useEffect)((function(){return function(){y.current=!1}}),[]);var w=(0,a.useRef)(null);if("button"===e.type||"icon"===e.type||"submit"===e.type){var k="icon"===e.type?"button":e.type;return(0,f.jsxs)("button",{className:(0,c.Z)("ToolIcon_type_button",h,e.className,e.visible&&!e.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!e.hidden,"ToolIcon--selected":e.selected,"ToolIcon--plain":"icon"===e.type}),"data-testid":e["data-testid"],hidden:e.hidden,title:e.title,"aria-label":e["aria-label"],type:k,onClick:x,ref:p,disabled:g||e.isLoading,children:[(e.icon||e.label)&&(0,f.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[e.icon||e.label,e.keyBindingLabel&&(0,f.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel}),e.isLoading&&(0,f.jsx)(d.Z,{})]}),e.showAriaLabel&&(0,f.jsxs)("div",{className:"ToolIcon__label",children:[e["aria-label"]," ",g&&(0,f.jsx)(d.Z,{})]}),e.children]})}return(0,f.jsxs)("label",{className:(0,c.Z)("ToolIcon",e.className),title:e.title,onPointerDown:function(t){var n;w.current=t.pointerType||null,null===(n=e.onPointerDown)||void 0===n||n.call(e,{pointerType:t.pointerType||null})},onPointerUp:function(){requestAnimationFrame((function(){w.current=null}))},children:[(0,f.jsx)("input",{className:"ToolIcon_type_radio ".concat(h),type:"radio",name:e.name,"aria-label":e["aria-label"],"aria-keyshortcuts":e["aria-keyshortcuts"],"data-testid":e["data-testid"],id:"".concat(n,"-").concat(e.id),onChange:function(){var t;null===(t=e.onChange)||void 0===t||t.call(e,{pointerType:w.current})},checked:e.checked,ref:p}),(0,f.jsxs)("div",{className:"ToolIcon__icon",children:[e.icon,e.keyBindingLabel&&(0,f.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel})]})]})}));p.defaultProps={visible:!0,className:"",size:"medium"}},9910:function(e,t,n){"use strict";n.d(t,{Js:function(){return a},bK:function(){return i},u:function(){return l}});n(6781);var r=n(9787),o=n(1337),i=function(){var e=document.querySelector(".excalidraw-tooltip");if(e)return e;var t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},a=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bottom",o=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,l=5,c=t.left+t.width/2-o.width/2;c<0?c=l:c+o.width>=i&&(c=i-o.width-l),"bottom"===r?(n=t.top+t.height+l)+o.height>=a&&(n=t.top-o.height-l):(n=t.top-o.height-l)<0&&(n=t.top+t.height+l),Object.assign(e.style,{top:"".concat(n,"px"),left:"".concat(c,"px")})},l=function(e){var t=e.children,n=e.label,l=e.long,c=void 0!==l&&l,s=e.style;return(0,r.useEffect)((function(){return function(){return i().classList.remove("excalidraw-tooltip--visible")}}),[]),(0,o.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(e){return function(e,t,n,r){t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=r?"50ch":"10ch",t.style.maxWidth=r?"50ch":"15ch",t.textContent=n;var o=e.getBoundingClientRect();a(t,o)}(e.currentTarget,i(),n,c)},onPointerLeave:function(){return i().classList.remove("excalidraw-tooltip--visible")},style:s,children:t})}},3646:function(e,t,n){"use strict";n.d(t,{$c:function(){return S},BF:function(){return Y},BR:function(){return g},Ct:function(){return P},DG:function(){return y},DS:function(){return ae},EO:function(){return ke},GI:function(){return C},Gc:function(){return M},HL:function(){return D},IN:function(){return L},KX:function(){return j},Nw:function(){return Se},OA:function(){return ve},P7:function(){return Ee},RJ:function(){return G},Rb:function(){return w},ST:function(){return B},TP:function(){return k},Vl:function(){return I},W2:function(){return oe},W5:function(){return N},WD:function(){return x},X7:function(){return $},Yw:function(){return O},_I:function(){return b},a0:function(){return X},a1:function(){return h},aA:function(){return _e},aT:function(){return te},bf:function(){return ne},d9:function(){return K},eQ:function(){return f},fr:function(){return le},gK:function(){return H},gR:function(){return Ce},h0:function(){return ee},il:function(){return ce},j8:function(){return de},kK:function(){return me},kM:function(){return re},kr:function(){return _},m:function(){return ue},mh:function(){return R},np:function(){return q},nq:function(){return pe},nu:function(){return Q},o3:function(){return xe},oT:function(){return we},op:function(){return F},p4:function(){return p},po:function(){return v},pw:function(){return A},q0:function(){return fe},rC:function(){return W},rn:function(){return Oe},rr:function(){return ye},t5:function(){return T},tP:function(){return V},tW:function(){return he},tY:function(){return J},tn:function(){return se},uD:function(){return Z},vG:function(){return E},vo:function(){return ge},wr:function(){return ie},xs:function(){return z},xv:function(){return U},z6:function(){return be},zD:function(){return m}});var r=n(9787),o=n.n(r),i=n(5284),a=n(741),l=n(8288),c=n(1337),s=function(e){return e===l.C6.LIGHT?i.orange[4]:i.orange[9]},u=function(e){return e===l.C6.LIGHT?i.white:"#1e1e1e"},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,n="number"==typeof t?{width:t}:t,r=n.width,o=void 0===r?512:r,i=n.height,l=void 0===i?o:i,s=n.mirror,u=n.style;return(0,c.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(o," ").concat(l),className:(0,a.Z)({"rtl-mirror":s}),style:u,children:"string"==typeof e?(0,c.jsx)("path",{fill:"currentColor",d:e}):e})},f=d((0,c.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),p=d("M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z",{mirror:!0}),h=d("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),v=d("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),m=d("M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z",{width:576,height:512,mirror:!0}),g=d("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),b=d("M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z",{width:448,height:512}),y=d("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),x=d("M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z",{width:576,height:512,mirror:!0}),w=d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-187 44v-64 64z"}),(0,c.jsx)("path",{d:"M384 121.941V128H256V0h6.059c6.362 0 12.471 2.53 16.97 7.029l97.941 97.941a24.01 24.01 0 017.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"})]}),{width:576,height:512,mirror:!0}),k=d("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),_=d("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),E=d("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),S=d("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),C=d("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),O=d("M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z",{mirror:!0}),j=d("M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z",{mirror:!0}),I=d("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),T=(d("M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",{width:24,height:24}),d("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,c.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),d((0,c.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H16v8H8v4.444C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24,mirror:!0})}))),M=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:s(t),stroke:s(t),strokeWidth:"2"}),(0,c.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H9.556C8.696 8 8 8.697 8 9.556v10.888C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})})),L=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M13 21a1 1 0 001 1h7a1 1 0 001-1v-7a1 1 0 00-1-1h-3v5h-5v3zM11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h3V6h5V3z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),A=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:s(t),stroke:s(t),strokeWidth:"2"}),(0,c.jsx)("path",{d:"M11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h8V3zM22 14a1 1 0 00-1-1h-7a1 1 0 00-1 1v7a1 1 0 001 1h8v-8z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})})),P=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M 2,5 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"M 6,7 C 5.446,7 5,7.446 5,8 v 9.999992 c 0,0.554 0.446,1 1,1 h 3.0000001 c 0.554,0 0.9999999,-0.446 0.9999999,-1 V 8 C 10,7.446 9.5540001,7 9.0000001,7 Z m 9,0 c -0.554,0 -1,0.446 -1,1 v 5.999992 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 V 8 C 19,7.446 18.554,7 18,7 Z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),D=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M 2,19 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"m 6,16.999992 c -0.554,0 -1,-0.446 -1,-1 V 6 C 5,5.446 5.446,5 6,5 H 9.0000001 C 9.5540001,5 10,5.446 10,6 v 9.999992 c 0,0.554 -0.4459999,1 -0.9999999,1 z m 9,0 c -0.554,0 -1,-0.446 -1,-1 V 10 c 0,-0.554 0.446,-1 1,-1 h 3 c 0.554,0 1,0.446 1,1 v 5.999992 c 0,0.554 -0.446,1 -1,1 z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24,mirror:!0})})),z=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M 5,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"m 7.000004,5.999996 c 0,-0.554 0.446,-1 1,-1 h 9.999992 c 0.554,0 1,0.446 1,1 v 3.0000001 c 0,0.554 -0.446,0.9999999 -1,0.9999999 H 8.000004 c -0.554,0 -1,-0.4459999 -1,-0.9999999 z m 0,9 c 0,-0.554 0.446,-1 1,-1 h 5.999992 c 0.554,0 1,0.446 1,1 v 3 c 0,0.554 -0.446,1 -1,1 H 8.000004 c -0.554,0 -1,-0.446 -1,-1 z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24})})),R=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M 19,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"m 16.999996,5.999996 c 0,-0.554 -0.446,-1 -1,-1 H 6.000004 c -0.554,0 -1,0.446 -1,1 v 3.0000001 c 0,0.554 0.446,0.9999999 1,0.9999999 h 9.999992 c 0.554,0 1,-0.4459999 1,-0.9999999 z m 0,9 c 0,-0.554 -0.446,-1 -1,-1 h -5.999992 c -0.554,0 -1,0.446 -1,1 v 3 c 0,0.554 0.446,1 1,1 h 5.999992 c 0.554,0 1,-0.446 1,-1 z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24})})),Z=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M19 5V19M5 5V19",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24})})),N=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M5 5L19 5M5 19H19",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,c.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:s(t),stroke:s(t),strokeWidth:"2"})]}),{width:24})})),B=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"m 5.000004,16.999996 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -10 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z m 9,-2 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -6 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z",fill:s(t),stroke:s(t),strokeWidth:"2"}),(0,c.jsx)("path",{d:"M 2,12 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24,mirror:!0})})),H=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M 7 5 C 6.446 5 6 5.446 6 6 L 6 9 C 6 9.554 6.446 10 7 10 L 17 10 C 17.554 10 18 9.554 18 9 L 18 6 C 18 5.446 17.554 5 17 5 L 7 5 z M 9 14 C 8.446 14 8 14.446 8 15 L 8 18 C 8 18.554 8.446 19 9 19 L 15 19 C 15.554 19 16 18.554 16 18 L 16 15 C 16 14.446 15.554 14 15 14 L 9 14 z ",fill:s(t),stroke:s(t),strokeWidth:"2"}),(0,c.jsx)("path",{d:"M 12,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24})})),W=d("M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z",{width:640,height:512,mirror:!0}),U=(d("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),d("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),d("M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z",{width:352,height:512})),F=d("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),K=d("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),V=(d("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),d("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512})),Y=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,c.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,c.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsxs)("g",{fill:u(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,c.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),G=o().memo((function(e){var t=e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,c.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,c.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,c.jsxs)("g",{fill:u(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,c.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,c.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),X=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})})),q=o().memo((function(e){e.theme;return d((0,c.jsxs)("g",{fill:"var(--icon-fill-color)",fillRule:"evenodd",clipRule:"evenodd",children:[(0,c.jsx)("path",{d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z"}),(0,c.jsx)("path",{d:"M14.0001 18L3.00006 4.00002L4.5727 2.76438L15.5727 16.7644L14.0001 18ZM25.0001 18L14.0001 4.00002L15.5727 2.76438L26.5727 16.7644L25.0001 18ZM36.0001 18L25.0001 4.00002L26.5727 2.76438L37.5727 16.7644L36.0001 18Z"})]}),{width:40,height:20})})),$=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M2 2H38V18H2V2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})})),J=o().memo((function(e){e.theme;var t=e.strokeWidth;return d((0,c.jsx)("path",{d:"M6 10H32",stroke:"var(--icon-fill-color)",strokeWidth:t,strokeLinecap:"round",fill:"none"}),{width:40,height:20})})),Q=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),ee=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"10, 8",fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),te=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M6 10H36",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"2, 4.5",fill:"none",strokeLinecap:"round"}),{width:40,height:20})})),ne=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M3.00098 16.1691C6.28774 13.9744 19.6399 2.8905 22.7215 3.00082C25.8041 3.11113 19.1158 15.5488 21.4962 16.8309C23.8757 18.1131 34.4155 11.7148 37.0001 10.6919",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),re=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M3 17C6.68158 14.8752 16.1296 9.09849 22.0648 6.54922C28 3.99995 22.2896 13.3209 25 14C27.7104 14.6791 36.3757 9.6471 36.3757 9.6471M6.40706 15C13 11.1918 20.0468 1.51045 23.0234 3.0052C26 4.49995 20.457 12.8659 22.7285 16.4329C25 20 36.3757 13 36.3757 13",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),oe=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M3 15.6468C6.93692 13.5378 22.5544 2.81528 26.6206 3.00242C30.6877 3.18956 25.6708 15.3346 27.4009 16.7705C29.1309 18.2055 35.4001 12.4762 37 11.6177M3.97143 10.4917C6.61158 9.24563 16.3706 2.61886 19.8104 3.01724C23.2522 3.41472 22.0773 12.2013 24.6181 12.8783C27.1598 13.5536 33.3179 8.04068 35.0571 7.07244",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),ie=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M10 17L10 5L35 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),ae=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M10 17V15C10 8 13 5 21 5L33.5 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})})),le=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"}),{width:40,height:20})})),ce=o().memo((function(e){e.theme;var t=e.flip,n=void 0!==t&&t;return d((0,c.jsxs)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",children:[(0,c.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,c.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})})),se=o().memo((function(e){e.theme;var t=e.flip,n=void 0!==t&&t;return d((0,c.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,c.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,c.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})})),ue=o().memo((function(e){e.theme;var t=e.flip,n=void 0!==t&&t;return d((0,c.jsx)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",children:(0,c.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"})}),{width:40,height:20})})),de=o().memo((function(e){e.theme;var t=e.flip,n=void 0!==t&&t;return d((0,c.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,c.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,c.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})})),fe=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 0 69.092 L 0 55.03 A 124.24 124.24 0 0 0 4.706 57.02 Q 6.826 57.863 8.708 58.5 A 53.466 53.466 0 0 0 12.231 59.571 Q 17.236 60.889 21.387 60.889 A 20.909 20.909 0 0 0 24.265 60.704 Q 25.719 60.502 26.903 60.077 A 8.649 8.649 0 0 0 29.028 58.985 Q 31.689 57.08 31.689 53.321 Q 31.689 51.221 30.518 49.585 A 10.126 10.126 0 0 0 29.282 48.177 Q 28.352 47.287 27.075 46.436 A 23.719 23.719 0 0 0 25.752 45.627 Q 23.774 44.492 20.176 42.735 A 254.44 254.44 0 0 0 17.822 41.602 Q 11.503 38.631 8.236 35.888 A 19.742 19.742 0 0 1 8.008 35.694 A 22.18 22.18 0 0 1 2.783 29.102 Q 0.83 25.342 0.83 20.313 A 22.471 22.471 0 0 1 1.733 13.778 A 17.283 17.283 0 0 1 7.251 5.42 A 21.486 21.486 0 0 1 15.177 1.272 Q 18.361 0.338 22.166 0.09 A 43.573 43.573 0 0 1 25 0 A 42.399 42.399 0 0 1 34.349 1.01 A 39.075 39.075 0 0 1 35.62 1.319 A 67.407 67.407 0 0 1 42.108 3.382 A 83.357 83.357 0 0 1 46.191 5.03 L 41.309 16.797 Q 35.596 14.453 31.86 13.526 A 30.762 30.762 0 0 0 25.417 12.612 A 28.337 28.337 0 0 0 24.512 12.598 A 14.846 14.846 0 0 0 22.022 12.793 Q 19.498 13.224 17.92 14.6 Q 15.625 16.602 15.625 19.824 Q 15.625 21.826 16.553 23.316 Q 17.48 24.805 19.507 26.197 A 18.343 18.343 0 0 0 20.659 26.912 Q 22.596 28.035 26.516 29.953 A 299.99 299.99 0 0 0 29.102 31.201 Q 37.91 35.412 41.841 39.642 A 16.553 16.553 0 0 1 42.822 40.796 A 17.675 17.675 0 0 1 46.301 49.233 A 23.517 23.517 0 0 1 46.533 52.588 A 21.581 21.581 0 0 1 45.471 59.515 A 17.733 17.733 0 0 1 39.575 67.823 Q 33.745 72.486 24.094 73.243 A 49.683 49.683 0 0 1 20.215 73.389 A 51.712 51.712 0 0 1 9.448 72.315 A 40.672 40.672 0 0 1 0 69.092 Z"}),{width:47,height:77})})),pe=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 30.225 71.387 L 13.037 15.381 L 12.598 15.381 A 1505.093 1505.093 0 0 1 12.959 22.313 Q 13.426 31.715 13.508 36.4 A 102.991 102.991 0 0 1 13.525 38.184 L 13.525 71.387 L 0 71.387 L 0 0 L 20.605 0 L 37.5 54.59 L 37.793 54.59 L 55.713 0 L 76.318 0 L 76.318 71.387 L 62.207 71.387 L 62.207 37.598 Q 62.207 35.205 62.28 32.08 A 160.703 160.703 0 0 1 62.326 30.544 Q 62.452 26.754 62.866 17.168 A 5390.536 5390.536 0 0 1 62.939 15.479 L 62.5 15.479 L 44.092 71.387 Z"}),{width:77,height:75})})),he=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 0 71.387 L 0 0 L 15.137 0 L 15.137 58.887 L 44.092 58.887 L 44.092 71.387 Z"}),{width:45,height:75})})),ve=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 42.578 35.4 L 66.699 71.387 L 49.414 71.387 L 32.813 44.385 L 16.211 71.387 L 0 71.387 L 23.682 34.57 L 1.514 0 L 18.213 0 L 33.594 25.684 L 48.682 0 L 64.99 0 L 42.578 35.4 Z M 119.775 71.387 L 75.684 71.387 L 75.684 0 L 90.82 0 L 90.82 58.887 L 119.775 58.887 L 119.775 71.387 Z"}),{width:120,height:75})})),me=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"}),{width:448,height:512})})),ge=o().memo((function(e){e.theme;return d((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 63.818 71.68 L 54.492 71.68 L 45.898 49.561 L 17.578 49.561 L 9.082 71.68 L 0 71.68 L 27.881 0 L 35.986 0 L 63.818 71.68 Z M 20.605 41.602 L 43.213 41.602 L 35.205 19.971 L 31.787 9.277 Q 30.322 15.137 28.711 19.971 L 20.605 41.602 Z"}),(0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 68.994 71.68 L 52.686 71.68 L 47.51 54.688 L 21.484 54.688 L 16.309 71.68 L 0 71.68 L 25.195 0 L 43.701 0 L 68.994 71.68 Z M 25.293 41.992 L 43.896 41.992 A 27590.463 27590.463 0 0 1 42.2 36.532 Q 36.965 19.676 35.937 16.273 A 120.932 120.932 0 0 1 35.815 15.869 A 131.65 131.65 0 0 1 35.396 14.435 Q 34.951 12.879 34.675 11.741 A 34.866 34.866 0 0 1 34.521 11.084 A 141.762 141.762 0 0 1 33.706 14.075 Q 31.482 21.957 25.293 41.992 Z"})]}),{width:70,height:78})})),be=o().memo((function(e){e.theme;return d((0,c.jsx)(c.Fragment,{children:(0,c.jsx)("path",{fill:"var(--icon-fill-color)",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),{width:640,height:512})})),ye=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 00288 339.17v-38.34A12.82 12.82 0 00275.17 288H12.83A12.82 12.82 0 000 300.83v38.34A12.82 12.82 0 0012.83 352zm0-256h262.34A12.82 12.82 0 00288 83.17V44.83A12.82 12.82 0 00275.17 32H12.83A12.82 12.82 0 000 44.83v38.34A12.82 12.82 0 0012.83 96zM432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),xe=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zM108.1 96h231.81A12.09 12.09 0 00352 83.9V44.09A12.09 12.09 0 00339.91 32H108.1A12.09 12.09 0 0096 44.09V83.9A12.1 12.1 0 00108.1 96zm231.81 256A12.09 12.09 0 00352 339.9v-39.81A12.09 12.09 0 00339.91 288H108.1A12.09 12.09 0 0096 300.09v39.81a12.1 12.1 0 0012.1 12.1z",fill:"var(--icon-fill-color)"}),{width:448,height:512})})),we=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M16 224h416a16 16 0 0016-16v-32a16 16 0 00-16-16H16a16 16 0 00-16 16v32a16 16 0 0016 16zm416 192H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm3.17-384H172.83A12.82 12.82 0 00160 44.83v38.34A12.82 12.82 0 00172.83 96h262.34A12.82 12.82 0 00448 83.17V44.83A12.82 12.82 0 00435.17 32zm0 256H172.83A12.82 12.82 0 00160 300.83v38.34A12.82 12.82 0 00172.83 352h262.34A12.82 12.82 0 00448 339.17v-38.34A12.82 12.82 0 00435.17 288z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),ke=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"m16,132l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16zm0,160l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),_e=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{d:"M16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292ZM16,452L432,452C440.837,452 448,444.837 448,436L448,396C448,387.163 440.837,380 432,380L16,380C7.163,380 0,387.163 0,396L0,436C0,444.837 7.163,452 16,452Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),Ee=o().memo((function(e){e.theme;return d((0,c.jsx)("path",{transform:"matrix(1,0,0,1,0,80)",d:"M16,132L432,132C440.837,132 448,124.837 448,116L448,76C448,67.163 440.837,60 432,60L16,60C7.163,60 0,67.163 0,76L0,116C0,124.837 7.163,132 16,132ZM16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})})),Se=d((0,c.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),Ce=d((0,c.jsx)("path",{fill:"currentColor",d:"M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"}),{width:640,height:512}),Oe=d((0,c.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"}))},8288:function(e,t,n){"use strict";n.d(t,{$C:function(){return m},$e:function(){return u},$n:function(){return q},C6:function(){return b},EE:function(){return F},EH:function(){return P},Gj:function(){return I},HM:function(){return M},Hg:function(){return k},Iw:function(){return s},Kr:function(){return J},Ks:function(){return r},LL:function(){return j},LO:function(){return S},Oh:function(){return h},UO:function(){return z},V4:function(){return L},Vi:function(){return v},Yx:function(){return W},ZB:function(){return V},ZF:function(){return D},_D:function(){return y},ah:function(){return R},ay:function(){return f},cW:function(){return Z},eF:function(){return N},f:function(){return l},gK:function(){return Q},h6:function(){return G},hR:function(){return $},hs:function(){return _},iC:function(){return a},jo:function(){return X},k:function(){return E},kV:function(){return B},n5:function(){return x},nM:function(){return T},oX:function(){return ee},oc:function(){return p},pb:function(){return O},qx:function(){return c},qy:function(){return Y},r8:function(){return C},rk:function(){return w},sA:function(){return A},sS:function(){return H},sk:function(){return U},ut:function(){return g},wZ:function(){return d},xY:function(){return te},zK:function(){return K}});var r,o=n(8635),i=n.n(o),a="Excalidraw",l=10,c=8,s=5,u=1,d=30,f=Math.PI/12,p={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},h={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(e){e.COPY="copy",e.PASTE="paste",e.CUT="cut",e.KEYDOWN="keydown",e.KEYUP="keyup",e.MOUSE_MOVE="mousemove",e.RESIZE="resize",e.UNLOAD="unload",e.FOCUS="focus",e.BLUR="blur",e.DRAG_OVER="dragover",e.DROP="drop",e.GESTURE_END="gestureend",e.BEFORE_UNLOAD="beforeunload",e.GESTURE_START="gesturestart",e.GESTURE_CHANGE="gesturechange",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.STATE_CHANGE="statechange",e.WHEEL="wheel",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.HASHCHANGE="hashchange",e.VISIBILITY_CHANGE="visibilitychange",e.SCROLL="scroll",e.EXCALIDRAW_LINK="excalidraw-link"}(r||(r={}));var v={TEST:"test",DEVELOPMENT:"development"},m={SHAPE_ACTIONS_MENU:"App-menu__left"},g={Virgil:1,Helvetica:2,Cascadia:3},b={LIGHT:"light",DARK:"dark"},y="Segoe UI Emoji",x=20,w=g.Virgil,k="left",_="top",E=20,S={excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",json:"application/json",svg:"image/svg+xml","excalidraw.svg":"image/svg+xml",png:"image/png","excalidraw.png":"image/png",jpg:"image/jpeg",gif:"image/gif",binary:"application/octet-stream"},C={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},O=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,j=500,I=300,T=500,M=100,L=.1,A=300,P={VIEW:"viewMode",ZEN:"zenMode",GRID:"gridMode"},D=i().themeFilter,z={addLibrary:"addLibrary"},R={addLibrary:"addLibrary"},Z={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,theme:!0,saveAsImage:!0}},N=640,B=730,H=1e3,W=500,U=1229,F=parseInt(i().rightSidebarWidth),K=2,V=[1,2,3],Y=10,G=1440,X=[S.png,S.jpg,S.svg,S.gif],q=2097152,$="http://www.w3.org/2000/svg",J={excalidraw:2,excalidrawLibrary:2},Q=5,ee={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},te=20},434:function(e,t,n){"use strict";n.d(t,{DQ:function(){return _},KG:function(){return A},Pn:function(){return D},Qk:function(){return k},Sf:function(){return L},Tu:function(){return P},Wr:function(){return S},ZY:function(){return C},_c:function(){return T},bv:function(){return z},cT:function(){return O},g8:function(){return E},gY:function(){return B},lV:function(){return I},tW:function(){return M},vZ:function(){return H},wf:function(){return j}});var r=n(5858),o=n(668),i=n(489),a=n(6759),l=n(3152),c=n(6612),s=n(8897),u=n(8288),d=n(5118),f=n(9519),p=n(8211),h=n(75),v=n(6340),m=n(1393),g=n(5523),b=n(679);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(){var e=(0,a.Z)(l.default.mark((function e(t){var r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==u.LO.png){e.next=18;break}return e.prev=1,e.next=4,Promise.resolve().then(n.bind(n,673));case 4:return e.next=6,e.sent.decodePngMetadata(t);case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(1),"INVALID"!==e.t0.message){e.next=15;break}throw new DOMException((0,p.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,p.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:e.next=43;break;case 18:if(!("text"in Blob)){e.next=24;break}return e.next=21,t.text();case 21:r=e.sent,e.next=27;break;case 24:return e.next=26,new Promise((function(e){var n=new FileReader;n.readAsText(t,"utf8"),n.onloadend=function(){n.readyState===FileReader.DONE&&e(n.result)}}));case 26:r=e.sent;case 27:if(t.type!==u.LO.svg){e.next=43;break}return e.prev=28,e.next=31,Promise.resolve().then(n.bind(n,673));case 31:return e.next=33,e.sent.decodeSvgMetadata({svg:r});case 33:return e.abrupt("return",e.sent);case 36:if(e.prev=36,e.t1=e.catch(28),"INVALID"!==e.t1.message){e.next=42;break}throw new DOMException((0,p.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,p.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return e.abrupt("return",r);case 44:case"end":return e.stop()}}),e,null,[[1,9],[28,36]])})));return function(t){return e.apply(this,arguments)}}(),k=function(e){var t;return e&&(null===(t=e.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===t?void 0:t[1])||null},_=function(e){return"png"===e||"svg"===e},E=function(e){var t=k(e);return"png"===t||"svg"===t},S=function(e){var t=(e||{}).type;return!!t&&u.jo.includes(t)},C=function(){var e=(0,a.Z)(l.default.mark((function e(t,n,r,o){var i,a;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:if(i=e.sent,e.prev=3,a=JSON.parse(i),!(0,g.dS)(a)){e.next=9;break}return e.abrupt("return",{type:u.LO.excalidraw,data:(0,b.nu)({elements:(0,d._M)(a.elements||[]),appState:x(x({theme:null==n?void 0:n.theme,fileHandle:o||t.handle||null},(0,s.s)(a.appState||{})),n?(0,h.W)(a.elements||[],n,null):{}),files:a.files},n,r)});case 9:if(!(0,g.HT)(a)){e.next=11;break}return e.abrupt("return",{type:u.LO.excalidrawlib,data:a});case 11:throw new Error((0,p.t)("alerts.couldNotLoadInvalidFile"));case 14:throw e.prev=14,e.t0=e.catch(3),console.error(e.t0.message),new Error((0,p.t)("alerts.couldNotLoadInvalidFile"));case 18:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),O=function(){var e=(0,a.Z)(l.default.mark((function e(t,n,r,o){var i;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(t,n,r,o);case 2:if((i=e.sent).type===u.LO.excalidraw){e.next=5;break}throw new Error((0,p.t)("alerts.couldNotLoadInvalidFile"));case 5:return e.abrupt("return",i.data);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished",n=JSON.parse(e);if(!(0,g.HT)(n))throw new Error("Invalid library");var r=n.libraryItems||n.library;return(0,b.wJ)(r,t)},I=function(){var e=(0,a.Z)(l.default.mark((function e(t){var n,r=arguments;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"unpublished",e.t0=j,e.next=4,w(t);case 4:return e.t1=e.sent,e.t2=n,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=(0,a.Z)(l.default.mark((function e(t){return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){try{t.toBlob((function(t){if(!t)return n(new f.l((0,p.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));e(t)}))}catch(e){n(e)}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,a.Z)(l.default.mark((function e(t){var n;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=window.crypto.subtle,e.next=4,H(t);case 4:return e.t1=e.sent,e.next=7,e.t0.digest.call(e.t0,"SHA-1",e.t1);case 7:return n=e.sent,e.abrupt("return",(0,v.G3)(new Uint8Array(n)));case 11:return e.prev=11,e.t2=e.catch(0),console.error(e.t2),e.abrupt("return",(0,c.x0)(40));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=(0,a.Z)(l.default.mark((function e(t){return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onload=function(){var t=r.result;e(t)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.indexOf(","),r=atob(e.slice(n+1)),o=e.slice(0,n).split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),a=new Uint8Array(i),l=0;l<r.length;l++)a[l]=r.charCodeAt(l);return new File([i],t,{type:o})},P=function(){var e=(0,a.Z)(l.default.mark((function e(t,r){var i,a,c,s,d,f;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==u.LO.svg){e.next=2;break}return e.abrupt("return",t);case 2:return e.next=4,Promise.all([n.e(736).then(n.bind(n,1852)).then((function(e){return e.default})),n.e(736).then(n.bind(n,1149)).then((function(e){return e.default}))]);case 4:if(i=e.sent,a=(0,o.Z)(i,2),c=a[0],s=a[1],d=s({pica:c({features:["js","wasm"]})}),r.outputType&&(f=r.outputType,d._create_blob=function(e){return this.pica.toBlob(e.out_canvas,f,.8).then((function(t){return e.out_blob=t,e}))}),S(t)){e.next=12;break}throw new Error((0,p.t)("errors.unsupportedFileType"));case 12:return e.t0=File,e.next=15,d.toBlob(t,{max:r.maxWidthOrHeight});case 15:return e.t1=e.sent,e.t2=[e.t1],e.t3=t.name,e.t4={type:r.outputType||t.type},e.abrupt("return",new e.t0(e.t2,e.t3,e.t4));case 20:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(e)],t,{type:u.LO.svg})},z=function(){var e=(0,a.Z)(l.default.mark((function e(t){var n,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dataTransfer.files.item(0),e.next=3,R(t);case 3:if(r=e.sent,!n){e.next=10;break}return e.next=7,B(n);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=null;case 11:return e.t1=e.t0,e.t2=r,e.abrupt("return",{file:e.t1,fileHandle:e.t2});case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=(0,a.Z)(l.default.mark((function e(t){var n,r;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m.kr){e.next=16;break}return e.prev=1,n=t.dataTransfer.items[0],e.next=5,n.getAsFileSystemHandle();case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0=null;case 8:return r=e.t0,e.abrupt("return",r);case 12:return e.prev=12,e.t1=e.catch(1),console.warn(e.t1.name,e.t1.message),e.abrupt("return",null);case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(e){var t=null,n="".concat((0,r.Z)(new Uint8Array(e).slice(0,8)).join(" ")," "),o="255 216 255 ",i="71 73 70 56 57 97 ";return n==="137 80 78 71 13 10 26 10 "?t=u.LO.png:n.startsWith(o)?t=u.LO.jpg:n.startsWith(i)&&(t=u.LO.gif),t},N=function(e,t,n){return new File([e],n||"",{type:t})},B=function(){var e=(0,a.Z)(l.default.mark((function e(t){var n,r,o,i,a,c,s,d;return l.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type){e.next=28;break}if(null===(n=t)||void 0===n||null===(r=n.name)||void 0===r||!r.endsWith(".excalidrawlib")){e.next=11;break}return e.t0=N,e.next=5,H(t);case 5:e.t1=e.sent,e.t2=u.LO.excalidrawlib,e.t3=t.name,t=(0,e.t0)(e.t1,e.t2,e.t3),e.next=26;break;case 11:if(null===(o=t)||void 0===o||null===(i=o.name)||void 0===i||!i.endsWith(".excalidraw")){e.next=21;break}return e.t4=N,e.next=15,H(t);case 15:e.t5=e.sent,e.t6=u.LO.excalidraw,e.t7=t.name,t=(0,e.t4)(e.t5,e.t6,e.t7),e.next=26;break;case 21:return e.next=23,H(t);case 23:a=e.sent,(c=Z(a))&&(t=N(a,c,t.name));case 26:e.next=34;break;case 28:if(!S(t)){e.next=34;break}return e.next=31,H(t);case 31:s=e.sent,(d=Z(s))&&d!==t.type&&(t=N(s,d,t.name));case 34:return e.abrupt("return",t);case 35:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(e){return"arrayBuffer"in e?e.arrayBuffer():new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var r;if(null===(r=e.target)||void 0===r||!r.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(e.target.result)},r.readAsArrayBuffer(e)}))}},1393:function(e,t,n){"use strict";n.d(t,{I$:function(){return h},NL:function(){return v},kr:function(){return a}});var r=n(5858),o=n(6759),i=n(3152),a=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),l=a?n.e(736).then(n.bind(n,2254)):n.e(736).then(n.bind(n,3499));function c(){return c=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),c.apply(this,arguments)}a?n.e(736).then(n.bind(n,6474)):n.e(736).then(n.bind(n,9521));var s=a?n.e(736).then(n.bind(n,9475)):n.e(736).then(n.bind(n,6281));function u(){return u=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)}var d=n(8288),f=n(9519),p=n(6340),h=function(e){var t,n,o,i=null===(t=e.extensions)||void 0===t?void 0:t.reduce((function(e,t){return e.push(d.LO[t]),e}),[]),a=null===(n=e.extensions)||void 0===n?void 0:n.reduce((function(e,t){return"jpg"===t?e.concat(".jpg",".jpeg"):e.concat(".".concat(t))}),[]);return function(){return c.apply(this,arguments)}({description:e.description,extensions:a,mimeTypes:i,multiple:null!==(o=e.multiple)&&void 0!==o&&o,legacySetup:function(t,n,o){var i=(0,p.Ds)(n,500),a=function(){l(),document.addEventListener(d.Ks.KEYUP,i),document.addEventListener(d.Ks.POINTER_UP,i),i()},l=function(){var n;if(null!==(n=o.files)&&void 0!==n&&n.length){var i=e.multiple?(0,r.Z)(o.files):o.files[0];t(i)}};requestAnimationFrame((function(){window.addEventListener(d.Ks.FOCUS,a)}));var c=window.setInterval((function(){l()}),500);return function(e){clearInterval(c),i.cancel(),window.removeEventListener(d.Ks.FOCUS,a),document.removeEventListener(d.Ks.KEYUP,i),document.removeEventListener(d.Ks.POINTER_UP,i),e&&(console.warn("Opening the file was canceled (legacy-fs)."),e(new f._))}}})},v=function(e,t){return function(){return u.apply(this,arguments)}(e,{fileName:"".concat(t.name,".").concat(t.extension),description:t.description,extensions:[".".concat(t.extension)]},t.fileHandle)}},673:function(e,t,n){"use strict";n.r(t),n.d(t,{decodePngMetadata:function(){return k},decodeSvgMetadata:function(){return E},encodePngMetadata:function(){return w},encodeSvgMetadata:function(){return _},getTEXtChunk:function(){return x}});var r=n(6759),o=n(3152),i=n(9567),a=n.n(i),l=n(6927),c=n(3070),s=n.n(c),u=n(6934),d=n(8288),f=n(434),p=function(e){return new Promise((function(t,n){var r="string"==typeof e?new Blob([(new TextEncoder).encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),o=new FileReader;o.onload=function(e){if(!e.target||"string"!=typeof e.target.result)return n(new Error("couldn't convert to byte string"));t(e.target.result)},o.readAsBinaryString(r)}))},h=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},v=function(e){return new TextDecoder("utf-8").decode(h(e))},m=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.length>1&&void 0!==n[1]&&n[1])){e.next=5;break}e.t0=window.btoa(t),e.next=10;break;case 5:return e.t1=window,e.next=8,p(t);case 8:e.t2=e.sent,e.t0=e.t1.btoa.call(e.t1,e.t2);case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],e.abrupt("return",n?window.atob(t):v(window.atob(t)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,!1===t.compress){e.next=11;break}return e.prev=2,e.next=5,p((0,u.deflate)(n));case 5:r=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error("encode: cannot deflate",e.t0);case 11:if(e.t1=!!r,e.t2=r,e.t2){e.next=17;break}return e.next=16,p(n);case 16:e.t2=e.sent;case 17:return e.t3=e.t2,e.abrupt("return",{version:"1",encoding:"bstring",compressed:e.t1,encoded:e.t3});case 19:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.encoding,e.next="bstring"===e.t0?3:12;break;case 3:if(!t.compressed){e.next=7;break}e.t1=t.encoded,e.next=10;break;case 7:return e.next=9,v(t.encoded);case 9:e.t1=e.sent;case 10:return n=e.t1,e.abrupt("break",13);case 12:throw new Error('decode: unknown encoding "'.concat(t.encoding,'"'));case 13:if(!t.compressed){e.next=15;break}return e.abrupt("return",(0,u.inflate)(new Uint8Array(h(n)),{to:"string"}));case 15:return e.abrupt("return",n);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var x=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=a(),e.t1=Uint8Array,e.next=4,(0,f.vZ)(t);case 4:if(e.t2=e.sent,e.t3=new e.t1(e.t2),n=(0,e.t0)(e.t3),!(r=n.find((function(e){return"tEXt"===e.name})))){e.next=10;break}return e.abrupt("return",l.decode(r.data));case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r,i,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.blob,r=t.metadata,e.t0=a(),e.t1=Uint8Array,e.next=5,(0,f.vZ)(n);case 5:return e.t2=e.sent,e.t3=new e.t1(e.t2),i=(0,e.t0)(e.t3),e.t4=l,e.t5=d.LO.excalidraw,e.t6=JSON,e.next=13,b({text:r,compress:!0});case 13:return e.t7=e.sent,e.t8=e.t6.stringify.call(e.t6,e.t7),c=e.t4.encode.call(e.t4,e.t5,e.t8),i.splice(-1,0,c),e.abrupt("return",new Blob([s()(i)],{type:d.LO.png}));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x(t);case 2:if((null==(n=e.sent)?void 0:n.keyword)!==d.LO.excalidraw){e.next=19;break}if(e.prev=4,"encoded"in(r=JSON.parse(n.text))){e.next=10;break}if(!("type"in r)||r.type!==d.r8.excalidraw){e.next=9;break}return e.abrupt("return",n.text);case 9:throw new Error("FAILED");case 10:return e.next=12,y(r);case 12:return e.abrupt("return",e.sent);case 15:throw e.prev=15,e.t0=e.catch(4),console.error(e.t0),new Error("FAILED");case 19:throw new Error("INVALID");case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.t0=m,e.t1=JSON,e.next=5,b({text:n});case 5:return e.t2=e.sent,e.t3=e.t1.stringify.call(e.t1,e.t2),e.next=9,(0,e.t0)(e.t3,!0);case 9:return r=e.sent,i="",i+="\x3c!-- payload-type:".concat(d.LO.excalidraw," --\x3e"),i+="\x3c!-- payload-version:2 --\x3e",i+="\x3c!-- payload-start --\x3e",i+=r,i+="\x3c!-- payload-end --\x3e",e.abrupt("return",i);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,r.Z)(o.default.mark((function e(t){var n,r,i,a,l,c,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.svg).includes("payload-type:".concat(d.LO.excalidraw))){e.next=26;break}if(r=n.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/)){e.next=5;break}throw new Error("INVALID");case 5:return i=n.match(/<!-- payload-version:(\d+) -->/),a=(null==i?void 0:i[1])||"1",l="1"!==a,e.prev=8,e.next=11,g(r[1],l);case 11:if(c=e.sent,"encoded"in(s=JSON.parse(c))){e.next=17;break}if(!("type"in s)||s.type!==d.r8.excalidraw){e.next=16;break}return e.abrupt("return",c);case 16:throw new Error("FAILED");case 17:return e.next=19,y(s);case 19:return e.abrupt("return",e.sent);case 22:throw e.prev=22,e.t0=e.catch(8),console.error(e.t0),new Error("FAILED");case 26:throw new Error("INVALID");case 27:case"end":return e.stop()}}),e,null,[[8,22]])})));return function(t){return e.apply(this,arguments)}}()},5523:function(e,t,n){"use strict";n.d(t,{HT:function(){return b},I_:function(){return h},NI:function(){return y},Um:function(){return v},dS:function(){return g},n8:function(){return m},t1:function(){return x}});var r=n(8758),o=n(6759),i=n(3152),a=n(1393),l=n(8897),c=n(8288),s=n(5118),u=n(434);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e,t){var n,r={},o=d(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;!i.isDeleted&&"fileId"in i&&i.fileId&&t[i.fileId]&&(r[i.fileId]=t[i.fileId])}}catch(e){o.e(e)}finally{o.f()}return r},h=function(e,t,n,r){var o={type:c.r8.excalidraw,version:c.Kr.excalidraw,source:c.pb,elements:"local"===r?(0,s._M)(e):(0,s.BQ)(e),appState:"local"===r?(0,l.s)(t):(0,l.eS)(t),files:"local"===r?p(e,n):void 0};return JSON.stringify(o,null,2)},v=function(){var e=(0,o.Z)(i.default.mark((function e(t,n,r){var o,l,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=h(t,n,r,"local"),l=new Blob([o],{type:c.LO.excalidraw}),e.next=4,(0,a.NL)(l,{name:n.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,u.g8)(n.fileHandle)?null:n.fileHandle});case 4:return s=e.sent,e.abrupt("return",{fileHandle:s});case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),m=function(){var e=(0,o.Z)(i.default.mark((function e(t,n){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.I$)({description:"Excalidraw files"});case 2:return r=e.sent,e.t0=u.cT,e.next=6,(0,u.gY)(r);case 6:return e.t1=e.sent,e.t2=t,e.t3=n,e.t4=r.handle,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(e){return(null==e?void 0:e.type)===c.r8.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||"object"===(0,r.Z)(e.appState)))},b=function(e){return"object"===(0,r.Z)(e)&&e&&e.type===c.r8.excalidrawLibrary&&(1===e.version||2===e.version)},y=function(e){var t={type:c.r8.excalidrawLibrary,version:c.Kr.excalidrawLibrary,source:c.pb,libraryItems:e};return JSON.stringify(t,null,2)},x=function(){var e=(0,o.Z)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=y(t),e.next=3,(0,a.NL)(new Blob([n],{type:c.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},7053:function(e,t,n){"use strict";n.d(t,{Di:function(){return j},WV:function(){return O},rF:function(){return k},xS:function(){return I},zh:function(){return S}});var r=n(489),o=n(6759),i=n(6967),a=n(7775),l=n(5858),c=n(3152),s=n(434),u=n(679),d=n(6131),f=n(9487),p=n(8925),h=n(9519),v=n(8211),m=n(9787),g=n(8288);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k=(0,d.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),_=function(e){return JSON.parse(JSON.stringify(e))},E=function(e,t){return!e.find((function(e){return e.elements.length===t.elements.length&&e.elements.every((function(e,n){return e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce}))}))},S=function(e,t){var n,r=[],o=x(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;E(e,i)&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return[].concat(r,(0,l.Z)(e))},C=(0,i.Z)((function e(t){var n=this;(0,a.Z)(this,e),this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=function(){return n.updateQueue[n.updateQueue.length-1]},this.notifyListeners=function(){if(n.updateQueue.length>0)f.e_.set(k,{status:"loading",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});else{n.isInitialized=!0,f.e_.set(k,{status:"loaded",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});try{var e,t;null===(e=(t=n.app.props).onLibraryChange)||void 0===e||e.call(t,_(n.lastLibraryItems))}catch(e){console.error(e)}}},this.resetLibrary=function(){return n.setLibrary([])},this.getLatestLibrary=function(){return new Promise(function(){var e=(0,o.Z)(c.default.mark((function e(t){var r;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getLastUpdateTask()||n.lastLibraryItems;case 3:r=e.sent,n.updateQueue.length>0?t(n.getLatestLibrary()):t(_(r)),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",t(n.lastLibraryItems));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}())},this.updateLibrary=function(){var e=(0,o.Z)(c.default.mark((function e(t){var r,i,a,l,d,f,p,m,g;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.libraryItems,i=t.prompt,a=void 0!==i&&i,l=t.merge,d=void 0!==l&&l,f=t.openLibraryMenu,p=void 0!==f&&f,m=t.defaultStatus,g=void 0===m?"unpublished":m,p&&n.app.setState({isLibraryOpen:!0}),e.abrupt("return",n.setLibrary((function(){return new Promise(function(){var e=(0,o.Z)(c.default.mark((function e(t,o){var i,l;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,"function"==typeof r?r(n.lastLibraryItems):r;case 3:if(!((i=e.sent)instanceof Blob)){e.next=10;break}return e.next=7,(0,s.lV)(i,g);case 7:l=e.sent,e.next=11;break;case 10:l=(0,u.wJ)(i,g);case 11:!a||window.confirm((0,v.t)("alerts.confirmAddLibrary",{numShapes:l.length}))?t(d?S(n.lastLibraryItems,l):l):o(new h._),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),o(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}())})).finally((function(){n.app.focusContainer()})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.setLibrary=function(e){var t=new Promise(function(){var t=(0,o.Z)(c.default.mark((function t(r,o){return c.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.getLastUpdateTask();case 3:return"function"==typeof e&&(e=e(n.lastLibraryItems)),t.t0=_,t.next=7,e;case 7:t.t1=t.sent,n.lastLibraryItems=(0,t.t0)(t.t1),r(n.lastLibraryItems),t.next=15;break;case 12:t.prev=12,t.t2=t.catch(0),o(t.t2);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,n){return t.apply(this,arguments)}}()).catch((function(e){if("AbortError"===e.name)return console.warn("Library update aborted by user"),n.lastLibraryItems;throw e})).finally((function(){n.updateQueue=n.updateQueue.filter((function(e){return e!==t})),n.notifyListeners()}));return n.updateQueue.push(t),n.notifyListeners(),t},this.app=t}));t.ZP=C;var O=function(e){var t,n=Math.ceil(Math.sqrt(e.length)),r=[],o=0,i=0,a=0,c=0,s=0,u=0,d=0,f=x(e);try{var h=function(){var f=t.value;s&&s%n==0&&(i+=a+50,o=0,u=0,d++),0===u&&(a=function(t){return e.slice(t*n,t*n+n).reduce((function(e,t){var n=(0,p.v2)(t.elements).height;return Math.max(e,n)}),0)}(d)),c=function(t){var r,o=0,i=0,a=0,l=x(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(o%n==0&&(i=0),i===t){var s=(0,p.v2)(c.elements).width;a=Math.max(a,s)}o++,i++}}catch(e){l.e(e)}finally{l.f()}return a}(u);var h=(0,p.v2)(f.elements),v=h.minX,m=h.minY,g=h.width,b=h.height,w=(c-g)/2,k=(a-b)/2;r.push.apply(r,(0,l.Z)(f.elements.map((function(e){return y(y({},e),{},{x:e.x+o+w-v,y:e.y+i+k-m})})))),o+=c+50,s++,u++};for(f.s();!(t=f.n()).done;)h()}catch(e){f.e(e)}finally{f.f()}return r},j=function(){var e=new URLSearchParams(window.location.hash.slice(1)).get(g.ah.addLibrary)||new URLSearchParams(window.location.search).get(g.UO.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},I=function(e){var t=e.excalidrawAPI,n=e.getInitialLibraryItems,r=(0,m.useRef)(n);(0,m.useEffect)((function(){if(t){var e=function(e){var n=e.libraryUrl,r=e.idToken;if(window.location.hash.includes(g.ah.addLibrary)){var i=new URLSearchParams(window.location.hash.slice(1));i.delete(g.ah.addLibrary),window.history.replaceState({},g.iC,"#".concat(i.toString()))}else if(window.location.search.includes(g.UO.addLibrary)){var a=new URLSearchParams(window.location.search);a.delete(g.UO.addLibrary),window.history.replaceState({},g.iC,"?".concat(a.toString()))}t.updateLibrary({libraryItems:new Promise(function(){var e=(0,o.Z)(c.default.mark((function e(t,r){var o,i;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(decodeURIComponent(n));case 3:return o=e.sent,e.next=6,o.blob();case 6:i=e.sent,t(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),r(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()),prompt:r!==t.id,merge:!0,defaultStatus:"published",openLibraryMenu:!0})},n=function(t){t.preventDefault();var n=j();n&&(t.stopImmediatePropagation(),window.history.replaceState({},"",t.oldURL),e(n))};r.current&&t.updateLibrary({libraryItems:r.current()});var i=j();return i&&e(i),window.addEventListener(g.Ks.HASHCHANGE,n),function(){window.removeEventListener(g.Ks.HASHCHANGE,n)}}}),[t])}},679:function(e,t,n){"use strict";n.d(t,{ET:function(){return x},lY:function(){return w},nu:function(){return k},wJ:function(){return E}});var r=n(668),o=n(489),i=n(5118),a=n(1974),l=n(6954),c=n(8288),s=n(8897),u=n(6938),d=n(1935),f=n(6340);function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0},b=function(e,t){var n,r,o,c,s,u,d,p,h,v,g,b,y,x,w,k={type:t.type||e.type,version:e.version||1,versionNonce:null!==(n=e.versionNonce)&&void 0!==n?n:0,isDeleted:null!==(r=e.isDeleted)&&void 0!==r&&r,id:e.id||(0,l.kb)(),fillStyle:e.fillStyle||"hachure",strokeWidth:e.strokeWidth||1,strokeStyle:null!==(o=e.strokeStyle)&&void 0!==o?o:"solid",roughness:null!==(c=e.roughness)&&void 0!==c?c:1,opacity:null==e.opacity?100:e.opacity,angle:e.angle||0,x:null!==(s=null!==(u=t.x)&&void 0!==u?u:e.x)&&void 0!==s?s:0,y:null!==(d=null!==(p=t.y)&&void 0!==p?p:e.y)&&void 0!==d?d:0,strokeColor:e.strokeColor,backgroundColor:e.backgroundColor,width:e.width||0,height:e.height||0,seed:null!==(h=e.seed)&&void 0!==h?h:1,groupIds:null!==(v=e.groupIds)&&void 0!==v?v:[],strokeSharpness:null!==(g=e.strokeSharpness)&&void 0!==g?g:(0,a.dt)(e.type)?"round":"sharp",boundElements:e.boundElementIds?e.boundElementIds.map((function(e){return{type:"arrow",id:e}})):null!==(b=e.boundElements)&&void 0!==b?b:[],updated:null!==(y=e.updated)&&void 0!==y?y:(0,f.C3)(),link:null!==(x=e.link)&&void 0!==x?x:null,locked:null!==(w=e.locked)&&void 0!==w&&w};return m(m(m({},k),(0,i.Qp)(k)),t)},y=function(e){var t,n,o;switch(e.type){case"text":var i=e.fontSize,a=e.fontFamily;if("font"in e){var l=e.font.split(" "),s=(0,r.Z)(l,2),d=s[0],f=s[1];i=parseInt(d,10),o=f,a=Object.keys(c.ut).includes(o)?c.ut[o]:c.rk}return b(e,{fontSize:i,fontFamily:a,text:null!==(t=e.text)&&void 0!==t?t:"",baseline:e.baseline,textAlign:e.textAlign||c.Hg,verticalAlign:e.verticalAlign||c.hs,containerId:null!==(n=e.containerId)&&void 0!==n?n:null,originalText:e.originalText||e.text});case"freedraw":return b(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return b(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":case"arrow":var p=e.startArrowhead,h=void 0===p?null:p,v=e.endArrowhead,m=void 0===v?"arrow"===e.type?"arrow":null:v,g=e.x,y=e.y,x=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;if(0!==x[0][0]||0!==x[0][1]){var w=u._.getNormalizedPoints(e);x=w.points,g=w.x,y=w.y}return b(e,{type:"draw"===e.type?"line":e.type,startBinding:e.startBinding,endBinding:e.endBinding,lastCommittedPoint:null,startArrowhead:h,endArrowhead:m,points:x,x:g,y:y});case"ellipse":case"rectangle":case"diamond":return b(e,{})}},x=function(e,t){var n=t?(0,f.xn)(t):null;return(e||[]).reduce((function(e,t){if("selection"!==t.type&&!(0,i.QD)(t)){var r=y(t);if(r){var o=null==n?void 0:n.get(t.id);o&&o.version>r.version&&(r=(0,d.ZP)(r,o.version)),e.push(r)}}return e}),[])},w=function(e,t){var n,o,i;e=e||{};for(var a=(0,s.im)(),l={},c=0,u=Object.entries(a);c<u.length;c++){var d=(0,r.Z)(u[c],2),p=d[0],h=d[1],v=e[p],b=t?t[p]:void 0;l[p]=void 0!==v?v:void 0!==b?b:h}return m(m({},l),{},{cursorButton:(null==t?void 0:t.cursorButton)||"up",penDetected:null!==(n=null==t?void 0:t.penDetected)&&void 0!==n?n:!!e.penMode&&(null!==(o=e.penDetected)&&void 0!==o&&o),activeTool:m(m({},(0,f.Om)(a,l.activeTool.type&&g[l.activeTool.type]?l.activeTool:{type:"selection"})),{},{lastActiveToolBeforeEraser:null,locked:null!==(i=l.activeTool.locked)&&void 0!==i&&i}),zoom:"number"==typeof e.zoom?{value:e.zoom}:e.zoom||a.zoom,isLibraryOpen:!!l.isLibraryMenuDocked&&l.isLibraryOpen})},k=function(e,t,n){return{elements:x(null==e?void 0:e.elements,n),appState:w(null==e?void 0:e.appState,t||null),files:(null==e?void 0:e.files)||{}}},_=function(e){var t=x((0,i.Lm)(e.elements),null);return t.length?m(m({},e),{},{elements:t}):null},E=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=[],o=p(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(Array.isArray(i)){var a=_({status:n,elements:i,id:(0,l.kb)(),created:Date.now()});a&&r.push(a)}else{var c=i,s=_(m(m({},c),{},{id:c.id||(0,l.kb)(),status:c.status||n,created:c.created||Date.now()}));s&&r.push(s)}}}catch(e){o.e(e)}finally{o.f()}return r}},2383:function(e,t,n){"use strict";n.d(t,{$u:function(){return I},Pp:function(){return z},lV:function(){return Z},nW:function(){return O},nz:function(){return M},q$:function(){return T},rj:function(){return S},sw:function(){return A},wq:function(){return P}});var r=n(489),o=n(668),i=n(6340),a=n(1935),l=n(7901),c=n(1319),s=n(3646),u=n(8211),d=n(9787),f=n(741),p=n(6066),h=n(6202),v=n(6552),m=n(8288),g=n(9910),b=n(75),y=n(2325),x=n(5118),w=(n(4404),n(7047)),k=n(1337);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=document.createElement("img");S.src="data:".concat(m.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));var C=!1,O=function(e){var t=e.element,n=e.appState,r=e.setAppState,l=e.onLinkOpen,h=t.link||"",v=(0,d.useState)(h),g=(0,o.Z)(v,2),b=g[0],y=g[1],x=(0,d.useRef)(null),_="editor"===n.showHyperlinkPopup||!h,E=(0,d.useCallback)((function(){if(x.current){var e=I(x.current.value);!t.link&&e&&(0,w.L)("hyperlink","create"),(0,a.DR)(t,{link:e}),r({showHyperlinkPopup:"info"})}}),[t,r]);(0,d.useLayoutEffect)((function(){return function(){E()}}),[E]),(0,d.useEffect)((function(){var e=null,o=function(o){_||(e&&clearTimeout(e),N(t,n,[o.clientX,o.clientY])&&(e=window.setTimeout((function(){r({showHyperlinkPopup:!1})}),500)))};return window.addEventListener(m.Ks.POINTER_MOVE,o,!1),function(){window.removeEventListener(m.Ks.POINTER_MOVE,o,!1),e&&clearTimeout(e)}}),[n,t,_,r]);var S=(0,d.useCallback)((function(){(0,w.L)("hyperlink","delete"),(0,a.DR)(t,{link:null}),_&&(x.current.value=""),r({showHyperlinkPopup:!1})}),[r,t,_]),C=j(t,n),O=C.x,M=C.y;return n.draggingElement||n.resizingElement||n.isRotating||n.openMenu?null:(0,k.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(M,"px"),left:"".concat(O,"px"),width:320,padding:5},children:[_?(0,k.jsx)("input",{className:(0,f.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:x,value:b,onChange:function(e){return y(e.target.value)},autoFocus:!0,onKeyDown:function(e){e.stopPropagation(),e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K&&e.preventDefault(),e.key!==p.tW.ENTER&&e.key!==p.tW.ESCAPE||E()}}):(0,k.jsx)("a",{href:t.link||"",className:(0,f.Z)("excalidraw-hyperlinkContainer-link",{"d-none":_}),target:T(t.link)?"_self":"_blank",onClick:function(e){if(t.link&&l){var n=(0,i.ag)(m.Ks.EXCALIDRAW_LINK,e.nativeEvent);l(t,n),n.defaultPrevented&&e.preventDefault()}},rel:"noopener noreferrer",children:t.link}),(0,k.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!_&&(0,k.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.edit"),"aria-label":(0,u.t)("buttons.edit"),label:(0,u.t)("buttons.edit"),onClick:function(){(0,w.L)("hyperlink","edit","popup-ui"),r({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:s.gR}),h&&(0,k.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.remove"),"aria-label":(0,u.t)("buttons.remove"),label:(0,u.t)("buttons.remove"),onClick:S,className:"excalidraw-hyperlinkContainer--remove",icon:s._I})]})]})},j=function(e,t){var n=(0,x.qf)(e),r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i._i)({sceneX:a+e.width/2,sceneY:l},t),s=c.x,u=c.y;return{x:s-t.offsetLeft-160,y:u-t.offsetTop-85}},I=function(e){return(e=e.trim())&&(e.includes("://")||/^[[\\/]/.test(e)||(e="https://".concat(e))),e},T=function(e){return!!(null!=e&&e.includes(location.origin)||null!=e&&e.startsWith("/"))},M=(0,l.z)({name:"hyperlink",perform:function(e,t){return"editor"!==t.showHyperlinkPopup&&{elements:e,appState:E(E({},t),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(e){return e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K},contextItemLabel:function(e,t){return L(e,t)},contextItemPredicate:function(e,t){return 1===(0,b.eD)(e,t).length},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,b.eD)(t,n);return(0,k.jsx)(c.V,{type:"button",icon:s.p4,"aria-label":(0,u.t)(L(t,n)),title:"".concat((0,u.t)("labels.link.label")," - ").concat((0,i.uY)("CtrlOrCmd+K")),onClick:function(){return r(null)},selected:1===o.length&&!!o[0].link})}}),L=function(e,t){return(0,b.eD)(e,t)[0].link?"labels.link.edit":"labels.link.create"},A=function(e,t,n){var r=(0,o.Z)(e,4),i=r[0],a=r[1],l=r[2],c=r[3],s=h.Dn,u=s/n.zoom.value,d=s/n.zoom.value,f=s/n.zoom.value,p=(i+l)/2,m=(a+c)/2,g=(s-8)/(2*n.zoom.value),b=4/n.zoom.value,y=l+b-g,x=a-b-f+g,w=(0,v.U1)(y+u/2,x+d/2,p,m,t),k=(0,o.Z)(w,2);return[k[0]-u/2,k[1]-d/2,u,d]},P=function(e,t,n,r){var i=(0,o.Z)(n,2),a=i[0],l=i[1];if(!e.link||t.selectedElementIds[e.id])return!1;var c=4/t.zoom.value;if(!r&&t.viewModeEnabled&&(0,y.pX)(e,[a,l],c))return!0;var s=(0,x.qf)(e),u=(0,o.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],v=A([d,f,p,h],e.angle,t),m=(0,o.Z)(v,4),g=m[0],b=m[1],w=m[2],k=m[3];return a>g-c&&a<g+c+w&&l>b-c&&l<b+k+c},D=null,z=function(e,t){D&&clearTimeout(D),D=window.setTimeout((function(){return R(e,t)}),m.sA)},R=function(e,t){if(e.link){var n=(0,g.bK)();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=e.link;var r=(0,x.qf)(e),a=(0,o.Z)(r,4),l=a[0],c=a[1],s=a[2],u=a[3],d=A([l,c,s,u],e.angle,t),f=(0,o.Z)(d,4),p=f[0],h=f[1],v=f[2],m=f[3],b=(0,i._i)({sceneX:p,sceneY:h},t);(0,g.Js)(n,{left:b.x,top:b.y,width:v,height:m},"top"),(0,w.L)("hyperlink","tooltip","link-icon"),C=!0}},Z=function(){D&&clearTimeout(D),C&&(C=!1,(0,g.bK)().classList.remove("excalidraw-tooltip--visible"))},N=function(e,t,n){var r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i.dE)({clientX:a,clientY:l},t),s=c.x,u=c.y,d=15/t.zoom.value;if((0,y.pX)(e,[s,u],d))return!1;var f=(0,x.qf)(e),p=(0,o.Z)(f,3),h=p[0],v=p[1],m=p[2];if(s>=h&&s<=m&&u>=v-85&&u<=v)return!1;var g=j(e,t),b=g.x,w=g.y;return!(a>=b-d&&a<=b+320+10+d&&l>=w-d&&l<=w+d+10+42)}},8290:function(e,t,n){"use strict";n.d(t,{$q:function(){return W},DK:function(){return E},H:function(){return S},HG:function(){return g},N1:function(){return v},R:function(){return w},Ww:function(){return I},Y9:function(){return O},ZB:function(){return P},cz:function(){return h},ek:function(){return B},el:function(){return y}});var r=n(489),o=n(668),i=n(75),a=n(1974),l=n(2325),c=n(1935),s=n(1564),u=n(6938),d=n(6340),f=n(6066);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var h=function(e){return!e[f.tW.CTRL_OR_CMD]},v=function(e){return e.isBindingEnabled},m=function(e,t){var n=[];return t.forEach((function(t){var r=e.getNonDeletedElement(t);null!=r&&n.push(r)})),n},g=function(e,t,n){var r=new Set,o=new Set;b(e,t,n,"start",r,o),b(e,n,t,"end",r,o);var i=Array.from(o).filter((function(e){return!r.has(e)}));m(s.Z.getScene(e),i).forEach((function(t){var n;(0,c.DR)(t,{boundElements:null===(n=t.boundElements)||void 0===n?void 0:n.filter((function(t){return"arrow"!==t.type||t.id!==e.id}))})}))},b=function(e,t,n,r,o,i){if("keep"!==t)if(null!=t)null!=n&&("keep"===n?_(e,t,r):"start"!==r&&n.id===t.id)||(k(e,t,r),o.add(t.id));else{var a=C(e,r);null!=a&&i.add(a)}},y=function(e){e.forEach((function(e){(0,a.Mn)(e)?g(e,z(e,"start"),z(e,"end")):(0,a.f0)(e)&&x(e)}))},x=function(e){Z(e).forEach((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1];return g(r,"end"===i?"keep":e,"start"===i?"keep":e)}))},w=function(e,t,n,r){null!=t.startBoundElement&&k(e,t.startBoundElement,"start");var o=O(r,n);null==o||_(e,o,"end")||k(e,o,"end")},k=function(e,t,n){(0,c.DR)(e,(0,r.Z)({},"start"===n?"startBinding":"endBinding",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({elementId:t.id},j(e,t,n)))),(0,d.xn)(t.boundElements||[]).has(e.id)||(0,c.DR)(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},_=function(e,t,n){var r=e["start"===n?"endBinding":"startBinding"];return E(e,null==r?void 0:r.elementId,t)},E=function(e,t,n){return t===n.id&&e.points.length<3},S=function(e){e.forEach((function(e){(0,a.Mn)(e)&&g(e,null,null)}))},C=function(e,t){var n="start"===t?"startBinding":"endBinding",o=e[n];return null==o?null:((0,c.DR)(e,(0,r.Z)({},n,null)),o.elementId)},O=function(e,t){return(0,i.QG)(t.getNonDeletedElements(),(function(t){return(0,a.f0)(t,!1)&&(0,l.uu)(t,e)}))},j=function(e,t,n){var r="start"===n?-1:1,o=-1===r?0:e.points.length-1,i=o-r,a=u._.getPointAtIndexGlobalCoordinates(e,o),c=u._.getPointAtIndexGlobalCoordinates(e,i);return{focus:(0,l.T_)(t,c,a),gap:Math.max(1,(0,l.oT)(t,a))}},I=function(e,t){var n,r=(null!==(n=e.boundElements)&&void 0!==n?n:[]).filter((function(e){return"arrow"===e.type}));if(0!==r.length){var o=null!=t?t:{},i=o.newSize,l=o.simultaneouslyUpdated,u=M(l);m(s.Z.getScene(e),r.map((function(e){return e.id}))).forEach((function(t){if((0,a.bt)(t)){var n=e;if(T(t,n)){var r=A(n,t.startBinding,i),o=A(n,t.endBinding,i);u.has(t.id)?(0,c.DR)(t,{startBinding:r,endBinding:o}):(L(t,"start",r,e),L(t,"end",o,e))}}}))}},T=function(e,t){var n,r;return(null===(n=e.startBinding)||void 0===n?void 0:n.elementId)===t.id||(null===(r=e.endBinding)||void 0===r?void 0:r.elementId)===t.id},M=function(e){return new Set((e||[]).map((function(e){return e.id})))},L=function(e,t,n,o){if(!(null==n||n.elementId!==o.id&&e.points.length>2)){var i=s.Z.getScene(e).getElement(n.elementId);if(null!=i){var a,c="start"===t?-1:1,d=-1===c?0:e.points.length-1,f=d-c,p=u._.getPointAtIndexGlobalCoordinates(e,f),h=(0,l.j_)(i,n.focus,p);if(0===n.gap)a=h;else{var v=(0,l.MZ)(i,p,h,n.gap);a=0===v.length?h:v[0]}u._.movePoints(e,[{index:d,point:u._.pointFromAbsoluteCoords(e,a)}],(0,r.Z)({},"start"===t?"startBinding":"endBinding",n))}}},A=function(e,t,n){if(null==t||null==n)return t;var r=t.gap,o=t.focus,i=t.elementId,a=n.width,c=n.height,s=e.width,u=e.height;return{elementId:i,gap:Math.max(1,Math.min((0,l.fb)(e,a,c),r*(a<c?a/s:c/u))),focus:o}},P=function(e){var t=new Set(e.map((function(e){return e.id})));return e.flatMap((function(e){return(0,a.Mn)(e,!1)?D(e).filter((function(e){return!t.has(e.id)})):(0,a.f0)(e,!1)?Z(e).filter((function(e){return!t.has(e[0].id)})):[]}))},D=function(e){return[z(e,"start"),z(e,"end")].filter((function(e){return null!=e}))},z=function(e,t){return O(R(e,t),s.Z.getScene(e))},R=function(e,t){var n="start"===t?0:-1;return(0,d.AK)(u._.getPointAtIndexGlobalCoordinates(e,n))},Z=function(e){return s.Z.getScene(e).getNonDeletedElements().map((function(t){if(!(0,a.Mn)(t,!1))return null;var n=N(t,"start",e),r=N(t,"end",e);return n||r?[t,n&&r?"both":n?"start":"end",e]:null})).filter((function(e){return null!=e}))},N=function(e,t,n){return null==e["start"===t?"startBinding":"endBinding"]&&!_(e,n,t)&&(0,l.uu)(n,R(e,t))},B=function(e,t,n,r){var o=new Set,i=new Set,l="duplicatesServeAsOld"===r;t.forEach((function(e){var t=e.boundElements;if(null!=t&&t.length>0&&(t.forEach((function(e){l&&!n.has(e.id)&&o.add(e.id)})),i.add(n.get(e.id))),(0,a.Mn)(e)){if(null!=e.startBinding){var r=e.startBinding.elementId;l&&!n.has(r)&&i.add(r)}if(null!=e.endBinding){var c=e.endBinding.elementId;l&&!n.has(c)&&i.add(c)}null==e.startBinding&&null==e.endBinding||o.add(n.get(e.id))}})),e.filter((function(e){var t=e.id;return o.has(t)})).forEach((function(e){var t=e.startBinding,r=e.endBinding;(0,c.DR)(e,{startBinding:H(t,n),endBinding:H(r,n)})})),e.filter((function(e){var t=e.id;return i.has(t)})).forEach((function(e){var t=e.boundElements;null!=t&&t.length>0&&(0,c.DR)(e,{boundElements:t.map((function(e){return n.has(e.id)?{id:n.get(e.id),type:e.type}:e}))})}))},H=function(e,t){var n;if(null==e)return null;var r=e.elementId;return{focus:e.focus,gap:e.gap,elementId:null!==(n=t.get(r))&&void 0!==n?n:r}},W=function(e,t){var n=new Set(t.map((function(e){return e.id}))),r=new Set;t.forEach((function(e){var t;(0,a.f0)(e)?null===(t=e.boundElements)||void 0===t||t.forEach((function(e){n.has(e.id)||r.add(e.id)})):(0,a.Mn)(e)&&(e.startBinding&&r.add(e.startBinding.elementId),e.endBinding&&r.add(e.endBinding.elementId))})),e.filter((function(e){var t=e.id;return r.has(t)})).forEach((function(e){(0,a.f0)(e)?(0,c.DR)(e,{boundElements:F(e.boundElements,n)}):(0,a.Mn)(e)&&(0,c.DR)(e,{startBinding:U(e.startBinding,n),endBinding:U(e.endBinding,n)})}))},U=function(e,t){return null==e||t.has(e.elementId)?null:e},F=function(e,t){return e?e.filter((function(e){return!t.has(e.id)})):null}},8925:function(e,t,n){"use strict";n.d(t,{CM:function(){return p},KP:function(){return x},Pi:function(){return y},UC:function(){return f},Ut:function(){return k},Y5:function(){return b},os:function(){return _},qf:function(){return d},v2:function(){return E},wC:function(){return w}});var r=n(668),o=n(6552),i=n(6852),a=n(6202),l=n(1974),c=n(5001);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e){return(0,l.F9)(e)?m(e):(0,l.bt)(e)?g(e):[e.x,e.y,e.x+e.width,e.y+e.height]},f=function(e){var t=Math.floor(e.width/2)+1,n=e.width,r=Math.floor(e.height/2)+1;return[t,0,n,r,t,e.height,0,r]},p=function(e){var t,n=s(e.sets);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("path"===r.type)return r.ops}}catch(e){n.e(e)}finally{n.f()}return e.sets[0].ops},h=function(e,t){var n=[0,0],o=e.reduce((function(e,o){var i=o.op,a=o.data;if("move"===i)n=a;else if("bcurveTo"===i){var l=[a[0],a[1]],c=[a[2],a[3]],s=[a[4],a[5]],u=n;n=s;for(var d=function(e,t){return Math.pow(1-e,3)*s[t]+3*e*Math.pow(1-e,2)*c[t]+3*Math.pow(e,2)*(1-e)*l[t]+u[t]*Math.pow(e,3)},f=0;f<=1;){var p=d(f,0),h=d(f,1);if(t){var v=t(p,h),m=(0,r.Z)(v,2);p=m[0],h=m[1]}e.minY=Math.min(e.minY,h),e.minX=Math.min(e.minX,p),e.maxX=Math.max(e.maxX,p),e.maxY=Math.max(e.maxY,h),f+=.1}}return e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[o.minX,o.minY,o.maxX,o.maxY]},v=function(e){var t,n=1/0,o=1/0,i=-1/0,a=-1/0,l=s(e);try{for(l.s();!(t=l.n()).done;){var c=(0,r.Z)(t.value,2),u=c[0],d=c[1];n=Math.min(n,u),o=Math.min(o,d),i=Math.max(i,u),a=Math.max(a,d)}}catch(e){l.e(e)}finally{l.f()}return[n,o,i,a]},m=function(e){var t=v(e.points),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3];return[o+e.x,i+e.y,a+e.x,l+e.y]},g=function(e){var t;if(e.points.length<2||!(0,a.R2)(e)){var n=e.points.reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return e.minY=Math.min(e.minY,i),e.minX=Math.min(e.minX,o),e.maxX=Math.max(e.maxX,o),e.maxY=Math.max(e.maxY,i),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),o=n.minX,i=n.minY,l=n.maxX,c=n.maxY;t=[o+e.x,i+e.y,l+e.x,c+e.y]}else{var s=(0,a.R2)(e),u=p(s[0]),d=h(u),f=(0,r.Z)(d,4),v=f[0],m=f[1],g=f[2],b=f[3];t=[v+e.x,m+e.y,g+e.x,b+e.y]}return t},b=function(e,t,n,i){var a=p(t[0]);if(a.length<1)return null;var l="start"===n?1:a.length-1,c=a[l].data,s=[c[4],c[5]],u=[c[2],c[3]],d=[c[0],c[1]],f=a[l-1],h=[0,0];"move"===f.op?h=f.data:"bcurveTo"===f.op&&(h=[f.data[4],f.data[5]]);var v=function(e,t){return Math.pow(1-e,3)*s[t]+3*e*Math.pow(1-e,2)*u[t]+3*Math.pow(e,2)*(1-e)*d[t]+h[t]*Math.pow(e,3)},m="start"===n?h:s,g=(0,r.Z)(m,2),b=g[0],y=g[1],x=[v(.3,0),v(.3,1)],w=x[0],k=x[1],_=Math.hypot(b-w,y-k),E=(b-w)/_,S=(y-k)/_,C={arrow:30,bar:15,dot:15,triangle:15}[i],O=0;if("arrow"===i){var j=(0,r.Z)(e.points[e.points.length-1],2),I=j[0],T=j[1],M=e.points.length>1?e.points[e.points.length-2]:[0,0],L=(0,r.Z)(M,2),A=L[0],P=L[1];O=Math.hypot(I-A,T-P)}else for(var D=0;D<e.points.length;D++){var z=e.points[D-1]||[0,0],R=(0,r.Z)(z,2),Z=R[0],N=R[1],B=(0,r.Z)(e.points[D],2),H=B[0],W=B[1];O+=Math.hypot(H-Z,W-N)}var U=Math.min(C,O/2),F=b-E*U,K=y-S*U;if("dot"===i)return[b,y,Math.hypot(K-y,F-b)+e.strokeWidth];var V={arrow:20,bar:90,triangle:25}[i],Y=(0,o.U1)(F,K,b,y,-V*Math.PI/180),G=(0,r.Z)(Y,2),X=G[0],q=G[1],$=(0,o.U1)(F,K,b,y,V*Math.PI/180),J=(0,r.Z)($,2);return[b,y,X,q,J[0],J[1]]},y=function(e){var t,n=d(e),i=(0,r.Z)(n,4),c=i[0],s=i[1],u=i[2],f=i[3],m=(c+u)/2,g=(s+f)/2;if((0,l.F9)(e)){var b=v(e.points.map((function(t){var n=(0,r.Z)(t,2),i=n[0],a=n[1];return(0,o.U1)(i,a,m-e.x,g-e.y,e.angle)}))),y=(0,r.Z)(b,4),x=y[0],w=y[1],k=y[2],_=y[3];return[x+e.x,w+e.y,k+e.x,_+e.y]}if((0,l.bt)(e))t=function(e,t,n){if(e.points.length<2||!(0,a.R2)(e)){var i=e.points.reduce((function(i,a){var l=(0,r.Z)(a,2),c=l[0],s=l[1],u=(0,o.U1)(e.x+c,e.y+s,t,n,e.angle),d=(0,r.Z)(u,2);return c=d[0],s=d[1],i.minY=Math.min(i.minY,s),i.minX=Math.min(i.minX,c),i.maxX=Math.max(i.maxX,c),i.maxY=Math.max(i.maxY,s),i}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[i.minX,i.minY,i.maxX,i.maxY]}var l=(0,a.R2)(e),c=p(l[0]);return h(c,(function(r,i){return(0,o.U1)(e.x+r,e.y+i,t,n,e.angle)}))}(e,m,g);else if("diamond"===e.type){var E=(0,o.U1)(m,s,m,g,e.angle),S=(0,r.Z)(E,2),C=S[0],O=S[1],j=(0,o.U1)(m,f,m,g,e.angle),I=(0,r.Z)(j,2),T=I[0],M=I[1],L=(0,o.U1)(c,g,m,g,e.angle),A=(0,r.Z)(L,2),P=A[0],D=A[1],z=(0,o.U1)(u,g,m,g,e.angle),R=(0,r.Z)(z,2),Z=R[0],N=R[1];t=[Math.min(C,T,P,Z),Math.min(O,M,D,N),Math.max(C,T,P,Z),Math.max(O,M,D,N)]}else if("ellipse"===e.type){var B=(u-c)/2,H=(f-s)/2,W=Math.cos(e.angle),U=Math.sin(e.angle),F=Math.hypot(B*W,H*U),K=Math.hypot(H*W,B*U);t=[m-F,g-K,m+F,g+K]}else{var V=(0,o.U1)(c,s,m,g,e.angle),Y=(0,r.Z)(V,2),G=Y[0],X=Y[1],q=(0,o.U1)(c,f,m,g,e.angle),$=(0,r.Z)(q,2),J=$[0],Q=$[1],ee=(0,o.U1)(u,f,m,g,e.angle),te=(0,r.Z)(ee,2),ne=te[0],re=te[1],oe=(0,o.U1)(u,s,m,g,e.angle),ie=(0,r.Z)(oe,2),ae=ie[0],le=ie[1];t=[Math.min(G,J,ne,ae),Math.min(X,Q,re,le),Math.max(G,J,ne,ae),Math.max(X,Q,re,le)]}return t},x=function(e){if(!e.length)return[0,0,0,0];var t=1/0,n=-1/0,o=1/0,i=-1/0;return e.forEach((function(e){var a=y(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];t=Math.min(t,c),o=Math.min(o,s),n=Math.max(n,u),i=Math.max(i,d)})),[t,o,n,i]},w=function(e,t,n){if(!(0,l.bt)(e)&&!(0,l.F9)(e))return[e.x,e.y,e.x+t,e.y+n];var o,s=(0,c.z)(0,t,(0,c.z)(1,n,e.points));if((0,l.F9)(e))o=v(s);else{var u=i.Z.generator(),d="sharp"===e.strokeSharpness?u.linearPath(s,(0,a.i)(e)):u.curve(s,(0,a.i)(e)),f=p(d);o=h(f)}var m=o,g=(0,r.Z)(m,4),b=g[0],y=g[1],x=g[2],w=g[3];return[b+e.x,y+e.y,x+e.x,w+e.y]},k=function(e,t,n){var o=i.Z.generator(),l="sharp"===n?o.linearPath(t,(0,a.i)(e)):o.curve(t,(0,a.i)(e)),c=p(l),s=h(c),u=(0,r.Z)(s,4),d=u[0],f=u[1],v=u[2],m=u[3];return[d+e.x,f+e.y,v+e.x,m+e.y]},_=function(e,t){if(!e.length)return[0,0,0,0];var n=1/0,i=e[0];return e.forEach((function(e){var a=y(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,o.LW)((c+u)/2,(s+d)/2,t.x,t.y);f<n&&(n=f,i=e)})),y(i)},E=function(e){var t=x(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3];return{minX:o,minY:i,maxX:a,maxY:l,width:a-o,height:l-i,midX:(o+a)/2,midY:(i+l)/2}}},2325:function(e,t,n){"use strict";n.d(t,{uu:function(){return H},T_:function(){return oe},j_:function(){return ie},oT:function(){return F},wX:function(){return z},MZ:function(){return ae},wB:function(){return R},Qu:function(){return Z},pX:function(){return B},fb:function(){return W}});var r=n(668),o=function(e,t){return[0,0,0,0,t,e,1,0]},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error("Expected `index` between 0 and 7, got `".concat(t,"`"));return 0!==e&&(n[t]=e),n},a=function(e){return[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]]},l=function(e,t){return v(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]]},c=function(e,t){return v(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[s(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]]},s=function(e,t){return t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6]},u=function(e,t){return[d(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]]},d=function(e,t){return e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0]},f=function(e){return Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6]))},p=function(e){var t=f(e);if(0===t||1===t)return e;var n=e[6]<0?-1:1;return c(e,n/t)},h=function(e){var t=function(e){return Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1]))}(e);return 0===t||1===t?e:c(e,1/t)},v=function(e){return"number"==typeof e},m=(i(1,1),i(1,2),i(1,3),i(1,4),i(1,5),i(1,6),i(1,7),function(e,t,n){return p([0,n,e,t,0,0,0,0])}),g=function(e,t){return p(u(t,e))},b=function(e,t){return n=e,[(r=t)[0]*n[0]+r[2]*n[2]+r[3]*n[3]-r[6]*n[6],r[1]*n[0]+r[0]*n[1]-r[4]*n[2]+r[5]*n[3]+r[2]*n[4]-r[3]*n[5]-r[7]*n[6]-r[6]*n[7],r[2]*n[0]+r[0]*n[2]-r[6]*n[3]+r[3]*n[6],r[3]*n[0]+r[6]*n[2]+r[0]*n[3]-r[2]*n[6],r[4]*n[0]+r[7]*n[3]+r[0]*n[4]+r[3]*n[7],r[5]*n[0]+r[7]*n[2]+r[0]*n[5]+r[2]*n[7],r[6]*n[0]+r[0]*n[6],r[7]*n[0]+r[0]*n[7]];var n,r},y=function(e){var t=(0,r.Z)(e,2),n=t[0];return[0,0,0,0,t[1],n,1,0]},x=function(e){return[e[5],e[4]]},w=function(e,t){return p((n=e,[(r=t)[0]*n[0],r[1]*n[0]+r[0]*n[1],r[2]*n[0]+r[0]*n[2],r[3]*n[0]+r[0]*n[3],r[4]*n[0]+r[2]*n[1]-r[1]*n[2]+r[0]*n[4],r[5]*n[0]-r[3]*n[1]+r[1]*n[3]+r[0]*n[5],r[6]*n[0]+r[3]*n[2]-r[2]*n[3]+r[0]*n[6],r[7]*n[0]+r[6]*n[1]+r[5]*n[2]+r[4]*n[3]+r[3]*n[4]+r[2]*n[5]+r[1]*n[6]]));var n,r},k=function(e,t){return f(u(e,t))},_=function(e,t){return d(e,t)},E=function(e){return[0,0,0,0,e[4],e[5],0,0]},S=function(e,t){return n=c(e,Math.sin(t/2)),r=Math.cos(t/2),v(r)?[n[0]+r,n[1],n[2],n[3],n[4],n[5],n[6],n[7]]:[n[0]+r[0],n[1]+r[1],n[2]+r[2],n[3]+r[3],n[4]+r[4],n[5]+r[5],n[6]+r[6],n[7]+r[7]];var n,r},C=function(e,t){return p(c(c(e,t),a(e)))},O=n(6552),j=n(6575),I=n(8925),T=n(6202),M=n(1974),L=n(5118),A=n(6340);function P(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z=function(e,t,n,r){var o=10/t.zoom.value,i=[n,r];return N(t,e)&&!t.selectedLinearElement?B(e,i,o):Z(e,t,i)},R=function(e,t,n,r){var o=10/t.zoom.value;return!Z(e,t,[n,r])&&B(e,[n,r],o)},Z=function(e,t,n){var r=10/t.zoom.value,o=(0,L.iB)(e)?K:function(e){if("arrow"===e.type)return!1;if("freedraw"===e.type)return!0;var t=!(0,A.Qm)(e.backgroundColor)||(0,M.Xo)(e);return"line"===e.type?t&&(0,O.g6)(e.points):t||(0,M.pC)(e)}(e)?V:Y;return U({element:e,point:n,threshold:r,check:o})},N=function(e,t){return e.selectedElementIds[t.id]},B=function(e,t,n){var o=(0,r.Z)(t,2),i=o[0],a=o[1],l=(0,I.qf)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3],p=(s+d)/2,h=(u+f)/2,v=(0,O.U1)(i,a,p,h,-e.angle),m=(0,r.Z)(v,2),g=m[0],b=m[1];return g>s-n&&g<d+n&&b>u-n&&b<f+n},H=function(e,t){var n=t.x,r=t.y,o=W(e,e.width,e.height);return U({element:e,point:[n,r],threshold:o,check:G})},W=function(e,t,n){var r=("diamond"===e.type?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*r,32))},U=function(e){switch(e.element.type){case"rectangle":case"image":case"text":case"diamond":case"ellipse":var t=F(e.element,e.point);return e.check(t,e.threshold);case"freedraw":return!!e.check(X(e.element,e.point),e.threshold)&&Q(e.element,e.point,e.threshold);case"arrow":case"line":return ee(e);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},F=function(e,t){switch(e.type){case"rectangle":case"image":case"text":return X(e,t);case"diamond":return q(e,t);case"ellipse":return $(e,t)}},K=function(e,t){return e<0},V=function(e,t){return e<t},Y=function(e,t){return Math.abs(e)<t},G=function(e,t){return 0<=e&&e<t},X=function(e,t){var n=te(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3];return Math.max(_(i,m(0,1,-l)),_(i,m(1,0,-a)))},q=function(e,t){var n=te(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3],c=m(l,a,-l*a);return _(i,c)},$=function(e,t){var n,o=J(e,t),i=(0,r.Z)(o,2),a=i[0],l=i[1];return n=l,-Math.sign(n[1])*_(a,l)},J=function(e,t){var n=te(e,t),i=(0,r.Z)(n,4),a=i[1],l=i[2],c=i[3],s=x(a),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=.707,h=.707,v=l,m=c;[0,1,2,3].forEach((function(e){var t=v*p,n=m*h,r=(v*v-m*m)*Math.pow(p,3)/v,o=(m*m-v*v)*Math.pow(h,3)/m,i=t-r,a=n-o,l=d-r,c=f-o,s=Math.hypot(a,i),u=Math.hypot(c,l);p=Math.min(1,Math.max(0,(l*s/u+r)/v)),h=Math.min(1,Math.max(0,(c*s/u+o)/m));var g=Math.hypot(h,p);p/=g,h/=g}));var y,w=o(v*p,m*h);return[a,b(g(a,y=w),y)]},Q=function(e,t,n){var o,i;if(0===e.angle)o=t[0]-e.x,i=t[1]-e.y;else{var a=(0,I.qf)(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,O.xj)(t,[c+(u-c)/2,s+(d-s)/2],-e.angle);o=f[0]-e.x,i=f[1]-e.y}var p,h=(0,r.Z)(e.points,2),v=h[0],m=h[1];if((0,O.LW)(v[0],v[1],o,i)<n||(0,O.LW)(m[0],m[1],o,i)<n)return!0;for(var g=0;g<e.points.length;g++){var b=[m[0]-v[0],m[1]-v[1]],y=Math.hypot(b[1],b[0]),x=[b[0]/y,b[1]/y],w=[o-v[0],i-v[1]],k=(w[0]*x[0]+w[1]*x[1])/Math.hypot(x[1],x[0]);p=[v[0]+x[0]*k,v[1]+x[1]*k];var _=(0,O.LW)(p[0],p[1],v[0],v[1]),E=(0,O.LW)(p[0],p[1],m[0],m[1]);if(p=E<_&&_>y?m:_<E&&E>y?v:p,Math.hypot(i-p[1],o-p[0])<n)return!0;v=m,m=e.points[g+1]}var S=(0,T.R2)(e);return!(!S||!S.sets.length)&&me(S,o,i,n)},ee=function(e){var t=e.element,n=e.threshold;if(!(0,T.R2)(t))return!1;var o=te(e.element,e.point),i=(0,r.Z)(o,4),a=i[0],l=i[1],c=i[2],s=i[3],u=m(0,1,-s),d=m(1,0,-c);if(!V(_(l,u),n)||!V(_(l,d),n))return!1;var f=x(a),p=(0,r.Z)(f,2),h=p[0],v=p[1],g=(0,T.R2)(t);if(!g)return!1;if(e.check===V&&g.some((function(e){return ve(e,h,v,t.strokeSharpness)})))return!0;return g.some((function(e){return me(e,h,v,n)}))},te=function(e,t){var n,o=y(t),i=(0,I.qf)(e),a=re(i),c=S(a,e.angle),s=C(c,o),u=function(e){return[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0]}(l(s,E(a))),d=(n=e.x,[0,0,0,0,e.y,n,0,0]),f=l(s,d),p=(0,r.Z)(i,4),h=p[0],v=p[1];return[f,u,(p[2]-h)/2,(p[3]-v)/2]},ne=function(e){var t=(0,I.qf)(e),n=re(t),r=S(n,e.angle),o=a(function(e){return[1,0,0,0,-.5*e[5],.5*e[4],0,0]}(E(n)));return c(o,r)},re=function(e){var t=(0,r.Z)(e,4),n=t[0],i=t[1],a=t[2],l=t[3];return o((n+a)/2,(i+l)/2)},oe=function(e,t,n){var r=ne(e),o=C(r,y(t)),i=C(r,y(n)),a=g(o,i),l=e.height/e.width,c=e.width/2,s=e.height/2,u=a[2],d=a[3],f=a[1],p=Math.abs(d),h=Math.abs(u);switch(e.type){case"rectangle":case"image":case"text":return f/(c*(h+l*p));case"diamond":return p<h?f/(h*c):f/(p*s);case"ellipse":return f/(c*Math.sqrt(Math.pow(u,2)+Math.pow(l,2)*Math.pow(d,2)))}},ie=function(e,t,n){if(0===t){var r=(0,I.qf)(e),o=re(r);return x(o)}var i,l=ne(e),c=C(l,y(n)),s=a(l);switch(e.type){case"rectangle":case"image":case"text":case"diamond":i=he(e,t,c);break;case"ellipse":i=pe(e,t,c)}return x(C(s,i))},ae=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=ne(e),i=C(o,y(t)),l=C(o,y(n)),c=g(i,l),s=a(o),u=le(e,c,i,r);return u.map((function(e){return x(C(s,e))}))},le=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;switch(e.type){case"rectangle":case"image":case"text":case"diamond":var i=ce(e);r=i.flatMap((function(e,n){var r=[e,i[(n+1)%4]];return se(t,ue(r,o))})).concat(i.flatMap((function(e){return fe(e,o,t)})));break;case"ellipse":r=de(e,o,t)}if(r.length<2)return[];var a=r.sort((function(e,t){return k(e,n)-k(t,n)}));return[a[0],a[a.length-1]]},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t*e.width/2,r=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":return[o(n,r),o(n,-r),o(-n,-r),o(-n,r)];case"diamond":return[o(0,r),o(n,0),o(0,-r),o(-n,0)]}},se=function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return _(o,e)*_(i,e)>=0?[]:[w(e,g(o,i))]},ue=function(e,t){var n=(0,r.Z)(e,2),o=n[0],i=n[1],a=function(e,t){var n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]}(function(e,t){return h([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0])}(o,i),t);return[C(a,o),C(a,i)]},de=function(e,t,n){var r=e.width/2+t,i=e.height/2+t,a=n[2],l=n[3],c=n[1],s=r*r*a*a+i*i*l*l,u=s-c*c;if(0===s||u<=0)return[];var d=Math.sqrt(u),f=-r*r*a*c,p=-i*i*l*c;return[o((f+r*i*l*d)/s,(p-r*i*a*d)/s),o((f-r*i*l*d)/s,(p+r*i*a*d)/s)]},fe=function(e,t,n){if(0===t)return 0===_(n,e)?[e]:[];var i=n[2],a=n[3],l=n[1],c=x(e),s=(0,r.Z)(c,2),u=s[0],d=s[1],f=i*i+a*a,p=t*t*f-Math.pow(i*u+a*d+l,2);if(0===f||p<=0)return[];var h=Math.sqrt(p),v=u*a*a-d*i*a-i*l,m=d*i*i-u*i*a-a*l;return[o((v+a*h)/f,(m-i*h)/f),o((v-a*h)/f,(m+i*h)/f)]},pe=function(e,t,n){var i=Math.abs(t),a=e.width*i/2,l=e.height*i/2,c=Math.sign(t),s=x(n),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=0===f?1e-4:f,h=Math.pow(d,2)*Math.pow(l,2)+Math.pow(p,2)*Math.pow(a,2),v=(-d*Math.pow(l,2)+c*p*Math.sqrt(Math.max(0,h-Math.pow(a,2)*Math.pow(l,2))))/h,m=(-v*d-1)/p,g=-Math.pow(a,2)*v/(Math.pow(m,2)*Math.pow(l,2)+Math.pow(v,2)*Math.pow(a,2));return o(g,(-v*g-1)/m)},he=function(e,t,n){var r=Math.abs(t),o=Math.sign(t),i=ce(e,r),a=0,l=null;return i.forEach((function(e){var t=o*g(n,e)[1];t>a&&(a=t,l=e)})),l},ve=function(e,t,n,r){var o,i=[],a=!1,l=P((0,I.CM)(e));try{for(l.s();!(o=l.n()).done;){var c=o.value;"move"===c.op?(a=!a)&&i.push([c.data[0],c.data[1]]):"bcurveTo"===c.op?a&&(i.push([c.data[0],c.data[1]]),i.push([c.data[2],c.data[3]]),i.push([c.data[4],c.data[5]])):"lineTo"===c.op&&a&&i.push([c.data[0],c.data[1]])}}catch(e){l.e(e)}finally{l.f()}if(i.length>=4){if("sharp"===r)return(0,O.c9)(i,t,n);var s=(0,j.s)(i,10,5);return(0,O.c9)(s,t,n)}return!1},me=function(e,t,n,o){var i=(0,I.CM)(e),a=[0,0];return i.some((function(i,l){var c=i.op,s=i.data;if("move"===c)a=s;else{if("bcurveTo"===c){var u=[s[0],s[1]],d=[s[2],s[3]],f=[s[4],s[5]],p=a;a=f;var h=function(e,t,n,o,i,a){for(var l=(0,r.Z)(i,2),c=l[0],s=l[1],u=function(r,i){return Math.pow(1-r,3)*o[i]+3*r*Math.pow(1-r,2)*n[i]+3*Math.pow(r,2)*(1-r)*t[i]+e[i]*Math.pow(r,3)},d=0;d<=1;){var f=u(d,0),p=u(d,1);if(Math.sqrt(Math.pow(f-c,2)+Math.pow(p-s,2))<a)return!0;d+=.01}return!1}(p,u,d,f,[t,n],o);return h}if("lineTo"===c)return ve(e,t,n,"sharp");"qcurveTo"===c&&console.warn("qcurveTo is not implemented yet")}return!1}))}},7812:function(e,t,n){"use strict";n.d(t,{PK:function(){return f},Xx:function(){return p},bp:function(){return v},oA:function(){return h}});var r=n(668),o=n(489),i=n(6759),a=n(3152),l=n(8288),c=n(8211),s=n(1974);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},p=function(){var e=(0,i.Z)(a.default.mark((function e(t){var n,r,o,c,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileIds,r=t.files,o=t.imageCache,c=new Map,s=new Map,e.next=5,Promise.all(n.reduce((function(e,t){var n=r[t];return n&&!c.has(t)?(c.set(t,!0),e.concat((0,i.Z)(a.default.mark((function e(){var r,i,c;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.mimeType!==l.LO.binary){e.next=3;break}throw new Error("Only images can be added to ImageCache");case 3:return r=f(n.dataURL),i={image:r,mimeType:n.mimeType},o.set(t,i),e.next=8,r;case 8:c=e.sent,o.set(t,d(d({},i),{},{image:c})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s.set(t,!0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))())):e}),[]));case 5:return e.abrupt("return",{imageCache:o,updatedFiles:c,erroredFiles:s});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(e){return e.filter((function(e){return(0,s.wi)(e)}))},v=function(){var e=(0,i.Z)(a.default.mark((function e(t){var n,o,i,s,u,d,f;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new DOMParser).parseFromString(t,l.LO.svg),o=n.querySelector("svg"),!n.querySelector("parsererror")&&"svg"===(null==(a=o)?void 0:a.nodeName.toLowerCase())){e.next=7;break}throw new Error((0,c.t)("errors.invalidSVGString"));case 7:return o.hasAttribute("xmlns")||o.setAttribute("xmlns",l.hR),o.hasAttribute("width")&&o.hasAttribute("height")||(i=o.getAttribute("viewBox"),s=o.getAttribute("width")||"50",u=o.getAttribute("height")||"50",i&&(d=i.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(f=(0,r.Z)(d,3),s=f[1],u=f[2]),o.setAttribute("width",s),o.setAttribute("height",u)),e.abrupt("return",o.outerHTML);case 10:case"end":return e.stop()}var a}),e)})));return function(t){return e.apply(this,arguments)}}()},5118:function(e,t,n){"use strict";n.d(t,{ox:function(){return c.ox},BQ:function(){return F},_M:function(){return K},EJ:function(){return C},o8:function(){return _},Sy:function(){return a.Sy},os:function(){return l.os},KP:function(){return l.KP},Un:function(){return g},$V:function(){return S},qf:function(){return l.qf},Pi:function(){return l.Pi},jt:function(){return h},o4:function(){return o.o4},Lm:function(){return H},Qp:function(){return o.Qp},T:function(){return b.T},xx:function(){return b.xx},Uo:function(){return N},n2:function(){return v},PC:function(){return c.PC},kK:function(){return c.kK},n_:function(){return B},wX:function(){return s.wX},r2:function(){return i.r2},wB:function(){return s.wB},QD:function(){return o.QD},qP:function(){return W},iB:function(){return i.iB},Up:function(){return a.Up},vw:function(){return a.vw},y8:function(){return a.y8},VL:function(){return a.VL},oN:function(){return w.oN},RT:function(){return z},b_:function(){return P},vY:function(){return b.vY},N_:function(){return a.N_}});var r=n(489),o=n(6126),i=n(1974),a=n(2791),l=n(8925),c=n(267),s=n(2325),u=n(668),d=n(8357),f=["rotation"],p=function(e,t,n){return t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3]},h=function(e,t,n,r,o,i){return e.reduce((function(e,a){if(e)return e;var l=function(e,t,n,r,o,i){if(!t.selectedElementIds[e.id])return!1;var a=(0,c.PC)(e,o,i),l=a.rotation,s=(0,d.Z)(a,f);if(l&&p(l,n,r))return"rotation";var u=Object.keys(s).filter((function(e){var t=s[e];return!!t&&p(t,n,r)}));return u.length>0&&u[0]}(a,t,n,r,o,i);return l?{element:a,transformHandleType:l}:null}),null)},v=function(e,t,n,r,o){var i=(0,u.Z)(e,4),a=i[0],l=i[1],s=i[2],d=i[3],f=(0,c.kK)([a,l,s,d],0,r,o,c.ox);return Object.keys(f).find((function(e){var r=f[e];return r&&p(r,t,n)}))||!1},m=["ns","nesw","ew","nwse"],g=function(e){var t=e.element,n=e.transformHandleType,r=t&&Math.sign(t.height)*Math.sign(t.width)==-1,o=null;switch(n){case"n":case"s":o="ns";break;case"w":case"e":o="ew";break;case"nw":case"se":o=r?"nesw":"nwse";break;case"ne":case"sw":o=r?"nwse":"nesw";break;case"rotation":return"grab"}return o&&t&&(o=function(e,t){var n=m.indexOf(e);if(n>=0){var r=Math.round(t/(Math.PI/4));e=m[(n+r)%m.length]}return e}(o,t.angle)),o?"".concat(o,"-resize"):""},b=n(8634),y=n(8290),x=n(1935),w=n(5710),k=n(242),_=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7?arguments[7]:void 0,s=(0,l.KP)(t),d=(0,u.Z)(s,2),f=d[0],p=d[1],h={x:n-f,y:r-p};t.forEach((function(n){if(E(o,i,a,e,n,h),!n.groupIds.length||c.editingGroupId&&!(0,k.zq)(c,n)){var r=(0,w.WJ)(n);r&&E(o,i,a,e,r,h)}(0,y.Ww)(n,{simultaneouslyUpdated:t})}))},E=function(e,t,n,r,o,i){var a,l;if(e){var c=e&&t<n,s=e&&t>n,u=r.originalElements.get(o.id);a=c&&u?u.x:o.x+i.x,l=s&&u?u.y:o.y+i.y}else a=o.x+i.x,l=o.y+i.y;(0,x.DR)(o,{x:a,y:l})},S=function(e,t,n){var r=(0,l.KP)(e),o=(0,u.Z)(r,2);return[t-o[0],n-o[1]]},C=function(e,t,n,r,i,a,l,c,s,u,d){if(s&&"selection"!==e.type)if(d)c=l/d;else{if(Math.abs(a-r)>Math.abs(i-n)){var f=(0,o.uK)(t,c,i<n?-l:l);l=f.width,c=f.height}else{var p=(0,o.uK)(t,l,a<r?-c:c);l=p.width,c=p.height}c<0&&(c=-c)}var h=i<n?n-l:n,v=a<r?r-c:r;u&&(h=n-(l+=l)/2,v=r-(c+=c)/2),0!==l&&0!==c&&(0,x.DR)(e,{x:h,y:v,width:l,height:c})},O=n(6066),j=n(6340),I=n(1564),T=n(8288),M=n(3917),L=n(828),A=function(e,t,n,r,o,i){var a=r.zoom,l=180*n/Math.PI,c=e*(a.value-1)/2,s=t*(a.value-1)/2;return e>o&&1!==a.value&&(c=o*(a.value-1)/2),t>i&&1!==a.value&&(s=i*(a.value-1)/2),"translate(".concat(c,"px, ").concat(s,"px) scale(").concat(a.value,") rotate(").concat(l,"deg)")},P=function(e){var t,n=e.id,r=e.onChange,o=e.onSubmit,a=e.getViewportCoords,l=e.element,c=e.canvas,s=e.excalidrawContainer,d=e.app,f=function(){var e,r=d.state,o=null===(e=I.Z.getScene(l))||void 0===e?void 0:e.getElement(n);if(o){var c=o.textAlign,s=o.verticalAlign,f=(0,w.hP)((0,j.mO)(o));if(o&&(0,i.iB)(o)){var h=o.x,v=o.y,m=(0,w.tl)(o),g=o.width,b=o.height,y=o.width,k=o.height;if(m&&o.containerId){var _=function(e,t){var n=t.style.fontFamily.replace(/"/g,"");return(0,j.$g)({fontFamily:e.fontFamily})!==n||"".concat(e.fontSize,"px")!==t.style.fontSize}(o,p),E=Number(p.style.height.slice(0,-2));if(E>0&&(k=E),_&&(t=m.height,k=o.height),t||(t=m.height),g=m.width-2*T.gK,b=m.height-2*T.gK,y=g,h=m.x+T.gK,k>b){var S=Math.min(k-b,f);return void(0,x.DR)(m,{height:m.height+S})}if(m.height>t&&k<b){var C=Math.min(b-k,f);(0,x.DR)(m,{height:m.height-C})}else s===T.oX.MIDDLE&&(v=m.y+m.height/2-k/2),s===T.oX.BOTTOM&&(v=m.y+m.height-k-T.gK)}var O=a(h,v),M=(0,u.Z)(O,2),L=M[0],P=M[1],D=p.selectionStart,z=p.selectionEnd,R=p.value.length;if(p.value=o.originalText,D===z&&z!==R){var Z=R-z;p.selectionStart=p.value.length-Z,p.selectionEnd=p.value.length-Z}var N=o.originalText.split("\n"),B=o.containerId?f:o.height/N.length;m||(g=(r.width-8-L)/r.zoom.value);var H=(r.height-P)/r.zoom.value,W=m?m.angle:o.angle;Object.assign(p.style,{font:(0,j.mO)(o),lineHeight:"".concat(B,"px"),width:"".concat(y,"px"),height:"".concat(k,"px"),left:"".concat(L,"px"),top:"".concat(P,"px"),transform:A(y,k,W,r,g,H),textAlign:c,verticalAlign:s,color:o.strokeColor,opacity:o.opacity/100,filter:"var(--theme-filter)",maxWidth:"".concat(g,"px"),maxHeight:"".concat(H,"px")}),(0,j.h2)()&&(p.style.fontFamily=(0,j.$g)(o)),(0,x.DR)(o,{x:h,y:v})}}},p=document.createElement("textarea");p.dir="auto",p.tabIndex=0,p.dataset.type="wysiwyg",p.wrap="off",p.classList.add("excalidraw-wysiwyg");var h="pre",v="normal";(0,i.Xh)(l)&&(h="pre-wrap",v="break-word"),Object.assign(p.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:v,whiteSpace:h,overflowWrap:"break-word"}),f(),r&&(p.oninput=function(){var e,t=null===(e=I.Z.getScene(l))||void 0===e?void 0:e.getElement(n),o=(0,j.mO)(t),a=Math.round(p.scrollHeight/(0,w.hP)(o));if((0,i.Xh)(l)&&a>1){var c="auto";if(2===a){var s=(0,w.tl)(l);1===(0,w.lD)(p.value,o,s.width).split("\n").length&&(c="".concat(p.scrollHeight/2,"px"))}p.style.height=c,p.style.height="".concat(p.scrollHeight,"px")}r(p.value.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n"))}),p.onkeydown=function(e){if(!e.shiftKey&&L.Lo.keyTest(e))e.preventDefault(),d.actionManager.executeAction(L.Lo),f();else if(!e.shiftKey&&L.CZ.keyTest(e))e.preventDefault(),d.actionManager.executeAction(L.CZ),f();else if(M.Tu.keyTest(e))d.actionManager.executeAction(M.Tu);else if(M.Zq.keyTest(e))d.actionManager.executeAction(M.Zq);else if(e.key===O.tW.ESCAPE)e.preventDefault(),E=!0,S();else if(e.key===O.tW.ENTER&&e[O.tW.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||229===e.keyCode)return;E=!0,S()}else(e.key===O.tW.TAB||e[O.tW.CTRL_OR_CMD]&&(e.code===O.aU.BRACKET_LEFT||e.code===O.aU.BRACKET_RIGHT))&&(e.preventDefault(),e.shiftKey||e.code===O.aU.BRACKET_LEFT?y():b(),p.dispatchEvent(new Event("input")))};var m=" ".repeat(4),g=new RegExp("^ {1,".concat(4,"}")),b=function(){var e=p.selectionStart,t=p.selectionEnd,n=k(),r=p.value;n.forEach((function(e){var t=r.slice(0,e),n=r.slice(e);r="".concat(t).concat(m).concat(n)})),p.value=r,p.selectionStart=e+4,p.selectionEnd=t+4*n.length},y=function(){var e=p.selectionStart,t=p.selectionEnd,n=k(),r=[],o=p.value;n.forEach((function(e){var t=o.slice(e,e+4).match(g);if(t){var n=o.slice(0,e),i=o.slice(e+t[0].length);o="".concat(n).concat(i),r.push(e)}})),p.value=o,r.length&&(e>r[r.length-1]?p.selectionStart=Math.max(e-4,r[r.length-1]):p.selectionStart=e,p.selectionEnd=Math.max(p.selectionStart,t-4*r.length))},k=function(){var e=p.selectionStart,t=p.selectionEnd,n=p.value,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split("\n").reduce((function(t,n,r,o){return t.concat(r?t[r-1]+o[r-1].length+1:e)}),[]).reverse()},_=function(e){e.preventDefault(),e.stopPropagation()},E=!1,S=function(){var e;C();var t=null===(e=I.Z.getScene(l))||void 0===e?void 0:e.getElement(l.id);if(t){var n=p.value,r=(0,w.tl)(t);if(r)if(n=t.text,p.value){var a=(0,w.xB)(r);a&&a===l.id||(0,x.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:l.id})})}else{var c;(0,x.DR)(r,{boundElements:null===(c=r.boundElements)||void 0===c?void 0:c.filter((function(e){return!(0,i.iB)(e)}))})}o({text:n,viaKeyboard:E,originalText:p.value})}},C=function(){R||(R=!0,p.onblur=null,p.oninput=null,p.onkeydown=null,Z&&Z.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("wheel",_,!0),window.removeEventListener("pointerdown",D),window.removeEventListener("pointerup",P),window.removeEventListener("blur",S),z(),p.remove())},P=function e(t){window.removeEventListener("pointerup",e);var n=null==t?void 0:t.target,r=n instanceof HTMLInputElement&&n.closest(".color-picker-input")&&(0,j.s)(n);setTimeout((function(){p.onblur=S,n&&r&&(n.onblur=function(){p.focus()}),r||p.focus()}))},D=function(e){var t=e.target instanceof HTMLInputElement&&e.target.closest(".color-picker-input")&&(0,j.s)(e.target);((e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(".".concat(T.$C.SHAPE_ACTIONS_MENU))&&!(0,j.s)(e.target)||t)&&(p.onblur=null,window.addEventListener("pointerup",P),window.addEventListener("blur",S))},z=I.Z.getScene(l).addCallback((function(){var e;f(),!(null===(e=document.activeElement)||void 0===e||!e.closest(".color-picker-input"))||p.focus()})),R=!1;p.select(),P();var Z=null;c&&"ResizeObserver"in window?(Z=new window.ResizeObserver((function(){f()}))).observe(c):window.addEventListener("resize",f),window.addEventListener("pointerdown",D),window.addEventListener("wheel",_,{passive:!1,capture:!0}),null==s||s.querySelector(".excalidraw-textEditorContainer").appendChild(p)},D=n(75),z=function(e,t){return Boolean(!e.viewModeEnabled&&"custom"!==e.activeTool.type&&(e.editingElement||"selection"!==e.activeTool.type&&"eraser"!==e.activeTool.type)||(0,D.eD)(t,e).length)};function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N=function(e){return e.reduce((function(e,t){return e+t.version}),0)},B=function(e){return e.filter((function(e){return!e.isDeleted&&!(0,o.QD)(e)}))},H=function(e){return e.filter((function(e){return!e.isDeleted}))},W=function(e){return!e.isDeleted},U=function(e){return H(e).map((function(e){return(0,i.dt)(e.type)?Z(Z({},e),{},{lastCommittedPoint:null}):e}))},F=function(e){return U(e)},K=function(e){return U(e)}},6938:function(e,t,n){"use strict";n.d(t,{_:function(){return x}});var r=n(5858),o=n(489),i=n(668),a=n(7775),l=n(6967),c=n(6552),s=n(5118),u=n(8925),d=n(1935),f=n(1564),p=n(8290),h=n(6340),v=n(1974);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(){function e(t,n){(0,a.Z)(this,e),this.elementId=t.id,f.Z.mapElementToScene(this.elementId,n),e.normalizePoints(t),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1},this.hoverPointIndex=-1}return(0,l.Z)(e,null,[{key:"getElement",value:function(e){var t,n=null===(t=f.Z.getScene(e))||void 0===t?void 0:t.getNonDeletedElement(e);return n||null}},{key:"handleBoxSelection",value:function(t,n,r){var o;if(!n.editingLinearElement||"selection"!==(null===(o=n.draggingElement)||void 0===o?void 0:o.type))return!1;var a=n.editingLinearElement,l=a.selectedPointsIndices,c=a.elementId,u=e.getElement(c);if(!u)return!1;var d=(0,s.qf)(n.draggingElement),f=(0,i.Z)(d,4),p=f[0],h=f[1],v=f[2],m=f[3],g=e.getPointsGlobalCoordinates(u).reduce((function(e,n,r){return(n[0]>=p&&n[0]<=v&&n[1]>=h&&n[1]<=m||t.shiftKey&&null!=l&&l.includes(r))&&e.push(r),e}),[]);r({editingLinearElement:y(y({},a),{},{selectedPointsIndices:g.length?g:null})})}},{key:"handlePointDragging",value:function(t,n,r,o,i){if(!i)return!1;var a=i.selectedPointsIndices,l=i.elementId,c=e.getElement(l);if(!c)return!1;var s=c.points[i.pointerDownState.lastClickedPoint];if(a&&s){var u=e.createPointAt(c,n-i.pointerOffset.x,r-i.pointerOffset.y,t.gridSize),d=u[0]-s[0],f=u[1]-s[1];if(e.movePoints(c,a.map((function(o){return{index:o,point:o===i.pointerDownState.lastClickedPoint?e.createPointAt(c,n-i.pointerOffset.x,r-i.pointerOffset.y,t.gridSize):[c.points[o][0]+d,c.points[o][1]+f],isDragging:o===i.pointerDownState.lastClickedPoint}}))),(0,v.Mn)(c,!1)){var p=[];0===a[0]&&p.push((0,h.AK)(e.getPointGlobalCoordinates(c,c.points[0])));var m=a[a.length-1];m===c.points.length-1&&p.push((0,h.AK)(e.getPointGlobalCoordinates(c,c.points[m]))),p.length&&o(c,p)}return!0}return!1}},{key:"handlePointerUp",value:function(t,n,r){var o,i=n.elementId,a=n.selectedPointsIndices,l=n.isDragging,s=n.pointerDownState,u=e.getElement(i);if(!u)return n;var d={};if(l&&a){var v,g=m(a);try{for(g.s();!(v=g.n()).done;){var b=v.value;if(0===b||b===u.points.length-1){(0,c.g6)(u.points,r.zoom.value)&&e.movePoints(u,[{index:b,point:0===b?u.points[u.points.length-1]:u.points[0]}]);var x=(0,p.N1)(r)?(0,p.Y9)((0,h.AK)(e.getPointAtIndexGlobalCoordinates(u,b)),f.Z.getScene(u)):null;d[0===b?"startBindingElement":"endBindingElement"]=x}}}catch(e){g.e(e)}finally{g.f()}}return y(y(y({},n),d),{},{selectedPointsIndices:l||t.shiftKey?!l&&t.shiftKey&&null!==(o=s.prevSelectedPointsIndices)&&void 0!==o&&o.includes(s.lastClickedPoint)?a&&a.filter((function(e){return e!==s.lastClickedPoint})):a:null!=a&&a.includes(s.lastClickedPoint)?[s.lastClickedPoint]:a,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"handlePointerDown",value:function(t,n,o,a,l){var u,h={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!l)return h;var m=l.elementId,g=e.getElement(m);if(!g)return h;if(t.altKey&&n.editingLinearElement)return null==l.lastUncommittedPoint&&(0,d.DR)(g,{points:[].concat((0,r.Z)(g.points),[e.createPointAt(g,a.x,a.y,n.gridSize)])}),o.resumeRecording(),h.linearElementEditor=y(y({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:-1},selectedPointsIndices:[g.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,p.Y9)(a,f.Z.getScene(g))}),h.didAddPoint=!0,h;var b=e.getPointIndexUnderCursor(g,n.zoom,a.x,a.y);if(b>-1)h.hitElement=g;else{var x=l.startBindingElement,k=l.endBindingElement;(0,p.N1)(n)&&(0,v.Mn)(g)&&(0,p.HG)(g,x,k)}var _=(0,s.qf)(g),E=(0,i.Z)(_,4),S=E[0],C=E[1],O=(S+E[2])/2,j=(C+E[3])/2,I=b>-1&&(0,c.U1)(g.x+g.points[b][0],g.y+g.points[b][1],O,j,g.angle),T=b>-1||t.shiftKey?t.shiftKey||null!==(u=l.selectedPointsIndices)&&void 0!==u&&u.includes(b)?w([].concat((0,r.Z)(l.selectedPointsIndices||[]),[b])):[b]:null;return h.linearElementEditor=y(y({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:b},selectedPointsIndices:T,pointerOffset:I?{x:a.x-I[0],y:a.y-I[1]}:{x:0,y:0}}),h}},{key:"handlePointerMove",value:function(t,n,r,o,i){var a=o.elementId,l=o.lastUncommittedPoint,c=e.getElement(a);if(!c)return o;var s=c.points,u=s[s.length-1];if(!t.altKey)return u===l&&e.deletePoints(c,[s.length-1]),y(y({},o),{},{lastUncommittedPoint:null});var d=e.createPointAt(c,n-o.pointerOffset.x,r-o.pointerOffset.y,i);return u===l?e.movePoints(c,[{index:c.points.length-1,point:d}]):e.addPoints(c,[{point:d}]),y(y({},o),{},{lastUncommittedPoint:c.points[c.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=e.x,f=e.y,p=(0,c.U1)(d+t[0],f+t[1],l,u,e.angle),h=(0,i.Z)(p,2);return[d=h[0],f=h[1]]}},{key:"getPointsGlobalCoordinates",value:function(e){var t=(0,s.qf)(e),n=(0,i.Z)(t,4),r=n[0],o=n[1],a=n[2],l=n[3],u=(r+a)/2,d=(o+l)/2;return e.points.map((function(t){var n=e.x,r=e.y,o=(0,c.U1)(n+t[0],r+t[1],u,d,e.angle),a=(0,i.Z)(o,2);return[n=a[0],r=a[1]]}))}},{key:"getPointAtIndexGlobalCoordinates",value:function(e,t){var n=t<0?e.points.length+t:t,r=(0,s.qf)(e),o=(0,i.Z)(r,4),a=o[0],l=o[1],u=(a+o[2])/2,d=(l+o[3])/2,f=e.points[n],p=e.x,h=e.y;return(0,c.U1)(p+f[0],h+f[1],u,d,e.angle)}},{key:"pointFromAbsoluteCoords",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=(0,c.U1)(t[0],t[1],l,u,-e.angle),f=(0,i.Z)(d,2),p=f[0],h=f[1];return[p-e.x,h-e.y]}},{key:"getPointIndexUnderCursor",value:function(e,t,n,r){for(var o=this.getPointsGlobalCoordinates(e),i=o.length;--i>-1;){var a=o[i];if((0,c.LW)(n,r,a[0],a[1])*t.value<this.POINT_HANDLE_SIZE+1)return i}return-1}},{key:"createPointAt",value:function(e,t,n,r){var o=(0,c.wC)(t,n,r),a=(0,s.qf)(e),l=(0,i.Z)(a,4),u=l[0],d=l[1],f=(u+l[2])/2,p=(d+l[3])/2,h=(0,c.U1)(o[0],o[1],f,p,-e.angle),v=(0,i.Z)(h,2),m=v[0],g=v[1];return[m-e.x,g-e.y]}},{key:"getNormalizedPoints",value:function(e){var t=e.points,n=t[0][0],r=t[0][1];return{points:t.map((function(e,t){return[e[0]-n,e[1]-r]})),x:e.x+n,y:e.y+r}}},{key:"normalizePoints",value:function(t){(0,d.DR)(t,e.getNormalizedPoints(t))}},{key:"duplicateSelectedPoints",value:function(t){if(!t.editingLinearElement)return!1;var n=t.editingLinearElement,r=n.selectedPointsIndices,o=n.elementId,i=e.getElement(o);if(!i||null===r)return!1;var a=i.points,l=[],c=!1,s=-1,u=a.reduce((function(e,t,n){if(++s,e.push(t),r.includes(n)){var o=a[n+1];o||(c=!0),e.push(o?[(t[0]+o[0])/2,(t[1]+o[1])/2]:[t[0],t[1]]),l.push(s+1),++s}return e}),[]);if((0,d.DR)(i,{points:u}),c){var f=i.points[i.points.length-1];e.movePoints(i,[{index:i.points.length-1,point:[f[0]+30,f[1]+30]}])}return{appState:y(y({},t),{},{editingLinearElement:y(y({},t.editingLinearElement),{},{selectedPointsIndices:l})})}}},{key:"deletePoints",value:function(t,n){var r=0,o=0;if(n.includes(0)){var i=t.points.find((function(e,t){return!n.includes(t)}));i&&(r=i[0],o=i[1])}var a=t.points.reduce((function(e,t,i){return n.includes(i)||e.push(e.length?[t[0]-r,t[1]-o]:[0,0]),e}),[]);e._updatePoints(t,a,r,o)}},{key:"addPoints",value:function(t,n){var o=[].concat((0,r.Z)(t.points),(0,r.Z)(n.map((function(e){return e.point}))));e._updatePoints(t,o,0,0)}},{key:"movePoints",value:function(t,n,r){var o=t.points,i=0,a=0,l=n.find((function(e){return 0===e.index}));l&&(i=l.point[0]-o[l.index][0],a=l.point[1]-o[l.index][1]);var c=o.map((function(e,t){var r=n.find((function(e){return e.index===t}));if(r){if(l)return e;var c=r.point[0]-o[r.index][0],s=r.point[1]-o[r.index][1];return[e[0]+c,e[1]+s]}return i||a?[e[0]-i,e[1]-a]:e}));e._updatePoints(t,c,i,a,r)}},{key:"_updatePoints",value:function(e,t,n,r,o){var i=(0,u.Ut)(e,t,e.strokeSharpness||"round"),a=(0,u.Ut)(e,e.points,e.strokeSharpness||"round"),l=(i[0]+i[2])/2,s=(i[1]+i[3])/2,f=(a[0]+a[2])/2-l,p=(a[1]+a[3])/2-s,h=(0,c.U1)(n,r,f,p,e.angle);(0,d.DR)(e,y(y({},o),{},{points:t,x:e.x+h[0],y:e.y+h[1]}))}}]),e}();x.POINT_HANDLE_SIZE=10;var w=function(e){var t=(0,r.Z)(new Set(e.filter((function(e){return null!==e&&-1!==e}))));return(t=t.sort((function(e,t){return e-t}))).length?t:null}},1935:function(e,t,n){"use strict";n.d(t,{BE:function(){return p},DR:function(){return f},ZP:function(){return h}});var r=n(8758),o=n(489),i=n(6202),a=n(1564),l=n(5001),c=n(6954),s=n(6340);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t){var n,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=!1,f=t,p=f.points,h=f.fileId;for(var v in void 0!==p&&(t=d(d({},(0,l.k)(p)),t)),t){var m=t[v];if(void 0!==m){if(e[v]===m&&("object"!==(0,r.Z)(m)||null===m||"groupIds"===v||"scale"===v))continue;if("scale"===v){var g=e[v],b=m;if(g[0]===b[0]&&g[1]===b[1])continue}else if("points"===v){var y=e[v],x=m;if(y.length===x.length){for(var w=!1,k=y.length;--k;){var _=y[k],E=x[k];if(_[0]!==E[0]||_[1]!==E[1]){w=!0;break}}if(!w)continue}}e[v]=m,u=!0}}if(!u)return e;(void 0===t.height&&void 0===t.width&&void 0===h&&void 0===p||(0,i.bI)(e),e.version++,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),o)&&(null===(n=a.Z.getScene(e))||void 0===n||n.informMutation());return e},p=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?d(d(d({},e),t),{},{updated:(0,s.C3)(),version:e.version+1,versionNonce:(0,c.LU)()}):e},h=function(e,t){return e.version=(null!=t?t:e.version)+1,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),e}},2791:function(e,t,n){"use strict";n.d(t,{KE:function(){return E},N_:function(){return _},OL:function(){return O},Sy:function(){return j},Up:function(){return x},VL:function(){return k},vw:function(){return C},y8:function(){return S}});var r=n(8758),o=n(668),i=n(489),a=n(8357),l=n(6340),c=n(6954),s=n(1935),u=n(242),d=n(5118),f=n(6552),p=n(8925),h=n(5710),v=n(8288),m=["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","strokeSharpness","boundElements","link","locked"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e,t){var n,r,o=t.x,i=t.y,s=t.strokeColor,u=t.backgroundColor,d=t.fillStyle,f=t.strokeWidth,p=t.strokeStyle,h=t.roughness,v=t.opacity,g=t.width,b=void 0===g?0:g,y=t.height,x=void 0===y?0:y,w=t.angle,k=void 0===w?0:w,_=t.groupIds,E=void 0===_?[]:_,S=t.strokeSharpness,C=t.boundElements,O=void 0===C?null:C,j=t.link,I=void 0===j?null:j,T=t.locked,M=(0,a.Z)(t,m);return{id:M.id||(0,c.kb)(),type:e,x:o,y:i,width:b,height:x,angle:k,strokeColor:s,backgroundColor:u,fillStyle:d,strokeWidth:f,strokeStyle:p,roughness:h,opacity:v,groupIds:E,strokeSharpness:S,seed:null!==(n=M.seed)&&void 0!==n?n:(0,c.LU)(),version:M.version||1,versionNonce:null!==(r=M.versionNonce)&&void 0!==r?r:0,isDeleted:!1,boundElements:O,updated:(0,l.C3)(),link:I,locked:T}},x=function(e){return y(e.type,e)},w=function(e,t){return{x:"center"===e.textAlign?t.width/2:"right"===e.textAlign?t.width:0,y:"middle"===e.verticalAlign?t.height/2:0}},k=function(e){var t=(0,h.X1)(e.text,(0,l.mO)(e)),n=w(e,t);return(0,s.BE)(b(b({},y("text",e)),{},{text:e.text,fontSize:e.fontSize,fontFamily:e.fontFamily,textAlign:e.textAlign,verticalAlign:e.verticalAlign,x:e.x-n.x,y:e.y-n.y,width:t.width,height:t.height,baseline:t.baseline,containerId:e.containerId||null,originalText:e.text}),{})},_=function(e,t){var n=t.text,r=t.isDeleted,i=t.originalText,a=(0,h.tl)(e);a&&(n=(0,h.lD)(n,(0,l.mO)(e),a.width));var c=function(e,t){var n=null,r=(0,h.tl)(e);r&&(n=r.width-2*v.gK);var i,a,c=(0,h.X1)(t,(0,l.mO)(e),n),u=c.width,m=c.height,g=c.baseline,b=e.textAlign,y=e.verticalAlign;if("center"!==b||y!==v.oX.MIDDLE||e.containerId){var x=(0,d.qf)(e),k=(0,o.Z)(x,4),_=k[0],E=k[1],S=k[2],C=k[3],O=(0,p.wC)(e,u,m),j=(0,o.Z)(O,4),I=(_-j[0])/2,T=(E-j[1])/2,M=(S-j[2])/2,L=(C-j[3])/2,A=(0,f.yq)({s:!0,e:"center"===b||"left"===b,w:"center"===b||"right"===b},e.x,e.y,e.angle,I,T,M,L),P=(0,o.Z)(A,2);i=P[0],a=P[1]}else{var D=(0,h.X1)(e.text,(0,l.mO)(e),n),z=w(e,{width:u-D.width,height:m-D.height});i=e.x-z.x,a=e.y-z.y}if(r){var R=r.height,Z=r.width;m>R-2*v.gK&&(R=m+2*v.gK),u>Z-2*v.gK&&(Z=u+2*v.gK),R===r.height&&Z===r.width||(0,s.DR)(r,{height:R,width:Z})}return{width:u,height:m,x:Number.isFinite(i)?i:e.x,y:Number.isFinite(a)?a:e.y,baseline:g}}(e,n);return(0,s.BE)(e,b({text:n,originalText:i,isDeleted:null!=r?r:e.isDeleted},c))},E=function(e){return b(b({},y(e.type,e)),{},{points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null})},S=function(e){return b(b({},y(e.type,e)),{},{points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead,endArrowhead:e.endArrowhead})},C=function(e){return b(b({},y("image",e)),{},{strokeColor:"transparent",status:"pending",fileId:null,scale:[1,1]})},O=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null==t||"object"!==(0,r.Z)(t))return t;if("[object Object]"===Object.prototype.toString.call(t)){var o="function"==typeof t.constructor?Object.create(Object.getPrototypeOf(t)):{};for(var i in t)if(t.hasOwnProperty(i)){if(0===n&&("shape"===i||"canvas"===i))continue;o[i]=e(t[i],n+1)}return o}if(Array.isArray(t)){for(var a=t.length,l=new Array(a);a--;)l[a]=e(t[a],n+1);return l}return t},j=function(e,t,n,r){var o,i,a=O(n);(0,l.h2)()?(a.id="".concat(a.id,"_copy"),null!==(o=window.h)&&void 0!==o&&null!==(i=o.app)&&void 0!==i&&i.getSceneElementsIncludingDeleted().find((function(e){return e.id===a.id}))&&(a.id+="_copy")):a.id=(0,c.kb)();return a.updated=(0,l.C3)(),a.seed=(0,c.LU)(),a.groupIds=(0,u.Qy)(a.groupIds,e,(function(e){return t.has(e)||t.set(e,(0,c.kb)()),t.get(e)})),r&&(a=Object.assign(a,r)),a}},8634:function(e,t,n){"use strict";n.d(t,{LW:function(){return y},T:function(){return T},l2:function(){return C},vY:function(){return x},xx:function(){return I}});var r=n(489),o=n(5858),i=n(668),a=n(8288),l=n(5001),c=n(6552),s=n(8925),u=n(1974),d=n(1935),f=n(6126),p=n(6340),h=n(8290),v=n(1564),m=n(5710);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e){return e>=2*Math.PI?e-2*Math.PI:e},x=function(e,t,n,r,o,a,l,c,s,d,f){if(1===n.length){var p=(0,i.Z)(n,1)[0];return"rotation"===t?(w(p,c,s,o),(0,h.Ww)(p)):!(0,u.bt)(p)||2!==p.points.length||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?!(0,u.iB)(p)||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?t&&C(e.originalElements,l,p,t,a,c,s):(S(p,t,a,c,s),(0,h.Ww)(p)):k(p,r,o,c,s),!0}if(n.length>1){if("rotation"===t)return j(e,n,c,s,o,d,f),!0;if("nw"===t||"ne"===t||"sw"===t||"se"===t)return O(n,t,c,s),!0}return!1},w=function(e,t,n,r){var o=(0,s.qf)(e),l=(0,i.Z)(o,4),c=l[0],u=l[1],f=(c+l[2])/2,p=(u+l[3])/2,h=5*Math.PI/2+Math.atan2(n-p,t-f);r&&(h+=a.ay/2,h-=h%a.ay),h=y(h),(0,d.DR)(e,{angle:h});var g=(0,m.xB)(e);if(g){var b=v.Z.getScene(e).getElement(g);(0,d.DR)(b,{angle:h})}},k=function(e,t,n,r,a){var l=(0,s.qf)(e),u=(0,i.Z)(l,4),p=u[0],h=u[1],v=(p+u[2])/2,m=(h+u[3])/2,g=(0,c.U1)(r,a,v,m,-e.angle),b=(0,i.Z)(g,2),y=b[0],x=b[1],w="end"===t?[y-e.x,x-e.y]:[e.x+e.points[1][0]-y,e.y+e.points[1][1]-x],k=(0,i.Z)(w,2),_=k[0],E=k[1];if(n){var S=function(e,t,n,r){var i=f.uK.apply(void 0,[e].concat((0,o.Z)((0,c.U1)(t,n,0,0,r))));return(0,c.U1)(i.width,i.height,0,0,-r)}(e.type,_,E,e.angle),C=(0,i.Z)(S,2);_=C[0],E=C[1]}var O=(0,c.yq)("end"===t?{s:!0,e:!0}:{n:!0,w:!0},e.x,e.y,e.angle,0,0,(e.points[1][0]-_)/2,(e.points[1][1]-E)/2),j=(0,i.Z)(O,2),I=j[0],T=j[1];(0,d.DR)(e,{x:I,y:T,points:[[0,0],[_,E]]})},_=function(e,t,n){return(0,u.bt)(e)||(0,u.F9)(e)?{points:(0,l.z)(0,t,(0,l.z)(1,n,e.points))}:{}},E=function(e,t,n){var r=e.fontSize*(t/e.width);if(r<1)return null;var o=(0,m.X1)(e.text,(0,p.mO)({fontSize:r,fontFamily:e.fontFamily}),e.containerId?e.width:null);return{size:r,baseline:o.baseline+(n-o.height)}},S=function(e,t,n,r,o){var a,l=(0,s.qf)(e),u=(0,i.Z)(l,4),f=u[0],p=u[1],h=u[2],v=u[3],m=(f+h)/2,g=(p+v)/2,b=(0,c.U1)(r,o,m,g,-e.angle),y=(0,i.Z)(b,2),x=y[0],w=y[1];switch(t){case"se":a=Math.max((x-f)/(h-f),(w-p)/(v-p));break;case"nw":a=Math.max((h-x)/(h-f),(v-w)/(v-p));break;case"ne":a=Math.max((x-f)/(h-f),(v-w)/(v-p));break;case"sw":a=Math.max((h-x)/(h-f),(w-p)/(v-p))}if(a>0){var k=e.width*a,_=e.height*a,S=E(e,k,_);if(null===S)return;var C=(0,s.wC)(e,k,_),O=(0,i.Z)(C,4),j=(f-O[0])/2,I=(p-O[1])/2,T=(h-O[2])/2,M=(v-O[3])/2,L=(0,c.yq)(function(e,t){return{n:/^(n|ne|nw)$/.test(e)||t&&/^(s|se|sw)$/.test(e),s:/^(s|se|sw)$/.test(e)||t&&/^(n|ne|nw)$/.test(e),w:/^(w|nw|sw)$/.test(e)||t&&/^(e|ne|se)$/.test(e),e:/^(e|ne|se)$/.test(e)||t&&/^(w|nw|sw)$/.test(e)}}(t,n),e.x,e.y,e.angle,j,I,T,M),A=(0,i.Z)(L,2),P=A[0],D=A[1];(0,d.DR)(e,{fontSize:S.size,width:k,height:_,baseline:S.baseline,x:P,y:D})}},C=function(e,t,n,r,l,u,f){var v=e.get(n.id),g=(0,s.wC)(v,v.width,v.height),y=(0,i.Z)(g,4),x=[y[0],y[1]],w=[y[2],y[3]],k=(0,c.H5)(x,w),S=(0,c.xj)([u,f],k,-v.angle),C=(0,s.wC)(n,n.width,n.height),O=(0,i.Z)(C,4),j=O[0],I=O[1],T=O[2]-j,M=O[3]-I,L=(w[0]-x[0])/T,A=(w[1]-x[1])/M,P={},D=(0,m.WJ)(n);r.includes("e")&&(L=(S[0]-x[0])/T),r.includes("s")&&(A=(S[1]-x[1])/M),r.includes("w")&&(L=(w[0]-S[0])/T),r.includes("n")&&(A=(w[1]-S[1])/M);var z=v.width,R=v.height,Z=n.width*L,N=n.height*A;if(l&&(Z=2*Z-z,N=2*N-R),t){var B=Math.abs(Z)/z,H=Math.abs(N)/R;if(1===r.length&&(N*=B,Z*=H),2===r.length){var W=Math.max(B,H);Z=z*W*Math.sign(Z),N=R*W*Math.sign(N)}}if(D){var U=e.get(D.id);if(U&&(P={fontSize:U.fontSize,baseline:U.baseline}),t){var F=E(D,Z-2*a.gK,N-2*a.gK);if(null===F)return;P={fontSize:F.size,baseline:F.baseline}}else{var K=(0,m.AT)((0,p.mO)(D)),V=(0,m.w_)((0,p.mO)(D));Z=Math.ceil(Math.max(Z,K)),N=Math.ceil(Math.max(N,V))}}var Y=(0,s.wC)(v,Z,N),G=(0,i.Z)(Y,4),X=G[0],q=G[1],$=G[2]-X,J=G[3]-q,Q=[].concat(x);if(["n","w","nw"].includes(r)&&(Q=[w[0]-Math.abs($),w[1]-Math.abs(J)]),"ne"===r){var ee=[x[0],w[1]];Q=[ee[0],ee[1]-Math.abs(J)]}if("sw"===r){var te=[w[0],x[1]];Q=[te[0]-Math.abs($),te[1]]}t&&(["s","n"].includes(r)&&(Q[0]=k[0]-$/2),["e","w"].includes(r)&&(Q[1]=k[1]-J/2)),Z<0&&(r.includes("e")&&(Q[0]-=Math.abs($)),r.includes("w")&&(Q[0]+=Math.abs($))),N<0&&(r.includes("s")&&(Q[1]-=Math.abs(J)),r.includes("n")&&(Q[1]+=Math.abs(J))),l&&(Q[0]=k[0]-Math.abs($)/2,Q[1]=k[1]-Math.abs(J)/2);var ne=v.angle,re=(0,c.xj)(Q,k,ne),oe=[Q[0]+Math.abs($)/2,Q[1]+Math.abs(J)/2],ie=(0,c.xj)(oe,k,ne);Q=(0,c.xj)(re,ie,-ne);var ae=_(v,Z,N),le=(0,o.Z)(Q);le[0]+=v.x-X,le[1]+=v.y-q;var ce=b({width:Math.abs(Z),height:Math.abs(N),x:le[0],y:le[1]},ae);"scale"in n&&"scale"in v&&(0,d.DR)(n,{scale:[(Math.sign(L)||v.scale[0])*v.scale[0],(Math.sign(A)||v.scale[1])*v.scale[1]]}),0!==ce.width&&0!==ce.height&&Number.isFinite(ce.x)&&Number.isFinite(ce.y)&&((0,h.Ww)(n,{newSize:{width:ce.width,height:ce.height}}),(0,d.DR)(n,ce),D&&P&&(0,d.DR)(D,{fontSize:P.fontSize}),(0,m.RB)(n,r))},O=function(e,t,n,r){var l,c,f=(0,s.KP)(e),p=(0,i.Z)(f,4),v=p[0],g=p[1],y=p[2],x=p[3];switch(t){case"se":l=Math.max((n-v)/(y-v),(r-g)/(x-g)),c=function(e,t,n){var r=(0,i.Z)(t,2),o=r[0],a=r[1],c=(0,i.Z)(n,2),s=c[0],u=c[1];return{x:e.x+(o-v)*(l-1)+o-s,y:e.y+(a-g)*(l-1)+a-u}};break;case"nw":l=Math.max((y-n)/(y-v),(x-r)/(x-g)),c=function(e,t,n){var r=(0,i.Z)(t,4),o=r[2],a=r[3],c=(0,i.Z)(n,4),s=c[2],u=c[3];return{x:e.x-(y-o)*(l-1)+o-s,y:e.y-(x-a)*(l-1)+a-u}};break;case"ne":l=Math.max((n-v)/(y-v),(x-r)/(x-g)),c=function(e,t,n){var r=(0,i.Z)(t,4),o=r[0],a=r[3],c=(0,i.Z)(n,4),s=c[0],u=c[3];return{x:e.x+(o-v)*(l-1)+o-s,y:e.y-(x-a)*(l-1)+a-u}};break;case"sw":l=Math.max((y-n)/(y-v),(r-g)/(x-g)),c=function(e,t,n){var r=(0,i.Z)(t,3),o=r[1],a=r[2],c=(0,i.Z)(n,3),s=c[1],u=c[2];return{x:e.x-(y-a)*(l-1)+a-u,y:e.y+(o-g)*(l-1)+o-s}}}if(l>0){var w=e.reduce((function(t,n){if(!t)return t;var r=n.width*l,i=n.height*l,d=(0,m.WJ)(n),f={};if(d){var p=E(d,r-2*a.gK,i-2*a.gK);if(null===p)return null;f={fontSize:p.size,baseline:p.baseline}}if((0,u.iB)(n)){var v=E(n,r,i);if(null===v)return null;f={fontSize:v.size,baseline:v.baseline}}var g=(0,s.qf)(n),y=_(n,r,i);(0,h.Ww)(n,{newSize:{width:r,height:i},simultaneouslyUpdated:e});var x=(0,s.wC)(b(b({},n),y),r,i),w=c(n,g,x),k=w.x,S=w.y;return[].concat((0,o.Z)(t),[b(b({width:r,height:i,x:k,y:S},y),f)])}),[]);w&&e.forEach((function(e,n){(0,d.DR)(e,w[n]);var r=(0,m.WJ)(e);r&&((0,d.DR)(r,{fontSize:w[n].fontSize,baseline:w[n].baseline}),(0,m.RB)(e,t))}))}},j=function(e,t,n,r,o,l,u){var f=5*Math.PI/2+Math.atan2(r-u,n-l);o&&(f+=a.ay/2,f-=f%a.ay),t.forEach((function(t,n){var r,o,a=(0,s.qf)(t),p=(0,i.Z)(a,4),h=p[0],g=p[1],b=(h+p[2])/2,x=(g+p[3])/2,w=null!==(r=null===(o=e.originalElements.get(t.id))||void 0===o?void 0:o.angle)&&void 0!==r?r:t.angle,k=(0,c.U1)(b,x,l,u,f+w-t.angle),_=(0,i.Z)(k,2),E=_[0],S=_[1];(0,d.DR)(t,{x:t.x+(E-b),y:t.y+(S-x),angle:y(f+w)});var C=(0,m.xB)(t);if(C){var O=v.Z.getScene(t).getElement(C);(0,d.DR)(O,{x:O.x+(E-b),y:O.y+(S-x),angle:y(f+w)})}}))},I=function(e,t,n,r){var o=1===t.length?(0,s.qf)(t[0]):(0,s.KP)(t),a=(0,i.Z)(o,4),l=a[0],u=a[1],d=a[2],f=a[3],p=(l+d)/2,h=(u+f)/2,v=1===t.length?t[0].angle:0,m=(0,c.U1)(n,r,p,h,-v),g=(0,i.Z)(m,2);switch(n=g[0],r=g[1],e){case"n":return(0,c.U1)(n-(l+d)/2,r-u,0,0,v);case"s":return(0,c.U1)(n-(l+d)/2,r-f,0,0,v);case"w":return(0,c.U1)(n-l,r-(u+f)/2,0,0,v);case"e":return(0,c.U1)(n-d,r-(u+f)/2,0,0,v);case"nw":return(0,c.U1)(n-l,r-u,0,0,v);case"ne":return(0,c.U1)(n-d,r-u,0,0,v);case"sw":return(0,c.U1)(n-l,r-f,0,0,v);case"se":return(0,c.U1)(n-d,r-f,0,0,v);default:return[0,0]}},T=function(e,t){var n=(0,i.Z)(t.points,2),r=(0,i.Z)(n[1],2),o=r[0],a=r[1];return"nw"===e&&(o<0||a<0)||"ne"===e&&o>=0||"sw"===e&&o<=0||"se"===e&&(o>0||a>0)?"end":"origin"}},6126:function(e,t,n){"use strict";n.d(t,{QD:function(){return i},Qp:function(){return c},o4:function(){return l},uK:function(){return a}});n(1935);var r=n(1974),o=n(8288),i=function(e){return(0,r.bt)(e)||(0,r.F9)(e)?e.points.length<2:0===e.width&&0===e.height},a=function(e,t,n){var r=Math.abs(t),i=Math.abs(n);if("line"===e||"arrow"===e||"freedraw"===e){var a=Math.round(Math.atan(i/r)/o.ay)*o.ay;0===a?n=0:a===Math.PI/2?t=0:n=Math.round(r*Math.tan(a))*Math.sign(n)||n}else"selection"!==e&&(n=r*Math.sign(n));return{width:t,height:n}},l=function(e,t,n,r){var i=n-e,a=r-t,l=Math.round(Math.atan(a/i)/o.ay)*o.ay;if(0===l)a=0;else if(l===Math.PI/2)i=0;else{var c=Math.tan(l),s=t-c*e,u=-1/c,d=r-u*n;i=Math.round((-1*d- -1*s)/(-1*c- -1*u))-e,a=Math.round((s*u-d*c)/(-1*c- -1*u))-t}return{width:i,height:a}},c=function(e){var t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){var n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){var r=Math.abs(e.height);t.height=r,t.y=e.y-r}return t}},5710:function(e,t,n){"use strict";n.d(t,{AT:function(){return w},P7:function(){return f},RB:function(){return p},WJ:function(){return S},X1:function(){return h},hP:function(){return g},lD:function(){return y},oN:function(){return d},tl:function(){return C},w_:function(){return k},xB:function(){return E}});var r,o,i=n(5858),a=n(6340),l=n(1935),c=n(8288),s=n(1564),u=n(5118),d=function(e,t){var n=t?t.width-2*c.gK:void 0,r=e.text;t&&(r=y(e.originalText,(0,a.mO)(e),t.width));var o=h(e.originalText,(0,a.mO)(e),n),i=e.y,s=e.x;if(t){var u=t.height;s=t.x+c.gK,e.verticalAlign===c.oX.TOP?i=t.y+c.gK:e.verticalAlign===c.oX.BOTTOM?i=t.y+t.height-o.height-c.gK:(i=t.y+t.height/2-o.height/2,o.height>t.height-2*c.gK&&(u=o.height+2*c.gK,i=t.y+u/2-o.height/2)),(0,l.DR)(t,{height:u})}(0,l.DR)(e,{width:o.width,height:o.height,baseline:o.baseline,y:i,x:s,text:r})},f=function(e,t,n){var r=(0,a.xn)(e);t.forEach((function(e){var t=n.get(e.id),o=E(e);if(o){var i=n.get(o);if(i){var a,c=r.get(t);if(c)(0,l.DR)(c,{boundElements:null===(a=e.boundElements)||void 0===a?void 0:a.concat({type:"text",id:i})});var s=r.get(i);s&&(0,u.iB)(s)&&(0,l.DR)(s,{containerId:c?t:null})}}}))},p=function(e,t){var n=E(e);if(n){var r=s.Z.getScene(e).getElement(n);if(r&&r.text){if(!e)return;var o,i=r.text,u=r.height,d=e.height,f=r.baseline;if("n"!==t&&"s"!==t){i&&(i=y(r.originalText,(0,a.mO)(r),e.width));var p=h(i,(0,a.mO)(r),e.width);u=p.height,f=p.baseline}if(u>e.height-2*c.gK){var v=(d=u+2*c.gK)-e.height,m="ne"===t||"nw"===t||"n"===t?e.y-v:e.y;(0,l.DR)(e,{height:d,y:m})}o=r.verticalAlign===c.oX.TOP?e.y+c.gK:r.verticalAlign===c.oX.BOTTOM?e.y+e.height-u-c.gK:e.y+e.height/2-u/2,(0,l.DR)(r,{text:i,width:e.width-2*c.gK,height:u,x:e.x+c.gK,y:o,baseline:f})}}},h=function(e,t,n){e=e.split("\n").map((function(e){return e||" "})).join("\n");var r=document.createElement("div");if(r.style.position="absolute",r.style.whiteSpace="pre",r.style.font=t,r.style.minHeight="1em",n){var o=g(t);r.style.width="".concat(String(n),"px"),r.style.maxWidth="".concat(String(n),"px"),r.style.overflow="hidden",r.style.wordBreak="break-word",r.style.lineHeight="".concat(String(o),"px"),r.style.whiteSpace="pre-wrap"}document.body.appendChild(r),r.innerText=e;var i=document.createElement("span");i.style.display="inline-block",i.style.overflow="hidden",i.style.width="1px",i.style.height="1px",r.appendChild(i);var a=i.offsetTop+i.offsetHeight,l=r.offsetWidth,c=r.offsetHeight;return document.body.removeChild(r),{width:l,height:c,baseline:a}},v="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),m={},g=function(e){return m[e]||(m[e]=h(v,e,null).height),m[e]},b=function(e,t){r||(r=document.createElement("canvas"));var n=r.getContext("2d");n.font=t;var o=n.measureText(e);return(0,a.h2)()?10*o.width:o.width},y=function(e,t,n){var r=n-2*c.gK,o=[],i=e.split("\n"),a=b(" ",t);return i.forEach((function(e){var n=e.split(" ");if(1===n.length&&""===n[0])o.push(n[0]);else{for(var i="",l=0,c=0;c<n.length;){if(b(n[c],t)>=r){for(i&&o.push(i),i="",l=0;n[c].length>0;){var s=n[c][0],u=x.calculate(s,t);l+=u,n[c]=n[c].slice(1),l>=r?(" "===i.slice(-1)&&(i=i.slice(0,-1)),o.push(i),i=s,(l=u)===r&&(i="",l=0)):i+=s}l+a>=r?(o.push(i),i="",l=0):(i+=" ",l+=a),c++}else{for(;l<r&&c<n.length;){var d=n[c];if((l=b(i+d,t))>=r){o.push(i),l=0,i="";break}if(c++,i+="".concat(d," "),l+a>=r){o.push(i.slice(0,-1)),i="",l=0;break}}l===r&&(i="",l=0)}}i&&(" "===i.slice(-1)&&(i=i.slice(0,-1)),o.push(i))}})),o.join("\n")},x=(o={},{calculate:function(e,t){var n=e.charCodeAt(0);if(o[t]||(o[t]=[]),!o[t][n]){var r=b(e,t);o[t][n]=r}return o[t][n]},getCache:function(e){return o[e]}}),w=function(e){var t=_(e);return 0===t?h(v.split("").join("\n"),e).width+2*c.gK:t+2*c.gK},k=function(e){return g(e)+2*c.gK},_=function(e){var t=x.getCache(e);if(!t)return 0;var n=t.filter((function(e){return void 0!==e}));return Math.max.apply(Math,(0,i.Z)(n))},E=function(e){var t,n,r;return null!=e&&null!==(t=e.boundElements)&&void 0!==t&&t.length&&(null==e||null===(n=e.boundElements)||void 0===n||null===(r=n.filter((function(e){return"text"===e.type}))[0])||void 0===r?void 0:r.id)||null},S=function(e){if(!e)return null;var t,n=E(e);return n&&(null===(t=s.Z.getScene(e))||void 0===t?void 0:t.getElement(n))||null},C=function(e){return e&&e.containerId&&(null===(t=s.Z.getScene(e))||void 0===t?void 0:t.getElement(e.containerId))||null;var t}},267:function(e,t,n){"use strict";n.d(t,{PC:function(){return m},kK:function(){return v},ox:function(){return s}});var r=n(668),o=n(8925),i=n(6552),a=n(5118),l=n(1974),c={mouse:8,pen:16,touch:28},s={e:!0,s:!0,n:!0,w:!0},u={e:!0,s:!0,n:!0,w:!0},d={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},f={e:!0,s:!0,n:!0,w:!0},p={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0,ne:!0,sw:!0,rotation:!0},h=function(e,t,n,o,a,l,c){var s=(0,i.U1)(e+n/2,t+o/2,a,l,c),u=(0,r.Z)(s,2);return[u[0]-n/2,u[1]-o/2,n,o]},v=function(e,t,n,o){var i=(0,r.Z)(e,4),a=i[0],l=i[1],s=i[2],u=i[3],d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=c[o],p=f/n.value,v=f/n.value,m=f/n.value,g=f/n.value,b=s-a,y=u-l,x=(a+s)/2,w=(l+u)/2,k=4/n.value,_=(f-8)/(2*n.value),E={nw:d.nw?void 0:h(a-k-m+_,l-k-g+_,p,v,x,w,t),ne:d.ne?void 0:h(s+k-_,l-k-g+_,p,v,x,w,t),sw:d.sw?void 0:h(a-k-m+_,u+k-_,p,v,x,w,t),se:d.se?void 0:h(s+k-_,u+k-_,p,v,x,w,t),rotation:d.rotation?void 0:h(a+b/2-p/2,l-k-g+_-16/n.value,p,v,x,w,t)},S=5*c.mouse/n.value;return Math.abs(b)>S&&(d.n||(E.n=h(a+b/2-p/2,l-k-g+_,p,v,x,w,t)),d.s||(E.s=h(a+b/2-p/2,u+k-_,p,v,x,w,t))),Math.abs(y)>S&&(d.w||(E.w=h(a-k-m+_,l+y/2-v/2,p,v,x,w,t)),d.e||(E.e=h(s+k-_,l+y/2-v/2,p,v,x,w,t))),E},m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mouse";if(e.locked)return{};var i={};if((0,l.bt)(e))i=p;else if("freedraw"===e.type){if(2===e.points.length){var c=(0,r.Z)(e.points,2),s=c[1];0===s[0]||0===s[1]?i=f:s[0]>0&&s[1]<0?i=d:s[0]>0&&s[1]>0?i=f:s[0]<0&&s[1]>0?i=d:s[0]<0&&s[1]<0&&(i=f)}}else(0,a.iB)(e)&&(i=u);return v((0,o.qf)(e),e.angle,t,n,i)}},1974:function(e,t,n){"use strict";n.d(t,{F9:function(){return a},Lx:function(){return d},Mn:function(){return u},Xh:function(){return m},Xo:function(){return v},bt:function(){return c},dt:function(){return s},f0:function(){return f},iB:function(){return i},mG:function(){return p},pC:function(){return o},r2:function(){return h},wi:function(){return r}});var r=function(e){return!!e&&"image"===e.type&&!!e.fileId},o=function(e){return!!e&&"image"===e.type},i=function(e){return null!=e&&"text"===e.type},a=function(e){return null!=e&&l(e.type)},l=function(e){return"freedraw"===e},c=function(e){return null!=e&&s(e.type)},s=function(e){return"arrow"===e||"line"===e},u=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&d(e.type)},d=function(e){return"arrow"===e},f=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type&&("text"!==e.type||e.containerId))},p=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type)},h=function(e){return"text"===(null==e?void 0:e.type)||"diamond"===(null==e?void 0:e.type)||"rectangle"===(null==e?void 0:e.type)||"ellipse"===(null==e?void 0:e.type)||"arrow"===(null==e?void 0:e.type)||"freedraw"===(null==e?void 0:e.type)||"line"===(null==e?void 0:e.type)},v=function(e){var t;return f(e)&&!(null===(t=e.boundElements)||void 0===t||!t.some((function(e){return"text"===e.type})))},m=function(e){return null!==e&&i(e)&&null!==e.containerId}},9519:function(e,t,n){"use strict";n.d(t,{_:function(){return h},l:function(){return p}});var r=n(6967),o=n(7775),i=n(8875),a=n(4653),l=n(3164),c=n(6334);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,c.Z)(o,n.prototype),o},u.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,(0,l.Z)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,c.Z)(r,e)},d(e)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,a.Z)(this,n)}}var p=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,o.Z)(this,n),(e=t.call(this)).name=i,e.message=r,e}return(0,r.Z)(n)}(d(Error)),h=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,o.Z)(this,n),t.call(this,e,"AbortError")}return(0,r.Z)(n)}(d(DOMException))},242:function(e,t,n){"use strict";n.d(t,{AI:function(){return E},F$:function(){return f},Fb:function(){return y},Nd:function(){return b},Qy:function(){return w},S_:function(){return k},YS:function(){return x},bO:function(){return m},h6:function(){return _},iE:function(){return g},iJ:function(){return v},yO:function(){return h},zq:function(){return p}});var r=n(5858),o=n(668),i=n(489),a=n(75),l=n(5710);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var r=n.filter((function(t){return t.groupIds.includes(e)}));return r.length<2?t.selectedGroupIds[e]||t.editingGroupId===e?d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!1)),editingGroupId:null}):t:d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!0)),selectedElementIds:d(d({},t.selectedElementIds),Object.fromEntries(r.map((function(e){return[e.id,!0]}))))})},p=function(e,t){return null!=h(e,t)},h=function(e,t){return t.groupIds.filter((function(t){return t!==e.editingGroupId})).find((function(t){return e.selectedGroupIds[t]}))},v=function(e){return Object.entries(e.selectedGroupIds).filter((function(e){var t=(0,o.Z)(e,2);t[0];return t[1]})).map((function(e){var t=(0,o.Z)(e,2),n=t[0];t[1];return n}))},m=function(e,t){var n=d(d({},e),{},{selectedGroupIds:{}}),r=(0,a.eD)(t,e);if(!r.length)return d(d({},n),{},{editingGroupId:null});var o,i=c(r);try{for(i.s();!(o=i.n()).done;){var l=o.value.groupIds;if(e.editingGroupId){var s=l.indexOf(e.editingGroupId);s>-1&&(l=l.slice(0,s))}if(l.length>0){var u=l[l.length-1];n=f(u,n,t)}}}catch(e){i.e(e)}finally{i.f()}return n},g=function(e,t){return d(d({},e),{},{editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,i.Z)({},t.id,!0)})},b=function(e,t){return e.groupIds.includes(t)},y=function(e,t){return e.filter((function(e){return b(e,t)}))},x=function(e,t){return e.groupIds.find((function(e){return t[e]}))},w=function(e,t,n){for(var o=(0,r.Z)(e),i=t?e.indexOf(t):-1,a=i>-1?i:e.length,l=0;l<a;l++)o[l]=n(o[l]);return o},k=function(e,t,n){var o=(0,r.Z)(e),i=n?o.indexOf(n):-1,a=i>-1?i:o.length;return o.splice(a,0,t),o},_=function(e,t){return e.filter((function(e){return!t[e]}))},E=function(e){var t=new Map;return e.forEach((function(e){var n=0===e.groupIds.length?e.id:e.groupIds[e.groupIds.length-1],o=t.get(n)||[],i=(0,l.WJ)(e);i&&o.push(i),t.set(n,[].concat((0,r.Z)(o),[e]))})),Array.from(t.values())}},8211:function(e,t,n){"use strict";n.d(t,{Fp:function(){return c},G3:function(){return h},Mj:function(){return s},m0:function(){return p},t:function(){return m}});var r=n(6759),o=n(3152),i=n(1463),a=n(4451),l=n(8288),c={code:"en",label:"English"},s=[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].concat([c]).sort((function(e,t){return e.label>t.label?1:-1})).filter((function(e){return a[e.code]>=85})),u="__test__";"production"===l.Vi.DEVELOPMENT&&s.unshift({code:u,label:"test language"},{code:"".concat(u,".rtl"),label:"test language (rtl)",rtl:!0});var d=c,f={},p=function(){var e=(0,r.Z)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=t,document.documentElement.dir=d.rtl?"rtl":"ltr",document.documentElement.lang=d.code,!t.code.startsWith(u)){e.next=7;break}f={},e.next=10;break;case 7:return e.next=9,n(940)("./".concat(d.code,".json"));case 9:f=e.sent;case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(){return d},v=function(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(void 0===e[r])return;e=e[r]}if("string"==typeof e)return e},m=function(e,t){if(d.code.startsWith(u)){var n=t?"".concat(e,"(").concat(JSON.stringify(t).slice(1,-1),")"):e;return"[[".concat(n,"]]")}var r=e.split("."),o=v(f,r)||v(i,r);if(void 0===o)throw new Error("Can't find translation for ".concat(e));if(t)for(var a in t)o=o.replace("{{".concat(a,"}}"),String(t[a]));return o}},9487:function(e,t,n){"use strict";n.d(t,{e_:function(){return i},yE:function(){return o}});var r=n(6131),o=(n(9787),Symbol()),i=(0,r.Vv)()},6066:function(e,t,n){"use strict";n.d(t,{Dt:function(){return i},E0:function(){return u},ED:function(){return o},Ge:function(){return d},OA:function(){return s},Um:function(){return r},Wl:function(){return c},aU:function(){return a},tW:function(){return l}});var r=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),o=/^Win/.test(window.navigator.platform),i=/\b(android)\b/i.test(navigator.userAgent),a={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",G:"KeyG",F:"KeyF",H:"KeyH",V:"KeyV",X:"KeyX",Z:"KeyZ",R:"KeyR"},l={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:r?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",A:"a",D:"d",E:"e",G:"g",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k"},c=function(e){return e===l.ARROW_LEFT||e===l.ARROW_RIGHT||e===l.ARROW_DOWN||e===l.ARROW_UP},s=function(e){return e.altKey},u=function(e){return e.shiftKey},d=function(e){return e.shiftKey}},6552:function(e,t,n){"use strict";n.d(t,{H5:function(){return c},LW:function(){return l},U1:function(){return o},c9:function(){return u},g6:function(){return s},wC:function(){return h},xj:function(){return i},yq:function(){return a}});var r=n(8288),o=function(e,t,n,r,o){return[(e-n)*Math.cos(o)-(t-r)*Math.sin(o)+n,(e-n)*Math.sin(o)+(t-r)*Math.cos(o)+r]},i=function(e,t,n){return o(e[0],e[1],t[0],t[1],n)},a=function(e,t,n,r,o,i,a,l){var c=Math.cos(r),s=Math.sin(r);return e.e&&e.w?t+=o+a:e.e?(t+=o*(1+c),n+=o*s,t+=a*(1-c),n+=a*-s):e.w&&(t+=o*(1-c),n+=o*-s,t+=a*(1+c),n+=a*s),e.n&&e.s?n+=i+l:e.n?(t+=i*s,n+=i*(1-c),t+=l*-s,n+=l*(1+c)):e.s&&(t+=i*-s,n+=i*(1+c),t+=l*s,n+=l*(1-c)),[t,n]},l=function(e,t,n,r){var o=n-e,i=r-t;return Math.hypot(o,i)},c=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length>=3){var n=[e[0],e[e.length-1]],o=n[0],i=n[1],a=l(o[0],o[1],i[0],i[1]);return a<=r.qx/t}return!1},u=function(e,t,n){var r=e.length;if(r<3)return!1;for(var o=[Number.MAX_SAFE_INTEGER,n],i=[t,n],a=0,l=0;l<r;l++){var c=e[l],s=e[(l+1)%r];if(p(c,s,i,o)){if(0===f(c,i,s))return d(c,i,s);a++}}return a%2==1},d=function(e,t,n){return t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1])},f=function(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return 0===r?0:r>0?1:2},p=function(e,t,n,r){var o=f(e,t,n),i=f(e,t,r),a=f(n,r,e),l=f(n,r,t);return o!==i&&a!==l||(!(0!==o||!d(e,n,t))||(!(0!==i||!d(e,r,t))||(!(0!==a||!d(n,e,r))||!(0!==l||!d(n,t,r)))))},h=function(e,t,n){return n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t]}},1807:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6049:function(e,t,n){var r=n(5637);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},5637:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},769:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(a[c]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},7157:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},5370:function(e){"use strict";e.exports=function(e){return e[1]}},3024:function(e,t,n){"use strict";n.d(t,{$D:function(){return w},Fl:function(){return x},I_:function(){return f.I_},N7:function(){return v.N7},NI:function(){return f.NI},NL:function(){return y},ZY:function(){return h.ZY},cT:function(){return h.cT},i1:function(){return k},lV:function(){return h.lV},zh:function(){return m.zh}});var r=n(6759),o=n(489),i=n(3152),a=n(4162),l=n(8897),c=n(5118),s=n(679),u=n(8288),d=n(673),f=n(5523),p=n(6665),h=n(434),v=n(6202),m=n(7053);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.maxWidthOrHeight,i=e.getDimensions,l=(0,s.nu)({elements:t,appState:n},null,null),u=l.elements,d=l.appState,f=d.exportBackground,p=d.viewBackgroundColor;return(0,a.NL)((0,c.Lm)(u),b(b({},d),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),r||{},{exportBackground:f,viewBackgroundColor:p},(function(e,t){var n,r=document.createElement("canvas");if(o){"function"==typeof i&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var a=Math.max(e,t),l=o/a;return r.width=e*l,r.height=t*l,{canvas:r,scale:l}}var c=(null==i?void 0:i(e,t))||{width:e,height:t};return r.width=c.width,r.height=c.height,{canvas:r,scale:null!==(n=c.scale)&&void 0!==n?n:1}}))},x=function(){var e=(0,r.Z)(i.default.mark((function e(t){var n,o,a,l,c,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(o=t).mimeType,l=void 0===a?u.LO.png:a,c=o.quality,l===u.LO.png&&"number"==typeof c&&console.warn('"quality" will be ignored for "'.concat(u.LO.png,'" mimeType')),"image/jpg"===l&&(l=u.LO.jpg),l!==u.LO.jpg||null!==(n=t.appState)&&void 0!==n&&n.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(u.LO.jpg,'" mimeType')),t=b(b({},t),{},{appState:b(b({},t.appState),{},{exportBackground:!0})})),e.next=6,y(t);case 6:return s=e.sent,c=c||(/image\/jpe?g/.test(l)?.92:.8),e.abrupt("return",new Promise((function(e,n){s.toBlob(function(){var o=(0,r.Z)(i.default.mark((function r(o){var a;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o){r.next=2;break}return r.abrupt("return",n(new Error("couldn't export to blob")));case 2:if(!o||l!==u.LO.png||null===(a=t.appState)||void 0===a||!a.exportEmbedScene){r.next=6;break}return r.next=5,(0,d.encodePngMetadata)({blob:o,metadata:(0,f.I_)(t.elements,t.appState,t.files||{},"local")});case 5:o=r.sent;case 6:e(o);case 7:case"end":return r.stop()}}),r)})));return function(e){return o.apply(this,arguments)}}(),l,c)})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,r.Z)(i.default.mark((function e(t){var n,r,o,u,d,f,p,h,v;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.elements,r=t.appState,o=void 0===r?(0,l.im)():r,u=t.files,d=void 0===u?{}:u,f=t.exportPadding,p=(0,s.nu)({elements:n,appState:o},null,null),h=p.elements,v=p.appState,e.abrupt("return",(0,a.$D)((0,c.Lm)(h),b(b({},v),{},{exportPadding:f}),d));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.Z)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("svg"!==t.type){e.next=8;break}return e.next=3,w(t);case 3:return n=e.sent,e.next=6,(0,p.dd)(n.outerHTML);case 6:case 11:case 17:e.next=20;break;case 8:if("png"!==t.type){e.next=13;break}return e.next=11,(0,p.uR)(x(t));case 13:if("json"!==t.type){e.next=19;break}return r=b(b({offsetTop:0,offsetLeft:0,width:0,height:0},(0,l.im)()),t.appState),e.next=17,(0,p.vQ)(t.elements,r,t.files);case 19:throw new Error("Invalid export type");case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},5001:function(e,t,n){"use strict";n.d(t,{k:function(){return o},z:function(){return i}});var r=n(5858),o=function(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]}));return{width:Math.max.apply(Math,(0,r.Z)(t))-Math.min.apply(Math,(0,r.Z)(t)),height:Math.max.apply(Math,(0,r.Z)(n))-Math.min.apply(Math,(0,r.Z)(n))}},i=function(e,t,n){var o=n.map((function(t){return t[e]})),i=Math.max.apply(Math,(0,r.Z)(o)),a=Math.min.apply(Math,(0,r.Z)(o)),l=i-a,c=0===l?1:t/l,s=1/0,u=n.map((function(t){return t.map((function(t,n){if(n!==e)return t;var r=t*c;return s=Math.min(r,s),r}))}));if(2===u.length)return u;var d=a-s;return u.map((function(t){return t.map((function(t,n){return n===e?t+d:t}))}))}},6954:function(e,t,n){"use strict";n.d(t,{LU:function(){return c},kb:function(){return s}});var r=n(8136),o=n(6612),i=n(6340),a=new r.k(Date.now()),l=0,c=function(){return Math.floor(a.next()*Math.pow(2,31))},s=function(){return(0,i.h2)()?"id".concat(l++):(0,o.x0)()}},6202:function(e,t,n){"use strict";n.d(t,{Dn:function(){return F},i:function(){return Q},N7:function(){return ce},R2:function(){return q},bI:function(){return J},lw:function(){return re},Rg:function(){return ie}});var r=n(5858),o=n(489),i=n(668),a=n(1974),l=n(8925),c=n(6340),s=n(6552),u=n(6852),d=n(8897),f=n(8288);function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){return e};return e*r(.5-t*(.5-n))}function h(e){return[-e[0],-e[1]]}function v(e,t){return[e[0]+t[0],e[1]+t[1]]}function m(e,t){return[e[0]-t[0],e[1]-t[1]]}function g(e,t){return[e[0]*t,e[1]*t]}function b(e){return[e[1],-e[0]]}function y(e,t){return e[0]*t[0]+e[1]*t[1]}function x(e,t){return e[0]===t[0]&&e[1]===t[1]}function w(e,t){return function(e){return e[0]*e[0]+e[1]*e[1]}(m(e,t))}function k(e){return function(e,t){return[e[0]/t,e[1]/t]}(e,function(e){return Math.hypot(e[0],e[1])}(e))}function _(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function E(e,t,n){var r=Math.sin(n),o=Math.cos(n),i=e[0]-t[0],a=e[1]-t[1],l=i*r+a*o;return[i*o-a*r+t[0],l+t[1]]}function S(e,t,n){return v(e,g(m(t,e),n))}function C(e,t,n){return v(e,g(t,n))}var O=Math.min,j=Math.PI,I=.275,T=j+1e-4;function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.size,r=void 0===n?16:n,o=t.smoothing,i=void 0===o?.5:o,a=t.thinning,l=void 0===a?.5:a,c=t.simulatePressure,s=void 0===c||c,u=t.easing,d=void 0===u?function(e){return e}:u,f=t.start,x=void 0===f?{}:f,_=t.end,j=void 0===_?{}:_,M=t.last,L=void 0!==M&&M,A=x.cap,P=void 0===A||A,D=x.taper,z=void 0===D?0:D,R=x.easing,Z=void 0===R?function(e){return e*(2-e)}:R,N=j.cap,B=void 0===N||N,H=j.taper,W=void 0===H?0:H,U=j.easing,F=void 0===U?function(e){return--e*e*e+1}:U;if(0===e.length||r<=0)return[];for(var K,V=e[e.length-1].runningLength,Y=Math.pow(r*i,2),G=[],X=[],q=e.slice(0,10).reduce((function(e,t){var n=t.pressure;if(s){var o=O(1,t.distance/r),i=O(1,1-o);n=O(1,e+o*I*(i-e))}return(e+n)/2}),e[0].pressure),$=p(r,l,e[e.length-1].pressure,d),J=e[0].vector,Q=e[0].point,ee=Q,te=Q,ne=ee,re=0;re<e.length;re++){var oe=e[re].pressure,ie=e[re],ae=ie.point,le=ie.vector,ce=ie.distance,se=ie.runningLength;if(!(re<e.length-1&&V-se<3)){if(l){if(s){var ue=O(1,ce/r),de=O(1,1-ue);oe=O(1,q+ue*I*(de-q))}$=p(r,l,oe,d)}else $=r/2;void 0===K&&(K=$);var fe=se<z?Z(se/z):1,pe=V-se<W?F((V-se)/W):1;if($=Math.max(.01,$*Math.min(fe,pe)),re!==e.length-1){var he=e[re+1].vector,ve=y(le,he);if(ve<0){for(var me=g(b(J),$),ge=1/13,be=0;be<=1;be+=ge)te=E(m(ae,me),ae,T*be),G.push(te),ne=E(v(ae,me),ae,T*-be),X.push(ne);Q=te,ee=ne}else{var ye=g(b(S(he,le,ve)),$);te=m(ae,ye),(re<=1||w(Q,te)>Y)&&(G.push(te),Q=te),ne=v(ae,ye),(re<=1||w(ee,ne)>Y)&&(X.push(ne),ee=ne),q=oe,J=le}}else{var xe=g(b(le),$);G.push(m(ae,xe)),X.push(v(ae,xe))}}}var we=e[0].point.slice(0,2),ke=e.length>1?e[e.length-1].point.slice(0,2):v(e[0].point,[1,1]),_e=[],Ee=[];if(1===e.length){if(!z&&!W||L){for(var Se=C(we,k(b(m(we,ke))),-(K||$)),Ce=[],Oe=1/13,je=Oe;je<=1;je+=Oe)Ce.push(E(Se,we,2*T*je));return Ce}}else{if(!(z||W&&1===e.length))if(P)for(var Ie=1/13,Te=Ie;Te<=1;Te+=Ie){var Me=E(X[0],we,T*Te);_e.push(Me)}else{var Le=m(G[0],X[0]),Ae=g(Le,.5),Pe=g(Le,.51);_e.push(m(we,Ae),m(we,Pe),v(we,Pe),v(we,Ae))}var De=b(h(e[e.length-1].vector));if(W||z&&1===e.length)Ee.push(ke);else if(B)for(var ze=C(ke,De,$),Re=1/29,Ze=Re;Ze<1;Ze+=Re)Ee.push(E(ze,ke,3*T*Ze));else Ee.push(v(ke,g(De,$)),v(ke,g(De,.99*$)),m(ke,g(De,.99*$)),m(ke,g(De,$)))}return G.concat(Ee,X.reverse(),_e)}function L(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.streamline,i=void 0===o?.5:o,a=n.size,l=void 0===a?16:a,c=n.last,s=void 0!==c&&c;if(0===e.length)return[];var u=.15+.85*(1-i),d=Array.isArray(e[0])?e:e.map((function(e){var t=e.x,n=e.y,r=e.pressure;return[t,n,void 0===r?.5:r]}));if(2===d.length){var f=d[1];d=d.slice(0,-1);for(var p=1;p<5;p++)d.push(S(d[0],f,p/4))}1===d.length&&(d=[].concat((0,r.Z)(d),[[].concat((0,r.Z)(v(d[0],[1,1])),(0,r.Z)(d[0].slice(2)))]));for(var h=[{point:[d[0][0],d[0][1]],pressure:d[0][2]>=0?d[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],g=!1,b=0,y=h[0],w=d.length-1,E=1;E<d.length;E++){var C=s&&E===w?d[E].slice(0,2):S(y.point,d[E],u);if(!x(y.point,C)){var O=_(C,y.point);if(b+=O,E<w&&!g){if(b<l)continue;g=!0}y={point:C,pressure:d[E][2]>=0?d[E][2]:.5,vector:k(m(y.point,C)),distance:O,runningLength:b},h.push(y)}}return h[0].vector=(null==(t=h[1])?void 0:t.vector)||[0,0],h}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(L(e,t),t)}var P=n(5710);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R="invert(100%) hue-rotate(180deg) saturate(1.25)",Z=(0,d.im)(),N=function(e,t){return(0,a.wi)(e)&&!t.imageCache.has(e.fileId)},B=function(e,t){var n;return"dark"===t.theme&&(0,a.wi)(e)&&!N(e,t)&&(null===(n=t.imageCache.get(e.fileId))||void 0===n?void 0:n.mimeType)!==f.LO.svg},H=function(e){return[8,8+e]},W=function(e){return[1.5,6+e]},U=function(e){return"freedraw"===e.type?12*e.strokeWidth:20},F=14,K=document.createElement("img");K.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>'));var V=document.createElement("img");V.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>'));var Y=function(e,t,n,r){switch(n.globalAlpha=e.opacity/100,e.type){case"rectangle":case"diamond":case"ellipse":n.lineJoin="round",n.lineCap="round",t.draw(q(e));break;case"arrow":case"line":n.lineJoin="round",n.lineCap="round",q(e).forEach((function(e){t.draw(e)}));break;case"freedraw":n.save(),n.fillStyle=e.strokeColor;var o=function(e){return ae.get(e)}(e),i=q(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(o),n.restore();break;case"image":var l,s=(0,a.wi)(e)?null===(l=r.imageCache.get(e.fileId))||void 0===l?void 0:l.image:void 0;null==s||s instanceof Promise?function(e,t,n){t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);var r=Math.min(e.width,e.height),o=Math.min(r,Math.min(.4*r,100));t.drawImage("error"===e.status?V:K,e.width/2-o/2,e.height/2-o/2,o,o)}(e,n,r.zoom.value):n.drawImage(s,0,0,e.width,e.height);break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var u=(0,c.dZ)(e.text),d=u&&!n.canvas.isConnected;d&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",u?"rtl":"ltr"),n.save(),n.font=(0,c.mO)(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;var p=e.text.replace(/\r\n?/g,"\n").split("\n"),h=e.containerId?(0,P.hP)((0,c.mO)(e)):e.height/p.length,v=e.height-e.baseline;e.verticalAlign===f.oX.BOTTOM&&(v=f.gK);for(var m="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,g=0;g<p.length;g++)n.fillText(p[g],m,(g+1)*h-v);n.restore(),d&&n.canvas.remove()}n.globalAlpha=1},G=new WeakMap,X=new WeakMap,q=function(e){return X.get(e)},$=function(e,t){return X.set(e,t)},J=function(e){return X.delete(e)},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={seed:e.seed,strokeLineDash:"dashed"===e.strokeStyle?H(e.strokeWidth):"dotted"===e.strokeStyle?W(e.strokeWidth):void 0,disableMultiStroke:"solid"!==e.strokeStyle,strokeWidth:"solid"!==e.strokeStyle?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:4*e.strokeWidth,roughness:e.roughness,stroke:e.strokeColor,preserveVertices:t};switch(e.type){case"rectangle":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor,"ellipse"===e.type&&(n.curveFitting=1),n;case"line":case"freedraw":return(0,s.g6)(e.points)&&(n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error("Unimplemented type ".concat(e.type))}},ee=function(e,t){var n=X.get(e);if(void 0===n)switch(G.delete(e),e.type){case"rectangle":if("round"===e.strokeSharpness){var o=e.width,a=e.height,c=.25*Math.min(o,a);n=t.path("M ".concat(c," 0 L ").concat(o-c," 0 Q ").concat(o," 0, ").concat(o," ").concat(c," L ").concat(o," ").concat(a-c," Q ").concat(o," ").concat(a,", ").concat(o-c," ").concat(a," L ").concat(c," ").concat(a," Q 0 ").concat(a,", 0 ").concat(a-c," L 0 ").concat(c," Q 0 0, ").concat(c," 0"),Q(e,!0))}else n=t.rectangle(0,0,e.width,e.height,Q(e));$(e,n);break;case"diamond":var u=(0,l.UC)(e),d=(0,i.Z)(u,8),f=d[0],p=d[1],h=d[2],v=d[3],m=d[4],g=d[5],b=d[6],y=d[7];n="round"===e.strokeSharpness?t.path("M ".concat(f+.25*(h-f)," ").concat(p+.25*(v-p)," L ").concat(h-.25*(h-f)," ").concat(v-.25*(v-p),"\n C ").concat(h," ").concat(v,", ").concat(h," ").concat(v,", ").concat(h-.25*(h-m)," ").concat(v+.25*(g-v),"\n L ").concat(m+.25*(h-m)," ").concat(g-.25*(g-v),"\n C ").concat(m," ").concat(g,", ").concat(m," ").concat(g,", ").concat(m-.25*(m-b)," ").concat(g-.25*(g-y),"\n L ").concat(b+.25*(m-b)," ").concat(y+.25*(g-y),"\n C ").concat(b," ").concat(y,", ").concat(b," ").concat(y,", ").concat(b+.25*(f-b)," ").concat(y-.25*(y-p),"\n L ").concat(f-.25*(f-b)," ").concat(p+.25*(y-p),"\n C ").concat(f," ").concat(p,", ").concat(f," ").concat(p,", ").concat(f+.25*(h-f)," ").concat(p+.25*(v-p)),Q(e,!0)):t.polygon([[f,p],[h,v],[m,g],[b,y]],Q(e)),$(e,n);break;case"ellipse":n=t.ellipse(e.width/2,e.height/2,e.width,e.height,Q(e)),$(e,n);break;case"line":case"arrow":var x=Q(e),w=e.points.length?e.points:[[0,0]];if(n="sharp"===e.strokeSharpness?x.fill?[t.polygon(w,x)]:[t.linearPath(w,x)]:[t.curve(w,x)],"arrow"===e.type){var k=e.startArrowhead,_=void 0===k?null:k,E=e.endArrowhead,S=void 0===E?"arrow":E,C=function(e,n,r,o){var a=(0,l.Y5)(e,n,r,o);if(null===a)return[];if("dot"===o){var c=(0,i.Z)(a,3),s=c[0],u=c[1],d=c[2];return[t.circle(s,u,d,z(z({},x),{},{fill:e.strokeColor,fillStyle:"solid",stroke:"none"}))]}if("triangle"===o){var f=(0,i.Z)(a,6),p=f[0],h=f[1],v=f[2],m=f[3],g=f[4],b=f[5];return delete x.strokeLineDash,[t.polygon([[p,h],[v,m],[g,b],[p,h]],z(z({},x),{},{fill:e.strokeColor,fillStyle:"solid"}))]}var y=(0,i.Z)(a,6),w=y[0],k=y[1],_=y[2],E=y[3],S=y[4],C=y[5];if("dotted"===e.strokeStyle){var O=W(e.strokeWidth-1);x.strokeLineDash=[O[0],O[1]-1]}else delete x.strokeLineDash;return[t.line(_,E,w,k,x),t.line(S,C,w,k,x)]};if(null!==_){var O,j=C(e,n,"start",_);(O=n).push.apply(O,(0,r.Z)(j))}if(null!==S){var I,T=C(e,n,"end",S);(I=n).push.apply(I,(0,r.Z)(T))}}$(e,n);break;case"freedraw":le(e),n=(0,s.g6)(e.points)?t.polygon(e.points,z(z({},Q(e)),{},{stroke:"none"})):null,$(e,n);break;case"text":case"image":$(e,null)}},te=function(e,t){var n=t?t.zoom:Z.zoom,r=G.get(e),o=r&&r.canvasZoom!==n.value&&!(null!=t&&t.shouldCacheIgnoreZoom);if(!r||o||r.theme!==t.theme){var s=function(e,t,n){var r=document.createElement("canvas"),o=r.getContext("2d"),s=U(e),d=0,f=0;if((0,a.bt)(e)||(0,a.F9)(e)){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),v=h[0],m=h[1],g=h[2],b=h[3];r.width=(0,c.TE)(v,g)*window.devicePixelRatio*t.value+s*t.value*2,r.height=(0,c.TE)(m,b)*window.devicePixelRatio*t.value+s*t.value*2,d=e.x>v?(0,c.TE)(e.x,v)*window.devicePixelRatio*t.value:0,f=e.y>m?(0,c.TE)(e.y,m)*window.devicePixelRatio*t.value:0,o.translate(d,f)}else r.width=e.width*window.devicePixelRatio*t.value+s*t.value*2,r.height=e.height*window.devicePixelRatio*t.value+s*t.value*2;o.save(),o.translate(s*t.value,s*t.value),o.scale(window.devicePixelRatio*t.value,window.devicePixelRatio*t.value);var y=u.Z.canvas(r);return B(e,n)&&(o.filter=R),Y(e,y,o,n),o.restore(),{element:e,canvas:r,theme:n.theme,canvasZoom:t.value,canvasOffsetX:d,canvasOffsetY:f}}(e,n,t);return G.set(e,s),s}return r},ne=function(e,t,n,r){var o=e.element,c=U(o),s=(0,l.qf)(o),u=(0,i.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3];(0,a.F9)(o)&&(d=Math.floor(d),p=Math.ceil(p),f=Math.floor(f),h=Math.ceil(h));var v=((d+p)/2+r.scrollX)*window.devicePixelRatio,m=((f+h)/2+r.scrollY)*window.devicePixelRatio,g=N(o,r),b="scale"in e.element&&!g?e.element.scale[0]:1,y="scale"in e.element&&!g?e.element.scale[1]:1;n.save(),n.scale(1/window.devicePixelRatio*b,1/window.devicePixelRatio*y),n.translate(v*b,m*y),n.rotate(o.angle*b*y),n.drawImage(e.canvas,-(p-d)/2*window.devicePixelRatio-c*e.canvasZoom/e.canvasZoom,-(h-f)/2*window.devicePixelRatio-c*e.canvasZoom/e.canvasZoom,e.canvas.width/e.canvasZoom,e.canvas.height/e.canvasZoom),n.restore()},re=function(e,t,n,r){var o=t.generator;switch(e.type){case"selection":n.save(),n.translate(e.x+r.scrollX,e.y+r.scrollY),n.fillStyle="rgba(0, 0, 255, 0.10)",n.fillRect(0,0,e.width,e.height),n.restore();break;case"freedraw":if(ee(e,o),r.isExporting){var a=(0,l.qf)(e),c=(0,i.Z)(a,4),s=c[0],u=c[1],d=c[2],f=c[3],p=(s+d)/2+r.scrollX,h=(u+f)/2+r.scrollY,v=(d-s)/2-(e.x-s),m=(f-u)/2-(e.y-u);n.save(),n.translate(p,h),n.rotate(e.angle),n.translate(-v,-m),Y(e,t,n,r),n.restore()}else{var g=te(e,r);ne(g,0,n,r)}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":if(ee(e,o),r.isExporting){var b=(0,l.qf)(e),y=(0,i.Z)(b,4),x=y[0],w=y[1],k=y[2],_=y[3],E=(x+k)/2+r.scrollX,S=(w+_)/2+r.scrollY,C=(k-x)/2-(e.x-x),O=(_-w)/2-(e.y-w);n.save(),n.translate(E,S),n.rotate(e.angle),n.translate(-C,-O),B(e,r)&&(n.filter="none"),Y(e,t,n,r),n.restore()}else{var j=te(e,r);ne(j,0,n,r)}break;default:throw new Error("Unimplemented type ".concat(e.type))}},oe=function(e,t,n){if(void 0===n)return e.draw(t);var r={sets:t.sets,shape:t.shape,options:z(z({},t.options),{},{fixedDecimalPlaceDigits:n})};return e.draw(r)},ie=function(e,t,n,r,o,u,d){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),v=h[0],m=h[1],g=h[2],b=h[3],y=(g-v)/2-(e.x-v),x=(b-m)/2-(e.y-m),w=180*e.angle/Math.PI,k=t.generator,_=n;if(e.link){var E=n.ownerDocument.createElementNS(f.hR,"a");E.setAttribute("href",e.link),_.appendChild(E),_=E}switch(e.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":ee(e,k);var S=oe(t,q(e),f.zK),C=e.opacity/100;1!==C&&(S.setAttribute("stroke-opacity","".concat(C)),S.setAttribute("fill-opacity","".concat(C))),S.setAttribute("stroke-linecap","round"),S.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(w," ").concat(y," ").concat(x,")")),_.appendChild(S);break;case"line":case"arrow":ee(e,k);var O=n.ownerDocument.createElementNS(f.hR,"g"),j=e.opacity/100;O.setAttribute("stroke-linecap","round"),q(e).forEach((function(n){var r=oe(t,n,f.zK);1!==j&&(r.setAttribute("stroke-opacity","".concat(j)),r.setAttribute("fill-opacity","".concat(j))),r.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(w," ").concat(y," ").concat(x,")")),"line"===e.type&&(0,s.g6)(e.points)&&"transparent"!==e.backgroundColor&&r.setAttribute("fill-rule","evenodd"),O.appendChild(r)})),_.appendChild(O);break;case"freedraw":ee(e,k),le(e);var I=e.opacity/100,T=q(e),M=T?oe(t,T,f.zK):n.ownerDocument.createElementNS(f.hR,"g");1!==I&&(M.setAttribute("stroke-opacity","".concat(I)),M.setAttribute("fill-opacity","".concat(I))),M.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(w," ").concat(y," ").concat(x,")")),M.setAttribute("stroke","none");var L=n.ownerDocument.createElementNS(f.hR,"path");L.setAttribute("fill",e.strokeColor),L.setAttribute("d",ce(e)),M.appendChild(L),_.appendChild(M);break;case"image":var A=(0,a.wi)(e)&&r[e.fileId];if(A){var P="image-".concat(A.id),D=n.querySelector("#".concat(P));if(!D){(D=n.ownerDocument.createElementNS(f.hR,"symbol")).id=P;var z=n.ownerDocument.createElementNS(f.hR,"image");z.setAttribute("width","100%"),z.setAttribute("height","100%"),z.setAttribute("href",A.dataURL),D.appendChild(z),_.prepend(D)}var Z=n.ownerDocument.createElementNS(f.hR,"use");Z.setAttribute("href","#".concat(P)),d&&A.mimeType!==f.LO.svg&&Z.setAttribute("filter",R),Z.setAttribute("width","".concat(Math.round(e.width))),Z.setAttribute("height","".concat(Math.round(e.height))),Z.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(w," ").concat(y," ").concat(x,")")),_.appendChild(Z)}break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var N=e.opacity/100,B=n.ownerDocument.createElementNS(f.hR,"g");1!==N&&(B.setAttribute("stroke-opacity","".concat(N)),B.setAttribute("fill-opacity","".concat(N))),B.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(w," ").concat(y," ").concat(x,")"));for(var H=e.text.replace(/\r\n?/g,"\n").split("\n"),W=e.height/H.length,U=e.height-e.baseline,F="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,K=(0,c.dZ)(e.text)?"rtl":"ltr",V="center"===e.textAlign?"middle":"right"===e.textAlign||"rtl"===K?"end":"start",Y=0;Y<H.length;Y++){var G=n.ownerDocument.createElementNS(f.hR,"text");G.textContent=H[Y],G.setAttribute("x","".concat(F)),G.setAttribute("y","".concat((Y+1)*W-U)),G.setAttribute("font-family",(0,c.$g)(e)),G.setAttribute("font-size","".concat(e.fontSize,"px")),G.setAttribute("fill",e.strokeColor),G.setAttribute("text-anchor",V),G.setAttribute("style","white-space: pre;"),G.setAttribute("direction",K),B.appendChild(G)}_.appendChild(B)}},ae=new WeakMap([]);function le(e){var t=ce(e),n=new Path2D(t);return ae.set(e,n),n}function ce(e){return function(e){if(!e.length)return"";var t=e.length-1;return e.reduce((function(e,n,r,o){return r===t?e.push(n,se(n,o[0]),"L",o[0],"Z"):e.push(n,se(n,o[r+1])),e}),["M",e[0],"Q"]).join(" ").replace(ue,"$1")}(A(e.simulatePressure?e.points:e.points.length?e.points.map((function(t,n){var r=(0,i.Z)(t,2);return[r[0],r[1],e.pressures[n]]})):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:4.25*e.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(e){return Math.sin(e*Math.PI/2)},last:!!e.lastCommittedPoint}))}function se(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var ue=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(e,t,n){"use strict";n.d(t,{Eu:function(){return I},M_:function(){return R}});var r,o=n(5858),i=n(668),a=n(5284),l=n(5118),c=n(756),s=n(1868),u=n(6202),d=n(8982),f=n(6938),p=n(242),h=n(2325),v=n(8290),m=n(6340);!function(e){e.ACTIVE="active",e.AWAY="away",e.IDLE="idle"}(r||(r={}));var g=n(8288),b=n(2383),y=n(1974);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k,_=(0,m.Q5)(),E=function(e,t,n,r,o,i,a,l){var c=arguments.length>8&&void 0!==arguments[8]&&arguments[8];e.save(),e.translate(i,a),e.rotate(l),c&&e.fillRect(t-i,n-a,r,o),e.strokeRect(t-i,n-a,r,o),e.restore()},S=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fill(),o&&e.stroke()},C=function(e,t,n,r){e.save(),e.translate(n.scrollX,n.scrollY),e.lineWidth=1/n.zoom.value,f._.getPointsGlobalCoordinates(r).forEach((function(r,o){var i,a;e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle=null!==(i=t.editingLinearElement)&&void 0!==i&&null!==(a=i.selectedPointsIndices)&&void 0!==a&&a.includes(o)?"rgba(134, 131, 226, 0.9)":"rgba(255, 255, 255, 0.9)";var l=f._.POINT_HANDLE_SIZE,c=t.editingLinearElement?l:l/2;S(e,r[0],r[1],c/n.zoom.value)})),e.restore()},O=function(e,t,n,h,m,b,w){if(null===b)return{atLeastOneVisibleElement:!1};var k=w.renderScrollbars,O=void 0===k||k,j=w.renderSelection,I=void 0===j||j,A=w.renderGrid,P=void 0===A||A,R=w.isExporting,Z=b.getContext("2d");Z.setTransform(1,0,0,1,0,0),Z.save(),Z.scale(h,h);var N=b.width/h,B=b.height/h;(R&&"dark"===w.theme&&(Z.filter=g.ZF),"string"==typeof w.viewBackgroundColor)?(("transparent"===w.viewBackgroundColor||5===w.viewBackgroundColor.length||9===w.viewBackgroundColor.length||/(hsla|rgba)\(/.test(w.viewBackgroundColor))&&Z.clearRect(0,0,N,B),Z.save(),Z.fillStyle=w.viewBackgroundColor,Z.fillRect(0,0,N,B),Z.restore()):Z.clearRect(0,0,N,B);Z.save(),Z.scale(w.zoom.value,w.zoom.value),P&&t.gridSize&&function(e,t,n,r,o,i){e.save(),e.strokeStyle="rgba(0,0,0,0.1)",e.beginPath();for(var a=n;a<n+o+2*t;a+=t)e.moveTo(a,r-t),e.lineTo(a,r+i+2*t);for(var l=r;l<r+i+2*t;l+=t)e.moveTo(n-t,l),e.lineTo(n+o+2*t,l);e.stroke(),e.restore()}(Z,t.gridSize,-Math.ceil(w.zoom.value/t.gridSize)*t.gridSize+w.scrollX%t.gridSize,-Math.ceil(w.zoom.value/t.gridSize)*t.gridSize+w.scrollY%t.gridSize,N/w.zoom.value,B/w.zoom.value);var H,W=e.filter((function(e){return z(e,N,B,{zoom:w.zoom,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,scrollX:w.scrollX,scrollY:w.scrollY})}));if(W.forEach((function(e){try{(0,u.lw)(e,m,Z,w),R||D(e,Z,t)}catch(e){console.error(e)}})),t.editingLinearElement){var U=f._.getElement(t.editingLinearElement.elementId);U&&C(Z,t,w,U)}if(n)try{(0,u.lw)(n,m,Z,w)}catch(e){console.error(e)}if((0,v.N1)(t)&&t.suggestedBindings.filter((function(e){return null!=e})).forEach((function(e){L(Z,w,e)})),t.selectedLinearElement&&-1!==t.selectedLinearElement.hoverPointIndex&&function(e,t,n){var r,o,a=t.selectedLinearElement,l=a.elementId,c=a.hoverPointIndex;if(null===(r=t.editingLinearElement)||void 0===r||null===(o=r.selectedPointsIndices)||void 0===o||!o.includes(c)){var s=f._.getElement(l);if(s){var u=f._.getPointAtIndexGlobalCoordinates(s,c),d=(0,i.Z)(u,2),p=d[0],h=d[1];e.save(),e.translate(n.scrollX,n.scrollY),e.fillStyle="rgba(105, 101, 219, 0.4)",S(e,p,h,f._.POINT_HANDLE_SIZE/n.zoom.value,!1),e.restore()}}}(Z,t,w),I&&!t.multiElement&&!t.editingLinearElement){var F,K=(0,s.eD)(e,t),V=K.map((function(e){return e.id})),Y=1===K.length&&(0,y.bt)(K[0]);if(Y&&(null===(F=t.selectedLinearElement)||void 0===F?void 0:F.elementId)===K[0].id&&!K[0].locked)C(Z,t,w,K[0]);else if(!t.draggingElement||!Y){var G,X=e.reduce((function(e,n){var r=[];if(V.includes(n.id)&&!(0,p.zq)(t,n)&&r.push(a.black),w.remoteSelectedElementIds[n.id]&&r.push.apply(r,(0,o.Z)(w.remoteSelectedElementIds[n.id].map((function(e){return(0,d.X)(e,t).background})))),r.length){var c=(0,l.qf)(n),s=(0,i.Z)(c,4),u=s[0],f=s[1],h=s[2],v=s[3];e.push({angle:n.angle,elementX1:u,elementY1:f,elementX2:h,elementY2:v,selectionColors:r})}return e}),[]),q=function(t){var n=(0,p.Fb)(e,t),r=(0,l.KP)(n),o=(0,i.Z)(r,4),c=o[0],s=o[1],u=o[2],d=o[3];X.push({angle:0,elementX1:c,elementX2:u,elementY1:s,elementY2:d,selectionColors:[a.black]})},$=x((0,p.iJ)(t));try{for($.s();!(G=$.n()).done;){q(G.value)}}catch(e){$.e(e)}finally{$.f()}t.editingGroupId&&q(t.editingGroupId),X.forEach((function(e){return M(Z,w,e)}))}if(Z.save(),Z.translate(w.scrollX,w.scrollY),1===K.length){Z.fillStyle=a.white;var J=(0,l.PC)(K[0],w.zoom,"mouse");t.viewModeEnabled||T(Z,w,J,K[0].angle)}else if(K.length>1&&!t.isRotating){var Q=4/w.zoom.value;Z.fillStyle=a.white;var ee=(0,l.KP)(K),te=(0,i.Z)(ee,4),ne=te[0],re=te[1],oe=te[2],ie=te[3],ae=Z.getLineDash();Z.setLineDash([2/w.zoom.value]);var le=Z.lineWidth;Z.lineWidth=1/w.zoom.value,E(Z,ne-Q,re-Q,oe-ne+2*Q,ie-re+2*Q,(ne+oe)/2,(re+ie)/2,0),Z.lineWidth=le,Z.setLineDash(ae);var ce=(0,l.kK)([ne,re,oe,ie],0,w.zoom,"mouse",l.ox);K.some((function(e){return!e.locked}))&&T(Z,w,ce,0)}Z.restore()}for(var se in Z.restore(),w.remotePointerViewportCoords){var ue=w.remotePointerViewportCoords[se],de=ue.x,fe=ue.y;de-=t.offsetLeft,fe-=t.offsetTop;var pe=de<0||de>N-9||fe<0||fe>B-14;de=Math.max(de,0),de=Math.min(de,N-9),fe=Math.max(fe,0),fe=Math.min(fe,B-14);var he=(0,d.X)(se,t),ve=he.background,me=he.stroke;Z.save(),Z.strokeStyle=me,Z.fillStyle=ve;var ge=w.remotePointerUserStates[se];(pe||ge===r.AWAY)&&(Z.globalAlpha=.48),w.remotePointerButton&&"down"===w.remotePointerButton[se]&&(Z.beginPath(),Z.arc(de,fe,15,0,2*Math.PI,!1),Z.lineWidth=3,Z.strokeStyle="#ffffff88",Z.stroke(),Z.closePath(),Z.beginPath(),Z.arc(de,fe,15,0,2*Math.PI,!1),Z.lineWidth=1,Z.strokeStyle=me,Z.stroke(),Z.closePath()),Z.beginPath(),Z.moveTo(de,fe),Z.lineTo(de+1,fe+14),Z.lineTo(de+4,fe+9),Z.lineTo(de+9,fe+10),Z.lineTo(de,fe),Z.fill(),Z.stroke();var be=w.remotePointerUsernames[se],ye="";ge===r.AWAY?ye=_?"⚫️":" (".concat(r.AWAY,")"):ge===r.IDLE?ye=_?"💤":" (".concat(r.IDLE,")"):ge===r.ACTIVE&&(ye=_?"🟢":"");var xe="".concat(be?"".concat(be," "):"").concat(ye);if(!pe&&xe){var we=de+9,ke=fe+14,_e=Z.measureText(xe),Ee=_e.actualBoundingBoxDescent+_e.actualBoundingBoxAscent;Z.fillStyle=me,Z.fillRect(we-1,ke-1,_e.width+8+2,Ee+8+2),Z.fillStyle=ve,Z.fillRect(we,ke,_e.width+8,Ee+8),Z.fillStyle=a.white,Z.fillText(xe,we+4,ke+4+_e.actualBoundingBoxAscent)}Z.restore(),Z.closePath()}return O&&(H=(0,c.tJ)(e,N,B,w),Z.save(),Z.fillStyle=c.w1,Z.strokeStyle="rgba(255,255,255,0.8)",[H.horizontal,H.vertical].forEach((function(e){e&&function(e,t,n,r,o,i){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),e.fill(),e.stroke()}(Z,e.x,e.y,e.width,e.height,c.nn/2)})),Z.restore()),Z.restore(),{atLeastOneVisibleElement:W.length>0,scrollBars:H}},j=(0,m.hR)((function(e,t,n,r,o,i,a,l){var c=O(e,t,n,r,o,i,a);null==l||l(c)}),{trailing:!0}),I=function(e,t,n,r,o,i,a,l,c){if(!c){var s=O(e,t,n,r,o,i,a);return null==l||l(s),s}j(e,t,n,r,o,i,a,l)},T=function(e,t,n,r){Object.keys(n).forEach((function(o){var i=n[o];void 0!==i&&(e.save(),e.lineWidth=1/t.zoom.value,"rotation"===o?S(e,i[0]+i[2]/2,i[1]+i[3]/2,i[2]/2):E(e,i[0],i[1],i[2],i[3],i[0]+i[2]/2,i[1]+i[3]/2,r,!0),e.restore())}))},M=function(e,t,n){var r=n.angle,o=n.elementX1,i=n.elementY1,a=n.elementX2,l=n.elementY2,c=n.selectionColors,s=a-o,u=l-i,d=4/t.zoom.value,f=8/t.zoom.value,p=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;for(var h=c.length,v=0;v<h;++v)e.strokeStyle=c[v],e.setLineDash([f,p+(f+p)*(h-1)]),e.lineDashOffset=(f+p)*v,E(e,o-d,i-d,s+2*d,u+2*d,o+s/2,i+u/2,r);e.restore()},L=function(e,t,n){var r=Array.isArray(n)?P:A;e.save(),e.translate(t.scrollX,t.scrollY),r(e,n),e.restore()},A=function(e,t){var n=(0,l.qf)(t),r=(0,i.Z)(n,4),o=r[0],a=r[1],c=r[2]-o,s=r[3]-a,u=(0,h.fb)(t,c,s);e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=u-4;var d=2+u/2;switch(t.type){case"rectangle":case"text":case"image":E(e,o-d,a-d,c+2*d,s+2*d,o+c/2,a+s/2,t.angle);break;case"diamond":var f=Math.hypot(c,s);!function(e,t,n,r,o,i){e.save(),e.translate(r,o),e.rotate(i),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()}(e,c+2*(d*f/s),s+2*(d*f/c),o+c/2,a+s/2,t.angle);break;case"ellipse":!function(e,t,n,r,o,i){e.beginPath(),e.ellipse(r,o,t/2,n/2,i,0,2*Math.PI),e.stroke()}(e,c+2*d,s+2*d,o+c/2,a+s/2,t.angle)}},P=function(e,t){var n=(0,i.Z)(t,3),r=n[0],o=n[1],a=n[2],l=(0,h.fb)(a,a.width,a.height);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",("both"===o?[0,-1]:"start"===o?[0]:[-1]).forEach((function(t){var n=f._.getPointAtIndexGlobalCoordinates(r,t),o=(0,i.Z)(n,2),a=o[0],c=o[1];S(e,a,c,l)}))},D=function(e,t,n){if(e.link&&!n.selectedElementIds[e.id]){var r=(0,l.qf)(e),o=(0,i.Z)(r,4),a=o[0],c=o[1],s=o[2],u=o[3],d=(0,b.sw)([a,c,s,u],e.angle,n),f=(0,i.Z)(d,4),p=f[0],h=f[1],v=f[2],m=f[3],g=p+v/2,y=h+m/2;if(t.save(),t.translate(n.scrollX+g,n.scrollY+y),t.rotate(e.angle),k&&k.zoom===n.zoom.value)t.drawImage(k,p-g,h-y,v,m);else{(k=document.createElement("canvas")).zoom=n.zoom.value,k.width=v*window.devicePixelRatio*n.zoom.value,k.height=m*window.devicePixelRatio*n.zoom.value;var x=k.getContext("2d");x.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),x.fillStyle="#fff",x.fillRect(0,0,v,m),x.drawImage(b.rj,0,0,v,m),x.restore(),t.drawImage(k,p-g,h-y,v,m)}t.restore()}},z=function(e,t,n,r){var o=(0,l.Pi)(e),a=(0,i.Z)(o,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,m.dE)({clientX:r.offsetLeft,clientY:r.offsetTop},r),p=(0,m.dE)({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return f.x<=u&&f.y<=d&&p.x>=c&&p.y>=s},R=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=o.offsetX,a=void 0===i?0:i,l=o.offsetY,c=void 0===l?0:l,s=o.exportWithDarkMode,d=void 0!==s&&s;n&&e.forEach((function(e){if(!e.isDeleted)try{(0,u.Rg)(e,t,n,r,e.x+a,e.y+c,d)}catch(e){console.error(e)}}))}},1564:function(e,t,n){"use strict";var r=n(7775),o=n(6967),i=n(5118),a=function(e){return"string"==typeof e},l=function(){function e(){(0,r.Z)(this,e),this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.elementsMap=new Map}return(0,o.Z)(e,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(e){return this.elementsMap.get(e)||null}},{key:"getNonDeletedElement",value:function(e){var t=this.getElement(e);return t&&(0,i.qP)(t)?t:null}},{key:"replaceAllElements",value:function(t){var n=this;this.elements=t,this.elementsMap.clear(),t.forEach((function(t){n.elementsMap.set(t.id,t),e.mapElementToScene(t,n)})),this.nonDeletedElements=(0,i.Lm)(this.elements),this.informMutation()}},{key:"informMutation",value:function(){for(var e=0,t=Array.from(this.callbacks);e<t.length;e++){(0,t[e])()}}},{key:"addCallback",value:function(e){var t=this;if(this.callbacks.has(e))throw new Error;return this.callbacks.add(e),function(){if(!t.callbacks.has(e))throw new Error;t.callbacks.delete(e)}}},{key:"destroy",value:function(){var t=this;e.sceneMapById.forEach((function(n,r){n===t&&e.sceneMapById.delete(r)})),this.callbacks.clear()}}],[{key:"mapElementToScene",value:function(e,t){a(e)?this.sceneMapById.set(e,t):this.sceneMapByElement.set(e,t)}},{key:"getScene",value:function(e){return a(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}}]),e}();l.sceneMapByElement=new WeakMap,l.sceneMapById=new Map,t.Z=l},8120:function(e,t,n){"use strict";n.d(t,{$b:function(){return a},CJ:function(){return h},M9:function(){return s},OW:function(){return v},PD:function(){return l},QG:function(){return p},Un:function(){return f},Zd:function(){return c},bZ:function(){return d},gP:function(){return u}});var r=n(668),o=n(5118),i=n(1974),a=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"line"===e||"freedraw"===e},l=function(e){return"image"!==e},c=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"freedraw"===e||"arrow"===e||"line"===e},s=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"arrow"===e||"line"===e},u=function(e){return"rectangle"===e||"arrow"===e||"line"===e||"diamond"===e},d=function(e){return"text"===e},f=function(e){return"arrow"===e},p=function(e,t){for(var n=null,r=e.length-1;r>=0;--r){var o=e[r];if(!o.isDeleted&&t(o)){n=o;break}}return n},h=function(e,t){return e.filter((function(e){return!e.isDeleted&&t(e)}))},v=function(e,t,n){for(var a=null,l=e.length-1;l>=0;--l)if(!e[l].isDeleted){var c=(0,o.qf)(e[l]),s=(0,r.Z)(c,4),u=s[0],d=s[1],f=s[2],p=s[3];if(u<t&&t<f&&d<n&&n<p){a=e[l];break}}return(0,i.mG)(a,!1)?a:null}},4162:function(e,t,n){"use strict";n.d(t,{$D:function(){return m},Cg:function(){return b},NL:function(){return v},oj:function(){return h}});var r=n(668),o=n(6759),i=n(3152),a=n(6852),l=n(8925),c=n(3547),s=n(6340),u=n(8288),d=n(8897),f=n(5523),p=n(7812),h="\x3c!-- svg-source:excalidraw --\x3e",v=function(){var e=(0,o.Z)(i.default.mark((function e(t,n,o,l){var s,f,h,v,m,b,y,x,w,k,_,E,S,C,O,j,I,T,M=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=l.exportBackground,f=l.exportPadding,h=void 0===f?u.qy:f,v=l.viewBackgroundColor,m=M.length>4&&void 0!==M[4]?M[4]:function(e,t){var r=document.createElement("canvas");return r.width=e*n.exportScale,r.height=t*n.exportScale,{canvas:r,scale:n.exportScale}},b=g(t,h),y=(0,r.Z)(b,4),x=y[0],w=y[1],k=y[2],_=y[3],E=m(k,_),S=E.canvas,C=E.scale,O=void 0===C?1:C,j=(0,d.im)(),e.next=7,(0,p.Xx)({imageCache:new Map,fileIds:(0,p.oA)(t).map((function(e){return e.fileId})),files:o});case 7:return I=e.sent,T=I.imageCache,(0,c.Eu)(t,n,null,O,a.Z.canvas(S),S,{viewBackgroundColor:s?v:null,scrollX:-x+h,scrollY:-w+h,zoom:j.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:n.exportWithDarkMode?"dark":"light",imageCache:T,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}),e.abrupt("return",S);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),m=function(){var e=(0,o.Z)(i.default.mark((function e(t,o,l){var s,d,p,v,m,b,y,x,w,k,_,E,S,C,O,j,I,T;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=o.exportPadding,d=void 0===s?u.qy:s,p=o.viewBackgroundColor,v=o.exportScale,m=void 0===v?1:v,b=o.exportEmbedScene,y="",!b){e.next=14;break}return e.prev=3,e.next=6,Promise.resolve().then(n.bind(n,673));case 6:return e.next=8,e.sent.encodeSvgMetadata({text:(0,f.I_)(t,o,l||{},"local")});case 8:y=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.error(e.t0);case 14:return x=g(t,d),w=(0,r.Z)(x,4),k=w[0],_=w[1],E=w[2],S=w[3],(C=document.createElementNS(u.hR,"svg")).setAttribute("version","1.1"),C.setAttribute("xmlns",u.hR),C.setAttribute("viewBox","0 0 ".concat(E," ").concat(S)),C.setAttribute("width","".concat(E*m)),C.setAttribute("height","".concat(S*m)),o.exportWithDarkMode&&C.setAttribute("filter",u.ZF),O="https://excalidraw.com/",O=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@dwelle/excalidraw","@").concat("0.12.0-fork"),null!==(j=O)&&void 0!==j&&j.startsWith("/")&&(O=O.replace("/","".concat(window.location.origin,"/"))),O="".concat(O,"/dist/excalidraw-assets/"),C.innerHTML="\n ".concat(h,"\n ").concat(y,'\n <defs>\n <style>\n @font-face {\n font-family: "Virgil";\n src: url("').concat(O,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(O,'Cascadia.woff2");\n }\n </style>\n </defs>\n '),o.exportBackground&&p&&((I=C.ownerDocument.createElementNS(u.hR,"rect")).setAttribute("x","0"),I.setAttribute("y","0"),I.setAttribute("width","".concat(E)),I.setAttribute("height","".concat(S)),I.setAttribute("fill",p),C.appendChild(I)),T=a.Z.svg(C),(0,c.M_)(t,T,C,l||{},{offsetX:-k+d,offsetY:-_+d,exportWithDarkMode:o.exportWithDarkMode}),e.abrupt("return",C);case 29:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r){return e.apply(this,arguments)}}(),g=function(e,t){var n=(0,l.KP)(e),o=(0,r.Z)(n,4),i=o[0],a=o[1],c=o[2],u=o[3];return[i,a,(0,s.TE)(i,c)+2*t,(0,s.TE)(a,u)+t+t]},b=function(e,t,n){var o=g(e,t).map((function(e){return Math.trunc(e*n)})),i=(0,r.Z)(o,4);return[i[2],i[3]]}},75:function(e,t,n){"use strict";n.d(t,{$b:function(){return a.$b},CJ:function(){return a.CJ},M9:function(){return a.M9},N:function(){return o.N},OW:function(){return a.OW},PR:function(){return o.PR},QG:function(){return a.QG},Un:function(){return a.Un},W:function(){return i.W},Yp:function(){return o.Yp},Zd:function(){return a.Zd},Zs:function(){return o.Zs},_4:function(){return r._4},bZ:function(){return a.bZ},eD:function(){return o.eD},gP:function(){return a.gP},j:function(){return l.j}});var r=n(756),o=n(1868),i=n(2264),a=n(8120),l=n(746)},2264:function(e,t,n){"use strict";n.d(t,{W:function(){return l},s:function(){return a}});var r=n(668),o=n(5118),i=n(6340),a=function(e){var t=e.scenePoint,n=e.viewportDimensions,r=e.zoom;return{scrollX:n.width/2*(1/r.value)-t.x,scrollY:n.height/2*(1/r.value)-t.y}},l=function(e,t,n){if(!(e=(0,o.n_)(e)).length)return{scrollX:0,scrollY:0};var l=(0,o.KP)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3];if(function(e,t,n){var o=(0,r.Z)(n,4),a=o[0],l=o[1],c=o[2],s=o[3],u=(0,i._i)({sceneX:a,sceneY:l},e),d=u.x,f=u.y,p=(0,i._i)({sceneX:c,sceneY:s},e),h=p.x,v=p.y;return h-d>e.width||v-f>e.height}(t,0,[s,u,d,f])){var p=(0,o.os)(e,(0,i.dE)({clientX:t.scrollX,clientY:t.scrollY},t)),h=(0,r.Z)(p,4);s=h[0],u=h[1],d=h[2],f=h[3]}return a({scenePoint:{x:(s+d)/2,y:(u+f)/2},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})}},756:function(e,t,n){"use strict";n.d(t,{WM:function(){return l},_4:function(){return d},nn:function(){return c},tJ:function(){return u},w1:function(){return s}});var r=n(668),o=n(5118),i=n(6340),a=n(8211),l=4,c=6,s="rgba(0,0,0,0.3)",u=function(e,t,n,s){var u=s.scrollX,d=s.scrollY,f=s.zoom;if(0===e.length)return{horizontal:null,vertical:null};var p=(0,o.KP)(e),h=(0,r.Z)(p,4),v=h[0],m=h[1],g=h[2],b=h[3],y=t/f.value,x=n/f.value,w=t-y,k=n-x,_={top:parseInt((0,i.IH)("sat")),bottom:parseInt((0,i.IH)("sab")),left:parseInt((0,i.IH)("sal")),right:parseInt((0,i.IH)("sar"))},E=(0,a.G3)().rtl,S=w/2-u+_.left,C=k/2-d+_.top,O=S+y-_.right,j=C+x-_.bottom,I=Math.min(v,S),T=Math.min(m,C),M=Math.max(g,O),L=Math.max(b,j);return{horizontal:S===I&&O===M?null:{x:Math.max(_.left,l)+(S-I)/(M-I)*t,y:n-c-Math.max(l,_.bottom),width:(O-S)/(M-I)*t-Math.max(2*l,_.left+_.right),height:c},vertical:C===T&&j===L?null:{x:E?Math.max(_.left,l):t-c-Math.max(_.right,l),y:(C-T)/(L-T)*n+Math.max(_.top,l),width:c,height:(j-C)/(L-T)*n-Math.max(2*l,_.top+_.bottom)}}},d=function(e,t,n){var o=[e.horizontal,e.vertical].map((function(e){return null!=e&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height})),i=(0,r.Z)(o,2),a=i[0],l=i[1];return{isOverEither:a||l,isOverHorizontal:a,isOverVertical:l}}},1868:function(e,t,n){"use strict";n.d(t,{N:function(){return l},PR:function(){return c},Yp:function(){return a},Zs:function(){return u},eD:function(){return s}});var r=n(668),o=n(5118),i=n(1974),a=function(e,t){var n=(0,o.qf)(t),a=(0,r.Z)(n,4),l=a[0],c=a[1],s=a[2],u=a[3];return e.filter((function(e){var t=(0,o.Pi)(e),n=(0,r.Z)(t,4),a=n[0],d=n[1],f=n[2],p=n[3];return!1===e.locked&&"selection"!==e.type&&!(0,i.Xh)(e)&&l<=a&&c<=d&&s>=f&&u>=p}))},l=function(e,t){return e.some((function(e){return t.selectedElementIds[e.id]}))},c=function(e,t,n){var r=Array.from(new Set(s(e,t).map((function(e){return n(e)}))));return 1===r.length?r[0]:null},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.filter((function(e){return t.selectedElementIds[e.id]||n&&(0,i.Xh)(e)&&t.selectedElementIds[null==e?void 0:e.containerId]?e:null}))},u=function(e,t){return t.editingElement?[t.editingElement]:s(e,t,!0)}},746:function(e,t,n){"use strict";n.d(t,{E:function(){return o},j:function(){return r}});var r=function(e){return Math.max(.1,Math.min(e,30))},o=function(e,t){var n=e.viewportX,r=e.viewportY,o=e.nextZoom,i=n-t.offsetLeft,a=r-t.offsetTop,l=t.zoom.value;return{scrollX:t.scrollX+(i-i/l)+-(i-i/o),scrollY:t.scrollY+(a-a/l)+-(a-a/o),zoom:{value:o}}}},6340:function(e,t,n){"use strict";n.d(t,{$9:function(){return X},$g:function(){return k},$h:function(){return ie},AK:function(){return W},C3:function(){return ee},Ds:function(){return E},FG:function(){return U},Fc:function(){return g},G3:function(){return Q},IH:function(){return N},Ip:function(){return $},KJ:function(){return T},OF:function(){return M},Om:function(){return j},Oo:function(){return b},PI:function(){return Y},Pr:function(){return D},Q5:function(){return q},Qm:function(){return V},TE:function(){return O},Uk:function(){return L},_Z:function(){return x},_i:function(){return Z},ag:function(){return re},cx:function(){return F},dE:function(){return R},dZ:function(){return H},h2:function(){return ne},hR:function(){return S},mO:function(){return _},qr:function(){return K},qz:function(){return J},rB:function(){return A},s:function(){return w},tH:function(){return G},uY:function(){return z},v4:function(){return oe},wO:function(){return y},wo:function(){return P},xn:function(){return te},xp:function(){return le},y8:function(){return ae},yo:function(){return C},z8:function(){return I}});var r=n(8758),o=n(489),i=n(5858),a=n(668),l=n(5284),c=n(56),s=n(8288),u=n(5156),d=n(6066);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h,v,m=null,g=function(){if(m)return m;var e=new Date,t=e.getFullYear(),n="".concat(e.getMonth()+1).padStart(2,"0"),r="".concat(e.getDate()).padStart(2,"0"),o="".concat(e.getHours()).padStart(2,"0"),i="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(o).concat(i)},b=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},y=function(e){return e instanceof HTMLElement&&e.className.includes("ToolIcon")},x=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement},w=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&("text"===e.type||"number"===e.type)},k=function(e){for(var t=e.fontFamily,n=0,r=Object.entries(s.ut);n<r.length;n++){var o=(0,a.Z)(r[n],2),i=o[0];if(o[1]===t)return"".concat(i,", ").concat(s._D)}return s._D},_=function(e){var t=e.fontSize,n=e.fontFamily;return"".concat(t,"px ").concat(k({fontFamily:n}))},E=function(e,t){var n=0,r=null,o=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r=i,clearTimeout(n),n=window.setTimeout((function(){r=null,e.apply(void 0,i)}),t)};return o.flush=function(){if(clearTimeout(n),r){var t=r;r=null,e.apply(void 0,(0,i.Z)(t))}},o.cancel=function(){r=null,clearTimeout(n)},o},S=function(e,t){var n=null,r=null,o=null,a=function t(a){n=window.requestAnimationFrame((function(){n=null,e.apply(void 0,(0,i.Z)(a)),r=null,o&&(r=o,o=null,t(r))}))},l=function(){for(var e=arguments.length,i=new Array(e),l=0;l<e;l++)i[l]=arguments[l];r=i,null===n?a(r):null!=t&&t.trailing&&(o=i)};return l.flush=function(){null!==n&&(cancelAnimationFrame(n),n=null),r&&(e.apply(void 0,(0,i.Z)(o||r)),r=o=null)},l.cancel=function(){r=o=null,null!==n&&(cancelAnimationFrame(n),n=null)},l},C=function(e,t){if(!e.length||t<1)return[];for(var n=0,r=0,o=Array(Math.ceil(e.length/t));n<e.length;)o[r++]=e.slice(n,n+=t);return o},O=function(e,t){return Math.abs(e-t)},j=function(e,t){return"custom"===t.type?p(p({},e.activeTool),{},{type:"custom",customType:t.customType}):p(p({},e.activeTool),{},{lastActiveToolBeforeEraser:void 0===t.lastActiveToolBeforeEraser?e.activeTool.lastActiveToolBeforeEraser:t.lastActiveToolBeforeEraser,type:t.type,customType:null})},I=function(e){e&&(e.style.cursor="")},T=function(e,t){e&&(e.style.cursor=t)},M=function(e,t){h&&h.theme===t||function(){var e=t===s.C6.DARK;(h=document.createElement("canvas")).theme=t,h.height=20,h.width=20;var n=h.getContext("2d");n.lineWidth=1,n.beginPath(),n.arc(h.width/2,h.height/2,5,0,2*Math.PI),n.fillStyle=e?l.black:l.white,n.fill(),n.strokeStyle=e?l.white:l.black,n.stroke(),v=h.toDataURL(s.LO.svg)}(),T(e,"url(".concat(v,") ").concat(10," ").concat(10,", auto"))},L=function(e,t){e&&("selection"===t.activeTool.type?I(e):"eraser"===t.activeTool.type?M(e,t.theme):["image","custom"].includes(t.activeTool.type)||(e.style.cursor=s.oc.CROSSHAIR))},A=function(){var e;return"HTML"===(null===(e=document.fullscreenElement)||void 0===e?void 0:e.nodeName)},P=function(){return document.documentElement.requestFullscreen()},D=function(){return document.exitFullscreen()},z=function(e){return e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter").replace(/\bDel\b/i,"Delete"),d.Um?e.replace(/\bCtrlOrCmd\b/i,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/i,"Ctrl")},R=function(e,t){var n=e.clientX,r=e.clientY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY,s=1/o.value;return{x:(n-i)*s-l,y:(r-a)*s-c}},Z=function(e,t){var n=e.sceneX,r=e.sceneY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n+l)*o.value+i,y:(r+c)*o.value+a}},N=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},B=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),H=function(e){return B.test(e)},W=function(e){var t=(0,a.Z)(e,2);return{x:t[0],y:t[1]}},U=function(e){if("AbortError"!==(null==e?void 0:e.name))throw e;console.warn(e)},F=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length,Math.max(n,0)))-1;++r<e.length;)if(t(e[r],r,e))return r;return-1},K=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length-1,Math.max(n,0)))+1;--r>-1;)if(t(e[r],r,e))return r;return-1},V=function(e){var t=5===e.length&&"0"===e.substr(4,1),n=9===e.length&&"00"===e.substr(7,2);return t||n||e===c.Z.elementBackground[0]},Y=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},G=function(e){return function(t){(0,u.unstable_batchedUpdates)(e,t)}},X=function(e){return S((function(t){(0,u.unstable_batchedUpdates)(e,t)}))},q=function(){var e=document.createElement("canvas").getContext("2d");if(!e)return!1;return e.fillStyle="#f00",e.textBaseline="top",e.font="32px Arial",e.fillText("😀",0,0),0!==e.getImageData(12,12,1,1).data[0]},$=function(e){for(var t=e.parentElement;t;){if(t===document.body)return document;var n=window.getComputedStyle(t).overflowY;if(t.scrollHeight>t.clientHeight&&("auto"===n||"scroll"===n||"overlay"===n))return t;t=t.parentElement}return document},J=function(e){for(var t=e.parentElement;t;){if(t.tabIndex>-1)return void t.focus();t=t.parentElement}},Q=function(e){return Array.from(e).map((function(e){return"0".concat(e.toString(16)).slice(-2)})).join("")},ee=function(){return ne()?1:Date.now()},te=function(e){return e.reduce((function(e,t){return e.set("string"==typeof t?t:t.id,t),e}),new Map)},ne=function(){var e;return"undefined"!=typeof process&&"test"===(null===(e={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@dwelle/excalidraw",PKG_VERSION:"0.12.0-fork",IS_EXCALIDRAW_NPM_PACKAGE:!0})||void 0===e?void 0:e.NODE_ENV)},re=function(e,t){return new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0})},oe=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?p(p({},e),t):e},ie=function(){try{return window.self===window.top?"top":"iframe"}catch(e){return"iframe"}},ae=function(e){return!!e&&"object"===(0,r.Z)(e)&&"then"in e&&"catch"in e&&"finally"in e},le=function(e){var t=null==e?void 0:e.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter((function(e){return e.tabIndex>-1&&!e.disabled})):[]}},9669:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},1639:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},3147:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Cascadia.woff2"},3940:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Virgil.woff2"},9787:function(t){"use strict";t.exports=e},5156:function(e){"use strict";e.exports=t},7718:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},1510:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},6759:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function l(e){r(a,o,i,l,c,"next",e)}function c(e){r(a,o,i,l,c,"throw",e)}l(void 0)}))}}n.d(t,{Z:function(){return o}})},7775:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},6967:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return o}})},489:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},3164:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},8875:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(6334);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.Z)(e,t)}},8357:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:function(){return r}})},4653:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8758),o=n(1510);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},6334:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},668:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2189);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},5858:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7718);var o=n(2189);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},8758:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},2189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7718);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},6612:function(e,t,n){"use strict";n.d(t,{x0:function(){return r}});var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce((function(e,t){return e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"}),"")}},5284:function(e){"use strict";e.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},1463:function(e){"use strict";e.exports=JSON.parse('{"labels":{"paste":"Paste","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Save as image","export":"Export","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save to current file","saveAs":"Save as","load":"Load","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled."},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library"},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Prevent pinch-zoom and accept freedraw input only from pen","link":"Add/ Update link for a selected shape","eraser":"Eraser"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Double-click or press Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain_pre":"Encountered an error. Try ","headingMain_button":"reloading the page.","clearCanvasMessage":"If reloading doesn\'t work, try ","clearCanvasMessage_button":"clearing the canvas.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry_pre":"The error with identifier ","trackedToSentry_post":" was tracked on our system.","openIssueMessage_pre":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our ","openIssueMessage_button":"bug tracker.","openIssueMessage_post":" Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editSelectedShape":"Edit selected shape (text/arrow/line)","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":{"pre":"Submit your library to be included in the ","link":"public library repository","post":"for other people to use in their drawings."},"noteGuidelines":{"pre":"The library needs to be manually approved first. Please read the ","link":"guidelines","post":" before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required."},"noteLicense":{"pre":"By submitting, you agree the library will be published under the ","link":"MIT License, ","post":"which in short means anyone can use them without restrictions."},"noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status","link":"here"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection"},"colors":{"495057":"Gray 7","ffffff":"White","f8f9fa":"Gray 0","f1f3f5":"Gray 1","fff5f5":"Red 0","fff0f6":"Pink 0","f8f0fc":"Grape 0","f3f0ff":"Violet 0","edf2ff":"Indigo 0","e7f5ff":"Blue 0","e3fafc":"Cyan 0","e6fcf5":"Teal 0","ebfbee":"Green 0","f4fce3":"Lime 0","fff9db":"Yellow 0","fff4e6":"Orange 0","transparent":"Transparent","ced4da":"Gray 4","868e96":"Gray 6","fa5252":"Red 6","e64980":"Pink 6","be4bdb":"Grape 6","7950f2":"Violet 6","4c6ef5":"Indigo 6","228be6":"Blue 6","15aabf":"Cyan 6","12b886":"Teal 6","40c057":"Green 6","82c91e":"Lime 6","fab005":"Yellow 6","fd7e14":"Orange 6","000000":"Black","343a40":"Gray 8","c92a2a":"Red 9","a61e4d":"Pink 9","862e9c":"Grape 9","5f3dc4":"Violet 9","364fc7":"Indigo 9","1864ab":"Blue 9","0b7285":"Cyan 9","087f5b":"Teal 9","2b8a3e":"Green 9","5c940d":"Lime 9","e67700":"Yellow 9","d9480f":"Orange 9"}}')},4451:function(e){"use strict";e.exports=JSON.parse('{"ar-SA":91,"bg-BG":58,"bn-BD":0,"ca-ES":97,"cs-CZ":27,"da-DK":34,"de-DE":100,"el-GR":82,"en":100,"es-ES":99,"eu-ES":100,"fa-IR":98,"fi-FI":98,"fr-FR":100,"gl-ES":45,"he-IL":94,"hi-IN":62,"hu-HU":94,"id-ID":100,"it-IT":100,"ja-JP":100,"kab-KAB":95,"kk-KZ":22,"ko-KR":98,"lt-LT":22,"lv-LV":100,"mr-IN":100,"my-MM":44,"nb-NO":100,"nl-NL":86,"nn-NO":95,"oc-FR":98,"pa-IN":88,"pl-PL":88,"pt-BR":95,"pt-PT":80,"ro-RO":100,"ru-RU":100,"si-LK":8,"sk-SK":100,"sl-SI":100,"sv-SE":100,"ta-IN":98,"tr-TR":99,"uk-UA":100,"vi-VN":13,"zh-CN":100,"zh-HK":27,"zh-TW":100}')}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={id:e,loaded:!1,exports:{}};return a[e](n,n.exports,c),n.loaded=!0,n.exports}c.m=a,c.amdO={},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},r=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},c.d(o,i),o},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return"excalidraw-assets/"+{0:"locales/vi-VN-json",22:"locales/kk-KZ-json",24:"locales/nl-NL-json",71:"locales/sl-SI-json",81:"locales/eu-ES-json",82:"locales/de-DE-json",89:"locales/ro-RO-json",91:"locales/ar-SA-json",124:"locales/ru-RU-json",130:"locales/ca-ES-json",162:"locales/pa-IN-json",204:"locales/ja-JP-json",239:"locales/it-IT-json",265:"locales/cs-CZ-json",302:"locales/si-LK-json",312:"locales/he-IL-json",330:"locales/fa-IR-json",340:"locales/lt-LT-json",359:"locales/nb-NO-json",368:"locales/hu-HU-json",395:"locales/pt-PT-json",397:"locales/mr-IN-json",404:"locales/ta-IN-json",421:"locales/zh-TW-json",429:"locales/bn-BD-json",477:"locales/my-MM-json",512:"locales/fi-FI-json",513:"locales/el-GR-json",534:"locales/sv-SE-json",551:"locales/kab-KAB-json",579:"locales/uk-UA-json",628:"locales/bg-BG-json",674:"locales/pl-PL-json",680:"locales/zh-CN-json",682:"locales/fr-FR-json",690:"locales/oc-FR-json",721:"locales/pt-BR-json",736:"vendor",750:"locales/sk-SK-json",759:"locales/es-ES-json",768:"locales/lv-LV-json",790:"locales/da-DK-json",808:"locales/id-ID-json",828:"locales/hi-IN-json",844:"locales/ko-KR-json",885:"locales/nn-NO-json",920:"locales/zh-HK-json",943:"locales/gl-ES-json",977:"locales/tr-TR-json"}[e]+"-"+{0:"5c276b534d762658589c",22:"ccf0876179807d1d685a",24:"861ac93c048b5296b791",71:"b69c9fd9b85dac1310c6",81:"a61838a778c9eacb61ec",82:"9b88838b2648d7d61f1b",89:"232ea1e0c18745ec6ed9",91:"4ff31c0432fe4c84d726",124:"ce5fedd8812aa76a0b41",130:"32cf66a0dfdbbafb6903",162:"eb38ce8bfc1b974c1455",204:"4c357f8206b88dc44840",239:"10923c290e23bd31a5b4",265:"304d08cac870aa0684ec",302:"f48a64dfd1cb9c075d2e",312:"3f5bfefb1ad0baf19b6c",330:"2d0cb1044744ed8e4139",340:"7277ad8dae6d3e6607b3",359:"61192c4af6e2231d38ae",368:"e1275f2b1e6ae6ef4427",395:"be4502ca3a1250845c39",397:"cb316f30d7b40d3e6766",404:"15175d03785f7a482568",421:"441a30840e0721d7f2e2",429:"aa99c5a33f005fb00c6b",477:"5dcc8e9cb97a4aa1d8bc",512:"32bcb6481756ef8af590",513:"74f57c0f8b11ac1b6dde",534:"9a8520b202b7181625cf",551:"8303afee283a95237f2b",579:"15fda426e55236408ef9",628:"1c6eb789a5c90a61edf8",674:"55d8dd8a44917364ef63",680:"0e3236ea93581e6ac2d3",682:"935424b03b86c1d82dcd",690:"d5706569ab4023f94c66",721:"686219f43cd76123b7fa",736:"b9b3a25c026c138e55b2",750:"537132ec043d4db7f328",759:"ffb4e65453db2f3058d4",768:"cc5e03ed2a09f8f8b60b",790:"80c7153473e1427a9a3b",808:"da38cd847aaf195c3c20",828:"71a38dbb2202baec2bad",844:"f27d159b2556809076aa",885:"808362c0cd4eccb6a885",920:"9e8b36ecb4c8399449b1",943:"5b417484d91976bce190",977:"c53ae37e848043dd0b89"}[e]+".js"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o={},i="ExcalidrawLib:",c.l=function(e,t,n,r){if(o[e])o[e].push(t);else{var a,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var d=s[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var f=function(t,n){a.onerror=a.onload=null,clearTimeout(p);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),l&&document.head.appendChild(a)}},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="",function(){c.b=document.baseURI||self.location.href;var e={388:0};c.f.j=function(t,n){var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],a=n[1],l=n[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)l(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),c.nc=void 0;var s={};return function(){"use strict";c.r(s),c.d(s,{Excalidraw:function(){return A},FONT_FAMILY:function(){return e.ut},MIME_TYPES:function(){return e.LO},THEME:function(){return e.C6},bumpVersion:function(){return _.ZP},defaultLang:function(){return p.Fp},exportToBlob:function(){return w.Fl},exportToCanvas:function(){return w.NL},exportToClipboard:function(){return w.i1},exportToSvg:function(){return w.$D},getFreeDrawSvgPath:function(){return w.N7},getNonDeletedElements:function(){return y.Lm},getSceneVersion:function(){return y.Uo},isInvisiblySmallElement:function(){return y.QD},isLinearElement:function(){return k.bt},languages:function(){return p.Mj},loadFromBlob:function(){return w.cT},loadLibraryFromBlob:function(){return w.lV},loadSceneOrLibraryFromBlob:function(){return w.ZY},mergeLibraryItems:function(){return w.zh},mutateElement:function(){return _.DR},newElementWith:function(){return _.BE},parseLibraryTokensFromUrl:function(){return E.Di},restore:function(){return x.nu},restoreAppState:function(){return x.lY},restoreElements:function(){return x.ET},restoreLibraryItems:function(){return x.wJ},sceneCoordsToViewportCoords:function(){return S._i},serializeAsJSON:function(){return w.I_},serializeLibraryAsJSON:function(){return w.NI},useHandleLibrary:function(){return E.xS},viewportCoordsToSceneCoords:function(){return S.dE}});var e=c(8288);"production"!==e.Vi.TEST&&(c.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@dwelle/excalidraw","@").concat("0.12.0-fork","/dist/"));c(8336);var t=c(6049),n=c.n(t),r=c(1807),o=c.n(r),i=c(9787),a=c.n(i),l=c(6759),u=c(668),d=c(3152),f=c(5440),p=c(8211),h=c(1337),v=function(e){var t=(0,i.useState)(!0),n=(0,u.Z)(t,2),r=n[0],o=n[1];return(0,i.useEffect)((function(){var t=function(){var e=(0,l.Z)(d.default.mark((function e(){return d.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.m0)(n);case 2:o(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=p.Mj.find((function(t){return t.code===e.langCode}))||p.Fp;t()}),[e.langCode]),r?(0,h.jsx)(f.z,{}):e.children},m=c(9660),g=(c(4285),c(3313),c(6131)),b=c(9487),y=c(5118),x=c(679),w=c(3024),k=c(1974),_=c(1935),E=c(7053),S=c(6340),C=["initialData","UIOptions"],O=["initialData","UIOptions"];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(t){var n,r,o,a=t.onChange,l=t.initialData,c=t.excalidrawRef,s=t.onCollabButtonClick,u=t.isCollaborating,d=void 0!==u&&u,f=t.onPointerUpdate,y=t.renderTopRightUI,x=t.renderFooter,w=t.langCode,k=void 0===w?p.Fp.code:w,_=t.viewModeEnabled,E=t.zenModeEnabled,S=t.gridModeEnabled,C=t.libraryReturnUrl,O=t.theme,j=t.name,T=t.renderCustomStats,M=t.onPaste,L=t.detectScroll,A=void 0===L||L,P=t.handleKeyboardGlobally,D=void 0!==P&&P,z=t.onLibraryChange,R=t.autoFocus,Z=void 0!==R&&R,N=t.generateIdForFile,B=t.onLinkOpen,H=t.onPointerDown,W=t.onScrollChange,U=null===(n=t.UIOptions)||void 0===n?void 0:n.canvasActions,F=I(I({},t.UIOptions),{},{canvasActions:I(I({},e.cW.canvasActions),U)});null!=U&&U.export&&(F.canvasActions.export.saveFileToDisk=null!==(r=null===(o=U.export)||void 0===o?void 0:o.saveFileToDisk)&&void 0!==r?r:e.cW.canvasActions.export.saveFileToDisk);return(0,i.useEffect)((function(){var e=function(e){"number"==typeof e.scale&&1!==e.scale&&e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),function(){document.removeEventListener("touchmove",e)}}),[]),(0,h.jsx)(v,{langCode:k,children:(0,h.jsx)(g.zt,{unstable_createStore:function(){return b.e_},scope:b.yE,children:(0,h.jsx)(m.ZP,{onChange:a,initialData:l,excalidrawRef:c,onCollabButtonClick:s,isCollaborating:d,onPointerUpdate:f,renderTopRightUI:y,renderFooter:x,langCode:k,viewModeEnabled:_,zenModeEnabled:E,gridModeEnabled:S,libraryReturnUrl:C,theme:O,name:j,renderCustomStats:T,UIOptions:F,onPaste:M,detectScroll:A,handleKeyboardGlobally:D,onLibraryChange:z,autoFocus:Z,generateIdForFile:N,onLinkOpen:B,onPointerDown:H,onScrollChange:W})})})},M=function(e,t){e.initialData;var r=e.UIOptions,o=void 0===r?{}:r,i=n()(e,C),a=(t.initialData,t.UIOptions),l=void 0===a?{}:a,c=n()(t,O),s=Object.keys(o),u=Object.keys(l);if(s.length!==u.length)return!1;var d=s.every((function(e){"canvasActions"===e&&Object.keys(o.canvasActions).every((function(e){var t,n,r,i;return"export"===e&&null!=o&&null!==(t=o.canvasActions)&&void 0!==t&&t.export&&null!=l&&null!==(n=l.canvasActions)&&void 0!==n&&n.export?o.canvasActions.export.saveFileToDisk===l.canvasActions.export.saveFileToDisk:(null==o||null===(r=o.canvasActions)||void 0===r?void 0:r[e])===(null==l||null===(i=l.canvasActions)||void 0===i?void 0:i[e])}));return!0})),f=Object.keys(e),p=Object.keys(t);return d&&f.length===p.length&&f.every((function(e){return i[e]===c[e]}))},L=(0,i.forwardRef)((function(e,t){return(0,h.jsx)(T,I(I({},e),{},{excalidrawRef:t}))})),A=a().memo(L,M);A.displayName="Excalidraw"}(),s}()}));
|