From 322fc6efa7f6a9ce0b9688643ea47654463be8c1 Mon Sep 17 00:00:00 2001 From: btopro Date: Thu, 21 Dec 2023 12:59:23 -0500 Subject: [PATCH] updated build version --- .../@google/model-viewer/dist/model-viewer.js | 2 +- .../motion/animate-controller.d.ts.map | 2 +- .../@lit-labs/motion/animate-controller.js | 2 +- .../motion/animate-controller.js.map | 2 +- .../@lit-labs/motion/animate.d.ts.map | 2 +- .../node_modules/@lit-labs/motion/animate.js | 2 +- .../@lit-labs/motion/animate.js.map | 2 +- .../@lit-labs/motion/position.d.ts.map | 2 +- .../node_modules/@lit-labs/motion/position.js | 2 +- .../@lit-labs/motion/position.js.map | 2 +- .../virtualizer/LitVirtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/LitVirtualizer.js | 6 + .../virtualizer/LitVirtualizer.js.map | 1 + .../virtualizer/ScrollerController.d.ts.map | 1 + .../virtualizer/ScrollerController.js | 6 + .../virtualizer/ScrollerController.js.map | 1 + .../virtualizer/Virtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/Virtualizer.js | 6 + .../@lit-labs/virtualizer/Virtualizer.js.map | 1 + .../@lit-labs/virtualizer/events.d.ts.map | 1 + .../@lit-labs/virtualizer/events.js | 6 + .../@lit-labs/virtualizer/events.js.map | 1 + .../virtualizer/layouts/flexWrap.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/flexWrap.js | 6 + .../virtualizer/layouts/flexWrap.js.map | 1 + .../virtualizer/layouts/flow.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/flow.js | 6 + .../@lit-labs/virtualizer/layouts/flow.js.map | 1 + .../virtualizer/layouts/grid.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/grid.js | 6 + .../@lit-labs/virtualizer/layouts/grid.js.map | 1 + .../virtualizer/layouts/masonry.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/masonry.js | 6 + .../virtualizer/layouts/masonry.js.map | 1 + .../layouts/shared/BaseLayout.d.ts.map | 1 + .../virtualizer/layouts/shared/BaseLayout.js | 6 + .../layouts/shared/BaseLayout.js.map | 1 + .../layouts/shared/GridBaseLayout.d.ts.map | 1 + .../layouts/shared/GridBaseLayout.js | 6 + .../layouts/shared/GridBaseLayout.js.map | 1 + .../layouts/shared/Layout.d.ts.map | 1 + .../virtualizer/layouts/shared/Layout.js | 6 + .../virtualizer/layouts/shared/Layout.js.map | 1 + .../layouts/shared/SizeCache.d.ts.map | 1 + .../virtualizer/layouts/shared/SizeCache.js | 6 + .../layouts/shared/SizeCache.js.map | 1 + .../shared/SizeGapPaddingBaseLayout.d.ts.map | 1 + .../shared/SizeGapPaddingBaseLayout.js | 6 + .../shared/SizeGapPaddingBaseLayout.js.map | 1 + .../virtualizer/lit-virtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/lit-virtualizer.js | 6 + .../virtualizer/lit-virtualizer.js.map | 1 + .../@lit-labs/virtualizer/virtualize.d.ts.map | 1 + .../@lit-labs/virtualizer/virtualize.js | 6 + .../@lit-labs/virtualizer/virtualize.js.map | 1 + .../@lit/reactive-element/css-tag.d.ts.map | 1 + .../@lit/reactive-element/css-tag.js | 2 +- .../@lit/reactive-element/css-tag.js.map | 1 + .../@lit/reactive-element/decorators.d.ts.map | 1 + .../@lit/reactive-element/decorators.js | 1 + .../@lit/reactive-element/decorators.js.map | 1 + .../reactive-element/decorators/base.d.ts.map | 1 + .../@lit/reactive-element/decorators/base.js | 2 +- .../reactive-element/decorators/base.js.map | 1 + .../decorators/custom-element.d.ts.map | 1 + .../decorators/custom-element.js | 2 +- .../decorators/custom-element.js.map | 1 + .../decorators/event-options.d.ts.map | 1 + .../decorators/event-options.js | 4 +- .../decorators/event-options.js.map | 1 + .../decorators/property.d.ts.map | 1 + .../reactive-element/decorators/property.js | 4 +- .../decorators/property.js.map | 1 + .../decorators/query-all.d.ts.map | 1 + .../reactive-element/decorators/query-all.js | 4 +- .../decorators/query-all.js.map | 1 + .../query-assigned-elements.d.ts.map | 1 + .../decorators/query-assigned-elements.js | 4 +- .../decorators/query-assigned-elements.js.map | 1 + .../decorators/query-assigned-nodes.d.ts.map | 1 + .../decorators/query-assigned-nodes.js | 4 +- .../decorators/query-assigned-nodes.js.map | 1 + .../decorators/query-async.d.ts.map | 1 + .../decorators/query-async.js | 4 +- .../decorators/query-async.js.map | 1 + .../decorators/query.d.ts.map | 1 + .../@lit/reactive-element/decorators/query.js | 4 +- .../reactive-element/decorators/query.js.map | 1 + .../decorators/state.d.ts.map | 1 + .../@lit/reactive-element/decorators/state.js | 4 +- .../reactive-element/decorators/state.js.map | 1 + .../polyfill-support.d.ts.map | 1 + .../@lit/reactive-element/polyfill-support.js | 7 + .../reactive-element/polyfill-support.js.map | 1 + .../reactive-controller.d.ts.map | 1 + .../reactive-element/reactive-controller.js | 0 .../reactive-controller.js.map | 1 + .../reactive-element.d.ts.map | 1 + .../@lit/reactive-element/reactive-element.js | 2 +- .../reactive-element/reactive-element.js.map | 1 + .../a11y-collapse/lib/a11y-collapse-group.js | 2 +- .../lib/a11y-gif-player.haxProperties.json | 2 +- .../a11y-media-player/a11y-media-player.js | 2 +- .../a11y-tabs/lib/a11y-tab.js | 1 + .../lib/absolute-position-state-manager.js | 2 +- .../accent-card/accent-card.js | 6 + .../@lrnwebcomponents/app-hax/app-hax.js | 2 +- .../app-hax/lib/app-hax-theme.js | 615 ++++++++++++++++++ .../rpg-character-toast.js | 94 ++- .../app-hax/lib/v1/app-hax-button.js | 2 +- .../app-hax/lib/v1/app-hax-steps.js | 63 +- .../@lrnwebcomponents/clean-one/clean-one.js | 20 +- .../@lrnwebcomponents/clean-two/clean-two.js | 17 +- .../code-editor/lib/code-pen-button.js | 2 +- .../collection-list/collection-list.js | 88 +++ .../lib/collection-item.haxProperties.json | 118 ++++ .../collection-list/lib/collection-item.js | 137 ++++ .../lib/collection-list.haxProperties.json | 92 +++ .../lib/collections-theme-banner.js | 121 ++++ .../collection-list/lib/collections-theme.js | 319 +++++++++ .../@lrnwebcomponents/count-up/count-up.js | 4 +- .../lib/block-quote.haxProperties.json | 11 +- .../course-design/lib/block-quote.js | 19 +- .../course-design/lib/learning-component.js | 25 +- .../course-design/lib/worksheet-download.js | 2 +- .../course-model/course-model.js | 2 +- .../@lrnwebcomponents/date-card/date-card.js | 4 +- .../date-card/lib/date-chip.js | 41 ++ .../discord-embed/discord-embed.js | 13 + .../lib/discord-embed.haxProperties.json | 55 ++ .../documentation-player.js | 30 + .../dynamic-import-registry.js | 2 +- .../elmsln-studio/elmsln-studio.js | 2 +- .../file-system-broker/file-system-broker.js | 2 +- .../lib/xlsx/dist/shim.min.js | 2 +- .../lib/xlsx/dist/xlsx.extendscript.js | 2 +- .../full-width-image/full-width-image.js | 2 +- .../future-terminal-text.js | 5 +- .../lib/FutureTerminalTextSuper.js | 2 +- .../lib/future-terminal-text-lite.js | 15 +- .../grid-plate/grid-plate.js | 14 +- .../@lrnwebcomponents/h-a-x/h-a-x.js | 2 +- .../h5p-element/lib/h5p/js/jquery.js | 2 +- .../hax-body-behaviors/lib/HAXWiring.js | 2 +- .../@lrnwebcomponents/hax-body/hax-body.js | 21 +- .../hax-body/lib/hax-autoloader.js | 2 +- .../hax-body/lib/hax-gizmo-browser.js | 9 +- .../hax-body/lib/hax-plate-context.js | 3 +- .../hax-body/lib/hax-store.js | 4 +- .../hax-body/lib/hax-text-editor-toolbar.js | 6 +- .../hax-body/lib/hax-tray-upload.js | 2 +- .../hax-body/lib/hax-tray.js | 20 +- .../hax-body/lib/hax-ui-styles.js | 5 +- .../hax-body/lib/hax-upload-field.js | 4 +- .../hax-body/lib/hax-view-source.js | 72 +- .../hax-iconset/lib/hax-iconset-manifest.js | 2 +- .../lib/svgs/courseicons/astro1.svg | 11 +- .../lib/svgs/courseicons/astro11.svg | 10 + .../lib/svgs/courseicons/astro120.svg | 8 + .../lib/svgs/courseicons/astro130.svg | 1 + .../lib/svgs/courseicons/astro140.svg | 33 + .../lib/svgs/courseicons/biol11.svg | 6 + .../lib/svgs/courseicons/biol110.svg | 11 + .../lib/svgs/courseicons/biol120n.svg | 5 + .../lib/svgs/courseicons/biol133.svg | 17 + .../lib/svgs/courseicons/biol141.svg | 70 ++ .../lib/svgs/courseicons/biol155.svg | 13 + .../lib/svgs/courseicons/biol177.svg | 7 + .../lib/svgs/courseicons/bisci001.svg | 9 + .../lib/svgs/courseicons/bisci002.svg | 13 + .../lib/svgs/courseicons/bisci003.svg | 163 +++++ .../lib/svgs/courseicons/bisci004.svg | 6 + .../lib/svgs/courseicons/bmmb551.svg | 14 + .../lib/svgs/courseicons/bmmb852.svg | 5 + .../lib/svgs/courseicons/chem005.svg | 12 + .../lib/svgs/courseicons/chem101.svg | 8 + .../lib/svgs/courseicons/chem110.svg | 8 + .../lib/svgs/courseicons/frnsc100.svg | 11 + .../lib/svgs/courseicons/frnsc200.svg | 19 + .../lib/svgs/courseicons/frnsc210.svg | 6 + .../lib/svgs/courseicons/math021.svg | 10 + .../lib/svgs/courseicons/math022.svg | 16 + .../lib/svgs/courseicons/math034.svg | 6 + .../lib/svgs/courseicons/math036.svg | 8 + .../lib/svgs/courseicons/math110.svg | 8 + .../lib/svgs/courseicons/math140.svg | 3 + .../lib/svgs/courseicons/math220.svg | 3 + .../lib/svgs/courseicons/math436.svg | 5 + .../lib/svgs/courseicons/phys010.svg | 8 + .../lib/svgs/hax/accessibility.svg | 5 + .../hax-iconset/lib/svgs/hax/apps.svg | 3 + .../hax-iconset/lib/svgs/hax/assess.svg | 5 + .../hax-iconset/lib/svgs/hax/camera.svg | 5 + .../hax-iconset/lib/svgs/hax/collaborate.svg | 5 + .../hax-iconset/lib/svgs/hax/computer.svg | 5 + .../hax-iconset/lib/svgs/hax/computer2.svg | 3 + .../hax-iconset/lib/svgs/hax/consult.svg | 5 + .../hax-iconset/lib/svgs/hax/container.svg | 5 + .../hax-iconset/lib/svgs/hax/documents.svg | 3 + .../hax-iconset/lib/svgs/hax/email.svg | 8 + .../hax-iconset/lib/svgs/hax/engage.svg | 5 + .../hax-iconset/lib/svgs/hax/engage2.svg | 3 + .../hax-iconset/lib/svgs/hax/examity.svg | 44 ++ .../hax-iconset/lib/svgs/hax/flikr.svg | 16 + .../hax-iconset/lib/svgs/hax/gears.svg | 5 + .../hax-iconset/lib/svgs/hax/globe.svg | 5 + .../hax-iconset/lib/svgs/hax/graph.svg | 3 + .../hax-iconset/lib/svgs/hax/idea.svg | 3 + .../hax-iconset/lib/svgs/hax/image.svg | 5 + .../hax-iconset/lib/svgs/hax/monitor.svg | 3 + .../hax-iconset/lib/svgs/hax/motivate.svg | 5 + .../hax-iconset/lib/svgs/hax/ngdle.svg | 5 + .../hax-iconset/lib/svgs/hax/oer.svg | 5 + .../hax-iconset/lib/svgs/hax/phone.svg | 3 + .../hax-iconset/lib/svgs/hax/podcast.svg | 5 + .../hax-iconset/lib/svgs/hax/quick.svg | 3 + .../hax-iconset/lib/svgs/hax/reportcard.svg | 3 + .../hax-iconset/lib/svgs/hax/reuse.svg | 3 + .../hax-iconset/lib/svgs/hax/scroll.svg | 4 + .../hax-iconset/lib/svgs/hax/time.svg | 3 + .../hax-iconset/lib/svgs/hax/video.svg | 5 + .../hax-iconset/lib/svgs/hax/vimeo.svg | 14 + .../hax-iconset/lib/svgs/hax/vr.svg | 5 + .../hax-iconset/lib/svgs/hax/wand.svg | 1 + .../lib/core/HAXCMSLitElementTheme.js | 74 +-- .../lib/core/HAXCMSThemeWiring.js | 2 +- .../lib/core/haxcms-editor-builder.js | 2 +- .../lib/core/haxcms-site-builder.js | 4 +- .../lib/core/haxcms-site-dashboard.js | 9 +- .../lib/core/haxcms-site-editor-ui.js | 113 ++-- .../lib/core/haxcms-site-editor.js | 4 +- .../lib/core/haxcms-site-router.js | 2 +- .../lib/core/haxcms-site-store.js | 2 +- .../lib/core/micros/haxcms-button-add.js | 2 +- .../lib/core/site-list/haxcms-site-listing.js | 2 +- .../lib/core/ui/haxcms-page-get-started.js | 87 +++ .../lib/core/utils/EmailPageMixin.js | 24 + .../lib/core/utils/HAXCMSI18NMixin.js | 2 +- .../lib/core/utils/HAXCMSRememberRoute.js | 2 +- .../lib/core/utils/QRCodeMixin.js | 4 +- .../lib/development/haxcms-dev-theme.js | 1 - .../active-item/site-active-tags.js | 20 +- .../active-item/site-git-corner.js | 2 +- .../blocks/site-children-block.js | 60 +- .../lib/ui-components/layout/site-region.js | 1 + .../site-collection-list.haxProperties.json | 165 +++++ .../magic/site-collection-list.js | 27 + .../lib/ui-components/magic/site-view.js | 24 +- .../navigation/site-menu-button.js | 6 +- .../navigation/site-menu-content.js | 5 +- .../ui-components/navigation/site-top-menu.js | 122 +++- .../lib/ui-components/query/site-query.js | 2 +- .../ui-components/routes/site-views-route.js | 2 +- .../ui-components/site/site-print-button.js | 2 +- .../ui-components/site/site-remote-content.js | 2 +- .../lib/ui-components/site/site-rss-button.js | 6 +- .../lib/ui-components/site/site-search.js | 2 +- .../lib/ui-components/site/site-title.js | 19 +- .../haxcms-elements/package.json | 116 ++-- .../haxor-slevin/haxor-slevin.js | 312 +++++---- .../iframe-loader/iframe-loader.js | 2 +- .../map-menu/lib/map-menu-builder.js | 4 +- .../map-menu/lib/map-menu-header.js | 5 +- .../map-menu/lib/map-menu-item.js | 7 +- .../map-menu/lib/map-menu-submenu.js | 8 +- .../lib/microServices.js | 2 +- .../multiple-choice/multiple-choice.js | 10 +- .../@lrnwebcomponents/opt-img/opt-img.js | 2 +- .../lib/page-break.haxProperties.json | 64 +- .../page-break/page-break.js | 6 +- .../lib/page-section.haxProperties.json | 95 +++ .../page-section/page-section.js | 144 ++++ .../play-list/lib/SLStyleManager.js | 2 +- .../@lrnwebcomponents/play-list/lib/dark.css | 471 ++++++++++++++ .../@lrnwebcomponents/play-list/lib/light.css | 472 ++++++++++++++ .../lib/play-list.haxProperties.json | 8 +- .../@lrnwebcomponents/play-list/play-list.js | 45 +- .../polaris-theme/lib/polaris-cta.js | 99 +++ .../polaris-theme/lib/polaris-mark.js | 124 ++++ .../polaris-theme/lib/polaris-story-card.js | 60 ++ .../polaris-theme/lib/polaris-tile.js | 123 ++++ .../polaris-theme/polaris-theme.js | 446 +++++++++++++ .../@lrnwebcomponents/post-card/post-card.js | 2 +- .../product-card/lib/course-card.js | 2 +- .../product-card/lib/product-banner.js | 10 +- .../replace-tag/replace-tag.js | 2 +- .../lib/buttons/rich-text-editor-button.js | 1 + .../lib/buttons/rich-text-editor-link.js | 2 +- .../rich-text-editor-range-behaviors.js | 2 +- .../scroll-button/scroll-button.js | 2 +- .../simple-blog-card/simple-blog-card.js | 54 +- .../simple-cta/simple-cta.js | 78 ++- .../lib/simple-fields-array-item.js | 50 +- .../simple-fields/lib/simple-fields-array.js | 5 +- .../simple-fields/lib/simple-fields-combo.js | 3 +- .../lib/simple-fields-container.js | 2 +- .../simple-fields/lib/simple-fields-field.js | 11 +- .../simple-fields/lib/simple-fields-lite.js | 2 +- .../simple-fields/lib/simple-fields-upload.js | 4 +- .../simple-icon-picker/simple-icon-picker.js | 5 +- .../lib/simple-icon.haxProperties.json | 3 +- .../simple-login/lib/simple-camera-snap.js | 2 +- .../simple-login/lib/simple-login-camera.js | 2 +- .../simple-picker/lib/simple-emoji-picker.js | 11 +- .../simple-picker/lib/simple-symbol-picker.js | 7 +- .../simple-picker/simple-picker.js | 26 +- .../lib/simple-toolbar-button.js | 2 +- .../lib/simple-toolbar-more-button.js | 2 +- .../simple-toolbar/simple-toolbar.js | 2 +- .../social-share-link/social-share-link.js | 24 +- .../super-daemon/lib/super-daemon-row.js | 34 +- .../super-daemon/lib/super-daemon-search.js | 197 ++++++ .../super-daemon/lib/super-daemon-toast.js | 51 +- .../super-daemon/lib/super-daemon-ui.js | 272 +++----- .../super-daemon/super-daemon.js | 41 +- .../training-theme/lib/training-button.js | 95 +++ .../training-theme/lib/training-top.js | 78 +++ .../training-theme/training-theme.js | 274 ++++++++ .../twitter-embed/twitter-embed.js | 2 +- .../user-action/user-action.js | 2 +- .../user-scaffold/user-scaffold.js | 5 + .../utils/lib/activeStateBehavior.js | 2 +- .../utils/lib/remoteLinkBehavior.js | 2 +- .../@lrnwebcomponents/utils/utils.js | 2 +- .../video-player/video-player.js | 2 +- .../@shoelace-style/localize/dist/index.js | 2 +- .../{chunk.A4EV4GKC.js => chunk.25E2J7HG.js} | 4 +- .../{chunk.L4EUGKFG.js => chunk.2B7ZRWV6.js} | 2 +- .../shoelace/dist/chunks/chunk.2BBYS2AO.js | 1 - .../shoelace/dist/chunks/chunk.2KNNLHT6.js | 1 - .../shoelace/dist/chunks/chunk.2NHP677Q.js | 1 - .../shoelace/dist/chunks/chunk.2OFNWZUO.js | 1 - .../{chunk.CB4P5CRU.js => chunk.2Q6UBMUG.js} | 2 +- .../shoelace/dist/chunks/chunk.2UWHTLTB.js | 1 + .../shoelace/dist/chunks/chunk.2XWK25GF.js | 1 + .../shoelace/dist/chunks/chunk.35QQGKS6.js | 1 - .../shoelace/dist/chunks/chunk.3ALMDSO3.js | 1 - .../{chunk.CRA7IQJI.js => chunk.3BZZHSGR.js} | 4 +- .../shoelace/dist/chunks/chunk.3CX5T7GV.js | 1 - .../shoelace/dist/chunks/chunk.3MCR2MLV.js | 2 +- .../shoelace/dist/chunks/chunk.3P2DZVT6.js | 1 - .../shoelace/dist/chunks/chunk.3RXVXJ7N.js | 1 + .../shoelace/dist/chunks/chunk.3TUFDOAI.js | 1 + .../{chunk.QSGNZ7NT.js => chunk.3WAW4E2K.js} | 2 +- .../shoelace/dist/chunks/chunk.3YMXKNHC.js | 1 - .../shoelace/dist/chunks/chunk.4C46DIIN.js | 8 + .../shoelace/dist/chunks/chunk.4EF2BVHR.js | 2 +- .../shoelace/dist/chunks/chunk.4FS6RVQD.js | 1 - .../{chunk.BZCHZMPK.js => chunk.4K5O6KJW.js} | 2 +- .../{chunk.RAU7GTRD.js => chunk.4O6DKE6L.js} | 4 +- .../shoelace/dist/chunks/chunk.4SHVD2KD.js | 1 + .../shoelace/dist/chunks/chunk.4XQCFFMS.js | 1 + .../shoelace/dist/chunks/chunk.4ZAOOFNS.js | 1 + .../shoelace/dist/chunks/chunk.5CIGH6UI.js | 1 - .../shoelace/dist/chunks/chunk.5DFMJ727.js | 1 + .../shoelace/dist/chunks/chunk.5E2TGPJ7.js | 1 - .../shoelace/dist/chunks/chunk.5F6CPPXO.js | 1 - .../shoelace/dist/chunks/chunk.5FCCRNG7.js | 1 + .../shoelace/dist/chunks/chunk.5GIPFTSS.js | 13 + .../shoelace/dist/chunks/chunk.5HRUL7SO.js | 20 - .../shoelace/dist/chunks/chunk.5NBMQ7EG.js | 13 - .../shoelace/dist/chunks/chunk.5SZQCM5C.js | 2 +- .../shoelace/dist/chunks/chunk.5VCP5UVV.js | 2 +- .../shoelace/dist/chunks/chunk.5WDU5R6O.js | 1 + .../shoelace/dist/chunks/chunk.5ZUXEXMC.js | 1 - .../shoelace/dist/chunks/chunk.62Q7SWNI.js | 1 + .../shoelace/dist/chunks/chunk.66XNORJX.js | 1 + .../shoelace/dist/chunks/chunk.67AISYA7.js | 1 - .../shoelace/dist/chunks/chunk.6CDLFZKN.js | 1 - .../shoelace/dist/chunks/chunk.6JGF6LBR.js | 1 + .../shoelace/dist/chunks/chunk.6M63UXML.js | 1 + .../shoelace/dist/chunks/chunk.6MZVKFZA.js | 2 +- .../{chunk.BV3WOJKI.js => chunk.6O2NRLBS.js} | 2 +- .../shoelace/dist/chunks/chunk.6Q3FCZAW.js | 1 - .../shoelace/dist/chunks/chunk.6RQLINWQ.js | 2 +- .../shoelace/dist/chunks/chunk.73ZNTPJA.js | 1 + .../shoelace/dist/chunks/chunk.7EJIBXTA.js | 1 + .../shoelace/dist/chunks/chunk.7IL5PZUP.js | 1 + .../shoelace/dist/chunks/chunk.7JPBV455.js | 1 + .../shoelace/dist/chunks/chunk.7RHUXUVD.js | 1 - .../shoelace/dist/chunks/chunk.7RZIFKWO.js | 1 - .../shoelace/dist/chunks/chunk.7WBAK746.js | 1 - .../shoelace/dist/chunks/chunk.7XPK5EMC.js | 2 +- .../shoelace/dist/chunks/chunk.AI4KLJFS.js | 1 - .../{chunk.5UPJYW7M.js => chunk.AKA25VYF.js} | 2 +- .../shoelace/dist/chunks/chunk.ANTU6G35.js | 1 + .../shoelace/dist/chunks/chunk.BAD6C56T.js | 1 - .../shoelace/dist/chunks/chunk.BDDLQS6W.js | 1 - .../shoelace/dist/chunks/chunk.BGV6NJUJ.js | 1 + .../shoelace/dist/chunks/chunk.BT7SAYED.js | 1 - .../shoelace/dist/chunks/chunk.BUMKX4R7.js | 1 - .../shoelace/dist/chunks/chunk.BVRD5G5W.js | 1 + .../shoelace/dist/chunks/chunk.BYQQMUHG.js | 1 - .../{chunk.CJDR7567.js => chunk.C7FWPEOY.js} | 2 +- .../shoelace/dist/chunks/chunk.CEU4JDVC.js | 1 - .../shoelace/dist/chunks/chunk.CHUGVITZ.js | 1 + .../shoelace/dist/chunks/chunk.CI55NCYE.js | 1 + .../shoelace/dist/chunks/chunk.CJHUIM54.js | 2 +- .../{chunk.XYSY2YZG.js => chunk.CJQ7EQHG.js} | 2 +- .../shoelace/dist/chunks/chunk.CPX2UCQ4.js | 2 +- .../{chunk.G3SPB25T.js => chunk.CROELWR3.js} | 2 +- .../{chunk.4P2RHPJ7.js => chunk.CTNDET4S.js} | 2 +- .../shoelace/dist/chunks/chunk.CTT4DASP.js | 1 - .../{chunk.AMHT72HT.js => chunk.CWLYIQXA.js} | 2 +- .../shoelace/dist/chunks/chunk.CXGTBNQE.js | 1 + .../shoelace/dist/chunks/chunk.D7CPEJLD.js | 1 + .../shoelace/dist/chunks/chunk.DEQSCERF.js | 1 + .../shoelace/dist/chunks/chunk.DFIUKINQ.js | 1 + .../shoelace/dist/chunks/chunk.DHO3GHQI.js | 1 - .../shoelace/dist/chunks/chunk.DIRIFXCD.js | 1 - .../shoelace/dist/chunks/chunk.DK3WZXBM.js | 1 + .../shoelace/dist/chunks/chunk.DMEYE672.js | 1 + .../shoelace/dist/chunks/chunk.DMMWHXUG.js | 2 +- .../shoelace/dist/chunks/chunk.DRGLPI2A.js | 1 + .../shoelace/dist/chunks/chunk.DRJODFCK.js | 1 - .../shoelace/dist/chunks/chunk.DT3OOL5X.js | 1 - .../{chunk.HNH4USWO.js => chunk.DTS7GKZE.js} | 6 +- .../shoelace/dist/chunks/chunk.DWRCQAX7.js | 1 - .../shoelace/dist/chunks/chunk.DZ6MZKZJ.js | 1 + .../shoelace/dist/chunks/chunk.E2FTXJG3.js | 1 + .../shoelace/dist/chunks/chunk.E2JGAFR4.js | 1 - .../shoelace/dist/chunks/chunk.E2UVQKJF.js | 1 + .../shoelace/dist/chunks/chunk.EJ24F4FA.js | 2 +- .../{chunk.7ZCMJKGF.js => chunk.EMSHC2UY.js} | 2 +- .../shoelace/dist/chunks/chunk.EPB7DJXC.js | 1 - .../shoelace/dist/chunks/chunk.EQP3JFQP.js | 1 - .../shoelace/dist/chunks/chunk.EUKH7EAE.js | 2 +- .../shoelace/dist/chunks/chunk.EV3UDTBM.js | 1 + .../{chunk.7B5CCNHM.js => chunk.EXFTDGGG.js} | 2 +- .../shoelace/dist/chunks/chunk.F264RLPY.js | 1 + .../shoelace/dist/chunks/chunk.F326FFZY.js | 1 + .../shoelace/dist/chunks/chunk.F4LOVXDH.js | 1 + .../shoelace/dist/chunks/chunk.F5BGAPMF.js | 1 - .../shoelace/dist/chunks/chunk.F62XCO4D.js | 1 - .../shoelace/dist/chunks/chunk.FBNMNT3O.js | 1 + .../shoelace/dist/chunks/chunk.FFXRPXNL.js | 1 + .../{chunk.6IPOEJS3.js => chunk.FKPAMLVJ.js} | 18 +- .../shoelace/dist/chunks/chunk.FMRCD3VN.js | 1 - .../shoelace/dist/chunks/chunk.FQI2ZI2B.js | 1 + .../shoelace/dist/chunks/chunk.FQWN2XRJ.js | 1 + .../shoelace/dist/chunks/chunk.FUOM65BJ.js | 1 + .../shoelace/dist/chunks/chunk.FVEJRUOQ.js | 4 + .../shoelace/dist/chunks/chunk.G36MCQ7Z.js | 1 + .../shoelace/dist/chunks/chunk.G7UWKMCZ.js | 1 - .../shoelace/dist/chunks/chunk.GCN3DWSD.js | 1 - .../shoelace/dist/chunks/chunk.GF4UCFQ6.js | 1 - .../{chunk.SH6R2Z4A.js => chunk.GGORWW4N.js} | 2 +- .../shoelace/dist/chunks/chunk.GLGPZRLI.js | 1 + .../shoelace/dist/chunks/chunk.GNZIWPAU.js | 1 + .../shoelace/dist/chunks/chunk.GTFBBFI7.js | 8 - .../shoelace/dist/chunks/chunk.GTUXXKTG.js | 140 ---- .../shoelace/dist/chunks/chunk.GU7HQTHB.js | 1 - .../{chunk.FWRCRSIY.js => chunk.GUHZHNQS.js} | 2 +- .../shoelace/dist/chunks/chunk.GZ6BQYUU.js | 1 - .../shoelace/dist/chunks/chunk.GZKNJ77J.js | 2 +- .../{chunk.5Y4WECUT.js => chunk.H5PEWPG7.js} | 2 +- .../shoelace/dist/chunks/chunk.H7UDITUS.js | 4 +- .../shoelace/dist/chunks/chunk.HAP3IRC3.js | 1 + .../{chunk.SUMTNFRX.js => chunk.HM6R5Q44.js} | 2 +- .../shoelace/dist/chunks/chunk.HNLZQAGV.js | 1 - .../shoelace/dist/chunks/chunk.HQLHYAFA.js | 1 - .../shoelace/dist/chunks/chunk.HWUDMSYQ.js | 1 - .../shoelace/dist/chunks/chunk.I33L3NO6.js | 1 - .../shoelace/dist/chunks/chunk.I64IM243.js | 1 - .../shoelace/dist/chunks/chunk.I75I4KHI.js | 1 + .../shoelace/dist/chunks/chunk.I7AKVNN5.js | 1 - .../shoelace/dist/chunks/chunk.I7QNFR2M.js | 1 + .../shoelace/dist/chunks/chunk.IC3AQISN.js | 1 - .../shoelace/dist/chunks/chunk.ICXWI24A.js | 2 +- .../shoelace/dist/chunks/chunk.IIEUIBXQ.js | 1 - .../{chunk.WYWPK2VJ.js => chunk.IMNVXT6L.js} | 4 +- .../shoelace/dist/chunks/chunk.IUTAY6HX.js | 1 + .../{chunk.DV34JM5Y.js => chunk.IUVZRJJ3.js} | 2 +- .../shoelace/dist/chunks/chunk.J2HL7VHU.js | 1 - .../shoelace/dist/chunks/chunk.J4C6T45U.js | 1 + .../shoelace/dist/chunks/chunk.JAUPDQ7J.js | 2 +- .../shoelace/dist/chunks/chunk.JDJXAUM3.js | 1 + .../shoelace/dist/chunks/chunk.JFDG2DPA.js | 33 + .../shoelace/dist/chunks/chunk.JFX2C4R6.js | 1 + .../shoelace/dist/chunks/chunk.JJKKOZIV.js | 1 - .../shoelace/dist/chunks/chunk.JK44LDXB.js | 1 + .../{chunk.I5XYF2B3.js => chunk.JPV2F5NK.js} | 2 +- .../shoelace/dist/chunks/chunk.JTRTWFGW.js | 1 + .../shoelace/dist/chunks/chunk.JVPLRINV.js | 1 + .../shoelace/dist/chunks/chunk.K3EEJPQB.js | 2 +- .../shoelace/dist/chunks/chunk.K7UOELBZ.js | 1 + .../shoelace/dist/chunks/chunk.KCCRPUDF.js | 1 - .../shoelace/dist/chunks/chunk.KE4SI4YI.js | 1 - .../shoelace/dist/chunks/chunk.KNEPZGUA.js | 1 - .../shoelace/dist/chunks/chunk.KO2K2UNP.js | 1 + .../shoelace/dist/chunks/chunk.KQOUQHGE.js | 1 - .../shoelace/dist/chunks/chunk.KQVX545F.js | 1 - .../shoelace/dist/chunks/chunk.KR5BRAPI.js | 1 + .../shoelace/dist/chunks/chunk.KUF2NWBY.js | 1 - .../shoelace/dist/chunks/chunk.KVFV54OE.js | 2 +- .../shoelace/dist/chunks/chunk.KWXUPNTP.js | 1 + .../shoelace/dist/chunks/chunk.L3RLRN6Q.js | 1 + .../shoelace/dist/chunks/chunk.L3X5HQXV.js | 1 + .../shoelace/dist/chunks/chunk.L6B3WVUK.js | 1 - .../shoelace/dist/chunks/chunk.LG5WBL7M.js | 1 + .../shoelace/dist/chunks/chunk.LIXEQBT2.js | 1 + .../shoelace/dist/chunks/chunk.LJWCUBTW.js | 1 - .../shoelace/dist/chunks/chunk.LOVM4XL6.js | 2 +- .../shoelace/dist/chunks/chunk.LSWJYBJ7.js | 1 - .../shoelace/dist/chunks/chunk.LV6ZUIVI.js | 1 + .../shoelace/dist/chunks/chunk.LW4RYI2U.js | 1 - .../shoelace/dist/chunks/chunk.LXZGNEQQ.js | 1 + .../{chunk.M34G3YZA.js => chunk.M4HIRIJ5.js} | 4 +- .../shoelace/dist/chunks/chunk.M5MUC5CV.js | 2 +- .../shoelace/dist/chunks/chunk.MAS2SHYD.js | 1 + .../{chunk.POBNWM3I.js => chunk.MEXR4WYO.js} | 2 +- .../shoelace/dist/chunks/chunk.MGBTHMSL.js | 1 + .../shoelace/dist/chunks/chunk.MHVQZ7PS.js | 1 + .../shoelace/dist/chunks/chunk.MJRV6PHA.js | 1 + .../shoelace/dist/chunks/chunk.MLHBT46Z.js | 1 - .../shoelace/dist/chunks/chunk.MMIMZ23M.js | 1 - .../{chunk.EKHVZV23.js => chunk.MOTA2733.js} | 2 +- .../shoelace/dist/chunks/chunk.MPLFBEHE.js | 1 - .../shoelace/dist/chunks/chunk.MQHRZPPC.js | 2 +- .../shoelace/dist/chunks/chunk.MUPHLGOG.js | 1 - .../shoelace/dist/chunks/chunk.MWGWYI72.js | 1 + .../shoelace/dist/chunks/chunk.MXOAYAV3.js | 1 + .../shoelace/dist/chunks/chunk.NB2K6DNX.js | 1 - .../shoelace/dist/chunks/chunk.NGU6VN5C.js | 1 + .../shoelace/dist/chunks/chunk.NKNX6N77.js | 1 - .../shoelace/dist/chunks/chunk.NM27SBSV.js | 1 - .../shoelace/dist/chunks/chunk.NMJWOOZI.js | 25 + .../shoelace/dist/chunks/chunk.NNTNP4JH.js | 1 + .../{chunk.3CZS6ECK.js => chunk.NS3JH2ZN.js} | 2 +- .../shoelace/dist/chunks/chunk.NU54PZXL.js | 1 - .../shoelace/dist/chunks/chunk.O2JTN4AG.js | 1 + .../shoelace/dist/chunks/chunk.O4XSHJO2.js | 1 + .../shoelace/dist/chunks/chunk.O7QHERLE.js | 1 - .../shoelace/dist/chunks/chunk.OF6LVDZA.js | 1 - .../shoelace/dist/chunks/chunk.OMEFMDGX.js | 1 - .../shoelace/dist/chunks/chunk.OR2DLSUW.js | 1 + .../shoelace/dist/chunks/chunk.OY3QOKPY.js | 1 + .../{chunk.O4O6U4WJ.js => chunk.OYTYGR6R.js} | 2 +- .../shoelace/dist/chunks/chunk.OZYMGIJN.js | 1 + .../shoelace/dist/chunks/chunk.P3YSBVGI.js | 1 + .../shoelace/dist/chunks/chunk.P57G7BFL.js | 1 - .../shoelace/dist/chunks/chunk.PACZBQ7E.js | 1 + .../shoelace/dist/chunks/chunk.PE55NVFX.js | 1 - .../shoelace/dist/chunks/chunk.PH5IIYTE.js | 46 ++ .../shoelace/dist/chunks/chunk.PQM25SYA.js | 1 + .../{chunk.CYAWIBIC.js => chunk.Q6NWQWT3.js} | 2 +- .../shoelace/dist/chunks/chunk.QC67S7H5.js | 1 - .../shoelace/dist/chunks/chunk.QEVRAUGO.js | 1 - .../shoelace/dist/chunks/chunk.QQMN2P7K.js | 1 - .../shoelace/dist/chunks/chunk.QVUQ4TNC.js | 1 + .../{chunk.7BDKFUSY.js => chunk.QVVZOPAP.js} | 2 +- .../shoelace/dist/chunks/chunk.QWQMLSZY.js | 1 - .../shoelace/dist/chunks/chunk.QYDOKUM2.js | 1 + .../shoelace/dist/chunks/chunk.QZGTDMAZ.js | 1 - .../shoelace/dist/chunks/chunk.RBK2HKBZ.js | 1 + .../shoelace/dist/chunks/chunk.RNVKO5WM.js | 1 - .../shoelace/dist/chunks/chunk.RPUCV7HD.js | 1 + .../shoelace/dist/chunks/chunk.RSOSMS27.js | 1 - .../shoelace/dist/chunks/chunk.RU5ZFFFK.js | 1 + .../shoelace/dist/chunks/chunk.RXGCMXU4.js | 1 + .../shoelace/dist/chunks/chunk.RYPV34FN.js | 4 +- .../shoelace/dist/chunks/chunk.RYQQMTBS.js | 1 + .../{chunk.ZXVOFUQB.js => chunk.S4FBEA3Q.js} | 2 +- .../shoelace/dist/chunks/chunk.SEMCHBH4.js | 1 + .../shoelace/dist/chunks/chunk.SJA4DLBN.js | 1 - .../shoelace/dist/chunks/chunk.SMHG5MDN.js | 1 - .../shoelace/dist/chunks/chunk.SOFC3U3P.js | 1 - .../shoelace/dist/chunks/chunk.SPD5VU32.js | 8 +- .../shoelace/dist/chunks/chunk.SQ2NEPDW.js | 138 ++++ .../shoelace/dist/chunks/chunk.STFL2MFH.js | 1 - .../shoelace/dist/chunks/chunk.STNTUUNE.js | 1 + .../{chunk.LBC6JESY.js => chunk.STXFIMXZ.js} | 2 +- .../{chunk.KFR4Y7YR.js => chunk.SYZQFYHQ.js} | 2 +- .../shoelace/dist/chunks/chunk.SZS4IGBQ.js | 1 + .../{chunk.RXMELJZK.js => chunk.T26SSYRZ.js} | 2 +- .../shoelace/dist/chunks/chunk.T47IEDLN.js | 1 + .../shoelace/dist/chunks/chunk.T533KWVR.js | 1 + .../{chunk.5453BD52.js => chunk.T7LQNDC5.js} | 2 +- .../shoelace/dist/chunks/chunk.TA3B27V5.js | 1 + .../shoelace/dist/chunks/chunk.TD6B6IEL.js | 1 - .../shoelace/dist/chunks/chunk.TECP6JR2.js | 1 - .../shoelace/dist/chunks/chunk.THE5DOSH.js | 1 + .../shoelace/dist/chunks/chunk.TI56FHYX.js | 1 - .../shoelace/dist/chunks/chunk.TICGP7UW.js | 1 - .../{chunk.P5B6GUIV.js => chunk.TKQMYZOR.js} | 4 +- .../shoelace/dist/chunks/chunk.TLNU5YYZ.js | 1 - .../shoelace/dist/chunks/chunk.TLPGLTWN.js | 1 - .../shoelace/dist/chunks/chunk.TNCUFN5S.js | 13 + .../shoelace/dist/chunks/chunk.TOWVCX7O.js | 1 + .../shoelace/dist/chunks/chunk.TTMUWVWX.js | 1 + .../shoelace/dist/chunks/chunk.UCFEWFGG.js | 1 - .../shoelace/dist/chunks/chunk.UIWRDYII.js | 1 - .../shoelace/dist/chunks/chunk.UYJHNFGC.js | 1 + .../shoelace/dist/chunks/chunk.V2WC33GK.js | 1 - .../{chunk.W5P4KEEZ.js => chunk.V6KLYQCK.js} | 2 +- .../shoelace/dist/chunks/chunk.V77XD4UK.js | 1 + .../shoelace/dist/chunks/chunk.VDJ55VAV.js | 1 - .../shoelace/dist/chunks/chunk.VLPFGZU5.js | 1 - .../shoelace/dist/chunks/chunk.VPK2OSP4.js | 1 - .../{chunk.I3355KHS.js => chunk.VQAWWVRR.js} | 2 +- .../shoelace/dist/chunks/chunk.VRTJZYIC.js | 1 + .../shoelace/dist/chunks/chunk.VSSSMZFO.js | 1 + .../{chunk.YTKNJGSR.js => chunk.VTZVPCX4.js} | 2 +- .../shoelace/dist/chunks/chunk.VYC5B2AV.js | 1 + .../shoelace/dist/chunks/chunk.W4GZBNUN.js | 1 + .../{chunk.CEMITGOC.js => chunk.W5IOVX7A.js} | 2 +- .../shoelace/dist/chunks/chunk.WCP5CXI3.js | 1 + .../shoelace/dist/chunks/chunk.WEONPICB.js | 1 - .../shoelace/dist/chunks/chunk.WFZAUYTE.js | 1 + .../shoelace/dist/chunks/chunk.WLYACN3J.js | 1 - .../shoelace/dist/chunks/chunk.WSMO4YXA.js | 1 + .../shoelace/dist/chunks/chunk.WTYX4MI2.js | 1 - .../{chunk.23QSDHN7.js => chunk.WVF75JAX.js} | 2 +- .../shoelace/dist/chunks/chunk.WWTGXLZQ.js | 1 - .../shoelace/dist/chunks/chunk.X26O7UU2.js | 1 + .../shoelace/dist/chunks/chunk.X2QBSGH3.js | 1 - .../shoelace/dist/chunks/chunk.X5IGYTXC.js | 1 + .../shoelace/dist/chunks/chunk.XIUOIGOM.js | 1 + .../shoelace/dist/chunks/chunk.XLE25PEK.js | 1 + .../shoelace/dist/chunks/chunk.XMELOCBP.js | 1 + .../shoelace/dist/chunks/chunk.XTIYYQUD.js | 1 - .../shoelace/dist/chunks/chunk.Y4EMDR5Y.js | 1 - .../shoelace/dist/chunks/chunk.YAROS6UF.js | 2 +- .../shoelace/dist/chunks/chunk.YF47ODZL.js | 1 + .../shoelace/dist/chunks/chunk.YFIYHUIW.js | 1 - .../shoelace/dist/chunks/chunk.YFMRETPM.js | 1 - .../shoelace/dist/chunks/chunk.YIKPEXTH.js | 1 + .../shoelace/dist/chunks/chunk.YIQBNSY5.js | 1 - .../shoelace/dist/chunks/chunk.Z543R5TZ.js | 1 + .../shoelace/dist/chunks/chunk.Z5KRCOTW.js | 1 - .../shoelace/dist/chunks/chunk.Z75AU3J4.js | 1 - .../{chunk.7UUIUZXI.js => chunk.Z7XDKKOD.js} | 2 +- .../shoelace/dist/chunks/chunk.ZKCAPA5S.js | 1 + .../shoelace/dist/chunks/chunk.ZQG4CH57.js | 1 - .../shoelace/dist/chunks/chunk.ZTTMOB7X.js | 1 + .../shoelace/dist/chunks/chunk.ZX6DT5AE.js | 1 - .../shoelace/dist/chunks/chunk.ZXHMIE27.js | 1 + .../dist/components/alert/alert.component.js | 2 +- .../shoelace/dist/components/alert/alert.js | 2 +- .../dist/components/alert/alert.styles.js | 2 +- .../animated-image.component.js | 2 +- .../animated-image/animated-image.js | 2 +- .../animated-image/animated-image.styles.js | 2 +- .../animation/animation.component.js | 2 +- .../dist/components/animation/animation.js | 2 +- .../components/animation/animation.styles.js | 2 +- .../dist/components/animation/animations.js | 2 +- .../components/avatar/avatar.component.js | 2 +- .../shoelace/dist/components/avatar/avatar.js | 2 +- .../dist/components/avatar/avatar.styles.js | 2 +- .../dist/components/badge/badge.component.js | 2 +- .../shoelace/dist/components/badge/badge.js | 2 +- .../dist/components/badge/badge.styles.js | 2 +- .../breadcrumb-item.component.js | 2 +- .../breadcrumb-item/breadcrumb-item.js | 2 +- .../breadcrumb-item/breadcrumb-item.styles.js | 2 +- .../breadcrumb/breadcrumb.component.js | 2 +- .../dist/components/breadcrumb/breadcrumb.js | 2 +- .../breadcrumb/breadcrumb.styles.js | 2 +- .../button-group/button-group.component.js | 2 +- .../components/button-group/button-group.js | 2 +- .../button-group/button-group.styles.js | 2 +- .../components/button/button.component.js | 2 +- .../shoelace/dist/components/button/button.js | 2 +- .../dist/components/button/button.styles.js | 2 +- .../dist/components/card/card.component.js | 2 +- .../shoelace/dist/components/card/card.js | 2 +- .../dist/components/card/card.styles.js | 2 +- .../carousel-item/carousel-item.component.js | 2 +- .../components/carousel-item/carousel-item.js | 2 +- .../carousel-item/carousel-item.styles.js | 2 +- .../carousel/autoplay-controller.js | 2 +- .../components/carousel/carousel.component.js | 2 +- .../dist/components/carousel/carousel.js | 2 +- .../components/carousel/carousel.styles.js | 2 +- .../components/carousel/scroll-controller.js | 2 +- .../components/checkbox/checkbox.component.js | 2 +- .../dist/components/checkbox/checkbox.js | 2 +- .../components/checkbox/checkbox.styles.js | 2 +- .../color-picker/color-picker.component.js | 2 +- .../components/color-picker/color-picker.js | 2 +- .../color-picker/color-picker.styles.js | 2 +- .../copy-button/copy-button.component.js | 1 + .../components/copy-button/copy-button.js | 1 + .../copy-button/copy-button.styles.js | 1 + .../components/details/details.component.js | 2 +- .../dist/components/details/details.js | 2 +- .../dist/components/details/details.styles.js | 2 +- .../components/dialog/dialog.component.js | 2 +- .../shoelace/dist/components/dialog/dialog.js | 2 +- .../dist/components/dialog/dialog.styles.js | 2 +- .../components/divider/divider.component.js | 2 +- .../dist/components/divider/divider.js | 2 +- .../dist/components/divider/divider.styles.js | 2 +- .../components/drawer/drawer.component.js | 2 +- .../shoelace/dist/components/drawer/drawer.js | 2 +- .../dist/components/drawer/drawer.styles.js | 2 +- .../components/dropdown/dropdown.component.js | 2 +- .../dist/components/dropdown/dropdown.js | 2 +- .../components/dropdown/dropdown.styles.js | 2 +- .../format-bytes/format-bytes.component.js | 2 +- .../components/format-bytes/format-bytes.js | 2 +- .../format-date/format-date.component.js | 2 +- .../components/format-date/format-date.js | 2 +- .../format-number/format-number.component.js | 2 +- .../components/format-number/format-number.js | 2 +- .../icon-button/icon-button.component.js | 2 +- .../components/icon-button/icon-button.js | 2 +- .../icon-button/icon-button.styles.js | 2 +- .../dist/components/icon/icon.component.js | 2 +- .../shoelace/dist/components/icon/icon.js | 2 +- .../dist/components/icon/icon.styles.js | 2 +- .../dist/components/icon/library.default.js | 2 +- .../shoelace/dist/components/icon/library.js | 2 +- .../dist/components/icon/library.system.js | 2 +- .../image-comparer.component.js | 2 +- .../image-comparer/image-comparer.js | 2 +- .../image-comparer/image-comparer.styles.js | 2 +- .../components/include/include.component.js | 2 +- .../dist/components/include/include.js | 2 +- .../dist/components/include/include.styles.js | 2 +- .../dist/components/include/request.js | 2 +- .../dist/components/input/input.component.js | 2 +- .../shoelace/dist/components/input/input.js | 2 +- .../dist/components/input/input.styles.js | 2 +- .../menu-item/menu-item.component.js | 2 +- .../dist/components/menu-item/menu-item.js | 2 +- .../components/menu-item/menu-item.styles.js | 2 +- .../menu-item/submenu-controller.js | 1 + .../menu-label/menu-label.component.js | 2 +- .../dist/components/menu-label/menu-label.js | 2 +- .../menu-label/menu-label.styles.js | 2 +- .../dist/components/menu/menu.component.js | 2 +- .../shoelace/dist/components/menu/menu.js | 2 +- .../dist/components/menu/menu.styles.js | 2 +- .../mutation-observer.component.js | 2 +- .../mutation-observer/mutation-observer.js | 2 +- .../mutation-observer.styles.js | 2 +- .../components/option/option.component.js | 2 +- .../shoelace/dist/components/option/option.js | 2 +- .../dist/components/option/option.styles.js | 2 +- .../dist/components/popup/popup.component.js | 2 +- .../shoelace/dist/components/popup/popup.js | 2 +- .../dist/components/popup/popup.styles.js | 2 +- .../progress-bar/progress-bar.component.js | 2 +- .../components/progress-bar/progress-bar.js | 2 +- .../progress-bar/progress-bar.styles.js | 2 +- .../progress-ring/progress-ring.component.js | 2 +- .../components/progress-ring/progress-ring.js | 2 +- .../progress-ring/progress-ring.styles.js | 2 +- .../components/qr-code/qr-code.component.js | 2 +- .../dist/components/qr-code/qr-code.js | 2 +- .../dist/components/qr-code/qr-code.styles.js | 2 +- .../radio-button/radio-button.component.js | 2 +- .../components/radio-button/radio-button.js | 2 +- .../radio-button/radio-button.styles.js | 2 +- .../radio-group/radio-group.component.js | 2 +- .../components/radio-group/radio-group.js | 2 +- .../radio-group/radio-group.styles.js | 2 +- .../dist/components/radio/radio.component.js | 2 +- .../shoelace/dist/components/radio/radio.js | 2 +- .../dist/components/radio/radio.styles.js | 2 +- .../dist/components/range/range.component.js | 2 +- .../shoelace/dist/components/range/range.js | 2 +- .../dist/components/range/range.styles.js | 2 +- .../components/rating/rating.component.js | 2 +- .../shoelace/dist/components/rating/rating.js | 2 +- .../dist/components/rating/rating.styles.js | 2 +- .../relative-time/relative-time.component.js | 2 +- .../components/relative-time/relative-time.js | 2 +- .../resize-observer.component.js | 2 +- .../resize-observer/resize-observer.js | 2 +- .../resize-observer/resize-observer.styles.js | 2 +- .../components/select/select.component.js | 2 +- .../shoelace/dist/components/select/select.js | 2 +- .../dist/components/select/select.styles.js | 2 +- .../components/skeleton/skeleton.component.js | 2 +- .../dist/components/skeleton/skeleton.js | 2 +- .../components/skeleton/skeleton.styles.js | 2 +- .../components/spinner/spinner.component.js | 2 +- .../dist/components/spinner/spinner.js | 2 +- .../dist/components/spinner/spinner.styles.js | 2 +- .../split-panel/split-panel.component.js | 2 +- .../components/split-panel/split-panel.js | 2 +- .../split-panel/split-panel.styles.js | 2 +- .../components/switch/switch.component.js | 2 +- .../shoelace/dist/components/switch/switch.js | 2 +- .../dist/components/switch/switch.styles.js | 2 +- .../tab-group/tab-group.component.js | 2 +- .../dist/components/tab-group/tab-group.js | 2 +- .../components/tab-group/tab-group.styles.js | 2 +- .../tab-panel/tab-panel.component.js | 2 +- .../dist/components/tab-panel/tab-panel.js | 2 +- .../components/tab-panel/tab-panel.styles.js | 2 +- .../dist/components/tab/tab.component.js | 2 +- .../shoelace/dist/components/tab/tab.js | 2 +- .../dist/components/tab/tab.styles.js | 2 +- .../dist/components/tag/tag.component.js | 2 +- .../shoelace/dist/components/tag/tag.js | 2 +- .../dist/components/tag/tag.styles.js | 2 +- .../components/textarea/textarea.component.js | 2 +- .../dist/components/textarea/textarea.js | 2 +- .../components/textarea/textarea.styles.js | 2 +- .../components/tooltip/tooltip.component.js | 2 +- .../dist/components/tooltip/tooltip.js | 2 +- .../dist/components/tooltip/tooltip.styles.js | 2 +- .../tree-item/tree-item.component.js | 2 +- .../dist/components/tree-item/tree-item.js | 2 +- .../components/tree-item/tree-item.styles.js | 2 +- .../dist/components/tree/tree.component.js | 2 +- .../shoelace/dist/components/tree/tree.js | 2 +- .../dist/components/tree/tree.styles.js | 2 +- .../visually-hidden.component.js | 2 +- .../visually-hidden/visually-hidden.js | 2 +- .../visually-hidden/visually-hidden.styles.js | 2 +- .../shoelace/dist/react/index.js | 2 +- .../shoelace/dist/shoelace-autoloader.js | 2 +- .../@shoelace-style/shoelace/dist/shoelace.js | 2 +- .../shoelace/dist/translations/da.js | 2 +- .../shoelace/dist/translations/de-ch.js | 2 +- .../shoelace/dist/translations/de.js | 2 +- .../shoelace/dist/translations/en-gb.js | 2 +- .../shoelace/dist/translations/en.js | 2 +- .../shoelace/dist/translations/es.js | 2 +- .../shoelace/dist/translations/fa.js | 2 +- .../shoelace/dist/translations/fr.js | 2 +- .../shoelace/dist/translations/he.js | 2 +- .../shoelace/dist/translations/hu.js | 2 +- .../shoelace/dist/translations/ja.js | 2 +- .../shoelace/dist/translations/nl.js | 2 +- .../shoelace/dist/translations/pl.js | 2 +- .../shoelace/dist/translations/pt.js | 2 +- .../shoelace/dist/translations/ru.js | 2 +- .../shoelace/dist/translations/sv.js | 2 +- .../shoelace/dist/translations/tr.js | 2 +- .../shoelace/dist/translations/zh-tw.js | 2 +- .../dist/utilities/animation-registry.js | 2 +- .../shoelace/dist/utilities/animation.js | 2 +- .../shoelace/dist/utilities/base-path.js | 2 +- .../shoelace/dist/utilities/form.js | 2 +- .../shoelace/dist/utilities/icon-library.js | 2 +- .../shoelace/dist/utilities/localize.js | 2 +- .../lit-element/decorators.d.ts.map | 2 +- .../experimental-hydrate-support.d.ts.map | 1 - .../experimental-hydrate-support.js.map | 1 - .../node_modules/lit-element/index.d.ts.map | 2 +- .../es6/node_modules/lit-element/index.js.map | 2 +- .../lit-element/lit-element.d.ts.map | 2 +- .../node_modules/lit-element/lit-element.js | 4 +- .../lit-element/lit-element.js.map | 2 +- .../lit-element/polyfill-support.js.map | 2 +- .../node_modules/lit-html/async-directive.js | 4 +- .../lit-html/async-directive.js.map | 2 +- .../lit-html/development/async-directive.js | 2 +- .../development/async-directive.js.map | 2 +- .../development/directive-helpers.d.ts.map | 2 +- .../lit-html/development/directive-helpers.js | 2 +- .../development/directive-helpers.js.map | 2 +- .../lit-html/development/directive.d.ts.map | 2 +- .../development/experimental-hydrate.d.ts.map | 1 - .../development/experimental-hydrate.js | 6 - .../development/experimental-hydrate.js.map | 1 - .../lit-html/development/lit-html.d.ts.map | 2 +- .../lit-html/development/lit-html.js | 2 +- .../lit-html/development/lit-html.js.map | 2 +- .../development/polyfill-support.js.map | 2 +- .../lit-html/development/static.js | 2 +- .../lit-html/development/static.js.map | 2 +- .../lit-html/directive-helpers.d.ts.map | 2 +- .../lit-html/directive-helpers.js | 4 +- .../lit-html/directive-helpers.js.map | 2 +- .../node_modules/lit-html/directive.d.ts.map | 2 +- .../node_modules/lit-html/directive.js.map | 2 +- .../lit-html/directives/async-append.js.map | 2 +- .../directives/async-replace.d.ts.map | 2 +- .../lit-html/directives/async-replace.js.map | 2 +- .../lit-html/directives/cache.d.ts.map | 2 +- .../node_modules/lit-html/directives/cache.js | 4 +- .../lit-html/directives/cache.js.map | 2 +- .../lit-html/directives/choose.d.ts.map | 2 +- .../lit-html/directives/choose.js | 2 +- .../lit-html/directives/choose.js.map | 2 +- .../lit-html/directives/class-map.d.ts.map | 2 +- .../lit-html/directives/class-map.js | 4 +- .../lit-html/directives/class-map.js.map | 2 +- .../node_modules/lit-html/directives/guard.js | 4 +- .../lit-html/directives/guard.js.map | 2 +- .../lit-html/directives/if-defined.js | 2 +- .../lit-html/directives/if-defined.js.map | 2 +- .../lit-html/directives/keyed.js.map | 2 +- .../lit-html/directives/live.js.map | 2 +- .../directives/private-async-helpers.js | 2 +- .../directives/private-async-helpers.js.map | 2 +- .../node_modules/lit-html/directives/range.js | 2 +- .../lit-html/directives/range.js.map | 2 +- .../lit-html/directives/ref.d.ts.map | 2 +- .../node_modules/lit-html/directives/ref.js | 2 +- .../lit-html/directives/ref.js.map | 2 +- .../lit-html/directives/repeat.d.ts.map | 2 +- .../lit-html/directives/repeat.js | 2 +- .../lit-html/directives/repeat.js.map | 2 +- .../lit-html/directives/style-map.d.ts.map | 2 +- .../lit-html/directives/style-map.js | 4 +- .../lit-html/directives/style-map.js.map | 2 +- .../lit-html/directives/template-content.js | 2 +- .../directives/template-content.js.map | 2 +- .../lit-html/directives/unsafe-html.js | 2 +- .../lit-html/directives/unsafe-html.js.map | 2 +- .../lit-html/directives/until.d.ts.map | 2 +- .../node_modules/lit-html/directives/until.js | 2 +- .../lit-html/directives/until.js.map | 2 +- .../lit-html/directives/when.d.ts.map | 2 +- .../node_modules/lit-html/directives/when.js | 2 +- .../lit-html/directives/when.js.map | 2 +- .../lit-html/experimental-hydrate.d.ts.map | 1 - .../lit-html/experimental-hydrate.js | 6 - .../lit-html/experimental-hydrate.js.map | 1 - .../node_modules/lit-html/lit-html.d.ts.map | 2 +- .../es6/node_modules/lit-html/lit-html.js | 2 +- .../es6/node_modules/lit-html/lit-html.js.map | 2 +- .../lit-html/node/async-directive.js | 4 +- .../lit-html/node/async-directive.js.map | 2 +- .../lit-html/node/directive-helpers.js | 4 +- .../lit-html/node/directive-helpers.js.map | 2 +- .../lit-html/node/directive.js.map | 2 +- .../lit-html/node/experimental-hydrate.js | 1 - .../lit-html/node/experimental-hydrate.js.map | 1 - .../node_modules/lit-html/node/lit-html.js | 2 +- .../lit-html/node/lit-html.js.map | 2 +- .../lit-html/node/polyfill-support.js.map | 2 +- .../lit-html/node/private-ssr-support.js | 2 +- .../lit-html/node/private-ssr-support.js.map | 2 +- .../es6/node_modules/lit-html/node/static.js | 4 +- .../node_modules/lit-html/node/static.js.map | 2 +- .../lit-html/polyfill-support.js.map | 2 +- .../lit-html/private-ssr-support.js | 2 +- .../lit-html/private-ssr-support.js.map | 2 +- cdn/build/es6/node_modules/lit-html/static.js | 4 +- .../es6/node_modules/lit-html/static.js.map | 2 +- .../lit/experimental-hydrate-support.js | 1 - .../node_modules/lit/experimental-hydrate.js | 1 - .../es6/node_modules/mobx/dist/mobx.esm.js | 2 +- .../min-maps/vs/base/worker/workerMain.js.map | 1 - .../min-maps/vs/editor/editor.main.js.map | 1 - .../vs/editor/editor.main.nls.de.js.map | 1 - .../vs/editor/editor.main.nls.es.js.map | 1 - .../vs/editor/editor.main.nls.fr.js.map | 1 - .../vs/editor/editor.main.nls.it.js.map | 1 - .../vs/editor/editor.main.nls.ja.js.map | 1 - .../min-maps/vs/editor/editor.main.nls.js.map | 1 - .../vs/editor/editor.main.nls.ko.js.map | 1 - .../vs/editor/editor.main.nls.ru.js.map | 1 - .../vs/editor/editor.main.nls.zh-cn.js.map | 1 - .../vs/editor/editor.main.nls.zh-tw.js.map | 1 - .../monaco-editor/min-maps/vs/loader.js.map | 1 - .../min/vs/language/typescript/tsMode.js | 7 - .../min/vs/language/typescript/tsWorker.js | 7 - .../monaco-editor/min/vs/loader.js | 10 +- cdn/build/es6/node_modules/tslib/tslib.es6.js | 2 +- cdn/build/es6/node_modules/tslib/tslib.js | 2 +- cdn/build/polymer.json | 13 +- cdn/wc-registry.json | 2 +- .../@google/model-viewer/dist/model-viewer.js | 2 +- .../motion/animate-controller.d.ts.map | 2 +- .../@lit-labs/motion/animate-controller.js | 2 +- .../motion/animate-controller.js.map | 2 +- .../@lit-labs/motion/animate.d.ts.map | 2 +- .../node_modules/@lit-labs/motion/animate.js | 2 +- .../@lit-labs/motion/animate.js.map | 2 +- .../@lit-labs/motion/position.d.ts.map | 2 +- .../node_modules/@lit-labs/motion/position.js | 2 +- .../@lit-labs/motion/position.js.map | 2 +- .../virtualizer/LitVirtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/LitVirtualizer.js | 6 + .../virtualizer/LitVirtualizer.js.map | 1 + .../virtualizer/ScrollerController.d.ts.map | 1 + .../virtualizer/ScrollerController.js | 6 + .../virtualizer/ScrollerController.js.map | 1 + .../virtualizer/Virtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/Virtualizer.js | 6 + .../@lit-labs/virtualizer/Virtualizer.js.map | 1 + .../@lit-labs/virtualizer/events.d.ts.map | 1 + .../@lit-labs/virtualizer/events.js | 6 + .../@lit-labs/virtualizer/events.js.map | 1 + .../virtualizer/layouts/flexWrap.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/flexWrap.js | 6 + .../virtualizer/layouts/flexWrap.js.map | 1 + .../virtualizer/layouts/flow.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/flow.js | 6 + .../@lit-labs/virtualizer/layouts/flow.js.map | 1 + .../virtualizer/layouts/grid.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/grid.js | 6 + .../@lit-labs/virtualizer/layouts/grid.js.map | 1 + .../virtualizer/layouts/masonry.d.ts.map | 1 + .../@lit-labs/virtualizer/layouts/masonry.js | 6 + .../virtualizer/layouts/masonry.js.map | 1 + .../layouts/shared/BaseLayout.d.ts.map | 1 + .../virtualizer/layouts/shared/BaseLayout.js | 6 + .../layouts/shared/BaseLayout.js.map | 1 + .../layouts/shared/GridBaseLayout.d.ts.map | 1 + .../layouts/shared/GridBaseLayout.js | 6 + .../layouts/shared/GridBaseLayout.js.map | 1 + .../layouts/shared/Layout.d.ts.map | 1 + .../virtualizer/layouts/shared/Layout.js | 6 + .../virtualizer/layouts/shared/Layout.js.map | 1 + .../layouts/shared/SizeCache.d.ts.map | 1 + .../virtualizer/layouts/shared/SizeCache.js | 6 + .../layouts/shared/SizeCache.js.map | 1 + .../shared/SizeGapPaddingBaseLayout.d.ts.map | 1 + .../shared/SizeGapPaddingBaseLayout.js | 6 + .../shared/SizeGapPaddingBaseLayout.js.map | 1 + .../virtualizer/lit-virtualizer.d.ts.map | 1 + .../@lit-labs/virtualizer/lit-virtualizer.js | 6 + .../virtualizer/lit-virtualizer.js.map | 1 + .../@lit-labs/virtualizer/virtualize.d.ts.map | 1 + .../@lit-labs/virtualizer/virtualize.js | 6 + .../@lit-labs/virtualizer/virtualize.js.map | 1 + .../@lit/reactive-element/css-tag.d.ts.map | 1 + .../@lit/reactive-element/css-tag.js | 2 +- .../@lit/reactive-element/css-tag.js.map | 1 + .../@lit/reactive-element/decorators.d.ts.map | 1 + .../@lit/reactive-element/decorators.js | 1 + .../@lit/reactive-element/decorators.js.map | 1 + .../reactive-element/decorators/base.d.ts.map | 1 + .../@lit/reactive-element/decorators/base.js | 2 +- .../reactive-element/decorators/base.js.map | 1 + .../decorators/custom-element.d.ts.map | 1 + .../decorators/custom-element.js | 2 +- .../decorators/custom-element.js.map | 1 + .../decorators/event-options.d.ts.map | 1 + .../decorators/event-options.js | 4 +- .../decorators/event-options.js.map | 1 + .../decorators/property.d.ts.map | 1 + .../reactive-element/decorators/property.js | 4 +- .../decorators/property.js.map | 1 + .../decorators/query-all.d.ts.map | 1 + .../reactive-element/decorators/query-all.js | 4 +- .../decorators/query-all.js.map | 1 + .../query-assigned-elements.d.ts.map | 1 + .../decorators/query-assigned-elements.js | 4 +- .../decorators/query-assigned-elements.js.map | 1 + .../decorators/query-assigned-nodes.d.ts.map | 1 + .../decorators/query-assigned-nodes.js | 4 +- .../decorators/query-assigned-nodes.js.map | 1 + .../decorators/query-async.d.ts.map | 1 + .../decorators/query-async.js | 4 +- .../decorators/query-async.js.map | 1 + .../decorators/query.d.ts.map | 1 + .../@lit/reactive-element/decorators/query.js | 4 +- .../reactive-element/decorators/query.js.map | 1 + .../decorators/state.d.ts.map | 1 + .../@lit/reactive-element/decorators/state.js | 4 +- .../reactive-element/decorators/state.js.map | 1 + .../polyfill-support.d.ts.map | 1 + .../@lit/reactive-element/polyfill-support.js | 7 + .../reactive-element/polyfill-support.js.map | 1 + .../reactive-controller.d.ts.map | 1 + .../reactive-element/reactive-controller.js | 0 .../reactive-controller.js.map | 1 + .../reactive-element.d.ts.map | 1 + .../@lit/reactive-element/reactive-element.js | 2 +- .../reactive-element/reactive-element.js.map | 1 + .../a11y-collapse/lib/a11y-collapse-group.js | 2 +- .../lib/a11y-gif-player.haxProperties.json | 2 +- .../a11y-media-player/a11y-media-player.js | 2 +- .../a11y-tabs/lib/a11y-tab.js | 1 + .../lib/absolute-position-state-manager.js | 2 +- .../accent-card/accent-card.js | 6 + .../@lrnwebcomponents/app-hax/app-hax.js | 2 +- .../app-hax/lib/app-hax-theme.js | 615 ++++++++++++++++++ .../rpg-character-toast.js | 94 ++- .../app-hax/lib/v1/app-hax-button.js | 2 +- .../app-hax/lib/v1/app-hax-steps.js | 63 +- .../@lrnwebcomponents/clean-one/clean-one.js | 20 +- .../@lrnwebcomponents/clean-two/clean-two.js | 17 +- .../code-editor/lib/code-pen-button.js | 2 +- .../collection-list/collection-list.js | 88 +++ .../lib/collection-item.haxProperties.json | 118 ++++ .../collection-list/lib/collection-item.js | 137 ++++ .../lib/collection-list.haxProperties.json | 92 +++ .../lib/collections-theme-banner.js | 121 ++++ .../collection-list/lib/collections-theme.js | 319 +++++++++ .../@lrnwebcomponents/count-up/count-up.js | 4 +- .../lib/block-quote.haxProperties.json | 11 +- .../course-design/lib/block-quote.js | 19 +- .../course-design/lib/learning-component.js | 25 +- .../course-design/lib/worksheet-download.js | 2 +- .../course-model/course-model.js | 2 +- .../@lrnwebcomponents/date-card/date-card.js | 4 +- .../date-card/lib/date-chip.js | 41 ++ .../discord-embed/discord-embed.js | 13 + .../lib/discord-embed.haxProperties.json | 55 ++ .../documentation-player.js | 30 + .../dynamic-import-registry.js | 2 +- .../elmsln-studio/elmsln-studio.js | 2 +- .../file-system-broker/file-system-broker.js | 2 +- .../lib/xlsx/dist/shim.min.js | 2 +- .../lib/xlsx/dist/xlsx.extendscript.js | 2 +- .../full-width-image/full-width-image.js | 2 +- .../future-terminal-text.js | 5 +- .../lib/FutureTerminalTextSuper.js | 2 +- .../lib/future-terminal-text-lite.js | 15 +- .../grid-plate/grid-plate.js | 14 +- .../@lrnwebcomponents/h-a-x/h-a-x.js | 2 +- .../h5p-element/lib/h5p/js/jquery.js | 2 +- .../hax-body-behaviors/lib/HAXWiring.js | 2 +- .../@lrnwebcomponents/hax-body/hax-body.js | 21 +- .../hax-body/lib/hax-autoloader.js | 2 +- .../hax-body/lib/hax-gizmo-browser.js | 9 +- .../hax-body/lib/hax-plate-context.js | 3 +- .../hax-body/lib/hax-store.js | 4 +- .../hax-body/lib/hax-text-editor-toolbar.js | 6 +- .../hax-body/lib/hax-tray-upload.js | 2 +- .../hax-body/lib/hax-tray.js | 20 +- .../hax-body/lib/hax-ui-styles.js | 5 +- .../hax-body/lib/hax-upload-field.js | 4 +- .../hax-body/lib/hax-view-source.js | 72 +- .../hax-iconset/lib/hax-iconset-manifest.js | 2 +- .../lib/svgs/courseicons/astro1.svg | 11 +- .../lib/svgs/courseicons/astro11.svg | 10 + .../lib/svgs/courseicons/astro120.svg | 8 + .../lib/svgs/courseicons/astro130.svg | 1 + .../lib/svgs/courseicons/astro140.svg | 33 + .../lib/svgs/courseicons/biol11.svg | 6 + .../lib/svgs/courseicons/biol110.svg | 11 + .../lib/svgs/courseicons/biol120n.svg | 5 + .../lib/svgs/courseicons/biol133.svg | 17 + .../lib/svgs/courseicons/biol141.svg | 70 ++ .../lib/svgs/courseicons/biol155.svg | 13 + .../lib/svgs/courseicons/biol177.svg | 7 + .../lib/svgs/courseicons/bisci001.svg | 9 + .../lib/svgs/courseicons/bisci002.svg | 13 + .../lib/svgs/courseicons/bisci003.svg | 163 +++++ .../lib/svgs/courseicons/bisci004.svg | 6 + .../lib/svgs/courseicons/bmmb551.svg | 14 + .../lib/svgs/courseicons/bmmb852.svg | 5 + .../lib/svgs/courseicons/chem005.svg | 12 + .../lib/svgs/courseicons/chem101.svg | 8 + .../lib/svgs/courseicons/chem110.svg | 8 + .../lib/svgs/courseicons/frnsc100.svg | 11 + .../lib/svgs/courseicons/frnsc200.svg | 19 + .../lib/svgs/courseicons/frnsc210.svg | 6 + .../lib/svgs/courseicons/math021.svg | 10 + .../lib/svgs/courseicons/math022.svg | 16 + .../lib/svgs/courseicons/math034.svg | 6 + .../lib/svgs/courseicons/math036.svg | 8 + .../lib/svgs/courseicons/math110.svg | 8 + .../lib/svgs/courseicons/math140.svg | 3 + .../lib/svgs/courseicons/math220.svg | 3 + .../lib/svgs/courseicons/math436.svg | 5 + .../lib/svgs/courseicons/phys010.svg | 8 + .../lib/svgs/hax/accessibility.svg | 5 + .../hax-iconset/lib/svgs/hax/apps.svg | 3 + .../hax-iconset/lib/svgs/hax/assess.svg | 5 + .../hax-iconset/lib/svgs/hax/camera.svg | 5 + .../hax-iconset/lib/svgs/hax/collaborate.svg | 5 + .../hax-iconset/lib/svgs/hax/computer.svg | 5 + .../hax-iconset/lib/svgs/hax/computer2.svg | 3 + .../hax-iconset/lib/svgs/hax/consult.svg | 5 + .../hax-iconset/lib/svgs/hax/container.svg | 5 + .../hax-iconset/lib/svgs/hax/documents.svg | 3 + .../hax-iconset/lib/svgs/hax/email.svg | 8 + .../hax-iconset/lib/svgs/hax/engage.svg | 5 + .../hax-iconset/lib/svgs/hax/engage2.svg | 3 + .../hax-iconset/lib/svgs/hax/examity.svg | 44 ++ .../hax-iconset/lib/svgs/hax/flikr.svg | 16 + .../hax-iconset/lib/svgs/hax/gears.svg | 5 + .../hax-iconset/lib/svgs/hax/globe.svg | 5 + .../hax-iconset/lib/svgs/hax/graph.svg | 3 + .../hax-iconset/lib/svgs/hax/idea.svg | 3 + .../hax-iconset/lib/svgs/hax/image.svg | 5 + .../hax-iconset/lib/svgs/hax/monitor.svg | 3 + .../hax-iconset/lib/svgs/hax/motivate.svg | 5 + .../hax-iconset/lib/svgs/hax/ngdle.svg | 5 + .../hax-iconset/lib/svgs/hax/oer.svg | 5 + .../hax-iconset/lib/svgs/hax/phone.svg | 3 + .../hax-iconset/lib/svgs/hax/podcast.svg | 5 + .../hax-iconset/lib/svgs/hax/quick.svg | 3 + .../hax-iconset/lib/svgs/hax/reportcard.svg | 3 + .../hax-iconset/lib/svgs/hax/reuse.svg | 3 + .../hax-iconset/lib/svgs/hax/scroll.svg | 4 + .../hax-iconset/lib/svgs/hax/time.svg | 3 + .../hax-iconset/lib/svgs/hax/video.svg | 5 + .../hax-iconset/lib/svgs/hax/vimeo.svg | 14 + .../hax-iconset/lib/svgs/hax/vr.svg | 5 + .../hax-iconset/lib/svgs/hax/wand.svg | 1 + .../lib/core/HAXCMSLitElementTheme.js | 74 +-- .../lib/core/HAXCMSThemeWiring.js | 2 +- .../lib/core/haxcms-editor-builder.js | 2 +- .../lib/core/haxcms-site-builder.js | 4 +- .../lib/core/haxcms-site-dashboard.js | 9 +- .../lib/core/haxcms-site-editor-ui.js | 113 ++-- .../lib/core/haxcms-site-editor.js | 4 +- .../lib/core/haxcms-site-router.js | 2 +- .../lib/core/haxcms-site-store.js | 2 +- .../lib/core/micros/haxcms-button-add.js | 2 +- .../lib/core/site-list/haxcms-site-listing.js | 2 +- .../lib/core/ui/haxcms-page-get-started.js | 87 +++ .../lib/core/utils/EmailPageMixin.js | 24 + .../lib/core/utils/HAXCMSI18NMixin.js | 2 +- .../lib/core/utils/HAXCMSRememberRoute.js | 2 +- .../lib/core/utils/QRCodeMixin.js | 4 +- .../lib/development/haxcms-dev-theme.js | 1 - .../active-item/site-active-tags.js | 20 +- .../active-item/site-git-corner.js | 2 +- .../blocks/site-children-block.js | 60 +- .../lib/ui-components/layout/site-region.js | 1 + .../site-collection-list.haxProperties.json | 165 +++++ .../magic/site-collection-list.js | 27 + .../lib/ui-components/magic/site-view.js | 24 +- .../navigation/site-menu-button.js | 6 +- .../navigation/site-menu-content.js | 5 +- .../ui-components/navigation/site-top-menu.js | 122 +++- .../lib/ui-components/query/site-query.js | 2 +- .../ui-components/routes/site-views-route.js | 2 +- .../ui-components/site/site-print-button.js | 2 +- .../ui-components/site/site-remote-content.js | 2 +- .../lib/ui-components/site/site-rss-button.js | 6 +- .../lib/ui-components/site/site-search.js | 2 +- .../lib/ui-components/site/site-title.js | 19 +- .../haxcms-elements/package.json | 116 ++-- .../haxor-slevin/haxor-slevin.js | 312 +++++---- .../iframe-loader/iframe-loader.js | 2 +- .../map-menu/lib/map-menu-builder.js | 4 +- .../map-menu/lib/map-menu-header.js | 5 +- .../map-menu/lib/map-menu-item.js | 7 +- .../map-menu/lib/map-menu-submenu.js | 8 +- .../lib/microServices.js | 2 +- .../multiple-choice/multiple-choice.js | 10 +- .../@lrnwebcomponents/opt-img/opt-img.js | 2 +- .../lib/page-break.haxProperties.json | 64 +- .../page-break/page-break.js | 6 +- .../lib/page-section.haxProperties.json | 95 +++ .../page-section/page-section.js | 144 ++++ .../play-list/lib/SLStyleManager.js | 2 +- .../@lrnwebcomponents/play-list/lib/dark.css | 471 ++++++++++++++ .../@lrnwebcomponents/play-list/lib/light.css | 472 ++++++++++++++ .../lib/play-list.haxProperties.json | 8 +- .../@lrnwebcomponents/play-list/play-list.js | 45 +- .../polaris-theme/lib/polaris-cta.js | 99 +++ .../polaris-theme/lib/polaris-mark.js | 124 ++++ .../polaris-theme/lib/polaris-story-card.js | 60 ++ .../polaris-theme/lib/polaris-tile.js | 123 ++++ .../polaris-theme/polaris-theme.js | 446 +++++++++++++ .../@lrnwebcomponents/post-card/post-card.js | 2 +- .../product-card/lib/course-card.js | 2 +- .../product-card/lib/product-banner.js | 10 +- .../replace-tag/replace-tag.js | 2 +- .../lib/buttons/rich-text-editor-button.js | 1 + .../lib/buttons/rich-text-editor-link.js | 2 +- .../rich-text-editor-range-behaviors.js | 2 +- .../scroll-button/scroll-button.js | 2 +- .../simple-blog-card/simple-blog-card.js | 54 +- .../simple-cta/simple-cta.js | 78 ++- .../lib/simple-fields-array-item.js | 50 +- .../simple-fields/lib/simple-fields-array.js | 5 +- .../simple-fields/lib/simple-fields-combo.js | 3 +- .../lib/simple-fields-container.js | 2 +- .../simple-fields/lib/simple-fields-field.js | 11 +- .../simple-fields/lib/simple-fields-lite.js | 2 +- .../simple-fields/lib/simple-fields-upload.js | 4 +- .../simple-icon-picker/simple-icon-picker.js | 5 +- .../lib/simple-icon.haxProperties.json | 3 +- .../simple-login/lib/simple-camera-snap.js | 2 +- .../simple-login/lib/simple-login-camera.js | 2 +- .../simple-picker/lib/simple-emoji-picker.js | 11 +- .../simple-picker/lib/simple-symbol-picker.js | 7 +- .../simple-picker/simple-picker.js | 26 +- .../lib/simple-toolbar-button.js | 2 +- .../lib/simple-toolbar-more-button.js | 2 +- .../simple-toolbar/simple-toolbar.js | 2 +- .../social-share-link/social-share-link.js | 24 +- .../super-daemon/lib/super-daemon-row.js | 34 +- .../super-daemon/lib/super-daemon-search.js | 197 ++++++ .../super-daemon/lib/super-daemon-toast.js | 51 +- .../super-daemon/lib/super-daemon-ui.js | 272 +++----- .../super-daemon/super-daemon.js | 41 +- .../training-theme/lib/training-button.js | 95 +++ .../training-theme/lib/training-top.js | 78 +++ .../training-theme/training-theme.js | 274 ++++++++ .../twitter-embed/twitter-embed.js | 2 +- .../user-action/user-action.js | 2 +- .../user-scaffold/user-scaffold.js | 5 + .../utils/lib/activeStateBehavior.js | 2 +- .../utils/lib/remoteLinkBehavior.js | 2 +- .../@lrnwebcomponents/utils/utils.js | 2 +- .../video-player/video-player.js | 2 +- .../@shoelace-style/localize/dist/index.js | 2 +- .../{chunk.A4EV4GKC.js => chunk.25E2J7HG.js} | 4 +- .../{chunk.L4EUGKFG.js => chunk.2B7ZRWV6.js} | 2 +- .../shoelace/dist/chunks/chunk.2BBYS2AO.js | 1 - .../shoelace/dist/chunks/chunk.2KNNLHT6.js | 1 - .../shoelace/dist/chunks/chunk.2NHP677Q.js | 1 - .../shoelace/dist/chunks/chunk.2OFNWZUO.js | 1 - .../{chunk.CB4P5CRU.js => chunk.2Q6UBMUG.js} | 2 +- .../shoelace/dist/chunks/chunk.2UWHTLTB.js | 1 + .../shoelace/dist/chunks/chunk.2XWK25GF.js | 1 + .../shoelace/dist/chunks/chunk.35QQGKS6.js | 1 - .../shoelace/dist/chunks/chunk.3ALMDSO3.js | 1 - .../{chunk.CRA7IQJI.js => chunk.3BZZHSGR.js} | 4 +- .../shoelace/dist/chunks/chunk.3CX5T7GV.js | 1 - .../shoelace/dist/chunks/chunk.3MCR2MLV.js | 2 +- .../shoelace/dist/chunks/chunk.3P2DZVT6.js | 1 - .../shoelace/dist/chunks/chunk.3RXVXJ7N.js | 1 + .../shoelace/dist/chunks/chunk.3TUFDOAI.js | 1 + .../{chunk.QSGNZ7NT.js => chunk.3WAW4E2K.js} | 2 +- .../shoelace/dist/chunks/chunk.3YMXKNHC.js | 1 - .../shoelace/dist/chunks/chunk.4C46DIIN.js | 8 + .../shoelace/dist/chunks/chunk.4EF2BVHR.js | 2 +- .../shoelace/dist/chunks/chunk.4FS6RVQD.js | 1 - .../{chunk.BZCHZMPK.js => chunk.4K5O6KJW.js} | 2 +- .../{chunk.RAU7GTRD.js => chunk.4O6DKE6L.js} | 4 +- .../shoelace/dist/chunks/chunk.4SHVD2KD.js | 1 + .../shoelace/dist/chunks/chunk.4XQCFFMS.js | 1 + .../shoelace/dist/chunks/chunk.4ZAOOFNS.js | 1 + .../shoelace/dist/chunks/chunk.5CIGH6UI.js | 1 - .../shoelace/dist/chunks/chunk.5DFMJ727.js | 1 + .../shoelace/dist/chunks/chunk.5E2TGPJ7.js | 1 - .../shoelace/dist/chunks/chunk.5F6CPPXO.js | 1 - .../shoelace/dist/chunks/chunk.5FCCRNG7.js | 1 + .../shoelace/dist/chunks/chunk.5GIPFTSS.js | 13 + .../shoelace/dist/chunks/chunk.5HRUL7SO.js | 20 - .../shoelace/dist/chunks/chunk.5NBMQ7EG.js | 13 - .../shoelace/dist/chunks/chunk.5SZQCM5C.js | 2 +- .../shoelace/dist/chunks/chunk.5VCP5UVV.js | 2 +- .../shoelace/dist/chunks/chunk.5WDU5R6O.js | 1 + .../shoelace/dist/chunks/chunk.5ZUXEXMC.js | 1 - .../shoelace/dist/chunks/chunk.62Q7SWNI.js | 1 + .../shoelace/dist/chunks/chunk.66XNORJX.js | 1 + .../shoelace/dist/chunks/chunk.67AISYA7.js | 1 - .../shoelace/dist/chunks/chunk.6CDLFZKN.js | 1 - .../shoelace/dist/chunks/chunk.6JGF6LBR.js | 1 + .../shoelace/dist/chunks/chunk.6M63UXML.js | 1 + .../shoelace/dist/chunks/chunk.6MZVKFZA.js | 2 +- .../{chunk.BV3WOJKI.js => chunk.6O2NRLBS.js} | 2 +- .../shoelace/dist/chunks/chunk.6Q3FCZAW.js | 1 - .../shoelace/dist/chunks/chunk.6RQLINWQ.js | 2 +- .../shoelace/dist/chunks/chunk.73ZNTPJA.js | 1 + .../shoelace/dist/chunks/chunk.7EJIBXTA.js | 1 + .../shoelace/dist/chunks/chunk.7IL5PZUP.js | 1 + .../shoelace/dist/chunks/chunk.7JPBV455.js | 1 + .../shoelace/dist/chunks/chunk.7RHUXUVD.js | 1 - .../shoelace/dist/chunks/chunk.7RZIFKWO.js | 1 - .../shoelace/dist/chunks/chunk.7WBAK746.js | 1 - .../shoelace/dist/chunks/chunk.7XPK5EMC.js | 2 +- .../shoelace/dist/chunks/chunk.AI4KLJFS.js | 1 - .../{chunk.5UPJYW7M.js => chunk.AKA25VYF.js} | 2 +- .../shoelace/dist/chunks/chunk.ANTU6G35.js | 1 + .../shoelace/dist/chunks/chunk.BAD6C56T.js | 1 - .../shoelace/dist/chunks/chunk.BDDLQS6W.js | 1 - .../shoelace/dist/chunks/chunk.BGV6NJUJ.js | 1 + .../shoelace/dist/chunks/chunk.BT7SAYED.js | 1 - .../shoelace/dist/chunks/chunk.BUMKX4R7.js | 1 - .../shoelace/dist/chunks/chunk.BVRD5G5W.js | 1 + .../shoelace/dist/chunks/chunk.BYQQMUHG.js | 1 - .../{chunk.CJDR7567.js => chunk.C7FWPEOY.js} | 2 +- .../shoelace/dist/chunks/chunk.CEU4JDVC.js | 1 - .../shoelace/dist/chunks/chunk.CHUGVITZ.js | 1 + .../shoelace/dist/chunks/chunk.CI55NCYE.js | 1 + .../shoelace/dist/chunks/chunk.CJHUIM54.js | 2 +- .../{chunk.XYSY2YZG.js => chunk.CJQ7EQHG.js} | 2 +- .../shoelace/dist/chunks/chunk.CPX2UCQ4.js | 2 +- .../{chunk.G3SPB25T.js => chunk.CROELWR3.js} | 2 +- .../{chunk.4P2RHPJ7.js => chunk.CTNDET4S.js} | 2 +- .../shoelace/dist/chunks/chunk.CTT4DASP.js | 1 - .../{chunk.AMHT72HT.js => chunk.CWLYIQXA.js} | 2 +- .../shoelace/dist/chunks/chunk.CXGTBNQE.js | 1 + .../shoelace/dist/chunks/chunk.D7CPEJLD.js | 1 + .../shoelace/dist/chunks/chunk.DEQSCERF.js | 1 + .../shoelace/dist/chunks/chunk.DFIUKINQ.js | 1 + .../shoelace/dist/chunks/chunk.DHO3GHQI.js | 1 - .../shoelace/dist/chunks/chunk.DIRIFXCD.js | 1 - .../shoelace/dist/chunks/chunk.DK3WZXBM.js | 1 + .../shoelace/dist/chunks/chunk.DMEYE672.js | 1 + .../shoelace/dist/chunks/chunk.DMMWHXUG.js | 2 +- .../shoelace/dist/chunks/chunk.DRGLPI2A.js | 1 + .../shoelace/dist/chunks/chunk.DRJODFCK.js | 1 - .../shoelace/dist/chunks/chunk.DT3OOL5X.js | 1 - .../{chunk.HNH4USWO.js => chunk.DTS7GKZE.js} | 6 +- .../shoelace/dist/chunks/chunk.DWRCQAX7.js | 1 - .../shoelace/dist/chunks/chunk.DZ6MZKZJ.js | 1 + .../shoelace/dist/chunks/chunk.E2FTXJG3.js | 1 + .../shoelace/dist/chunks/chunk.E2JGAFR4.js | 1 - .../shoelace/dist/chunks/chunk.E2UVQKJF.js | 1 + .../shoelace/dist/chunks/chunk.EJ24F4FA.js | 2 +- .../{chunk.7ZCMJKGF.js => chunk.EMSHC2UY.js} | 2 +- .../shoelace/dist/chunks/chunk.EPB7DJXC.js | 1 - .../shoelace/dist/chunks/chunk.EQP3JFQP.js | 1 - .../shoelace/dist/chunks/chunk.EUKH7EAE.js | 2 +- .../shoelace/dist/chunks/chunk.EV3UDTBM.js | 1 + .../{chunk.7B5CCNHM.js => chunk.EXFTDGGG.js} | 2 +- .../shoelace/dist/chunks/chunk.F264RLPY.js | 1 + .../shoelace/dist/chunks/chunk.F326FFZY.js | 1 + .../shoelace/dist/chunks/chunk.F4LOVXDH.js | 1 + .../shoelace/dist/chunks/chunk.F5BGAPMF.js | 1 - .../shoelace/dist/chunks/chunk.F62XCO4D.js | 1 - .../shoelace/dist/chunks/chunk.FBNMNT3O.js | 1 + .../shoelace/dist/chunks/chunk.FFXRPXNL.js | 1 + .../{chunk.6IPOEJS3.js => chunk.FKPAMLVJ.js} | 18 +- .../shoelace/dist/chunks/chunk.FMRCD3VN.js | 1 - .../shoelace/dist/chunks/chunk.FQI2ZI2B.js | 1 + .../shoelace/dist/chunks/chunk.FQWN2XRJ.js | 1 + .../shoelace/dist/chunks/chunk.FUOM65BJ.js | 1 + .../shoelace/dist/chunks/chunk.FVEJRUOQ.js | 4 + .../shoelace/dist/chunks/chunk.G36MCQ7Z.js | 1 + .../shoelace/dist/chunks/chunk.G7UWKMCZ.js | 1 - .../shoelace/dist/chunks/chunk.GCN3DWSD.js | 1 - .../shoelace/dist/chunks/chunk.GF4UCFQ6.js | 1 - .../{chunk.SH6R2Z4A.js => chunk.GGORWW4N.js} | 2 +- .../shoelace/dist/chunks/chunk.GLGPZRLI.js | 1 + .../shoelace/dist/chunks/chunk.GNZIWPAU.js | 1 + .../shoelace/dist/chunks/chunk.GTFBBFI7.js | 8 - .../shoelace/dist/chunks/chunk.GTUXXKTG.js | 140 ---- .../shoelace/dist/chunks/chunk.GU7HQTHB.js | 1 - .../{chunk.FWRCRSIY.js => chunk.GUHZHNQS.js} | 2 +- .../shoelace/dist/chunks/chunk.GZ6BQYUU.js | 1 - .../shoelace/dist/chunks/chunk.GZKNJ77J.js | 2 +- .../{chunk.5Y4WECUT.js => chunk.H5PEWPG7.js} | 2 +- .../shoelace/dist/chunks/chunk.H7UDITUS.js | 4 +- .../shoelace/dist/chunks/chunk.HAP3IRC3.js | 1 + .../{chunk.SUMTNFRX.js => chunk.HM6R5Q44.js} | 2 +- .../shoelace/dist/chunks/chunk.HNLZQAGV.js | 1 - .../shoelace/dist/chunks/chunk.HQLHYAFA.js | 1 - .../shoelace/dist/chunks/chunk.HWUDMSYQ.js | 1 - .../shoelace/dist/chunks/chunk.I33L3NO6.js | 1 - .../shoelace/dist/chunks/chunk.I64IM243.js | 1 - .../shoelace/dist/chunks/chunk.I75I4KHI.js | 1 + .../shoelace/dist/chunks/chunk.I7AKVNN5.js | 1 - .../shoelace/dist/chunks/chunk.I7QNFR2M.js | 1 + .../shoelace/dist/chunks/chunk.IC3AQISN.js | 1 - .../shoelace/dist/chunks/chunk.ICXWI24A.js | 2 +- .../shoelace/dist/chunks/chunk.IIEUIBXQ.js | 1 - .../{chunk.WYWPK2VJ.js => chunk.IMNVXT6L.js} | 4 +- .../shoelace/dist/chunks/chunk.IUTAY6HX.js | 1 + .../{chunk.DV34JM5Y.js => chunk.IUVZRJJ3.js} | 2 +- .../shoelace/dist/chunks/chunk.J2HL7VHU.js | 1 - .../shoelace/dist/chunks/chunk.J4C6T45U.js | 1 + .../shoelace/dist/chunks/chunk.JAUPDQ7J.js | 2 +- .../shoelace/dist/chunks/chunk.JDJXAUM3.js | 1 + .../shoelace/dist/chunks/chunk.JFDG2DPA.js | 33 + .../shoelace/dist/chunks/chunk.JFX2C4R6.js | 1 + .../shoelace/dist/chunks/chunk.JJKKOZIV.js | 1 - .../shoelace/dist/chunks/chunk.JK44LDXB.js | 1 + .../{chunk.I5XYF2B3.js => chunk.JPV2F5NK.js} | 2 +- .../shoelace/dist/chunks/chunk.JTRTWFGW.js | 1 + .../shoelace/dist/chunks/chunk.JVPLRINV.js | 1 + .../shoelace/dist/chunks/chunk.K3EEJPQB.js | 2 +- .../shoelace/dist/chunks/chunk.K7UOELBZ.js | 1 + .../shoelace/dist/chunks/chunk.KCCRPUDF.js | 1 - .../shoelace/dist/chunks/chunk.KE4SI4YI.js | 1 - .../shoelace/dist/chunks/chunk.KNEPZGUA.js | 1 - .../shoelace/dist/chunks/chunk.KO2K2UNP.js | 1 + .../shoelace/dist/chunks/chunk.KQOUQHGE.js | 1 - .../shoelace/dist/chunks/chunk.KQVX545F.js | 1 - .../shoelace/dist/chunks/chunk.KR5BRAPI.js | 1 + .../shoelace/dist/chunks/chunk.KUF2NWBY.js | 1 - .../shoelace/dist/chunks/chunk.KVFV54OE.js | 2 +- .../shoelace/dist/chunks/chunk.KWXUPNTP.js | 1 + .../shoelace/dist/chunks/chunk.L3RLRN6Q.js | 1 + .../shoelace/dist/chunks/chunk.L3X5HQXV.js | 1 + .../shoelace/dist/chunks/chunk.L6B3WVUK.js | 1 - .../shoelace/dist/chunks/chunk.LG5WBL7M.js | 1 + .../shoelace/dist/chunks/chunk.LIXEQBT2.js | 1 + .../shoelace/dist/chunks/chunk.LJWCUBTW.js | 1 - .../shoelace/dist/chunks/chunk.LOVM4XL6.js | 2 +- .../shoelace/dist/chunks/chunk.LSWJYBJ7.js | 1 - .../shoelace/dist/chunks/chunk.LV6ZUIVI.js | 1 + .../shoelace/dist/chunks/chunk.LW4RYI2U.js | 1 - .../shoelace/dist/chunks/chunk.LXZGNEQQ.js | 1 + .../{chunk.M34G3YZA.js => chunk.M4HIRIJ5.js} | 4 +- .../shoelace/dist/chunks/chunk.M5MUC5CV.js | 2 +- .../shoelace/dist/chunks/chunk.MAS2SHYD.js | 1 + .../{chunk.POBNWM3I.js => chunk.MEXR4WYO.js} | 2 +- .../shoelace/dist/chunks/chunk.MGBTHMSL.js | 1 + .../shoelace/dist/chunks/chunk.MHVQZ7PS.js | 1 + .../shoelace/dist/chunks/chunk.MJRV6PHA.js | 1 + .../shoelace/dist/chunks/chunk.MLHBT46Z.js | 1 - .../shoelace/dist/chunks/chunk.MMIMZ23M.js | 1 - .../{chunk.EKHVZV23.js => chunk.MOTA2733.js} | 2 +- .../shoelace/dist/chunks/chunk.MPLFBEHE.js | 1 - .../shoelace/dist/chunks/chunk.MQHRZPPC.js | 2 +- .../shoelace/dist/chunks/chunk.MUPHLGOG.js | 1 - .../shoelace/dist/chunks/chunk.MWGWYI72.js | 1 + .../shoelace/dist/chunks/chunk.MXOAYAV3.js | 1 + .../shoelace/dist/chunks/chunk.NB2K6DNX.js | 1 - .../shoelace/dist/chunks/chunk.NGU6VN5C.js | 1 + .../shoelace/dist/chunks/chunk.NKNX6N77.js | 1 - .../shoelace/dist/chunks/chunk.NM27SBSV.js | 1 - .../shoelace/dist/chunks/chunk.NMJWOOZI.js | 25 + .../shoelace/dist/chunks/chunk.NNTNP4JH.js | 1 + .../{chunk.3CZS6ECK.js => chunk.NS3JH2ZN.js} | 2 +- .../shoelace/dist/chunks/chunk.NU54PZXL.js | 1 - .../shoelace/dist/chunks/chunk.O2JTN4AG.js | 1 + .../shoelace/dist/chunks/chunk.O4XSHJO2.js | 1 + .../shoelace/dist/chunks/chunk.O7QHERLE.js | 1 - .../shoelace/dist/chunks/chunk.OF6LVDZA.js | 1 - .../shoelace/dist/chunks/chunk.OMEFMDGX.js | 1 - .../shoelace/dist/chunks/chunk.OR2DLSUW.js | 1 + .../shoelace/dist/chunks/chunk.OY3QOKPY.js | 1 + .../{chunk.O4O6U4WJ.js => chunk.OYTYGR6R.js} | 2 +- .../shoelace/dist/chunks/chunk.OZYMGIJN.js | 1 + .../shoelace/dist/chunks/chunk.P3YSBVGI.js | 1 + .../shoelace/dist/chunks/chunk.P57G7BFL.js | 1 - .../shoelace/dist/chunks/chunk.PACZBQ7E.js | 1 + .../shoelace/dist/chunks/chunk.PE55NVFX.js | 1 - .../shoelace/dist/chunks/chunk.PH5IIYTE.js | 46 ++ .../shoelace/dist/chunks/chunk.PQM25SYA.js | 1 + .../{chunk.CYAWIBIC.js => chunk.Q6NWQWT3.js} | 2 +- .../shoelace/dist/chunks/chunk.QC67S7H5.js | 1 - .../shoelace/dist/chunks/chunk.QEVRAUGO.js | 1 - .../shoelace/dist/chunks/chunk.QQMN2P7K.js | 1 - .../shoelace/dist/chunks/chunk.QVUQ4TNC.js | 1 + .../{chunk.7BDKFUSY.js => chunk.QVVZOPAP.js} | 2 +- .../shoelace/dist/chunks/chunk.QWQMLSZY.js | 1 - .../shoelace/dist/chunks/chunk.QYDOKUM2.js | 1 + .../shoelace/dist/chunks/chunk.QZGTDMAZ.js | 1 - .../shoelace/dist/chunks/chunk.RBK2HKBZ.js | 1 + .../shoelace/dist/chunks/chunk.RNVKO5WM.js | 1 - .../shoelace/dist/chunks/chunk.RPUCV7HD.js | 1 + .../shoelace/dist/chunks/chunk.RSOSMS27.js | 1 - .../shoelace/dist/chunks/chunk.RU5ZFFFK.js | 1 + .../shoelace/dist/chunks/chunk.RXGCMXU4.js | 1 + .../shoelace/dist/chunks/chunk.RYPV34FN.js | 4 +- .../shoelace/dist/chunks/chunk.RYQQMTBS.js | 1 + .../{chunk.ZXVOFUQB.js => chunk.S4FBEA3Q.js} | 2 +- .../shoelace/dist/chunks/chunk.SEMCHBH4.js | 1 + .../shoelace/dist/chunks/chunk.SJA4DLBN.js | 1 - .../shoelace/dist/chunks/chunk.SMHG5MDN.js | 1 - .../shoelace/dist/chunks/chunk.SOFC3U3P.js | 1 - .../shoelace/dist/chunks/chunk.SPD5VU32.js | 8 +- .../shoelace/dist/chunks/chunk.SQ2NEPDW.js | 138 ++++ .../shoelace/dist/chunks/chunk.STFL2MFH.js | 1 - .../shoelace/dist/chunks/chunk.STNTUUNE.js | 1 + .../{chunk.LBC6JESY.js => chunk.STXFIMXZ.js} | 2 +- .../{chunk.KFR4Y7YR.js => chunk.SYZQFYHQ.js} | 2 +- .../shoelace/dist/chunks/chunk.SZS4IGBQ.js | 1 + .../{chunk.RXMELJZK.js => chunk.T26SSYRZ.js} | 2 +- .../shoelace/dist/chunks/chunk.T47IEDLN.js | 1 + .../shoelace/dist/chunks/chunk.T533KWVR.js | 1 + .../{chunk.5453BD52.js => chunk.T7LQNDC5.js} | 2 +- .../shoelace/dist/chunks/chunk.TA3B27V5.js | 1 + .../shoelace/dist/chunks/chunk.TD6B6IEL.js | 1 - .../shoelace/dist/chunks/chunk.TECP6JR2.js | 1 - .../shoelace/dist/chunks/chunk.THE5DOSH.js | 1 + .../shoelace/dist/chunks/chunk.TI56FHYX.js | 1 - .../shoelace/dist/chunks/chunk.TICGP7UW.js | 1 - .../{chunk.P5B6GUIV.js => chunk.TKQMYZOR.js} | 4 +- .../shoelace/dist/chunks/chunk.TLNU5YYZ.js | 1 - .../shoelace/dist/chunks/chunk.TLPGLTWN.js | 1 - .../shoelace/dist/chunks/chunk.TNCUFN5S.js | 13 + .../shoelace/dist/chunks/chunk.TOWVCX7O.js | 1 + .../shoelace/dist/chunks/chunk.TTMUWVWX.js | 1 + .../shoelace/dist/chunks/chunk.UCFEWFGG.js | 1 - .../shoelace/dist/chunks/chunk.UIWRDYII.js | 1 - .../shoelace/dist/chunks/chunk.UYJHNFGC.js | 1 + .../shoelace/dist/chunks/chunk.V2WC33GK.js | 1 - .../{chunk.W5P4KEEZ.js => chunk.V6KLYQCK.js} | 2 +- .../shoelace/dist/chunks/chunk.V77XD4UK.js | 1 + .../shoelace/dist/chunks/chunk.VDJ55VAV.js | 1 - .../shoelace/dist/chunks/chunk.VLPFGZU5.js | 1 - .../shoelace/dist/chunks/chunk.VPK2OSP4.js | 1 - .../{chunk.I3355KHS.js => chunk.VQAWWVRR.js} | 2 +- .../shoelace/dist/chunks/chunk.VRTJZYIC.js | 1 + .../shoelace/dist/chunks/chunk.VSSSMZFO.js | 1 + .../{chunk.YTKNJGSR.js => chunk.VTZVPCX4.js} | 2 +- .../shoelace/dist/chunks/chunk.VYC5B2AV.js | 1 + .../shoelace/dist/chunks/chunk.W4GZBNUN.js | 1 + .../{chunk.CEMITGOC.js => chunk.W5IOVX7A.js} | 2 +- .../shoelace/dist/chunks/chunk.WCP5CXI3.js | 1 + .../shoelace/dist/chunks/chunk.WEONPICB.js | 1 - .../shoelace/dist/chunks/chunk.WFZAUYTE.js | 1 + .../shoelace/dist/chunks/chunk.WLYACN3J.js | 1 - .../shoelace/dist/chunks/chunk.WSMO4YXA.js | 1 + .../shoelace/dist/chunks/chunk.WTYX4MI2.js | 1 - .../{chunk.23QSDHN7.js => chunk.WVF75JAX.js} | 2 +- .../shoelace/dist/chunks/chunk.WWTGXLZQ.js | 1 - .../shoelace/dist/chunks/chunk.X26O7UU2.js | 1 + .../shoelace/dist/chunks/chunk.X2QBSGH3.js | 1 - .../shoelace/dist/chunks/chunk.X5IGYTXC.js | 1 + .../shoelace/dist/chunks/chunk.XIUOIGOM.js | 1 + .../shoelace/dist/chunks/chunk.XLE25PEK.js | 1 + .../shoelace/dist/chunks/chunk.XMELOCBP.js | 1 + .../shoelace/dist/chunks/chunk.XTIYYQUD.js | 1 - .../shoelace/dist/chunks/chunk.Y4EMDR5Y.js | 1 - .../shoelace/dist/chunks/chunk.YAROS6UF.js | 2 +- .../shoelace/dist/chunks/chunk.YF47ODZL.js | 1 + .../shoelace/dist/chunks/chunk.YFIYHUIW.js | 1 - .../shoelace/dist/chunks/chunk.YFMRETPM.js | 1 - .../shoelace/dist/chunks/chunk.YIKPEXTH.js | 1 + .../shoelace/dist/chunks/chunk.YIQBNSY5.js | 1 - .../shoelace/dist/chunks/chunk.Z543R5TZ.js | 1 + .../shoelace/dist/chunks/chunk.Z5KRCOTW.js | 1 - .../shoelace/dist/chunks/chunk.Z75AU3J4.js | 1 - .../{chunk.7UUIUZXI.js => chunk.Z7XDKKOD.js} | 2 +- .../shoelace/dist/chunks/chunk.ZKCAPA5S.js | 1 + .../shoelace/dist/chunks/chunk.ZQG4CH57.js | 1 - .../shoelace/dist/chunks/chunk.ZTTMOB7X.js | 1 + .../shoelace/dist/chunks/chunk.ZX6DT5AE.js | 1 - .../shoelace/dist/chunks/chunk.ZXHMIE27.js | 1 + .../dist/components/alert/alert.component.js | 2 +- .../shoelace/dist/components/alert/alert.js | 2 +- .../dist/components/alert/alert.styles.js | 2 +- .../animated-image.component.js | 2 +- .../animated-image/animated-image.js | 2 +- .../animated-image/animated-image.styles.js | 2 +- .../animation/animation.component.js | 2 +- .../dist/components/animation/animation.js | 2 +- .../components/animation/animation.styles.js | 2 +- .../dist/components/animation/animations.js | 2 +- .../components/avatar/avatar.component.js | 2 +- .../shoelace/dist/components/avatar/avatar.js | 2 +- .../dist/components/avatar/avatar.styles.js | 2 +- .../dist/components/badge/badge.component.js | 2 +- .../shoelace/dist/components/badge/badge.js | 2 +- .../dist/components/badge/badge.styles.js | 2 +- .../breadcrumb-item.component.js | 2 +- .../breadcrumb-item/breadcrumb-item.js | 2 +- .../breadcrumb-item/breadcrumb-item.styles.js | 2 +- .../breadcrumb/breadcrumb.component.js | 2 +- .../dist/components/breadcrumb/breadcrumb.js | 2 +- .../breadcrumb/breadcrumb.styles.js | 2 +- .../button-group/button-group.component.js | 2 +- .../components/button-group/button-group.js | 2 +- .../button-group/button-group.styles.js | 2 +- .../components/button/button.component.js | 2 +- .../shoelace/dist/components/button/button.js | 2 +- .../dist/components/button/button.styles.js | 2 +- .../dist/components/card/card.component.js | 2 +- .../shoelace/dist/components/card/card.js | 2 +- .../dist/components/card/card.styles.js | 2 +- .../carousel-item/carousel-item.component.js | 2 +- .../components/carousel-item/carousel-item.js | 2 +- .../carousel-item/carousel-item.styles.js | 2 +- .../carousel/autoplay-controller.js | 2 +- .../components/carousel/carousel.component.js | 2 +- .../dist/components/carousel/carousel.js | 2 +- .../components/carousel/carousel.styles.js | 2 +- .../components/carousel/scroll-controller.js | 2 +- .../components/checkbox/checkbox.component.js | 2 +- .../dist/components/checkbox/checkbox.js | 2 +- .../components/checkbox/checkbox.styles.js | 2 +- .../color-picker/color-picker.component.js | 2 +- .../components/color-picker/color-picker.js | 2 +- .../color-picker/color-picker.styles.js | 2 +- .../copy-button/copy-button.component.js | 1 + .../components/copy-button/copy-button.js | 1 + .../copy-button/copy-button.styles.js | 1 + .../components/details/details.component.js | 2 +- .../dist/components/details/details.js | 2 +- .../dist/components/details/details.styles.js | 2 +- .../components/dialog/dialog.component.js | 2 +- .../shoelace/dist/components/dialog/dialog.js | 2 +- .../dist/components/dialog/dialog.styles.js | 2 +- .../components/divider/divider.component.js | 2 +- .../dist/components/divider/divider.js | 2 +- .../dist/components/divider/divider.styles.js | 2 +- .../components/drawer/drawer.component.js | 2 +- .../shoelace/dist/components/drawer/drawer.js | 2 +- .../dist/components/drawer/drawer.styles.js | 2 +- .../components/dropdown/dropdown.component.js | 2 +- .../dist/components/dropdown/dropdown.js | 2 +- .../components/dropdown/dropdown.styles.js | 2 +- .../format-bytes/format-bytes.component.js | 2 +- .../components/format-bytes/format-bytes.js | 2 +- .../format-date/format-date.component.js | 2 +- .../components/format-date/format-date.js | 2 +- .../format-number/format-number.component.js | 2 +- .../components/format-number/format-number.js | 2 +- .../icon-button/icon-button.component.js | 2 +- .../components/icon-button/icon-button.js | 2 +- .../icon-button/icon-button.styles.js | 2 +- .../dist/components/icon/icon.component.js | 2 +- .../shoelace/dist/components/icon/icon.js | 2 +- .../dist/components/icon/icon.styles.js | 2 +- .../dist/components/icon/library.default.js | 2 +- .../shoelace/dist/components/icon/library.js | 2 +- .../dist/components/icon/library.system.js | 2 +- .../image-comparer.component.js | 2 +- .../image-comparer/image-comparer.js | 2 +- .../image-comparer/image-comparer.styles.js | 2 +- .../components/include/include.component.js | 2 +- .../dist/components/include/include.js | 2 +- .../dist/components/include/include.styles.js | 2 +- .../dist/components/include/request.js | 2 +- .../dist/components/input/input.component.js | 2 +- .../shoelace/dist/components/input/input.js | 2 +- .../dist/components/input/input.styles.js | 2 +- .../menu-item/menu-item.component.js | 2 +- .../dist/components/menu-item/menu-item.js | 2 +- .../components/menu-item/menu-item.styles.js | 2 +- .../menu-item/submenu-controller.js | 1 + .../menu-label/menu-label.component.js | 2 +- .../dist/components/menu-label/menu-label.js | 2 +- .../menu-label/menu-label.styles.js | 2 +- .../dist/components/menu/menu.component.js | 2 +- .../shoelace/dist/components/menu/menu.js | 2 +- .../dist/components/menu/menu.styles.js | 2 +- .../mutation-observer.component.js | 2 +- .../mutation-observer/mutation-observer.js | 2 +- .../mutation-observer.styles.js | 2 +- .../components/option/option.component.js | 2 +- .../shoelace/dist/components/option/option.js | 2 +- .../dist/components/option/option.styles.js | 2 +- .../dist/components/popup/popup.component.js | 2 +- .../shoelace/dist/components/popup/popup.js | 2 +- .../dist/components/popup/popup.styles.js | 2 +- .../progress-bar/progress-bar.component.js | 2 +- .../components/progress-bar/progress-bar.js | 2 +- .../progress-bar/progress-bar.styles.js | 2 +- .../progress-ring/progress-ring.component.js | 2 +- .../components/progress-ring/progress-ring.js | 2 +- .../progress-ring/progress-ring.styles.js | 2 +- .../components/qr-code/qr-code.component.js | 2 +- .../dist/components/qr-code/qr-code.js | 2 +- .../dist/components/qr-code/qr-code.styles.js | 2 +- .../radio-button/radio-button.component.js | 2 +- .../components/radio-button/radio-button.js | 2 +- .../radio-button/radio-button.styles.js | 2 +- .../radio-group/radio-group.component.js | 2 +- .../components/radio-group/radio-group.js | 2 +- .../radio-group/radio-group.styles.js | 2 +- .../dist/components/radio/radio.component.js | 2 +- .../shoelace/dist/components/radio/radio.js | 2 +- .../dist/components/radio/radio.styles.js | 2 +- .../dist/components/range/range.component.js | 2 +- .../shoelace/dist/components/range/range.js | 2 +- .../dist/components/range/range.styles.js | 2 +- .../components/rating/rating.component.js | 2 +- .../shoelace/dist/components/rating/rating.js | 2 +- .../dist/components/rating/rating.styles.js | 2 +- .../relative-time/relative-time.component.js | 2 +- .../components/relative-time/relative-time.js | 2 +- .../resize-observer.component.js | 2 +- .../resize-observer/resize-observer.js | 2 +- .../resize-observer/resize-observer.styles.js | 2 +- .../components/select/select.component.js | 2 +- .../shoelace/dist/components/select/select.js | 2 +- .../dist/components/select/select.styles.js | 2 +- .../components/skeleton/skeleton.component.js | 2 +- .../dist/components/skeleton/skeleton.js | 2 +- .../components/skeleton/skeleton.styles.js | 2 +- .../components/spinner/spinner.component.js | 2 +- .../dist/components/spinner/spinner.js | 2 +- .../dist/components/spinner/spinner.styles.js | 2 +- .../split-panel/split-panel.component.js | 2 +- .../components/split-panel/split-panel.js | 2 +- .../split-panel/split-panel.styles.js | 2 +- .../components/switch/switch.component.js | 2 +- .../shoelace/dist/components/switch/switch.js | 2 +- .../dist/components/switch/switch.styles.js | 2 +- .../tab-group/tab-group.component.js | 2 +- .../dist/components/tab-group/tab-group.js | 2 +- .../components/tab-group/tab-group.styles.js | 2 +- .../tab-panel/tab-panel.component.js | 2 +- .../dist/components/tab-panel/tab-panel.js | 2 +- .../components/tab-panel/tab-panel.styles.js | 2 +- .../dist/components/tab/tab.component.js | 2 +- .../shoelace/dist/components/tab/tab.js | 2 +- .../dist/components/tab/tab.styles.js | 2 +- .../dist/components/tag/tag.component.js | 2 +- .../shoelace/dist/components/tag/tag.js | 2 +- .../dist/components/tag/tag.styles.js | 2 +- .../components/textarea/textarea.component.js | 2 +- .../dist/components/textarea/textarea.js | 2 +- .../components/textarea/textarea.styles.js | 2 +- .../components/tooltip/tooltip.component.js | 2 +- .../dist/components/tooltip/tooltip.js | 2 +- .../dist/components/tooltip/tooltip.styles.js | 2 +- .../tree-item/tree-item.component.js | 2 +- .../dist/components/tree-item/tree-item.js | 2 +- .../components/tree-item/tree-item.styles.js | 2 +- .../dist/components/tree/tree.component.js | 2 +- .../shoelace/dist/components/tree/tree.js | 2 +- .../dist/components/tree/tree.styles.js | 2 +- .../visually-hidden.component.js | 2 +- .../visually-hidden/visually-hidden.js | 2 +- .../visually-hidden/visually-hidden.styles.js | 2 +- .../shoelace/dist/react/index.js | 2 +- .../shoelace/dist/shoelace-autoloader.js | 2 +- .../@shoelace-style/shoelace/dist/shoelace.js | 2 +- .../shoelace/dist/translations/da.js | 2 +- .../shoelace/dist/translations/de-ch.js | 2 +- .../shoelace/dist/translations/de.js | 2 +- .../shoelace/dist/translations/en-gb.js | 2 +- .../shoelace/dist/translations/en.js | 2 +- .../shoelace/dist/translations/es.js | 2 +- .../shoelace/dist/translations/fa.js | 2 +- .../shoelace/dist/translations/fr.js | 2 +- .../shoelace/dist/translations/he.js | 2 +- .../shoelace/dist/translations/hu.js | 2 +- .../shoelace/dist/translations/ja.js | 2 +- .../shoelace/dist/translations/nl.js | 2 +- .../shoelace/dist/translations/pl.js | 2 +- .../shoelace/dist/translations/pt.js | 2 +- .../shoelace/dist/translations/ru.js | 2 +- .../shoelace/dist/translations/sv.js | 2 +- .../shoelace/dist/translations/tr.js | 2 +- .../shoelace/dist/translations/zh-tw.js | 2 +- .../dist/utilities/animation-registry.js | 2 +- .../shoelace/dist/utilities/animation.js | 2 +- .../shoelace/dist/utilities/base-path.js | 2 +- .../shoelace/dist/utilities/form.js | 2 +- .../shoelace/dist/utilities/icon-library.js | 2 +- .../shoelace/dist/utilities/localize.js | 2 +- .../lit-element/decorators.d.ts.map | 2 +- .../experimental-hydrate-support.d.ts.map | 1 - .../experimental-hydrate-support.js.map | 1 - .../node_modules/lit-element/index.d.ts.map | 2 +- .../es6/node_modules/lit-element/index.js.map | 2 +- .../lit-element/lit-element.d.ts.map | 2 +- .../node_modules/lit-element/lit-element.js | 4 +- .../lit-element/lit-element.js.map | 2 +- .../lit-element/polyfill-support.js.map | 2 +- .../node_modules/lit-html/async-directive.js | 4 +- .../lit-html/async-directive.js.map | 2 +- .../lit-html/development/async-directive.js | 2 +- .../development/async-directive.js.map | 2 +- .../development/directive-helpers.d.ts.map | 2 +- .../lit-html/development/directive-helpers.js | 2 +- .../development/directive-helpers.js.map | 2 +- .../lit-html/development/directive.d.ts.map | 2 +- .../development/experimental-hydrate.d.ts.map | 1 - .../development/experimental-hydrate.js | 6 - .../development/experimental-hydrate.js.map | 1 - .../lit-html/development/lit-html.d.ts.map | 2 +- .../lit-html/development/lit-html.js | 2 +- .../lit-html/development/lit-html.js.map | 2 +- .../development/polyfill-support.js.map | 2 +- .../lit-html/development/static.js | 2 +- .../lit-html/development/static.js.map | 2 +- .../lit-html/directive-helpers.d.ts.map | 2 +- .../lit-html/directive-helpers.js | 4 +- .../lit-html/directive-helpers.js.map | 2 +- .../node_modules/lit-html/directive.d.ts.map | 2 +- .../node_modules/lit-html/directive.js.map | 2 +- .../lit-html/directives/async-append.js.map | 2 +- .../directives/async-replace.d.ts.map | 2 +- .../lit-html/directives/async-replace.js.map | 2 +- .../lit-html/directives/cache.d.ts.map | 2 +- .../node_modules/lit-html/directives/cache.js | 4 +- .../lit-html/directives/cache.js.map | 2 +- .../lit-html/directives/choose.d.ts.map | 2 +- .../lit-html/directives/choose.js | 2 +- .../lit-html/directives/choose.js.map | 2 +- .../lit-html/directives/class-map.d.ts.map | 2 +- .../lit-html/directives/class-map.js | 4 +- .../lit-html/directives/class-map.js.map | 2 +- .../node_modules/lit-html/directives/guard.js | 4 +- .../lit-html/directives/guard.js.map | 2 +- .../lit-html/directives/if-defined.js | 2 +- .../lit-html/directives/if-defined.js.map | 2 +- .../lit-html/directives/keyed.js.map | 2 +- .../lit-html/directives/live.js.map | 2 +- .../directives/private-async-helpers.js | 2 +- .../directives/private-async-helpers.js.map | 2 +- .../node_modules/lit-html/directives/range.js | 2 +- .../lit-html/directives/range.js.map | 2 +- .../lit-html/directives/ref.d.ts.map | 2 +- .../node_modules/lit-html/directives/ref.js | 2 +- .../lit-html/directives/ref.js.map | 2 +- .../lit-html/directives/repeat.d.ts.map | 2 +- .../lit-html/directives/repeat.js | 2 +- .../lit-html/directives/repeat.js.map | 2 +- .../lit-html/directives/style-map.d.ts.map | 2 +- .../lit-html/directives/style-map.js | 4 +- .../lit-html/directives/style-map.js.map | 2 +- .../lit-html/directives/template-content.js | 2 +- .../directives/template-content.js.map | 2 +- .../lit-html/directives/unsafe-html.js | 2 +- .../lit-html/directives/unsafe-html.js.map | 2 +- .../lit-html/directives/until.d.ts.map | 2 +- .../node_modules/lit-html/directives/until.js | 2 +- .../lit-html/directives/until.js.map | 2 +- .../lit-html/directives/when.d.ts.map | 2 +- .../node_modules/lit-html/directives/when.js | 2 +- .../lit-html/directives/when.js.map | 2 +- .../lit-html/experimental-hydrate.d.ts.map | 1 - .../lit-html/experimental-hydrate.js | 6 - .../lit-html/experimental-hydrate.js.map | 1 - .../node_modules/lit-html/lit-html.d.ts.map | 2 +- .../es6/node_modules/lit-html/lit-html.js | 2 +- .../es6/node_modules/lit-html/lit-html.js.map | 2 +- .../lit-html/node/async-directive.js | 4 +- .../lit-html/node/async-directive.js.map | 2 +- .../lit-html/node/directive-helpers.js | 4 +- .../lit-html/node/directive-helpers.js.map | 2 +- .../lit-html/node/directive.js.map | 2 +- .../lit-html/node/experimental-hydrate.js | 1 - .../lit-html/node/experimental-hydrate.js.map | 1 - .../node_modules/lit-html/node/lit-html.js | 2 +- .../lit-html/node/lit-html.js.map | 2 +- .../lit-html/node/polyfill-support.js.map | 2 +- .../lit-html/node/private-ssr-support.js | 2 +- .../lit-html/node/private-ssr-support.js.map | 2 +- .../es6/node_modules/lit-html/node/static.js | 4 +- .../node_modules/lit-html/node/static.js.map | 2 +- .../lit-html/polyfill-support.js.map | 2 +- .../lit-html/private-ssr-support.js | 2 +- .../lit-html/private-ssr-support.js.map | 2 +- .../build/es6/node_modules/lit-html/static.js | 4 +- .../es6/node_modules/lit-html/static.js.map | 2 +- .../lit/experimental-hydrate-support.js | 1 - .../node_modules/lit/experimental-hydrate.js | 1 - .../es6/node_modules/mobx/dist/mobx.esm.js | 2 +- .../min-maps/vs/base/worker/workerMain.js.map | 1 - .../min-maps/vs/editor/editor.main.js.map | 1 - .../vs/editor/editor.main.nls.de.js.map | 1 - .../vs/editor/editor.main.nls.es.js.map | 1 - .../vs/editor/editor.main.nls.fr.js.map | 1 - .../vs/editor/editor.main.nls.it.js.map | 1 - .../vs/editor/editor.main.nls.ja.js.map | 1 - .../min-maps/vs/editor/editor.main.nls.js.map | 1 - .../vs/editor/editor.main.nls.ko.js.map | 1 - .../vs/editor/editor.main.nls.ru.js.map | 1 - .../vs/editor/editor.main.nls.zh-cn.js.map | 1 - .../vs/editor/editor.main.nls.zh-tw.js.map | 1 - .../monaco-editor/min-maps/vs/loader.js.map | 1 - .../min/vs/language/typescript/tsMode.js | 7 - .../min/vs/language/typescript/tsWorker.js | 7 - .../monaco-editor/min/vs/loader.js | 10 +- .../build/es6/node_modules/tslib/tslib.es6.js | 2 +- haxcms/build/es6/node_modules/tslib/tslib.js | 2 +- haxcms/build/polymer.json | 13 +- haxcms/wc-registry.json | 2 +- 1924 files changed, 15168 insertions(+), 3702 deletions(-) create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/events.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js create mode 100644 cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/css-tag.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators.js create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.d.ts.map create mode 100644 cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js.map create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/collection-list.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.haxProperties.json create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-list.haxProperties.json create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme-banner.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/date-card/lib/date-chip.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/discord-embed/discord-embed.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/discord-embed/lib/discord-embed.haxProperties.json create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/documentation-player/documentation-player.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro11.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro120.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro130.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro140.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol11.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol110.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol120n.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol133.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol141.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol155.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol177.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci001.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci002.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci003.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci004.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bmmb551.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bmmb852.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem005.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem101.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem110.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc100.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc200.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc210.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math021.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math022.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math034.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math036.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math110.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math140.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math220.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math436.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/phys010.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/accessibility.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/apps.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/assess.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/camera.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/collaborate.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/computer.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/computer2.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/consult.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/container.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/documents.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/email.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/engage.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/engage2.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/examity.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/flikr.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/gears.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/globe.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/graph.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/idea.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/image.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/monitor.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/motivate.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/ngdle.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/oer.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/phone.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/podcast.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/quick.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/reportcard.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/reuse.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/scroll.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/time.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/video.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/vimeo.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/vr.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/wand.svg create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/ui/haxcms-page-get-started.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/utils/EmailPageMixin.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/layout/site-region.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.haxProperties.json create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/page-section/lib/page-section.haxProperties.json create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/play-list/lib/dark.css create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/play-list/lib/light.css create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-cta.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-mark.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-story-card.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-tile.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/polaris-theme/polaris-theme.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/super-daemon/lib/super-daemon-search.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/training-theme/lib/training-button.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/training-theme/lib/training-top.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/training-theme/training-theme.js create mode 100644 cdn/build/es6/node_modules/@lrnwebcomponents/user-scaffold/user-scaffold.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.A4EV4GKC.js => chunk.25E2J7HG.js} (73%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.L4EUGKFG.js => chunk.2B7ZRWV6.js} (85%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2BBYS2AO.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2KNNLHT6.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2NHP677Q.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2OFNWZUO.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CB4P5CRU.js => chunk.2Q6UBMUG.js} (86%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2UWHTLTB.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2XWK25GF.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.35QQGKS6.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3ALMDSO3.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CRA7IQJI.js => chunk.3BZZHSGR.js} (94%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3CX5T7GV.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JOEELO5U.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3MCR2MLV.js (95%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3P2DZVT6.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3RXVXJ7N.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3TUFDOAI.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.QSGNZ7NT.js => chunk.3WAW4E2K.js} (68%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3YMXKNHC.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4C46DIIN.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7SWWPU3.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4EF2BVHR.js (96%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4FS6RVQD.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.BZCHZMPK.js => chunk.4K5O6KJW.js} (93%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.RAU7GTRD.js => chunk.4O6DKE6L.js} (75%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4SHVD2KD.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4XQCFFMS.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4ZAOOFNS.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5CIGH6UI.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5DFMJ727.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5E2TGPJ7.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5F6CPPXO.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5FCCRNG7.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5GIPFTSS.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5HRUL7SO.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5NBMQ7EG.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AXJGIJ6I.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5SZQCM5C.js (90%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MXLUC5E3.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5VCP5UVV.js (95%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5WDU5R6O.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5ZUXEXMC.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.62Q7SWNI.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.66XNORJX.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.67AISYA7.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6CDLFZKN.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6JGF6LBR.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6M63UXML.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.A2IRGVGD.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6MZVKFZA.js (51%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.BV3WOJKI.js => chunk.6O2NRLBS.js} (89%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6Q3FCZAW.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GIIHC72T.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6RQLINWQ.js (51%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.73ZNTPJA.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7EJIBXTA.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7IL5PZUP.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7JPBV455.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7RHUXUVD.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7RZIFKWO.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7WBAK746.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UH4XZRLW.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7XPK5EMC.js (94%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AI4KLJFS.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5UPJYW7M.js => chunk.AKA25VYF.js} (93%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ANTU6G35.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BAD6C56T.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BDDLQS6W.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BGV6NJUJ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BT7SAYED.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BUMKX4R7.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BVRD5G5W.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BYQQMUHG.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CJDR7567.js => chunk.C7FWPEOY.js} (81%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CEU4JDVC.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CHUGVITZ.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CI55NCYE.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O32WFMMH.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CJHUIM54.js (91%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.XYSY2YZG.js => chunk.CJQ7EQHG.js} (93%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O5XSCRGW.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CPX2UCQ4.js (97%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.G3SPB25T.js => chunk.CROELWR3.js} (50%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.4P2RHPJ7.js => chunk.CTNDET4S.js} (51%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CTT4DASP.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.AMHT72HT.js => chunk.CWLYIQXA.js} (96%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CXGTBNQE.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.D7CPEJLD.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DEQSCERF.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DFIUKINQ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DHO3GHQI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DIRIFXCD.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DK3WZXBM.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DMEYE672.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RLM4MLNE.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DMMWHXUG.js (91%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DRGLPI2A.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DRJODFCK.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DT3OOL5X.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.HNH4USWO.js => chunk.DTS7GKZE.js} (92%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DWRCQAX7.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DZ6MZKZJ.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2FTXJG3.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2JGAFR4.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2UVQKJF.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BI7DHIJN.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EJ24F4FA.js (89%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7ZCMJKGF.js => chunk.EMSHC2UY.js} (71%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EPB7DJXC.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EQP3JFQP.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IHME2EMJ.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EUKH7EAE.js (89%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EV3UDTBM.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7B5CCNHM.js => chunk.EXFTDGGG.js} (93%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F264RLPY.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F326FFZY.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F4LOVXDH.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F5BGAPMF.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F62XCO4D.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FBNMNT3O.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FFXRPXNL.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.6IPOEJS3.js => chunk.FKPAMLVJ.js} (84%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FMRCD3VN.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FQI2ZI2B.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FQWN2XRJ.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FUOM65BJ.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IVQNJU3Y.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FVEJRUOQ.js (99%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G36MCQ7Z.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G7UWKMCZ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GCN3DWSD.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GF4UCFQ6.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.SH6R2Z4A.js => chunk.GGORWW4N.js} (50%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GLGPZRLI.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GNZIWPAU.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GTFBBFI7.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GTUXXKTG.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GU7HQTHB.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.FWRCRSIY.js => chunk.GUHZHNQS.js} (90%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GZ6BQYUU.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SL63ZM7T.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GZKNJ77J.js (97%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5Y4WECUT.js => chunk.H5PEWPG7.js} (87%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B7JJGOCZ.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.H7UDITUS.js (57%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HAP3IRC3.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.SUMTNFRX.js => chunk.HM6R5Q44.js} (92%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HNLZQAGV.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HQLHYAFA.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HWUDMSYQ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I33L3NO6.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I64IM243.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I75I4KHI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7AKVNN5.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7QNFR2M.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IC3AQISN.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QDRH7R4A.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ICXWI24A.js (94%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IIEUIBXQ.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.WYWPK2VJ.js => chunk.IMNVXT6L.js} (84%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IUTAY6HX.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.DV34JM5Y.js => chunk.IUVZRJJ3.js} (85%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J2HL7VHU.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J4C6T45U.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IQZHG2D6.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JAUPDQ7J.js (91%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JDJXAUM3.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JFDG2DPA.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JFX2C4R6.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JJKKOZIV.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JK44LDXB.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.I5XYF2B3.js => chunk.JPV2F5NK.js} (88%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JTRTWFGW.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JVPLRINV.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6NO6TOOK.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K3EEJPQB.js (93%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K7UOELBZ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KCCRPUDF.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KE4SI4YI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KNEPZGUA.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KO2K2UNP.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KQOUQHGE.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KQVX545F.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KR5BRAPI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KUF2NWBY.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KCX7ISQ4.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KVFV54OE.js (91%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KWXUPNTP.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L3RLRN6Q.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L3X5HQXV.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L6B3WVUK.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LG5WBL7M.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LIXEQBT2.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LJWCUBTW.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MOS626YU.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LOVM4XL6.js (91%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LSWJYBJ7.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LV6ZUIVI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LW4RYI2U.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXZGNEQQ.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.M34G3YZA.js => chunk.M4HIRIJ5.js} (72%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BWSFZ3II.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.M5MUC5CV.js (95%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.POBNWM3I.js => chunk.MEXR4WYO.js} (96%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MGBTHMSL.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MHVQZ7PS.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MJRV6PHA.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MLHBT46Z.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MMIMZ23M.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.EKHVZV23.js => chunk.MOTA2733.js} (93%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MPLFBEHE.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PO5F4WEH.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MQHRZPPC.js (91%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MUPHLGOG.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MWGWYI72.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MXOAYAV3.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NB2K6DNX.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MMXCXQOI.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NGU6VN5C.js (98%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NKNX6N77.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NM27SBSV.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NMJWOOZI.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NNTNP4JH.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.3CZS6ECK.js => chunk.NS3JH2ZN.js} (98%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NU54PZXL.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O2JTN4AG.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O4XSHJO2.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O7QHERLE.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OF6LVDZA.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OMEFMDGX.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OR2DLSUW.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OY3QOKPY.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.O4O6U4WJ.js => chunk.OYTYGR6R.js} (76%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OZYMGIJN.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P3YSBVGI.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P57G7BFL.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PACZBQ7E.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PE55NVFX.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PH5IIYTE.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PQM25SYA.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CYAWIBIC.js => chunk.Q6NWQWT3.js} (90%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QC67S7H5.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QEVRAUGO.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QQMN2P7K.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QVUQ4TNC.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7BDKFUSY.js => chunk.QVVZOPAP.js} (53%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QWQMLSZY.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QYDOKUM2.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QZGTDMAZ.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RBK2HKBZ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RNVKO5WM.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RPUCV7HD.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RSOSMS27.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RU5ZFFFK.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RXGCMXU4.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QTAHAGHK.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RYPV34FN.js (62%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RYQQMTBS.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.ZXVOFUQB.js => chunk.S4FBEA3Q.js} (78%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SEMCHBH4.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SJA4DLBN.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SMHG5MDN.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SOFC3U3P.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7JULRNN5.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SPD5VU32.js (93%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SQ2NEPDW.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.STFL2MFH.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.STNTUUNE.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.LBC6JESY.js => chunk.STXFIMXZ.js} (81%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.KFR4Y7YR.js => chunk.SYZQFYHQ.js} (82%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SZS4IGBQ.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.RXMELJZK.js => chunk.T26SSYRZ.js} (90%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.T47IEDLN.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.T533KWVR.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5453BD52.js => chunk.T7LQNDC5.js} (95%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TA3B27V5.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TD6B6IEL.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TECP6JR2.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.THE5DOSH.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TI56FHYX.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TICGP7UW.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.P5B6GUIV.js => chunk.TKQMYZOR.js} (69%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TLNU5YYZ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TLPGLTWN.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TNCUFN5S.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TOWVCX7O.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TTMUWVWX.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UCFEWFGG.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UIWRDYII.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UYJHNFGC.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.V2WC33GK.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.W5P4KEEZ.js => chunk.V6KLYQCK.js} (84%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.V77XD4UK.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VDJ55VAV.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VLPFGZU5.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VPK2OSP4.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.I3355KHS.js => chunk.VQAWWVRR.js} (94%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VRTJZYIC.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VSSSMZFO.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.YTKNJGSR.js => chunk.VTZVPCX4.js} (95%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VYC5B2AV.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.W4GZBNUN.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CEMITGOC.js => chunk.W5IOVX7A.js} (87%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WCP5CXI3.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WEONPICB.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WFZAUYTE.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLYACN3J.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WSMO4YXA.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WTYX4MI2.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.23QSDHN7.js => chunk.WVF75JAX.js} (86%) delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WWTGXLZQ.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X26O7UU2.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X2QBSGH3.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X5IGYTXC.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XIUOIGOM.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XLE25PEK.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XMELOCBP.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XTIYYQUD.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Y4EMDR5Y.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VCLBTQVE.js => cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YAROS6UF.js (82%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YF47ODZL.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YFIYHUIW.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YFMRETPM.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YIKPEXTH.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YIQBNSY5.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z543R5TZ.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z5KRCOTW.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z75AU3J4.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7UUIUZXI.js => chunk.Z7XDKKOD.js} (79%) create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZKCAPA5S.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZQG4CH57.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZTTMOB7X.js delete mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZX6DT5AE.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZXHMIE27.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.component.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.styles.js create mode 100644 cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/components/menu-item/submenu-controller.js delete mode 100644 cdn/build/es6/node_modules/lit-element/experimental-hydrate-support.d.ts.map delete mode 100644 cdn/build/es6/node_modules/lit-element/experimental-hydrate-support.js.map delete mode 100644 cdn/build/es6/node_modules/lit-html/development/experimental-hydrate.d.ts.map delete mode 100644 cdn/build/es6/node_modules/lit-html/development/experimental-hydrate.js delete mode 100644 cdn/build/es6/node_modules/lit-html/development/experimental-hydrate.js.map delete mode 100644 cdn/build/es6/node_modules/lit-html/experimental-hydrate.d.ts.map delete mode 100644 cdn/build/es6/node_modules/lit-html/experimental-hydrate.js delete mode 100644 cdn/build/es6/node_modules/lit-html/experimental-hydrate.js.map delete mode 100644 cdn/build/es6/node_modules/lit-html/node/experimental-hydrate.js delete mode 100644 cdn/build/es6/node_modules/lit-html/node/experimental-hydrate.js.map delete mode 100644 cdn/build/es6/node_modules/lit/experimental-hydrate-support.js delete mode 100644 cdn/build/es6/node_modules/lit/experimental-hydrate.js delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/base/worker/workerMain.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.de.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.es.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.fr.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.it.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ja.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ko.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ru.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.zh-cn.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.zh-tw.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min-maps/vs/loader.js.map delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min/vs/language/typescript/tsMode.js delete mode 100644 cdn/build/es6/node_modules/monaco-editor/min/vs/language/typescript/tsWorker.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/events.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/events.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/events.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/virtualize.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js create mode 100644 haxcms/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/css-tag.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/css-tag.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators.js create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/base.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/base.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/property.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/property.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/query.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/state.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/decorators/state.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/polyfill-support.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/polyfill-support.js create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/polyfill-support.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/reactive-controller.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/reactive-controller.js create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/reactive-controller.js.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/reactive-element.d.ts.map create mode 100644 haxcms/build/es6/node_modules/@lit/reactive-element/reactive-element.js.map create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/collection-list.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.haxProperties.json create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-list.haxProperties.json create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme-banner.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/lib/date-chip.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/discord-embed.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/lib/discord-embed.haxProperties.json create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/documentation-player/documentation-player.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro11.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro120.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro130.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/astro140.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol11.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol110.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol120n.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol133.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol141.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol155.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/biol177.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci001.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci002.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci003.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bisci004.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bmmb551.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/bmmb852.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem005.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem101.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/chem110.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc100.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc200.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/frnsc210.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math021.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math022.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math034.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math036.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math110.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math140.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math220.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/math436.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/courseicons/phys010.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/accessibility.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/apps.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/assess.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/camera.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/collaborate.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/computer.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/computer2.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/consult.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/container.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/documents.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/email.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/engage.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/engage2.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/examity.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/flikr.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/gears.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/globe.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/graph.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/idea.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/image.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/monitor.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/motivate.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/ngdle.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/oer.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/phone.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/podcast.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/quick.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/reportcard.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/reuse.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/scroll.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/time.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/video.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/vimeo.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/vr.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/hax-iconset/lib/svgs/hax/wand.svg create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/ui/haxcms-page-get-started.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/utils/EmailPageMixin.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/layout/site-region.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.haxProperties.json create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/page-section/lib/page-section.haxProperties.json create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/play-list/lib/dark.css create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/play-list/lib/light.css create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-cta.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-mark.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-story-card.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/polaris-theme/lib/polaris-tile.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/polaris-theme/polaris-theme.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/super-daemon/lib/super-daemon-search.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/training-theme/lib/training-button.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/training-theme/lib/training-top.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/training-theme/training-theme.js create mode 100644 haxcms/build/es6/node_modules/@lrnwebcomponents/user-scaffold/user-scaffold.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.A4EV4GKC.js => chunk.25E2J7HG.js} (73%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.L4EUGKFG.js => chunk.2B7ZRWV6.js} (85%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2BBYS2AO.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2KNNLHT6.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2NHP677Q.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2OFNWZUO.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CB4P5CRU.js => chunk.2Q6UBMUG.js} (86%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2UWHTLTB.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2XWK25GF.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.35QQGKS6.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3ALMDSO3.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CRA7IQJI.js => chunk.3BZZHSGR.js} (94%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3CX5T7GV.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JOEELO5U.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3MCR2MLV.js (95%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3P2DZVT6.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3RXVXJ7N.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3TUFDOAI.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.QSGNZ7NT.js => chunk.3WAW4E2K.js} (68%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3YMXKNHC.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4C46DIIN.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7SWWPU3.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4EF2BVHR.js (96%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4FS6RVQD.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.BZCHZMPK.js => chunk.4K5O6KJW.js} (93%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.RAU7GTRD.js => chunk.4O6DKE6L.js} (75%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4SHVD2KD.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4XQCFFMS.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4ZAOOFNS.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5CIGH6UI.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5DFMJ727.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5E2TGPJ7.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5F6CPPXO.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5FCCRNG7.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5GIPFTSS.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5HRUL7SO.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5NBMQ7EG.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AXJGIJ6I.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5SZQCM5C.js (90%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MXLUC5E3.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5VCP5UVV.js (95%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5WDU5R6O.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5ZUXEXMC.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.62Q7SWNI.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.66XNORJX.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.67AISYA7.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6CDLFZKN.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6JGF6LBR.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6M63UXML.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.A2IRGVGD.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6MZVKFZA.js (51%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.BV3WOJKI.js => chunk.6O2NRLBS.js} (89%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6Q3FCZAW.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GIIHC72T.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6RQLINWQ.js (51%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.73ZNTPJA.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7EJIBXTA.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7IL5PZUP.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7JPBV455.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7RHUXUVD.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7RZIFKWO.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7WBAK746.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UH4XZRLW.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7XPK5EMC.js (94%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AI4KLJFS.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5UPJYW7M.js => chunk.AKA25VYF.js} (93%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ANTU6G35.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BAD6C56T.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BDDLQS6W.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BGV6NJUJ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BT7SAYED.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BUMKX4R7.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BVRD5G5W.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BYQQMUHG.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CJDR7567.js => chunk.C7FWPEOY.js} (81%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CEU4JDVC.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CHUGVITZ.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CI55NCYE.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O32WFMMH.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CJHUIM54.js (91%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.XYSY2YZG.js => chunk.CJQ7EQHG.js} (93%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O5XSCRGW.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CPX2UCQ4.js (97%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.G3SPB25T.js => chunk.CROELWR3.js} (50%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.4P2RHPJ7.js => chunk.CTNDET4S.js} (51%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CTT4DASP.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.AMHT72HT.js => chunk.CWLYIQXA.js} (96%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CXGTBNQE.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.D7CPEJLD.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DEQSCERF.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DFIUKINQ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DHO3GHQI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DIRIFXCD.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DK3WZXBM.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DMEYE672.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RLM4MLNE.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DMMWHXUG.js (91%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DRGLPI2A.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DRJODFCK.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DT3OOL5X.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.HNH4USWO.js => chunk.DTS7GKZE.js} (92%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DWRCQAX7.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DZ6MZKZJ.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2FTXJG3.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2JGAFR4.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.E2UVQKJF.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BI7DHIJN.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EJ24F4FA.js (89%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7ZCMJKGF.js => chunk.EMSHC2UY.js} (71%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EPB7DJXC.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EQP3JFQP.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IHME2EMJ.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EUKH7EAE.js (89%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EV3UDTBM.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7B5CCNHM.js => chunk.EXFTDGGG.js} (93%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F264RLPY.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F326FFZY.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F4LOVXDH.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F5BGAPMF.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.F62XCO4D.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FBNMNT3O.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FFXRPXNL.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.6IPOEJS3.js => chunk.FKPAMLVJ.js} (84%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FMRCD3VN.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FQI2ZI2B.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FQWN2XRJ.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FUOM65BJ.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IVQNJU3Y.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FVEJRUOQ.js (99%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G36MCQ7Z.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G7UWKMCZ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GCN3DWSD.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GF4UCFQ6.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.SH6R2Z4A.js => chunk.GGORWW4N.js} (50%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GLGPZRLI.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GNZIWPAU.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GTFBBFI7.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GTUXXKTG.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GU7HQTHB.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.FWRCRSIY.js => chunk.GUHZHNQS.js} (90%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GZ6BQYUU.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SL63ZM7T.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GZKNJ77J.js (97%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5Y4WECUT.js => chunk.H5PEWPG7.js} (87%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B7JJGOCZ.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.H7UDITUS.js (57%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HAP3IRC3.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.SUMTNFRX.js => chunk.HM6R5Q44.js} (92%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HNLZQAGV.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HQLHYAFA.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HWUDMSYQ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I33L3NO6.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I64IM243.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I75I4KHI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7AKVNN5.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.I7QNFR2M.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IC3AQISN.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QDRH7R4A.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ICXWI24A.js (94%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IIEUIBXQ.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.WYWPK2VJ.js => chunk.IMNVXT6L.js} (84%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IUTAY6HX.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.DV34JM5Y.js => chunk.IUVZRJJ3.js} (85%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J2HL7VHU.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J4C6T45U.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IQZHG2D6.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JAUPDQ7J.js (91%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JDJXAUM3.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JFDG2DPA.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JFX2C4R6.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JJKKOZIV.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JK44LDXB.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.I5XYF2B3.js => chunk.JPV2F5NK.js} (88%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JTRTWFGW.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JVPLRINV.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6NO6TOOK.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K3EEJPQB.js (93%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K7UOELBZ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KCCRPUDF.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KE4SI4YI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KNEPZGUA.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KO2K2UNP.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KQOUQHGE.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KQVX545F.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KR5BRAPI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KUF2NWBY.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KCX7ISQ4.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KVFV54OE.js (91%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KWXUPNTP.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L3RLRN6Q.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L3X5HQXV.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.L6B3WVUK.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LG5WBL7M.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LIXEQBT2.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LJWCUBTW.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MOS626YU.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LOVM4XL6.js (91%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LSWJYBJ7.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LV6ZUIVI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LW4RYI2U.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXZGNEQQ.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.M34G3YZA.js => chunk.M4HIRIJ5.js} (72%) rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BWSFZ3II.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.M5MUC5CV.js (95%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.POBNWM3I.js => chunk.MEXR4WYO.js} (96%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MGBTHMSL.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MHVQZ7PS.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MJRV6PHA.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MLHBT46Z.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MMIMZ23M.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.EKHVZV23.js => chunk.MOTA2733.js} (93%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MPLFBEHE.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PO5F4WEH.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MQHRZPPC.js (91%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MUPHLGOG.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MWGWYI72.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MXOAYAV3.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NB2K6DNX.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MMXCXQOI.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NGU6VN5C.js (98%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NKNX6N77.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NM27SBSV.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NMJWOOZI.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NNTNP4JH.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.3CZS6ECK.js => chunk.NS3JH2ZN.js} (98%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NU54PZXL.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O2JTN4AG.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O4XSHJO2.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.O7QHERLE.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OF6LVDZA.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OMEFMDGX.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OR2DLSUW.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OY3QOKPY.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.O4O6U4WJ.js => chunk.OYTYGR6R.js} (76%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.OZYMGIJN.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P3YSBVGI.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P57G7BFL.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PACZBQ7E.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PE55NVFX.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PH5IIYTE.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.PQM25SYA.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CYAWIBIC.js => chunk.Q6NWQWT3.js} (90%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QC67S7H5.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QEVRAUGO.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QQMN2P7K.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QVUQ4TNC.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7BDKFUSY.js => chunk.QVVZOPAP.js} (53%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QWQMLSZY.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QYDOKUM2.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QZGTDMAZ.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RBK2HKBZ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RNVKO5WM.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RPUCV7HD.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RSOSMS27.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RU5ZFFFK.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RXGCMXU4.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QTAHAGHK.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RYPV34FN.js (62%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RYQQMTBS.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.ZXVOFUQB.js => chunk.S4FBEA3Q.js} (78%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SEMCHBH4.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SJA4DLBN.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SMHG5MDN.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SOFC3U3P.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7JULRNN5.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SPD5VU32.js (93%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SQ2NEPDW.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.STFL2MFH.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.STNTUUNE.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.LBC6JESY.js => chunk.STXFIMXZ.js} (81%) rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.KFR4Y7YR.js => chunk.SYZQFYHQ.js} (82%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SZS4IGBQ.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.RXMELJZK.js => chunk.T26SSYRZ.js} (90%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.T47IEDLN.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.T533KWVR.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.5453BD52.js => chunk.T7LQNDC5.js} (95%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TA3B27V5.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TD6B6IEL.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TECP6JR2.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.THE5DOSH.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TI56FHYX.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TICGP7UW.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.P5B6GUIV.js => chunk.TKQMYZOR.js} (69%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TLNU5YYZ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TLPGLTWN.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TNCUFN5S.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TOWVCX7O.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TTMUWVWX.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UCFEWFGG.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UIWRDYII.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UYJHNFGC.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.V2WC33GK.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.W5P4KEEZ.js => chunk.V6KLYQCK.js} (84%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.V77XD4UK.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VDJ55VAV.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VLPFGZU5.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VPK2OSP4.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.I3355KHS.js => chunk.VQAWWVRR.js} (94%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VRTJZYIC.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VSSSMZFO.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.YTKNJGSR.js => chunk.VTZVPCX4.js} (95%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VYC5B2AV.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.W4GZBNUN.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.CEMITGOC.js => chunk.W5IOVX7A.js} (87%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WCP5CXI3.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WEONPICB.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WFZAUYTE.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLYACN3J.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WSMO4YXA.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WTYX4MI2.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.23QSDHN7.js => chunk.WVF75JAX.js} (86%) delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WWTGXLZQ.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X26O7UU2.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X2QBSGH3.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.X5IGYTXC.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XIUOIGOM.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XLE25PEK.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XMELOCBP.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XTIYYQUD.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Y4EMDR5Y.js rename cdn/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VCLBTQVE.js => haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YAROS6UF.js (82%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YF47ODZL.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YFIYHUIW.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YFMRETPM.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YIKPEXTH.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YIQBNSY5.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z543R5TZ.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z5KRCOTW.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Z75AU3J4.js rename haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/{chunk.7UUIUZXI.js => chunk.Z7XDKKOD.js} (79%) create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZKCAPA5S.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZQG4CH57.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZTTMOB7X.js delete mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZX6DT5AE.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZXHMIE27.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.component.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/components/copy-button/copy-button.styles.js create mode 100644 haxcms/build/es6/node_modules/@shoelace-style/shoelace/dist/components/menu-item/submenu-controller.js delete mode 100644 haxcms/build/es6/node_modules/lit-element/experimental-hydrate-support.d.ts.map delete mode 100644 haxcms/build/es6/node_modules/lit-element/experimental-hydrate-support.js.map delete mode 100644 haxcms/build/es6/node_modules/lit-html/development/experimental-hydrate.d.ts.map delete mode 100644 haxcms/build/es6/node_modules/lit-html/development/experimental-hydrate.js delete mode 100644 haxcms/build/es6/node_modules/lit-html/development/experimental-hydrate.js.map delete mode 100644 haxcms/build/es6/node_modules/lit-html/experimental-hydrate.d.ts.map delete mode 100644 haxcms/build/es6/node_modules/lit-html/experimental-hydrate.js delete mode 100644 haxcms/build/es6/node_modules/lit-html/experimental-hydrate.js.map delete mode 100644 haxcms/build/es6/node_modules/lit-html/node/experimental-hydrate.js delete mode 100644 haxcms/build/es6/node_modules/lit-html/node/experimental-hydrate.js.map delete mode 100644 haxcms/build/es6/node_modules/lit/experimental-hydrate-support.js delete mode 100644 haxcms/build/es6/node_modules/lit/experimental-hydrate.js delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/base/worker/workerMain.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.de.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.es.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.fr.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.it.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ja.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ko.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.ru.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.zh-cn.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/editor/editor.main.nls.zh-tw.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min-maps/vs/loader.js.map delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min/vs/language/typescript/tsMode.js delete mode 100644 haxcms/build/es6/node_modules/monaco-editor/min/vs/language/typescript/tsWorker.js diff --git a/cdn/build/es6/node_modules/@google/model-viewer/dist/model-viewer.js b/cdn/build/es6/node_modules/@google/model-viewer/dist/model-viewer.js index 367c35bb28..5741c2bc27 100644 --- a/cdn/build/es6/node_modules/@google/model-viewer/dist/model-viewer.js +++ b/cdn/build/es6/node_modules/@google/model-viewer/dist/model-viewer.js @@ -14,7 +14,7 @@ const i$2=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{... * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT */ -const t="154",i=1,n=2,r=3,a=0,o=1,l=2,c=100,h=0,d=1,A=2,p=0,m=1,g=2,f=3,v=4,E=5,y=301,_=302,x=303,S=306,C=1e3,b=1001,I=1002,T=1003,B=1004,U=1005,F=1006,O=1007,G=1008,W=1009,q=1012,X=1013,j=1014,Y=1015,K=1016,$=1020,J=1023,ee=1026,te=1027,ie=1028,ne=1030,re=33776,se=33777,ae=33778,oe=33779,le=35840,ce=35842,he=37492,ue=37496,de=37808,Ae=36492,pe=2201,me=2202,ge=2300,fe=2301,ve=2302,Ee=2400,ye=2401,_e=2402,xe=2500,Se=3001,Ce="",Me="srgb",be="srgb-linear",Ie="display-p3",we=7680,Te=35044,Be="300 es",Re=1035,Le=2e3,De=2001;class EventDispatcher{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const i=this._listeners[e];if(void 0!==i){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const i=t.slice(0);for(let t=0,n=i.length;t>8&255]+Ue[e>>16&255]+Ue[e>>24&255]+"-"+Ue[255&t]+Ue[t>>8&255]+"-"+Ue[t>>16&15|64]+Ue[t>>24&255]+"-"+Ue[63&i|128]+Ue[i>>8&255]+"-"+Ue[i>>16&255]+Ue[i>>24&255]+Ue[255&n]+Ue[n>>8&255]+Ue[n>>16&255]+Ue[n>>24&255]).toLowerCase()}function clamp$1(e,t,i){return Math.max(t,Math.min(i,e))}function euclideanModulo(e,t){return(e%t+t)%t}function lerp$1(e,t,i){return(1-i)*e+i*t}function isPowerOfTwo(e){return 0==(e&e-1)&&0!==e}function ceilPowerOfTwo(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function floorPowerOfTwo(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function denormalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function normalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Qe={DEG2RAD:Fe,RAD2DEG:Ne,generateUUID,clamp:clamp$1,euclideanModulo,mapLinear:function mapLinear(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},inverseLerp:function inverseLerp(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:lerp$1,damp:function damp(e,t,i,n){return lerp$1(e,t,1-Math.exp(-i*n))},pingpong:function pingpong(e,t=1){return t-Math.abs(euclideanModulo(e,2*t)-t)},smoothstep:function smoothstep(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function smootherstep(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function randInt(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function randFloat(e,t){return e+Math.random()*(t-e)},randFloatSpread:function randFloatSpread(e){return e*(.5-Math.random())},seededRandom:function seededRandom(e){void 0!==e&&(Pe=e);let t=Pe+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function degToRad(e){return e*Fe},radToDeg:function radToDeg(e){return e*Ne},isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler:function setQuaternionFromProperEuler(e,t,i,n,r){const a=Math.cos,o=Math.sin,l=a(i/2),c=o(i/2),h=a((t+n)/2),d=o((t+n)/2),A=a((t-n)/2),p=o((t-n)/2),m=a((n-t)/2),g=o((n-t)/2);switch(r){case"XYX":e.set(l*d,c*A,c*p,l*h);break;case"YZY":e.set(c*p,l*d,c*A,l*h);break;case"ZXZ":e.set(c*A,c*p,l*d,l*h);break;case"XZX":e.set(l*d,c*g,c*m,l*h);break;case"YXY":e.set(c*m,l*d,c*g,l*h);break;case"ZYZ":e.set(c*g,c*m,l*d,l*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize,denormalize};class Vector2{constructor(e=0,t=0){Vector2.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(clamp$1(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*i-a*n+e.x,this.y=r*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Matrix3{constructor(e,t,i,n,r,a,o,l,c){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,o,l,c)}set(e,t,i,n,r,a,o,l,c){const h=this.elements;return h[0]=e,h[1]=n,h[2]=o,h[3]=t,h[4]=r,h[5]=l,h[6]=i,h[7]=a,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,a=i[0],o=i[3],l=i[6],c=i[1],h=i[4],d=i[7],A=i[2],p=i[5],m=i[8],g=n[0],f=n[3],v=n[6],E=n[1],y=n[4],_=n[7],x=n[2],S=n[5],C=n[8];return r[0]=a*g+o*E+l*x,r[3]=a*f+o*y+l*S,r[6]=a*v+o*_+l*C,r[1]=c*g+h*E+d*x,r[4]=c*f+h*y+d*S,r[7]=c*v+h*_+d*C,r[2]=A*g+p*E+m*x,r[5]=A*f+p*y+m*S,r[8]=A*v+p*_+m*C,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return t*a*h-t*o*c-i*r*h+i*o*l+n*r*c-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],d=h*a-o*c,A=o*l-h*r,p=c*r-a*l,m=t*d+i*A+n*p;if(0===m)return this.set(0,0,0,0,0,0,0,0,0);const g=1/m;return e[0]=d*g,e[1]=(n*c-h*i)*g,e[2]=(o*i-n*a)*g,e[3]=A*g,e[4]=(h*t-n*l)*g,e[5]=(n*r-o*t)*g,e[6]=p*g,e[7]=(i*l-c*t)*g,e[8]=(a*t-i*r)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,r,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*a+c*o)+a+e,-n*c,n*l,-n*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Oe.makeScale(e,t)),this}rotate(e){return this.premultiply(Oe.makeRotation(-e)),this}translate(e,t){return this.premultiply(Oe.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Oe=new Matrix3;function arrayNeedsUint32(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function createElementNS(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const ke={};function warnOnce(e){e in ke||(ke[e]=!0,console.warn(e))}function SRGBToLinear(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function LinearToSRGB(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Ge=(new Matrix3).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Ve=(new Matrix3).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);const He={[be]:e=>e,[Me]:e=>e.convertSRGBToLinear(),[Ie]:function DisplayP3ToLinearSRGB(e){return e.convertSRGBToLinear().applyMatrix3(Ve)}},ze={[be]:e=>e,[Me]:e=>e.convertLinearToSRGB(),[Ie]:function LinearSRGBToDisplayP3(e){return e.applyMatrix3(Ge).convertLinearToSRGB()}},We={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return be},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,i){if(!1===this.enabled||t===i||!t||!i)return e;const n=He[t],r=ze[i];if(void 0===n||void 0===r)throw new Error(`Unsupported color space conversion, "${t}" to "${i}".`);return r(n(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let qe;class ImageUtils{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===qe&&(qe=createElementNS("canvas")),qe.width=e.width,qe.height=e.height;const i=qe.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=qe}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=createElementNS("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),r=n.data;for(let e=0;e0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case C:e.x=e.x-Math.floor(e.x);break;case b:e.x=e.x<0?0:1;break;case I:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case C:e.y=e.y-Math.floor(e.y);break;case b:e.y=e.y<0?0:1;break;case I:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Me?Se:3e3}set encoding(e){warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Se?Me:Ce}}Texture$1.DEFAULT_IMAGE=null,Texture$1.DEFAULT_MAPPING=300,Texture$1.DEFAULT_ANISOTROPY=1;class Vector4{constructor(e=0,t=0,i=0,n=1){Vector4.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,r;const a=.01,o=.1,l=e.elements,c=l[0],h=l[4],d=l[8],A=l[1],p=l[5],m=l[9],g=l[2],f=l[6],v=l[10];if(Math.abs(h-A)l&&e>E?eE?l=0?1:-1,n=1-t*t;if(n>Number.EPSILON){const r=Math.sqrt(n),a=Math.atan2(r,t*i);e=Math.sin(e*a)/r,o=Math.sin(o*a)/r}const r=o*i;if(l=l*e+A*r,c=c*e+p*r,h=h*e+m*r,d=d*e+g*r,e===1-o){const e=1/Math.sqrt(l*l+c*c+h*h+d*d);l*=e,c*=e,h*=e,d*=e}}e[t]=l,e[t+1]=c,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,n,r,a){const o=i[n],l=i[n+1],c=i[n+2],h=i[n+3],d=r[a],A=r[a+1],p=r[a+2],m=r[a+3];return e[t]=o*m+h*d+l*p-c*A,e[t+1]=l*m+h*A+c*d-o*p,e[t+2]=c*m+h*p+o*A-l*d,e[t+3]=h*m-o*d-l*A-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,n=e._y,r=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(i/2),h=o(n/2),d=o(r/2),A=l(i/2),p=l(n/2),m=l(r/2);switch(a){case"XYZ":this._x=A*h*d+c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d-A*p*m;break;case"YXZ":this._x=A*h*d+c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d+A*p*m;break;case"ZXY":this._x=A*h*d-c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d-A*p*m;break;case"ZYX":this._x=A*h*d-c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d+A*p*m;break;case"YZX":this._x=A*h*d+c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d-A*p*m;break;case"XZY":this._x=A*h*d-c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d+A*p*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],r=t[8],a=t[1],o=t[5],l=t[9],c=t[2],h=t[6],d=t[10],A=i+o+d;if(A>0){const e=.5/Math.sqrt(A+1);this._w=.25/e,this._x=(h-l)*e,this._y=(r-c)*e,this._z=(a-n)*e}else if(i>o&&i>d){const e=2*Math.sqrt(1+i-o-d);this._w=(h-l)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(r+c)/e}else if(o>d){const e=2*Math.sqrt(1+o-i-d);this._w=(r-c)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(l+h)/e}else{const e=2*Math.sqrt(1+d-i-o);this._w=(a-n)/e,this._x=(r+c)/e,this._y=(l+h)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp$1(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,n=e._y,r=e._z,a=e._w,o=t._x,l=t._y,c=t._z,h=t._w;return this._x=i*h+a*o+n*c-r*l,this._y=n*h+a*l+r*o-i*c,this._z=r*h+a*c+i*l-n*o,this._w=a*h-i*o-n*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,n=this._y,r=this._z,a=this._w;let o=a*e._w+i*e._x+n*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;const l=1-o*o;if(l<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*i+t*this._x,this._y=e*n+t*this._y,this._z=e*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),h=Math.atan2(c,o),d=Math.sin((1-t)*h)/c,A=Math.sin(t*h)/c;return this._w=a*d+this._w*A,this._x=i*d+this._x*A,this._y=n*d+this._y*A,this._z=r*d+this._z*A,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),n=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(n),i*Math.sin(r),i*Math.cos(r),t*Math.sin(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(e=0,t=0,i=0){Vector3.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Ke.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ke.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=e.elements,a=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=l*t+a*n-o*i,h=l*i+o*t-r*n,d=l*n+r*i-a*t,A=-r*t-a*i-o*n;return this.x=c*l+A*-r+h*-o-d*-a,this.y=h*l+A*-a+d*-r-c*-o,this.z=d*l+A*-o+c*-a-h*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,r=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-r*o,this.y=r*a-i*l,this.z=i*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Ye.copy(this).projectOnVector(e),this.sub(Ye)}reflect(e){return this.sub(Ye.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(clamp$1(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ye=new Vector3,Ke=new Quaternion;class Box3{constructor(e=new Vector3(1/0,1/0,1/0),t=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Je),Je.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(at),ot.subVectors(this.max,at),et.subVectors(e.a,at),tt.subVectors(e.b,at),it.subVectors(e.c,at),nt.subVectors(tt,et),rt.subVectors(it,tt),st.subVectors(et,it);let t=[0,-nt.z,nt.y,0,-rt.z,rt.y,0,-st.z,st.y,nt.z,0,-nt.x,rt.z,0,-rt.x,st.z,0,-st.x,-nt.y,nt.x,0,-rt.y,rt.x,0,-st.y,st.x,0];return!!satForAxes(t,et,tt,it,ot)&&(t=[1,0,0,0,1,0,0,0,1],!!satForAxes(t,et,tt,it,ot)&&(lt.crossVectors(nt,rt),t=[lt.x,lt.y,lt.z],satForAxes(t,et,tt,it,ot)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Je).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Je).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||($e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),$e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),$e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),$e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),$e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),$e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),$e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),$e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints($e)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const $e=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],Je=new Vector3,Ze=new Box3,et=new Vector3,tt=new Vector3,it=new Vector3,nt=new Vector3,rt=new Vector3,st=new Vector3,at=new Vector3,ot=new Vector3,lt=new Vector3,ct=new Vector3;function satForAxes(e,t,i,n,r){for(let a=0,o=e.length-3;a<=o;a+=3){ct.fromArray(e,a);const o=r.x*Math.abs(ct.x)+r.y*Math.abs(ct.y)+r.z*Math.abs(ct.z),l=t.dot(ct),c=i.dot(ct),h=n.dot(ct);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>o)return!1}return!0}const ht=new Box3,ut=new Vector3,dt=new Vector3;class Sphere{constructor(e=new Vector3,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;void 0!==t?i.copy(t):ht.setFromPoints(e).getCenter(i);let n=0;for(let t=0,r=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ut.subVectors(e,this.center);const t=ut.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),i=.5*(e-this.radius);this.center.addScaledVector(ut,i/e),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(dt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ut.copy(e.center).add(dt)),this.expandByPoint(ut.copy(e.center).sub(dt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const At=new Vector3,pt=new Vector3,mt=new Vector3,gt=new Vector3,ft=new Vector3,vt=new Vector3,Et=new Vector3;class Ray{constructor(e=new Vector3,t=new Vector3(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,At)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=At.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(At.copy(this.origin).addScaledVector(this.direction,t),At.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){pt.copy(e).add(t).multiplyScalar(.5),mt.copy(t).sub(e).normalize(),gt.copy(this.origin).sub(pt);const r=.5*e.distanceTo(t),a=-this.direction.dot(mt),o=gt.dot(this.direction),l=-gt.dot(mt),c=gt.lengthSq(),h=Math.abs(1-a*a);let d,A,p,m;if(h>0)if(d=a*l-o,A=a*o-l,m=r*h,d>=0)if(A>=-m)if(A<=m){const e=1/h;d*=e,A*=e,p=d*(d+a*A+2*o)+A*(a*d+A+2*l)+c}else A=r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;else A=-r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;else A<=-m?(d=Math.max(0,-(-a*r+o)),A=d>0?-r:Math.min(Math.max(-r,-l),r),p=-d*d+A*(A+2*l)+c):A<=m?(d=0,A=Math.min(Math.max(-r,-l),r),p=A*(A+2*l)+c):(d=Math.max(0,-(a*r+o)),A=d>0?r:Math.min(Math.max(-r,-l),r),p=-d*d+A*(A+2*l)+c);else A=a>0?-r:r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),n&&n.copy(pt).addScaledVector(mt,A),p}intersectSphere(e,t){At.subVectors(e.center,this.origin);const i=At.dot(this.direction),n=At.dot(At)-i*i,r=e.radius*e.radius;if(n>r)return null;const a=Math.sqrt(r-n),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,r,a,o,l;const c=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,A=this.origin;return c>=0?(i=(e.min.x-A.x)*c,n=(e.max.x-A.x)*c):(i=(e.max.x-A.x)*c,n=(e.min.x-A.x)*c),h>=0?(r=(e.min.y-A.y)*h,a=(e.max.y-A.y)*h):(r=(e.max.y-A.y)*h,a=(e.min.y-A.y)*h),i>a||r>n?null:((r>i||isNaN(i))&&(i=r),(a=0?(o=(e.min.z-A.z)*d,l=(e.max.z-A.z)*d):(o=(e.max.z-A.z)*d,l=(e.min.z-A.z)*d),i>l||o>n?null:((o>i||i!=i)&&(i=o),(l=0?i:n,t)))}intersectsBox(e){return null!==this.intersectBox(e,At)}intersectTriangle(e,t,i,n,r){ft.subVectors(t,e),vt.subVectors(i,e),Et.crossVectors(ft,vt);let a,o=this.direction.dot(Et);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}gt.subVectors(this.origin,e);const l=a*this.direction.dot(vt.crossVectors(gt,vt));if(l<0)return null;const c=a*this.direction.dot(ft.cross(gt));if(c<0)return null;if(l+c>o)return null;const h=-a*gt.dot(Et);return h<0?null:this.at(h/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Matrix4{constructor(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f)}set(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f){const v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=n,v[1]=r,v[5]=a,v[9]=o,v[13]=l,v[2]=c,v[6]=h,v[10]=d,v[14]=A,v[3]=p,v[7]=m,v[11]=g,v[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Matrix4).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/yt.setFromMatrixColumn(e,0).length(),r=1/yt.setFromMatrixColumn(e,1).length(),a=1/yt.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,r=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),c=Math.sin(n),h=Math.cos(r),d=Math.sin(r);if("XYZ"===e.order){const e=a*h,i=a*d,n=o*h,r=o*d;t[0]=l*h,t[4]=-l*d,t[8]=c,t[1]=i+n*c,t[5]=e-r*c,t[9]=-o*l,t[2]=r-e*c,t[6]=n+i*c,t[10]=a*l}else if("YXZ"===e.order){const e=l*h,i=l*d,n=c*h,r=c*d;t[0]=e+r*o,t[4]=n*o-i,t[8]=a*c,t[1]=a*d,t[5]=a*h,t[9]=-o,t[2]=i*o-n,t[6]=r+e*o,t[10]=a*l}else if("ZXY"===e.order){const e=l*h,i=l*d,n=c*h,r=c*d;t[0]=e-r*o,t[4]=-a*d,t[8]=n+i*o,t[1]=i+n*o,t[5]=a*h,t[9]=r-e*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if("ZYX"===e.order){const e=a*h,i=a*d,n=o*h,r=o*d;t[0]=l*h,t[4]=n*c-i,t[8]=e*c+r,t[1]=l*d,t[5]=r*c+e,t[9]=i*c-n,t[2]=-c,t[6]=o*l,t[10]=a*l}else if("YZX"===e.order){const e=a*l,i=a*c,n=o*l,r=o*c;t[0]=l*h,t[4]=r-e*d,t[8]=n*d+i,t[1]=d,t[5]=a*h,t[9]=-o*h,t[2]=-c*h,t[6]=i*d+n,t[10]=e-r*d}else if("XZY"===e.order){const e=a*l,i=a*c,n=o*l,r=o*c;t[0]=l*h,t[4]=-d,t[8]=c*h,t[1]=e*d+r,t[5]=a*h,t[9]=i*d-n,t[2]=n*d-i,t[6]=o*h,t[10]=r*d+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(xt,e,St)}lookAt(e,t,i){const n=this.elements;return bt.subVectors(e,t),0===bt.lengthSq()&&(bt.z=1),bt.normalize(),Ct.crossVectors(i,bt),0===Ct.lengthSq()&&(1===Math.abs(i.z)?bt.x+=1e-4:bt.z+=1e-4,bt.normalize(),Ct.crossVectors(i,bt)),Ct.normalize(),Mt.crossVectors(bt,Ct),n[0]=Ct.x,n[4]=Mt.x,n[8]=bt.x,n[1]=Ct.y,n[5]=Mt.y,n[9]=bt.y,n[2]=Ct.z,n[6]=Mt.z,n[10]=bt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,a=i[0],o=i[4],l=i[8],c=i[12],h=i[1],d=i[5],A=i[9],p=i[13],m=i[2],g=i[6],f=i[10],v=i[14],E=i[3],y=i[7],_=i[11],x=i[15],S=n[0],C=n[4],b=n[8],I=n[12],T=n[1],B=n[5],U=n[9],F=n[13],O=n[2],G=n[6],W=n[10],q=n[14],X=n[3],j=n[7],Y=n[11],K=n[15];return r[0]=a*S+o*T+l*O+c*X,r[4]=a*C+o*B+l*G+c*j,r[8]=a*b+o*U+l*W+c*Y,r[12]=a*I+o*F+l*q+c*K,r[1]=h*S+d*T+A*O+p*X,r[5]=h*C+d*B+A*G+p*j,r[9]=h*b+d*U+A*W+p*Y,r[13]=h*I+d*F+A*q+p*K,r[2]=m*S+g*T+f*O+v*X,r[6]=m*C+g*B+f*G+v*j,r[10]=m*b+g*U+f*W+v*Y,r[14]=m*I+g*F+f*q+v*K,r[3]=E*S+y*T+_*O+x*X,r[7]=E*C+y*B+_*G+x*j,r[11]=E*b+y*U+_*W+x*Y,r[15]=E*I+y*F+_*q+x*K,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],a=e[1],o=e[5],l=e[9],c=e[13],h=e[2],d=e[6],A=e[10],p=e[14];return e[3]*(+r*l*d-n*c*d-r*o*A+i*c*A+n*o*p-i*l*p)+e[7]*(+t*l*p-t*c*A+r*a*A-n*a*p+n*c*h-r*l*h)+e[11]*(+t*c*d-t*o*p-r*a*d+i*a*p+r*o*h-i*c*h)+e[15]*(-n*o*h-t*l*d+t*o*A+n*a*d-i*a*A+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=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*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),r=1-i,a=e.x,o=e.y,l=e.z,c=r*a,h=r*o;return this.set(c*a+i,c*o-n*l,c*l+n*o,0,c*o+n*l,h*o+i,h*l-n*a,0,c*l-n*o,h*l+n*a,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,r,a){return this.set(1,i,r,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,h=a+a,d=o+o,A=r*c,p=r*h,m=r*d,g=a*h,f=a*d,v=o*d,E=l*c,y=l*h,_=l*d,x=i.x,S=i.y,C=i.z;return n[0]=(1-(g+v))*x,n[1]=(p+_)*x,n[2]=(m-y)*x,n[3]=0,n[4]=(p-_)*S,n[5]=(1-(A+v))*S,n[6]=(f+E)*S,n[7]=0,n[8]=(m+y)*C,n[9]=(f-E)*C,n[10]=(1-(A+g))*C,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let r=yt.set(n[0],n[1],n[2]).length();const a=yt.set(n[4],n[5],n[6]).length(),o=yt.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],_t.copy(this);const l=1/r,c=1/a,h=1/o;return _t.elements[0]*=l,_t.elements[1]*=l,_t.elements[2]*=l,_t.elements[4]*=c,_t.elements[5]*=c,_t.elements[6]*=c,_t.elements[8]*=h,_t.elements[9]*=h,_t.elements[10]*=h,t.setFromRotationMatrix(_t),i.x=r,i.y=a,i.z=o,this}makePerspective(e,t,i,n,r,a,o=2e3){const l=this.elements,c=2*r/(t-e),h=2*r/(i-n),d=(t+e)/(t-e),A=(i+n)/(i-n);let p,m;if(o===Le)p=-(a+r)/(a-r),m=-2*a*r/(a-r);else{if(o!==De)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);p=-a/(a-r),m=-a*r/(a-r)}return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=h,l[9]=A,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,r,a,o=2e3){const l=this.elements,c=1/(t-e),h=1/(i-n),d=1/(a-r),A=(t+e)*c,p=(i+n)*h;let m,g;if(o===Le)m=(a+r)*d,g=-2*d;else{if(o!==De)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);m=r*d,g=-1*d}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-A,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=g,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const yt=new Vector3,_t=new Matrix4,xt=new Vector3(0,0,0),St=new Vector3(1,1,1),Ct=new Vector3,Mt=new Vector3,bt=new Vector3,It=new Matrix4,wt=new Quaternion;class Euler{constructor(e=0,t=0,i=0,n=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,r=n[0],a=n[4],o=n[8],l=n[1],c=n[5],h=n[9],d=n[2],A=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(clamp$1(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(A,c),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp$1(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,r),this._z=0);break;case"ZXY":this._x=Math.asin(clamp$1(A,-1,1)),Math.abs(A)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-clamp$1(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(A,p),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(clamp$1(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-d,r)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-clamp$1(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(A,c),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return It.makeRotationFromQuaternion(e),this.setFromRotationMatrix(It,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return wt.setFromEuler(this),this.setFromQuaternion(wt,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(i=i.concat(r))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ut,e,Pt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ut,Ft,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,n=t.length;i0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=serialize(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const i=t.shapes;if(Array.isArray(i))for(let t=0,n=i.length;t0){n.children=[];for(let t=0;t0){n.animations=[];for(let t=0;t0&&(i.geometries=t),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),c.length>0&&(i.animations=c),h.length>0&&(i.nodes=h)}return i.object=n,i;function extractFromCache(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(e,t,i,n,r){Vt.subVectors(n,t),Ht.subVectors(i,t),zt.subVectors(e,t);const a=Vt.dot(Vt),o=Vt.dot(Ht),l=Vt.dot(zt),c=Ht.dot(Ht),h=Ht.dot(zt),d=a*c-o*o;if(0===d)return r.set(-2,-1,-1);const A=1/d,p=(c*l-o*h)*A,m=(a*h-o*l)*A;return r.set(1-p-m,m,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Wt),Wt.x>=0&&Wt.y>=0&&Wt.x+Wt.y<=1}static getUV(e,t,i,n,r,a,o,l){return!1===Jt&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Jt=!0),this.getInterpolation(e,t,i,n,r,a,o,l)}static getInterpolation(e,t,i,n,r,a,o,l){return this.getBarycoord(e,t,i,n,Wt),l.setScalar(0),l.addScaledVector(r,Wt.x),l.addScaledVector(a,Wt.y),l.addScaledVector(o,Wt.z),l}static isFrontFacing(e,t,i,n){return Vt.subVectors(i,t),Ht.subVectors(e,t),Vt.cross(Ht).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Vt.subVectors(this.c,this.b),Ht.subVectors(this.a,this.b),.5*Vt.cross(Ht).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Triangle.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Triangle.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,n,r){return!1===Jt&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Jt=!0),Triangle.getInterpolation(e,this.a,this.b,this.c,t,i,n,r)}getInterpolation(e,t,i,n,r){return Triangle.getInterpolation(e,this.a,this.b,this.c,t,i,n,r)}containsPoint(e){return Triangle.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Triangle.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,r=this.c;let a,o;qt.subVectors(n,i),Xt.subVectors(r,i),Yt.subVectors(e,i);const l=qt.dot(Yt),c=Xt.dot(Yt);if(l<=0&&c<=0)return t.copy(i);Kt.subVectors(e,n);const h=qt.dot(Kt),d=Xt.dot(Kt);if(h>=0&&d<=h)return t.copy(n);const A=l*d-h*c;if(A<=0&&l>=0&&h<=0)return a=l/(l-h),t.copy(i).addScaledVector(qt,a);$t.subVectors(e,r);const p=qt.dot($t),m=Xt.dot($t);if(m>=0&&p<=m)return t.copy(r);const g=p*c-l*m;if(g<=0&&c>=0&&m<=0)return o=c/(c-m),t.copy(i).addScaledVector(Xt,o);const f=h*m-p*d;if(f<=0&&d-h>=0&&p-m>=0)return jt.subVectors(r,n),o=(d-h)/(d-h+(p-m)),t.copy(n).addScaledVector(jt,o);const v=1/(f+g+A);return a=g*v,o=A*v,t.copy(i).addScaledVector(qt,a).addScaledVector(Xt,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Zt=0;class Material$1 extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Zt++}),this.uuid=generateUUID(),this.name="",this.type="Material",this.blending=1,this.side=a,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=c,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=we,this.stencilZFail=we,this.stencilZPass=we,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function extractFromCache(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),this.side!==a&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=this.alphaHash),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(i.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const t=extractFromCache(e.textures),n=extractFromCache(e.images);t.length>0&&(i.textures=t),n.length>0&&(i.images=n)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const e=t.length;i=new Array(e);for(let n=0;n!==e;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}const ei={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ti={h:0,s:0,l:0},ii={h:0,s:0,l:0};function hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}class Color{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Me){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,We.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=We.workingColorSpace){return this.r=e,this.g=t,this.b=i,We.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=We.workingColorSpace){if(e=euclideanModulo(e,1),t=clamp$1(t,0,1),i=clamp$1(i,0,1),0===t)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=hue2rgb(r,n,e+1/3),this.g=hue2rgb(r,n,e),this.b=hue2rgb(r,n,e-1/3)}return We.toWorkingColorSpace(this,n),this}setStyle(e,t=Me){function handleAlpha(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let n;const r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,t);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,t);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===r)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Me){const i=ei[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Me){return We.fromWorkingColorSpace(ni.copy(this),e),65536*Math.round(clamp$1(255*ni.r,0,255))+256*Math.round(clamp$1(255*ni.g,0,255))+Math.round(clamp$1(255*ni.b,0,255))}getHexString(e=Me){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=We.workingColorSpace){We.fromWorkingColorSpace(ni.copy(this),t);const i=ni.r,n=ni.g,r=ni.b,a=Math.max(i,n,r),o=Math.min(i,n,r);let l,c;const h=(o+a)/2;if(o===a)l=0,c=0;else{const e=a-o;switch(c=h<=.5?e/(a+o):e/(2-a-o),a){case i:l=(n-r)/e+(n>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,a[e]=t|i}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:a,exponentTable:o,offsetTable:l}}const si={toHalfFloat:function toHalfFloat(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=clamp$1(e,-65504,65504),ri.floatView[0]=e;const t=ri.uint32View[0],i=t>>23&511;return ri.baseTable[i]+((8388607&t)>>ri.shiftTable[i])},fromHalfFloat:function fromHalfFloat(e){const t=e>>10;return ri.uint32View[0]=ri.mantissaTable[ri.offsetTable[t]+(1023&e)]+ri.exponentTable[t],ri.floatView[0]}},ai=new Vector3,oi=new Vector2;class BufferAttribute{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=Te,this.updateRange={offset:0,count:-1},this.gpuType=Y,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,r=this.itemSize;n0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const t in i){const n=i[t];e.data.attributes[t]=n.toJSON(e.data)}const n={};let r=!1;for(const t in this.morphAttributes){const i=this.morphAttributes[t],a=[];for(let t=0,n=i.length;t0&&(n[t]=a,r=!0)}r&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const n=e.attributes;for(const e in n){const i=n[e];this.setAttribute(e,i.clone(t))}const r=e.morphAttributes;for(const e in r){const i=[],n=r[e];for(let e=0,r=n.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e(e.far-e.near)**2)return}mi.copy(r).invert(),gi.copy(e.ray).applyMatrix4(mi),null!==i.boundingBox&&!1===gi.intersectsBox(i.boundingBox)||this._computeIntersections(e,t,gi)}}_computeIntersections(e,t,i){let n;const r=this.geometry,a=this.material,o=r.index,l=r.attributes.position,c=r.attributes.uv,h=r.attributes.uv1,d=r.attributes.normal,A=r.groups,p=r.drawRange;if(null!==o)if(Array.isArray(a))for(let r=0,l=A.length;ri.far?null:{distance:A,point:Ui.clone(),object:e}}(e,t,i,n,yi,_i,xi,Di);if(p){r&&(bi.fromBufferAttribute(r,h),wi.fromBufferAttribute(r,d),Ti.fromBufferAttribute(r,A),p.uv=Triangle.getInterpolation(Di,yi,_i,xi,bi,wi,Ti,new Vector2)),l&&(bi.fromBufferAttribute(l,h),wi.fromBufferAttribute(l,d),Ti.fromBufferAttribute(l,A),p.uv1=Triangle.getInterpolation(Di,yi,_i,xi,bi,wi,Ti,new Vector2),p.uv2=p.uv1),c&&(Bi.fromBufferAttribute(c,h),Ri.fromBufferAttribute(c,d),Li.fromBufferAttribute(c,A),p.normal=Triangle.getInterpolation(Di,yi,_i,xi,Bi,Ri,Li,new Vector3),p.normal.dot(n.direction)>0&&p.normal.multiplyScalar(-1));const e={a:h,b:d,c:A,normal:new Vector3,materialIndex:0};Triangle.getNormal(yi,_i,xi,e.normal),p.face=e}return p}class BoxGeometry extends BufferGeometry{constructor(e=1,t=1,i=1,n=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};const o=this;n=Math.floor(n),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],h=[],d=[];let A=0,p=0;function buildPlane(e,t,i,n,r,a,m,g,f,v,E){const y=a/f,_=m/v,x=a/2,S=m/2,C=g/2,b=f+1,I=v+1;let T=0,B=0;const U=new Vector3;for(let a=0;a0?1:-1,h.push(U.x,U.y,U.z),d.push(l/f),d.push(1-a/v),T+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class Camera extends Object3D{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4,this.coordinateSystem=Le}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class PerspectiveCamera extends Camera{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Ne*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Fe*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Ne*Math.atan(Math.tan(.5*Fe*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,n,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Fe*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;r+=a.offsetX*n/e,t-=a.offsetY*i/o,n*=a.width/e,i*=a.height/o}const o=this.filmOffset;0!==o&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Ni=-90;class CubeCamera extends Object3D{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null;const n=new PerspectiveCamera(Ni,1,e,t);n.layers=this.layers,this.add(n);const r=new PerspectiveCamera(Ni,1,e,t);r.layers=this.layers,this.add(r);const a=new PerspectiveCamera(Ni,1,e,t);a.layers=this.layers,this.add(a);const o=new PerspectiveCamera(Ni,1,e,t);o.layers=this.layers,this.add(o);const l=new PerspectiveCamera(Ni,1,e,t);l.layers=this.layers,this.add(l);const c=new PerspectiveCamera(Ni,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,n,r,a,o,l]=t;for(const e of t)this.remove(e);if(e===Le)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(e!==De)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const i=this.renderTarget;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[n,r,a,o,l,c]=this.children,h=e.getRenderTarget(),d=e.toneMapping,A=e.xr.enabled;e.toneMapping=p,e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,n),e.setRenderTarget(i,1),e.render(t,r),e.setRenderTarget(i,2),e.render(t,a),e.setRenderTarget(i,3),e.render(t,o),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=m,e.setRenderTarget(i,5),e.render(t,c),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=A,i.texture.needsPMREMUpdate=!0}}class CubeTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h){super(e=void 0!==e?e:[],t=void 0!==t?t:y,i,n,r,a,o,l,c,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];void 0!==t.encoding&&(warnOnce("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Se?Me:Ce),this.texture=new CubeTexture(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:F}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},n=new BoxGeometry(5,5,5),r=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:o,blending:0});r.uniforms.tEquirect.value=t;const a=new Mesh(n,r),l=t.minFilter;t.minFilter===G&&(t.minFilter=F);return new CubeCamera(1,10,this).update(e,a),t.minFilter=l,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,i,n){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,i,n);e.setRenderTarget(r)}}const Qi=new Vector3,Oi=new Vector3,ki=new Matrix3;class Plane{constructor(e=new Vector3(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=Qi.subVectors(i,t).cross(Oi.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Qi),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||ki.getNormalMatrix(e),n=this.coplanarPoint(Qi).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gi=new Sphere,Vi=new Vector3;class Frustum{constructor(e=new Plane,t=new Plane,i=new Plane,n=new Plane,r=new Plane,a=new Plane){this.planes=[e,t,i,n,r,a]}set(e,t,i,n,r,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(n),o[4].copy(r),o[5].copy(a),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=2e3){const i=this.planes,n=e.elements,r=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],d=n[6],A=n[7],p=n[8],m=n[9],g=n[10],f=n[11],v=n[12],E=n[13],y=n[14],_=n[15];if(i[0].setComponents(l-r,A-c,f-p,_-v).normalize(),i[1].setComponents(l+r,A+c,f+p,_+v).normalize(),i[2].setComponents(l+a,A+h,f+m,_+E).normalize(),i[3].setComponents(l-a,A-h,f-m,_-E).normalize(),i[4].setComponents(l-o,A-d,f-g,_-y).normalize(),t===Le)i[5].setComponents(l+o,A+d,f+g,_+y).normalize();else{if(t!==De)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(o,d,g,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Gi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Gi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Gi)}intersectsSprite(e){return Gi.center.set(0,0,0),Gi.radius=.7071067811865476,Gi.applyMatrix4(e.matrixWorld),this.intersectsSphere(Gi)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(i)0?e.max.x:e.min.x,Vi.y=n.normal.y>0?e.max.y:e.min.y,Vi.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(Vi)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function WebGLAnimation(){let e=null,t=!1,i=null,n=null;function onAnimationFrame(t,r){i(t,r),n=e.requestAnimationFrame(onAnimationFrame)}return{start:function(){!0!==t&&null!==i&&(n=e.requestAnimationFrame(onAnimationFrame),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function WebGLAttributes(e,t){const i=t.isWebGL2,n=new WeakMap;return{get:function get(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)},remove:function remove(t){t.isInterleavedBufferAttribute&&(t=t.data);const i=n.get(t);i&&(e.deleteBuffer(i.buffer),n.delete(t))},update:function update(t,r){if(t.isGLBufferAttribute){const e=n.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, vMapUv );\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},zi={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},Wi={basic:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.fog]),vertexShader:Hi.meshbasic_vert,fragmentShader:Hi.meshbasic_frag},lambert:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,zi.lights,{emissive:{value:new Color(0)}}]),vertexShader:Hi.meshlambert_vert,fragmentShader:Hi.meshlambert_frag},phong:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,zi.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:Hi.meshphong_vert,fragmentShader:Hi.meshphong_frag},standard:{uniforms:mergeUniforms([zi.common,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.roughnessmap,zi.metalnessmap,zi.fog,zi.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Hi.meshphysical_vert,fragmentShader:Hi.meshphysical_frag},toon:{uniforms:mergeUniforms([zi.common,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.gradientmap,zi.fog,zi.lights,{emissive:{value:new Color(0)}}]),vertexShader:Hi.meshtoon_vert,fragmentShader:Hi.meshtoon_frag},matcap:{uniforms:mergeUniforms([zi.common,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,{matcap:{value:null}}]),vertexShader:Hi.meshmatcap_vert,fragmentShader:Hi.meshmatcap_frag},points:{uniforms:mergeUniforms([zi.points,zi.fog]),vertexShader:Hi.points_vert,fragmentShader:Hi.points_frag},dashed:{uniforms:mergeUniforms([zi.common,zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Hi.linedashed_vert,fragmentShader:Hi.linedashed_frag},depth:{uniforms:mergeUniforms([zi.common,zi.displacementmap]),vertexShader:Hi.depth_vert,fragmentShader:Hi.depth_frag},normal:{uniforms:mergeUniforms([zi.common,zi.bumpmap,zi.normalmap,zi.displacementmap,{opacity:{value:1}}]),vertexShader:Hi.meshnormal_vert,fragmentShader:Hi.meshnormal_frag},sprite:{uniforms:mergeUniforms([zi.sprite,zi.fog]),vertexShader:Hi.sprite_vert,fragmentShader:Hi.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Hi.background_vert,fragmentShader:Hi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Hi.backgroundCube_vert,fragmentShader:Hi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Hi.cube_vert,fragmentShader:Hi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Hi.equirect_vert,fragmentShader:Hi.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([zi.common,zi.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Hi.distanceRGBA_vert,fragmentShader:Hi.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([zi.lights,zi.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:Hi.shadow_vert,fragmentShader:Hi.shadow_frag}};Wi.physical={uniforms:mergeUniforms([Wi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:Hi.meshphysical_vert,fragmentShader:Hi.meshphysical_frag};const qi={r:0,b:0,g:0};function WebGLBackground(e,t,i,n,r,l,c){const h=new Color(0);let d,A,p=!0===l?0:1,m=null,g=0,f=null;function setClear(t,i){t.getRGB(qi,getUnlitUniformColorSpace(e)),n.buffers.color.setClear(qi.r,qi.g,qi.b,i,c)}return{getClearColor:function(){return h},setClearColor:function(e,t=1){h.set(e),p=t,setClear(h,p)},getClearAlpha:function(){return p},setClearAlpha:function(e){p=e,setClear(h,p)},render:function render(l,v){let E=!1,y=!0===v.isScene?v.background:null;if(y&&y.isTexture){y=(v.backgroundBlurriness>0?i:t).get(y)}switch(null===y?setClear(h,p):y&&y.isColor&&(setClear(y,1),E=!0),e.xr.getEnvironmentBlendMode()){case"opaque":E=!0;break;case"additive":n.buffers.color.setClear(0,0,0,1,c),E=!0;break;case"alpha-blend":n.buffers.color.setClear(0,0,0,0,c),E=!0}(e.autoClear||E)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===S)?(void 0===A&&(A=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(Wi.backgroundCube.uniforms),vertexShader:Wi.backgroundCube.vertexShader,fragmentShader:Wi.backgroundCube.fragmentShader,side:o,depthTest:!1,depthWrite:!1,fog:!1})),A.geometry.deleteAttribute("normal"),A.geometry.deleteAttribute("uv"),A.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(A.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(A)),A.material.uniforms.envMap.value=y,A.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,A.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,A.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,A.material.toneMapped=y.colorSpace!==Me,m===y&&g===y.version&&f===e.toneMapping||(A.material.needsUpdate=!0,m=y,g=y.version,f=e.toneMapping),A.layers.enableAll(),l.unshift(A,A.geometry,A.material,0,0,null)):y&&y.isTexture&&(void 0===d&&(d=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(Wi.background.uniforms),vertexShader:Wi.background.vertexShader,fragmentShader:Wi.background.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(d)),d.material.uniforms.t2D.value=y,d.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,d.material.toneMapped=y.colorSpace!==Me,!0===y.matrixAutoUpdate&&y.updateMatrix(),d.material.uniforms.uvTransform.value.copy(y.matrix),m===y&&g===y.version&&f===e.toneMapping||(d.material.needsUpdate=!0,m=y,g=y.version,f=e.toneMapping),d.layers.enableAll(),l.unshift(d,d.geometry,d.material,0,0,null))}}}function WebGLBindingStates(e,t,i,n){const r=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=n.isWebGL2?null:t.get("OES_vertex_array_object"),o=n.isWebGL2||null!==a,l={},c=createBindingState(null);let h=c,d=!1;function bindVertexArrayObject(t){return n.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function deleteVertexArrayObject(t){return n.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function createBindingState(e){const t=[],i=[],n=[];for(let e=0;e=0){const i=r[t];let n=a[t];if(void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor)),void 0===i)return!0;if(i.attribute!==n)return!0;if(n&&i.data!==n.data)return!0;o++}}return h.attributesNum!==o||h.index!==n}(r,p,A,m),g&&function saveCache(e,t,i,n){const r={},a=t.attributes;let o=0;const l=i.getAttributes();for(const t in l){if(l[t].location>=0){let i=a[t];void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor));const n={};n.attribute=i,i&&i.data&&(n.data=i.data),r[t]=n,o++}}h.attributes=r,h.attributesNum=o,h.index=n}(r,p,A,m)}else{const e=!0===c.wireframe;h.geometry===p.id&&h.program===A.id&&h.wireframe===e||(h.geometry=p.id,h.program=A.id,h.wireframe=e,g=!0)}null!==m&&i.update(m,e.ELEMENT_ARRAY_BUFFER),(g||d)&&(d=!1,function setupVertexAttributes(r,a,o,l){if(!1===n.isWebGL2&&(r.isInstancedMesh||l.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;initAttributes();const c=l.attributes,h=o.getAttributes(),d=a.defaultAttributeValues;for(const t in h){const a=h[t];if(a.location>=0){let o=c[t];if(void 0===o&&("instanceMatrix"===t&&r.instanceMatrix&&(o=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(o=r.instanceColor)),void 0!==o){const t=o.normalized,c=o.itemSize,h=i.get(o);if(void 0===h)continue;const d=h.buffer,A=h.type,p=h.bytesPerElement,m=!0===n.isWebGL2&&(A===e.INT||A===e.UNSIGNED_INT||o.gpuType===X);if(o.isInterleavedBufferAttribute){const i=o.data,n=i.stride,h=o.offset;if(i.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const r="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let a=void 0!==i.precision?i.precision:"highp";const o=getMaxPrecision(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=r||t.has("WEBGL_draw_buffers"),c=!0===i.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),A=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),m=e.getParameter(e.MAX_VERTEX_ATTRIBS),g=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),f=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),E=d>0,y=r||t.has("OES_texture_float");return{isWebGL2:r,drawBuffers:l,getMaxAnisotropy:function getMaxAnisotropy(){if(void 0!==n)return n;if(!0===t.has("EXT_texture_filter_anisotropic")){const i=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:d,maxTextureSize:A,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:g,maxVaryings:f,maxFragmentUniforms:v,vertexTextures:E,floatFragmentTextures:y,floatVertexTextures:E&&y,maxSamples:r?e.getParameter(e.MAX_SAMPLES):0}}function WebGLClipping(e){const t=this;let i=null,n=0,r=!1,a=!1;const o=new Plane,l=new Matrix3,c={value:null,needsUpdate:!1};function projectPlanes(e,i,n,r){const a=null!==e?e.length:0;let h=null;if(0!==a){if(h=c.value,!0!==r||null===h){const t=n+4*a,r=i.matrixWorldInverse;l.getNormalMatrix(r),(null===h||h.length0);t.numPlanes=n,t.numIntersection=0}();else{const e=a?0:n,t=4*e;let r=m.clippingState||null;c.value=r,r=projectPlanes(d,l,t,h);for(let e=0;e!==t;++e)r[e]=i[e];m.clippingState=r,this.numIntersection=A?this.numPlanes:0,this.numPlanes+=e}}}function WebGLCubeMaps(e){let t=new WeakMap;function mapTextureMapping(e,t){return t===x?e.mapping=y:304===t&&(e.mapping=_),e}function onTextureDispose(e){const i=e.target;i.removeEventListener("dispose",onTextureDispose);const n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function get(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const n=i.mapping;if(n===x||304===n){if(t.has(i)){return mapTextureMapping(t.get(i).texture,i.mapping)}{const n=i.image;if(n&&n.height>0){const r=new WebGLCubeRenderTarget(n.height/2);return r.fromEquirectangularTexture(e,i),t.set(i,r),i.addEventListener("dispose",onTextureDispose),mapTextureMapping(r.texture,i.mapping)}return null}}}return i},dispose:function dispose(){t=new WeakMap}}}class OrthographicCamera extends Camera{constructor(e=-1,t=1,i=1,n=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let r=i-e,a=i+e,o=n+t,l=n-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,a=r+e*this.view.width,o-=t*this.view.offsetY,l=o-t*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Xi=[.125,.215,.35,.446,.526,.582],ji=20,Yi=new OrthographicCamera,Ki=new Color;let $i=null;const Ji=(1+Math.sqrt(5))/2,Zi=1/Ji,en=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,Ji,Zi),new Vector3(0,Ji,-Zi),new Vector3(Zi,0,Ji),new Vector3(-Zi,0,Ji),new Vector3(Ji,Zi,0),new Vector3(-Ji,Zi,0)];class PMREMGenerator{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){$i=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,n,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?l=Xi[o-e+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),h=-c,d=1+c,A=[h,h,d,h,d,d,h,h,d,d,h,d],p=6,m=6,g=3,f=2,v=1,E=new Float32Array(g*m*p),y=new Float32Array(f*m*p),_=new Float32Array(v*m*p);for(let e=0;e2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];E.set(n,g*m*e),y.set(A,f*m*e);const r=[e,e,e,e,e,e];_.set(r,v*m*e)}const x=new BufferGeometry;x.setAttribute("position",new BufferAttribute(E,g)),x.setAttribute("uv",new BufferAttribute(y,f)),x.setAttribute("faceIndex",new BufferAttribute(_,v)),t.push(x),r>4&&r--}return{lodPlanes:t,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=function _getBlurShader(e,t,i){const n=new Float32Array(ji),r=new Vector3(0,1,0),a=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{n:ji,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return a}(n,e,t)}return n}_compileMaterial(e){const t=new Mesh(this._lodPlanes[0],e);this._renderer.compile(t,Yi)}_sceneToCubeUV(e,t,i,n){const r=new PerspectiveCamera(90,1,t,i),a=[1,-1,1,1,1,1],l=[1,1,1,-1,-1,-1],c=this._renderer,h=c.autoClear,d=c.toneMapping;c.getClearColor(Ki),c.toneMapping=p,c.autoClear=!1;const A=new MeshBasicMaterial({name:"PMREM.Background",side:o,depthWrite:!1,depthTest:!1}),m=new Mesh(new BoxGeometry,A);let g=!1;const f=e.background;f?f.isColor&&(A.color.copy(f),e.background=null,g=!0):(A.color.copy(Ki),g=!0);for(let t=0;t<6;t++){const i=t%3;0===i?(r.up.set(0,a[t],0),r.lookAt(l[t],0,0)):1===i?(r.up.set(0,0,a[t]),r.lookAt(0,l[t],0)):(r.up.set(0,a[t],0),r.lookAt(0,0,l[t]));const o=this._cubeSize;_setViewport(n,i*o,t>2?o:0,o,o),c.setRenderTarget(n),g&&c.render(m,r),c.render(e,r)}m.geometry.dispose(),m.material.dispose(),c.toneMapping=d,c.autoClear=h,e.background=f}_textureToCubeUV(e,t){const i=this._renderer,n=e.mapping===y||e.mapping===_;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial());const r=n?this._cubemapMaterial:this._equirectMaterial,a=new Mesh(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const o=this._cubeSize;_setViewport(t,0,0,3*o,2*o),i.setRenderTarget(t),i.render(a,Yi)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let t=1;tji&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to 20`);const f=[];let v=0;for(let e=0;eE-4?n-E+4:0),4*(this._cubeSize-y),3*y,2*y),l.setRenderTarget(t),l.render(h,Yi)}}function _createRenderTarget(e,t,i){const n=new WebGLRenderTarget(e,t,i);return n.texture.mapping=S,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function _setViewport(e,t,i,n,r){e.viewport.set(t,i,n,r),e.scissor.set(t,i,n,r)}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function WebGLCubeUVMaps(e){let t=new WeakMap,i=null;function onTextureDispose(e){const i=e.target;i.removeEventListener("dispose",onTextureDispose);const n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function get(n){if(n&&n.isTexture){const r=n.mapping,a=r===x||304===r,o=r===y||r===_;if(a||o){if(n.isRenderTargetTexture&&!0===n.needsPMREMUpdate){n.needsPMREMUpdate=!1;let r=t.get(n);return null===i&&(i=new PMREMGenerator(e)),r=a?i.fromEquirectangular(n,r):i.fromCubemap(n,r),t.set(n,r),r.texture}if(t.has(n))return t.get(n).texture;{const r=n.image;if(a&&r&&r.height>0||o&&r&&function isCubeTextureComplete(e){let t=0;const i=6;for(let n=0;nt.maxTextureSize&&(g=Math.ceil(m/t.maxTextureSize),m=t.maxTextureSize);const f=new Float32Array(m*g*4*r),v=new DataArrayTexture(f,m,g,r);v.type=Y,v.needsUpdate=!0;const E=4*p;for(let t=0;t0)return e;const r=t*i;let a=an[r];if(void 0===a&&(a=new Float32Array(r),an[r]=a),0!==t){n.toArray(a,0);for(let n=1,r=0;n!==t;++n)r+=i,e[n].toArray(a,r)}return a}function arraysEqual(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i":" "} ${r}: ${i[e]}`)}return n.join("\n")}(e.getShaderSource(t),n)}return r}function getTexelEncodingFunction(e,t){const i=function getEncodingComponents(e){switch(e){case be:return["Linear","( value )"];case Me:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+i[0]+i[1]+"; }"}function getToneMappingFunction(e,t){let i;switch(t){case m:i="Linear";break;case g:i="Reinhard";break;case f:i="OptimizedCineon";break;case v:i="ACESFilmic";break;case E:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function filterEmptyLine(e){return""!==e}function replaceLightNums(e,t){const i=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function replaceClippingPlaneNums(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const pn=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(e){return e.replace(pn,includeReplacer)}const mn=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function includeReplacer(e,t){let i=Hi[t];if(void 0===i){const e=mn.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");i=Hi[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return resolveIncludes(i)}const gn=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(e){return e.replace(gn,loopReplacer)}function loopReplacer(e,t,i,n){let r="";for(let e=parseInt(t);e0&&(B+="\n"),U=[b,"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I].filter(filterEmptyLine).join("\n"),U.length>0&&(U+="\n")):(B=[generatePrecision(a),"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I,a.instancing?"#define USE_INSTANCING":"",a.instancingColor?"#define USE_INSTANCING_COLOR":"",a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+E:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",a.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",a.displacementMap?"#define USE_DISPLACEMENTMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.anisotropyMap?"#define USE_ANISOTROPYMAP":"",a.clearcoatMap?"#define USE_CLEARCOATMAP":"",a.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",a.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",a.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.alphaHash?"#define USE_ALPHAHASH":"",a.transmission?"#define USE_TRANSMISSION":"",a.transmissionMap?"#define USE_TRANSMISSIONMAP":"",a.thicknessMap?"#define USE_THICKNESSMAP":"",a.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",a.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",a.mapUv?"#define MAP_UV "+a.mapUv:"",a.alphaMapUv?"#define ALPHAMAP_UV "+a.alphaMapUv:"",a.lightMapUv?"#define LIGHTMAP_UV "+a.lightMapUv:"",a.aoMapUv?"#define AOMAP_UV "+a.aoMapUv:"",a.emissiveMapUv?"#define EMISSIVEMAP_UV "+a.emissiveMapUv:"",a.bumpMapUv?"#define BUMPMAP_UV "+a.bumpMapUv:"",a.normalMapUv?"#define NORMALMAP_UV "+a.normalMapUv:"",a.displacementMapUv?"#define DISPLACEMENTMAP_UV "+a.displacementMapUv:"",a.metalnessMapUv?"#define METALNESSMAP_UV "+a.metalnessMapUv:"",a.roughnessMapUv?"#define ROUGHNESSMAP_UV "+a.roughnessMapUv:"",a.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+a.anisotropyMapUv:"",a.clearcoatMapUv?"#define CLEARCOATMAP_UV "+a.clearcoatMapUv:"",a.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+a.clearcoatNormalMapUv:"",a.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+a.clearcoatRoughnessMapUv:"",a.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+a.iridescenceMapUv:"",a.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+a.iridescenceThicknessMapUv:"",a.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+a.sheenColorMapUv:"",a.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+a.sheenRoughnessMapUv:"",a.specularMapUv?"#define SPECULARMAP_UV "+a.specularMapUv:"",a.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+a.specularColorMapUv:"",a.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+a.specularIntensityMapUv:"",a.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+a.transmissionMapUv:"",a.thicknessMapUv?"#define THICKNESSMAP_UV "+a.thicknessMapUv:"",a.vertexTangents&&!1===a.flatShading?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexAlphas?"#define USE_COLOR_ALPHA":"",a.vertexUv1s?"#define USE_UV1":"",a.vertexUv2s?"#define USE_UV2":"",a.vertexUv3s?"#define USE_UV3":"",a.pointsUvs?"#define USE_POINTS_UV":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.morphColors&&a.isWebGL2?"#define USE_MORPHCOLORS":"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+a.morphTextureStride:"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_COUNT "+a.morphTargetsCount:"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+f:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.useLegacyLights?"#define LEGACY_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&a.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(filterEmptyLine).join("\n"),U=[b,generatePrecision(a),"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+v:"",a.envMap?"#define "+E:"",a.envMap?"#define "+x:"",C?"#define CUBEUV_TEXEL_WIDTH "+C.texelWidth:"",C?"#define CUBEUV_TEXEL_HEIGHT "+C.texelHeight:"",C?"#define CUBEUV_MAX_MIP "+C.maxMip+".0":"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",a.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.anisotropy?"#define USE_ANISOTROPY":"",a.anisotropyMap?"#define USE_ANISOTROPYMAP":"",a.clearcoat?"#define USE_CLEARCOAT":"",a.clearcoatMap?"#define USE_CLEARCOATMAP":"",a.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.iridescence?"#define USE_IRIDESCENCE":"",a.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",a.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",a.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.alphaTest?"#define USE_ALPHATEST":"",a.alphaHash?"#define USE_ALPHAHASH":"",a.sheen?"#define USE_SHEEN":"",a.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",a.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",a.transmission?"#define USE_TRANSMISSION":"",a.transmissionMap?"#define USE_TRANSMISSIONMAP":"",a.thicknessMap?"#define USE_THICKNESSMAP":"",a.vertexTangents&&!1===a.flatShading?"#define USE_TANGENT":"",a.vertexColors||a.instancingColor?"#define USE_COLOR":"",a.vertexAlphas?"#define USE_COLOR_ALPHA":"",a.vertexUv1s?"#define USE_UV1":"",a.vertexUv2s?"#define USE_UV2":"",a.vertexUv3s?"#define USE_UV3":"",a.pointsUvs?"#define USE_POINTS_UV":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+f:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.useLegacyLights?"#define LEGACY_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&a.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",a.toneMapping!==p?"#define TONE_MAPPING":"",a.toneMapping!==p?Hi.tonemapping_pars_fragment:"",a.toneMapping!==p?getToneMappingFunction("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.opaque?"#define OPAQUE":"",Hi.colorspace_pars_fragment,getTexelEncodingFunction("linearToOutputTexel",a.outputColorSpace),a.useDepthPacking?"#define DEPTH_PACKING "+a.depthPacking:"","\n"].filter(filterEmptyLine).join("\n")),m=resolveIncludes(m),m=replaceLightNums(m,a),m=replaceClippingPlaneNums(m,a),g=resolveIncludes(g),g=replaceLightNums(g,a),g=replaceClippingPlaneNums(g,a),m=unrollLoops(m),g=unrollLoops(g),a.isWebGL2&&!0!==a.isRawShaderMaterial&&(F="#version 300 es\n",B=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+B,U=["#define varying in",a.glslVersion===Be?"":"layout(location = 0) out highp vec4 pc_fragColor;",a.glslVersion===Be?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+U);const O=F+B+m,G=F+U+g,W=WebGLShader(l,l.VERTEX_SHADER,O),q=WebGLShader(l,l.FRAGMENT_SHADER,G);if(l.attachShader(T,W),l.attachShader(T,q),void 0!==a.index0AttributeName?l.bindAttribLocation(T,0,a.index0AttributeName):!0===a.morphTargets&&l.bindAttribLocation(T,0,"position"),l.linkProgram(T),e.debug.checkShaderErrors){const t=l.getProgramInfoLog(T).trim(),i=l.getShaderInfoLog(W).trim(),n=l.getShaderInfoLog(q).trim();let r=!0,a=!0;if(!1===l.getProgramParameter(T,l.LINK_STATUS))if(r=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(l,T,W,q);else{const e=getShaderErrors(l,W,"vertex"),i=getShaderErrors(l,q,"fragment");console.error("THREE.WebGLProgram: Shader Error "+l.getError()+" - VALIDATE_STATUS "+l.getProgramParameter(T,l.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+i)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==i&&""!==n||(a=!1);a&&(this.diagnostics={runnable:r,programLog:t,vertexShader:{log:i,prefix:B},fragmentShader:{log:n,prefix:U}})}let X,j;return l.deleteShader(W),l.deleteShader(q),this.getUniforms=function(){return void 0===X&&(X=new WebGLUniforms(l,T)),X},this.getAttributes=function(){return void 0===j&&(j=function fetchAttributeLocations(e,t){const i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=a.clearcoat>0,he=a.iridescence>0,ue=a.sheen>0,de=a.transmission>0,Ae=le&&!!a.anisotropyMap,pe=ce&&!!a.clearcoatMap,me=ce&&!!a.clearcoatNormalMap,ge=ce&&!!a.clearcoatRoughnessMap,fe=he&&!!a.iridescenceMap,ve=he&&!!a.iridescenceThicknessMap,Ee=ue&&!!a.sheenColorMap,ye=ue&&!!a.sheenRoughnessMap,_e=!!a.specularMap,xe=!!a.specularColorMap,Se=!!a.specularIntensityMap,Ce=de&&!!a.transmissionMap,Me=de&&!!a.thicknessMap,Ie=!!a.gradientMap,we=!!a.alphaMap,Te=a.alphaTest>0,Be=!!a.alphaHash,Re=!!a.extensions,Le=!!C.attributes.uv1,De=!!C.attributes.uv2,Ue=!!C.attributes.uv3;return{isWebGL2:m,shaderID:B,shaderType:a.type,shaderName:a.name,vertexShader:O,fragmentShader:G,defines:a.defines,customVertexShaderID:W,customFragmentShaderID:q,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:v,instancing:Y,instancingColor:Y&&null!==_.instanceColor,supportsVertexTextures:f,outputColorSpace:null===j?e.outputColorSpace:!0===j.isXRRenderTarget?j.texture.colorSpace:be,map:K,matcap:$,envMap:J,envMapMode:J&&I.mapping,envMapCubeUVHeight:T,aoMap:ee,lightMap:te,bumpMap:ie,normalMap:ne,displacementMap:f&&re,emissiveMap:se,normalMapObjectSpace:ne&&1===a.normalMapType,normalMapTangentSpace:ne&&0===a.normalMapType,metalnessMap:ae,roughnessMap:oe,anisotropy:le,anisotropyMap:Ae,clearcoat:ce,clearcoatMap:pe,clearcoatNormalMap:me,clearcoatRoughnessMap:ge,iridescence:he,iridescenceMap:fe,iridescenceThicknessMap:ve,sheen:ue,sheenColorMap:Ee,sheenRoughnessMap:ye,specularMap:_e,specularColorMap:xe,specularIntensityMap:Se,transmission:de,transmissionMap:Ce,thicknessMap:Me,gradientMap:Ie,opaque:!1===a.transparent&&1===a.blending,alphaMap:we,alphaTest:Te,alphaHash:Be,combine:a.combine,mapUv:K&&getChannel(a.map.channel),aoMapUv:ee&&getChannel(a.aoMap.channel),lightMapUv:te&&getChannel(a.lightMap.channel),bumpMapUv:ie&&getChannel(a.bumpMap.channel),normalMapUv:ne&&getChannel(a.normalMap.channel),displacementMapUv:re&&getChannel(a.displacementMap.channel),emissiveMapUv:se&&getChannel(a.emissiveMap.channel),metalnessMapUv:ae&&getChannel(a.metalnessMap.channel),roughnessMapUv:oe&&getChannel(a.roughnessMap.channel),anisotropyMapUv:Ae&&getChannel(a.anisotropyMap.channel),clearcoatMapUv:pe&&getChannel(a.clearcoatMap.channel),clearcoatNormalMapUv:me&&getChannel(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ge&&getChannel(a.clearcoatRoughnessMap.channel),iridescenceMapUv:fe&&getChannel(a.iridescenceMap.channel),iridescenceThicknessMapUv:ve&&getChannel(a.iridescenceThicknessMap.channel),sheenColorMapUv:Ee&&getChannel(a.sheenColorMap.channel),sheenRoughnessMapUv:ye&&getChannel(a.sheenRoughnessMap.channel),specularMapUv:_e&&getChannel(a.specularMap.channel),specularColorMapUv:xe&&getChannel(a.specularColorMap.channel),specularIntensityMapUv:Se&&getChannel(a.specularIntensityMap.channel),transmissionMapUv:Ce&&getChannel(a.transmissionMap.channel),thicknessMapUv:Me&&getChannel(a.thicknessMap.channel),alphaMapUv:we&&getChannel(a.alphaMap.channel),vertexTangents:!!C.attributes.tangent&&(ne||le),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!C.attributes.color&&4===C.attributes.color.itemSize,vertexUv1s:Le,vertexUv2s:De,vertexUv3s:Ue,pointsUvs:!0===_.isPoints&&!!C.attributes.uv&&(K||we),fog:!!x,useFog:!0===a.fog,fogExp2:x&&x.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:g,skinning:!0===_.isSkinnedMesh,morphTargets:void 0!==C.morphAttributes.position,morphNormals:void 0!==C.morphAttributes.normal,morphColors:void 0!==C.morphAttributes.color,morphTargetsCount:F,morphTextureStride:X,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numSpotLightMaps:h.spotLightMap.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numDirLightShadows:h.directionalShadowMap.length,numPointLightShadows:h.pointShadowMap.length,numSpotLightShadows:h.spotShadowMap.length,numSpotLightShadowsWithMaps:h.numSpotLightShadowsWithMaps,numClippingPlanes:c.numPlanes,numClipIntersection:c.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&A.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:p,useLegacyLights:e.useLegacyLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===l,flipSided:a.side===o,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:Re&&!0===a.extensions.derivatives,extensionFragDepth:Re&&!0===a.extensions.fragDepth,extensionDrawBuffers:Re&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:Re&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:m||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:m||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:m||n.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function getProgramCacheKey(t){const i=[];if(t.shaderID?i.push(t.shaderID):(i.push(t.customVertexShaderID),i.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)i.push(e),i.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function getProgramCacheKeyParameters(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(i,t),function getProgramCacheKeyBooleans(e,t){h.disableAll(),t.isWebGL2&&h.enable(0);t.supportsVertexTextures&&h.enable(1);t.instancing&&h.enable(2);t.instancingColor&&h.enable(3);t.matcap&&h.enable(4);t.envMap&&h.enable(5);t.normalMapObjectSpace&&h.enable(6);t.normalMapTangentSpace&&h.enable(7);t.clearcoat&&h.enable(8);t.iridescence&&h.enable(9);t.alphaTest&&h.enable(10);t.vertexColors&&h.enable(11);t.vertexAlphas&&h.enable(12);t.vertexUv1s&&h.enable(13);t.vertexUv2s&&h.enable(14);t.vertexUv3s&&h.enable(15);t.vertexTangents&&h.enable(16);t.anisotropy&&h.enable(17);e.push(h.mask),h.disableAll(),t.fog&&h.enable(0);t.useFog&&h.enable(1);t.flatShading&&h.enable(2);t.logarithmicDepthBuffer&&h.enable(3);t.skinning&&h.enable(4);t.morphTargets&&h.enable(5);t.morphNormals&&h.enable(6);t.morphColors&&h.enable(7);t.premultipliedAlpha&&h.enable(8);t.shadowMapEnabled&&h.enable(9);t.useLegacyLights&&h.enable(10);t.doubleSided&&h.enable(11);t.flipSided&&h.enable(12);t.useDepthPacking&&h.enable(13);t.dithering&&h.enable(14);t.transmission&&h.enable(15);t.sheen&&h.enable(16);t.opaque&&h.enable(17);t.pointsUvs&&h.enable(18);e.push(h.mask)}(i,t),i.push(e.outputColorSpace)),i.push(t.customProgramCacheKey),i.join()},getUniforms:function getUniforms(e){const t=E[e.type];let i;if(t){const e=Wi[t];i=Fi.clone(e.uniforms)}else i=e.uniforms;return i},acquireProgram:function acquireProgram(t,i){let n;for(let e=0,t=A.length;e0?n.push(h):!0===a.transparent?r.push(h):i.push(h)},unshift:function unshift(e,t,a,o,l,c){const h=getNextRenderItem(e,t,a,o,l,c);a.transmission>0?n.unshift(h):!0===a.transparent?r.unshift(h):i.unshift(h)},finish:function finish(){for(let i=t,n=e.length;i1&&i.sort(e||painterSortStable),n.length>1&&n.sort(t||reversePainterSortStable),r.length>1&&r.sort(t||reversePainterSortStable)}}}function WebGLRenderLists(){let e=new WeakMap;return{get:function get(t,i){const n=e.get(t);let r;return void 0===n?(r=new WebGLRenderList,e.set(t,[r])):i>=n.length?(r=new WebGLRenderList,n.push(r)):r=n[i],r},dispose:function dispose(){e=new WeakMap}}}function UniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Vector3,color:new Color};break;case"SpotLight":i={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Vector3,color:new Color,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case"RectAreaLight":i={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3}}return e[t.id]=i,i}}}let vn=0;function shadowCastingAndTexturingLightsFirst(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function WebGLLights(e,t){const i=new UniformsCache,n=function ShadowUniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=i,i}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let e=0;e<9;e++)r.probe.push(new Vector3);const a=new Vector3,o=new Matrix4,l=new Matrix4;return{setup:function setup(a,o){let l=0,c=0,h=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let d=0,A=0,p=0,m=0,g=0,f=0,v=0,E=0,y=0,_=0;a.sort(shadowCastingAndTexturingLightsFirst);const x=!0===o?Math.PI:1;for(let e=0,t=a.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=zi.LTC_FLOAT_1,r.rectAreaLTC2=zi.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=zi.LTC_HALF_1,r.rectAreaLTC2=zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=l,r.ambient[1]=c,r.ambient[2]=h;const S=r.hash;S.directionalLength===d&&S.pointLength===A&&S.spotLength===p&&S.rectAreaLength===m&&S.hemiLength===g&&S.numDirectionalShadows===f&&S.numPointShadows===v&&S.numSpotShadows===E&&S.numSpotMaps===y||(r.directional.length=d,r.spot.length=p,r.rectArea.length=m,r.point.length=A,r.hemi.length=g,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=v,r.pointShadowMap.length=v,r.spotShadow.length=E,r.spotShadowMap.length=E,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=v,r.spotLightMatrix.length=E+y-_,r.spotLightMap.length=y,r.numSpotLightShadowsWithMaps=_,S.directionalLength=d,S.pointLength=A,S.spotLength=p,S.rectAreaLength=m,S.hemiLength=g,S.numDirectionalShadows=f,S.numPointShadows=v,S.numSpotShadows=E,S.numSpotMaps=y,r.version=vn++)},setupView:function setupView(e,t){let i=0,n=0,c=0,h=0,d=0;const A=t.matrixWorldInverse;for(let t=0,p=e.length;t=a.length?(o=new WebGLRenderState(e,t),a.push(o)):o=a[r],o},dispose:function dispose(){i=new WeakMap}}}class MeshDepthMaterial extends Material$1{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material$1{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function WebGLShadowMap(e,t,n){let c=new Frustum;const h=new Vector2,d=new Vector2,A=new Vector4,p=new MeshDepthMaterial({depthPacking:3201}),m=new MeshDistanceMaterial,g={},f=n.maxTextureSize,v={[a]:o,[o]:a,[l]:l},E=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=E.clone();y.defines.HORIZONTAL_PASS=1;const _=new BufferGeometry;_.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Mesh(_,E),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=i;let C=this.type;function VSMPass(i,n){const r=t.update(x);E.defines.VSM_SAMPLES!==i.blurSamples&&(E.defines.VSM_SAMPLES=i.blurSamples,y.defines.VSM_SAMPLES=i.blurSamples,E.needsUpdate=!0,y.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new WebGLRenderTarget(h.x,h.y)),E.uniforms.shadow_pass.value=i.map.texture,E.uniforms.resolution.value=i.mapSize,E.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(n,null,r,E,x,null),y.uniforms.shadow_pass.value=i.mapPass.texture,y.uniforms.resolution.value=i.mapSize,y.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(n,null,r,y,x,null)}function getDepthMaterial(t,i,n,a){let o=null;const l=!0===n.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==l)o=l;else if(o=!0===n.isPointLight?m:p,e.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){const e=o.uuid,t=i.uuid;let n=g[e];void 0===n&&(n={},g[e]=n);let r=n[t];void 0===r&&(r=o.clone(),n[t]=r),o=r}if(o.visible=i.visible,o.wireframe=i.wireframe,o.side=a===r?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:v[i.side],o.alphaMap=i.alphaMap,o.alphaTest=i.alphaTest,o.map=i.map,o.clipShadows=i.clipShadows,o.clippingPlanes=i.clippingPlanes,o.clipIntersection=i.clipIntersection,o.displacementMap=i.displacementMap,o.displacementScale=i.displacementScale,o.displacementBias=i.displacementBias,o.wireframeLinewidth=i.wireframeLinewidth,o.linewidth=i.linewidth,!0===n.isPointLight&&!0===o.isMeshDistanceMaterial){e.properties.get(o).light=n}return o}function renderObject(i,n,a,o,l){if(!1===i.visible)return;if(i.layers.test(n.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&l===r)&&(!i.frustumCulled||c.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,i.matrixWorld);const n=t.update(i),r=i.material;if(Array.isArray(r)){const t=n.groups;for(let c=0,h=t.length;cf||h.y>f)&&(h.x>f&&(d.x=Math.floor(f/v.x),h.x=d.x*v.x,l.mapSize.x=d.x),h.y>f&&(d.y=Math.floor(f/v.y),h.y=d.y*v.y,l.mapSize.y=d.y)),null===l.map||!0===m||!0===g){const e=this.type!==r?{minFilter:T,magFilter:T}:{};null!==l.map&&l.map.dispose(),l.map=new WebGLRenderTarget(h.x,h.y,e),l.map.texture.name=o.name+".shadowMap",l.camera.updateProjectionMatrix()}e.setRenderTarget(l.map),e.clear();const E=l.getViewportCount();for(let e=0;e=1):-1!==j.indexOf("OpenGL ES")&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),q=X>=2);let Y=null,K={};const $=e.getParameter(e.SCISSOR_BOX),J=e.getParameter(e.VIEWPORT),ee=(new Vector4).fromArray($),te=(new Vector4).fromArray(J);function createTexture(t,i,r,a){const o=new Uint8Array(4),l=e.createTexture();e.bindTexture(t,l),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let l=0;ln||e.height>n)&&(r=n/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const n=t?floorPowerOfTwo:Math.floor,a=n(r*e.width),o=n(r*e.height);void 0===f&&(f=createCanvas(a,o));const l=i?createCanvas(a,o):f;l.width=a,l.height=o;return l.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function isPowerOfTwo$1(e){return isPowerOfTwo(e.width)&&isPowerOfTwo(e.height)}function textureNeedsGenerateMipmaps(e,t){return e.generateMipmaps&&t&&e.minFilter!==T&&e.minFilter!==F}function generateMipmap(t){e.generateMipmap(t)}function getInternalFormat(i,n,r,a,o=!1){if(!1===l)return n;if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let c=n;return n===e.RED&&(r===e.FLOAT&&(c=e.R32F),r===e.HALF_FLOAT&&(c=e.R16F),r===e.UNSIGNED_BYTE&&(c=e.R8)),n===e.RG&&(r===e.FLOAT&&(c=e.RG32F),r===e.HALF_FLOAT&&(c=e.RG16F),r===e.UNSIGNED_BYTE&&(c=e.RG8)),n===e.RGBA&&(r===e.FLOAT&&(c=e.RGBA32F),r===e.HALF_FLOAT&&(c=e.RGBA16F),r===e.UNSIGNED_BYTE&&(c=a===Me&&!1===o?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)),c!==e.R16F&&c!==e.R32F&&c!==e.RG16F&&c!==e.RG32F&&c!==e.RGBA16F&&c!==e.RGBA32F||t.get("EXT_color_buffer_float"),c}function getMipLevels(e,t,i){return!0===textureNeedsGenerateMipmaps(e,i)||e.isFramebufferTexture&&e.minFilter!==T&&e.minFilter!==F?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function filterFallback(t){return t===T||t===B||t===U?e.NEAREST:e.LINEAR}function onTextureDispose(e){const t=e.target;t.removeEventListener("dispose",onTextureDispose),function deallocateTexture(e){const t=n.get(e);if(void 0===t.__webglInit)return;const i=e.source,r=v.get(i);if(r){const n=r[t.__cacheKey];n.usedTimes--,0===n.usedTimes&&deleteTexture(e),0===Object.keys(r).length&&v.delete(i)}n.remove(e)}(t),t.isVideoTexture&&g.delete(t)}function onRenderTargetDispose(t){const i=t.target;i.removeEventListener("dispose",onRenderTargetDispose),function deallocateRenderTarget(t){const i=t.texture,r=n.get(t),a=n.get(i);void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let t=0;t0&&a.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void uploadTexture(a,t,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+r)}const _={[C]:e.REPEAT,[b]:e.CLAMP_TO_EDGE,[I]:e.MIRRORED_REPEAT},x={[T]:e.NEAREST,[B]:e.NEAREST_MIPMAP_NEAREST,[U]:e.NEAREST_MIPMAP_LINEAR,[F]:e.LINEAR,[O]:e.LINEAR_MIPMAP_NEAREST,[G]:e.LINEAR_MIPMAP_LINEAR},S={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function setTextureParameters(i,a,o){if(o?(e.texParameteri(i,e.TEXTURE_WRAP_S,_[a.wrapS]),e.texParameteri(i,e.TEXTURE_WRAP_T,_[a.wrapT]),i!==e.TEXTURE_3D&&i!==e.TEXTURE_2D_ARRAY||e.texParameteri(i,e.TEXTURE_WRAP_R,_[a.wrapR]),e.texParameteri(i,e.TEXTURE_MAG_FILTER,x[a.magFilter]),e.texParameteri(i,e.TEXTURE_MIN_FILTER,x[a.minFilter])):(e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i!==e.TEXTURE_3D&&i!==e.TEXTURE_2D_ARRAY||e.texParameteri(i,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),a.wrapS===b&&a.wrapT===b||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(i,e.TEXTURE_MAG_FILTER,filterFallback(a.magFilter)),e.texParameteri(i,e.TEXTURE_MIN_FILTER,filterFallback(a.minFilter)),a.minFilter!==T&&a.minFilter!==F&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(e.texParameteri(i,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(i,e.TEXTURE_COMPARE_FUNC,S[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===T)return;if(a.minFilter!==U&&a.minFilter!==G)return;if(a.type===Y&&!1===t.has("OES_texture_float_linear"))return;if(!1===l&&a.type===K&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(e.texParameterf(i,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,r.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function initTexture(t,i){let n=!1;void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",onTextureDispose));const r=i.source;let a=v.get(r);void 0===a&&(a={},v.set(r,a));const l=function getTextureCacheKey(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(i);if(l!==t.__cacheKey){void 0===a[l]&&(a[l]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,n=!0),a[l].usedTimes++;const r=a[t.__cacheKey];void 0!==r&&(a[t.__cacheKey].usedTimes--,0===r.usedTimes&&deleteTexture(i)),t.__cacheKey=l,t.__webglTexture=a[l].texture}return n}function uploadTexture(t,r,o){let c=e.TEXTURE_2D;(r.isDataArrayTexture||r.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),r.isData3DTexture&&(c=e.TEXTURE_3D);const h=initTexture(t,r),A=r.source;i.bindTexture(c,t.__webglTexture,e.TEXTURE0+o);const p=n.get(A);if(A.version!==p.__version||!0===h){i.activeTexture(e.TEXTURE0+o),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=function textureNeedsPowerOfTwo(e){return!l&&(e.wrapS!==b||e.wrapT!==b||e.minFilter!==T&&e.minFilter!==F)}(r)&&!1===isPowerOfTwo$1(r.image);let n=resizeImage(r.image,t,!1,d);n=verifyColorSpace(r,n);const m=isPowerOfTwo$1(n)||l,g=a.convert(r.format,r.colorSpace);let f,v=a.convert(r.type),E=getInternalFormat(r.internalFormat,g,v,r.colorSpace);setTextureParameters(c,r,m);const y=r.mipmaps,_=l&&!0!==r.isVideoTexture,x=void 0===p.__version||!0===h,S=getMipLevels(r,n,m);if(r.isDepthTexture)E=e.DEPTH_COMPONENT,l?E=r.type===Y?e.DEPTH_COMPONENT32F:r.type===j?e.DEPTH_COMPONENT24:r.type===$?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:r.type===Y&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===ee&&E===e.DEPTH_COMPONENT&&r.type!==q&&r.type!==j&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=j,v=a.convert(r.type)),r.format===te&&E===e.DEPTH_COMPONENT&&(E=e.DEPTH_STENCIL,r.type!==$&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=$,v=a.convert(r.type))),x&&(_?i.texStorage2D(e.TEXTURE_2D,1,E,n.width,n.height):i.texImage2D(e.TEXTURE_2D,0,E,n.width,n.height,0,g,v,null));else if(r.isDataTexture)if(y.length>0&&m){_&&x&&i.texStorage2D(e.TEXTURE_2D,S,E,y[0].width,y[0].height);for(let t=0,n=y.length;t>=1,r>>=1}}else if(y.length>0&&m){_&&x&&i.texStorage2D(e.TEXTURE_2D,S,E,y[0].width,y[0].height);for(let t=0,n=y.length;t=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,l,c,n.get(o).__webglTexture,0),i.bindFramebuffer(e.FRAMEBUFFER,null)}function setupRenderBufferStorage(t,i,n){if(e.bindRenderbuffer(e.RENDERBUFFER,t),i.depthBuffer&&!i.stencilBuffer){let r=e.DEPTH_COMPONENT16;if(n||useMultisampledRTT(i)){const t=i.depthTexture;t&&t.isDepthTexture&&(t.type===Y?r=e.DEPTH_COMPONENT32F:t.type===j&&(r=e.DEPTH_COMPONENT24));const n=getRenderTargetSamples(i);useMultisampledRTT(i)?p.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,n,r,i.width,i.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,n,r,i.width,i.height)}else e.renderbufferStorage(e.RENDERBUFFER,r,i.width,i.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(i.depthBuffer&&i.stencilBuffer){const r=getRenderTargetSamples(i);n&&!1===useMultisampledRTT(i)?e.renderbufferStorageMultisample(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,i.width,i.height):useMultisampledRTT(i)?p.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,i.width,i.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===i.isWebGLMultipleRenderTargets?i.texture:[i.texture];for(let r=0;r0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function verifyColorSpace(e,i){const n=e.colorSpace,r=e.format,a=e.type;return!0===e.isCompressedTexture||e.format===Re||n!==be&&n!==Ce&&(n===Me?!1===l?!0===t.has("EXT_sRGB")&&r===J?(e.format=Re,e.minFilter=F,e.generateMipmaps=!1):i=ImageUtils.sRGBToLinear(i):r===J&&a===W||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),i}this.allocateTextureUnit=function allocateTextureUnit(){const e=y;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),y+=1,e},this.resetTextureUnits=function resetTextureUnits(){y=0},this.setTexture2D=setTexture2D,this.setTexture2DArray=function setTexture2DArray(t,r){const a=n.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,r):i.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+r)},this.setTexture3D=function setTexture3D(t,r){const a=n.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,r):i.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function setTextureCube(t,r){const o=n.get(t);t.version>0&&o.__version!==t.version?function uploadCubeTexture(t,r,o){if(6!==r.image.length)return;const c=initTexture(t,r),d=r.source;i.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);const A=n.get(d);if(d.version!==A.__version||!0===c){i.activeTexture(e.TEXTURE0+o),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=r.isCompressedTexture||r.image[0].isCompressedTexture,n=r.image[0]&&r.image[0].isDataTexture,p=[];for(let e=0;e<6;e++)p[e]=t||n?n?r.image[e].image:r.image[e]:resizeImage(r.image[e],!1,!0,h),p[e]=verifyColorSpace(r,p[e]);const m=p[0],g=isPowerOfTwo$1(m)||l,f=a.convert(r.format,r.colorSpace),v=a.convert(r.type),E=getInternalFormat(r.internalFormat,f,v,r.colorSpace),y=l&&!0!==r.isVideoTexture,_=void 0===A.__version||!0===c;let x,S=getMipLevels(r,m,g);if(setTextureParameters(e.TEXTURE_CUBE_MAP,r,g),t){y&&_&&i.texStorage2D(e.TEXTURE_CUBE_MAP,S,E,m.width,m.height);for(let t=0;t<6;t++){x=p[t].mipmaps;for(let n=0;n0&&S++,i.texStorage2D(e.TEXTURE_CUBE_MAP,S,E,p[0].width,p[0].height));for(let t=0;t<6;t++)if(n){y?i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,p[t].width,p[t].height,f,v,p[t].data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,E,p[t].width,p[t].height,0,f,v,p[t].data);for(let n=0;n0&&!1===useMultisampledRTT(t)){const n=p?c:[c];h.__webglMultisampledFramebuffer=e.createFramebuffer(),h.__webglColorRenderbuffer=[],i.bindFramebuffer(e.FRAMEBUFFER,h.__webglMultisampledFramebuffer);for(let i=0;i0&&!1===useMultisampledRTT(t)){const r=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,o=t.height;let l=e.COLOR_BUFFER_BIT;const c=[],h=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,d=n.get(t),A=!0===t.isWebGLMultipleRenderTargets;if(A)for(let t=0;tl+h?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=l-h&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==l&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),null!==r&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));null!==o&&(n=t.getPose(e.targetRaySpace,i),null===n&&null!==r&&(n=r),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(En)))}return null!==o&&(o.visible=null!==n),null!==l&&(l.visible=null!==r),null!==c&&(c.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new Group;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class DepthTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h){if((h=void 0!==h?h:ee)!==ee&&h!==te)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&h===ee&&(i=j),void 0===i&&h===te&&(i=$),super(null,n,r,a,o,l,h,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:T,this.minFilter=void 0!==l?l:T,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class WebXRManager extends EventDispatcher{constructor(e,t){super();const i=this;let n=null,r=1,a=null,o="local-floor",l=1,c=null,h=null,d=null,A=null,p=null,m=null;const g=t.getContextAttributes();let f=null,v=null;const E=[],y=[],_=new PerspectiveCamera;_.layers.enable(1),_.viewport=new Vector4;const x=new PerspectiveCamera;x.layers.enable(2),x.viewport=new Vector4;const S=[_,x],C=new ArrayCamera;C.layers.enable(1),C.layers.enable(2);let b=null,I=null;function onSessionEvent(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const i=E[t];void 0!==i&&(i.update(e.inputSource,e.frame,c||a),i.dispatchEvent({type:e.type,data:e.inputSource}))}function onSessionEnd(){n.removeEventListener("select",onSessionEvent),n.removeEventListener("selectstart",onSessionEvent),n.removeEventListener("selectend",onSessionEvent),n.removeEventListener("squeeze",onSessionEvent),n.removeEventListener("squeezestart",onSessionEvent),n.removeEventListener("squeezeend",onSessionEvent),n.removeEventListener("end",onSessionEnd),n.removeEventListener("inputsourceschange",onInputSourcesChange);for(let e=0;e=0&&(y[n]=null,E[n].disconnect(i))}for(let t=0;t=y.length){y.push(i),n=e;break}if(null===y[e]){y[e]=i,n=e;break}}if(-1===n)break}const r=E[n];r&&r.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getGripSpace()},this.getHand=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return null!==A?A:p},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return n},this.setSession=async function(h){if(n=h,null!==n){if(f=e.getRenderTarget(),n.addEventListener("select",onSessionEvent),n.addEventListener("selectstart",onSessionEvent),n.addEventListener("selectend",onSessionEvent),n.addEventListener("squeeze",onSessionEvent),n.addEventListener("squeezestart",onSessionEvent),n.addEventListener("squeezeend",onSessionEvent),n.addEventListener("end",onSessionEnd),n.addEventListener("inputsourceschange",onInputSourcesChange),!0!==g.xrCompatible&&await t.makeXRCompatible(),void 0===n.renderState.layers||!1===e.capabilities.isWebGL2){const i={antialias:void 0!==n.renderState.layers||g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};p=new XRWebGLLayer(n,t,i),n.updateRenderState({baseLayer:p}),v=new WebGLRenderTarget(p.framebufferWidth,p.framebufferHeight,{format:J,type:W,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil})}else{let i=null,a=null,o=null;g.depth&&(o=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,i=g.stencil?te:ee,a=g.stencil?$:j);const l={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:r};d=new XRWebGLBinding(n,t),A=d.createProjectionLayer(l),n.updateRenderState({layers:[A]}),v=new WebGLRenderTarget(A.textureWidth,A.textureHeight,{format:J,type:W,depthTexture:new DepthTexture(A.textureWidth,A.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:g.antialias?4:0});e.properties.get(v).__ignoreDepthValues=A.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await n.requestReferenceSpace(o),F.setContext(n),F.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const T=new Vector3,B=new Vector3;function updateCamera(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===n)return;C.near=x.near=_.near=e.near,C.far=x.far=_.far=e.far,b===C.near&&I===C.far||(n.updateRenderState({depthNear:C.near,depthFar:C.far}),b=C.near,I=C.far);const t=e.parent,i=C.cameras;updateCamera(C,t);for(let e=0;e0&&(i.alphaTest.value=n.alphaTest);const r=t.get(n).envMap;if(r&&(i.envMap.value=r,i.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,i.reflectivity.value=n.reflectivity,i.ior.value=n.ior,i.refractionRatio.value=n.refractionRatio),n.lightMap){i.lightMap.value=n.lightMap;const t=!0===e.useLegacyLights?Math.PI:1;i.lightMapIntensity.value=n.lightMapIntensity*t,refreshTransformUniform(n.lightMap,i.lightMapTransform)}n.aoMap&&(i.aoMap.value=n.aoMap,i.aoMapIntensity.value=n.aoMapIntensity,refreshTransformUniform(n.aoMap,i.aoMapTransform))}return{refreshFogUniforms:function refreshFogUniforms(t,i){i.color.getRGB(t.fogColor.value,getUnlitUniformColorSpace(e)),i.isFog?(t.fogNear.value=i.near,t.fogFar.value=i.far):i.isFogExp2&&(t.fogDensity.value=i.density)},refreshMaterialUniforms:function refreshMaterialUniforms(e,i,n,r,a){i.isMeshBasicMaterial||i.isMeshLambertMaterial?refreshUniformsCommon(e,i):i.isMeshToonMaterial?(refreshUniformsCommon(e,i),function refreshUniformsToon(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(refreshUniformsCommon(e,i),function refreshUniformsPhong(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(refreshUniformsCommon(e,i),function refreshUniformsStandard(e,i){e.metalness.value=i.metalness,i.metalnessMap&&(e.metalnessMap.value=i.metalnessMap,refreshTransformUniform(i.metalnessMap,e.metalnessMapTransform));e.roughness.value=i.roughness,i.roughnessMap&&(e.roughnessMap.value=i.roughnessMap,refreshTransformUniform(i.roughnessMap,e.roughnessMapTransform));const n=t.get(i).envMap;n&&(e.envMapIntensity.value=i.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function refreshUniformsPhysical(e,t,i){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,refreshTransformUniform(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,refreshTransformUniform(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,refreshTransformUniform(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,refreshTransformUniform(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,refreshTransformUniform(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===o&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,refreshTransformUniform(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,refreshTransformUniform(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=i.texture,e.transmissionSamplerSize.value.set(i.width,i.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,refreshTransformUniform(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,refreshTransformUniform(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,refreshTransformUniform(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,refreshTransformUniform(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,refreshTransformUniform(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,a)):i.isMeshMatcapMaterial?(refreshUniformsCommon(e,i),function refreshUniformsMatcap(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?refreshUniformsCommon(e,i):i.isMeshDistanceMaterial?(refreshUniformsCommon(e,i),function refreshUniformsDistance(e,i){const n=t.get(i).light;e.referencePosition.value.setFromMatrixPosition(n.matrixWorld),e.nearDistance.value=n.shadow.camera.near,e.farDistance.value=n.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?refreshUniformsCommon(e,i):i.isLineBasicMaterial?(!function refreshUniformsLine(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function refreshUniformsDash(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function refreshUniformsPoints(e,t,i,n){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*i,e.scale.value=.5*n,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,n,r):i.isSpriteMaterial?function refreshUniformsSprites(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function WebGLUniformsGroups(e,t,i,n){let r={},a={},o=[];const l=i.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function hasUniformChanged(e,t,i){const n=e.value;if(void 0===i[t]){if("number"==typeof n)i[t]=n;else{const e=Array.isArray(n)?n:[n],r=[];for(let t=0;t0){r=i%n;0!==r&&n-r-o.boundary<0&&(i+=n-r,a.__offset=i)}i+=o.storage}r=i%n,r>0&&(i+=n-r);return e.__size=i,e.__cache={},this}(i),h=function createBuffer(t){const i=function allocateBindingPointIndex(){for(let e=0;e0),A=!!i.morphAttributes.position,m=!!i.morphAttributes.normal,g=!!i.morphAttributes.color,f=n.toneMapped?b.toneMapping:p,v=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,E=void 0!==v?v.length:0,y=Ce.get(n),_=x.state.lights;if(!0===Ae&&(!0===pe||e!==O)){const t=e===O&&n.id===F;Ne.setState(n,e,t)}let S=!1;n.version===y.__version?y.needsLights&&y.lightsStateVersion!==_.state.version||y.outputColorSpace!==l||r.isInstancedMesh&&!1===y.instancing?S=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&!1===y.skinning?S=!0:r.isSkinnedMesh||!0!==y.skinning?y.envMap!==c||!0===n.fog&&y.fog!==a?S=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===Ne.numPlanes&&y.numIntersection===Ne.numIntersection?(y.vertexAlphas!==h||y.vertexTangents!==d||y.morphTargets!==A||y.morphNormals!==m||y.morphColors!==g||y.toneMapping!==f||!0===_e.isWebGL2&&y.morphTargetsCount!==E)&&(S=!0):S=!0:S=!0:S=!0:(S=!0,y.__version=n.version);let C=y.currentProgram;!0===S&&(C=getProgram(n,t,r));let I=!1,T=!1,B=!1;const G=C.getUniforms(),W=y.uniforms;xe.useProgram(C.program)&&(I=!0,T=!0,B=!0);n.id!==F&&(F=n.id,T=!0);if(I||O!==e){if(G.setValue(qe,"projectionMatrix",e.projectionMatrix),_e.logarithmicDepthBuffer&&G.setValue(qe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),O!==e&&(O=e,T=!0,B=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=G.map.cameraPosition;void 0!==t&&t.setValue(qe,ve.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&G.setValue(qe,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&G.setValue(qe,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){G.setOptional(qe,r,"bindMatrix"),G.setOptional(qe,r,"bindMatrixInverse");const e=r.skeleton;e&&(_e.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),G.setValue(qe,"boneTexture",e.boneTexture,Ie),G.setValue(qe,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const q=i.morphAttributes;(void 0!==q.position||void 0!==q.normal||void 0!==q.color&&!0===_e.isWebGL2)&&ke.update(r,i,C);(T||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,G.setValue(qe,"receiveShadow",r.receiveShadow));n.isMeshGouraudMaterial&&null!==n.envMap&&(W.envMap.value=c,W.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1);T&&(G.setValue(qe,"toneMappingExposure",b.toneMappingExposure),y.needsLights&&function markUniformsLightsNeedsUpdate(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(W,B),a&&!0===n.fog&&Ue.refreshFogUniforms(W,a),Ue.refreshMaterialUniforms(W,n,ae,se,me),WebGLUniforms.upload(qe,y.uniformsList,W,Ie));n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(WebGLUniforms.upload(qe,y.uniformsList,W,Ie),n.uniformsNeedUpdate=!1);n.isSpriteMaterial&&G.setValue(qe,"center",r.center);if(G.setValue(qe,"modelViewMatrix",r.modelViewMatrix),G.setValue(qe,"normalMatrix",r.normalMatrix),G.setValue(qe,"modelMatrix",r.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const e=n.uniformsGroups;for(let t=0,i=e.length;t0&&function renderTransmissionPass(e,t,i,n){const r=_e.isWebGL2;null===me&&(me=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:ye.has("EXT_color_buffer_half_float")?K:W,minFilter:G,samples:r?4:0}));b.getDrawingBufferSize(fe),r?me.setSize(fe.x,fe.y):me.setSize(floorPowerOfTwo(fe.x),floorPowerOfTwo(fe.y));const a=b.getRenderTarget();b.setRenderTarget(me),b.getClearColor(ie),ne=b.getClearAlpha(),ne<1&&b.setClearColor(16777215,.5);b.clear();const c=b.toneMapping;b.toneMapping=p,renderObjects(e,i,n),Ie.updateMultisampleRenderTarget(me),Ie.updateRenderTargetMipmap(me);let h=!1;for(let e=0,r=t.length;e0&&renderObjects(r,t,i),a.length>0&&renderObjects(a,t,i),c.length>0&&renderObjects(c,t,i),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function renderObjects(e,t,i){const n=!0===t.isScene?t.overrideMaterial:null;for(let r=0,a=e.length;r0?C[C.length-1]:null,S.pop(),_=S.length>0?S[S.length-1]:null},this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return B},this.getRenderTarget=function(){return U},this.setRenderTargetTextures=function(e,t,i){Ce.get(e.texture).__webglTexture=t,Ce.get(e.depthTexture).__webglTexture=i;const n=Ce.get(e);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===i,n.__autoAllocateDepthBuffer||!0===ye.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const i=Ce.get(e);i.__webglFramebuffer=t,i.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,i=0){U=e,T=t,B=i;let n=!0,r=null,a=!1,o=!1;if(e){const i=Ce.get(e);void 0!==i.__useDefaultFramebuffer?(xe.bindFramebuffer(qe.FRAMEBUFFER,null),n=!1):void 0===i.__webglFramebuffer?Ie.setupRenderTarget(e):i.__hasExternalTextures&&Ie.rebindTextures(e,Ce.get(e.texture).__webglTexture,Ce.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const c=Ce.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=c[t],a=!0):r=_e.isWebGL2&&e.samples>0&&!1===Ie.useMultisampledRTT(e)?Ce.get(e).__webglMultisampledFramebuffer:c,X.copy(e.viewport),ee.copy(e.scissor),te=e.scissorTest}else X.copy(ce).multiplyScalar(ae).floor(),ee.copy(he).multiplyScalar(ae).floor(),te=ue;if(xe.bindFramebuffer(qe.FRAMEBUFFER,r)&&_e.drawBuffers&&n&&xe.drawBuffers(e,r),xe.viewport(X),xe.scissor(ee),xe.setScissorTest(te),a){const n=Ce.get(e.texture);qe.framebufferTexture2D(qe.FRAMEBUFFER,qe.COLOR_ATTACHMENT0,qe.TEXTURE_CUBE_MAP_POSITIVE_X+t,n.__webglTexture,i)}else if(o){const n=Ce.get(e.texture),r=t||0;qe.framebufferTextureLayer(qe.FRAMEBUFFER,qe.COLOR_ATTACHMENT0,n.__webglTexture,i||0,r)}F=-1},this.readRenderTargetPixels=function(e,t,i,n,r,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let l=Ce.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(l=l[o]),l){xe.bindFramebuffer(qe.FRAMEBUFFER,l);try{const o=e.texture,l=o.format,c=o.type;if(l!==J&&He.convert(l)!==qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const h=c===K&&(ye.has("EXT_color_buffer_half_float")||_e.isWebGL2&&ye.has("EXT_color_buffer_float"));if(!(c===W||He.convert(c)===qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_TYPE)||c===Y&&(_e.isWebGL2||ye.has("OES_texture_float")||ye.has("WEBGL_color_buffer_float"))||h))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-n&&i>=0&&i<=e.height-r&&qe.readPixels(t,i,n,r,He.convert(l),He.convert(c),a)}finally{const e=null!==U?Ce.get(U).__webglFramebuffer:null;xe.bindFramebuffer(qe.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,i=0){const n=Math.pow(2,-i),r=Math.floor(t.image.width*n),a=Math.floor(t.image.height*n);Ie.setTexture2D(t,0),qe.copyTexSubImage2D(qe.TEXTURE_2D,i,0,0,e.x,e.y,r,a),xe.unbindTexture()},this.copyTextureToTexture=function(e,t,i,n=0){const r=t.image.width,a=t.image.height,o=He.convert(i.format),l=He.convert(i.type);Ie.setTexture2D(i,0),qe.pixelStorei(qe.UNPACK_FLIP_Y_WEBGL,i.flipY),qe.pixelStorei(qe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),qe.pixelStorei(qe.UNPACK_ALIGNMENT,i.unpackAlignment),t.isDataTexture?qe.texSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,r,a,o,l,t.image.data):t.isCompressedTexture?qe.compressedTexSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):qe.texSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,o,l,t.image),0===n&&i.generateMipmaps&&qe.generateMipmap(qe.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i,n,r=0){if(b.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,l=e.max.z-e.min.z+1,c=He.convert(n.format),h=He.convert(n.type);let d;if(n.isData3DTexture)Ie.setTexture3D(n,0),d=qe.TEXTURE_3D;else{if(!n.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Ie.setTexture2DArray(n,0),d=qe.TEXTURE_2D_ARRAY}qe.pixelStorei(qe.UNPACK_FLIP_Y_WEBGL,n.flipY),qe.pixelStorei(qe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),qe.pixelStorei(qe.UNPACK_ALIGNMENT,n.unpackAlignment);const A=qe.getParameter(qe.UNPACK_ROW_LENGTH),p=qe.getParameter(qe.UNPACK_IMAGE_HEIGHT),m=qe.getParameter(qe.UNPACK_SKIP_PIXELS),g=qe.getParameter(qe.UNPACK_SKIP_ROWS),f=qe.getParameter(qe.UNPACK_SKIP_IMAGES),v=i.isCompressedTexture?i.mipmaps[0]:i.image;qe.pixelStorei(qe.UNPACK_ROW_LENGTH,v.width),qe.pixelStorei(qe.UNPACK_IMAGE_HEIGHT,v.height),qe.pixelStorei(qe.UNPACK_SKIP_PIXELS,e.min.x),qe.pixelStorei(qe.UNPACK_SKIP_ROWS,e.min.y),qe.pixelStorei(qe.UNPACK_SKIP_IMAGES,e.min.z),i.isDataTexture||i.isData3DTexture?qe.texSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,h,v.data):i.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),qe.compressedTexSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,v.data)):qe.texSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,h,v),qe.pixelStorei(qe.UNPACK_ROW_LENGTH,A),qe.pixelStorei(qe.UNPACK_IMAGE_HEIGHT,p),qe.pixelStorei(qe.UNPACK_SKIP_PIXELS,m),qe.pixelStorei(qe.UNPACK_SKIP_ROWS,g),qe.pixelStorei(qe.UNPACK_SKIP_IMAGES,f),0===r&&n.generateMipmaps&&qe.generateMipmap(d),xe.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Ie.setTextureCube(e,0):e.isData3DTexture?Ie.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Ie.setTexture2DArray(e,0):Ie.setTexture2D(e,0),xe.unbindTexture()},this.resetState=function(){T=0,B=0,U=null,xe.reset(),ze.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Le}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Me?Se:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Se?Me:be}}(class WebGL1Renderer extends WebGLRenderer{}).prototype.isWebGL1Renderer=!0;class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class InterleavedBuffer{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Te,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,r=this.stride;nl)continue;A.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(A);ae.far||t.push({distance:a,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,a.start),n=Math.min(g.count,a.start+a.count)-1;il)continue;A.applyMatrix4(this.matrixWorld);const n=e.ray.origin.distanceTo(A);ne.far||t.push({distance:n,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;er.far)return;a.push({distance:c,distanceToRay:Math.sqrt(l),point:i,index:t,face:null,object:o})}}class VideoTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c){super(e,t,i,n,r,a,o,l,c),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:F,this.magFilter=void 0!==r?r:F,this.generateMipmaps=!1;const h=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function updateVideo(){h.needsUpdate=!0,e.requestVideoFrameCallback(updateVideo)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class CompressedTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h,d,A){super(null,a,o,l,c,h,n,r,d,A),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CompressedArrayTexture extends CompressedTexture{constructor(e,t,i,n,r,a){super(e,t,i,r,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=b}}class CanvasTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c){super(e,t,i,n,r,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class MeshStandardMaterial extends Material$1{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Color(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Vector2(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return clamp$1(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Color(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Color(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Color(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}function arraySlice(e,t,i){return isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)}function convertArray(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function isTypedArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function getKeyframeOrder(e){const t=e.length,i=new Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort((function compareTime(t,i){return e[t]-e[i]})),i}function sortedArray(e,t,i){const n=e.length,r=new e.constructor(n);for(let a=0,o=0;o!==n;++a){const n=i[a]*t;for(let i=0;i!==t;++i)r[o++]=e[n+i]}return r}function flattenJSON(e,t,i,n){let r=1,a=e[0];for(;void 0!==a&&void 0===a[n];)a=e[r++];if(void 0===a)return;let o=a[n];if(void 0!==o)if(Array.isArray(o))do{o=a[n],void 0!==o&&(t.push(a.time),i.push.apply(i,o)),a=e[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[n],void 0!==o&&(t.push(a.time),o.toArray(i,i.length)),a=e[r++]}while(void 0!==a);else do{o=a[n],void 0!==o&&(t.push(a.time),i.push(o)),a=e[r++]}while(void 0!==a)}class Interpolant{constructor(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,n=t[i],r=t[i-1];e:{t:{let a;i:{n:if(!(e=r)break e;{const o=t[1];e=r)break t}a=i,i=0}}for(;i>>1;et;)--a;if(++a,0!==r||a!==n){r>=a&&(a=Math.max(a,1),r=a-1);const e=this.getValueSize();this.times=arraySlice(i,r,a),this.values=arraySlice(this.values,r*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==r;t++){const n=i[t];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==a&&a>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,n,a),e=!1;break}a=n}if(void 0!==n&&isTypedArray(n))for(let t=0,i=n.length;t!==i;++t){const i=n[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){const e=arraySlice(this.times),t=arraySlice(this.values),i=this.getValueSize(),n=this.getInterpolation()===ve,r=e.length-1;let a=1;for(let o=1;o0){e[a]=e[r];for(let e=r*i,n=a*i,o=0;o!==i;++o)t[n+o]=t[e+o];++a}return a!==e.length?(this.times=arraySlice(e,0,a),this.values=arraySlice(t,0,a*i)):(this.times=e,this.values=t),this}clone(){const e=arraySlice(this.times,0),t=arraySlice(this.values,0),i=new(0,this.constructor)(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=fe;class BooleanKeyframeTrack extends KeyframeTrack{}BooleanKeyframeTrack.prototype.ValueTypeName="bool",BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=ge,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){const r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(i-t)/(n-t);let c=e*o;for(let e=c+o;c!==e;c+=4)Quaternion.slerpFlat(r,0,a,c-o,a,c,l);return r}}class QuaternionKeyframeTrack extends KeyframeTrack{InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion",QuaternionKeyframeTrack.prototype.DefaultInterpolation=fe,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{}StringKeyframeTrack.prototype.ValueTypeName="string",StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=ge,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(e,t=-1,i,n=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=generateUUID(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,n=1/(e.fps||1);for(let e=0,r=i.length;e!==r;++e)t.push(parseKeyframeTrack(i[e]).scale(n));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,n=i.length;e!==n;++e)t.push(KeyframeTrack.toJSON(i[e]));return n}static CreateFromMorphTargetSequence(e,t,i,n){const r=t.length,a=[];for(let e=0;e1){const e=a[1];let t=n[e];t||(n[e]=t=[]),t.push(i)}}const a=[];for(const e in n)a.push(this.CreateFromMorphTargetSequence(e,n[e],t,i));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const addNonemptyTrack=function(e,t,i,n,r){if(0!==i.length){const a=[],o=[];flattenJSON(i,a,o,n),0!==a.length&&r.push(new e(t,a,o))}},i=[],n=e.name||"default",r=e.fps||30,a=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let e=0;e{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==Jn[e])return void Jn[e].push({onLoad:t,onProgress:i,onError:n});Jn[e]=[],Jn[e].push({onLoad:t,onProgress:i,onError:n});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const i=Jn[e],n=t.body.getReader(),r=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=r?parseInt(r):0,o=0!==a;let l=0;const c=new ReadableStream({start(e){!function readData(){n.read().then((({done:t,value:n})=>{if(t)e.close();else{l+=n.byteLength;const t=new ProgressEvent("progress",{lengthComputable:o,loaded:l,total:a});for(let e=0,n=i.length;e{switch(l){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,o)));case"json":return e.json();default:if(void 0===o)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(o),i=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(i);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{Kn.add(e,t);const i=Jn[e];delete Jn[e];for(let e=0,n=i.length;e{const i=Jn[e];if(void 0===i)throw this.manager.itemError(e),t;delete Jn[e];for(let e=0,n=i.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ImageLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=Kn.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout((function(){t&&t(a),r.manager.itemEnd(e)}),0),a;const o=createElementNS("img");function onImageLoad(){removeEventListeners(),Kn.add(e,this),t&&t(this),r.manager.itemEnd(e)}function onImageError(t){removeEventListeners(),n&&n(t),r.manager.itemError(e),r.manager.itemEnd(e)}function removeEventListeners(){o.removeEventListener("load",onImageLoad,!1),o.removeEventListener("error",onImageError,!1)}return o.addEventListener("load",onImageLoad,!1),o.addEventListener("error",onImageError,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o}}class DataTextureLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){const r=this,a=new DataTexture,o=new FileLoader(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(r.withCredentials),o.load(e,(function(e){const i=r.parse(e);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:b,a.wrapT=void 0!==i.wrapT?i.wrapT:b,a.magFilter=void 0!==i.magFilter?i.magFilter:F,a.minFilter=void 0!==i.minFilter?i.minFilter:F,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.colorSpace?a.colorSpace=i.colorSpace:void 0!==i.encoding&&(a.encoding=i.encoding),void 0!==i.flipY&&(a.flipY=i.flipY),void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps,a.minFilter=G),1===i.mipmapCount&&(a.minFilter=F),void 0!==i.generateMipmaps&&(a.generateMipmaps=i.generateMipmaps),a.needsUpdate=!0,t&&t(a,i))}),i,n),a}}class TextureLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){const r=new Texture$1,a=new ImageLoader(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)}),i,n),r}}class Light extends Object3D{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Color(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const Zn=new Matrix4,er=new Vector3,tr=new Vector3;class LightShadow{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Vector2(512,512),this.map=null,this.mapPass=null,this.matrix=new Matrix4,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Frustum,this._frameExtents=new Vector2(1,1),this._viewportCount=1,this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;er.setFromMatrixPosition(e.matrixWorld),t.position.copy(er),tr.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(tr),t.updateMatrixWorld(),Zn.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zn),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Zn)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=2*Ne*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;i===t.fov&&n===t.aspect&&r===t.far||(t.fov=i,t.aspect=n,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class SpotLight extends Light{constructor(e,t,i=0,n=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.distance=i,this.angle=n,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const ir=new Matrix4,nr=new Vector3,rr=new Vector3;class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Vector2(4,2),this._viewportCount=6,this._viewports=[new Vector4(2,1,1,1),new Vector4(0,1,1,1),new Vector4(3,1,1,1),new Vector4(1,1,1,1),new Vector4(3,0,1,1),new Vector4(1,0,1,1)],this._cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,1,0),new Vector3(0,-1,0)],this._cubeUps=[new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,0,1),new Vector3(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,n=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),nr.setFromMatrixPosition(e.matrixWorld),i.position.copy(nr),rr.copy(i.position),rr.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(rr),i.updateMatrixWorld(),n.makeTranslation(-nr.x,-nr.y,-nr.z),ir.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ir)}}class PointLight extends Light{constructor(e,t,i=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new PointLightShadow}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DirectionalLight extends Light{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.shadow=new DirectionalLightShadow}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Vector3)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*n),t.addScaledVector(a[2],.488603*r),t.addScaledVector(a[3],.488603*i),t.addScaledVector(a[4],i*n*1.092548),t.addScaledVector(a[5],n*r*1.092548),t.addScaledVector(a[6],.315392*(3*r*r-1)),t.addScaledVector(a[7],i*r*1.092548),t.addScaledVector(a[8],.546274*(i*i-n*n)),t}getIrradianceAt(e,t){const i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*n),t.addScaledVector(a[2],1.023328*r),t.addScaledVector(a[3],1.023328*i),t.addScaledVector(a[4],.858086*i*n),t.addScaledVector(a[5],.858086*n*r),t.addScaledVector(a[6],.743125*r*r-.247708),t.addScaledVector(a[7],.858086*i*r),t.addScaledVector(a[8],.429043*(i*i-n*n)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].fromArray(e,t+3*n);return this}toArray(e=[],t=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].toArray(e,t+3*n);return e}static getBasisAt(e,t){const i=e.x,n=e.y,r=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*r,t[3]=.488603*i,t[4]=1.092548*i*n,t[5]=1.092548*n*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*i*r,t[8]=.546274*(i*i-n*n)}}class LightProbe extends Light{constructor(e=new SphericalHarmonics3,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class LoaderUtils{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let i=0,n=e.length;i0&&this._mixBufferRegionAdditive(i,n,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(i[e]!==i[e+t]){o.setValue(i,n);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,n=i*this._origIndex;e.getValue(t,n);for(let e=i,r=n;e!==r;++e)t[e]=t[n+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let n=0;n!==r;++n)e[t+n]=e[i+n]}_slerp(e,t,i,n){Quaternion.slerpFlat(e,t,e,t,e,i,n)}_slerpAdditive(e,t,i,n,r){const a=this._workIndex*r;Quaternion.multiplyQuaternionsFlat(e,a,e,t,e,i),Quaternion.slerpFlat(e,t,e,t,e,a,n)}_lerp(e,t,i,n,r){const a=1-n;for(let o=0;o!==r;++o){const r=t+o;e[r]=e[r]*a+e[i+o]*n}}_lerpAdditive(e,t,i,n,r){for(let a=0;a!==r;++a){const r=t+a;e[r]=e[r]+e[i+a]*n}}}const sr="\\[\\]\\.:\\/",ar=new RegExp("["+sr+"]","g"),or="[^"+sr+"]",lr="[^"+sr.replace("\\.","")+"]",cr=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",or)+/(WCOD+)?/.source.replace("WCOD",lr)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",or)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",or)+"$"),hr=["material","materials","bones","map"];class PropertyBinding{constructor(e,t,i){this.path=t,this.parsedPath=i||PropertyBinding.parseTrackName(t),this.node=PropertyBinding.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new PropertyBinding.Composite(e,t,i):new PropertyBinding(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ar,"")}static parseTrackName(e){const t=cr.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const e=i.nodeName.substring(n+1);-1!==hr.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){const searchNodeSubtree=function(e){for(let i=0;i0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(a),t[i].accumulateAdditive(o);else for(let i=0,r=e.length;i!==r;++i)e[i].evaluate(a),t[i].accumulate(n,o)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(null!==i){t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let n=this.time+e,r=this._loopCount;const a=i===me;if(0===e)return-1===r?n:a&&1==(1&r)?t-n:n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=t)n=t;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=t||n<0){const i=Math.floor(n/t);n-=t*i,r+=Math.abs(i);const o=this.repetitions-r;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===o){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(a&&1==(1&r))return t-n}return n}_setEndings(e,t,i){const n=this._interpolantSettings;i?(n.endingStart=ye,n.endingEnd=ye):(n.endingStart=e?this.zeroSlopeAtStart?ye:Ee:_e,n.endingEnd=t?this.zeroSlopeAtEnd?ye:Ee:_e)}_scheduleFading(e,t,i){const n=this._mixer,r=n.time;let a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=r,l[0]=t,o[1]=r+e,l[1]=i,this}}const ur=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,a=e._propertyBindings,o=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let h=c[l];void 0===h&&(h={},c[l]=h);for(let e=0;e!==r;++e){const r=n[e],c=r.name;let d=h[c];if(void 0!==d)++d.referenceCount,a[e]=d;else{if(d=a[e],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,l,c));continue}const n=t&&t._propertyBindings[e].binding.parsedPath;d=new PropertyMixer(PropertyBinding.create(i,c,n),r.ValueTypeName,r.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,c),a[e]=d}o[e].resultBuffer=d.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,n=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==i;++o){t[o]._update(n,e,r,a)}const o=this._bindings,l=this._nActiveBindings;for(let e=0;e!==l;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e>8&255]+Ue[e>>16&255]+Ue[e>>24&255]+"-"+Ue[255&t]+Ue[t>>8&255]+"-"+Ue[t>>16&15|64]+Ue[t>>24&255]+"-"+Ue[63&i|128]+Ue[i>>8&255]+"-"+Ue[i>>16&255]+Ue[i>>24&255]+Ue[255&n]+Ue[n>>8&255]+Ue[n>>16&255]+Ue[n>>24&255]).toLowerCase()}function clamp$1(e,t,i){return Math.max(t,Math.min(i,e))}function euclideanModulo(e,t){return(e%t+t)%t}function lerp$1(e,t,i){return(1-i)*e+i*t}function isPowerOfTwo(e){return 0==(e&e-1)&&0!==e}function ceilPowerOfTwo(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function floorPowerOfTwo(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function denormalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function normalize(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Qe={DEG2RAD:Fe,RAD2DEG:Ne,generateUUID,clamp:clamp$1,euclideanModulo,mapLinear:function mapLinear(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},inverseLerp:function inverseLerp(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:lerp$1,damp:function damp(e,t,i,n){return lerp$1(e,t,1-Math.exp(-i*n))},pingpong:function pingpong(e,t=1){return t-Math.abs(euclideanModulo(e,2*t)-t)},smoothstep:function smoothstep(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function smootherstep(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function randInt(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function randFloat(e,t){return e+Math.random()*(t-e)},randFloatSpread:function randFloatSpread(e){return e*(.5-Math.random())},seededRandom:function seededRandom(e){void 0!==e&&(Pe=e);let t=Pe+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function degToRad(e){return e*Fe},radToDeg:function radToDeg(e){return e*Ne},isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler:function setQuaternionFromProperEuler(e,t,i,n,r){const a=Math.cos,o=Math.sin,l=a(i/2),c=o(i/2),h=a((t+n)/2),d=o((t+n)/2),A=a((t-n)/2),p=o((t-n)/2),m=a((n-t)/2),g=o((n-t)/2);switch(r){case"XYX":e.set(l*d,c*A,c*p,l*h);break;case"YZY":e.set(c*p,l*d,c*A,l*h);break;case"ZXZ":e.set(c*A,c*p,l*d,l*h);break;case"XZX":e.set(l*d,c*g,c*m,l*h);break;case"YXY":e.set(c*m,l*d,c*g,l*h);break;case"ZYZ":e.set(c*g,c*m,l*d,l*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize,denormalize};class Vector2{constructor(e=0,t=0){Vector2.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(clamp$1(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*i-a*n+e.x,this.y=r*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Matrix3{constructor(e,t,i,n,r,a,o,l,c){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,o,l,c)}set(e,t,i,n,r,a,o,l,c){const h=this.elements;return h[0]=e,h[1]=n,h[2]=o,h[3]=t,h[4]=r,h[5]=l,h[6]=i,h[7]=a,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,a=i[0],o=i[3],l=i[6],c=i[1],h=i[4],d=i[7],A=i[2],p=i[5],m=i[8],g=n[0],f=n[3],v=n[6],E=n[1],y=n[4],_=n[7],x=n[2],S=n[5],C=n[8];return r[0]=a*g+o*E+l*x,r[3]=a*f+o*y+l*S,r[6]=a*v+o*_+l*C,r[1]=c*g+h*E+d*x,r[4]=c*f+h*y+d*S,r[7]=c*v+h*_+d*C,r[2]=A*g+p*E+m*x,r[5]=A*f+p*y+m*S,r[8]=A*v+p*_+m*C,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return t*a*h-t*o*c-i*r*h+i*o*l+n*r*c-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8],d=h*a-o*c,A=o*l-h*r,p=c*r-a*l,m=t*d+i*A+n*p;if(0===m)return this.set(0,0,0,0,0,0,0,0,0);const g=1/m;return e[0]=d*g,e[1]=(n*c-h*i)*g,e[2]=(o*i-n*a)*g,e[3]=A*g,e[4]=(h*t-n*l)*g,e[5]=(n*r-o*t)*g,e[6]=p*g,e[7]=(i*l-c*t)*g,e[8]=(a*t-i*r)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,r,a,o){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*a+c*o)+a+e,-n*c,n*l,-n*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Oe.makeScale(e,t)),this}rotate(e){return this.premultiply(Oe.makeRotation(-e)),this}translate(e,t){return this.premultiply(Oe.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Oe=new Matrix3;function arrayNeedsUint32(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function createElementNS(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const ke={};function warnOnce(e){e in ke||(ke[e]=!0,console.warn(e))}function SRGBToLinear(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function LinearToSRGB(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Ge=(new Matrix3).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Ve=(new Matrix3).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);const He={[be]:e=>e,[Me]:e=>e.convertSRGBToLinear(),[Ie]:function DisplayP3ToLinearSRGB(e){return e.convertSRGBToLinear().applyMatrix3(Ve)}},ze={[be]:e=>e,[Me]:e=>e.convertLinearToSRGB(),[Ie]:function LinearSRGBToDisplayP3(e){return e.applyMatrix3(Ge).convertLinearToSRGB()}},We={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return be},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,i){if(!1===this.enabled||t===i||!t||!i)return e;const n=He[t],r=ze[i];if(void 0===n||void 0===r)throw new Error(`Unsupported color space conversion, "${t}" to "${i}".`);return r(n(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let qe;class ImageUtils{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===qe&&(qe=createElementNS("canvas")),qe.width=e.width,qe.height=e.height;const i=qe.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=qe}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=createElementNS("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),r=n.data;for(let e=0;e0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case C:e.x=e.x-Math.floor(e.x);break;case b:e.x=e.x<0?0:1;break;case I:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case C:e.y=e.y-Math.floor(e.y);break;case b:e.y=e.y<0?0:1;break;case I:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Me?Se:3e3}set encoding(e){warnOnce("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Se?Me:Ce}}Texture$1.DEFAULT_IMAGE=null,Texture$1.DEFAULT_MAPPING=300,Texture$1.DEFAULT_ANISOTROPY=1;class Vector4{constructor(e=0,t=0,i=0,n=1){Vector4.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,r;const a=.01,o=.1,l=e.elements,c=l[0],h=l[4],d=l[8],A=l[1],p=l[5],m=l[9],g=l[2],f=l[6],v=l[10];if(Math.abs(h-A)l&&e>E?eE?l=0?1:-1,n=1-t*t;if(n>Number.EPSILON){const r=Math.sqrt(n),a=Math.atan2(r,t*i);e=Math.sin(e*a)/r,o=Math.sin(o*a)/r}const r=o*i;if(l=l*e+A*r,c=c*e+p*r,h=h*e+m*r,d=d*e+g*r,e===1-o){const e=1/Math.sqrt(l*l+c*c+h*h+d*d);l*=e,c*=e,h*=e,d*=e}}e[t]=l,e[t+1]=c,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,n,r,a){const o=i[n],l=i[n+1],c=i[n+2],h=i[n+3],d=r[a],A=r[a+1],p=r[a+2],m=r[a+3];return e[t]=o*m+h*d+l*p-c*A,e[t+1]=l*m+h*A+c*d-o*p,e[t+2]=c*m+h*p+o*A-l*d,e[t+3]=h*m-o*d-l*A-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,n=e._y,r=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(i/2),h=o(n/2),d=o(r/2),A=l(i/2),p=l(n/2),m=l(r/2);switch(a){case"XYZ":this._x=A*h*d+c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d-A*p*m;break;case"YXZ":this._x=A*h*d+c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d+A*p*m;break;case"ZXY":this._x=A*h*d-c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d-A*p*m;break;case"ZYX":this._x=A*h*d-c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d+A*p*m;break;case"YZX":this._x=A*h*d+c*p*m,this._y=c*p*d+A*h*m,this._z=c*h*m-A*p*d,this._w=c*h*d-A*p*m;break;case"XZY":this._x=A*h*d-c*p*m,this._y=c*p*d-A*h*m,this._z=c*h*m+A*p*d,this._w=c*h*d+A*p*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],r=t[8],a=t[1],o=t[5],l=t[9],c=t[2],h=t[6],d=t[10],A=i+o+d;if(A>0){const e=.5/Math.sqrt(A+1);this._w=.25/e,this._x=(h-l)*e,this._y=(r-c)*e,this._z=(a-n)*e}else if(i>o&&i>d){const e=2*Math.sqrt(1+i-o-d);this._w=(h-l)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(r+c)/e}else if(o>d){const e=2*Math.sqrt(1+o-i-d);this._w=(r-c)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(l+h)/e}else{const e=2*Math.sqrt(1+d-i-o);this._w=(a-n)/e,this._x=(r+c)/e,this._y=(l+h)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(clamp$1(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,n=e._y,r=e._z,a=e._w,o=t._x,l=t._y,c=t._z,h=t._w;return this._x=i*h+a*o+n*c-r*l,this._y=n*h+a*l+r*o-i*c,this._z=r*h+a*c+i*l-n*o,this._w=a*h-i*o-n*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,n=this._y,r=this._z,a=this._w;let o=a*e._w+i*e._x+n*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;const l=1-o*o;if(l<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*i+t*this._x,this._y=e*n+t*this._y,this._z=e*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),h=Math.atan2(c,o),d=Math.sin((1-t)*h)/c,A=Math.sin(t*h)/c;return this._w=a*d+this._w*A,this._x=i*d+this._x*A,this._y=n*d+this._y*A,this._z=r*d+this._z*A,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),n=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(n),i*Math.sin(r),i*Math.cos(r),t*Math.sin(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(e=0,t=0,i=0){Vector3.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Ke.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ke.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,r=e.elements,a=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,r=e.x,a=e.y,o=e.z,l=e.w,c=l*t+a*n-o*i,h=l*i+o*t-r*n,d=l*n+r*i-a*t,A=-r*t-a*i-o*n;return this.x=c*l+A*-r+h*-o-d*-a,this.y=h*l+A*-a+d*-r-c*-o,this.z=d*l+A*-o+c*-a-h*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,r=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-r*o,this.y=r*a-i*l,this.z=i*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Ye.copy(this).projectOnVector(e),this.sub(Ye)}reflect(e){return this.sub(Ye.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(clamp$1(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ye=new Vector3,Ke=new Quaternion;class Box3{constructor(e=new Vector3(1/0,1/0,1/0),t=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Je),Je.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(at),ot.subVectors(this.max,at),et.subVectors(e.a,at),tt.subVectors(e.b,at),it.subVectors(e.c,at),nt.subVectors(tt,et),rt.subVectors(it,tt),st.subVectors(et,it);let t=[0,-nt.z,nt.y,0,-rt.z,rt.y,0,-st.z,st.y,nt.z,0,-nt.x,rt.z,0,-rt.x,st.z,0,-st.x,-nt.y,nt.x,0,-rt.y,rt.x,0,-st.y,st.x,0];return!!satForAxes(t,et,tt,it,ot)&&(t=[1,0,0,0,1,0,0,0,1],!!satForAxes(t,et,tt,it,ot)&&(lt.crossVectors(nt,rt),t=[lt.x,lt.y,lt.z],satForAxes(t,et,tt,it,ot)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Je).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Je).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||($e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),$e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),$e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),$e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),$e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),$e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),$e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),$e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints($e)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const $e=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],Je=new Vector3,Ze=new Box3,et=new Vector3,tt=new Vector3,it=new Vector3,nt=new Vector3,rt=new Vector3,st=new Vector3,at=new Vector3,ot=new Vector3,lt=new Vector3,ct=new Vector3;function satForAxes(e,t,i,n,r){for(let a=0,o=e.length-3;a<=o;a+=3){ct.fromArray(e,a);const o=r.x*Math.abs(ct.x)+r.y*Math.abs(ct.y)+r.z*Math.abs(ct.z),l=t.dot(ct),c=i.dot(ct),h=n.dot(ct);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>o)return!1}return!0}const ht=new Box3,ut=new Vector3,dt=new Vector3;class Sphere{constructor(e=new Vector3,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;void 0!==t?i.copy(t):ht.setFromPoints(e).getCenter(i);let n=0;for(let t=0,r=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ut.subVectors(e,this.center);const t=ut.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),i=.5*(e-this.radius);this.center.addScaledVector(ut,i/e),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(dt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ut.copy(e.center).add(dt)),this.expandByPoint(ut.copy(e.center).sub(dt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const At=new Vector3,pt=new Vector3,mt=new Vector3,gt=new Vector3,ft=new Vector3,vt=new Vector3,Et=new Vector3;class Ray{constructor(e=new Vector3,t=new Vector3(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,At)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=At.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(At.copy(this.origin).addScaledVector(this.direction,t),At.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){pt.copy(e).add(t).multiplyScalar(.5),mt.copy(t).sub(e).normalize(),gt.copy(this.origin).sub(pt);const r=.5*e.distanceTo(t),a=-this.direction.dot(mt),o=gt.dot(this.direction),l=-gt.dot(mt),c=gt.lengthSq(),h=Math.abs(1-a*a);let d,A,p,m;if(h>0)if(d=a*l-o,A=a*o-l,m=r*h,d>=0)if(A>=-m)if(A<=m){const e=1/h;d*=e,A*=e,p=d*(d+a*A+2*o)+A*(a*d+A+2*l)+c}else A=r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;else A=-r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;else A<=-m?(d=Math.max(0,-(-a*r+o)),A=d>0?-r:Math.min(Math.max(-r,-l),r),p=-d*d+A*(A+2*l)+c):A<=m?(d=0,A=Math.min(Math.max(-r,-l),r),p=A*(A+2*l)+c):(d=Math.max(0,-(a*r+o)),A=d>0?r:Math.min(Math.max(-r,-l),r),p=-d*d+A*(A+2*l)+c);else A=a>0?-r:r,d=Math.max(0,-(a*A+o)),p=-d*d+A*(A+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),n&&n.copy(pt).addScaledVector(mt,A),p}intersectSphere(e,t){At.subVectors(e.center,this.origin);const i=At.dot(this.direction),n=At.dot(At)-i*i,r=e.radius*e.radius;if(n>r)return null;const a=Math.sqrt(r-n),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,r,a,o,l;const c=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,A=this.origin;return c>=0?(i=(e.min.x-A.x)*c,n=(e.max.x-A.x)*c):(i=(e.max.x-A.x)*c,n=(e.min.x-A.x)*c),h>=0?(r=(e.min.y-A.y)*h,a=(e.max.y-A.y)*h):(r=(e.max.y-A.y)*h,a=(e.min.y-A.y)*h),i>a||r>n?null:((r>i||isNaN(i))&&(i=r),(a=0?(o=(e.min.z-A.z)*d,l=(e.max.z-A.z)*d):(o=(e.max.z-A.z)*d,l=(e.min.z-A.z)*d),i>l||o>n?null:((o>i||i!=i)&&(i=o),(l=0?i:n,t)))}intersectsBox(e){return null!==this.intersectBox(e,At)}intersectTriangle(e,t,i,n,r){ft.subVectors(t,e),vt.subVectors(i,e),Et.crossVectors(ft,vt);let a,o=this.direction.dot(Et);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}gt.subVectors(this.origin,e);const l=a*this.direction.dot(vt.crossVectors(gt,vt));if(l<0)return null;const c=a*this.direction.dot(ft.cross(gt));if(c<0)return null;if(l+c>o)return null;const h=-a*gt.dot(Et);return h<0?null:this.at(h/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Matrix4{constructor(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f)}set(e,t,i,n,r,a,o,l,c,h,d,A,p,m,g,f){const v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=n,v[1]=r,v[5]=a,v[9]=o,v[13]=l,v[2]=c,v[6]=h,v[10]=d,v[14]=A,v[3]=p,v[7]=m,v[11]=g,v[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Matrix4).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/yt.setFromMatrixColumn(e,0).length(),r=1/yt.setFromMatrixColumn(e,1).length(),a=1/yt.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,r=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),c=Math.sin(n),h=Math.cos(r),d=Math.sin(r);if("XYZ"===e.order){const e=a*h,i=a*d,n=o*h,r=o*d;t[0]=l*h,t[4]=-l*d,t[8]=c,t[1]=i+n*c,t[5]=e-r*c,t[9]=-o*l,t[2]=r-e*c,t[6]=n+i*c,t[10]=a*l}else if("YXZ"===e.order){const e=l*h,i=l*d,n=c*h,r=c*d;t[0]=e+r*o,t[4]=n*o-i,t[8]=a*c,t[1]=a*d,t[5]=a*h,t[9]=-o,t[2]=i*o-n,t[6]=r+e*o,t[10]=a*l}else if("ZXY"===e.order){const e=l*h,i=l*d,n=c*h,r=c*d;t[0]=e-r*o,t[4]=-a*d,t[8]=n+i*o,t[1]=i+n*o,t[5]=a*h,t[9]=r-e*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if("ZYX"===e.order){const e=a*h,i=a*d,n=o*h,r=o*d;t[0]=l*h,t[4]=n*c-i,t[8]=e*c+r,t[1]=l*d,t[5]=r*c+e,t[9]=i*c-n,t[2]=-c,t[6]=o*l,t[10]=a*l}else if("YZX"===e.order){const e=a*l,i=a*c,n=o*l,r=o*c;t[0]=l*h,t[4]=r-e*d,t[8]=n*d+i,t[1]=d,t[5]=a*h,t[9]=-o*h,t[2]=-c*h,t[6]=i*d+n,t[10]=e-r*d}else if("XZY"===e.order){const e=a*l,i=a*c,n=o*l,r=o*c;t[0]=l*h,t[4]=-d,t[8]=c*h,t[1]=e*d+r,t[5]=a*h,t[9]=i*d-n,t[2]=n*d-i,t[6]=o*h,t[10]=r*d+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(xt,e,St)}lookAt(e,t,i){const n=this.elements;return bt.subVectors(e,t),0===bt.lengthSq()&&(bt.z=1),bt.normalize(),Ct.crossVectors(i,bt),0===Ct.lengthSq()&&(1===Math.abs(i.z)?bt.x+=1e-4:bt.z+=1e-4,bt.normalize(),Ct.crossVectors(i,bt)),Ct.normalize(),Mt.crossVectors(bt,Ct),n[0]=Ct.x,n[4]=Mt.x,n[8]=bt.x,n[1]=Ct.y,n[5]=Mt.y,n[9]=bt.y,n[2]=Ct.z,n[6]=Mt.z,n[10]=bt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,r=this.elements,a=i[0],o=i[4],l=i[8],c=i[12],h=i[1],d=i[5],A=i[9],p=i[13],m=i[2],g=i[6],f=i[10],v=i[14],E=i[3],y=i[7],_=i[11],x=i[15],S=n[0],C=n[4],b=n[8],I=n[12],T=n[1],B=n[5],U=n[9],F=n[13],O=n[2],G=n[6],W=n[10],q=n[14],X=n[3],j=n[7],Y=n[11],K=n[15];return r[0]=a*S+o*T+l*O+c*X,r[4]=a*C+o*B+l*G+c*j,r[8]=a*b+o*U+l*W+c*Y,r[12]=a*I+o*F+l*q+c*K,r[1]=h*S+d*T+A*O+p*X,r[5]=h*C+d*B+A*G+p*j,r[9]=h*b+d*U+A*W+p*Y,r[13]=h*I+d*F+A*q+p*K,r[2]=m*S+g*T+f*O+v*X,r[6]=m*C+g*B+f*G+v*j,r[10]=m*b+g*U+f*W+v*Y,r[14]=m*I+g*F+f*q+v*K,r[3]=E*S+y*T+_*O+x*X,r[7]=E*C+y*B+_*G+x*j,r[11]=E*b+y*U+_*W+x*Y,r[15]=E*I+y*F+_*q+x*K,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],a=e[1],o=e[5],l=e[9],c=e[13],h=e[2],d=e[6],A=e[10],p=e[14];return e[3]*(+r*l*d-n*c*d-r*o*A+i*c*A+n*o*p-i*l*p)+e[7]*(+t*l*p-t*c*A+r*a*A-n*a*p+n*c*h-r*l*h)+e[11]*(+t*c*d-t*o*p-r*a*d+i*a*p+r*o*h-i*c*h)+e[15]*(-n*o*h-t*l*d+t*o*A+n*a*d-i*a*A+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=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*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),r=1-i,a=e.x,o=e.y,l=e.z,c=r*a,h=r*o;return this.set(c*a+i,c*o-n*l,c*l+n*o,0,c*o+n*l,h*o+i,h*l-n*a,0,c*l-n*o,h*l+n*a,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,r,a){return this.set(1,i,r,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,r=t._x,a=t._y,o=t._z,l=t._w,c=r+r,h=a+a,d=o+o,A=r*c,p=r*h,m=r*d,g=a*h,f=a*d,v=o*d,E=l*c,y=l*h,_=l*d,x=i.x,S=i.y,C=i.z;return n[0]=(1-(g+v))*x,n[1]=(p+_)*x,n[2]=(m-y)*x,n[3]=0,n[4]=(p-_)*S,n[5]=(1-(A+v))*S,n[6]=(f+E)*S,n[7]=0,n[8]=(m+y)*C,n[9]=(f-E)*C,n[10]=(1-(A+g))*C,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let r=yt.set(n[0],n[1],n[2]).length();const a=yt.set(n[4],n[5],n[6]).length(),o=yt.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],_t.copy(this);const l=1/r,c=1/a,h=1/o;return _t.elements[0]*=l,_t.elements[1]*=l,_t.elements[2]*=l,_t.elements[4]*=c,_t.elements[5]*=c,_t.elements[6]*=c,_t.elements[8]*=h,_t.elements[9]*=h,_t.elements[10]*=h,t.setFromRotationMatrix(_t),i.x=r,i.y=a,i.z=o,this}makePerspective(e,t,i,n,r,a,o=2e3){const l=this.elements,c=2*r/(t-e),h=2*r/(i-n),d=(t+e)/(t-e),A=(i+n)/(i-n);let p,m;if(o===Le)p=-(a+r)/(a-r),m=-2*a*r/(a-r);else{if(o!==De)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);p=-a/(a-r),m=-a*r/(a-r)}return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=h,l[9]=A,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,r,a,o=2e3){const l=this.elements,c=1/(t-e),h=1/(i-n),d=1/(a-r),A=(t+e)*c,p=(i+n)*h;let m,g;if(o===Le)m=(a+r)*d,g=-2*d;else{if(o!==De)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);m=r*d,g=-1*d}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-A,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=g,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const yt=new Vector3,_t=new Matrix4,xt=new Vector3(0,0,0),St=new Vector3(1,1,1),Ct=new Vector3,Mt=new Vector3,bt=new Vector3,It=new Matrix4,wt=new Quaternion;class Euler{constructor(e=0,t=0,i=0,n=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,r=n[0],a=n[4],o=n[8],l=n[1],c=n[5],h=n[9],d=n[2],A=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(clamp$1(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(A,c),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp$1(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,r),this._z=0);break;case"ZXY":this._x=Math.asin(clamp$1(A,-1,1)),Math.abs(A)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-clamp$1(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(A,p),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(clamp$1(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-d,r)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-clamp$1(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(A,c),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return It.makeRotationFromQuaternion(e),this.setFromRotationMatrix(It,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return wt.setFromEuler(this),this.setFromQuaternion(wt,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(i=i.concat(r))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ut,e,Pt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ut,Ft,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,n=t.length;i0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=serialize(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const i=t.shapes;if(Array.isArray(i))for(let t=0,n=i.length;t0){n.children=[];for(let t=0;t0){n.animations=[];for(let t=0;t0&&(i.geometries=t),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),c.length>0&&(i.animations=c),h.length>0&&(i.nodes=h)}return i.object=n,i;function extractFromCache(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(e,t,i,n,r){Vt.subVectors(n,t),Ht.subVectors(i,t),zt.subVectors(e,t);const a=Vt.dot(Vt),o=Vt.dot(Ht),l=Vt.dot(zt),c=Ht.dot(Ht),h=Ht.dot(zt),d=a*c-o*o;if(0===d)return r.set(-2,-1,-1);const A=1/d,p=(c*l-o*h)*A,m=(a*h-o*l)*A;return r.set(1-p-m,m,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Wt),Wt.x>=0&&Wt.y>=0&&Wt.x+Wt.y<=1}static getUV(e,t,i,n,r,a,o,l){return!1===Jt&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Jt=!0),this.getInterpolation(e,t,i,n,r,a,o,l)}static getInterpolation(e,t,i,n,r,a,o,l){return this.getBarycoord(e,t,i,n,Wt),l.setScalar(0),l.addScaledVector(r,Wt.x),l.addScaledVector(a,Wt.y),l.addScaledVector(o,Wt.z),l}static isFrontFacing(e,t,i,n){return Vt.subVectors(i,t),Ht.subVectors(e,t),Vt.cross(Ht).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Vt.subVectors(this.c,this.b),Ht.subVectors(this.a,this.b),.5*Vt.cross(Ht).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Triangle.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Triangle.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,n,r){return!1===Jt&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Jt=!0),Triangle.getInterpolation(e,this.a,this.b,this.c,t,i,n,r)}getInterpolation(e,t,i,n,r){return Triangle.getInterpolation(e,this.a,this.b,this.c,t,i,n,r)}containsPoint(e){return Triangle.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Triangle.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,r=this.c;let a,o;qt.subVectors(n,i),Xt.subVectors(r,i),Yt.subVectors(e,i);const l=qt.dot(Yt),c=Xt.dot(Yt);if(l<=0&&c<=0)return t.copy(i);Kt.subVectors(e,n);const h=qt.dot(Kt),d=Xt.dot(Kt);if(h>=0&&d<=h)return t.copy(n);const A=l*d-h*c;if(A<=0&&l>=0&&h<=0)return a=l/(l-h),t.copy(i).addScaledVector(qt,a);$t.subVectors(e,r);const p=qt.dot($t),m=Xt.dot($t);if(m>=0&&p<=m)return t.copy(r);const g=p*c-l*m;if(g<=0&&c>=0&&m<=0)return o=c/(c-m),t.copy(i).addScaledVector(Xt,o);const f=h*m-p*d;if(f<=0&&d-h>=0&&p-m>=0)return jt.subVectors(r,n),o=(d-h)/(d-h+(p-m)),t.copy(n).addScaledVector(jt,o);const v=1/(f+g+A);return a=g*v,o=A*v,t.copy(i).addScaledVector(qt,a).addScaledVector(Xt,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Zt=0;class Material$1 extends EventDispatcher{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Zt++}),this.uuid=generateUUID(),this.name="",this.type="Material",this.blending=1,this.side=a,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=c,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=we,this.stencilZFail=we,this.stencilZPass=we,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function extractFromCache(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),this.side!==a&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=this.alphaHash),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(i.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const t=extractFromCache(e.textures),n=extractFromCache(e.images);t.length>0&&(i.textures=t),n.length>0&&(i.images=n)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const e=t.length;i=new Array(e);for(let n=0;n!==e;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}const ei={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ti={h:0,s:0,l:0},ii={h:0,s:0,l:0};function hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}class Color{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Me){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,We.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=We.workingColorSpace){return this.r=e,this.g=t,this.b=i,We.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=We.workingColorSpace){if(e=euclideanModulo(e,1),t=clamp$1(t,0,1),i=clamp$1(i,0,1),0===t)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=hue2rgb(r,n,e+1/3),this.g=hue2rgb(r,n,e),this.b=hue2rgb(r,n,e-1/3)}return We.toWorkingColorSpace(this,n),this}setStyle(e,t=Me){function handleAlpha(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let n;const r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,t);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,t);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return handleAlpha(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===r)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Me){const i=ei[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=SRGBToLinear(e.r),this.g=SRGBToLinear(e.g),this.b=SRGBToLinear(e.b),this}copyLinearToSRGB(e){return this.r=LinearToSRGB(e.r),this.g=LinearToSRGB(e.g),this.b=LinearToSRGB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Me){return We.fromWorkingColorSpace(ni.copy(this),e),65536*Math.round(clamp$1(255*ni.r,0,255))+256*Math.round(clamp$1(255*ni.g,0,255))+Math.round(clamp$1(255*ni.b,0,255))}getHexString(e=Me){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=We.workingColorSpace){We.fromWorkingColorSpace(ni.copy(this),t);const i=ni.r,n=ni.g,r=ni.b,a=Math.max(i,n,r),o=Math.min(i,n,r);let l,c;const h=(o+a)/2;if(o===a)l=0,c=0;else{const e=a-o;switch(c=h<=.5?e/(a+o):e/(2-a-o),a){case i:l=(n-r)/e+(n>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,a[e]=t|i}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:a,exponentTable:o,offsetTable:l}}const si={toHalfFloat:function toHalfFloat(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=clamp$1(e,-65504,65504),ri.floatView[0]=e;const t=ri.uint32View[0],i=t>>23&511;return ri.baseTable[i]+((8388607&t)>>ri.shiftTable[i])},fromHalfFloat:function fromHalfFloat(e){const t=e>>10;return ri.uint32View[0]=ri.mantissaTable[ri.offsetTable[t]+(1023&e)]+ri.exponentTable[t],ri.floatView[0]}},ai=new Vector3,oi=new Vector2;class BufferAttribute{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=Te,this.updateRange={offset:0,count:-1},this.gpuType=Y,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,r=this.itemSize;n0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const t in i){const n=i[t];e.data.attributes[t]=n.toJSON(e.data)}const n={};let r=!1;for(const t in this.morphAttributes){const i=this.morphAttributes[t],a=[];for(let t=0,n=i.length;t0&&(n[t]=a,r=!0)}r&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const n=e.attributes;for(const e in n){const i=n[e];this.setAttribute(e,i.clone(t))}const r=e.morphAttributes;for(const e in r){const i=[],n=r[e];for(let e=0,r=n.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e(e.far-e.near)**2)return}mi.copy(r).invert(),gi.copy(e.ray).applyMatrix4(mi),null!==i.boundingBox&&!1===gi.intersectsBox(i.boundingBox)||this._computeIntersections(e,t,gi)}}_computeIntersections(e,t,i){let n;const r=this.geometry,a=this.material,o=r.index,l=r.attributes.position,c=r.attributes.uv,h=r.attributes.uv1,d=r.attributes.normal,A=r.groups,p=r.drawRange;if(null!==o)if(Array.isArray(a))for(let r=0,l=A.length;ri.far?null:{distance:A,point:Ui.clone(),object:e}}(e,t,i,n,yi,_i,xi,Di);if(p){r&&(bi.fromBufferAttribute(r,h),wi.fromBufferAttribute(r,d),Ti.fromBufferAttribute(r,A),p.uv=Triangle.getInterpolation(Di,yi,_i,xi,bi,wi,Ti,new Vector2)),l&&(bi.fromBufferAttribute(l,h),wi.fromBufferAttribute(l,d),Ti.fromBufferAttribute(l,A),p.uv1=Triangle.getInterpolation(Di,yi,_i,xi,bi,wi,Ti,new Vector2),p.uv2=p.uv1),c&&(Bi.fromBufferAttribute(c,h),Ri.fromBufferAttribute(c,d),Li.fromBufferAttribute(c,A),p.normal=Triangle.getInterpolation(Di,yi,_i,xi,Bi,Ri,Li,new Vector3),p.normal.dot(n.direction)>0&&p.normal.multiplyScalar(-1));const e={a:h,b:d,c:A,normal:new Vector3,materialIndex:0};Triangle.getNormal(yi,_i,xi,e.normal),p.face=e}return p}class BoxGeometry extends BufferGeometry{constructor(e=1,t=1,i=1,n=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};const o=this;n=Math.floor(n),r=Math.floor(r),a=Math.floor(a);const l=[],c=[],h=[],d=[];let A=0,p=0;function buildPlane(e,t,i,n,r,a,m,g,f,v,E){const y=a/f,_=m/v,x=a/2,S=m/2,C=g/2,b=f+1,I=v+1;let T=0,B=0;const U=new Vector3;for(let a=0;a0?1:-1,h.push(U.x,U.y,U.z),d.push(l/f),d.push(1-a/v),T+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class Camera extends Object3D{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4,this.coordinateSystem=Le}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class PerspectiveCamera extends Camera{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Ne*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Fe*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Ne*Math.atan(Math.tan(.5*Fe*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,n,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Fe*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;r+=a.offsetX*n/e,t-=a.offsetY*i/o,n*=a.width/e,i*=a.height/o}const o=this.filmOffset;0!==o&&(r+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Ni=-90;class CubeCamera extends Object3D{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null;const n=new PerspectiveCamera(Ni,1,e,t);n.layers=this.layers,this.add(n);const r=new PerspectiveCamera(Ni,1,e,t);r.layers=this.layers,this.add(r);const a=new PerspectiveCamera(Ni,1,e,t);a.layers=this.layers,this.add(a);const o=new PerspectiveCamera(Ni,1,e,t);o.layers=this.layers,this.add(o);const l=new PerspectiveCamera(Ni,1,e,t);l.layers=this.layers,this.add(l);const c=new PerspectiveCamera(Ni,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,n,r,a,o,l]=t;for(const e of t)this.remove(e);if(e===Le)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(e!==De)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const i=this.renderTarget;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[n,r,a,o,l,c]=this.children,h=e.getRenderTarget(),d=e.toneMapping,A=e.xr.enabled;e.toneMapping=p,e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,n),e.setRenderTarget(i,1),e.render(t,r),e.setRenderTarget(i,2),e.render(t,a),e.setRenderTarget(i,3),e.render(t,o),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=m,e.setRenderTarget(i,5),e.render(t,c),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=A,i.texture.needsPMREMUpdate=!0}}class CubeTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h){super(e=void 0!==e?e:[],t=void 0!==t?t:y,i,n,r,a,o,l,c,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];void 0!==t.encoding&&(warnOnce("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Se?Me:Ce),this.texture=new CubeTexture(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:F}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},n=new BoxGeometry(5,5,5),r=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:o,blending:0});r.uniforms.tEquirect.value=t;const a=new Mesh(n,r),l=t.minFilter;t.minFilter===G&&(t.minFilter=F);return new CubeCamera(1,10,this).update(e,a),t.minFilter=l,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,i,n){const r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,i,n);e.setRenderTarget(r)}}const Qi=new Vector3,Oi=new Vector3,ki=new Matrix3;class Plane{constructor(e=new Vector3(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=Qi.subVectors(i,t).cross(Oi.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Qi),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||ki.getNormalMatrix(e),n=this.coplanarPoint(Qi).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gi=new Sphere,Vi=new Vector3;class Frustum{constructor(e=new Plane,t=new Plane,i=new Plane,n=new Plane,r=new Plane,a=new Plane){this.planes=[e,t,i,n,r,a]}set(e,t,i,n,r,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(n),o[4].copy(r),o[5].copy(a),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=2e3){const i=this.planes,n=e.elements,r=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],d=n[6],A=n[7],p=n[8],m=n[9],g=n[10],f=n[11],v=n[12],E=n[13],y=n[14],_=n[15];if(i[0].setComponents(l-r,A-c,f-p,_-v).normalize(),i[1].setComponents(l+r,A+c,f+p,_+v).normalize(),i[2].setComponents(l+a,A+h,f+m,_+E).normalize(),i[3].setComponents(l-a,A-h,f-m,_-E).normalize(),i[4].setComponents(l-o,A-d,f-g,_-y).normalize(),t===Le)i[5].setComponents(l+o,A+d,f+g,_+y).normalize();else{if(t!==De)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(o,d,g,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Gi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Gi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Gi)}intersectsSprite(e){return Gi.center.set(0,0,0),Gi.radius=.7071067811865476,Gi.applyMatrix4(e.matrixWorld),this.intersectsSphere(Gi)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(i)0?e.max.x:e.min.x,Vi.y=n.normal.y>0?e.max.y:e.min.y,Vi.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(Vi)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function WebGLAnimation(){let e=null,t=!1,i=null,n=null;function onAnimationFrame(t,r){i(t,r),n=e.requestAnimationFrame(onAnimationFrame)}return{start:function(){!0!==t&&null!==i&&(n=e.requestAnimationFrame(onAnimationFrame),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function WebGLAttributes(e,t){const i=t.isWebGL2,n=new WeakMap;return{get:function get(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)},remove:function remove(t){t.isInterleavedBufferAttribute&&(t=t.data);const i=n.get(t);i&&(e.deleteBuffer(i.buffer),n.delete(t))},update:function update(t,r){if(t.isGLBufferAttribute){const e=n.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, vMapUv );\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},zi={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},Wi={basic:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.fog]),vertexShader:Hi.meshbasic_vert,fragmentShader:Hi.meshbasic_frag},lambert:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,zi.lights,{emissive:{value:new Color(0)}}]),vertexShader:Hi.meshlambert_vert,fragmentShader:Hi.meshlambert_frag},phong:{uniforms:mergeUniforms([zi.common,zi.specularmap,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,zi.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:Hi.meshphong_vert,fragmentShader:Hi.meshphong_frag},standard:{uniforms:mergeUniforms([zi.common,zi.envmap,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.roughnessmap,zi.metalnessmap,zi.fog,zi.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Hi.meshphysical_vert,fragmentShader:Hi.meshphysical_frag},toon:{uniforms:mergeUniforms([zi.common,zi.aomap,zi.lightmap,zi.emissivemap,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.gradientmap,zi.fog,zi.lights,{emissive:{value:new Color(0)}}]),vertexShader:Hi.meshtoon_vert,fragmentShader:Hi.meshtoon_frag},matcap:{uniforms:mergeUniforms([zi.common,zi.bumpmap,zi.normalmap,zi.displacementmap,zi.fog,{matcap:{value:null}}]),vertexShader:Hi.meshmatcap_vert,fragmentShader:Hi.meshmatcap_frag},points:{uniforms:mergeUniforms([zi.points,zi.fog]),vertexShader:Hi.points_vert,fragmentShader:Hi.points_frag},dashed:{uniforms:mergeUniforms([zi.common,zi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Hi.linedashed_vert,fragmentShader:Hi.linedashed_frag},depth:{uniforms:mergeUniforms([zi.common,zi.displacementmap]),vertexShader:Hi.depth_vert,fragmentShader:Hi.depth_frag},normal:{uniforms:mergeUniforms([zi.common,zi.bumpmap,zi.normalmap,zi.displacementmap,{opacity:{value:1}}]),vertexShader:Hi.meshnormal_vert,fragmentShader:Hi.meshnormal_frag},sprite:{uniforms:mergeUniforms([zi.sprite,zi.fog]),vertexShader:Hi.sprite_vert,fragmentShader:Hi.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Hi.background_vert,fragmentShader:Hi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Hi.backgroundCube_vert,fragmentShader:Hi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Hi.cube_vert,fragmentShader:Hi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Hi.equirect_vert,fragmentShader:Hi.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([zi.common,zi.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Hi.distanceRGBA_vert,fragmentShader:Hi.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([zi.lights,zi.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:Hi.shadow_vert,fragmentShader:Hi.shadow_frag}};Wi.physical={uniforms:mergeUniforms([Wi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:Hi.meshphysical_vert,fragmentShader:Hi.meshphysical_frag};const qi={r:0,b:0,g:0};function WebGLBackground(e,t,i,n,r,l,c){const h=new Color(0);let d,A,p=!0===l?0:1,m=null,g=0,f=null;function setClear(t,i){t.getRGB(qi,getUnlitUniformColorSpace(e)),n.buffers.color.setClear(qi.r,qi.g,qi.b,i,c)}return{getClearColor:function(){return h},setClearColor:function(e,t=1){h.set(e),p=t,setClear(h,p)},getClearAlpha:function(){return p},setClearAlpha:function(e){p=e,setClear(h,p)},render:function render(l,v){let E=!1,y=!0===v.isScene?v.background:null;if(y&&y.isTexture){y=(v.backgroundBlurriness>0?i:t).get(y)}switch(null===y?setClear(h,p):y&&y.isColor&&(setClear(y,1),E=!0),e.xr.getEnvironmentBlendMode()){case"opaque":E=!0;break;case"additive":n.buffers.color.setClear(0,0,0,1,c),E=!0;break;case"alpha-blend":n.buffers.color.setClear(0,0,0,0,c),E=!0}(e.autoClear||E)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===S)?(void 0===A&&(A=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(Wi.backgroundCube.uniforms),vertexShader:Wi.backgroundCube.vertexShader,fragmentShader:Wi.backgroundCube.fragmentShader,side:o,depthTest:!1,depthWrite:!1,fog:!1})),A.geometry.deleteAttribute("normal"),A.geometry.deleteAttribute("uv"),A.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(A.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(A)),A.material.uniforms.envMap.value=y,A.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,A.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,A.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,A.material.toneMapped=y.colorSpace!==Me,m===y&&g===y.version&&f===e.toneMapping||(A.material.needsUpdate=!0,m=y,g=y.version,f=e.toneMapping),A.layers.enableAll(),l.unshift(A,A.geometry,A.material,0,0,null)):y&&y.isTexture&&(void 0===d&&(d=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(Wi.background.uniforms),vertexShader:Wi.background.vertexShader,fragmentShader:Wi.background.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(d)),d.material.uniforms.t2D.value=y,d.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,d.material.toneMapped=y.colorSpace!==Me,!0===y.matrixAutoUpdate&&y.updateMatrix(),d.material.uniforms.uvTransform.value.copy(y.matrix),m===y&&g===y.version&&f===e.toneMapping||(d.material.needsUpdate=!0,m=y,g=y.version,f=e.toneMapping),d.layers.enableAll(),l.unshift(d,d.geometry,d.material,0,0,null))}}}function WebGLBindingStates(e,t,i,n){const r=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=n.isWebGL2?null:t.get("OES_vertex_array_object"),o=n.isWebGL2||null!==a,l={},c=createBindingState(null);let h=c,d=!1;function bindVertexArrayObject(t){return n.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function deleteVertexArrayObject(t){return n.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function createBindingState(e){const t=[],i=[],n=[];for(let e=0;e=0){const i=r[t];let n=a[t];if(void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor)),void 0===i)return!0;if(i.attribute!==n)return!0;if(n&&i.data!==n.data)return!0;o++}}return h.attributesNum!==o||h.index!==n}(r,p,A,m),g&&function saveCache(e,t,i,n){const r={},a=t.attributes;let o=0;const l=i.getAttributes();for(const t in l){if(l[t].location>=0){let i=a[t];void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor));const n={};n.attribute=i,i&&i.data&&(n.data=i.data),r[t]=n,o++}}h.attributes=r,h.attributesNum=o,h.index=n}(r,p,A,m)}else{const e=!0===c.wireframe;h.geometry===p.id&&h.program===A.id&&h.wireframe===e||(h.geometry=p.id,h.program=A.id,h.wireframe=e,g=!0)}null!==m&&i.update(m,e.ELEMENT_ARRAY_BUFFER),(g||d)&&(d=!1,function setupVertexAttributes(r,a,o,l){if(!1===n.isWebGL2&&(r.isInstancedMesh||l.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;initAttributes();const c=l.attributes,h=o.getAttributes(),d=a.defaultAttributeValues;for(const t in h){const a=h[t];if(a.location>=0){let o=c[t];if(void 0===o&&("instanceMatrix"===t&&r.instanceMatrix&&(o=r.instanceMatrix),"instanceColor"===t&&r.instanceColor&&(o=r.instanceColor)),void 0!==o){const t=o.normalized,c=o.itemSize,h=i.get(o);if(void 0===h)continue;const d=h.buffer,A=h.type,p=h.bytesPerElement,m=!0===n.isWebGL2&&(A===e.INT||A===e.UNSIGNED_INT||o.gpuType===X);if(o.isInterleavedBufferAttribute){const i=o.data,n=i.stride,h=o.offset;if(i.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const r="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let a=void 0!==i.precision?i.precision:"highp";const o=getMaxPrecision(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=r||t.has("WEBGL_draw_buffers"),c=!0===i.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),A=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),m=e.getParameter(e.MAX_VERTEX_ATTRIBS),g=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),f=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),E=d>0,y=r||t.has("OES_texture_float");return{isWebGL2:r,drawBuffers:l,getMaxAnisotropy:function getMaxAnisotropy(){if(void 0!==n)return n;if(!0===t.has("EXT_texture_filter_anisotropic")){const i=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:d,maxTextureSize:A,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:g,maxVaryings:f,maxFragmentUniforms:v,vertexTextures:E,floatFragmentTextures:y,floatVertexTextures:E&&y,maxSamples:r?e.getParameter(e.MAX_SAMPLES):0}}function WebGLClipping(e){const t=this;let i=null,n=0,r=!1,a=!1;const o=new Plane,l=new Matrix3,c={value:null,needsUpdate:!1};function projectPlanes(e,i,n,r){const a=null!==e?e.length:0;let h=null;if(0!==a){if(h=c.value,!0!==r||null===h){const t=n+4*a,r=i.matrixWorldInverse;l.getNormalMatrix(r),(null===h||h.length0);t.numPlanes=n,t.numIntersection=0}();else{const e=a?0:n,t=4*e;let r=m.clippingState||null;c.value=r,r=projectPlanes(d,l,t,h);for(let e=0;e!==t;++e)r[e]=i[e];m.clippingState=r,this.numIntersection=A?this.numPlanes:0,this.numPlanes+=e}}}function WebGLCubeMaps(e){let t=new WeakMap;function mapTextureMapping(e,t){return t===x?e.mapping=y:304===t&&(e.mapping=_),e}function onTextureDispose(e){const i=e.target;i.removeEventListener("dispose",onTextureDispose);const n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function get(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const n=i.mapping;if(n===x||304===n){if(t.has(i)){return mapTextureMapping(t.get(i).texture,i.mapping)}{const n=i.image;if(n&&n.height>0){const r=new WebGLCubeRenderTarget(n.height/2);return r.fromEquirectangularTexture(e,i),t.set(i,r),i.addEventListener("dispose",onTextureDispose),mapTextureMapping(r.texture,i.mapping)}return null}}}return i},dispose:function dispose(){t=new WeakMap}}}class OrthographicCamera extends Camera{constructor(e=-1,t=1,i=1,n=-1,r=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let r=i-e,a=i+e,o=n+t,l=n-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,a=r+e*this.view.width,o-=t*this.view.offsetY,l=o-t*this.view.height}this.projectionMatrix.makeOrthographic(r,a,o,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Xi=[.125,.215,.35,.446,.526,.582],ji=20,Yi=new OrthographicCamera,Ki=new Color;let $i=null;const Ji=(1+Math.sqrt(5))/2,Zi=1/Ji,en=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,Ji,Zi),new Vector3(0,Ji,-Zi),new Vector3(Zi,0,Ji),new Vector3(-Zi,0,Ji),new Vector3(Ji,Zi,0),new Vector3(-Ji,Zi,0)];class PMREMGenerator{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){$i=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,n,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?l=Xi[o-e+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),h=-c,d=1+c,A=[h,h,d,h,d,d,h,h,d,d,h,d],p=6,m=6,g=3,f=2,v=1,E=new Float32Array(g*m*p),y=new Float32Array(f*m*p),_=new Float32Array(v*m*p);for(let e=0;e2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];E.set(n,g*m*e),y.set(A,f*m*e);const r=[e,e,e,e,e,e];_.set(r,v*m*e)}const x=new BufferGeometry;x.setAttribute("position",new BufferAttribute(E,g)),x.setAttribute("uv",new BufferAttribute(y,f)),x.setAttribute("faceIndex",new BufferAttribute(_,v)),t.push(x),r>4&&r--}return{lodPlanes:t,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=function _getBlurShader(e,t,i){const n=new Float32Array(ji),r=new Vector3(0,1,0),a=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{n:ji,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return a}(n,e,t)}return n}_compileMaterial(e){const t=new Mesh(this._lodPlanes[0],e);this._renderer.compile(t,Yi)}_sceneToCubeUV(e,t,i,n){const r=new PerspectiveCamera(90,1,t,i),a=[1,-1,1,1,1,1],l=[1,1,1,-1,-1,-1],c=this._renderer,h=c.autoClear,d=c.toneMapping;c.getClearColor(Ki),c.toneMapping=p,c.autoClear=!1;const A=new MeshBasicMaterial({name:"PMREM.Background",side:o,depthWrite:!1,depthTest:!1}),m=new Mesh(new BoxGeometry,A);let g=!1;const f=e.background;f?f.isColor&&(A.color.copy(f),e.background=null,g=!0):(A.color.copy(Ki),g=!0);for(let t=0;t<6;t++){const i=t%3;0===i?(r.up.set(0,a[t],0),r.lookAt(l[t],0,0)):1===i?(r.up.set(0,0,a[t]),r.lookAt(0,l[t],0)):(r.up.set(0,a[t],0),r.lookAt(0,0,l[t]));const o=this._cubeSize;_setViewport(n,i*o,t>2?o:0,o,o),c.setRenderTarget(n),g&&c.render(m,r),c.render(e,r)}m.geometry.dispose(),m.material.dispose(),c.toneMapping=d,c.autoClear=h,e.background=f}_textureToCubeUV(e,t){const i=this._renderer,n=e.mapping===y||e.mapping===_;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=_getEquirectMaterial());const r=n?this._cubemapMaterial:this._equirectMaterial,a=new Mesh(this._lodPlanes[0],r);r.uniforms.envMap.value=e;const o=this._cubeSize;_setViewport(t,0,0,3*o,2*o),i.setRenderTarget(t),i.render(a,Yi)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let t=1;tji&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to 20`);const f=[];let v=0;for(let e=0;eE-4?n-E+4:0),4*(this._cubeSize-y),3*y,2*y),l.setRenderTarget(t),l.render(h,Yi)}}function _createRenderTarget(e,t,i){const n=new WebGLRenderTarget(e,t,i);return n.texture.mapping=S,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function _setViewport(e,t,i,n,r){e.viewport.set(t,i,n,r),e.scissor.set(t,i,n,r)}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function WebGLCubeUVMaps(e){let t=new WeakMap,i=null;function onTextureDispose(e){const i=e.target;i.removeEventListener("dispose",onTextureDispose);const n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function get(n){if(n&&n.isTexture){const r=n.mapping,a=r===x||304===r,o=r===y||r===_;if(a||o){if(n.isRenderTargetTexture&&!0===n.needsPMREMUpdate){n.needsPMREMUpdate=!1;let r=t.get(n);return null===i&&(i=new PMREMGenerator(e)),r=a?i.fromEquirectangular(n,r):i.fromCubemap(n,r),t.set(n,r),r.texture}if(t.has(n))return t.get(n).texture;{const r=n.image;if(a&&r&&r.height>0||o&&r&&function isCubeTextureComplete(e){let t=0;const i=6;for(let n=0;nt.maxTextureSize&&(T=Math.ceil(I/t.maxTextureSize),I=t.maxTextureSize);const B=new Float32Array(I*T*4*m),U=new DataArrayTexture(B,I,T,m);U.type=Y,U.needsUpdate=!0;const F=4*b;for(let O=0;O0)return e;const r=t*i;let a=an[r];if(void 0===a&&(a=new Float32Array(r),an[r]=a),0!==t){n.toArray(a,0);for(let n=1,r=0;n!==t;++n)r+=i,e[n].toArray(a,r)}return a}function arraysEqual(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i":" "} ${r}: ${i[e]}`)}return n.join("\n")}(e.getShaderSource(t),n)}return r}function getTexelEncodingFunction(e,t){const i=function getEncodingComponents(e){switch(e){case be:return["Linear","( value )"];case Me:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+i[0]+i[1]+"; }"}function getToneMappingFunction(e,t){let i;switch(t){case m:i="Linear";break;case g:i="Reinhard";break;case f:i="OptimizedCineon";break;case v:i="ACESFilmic";break;case E:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function filterEmptyLine(e){return""!==e}function replaceLightNums(e,t){const i=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function replaceClippingPlaneNums(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const pn=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(e){return e.replace(pn,includeReplacer)}const mn=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function includeReplacer(e,t){let i=Hi[t];if(void 0===i){const e=mn.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");i=Hi[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return resolveIncludes(i)}const gn=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(e){return e.replace(gn,loopReplacer)}function loopReplacer(e,t,i,n){let r="";for(let e=parseInt(t);e0&&(B+="\n"),U=[b,"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I].filter(filterEmptyLine).join("\n"),U.length>0&&(U+="\n")):(B=[generatePrecision(a),"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I,a.instancing?"#define USE_INSTANCING":"",a.instancingColor?"#define USE_INSTANCING_COLOR":"",a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+E:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",a.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",a.displacementMap?"#define USE_DISPLACEMENTMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.anisotropyMap?"#define USE_ANISOTROPYMAP":"",a.clearcoatMap?"#define USE_CLEARCOATMAP":"",a.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",a.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",a.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.alphaHash?"#define USE_ALPHAHASH":"",a.transmission?"#define USE_TRANSMISSION":"",a.transmissionMap?"#define USE_TRANSMISSIONMAP":"",a.thicknessMap?"#define USE_THICKNESSMAP":"",a.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",a.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",a.mapUv?"#define MAP_UV "+a.mapUv:"",a.alphaMapUv?"#define ALPHAMAP_UV "+a.alphaMapUv:"",a.lightMapUv?"#define LIGHTMAP_UV "+a.lightMapUv:"",a.aoMapUv?"#define AOMAP_UV "+a.aoMapUv:"",a.emissiveMapUv?"#define EMISSIVEMAP_UV "+a.emissiveMapUv:"",a.bumpMapUv?"#define BUMPMAP_UV "+a.bumpMapUv:"",a.normalMapUv?"#define NORMALMAP_UV "+a.normalMapUv:"",a.displacementMapUv?"#define DISPLACEMENTMAP_UV "+a.displacementMapUv:"",a.metalnessMapUv?"#define METALNESSMAP_UV "+a.metalnessMapUv:"",a.roughnessMapUv?"#define ROUGHNESSMAP_UV "+a.roughnessMapUv:"",a.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+a.anisotropyMapUv:"",a.clearcoatMapUv?"#define CLEARCOATMAP_UV "+a.clearcoatMapUv:"",a.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+a.clearcoatNormalMapUv:"",a.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+a.clearcoatRoughnessMapUv:"",a.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+a.iridescenceMapUv:"",a.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+a.iridescenceThicknessMapUv:"",a.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+a.sheenColorMapUv:"",a.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+a.sheenRoughnessMapUv:"",a.specularMapUv?"#define SPECULARMAP_UV "+a.specularMapUv:"",a.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+a.specularColorMapUv:"",a.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+a.specularIntensityMapUv:"",a.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+a.transmissionMapUv:"",a.thicknessMapUv?"#define THICKNESSMAP_UV "+a.thicknessMapUv:"",a.vertexTangents&&!1===a.flatShading?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexAlphas?"#define USE_COLOR_ALPHA":"",a.vertexUv1s?"#define USE_UV1":"",a.vertexUv2s?"#define USE_UV2":"",a.vertexUv3s?"#define USE_UV3":"",a.pointsUvs?"#define USE_POINTS_UV":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.morphColors&&a.isWebGL2?"#define USE_MORPHCOLORS":"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+a.morphTextureStride:"",a.morphTargetsCount>0&&a.isWebGL2?"#define MORPHTARGETS_COUNT "+a.morphTargetsCount:"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+f:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.useLegacyLights?"#define LEGACY_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&a.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(filterEmptyLine).join("\n"),U=[b,generatePrecision(a),"#define SHADER_TYPE "+a.shaderType,"#define SHADER_NAME "+a.shaderName,I,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+v:"",a.envMap?"#define "+E:"",a.envMap?"#define "+x:"",C?"#define CUBEUV_TEXEL_WIDTH "+C.texelWidth:"",C?"#define CUBEUV_TEXEL_HEIGHT "+C.texelHeight:"",C?"#define CUBEUV_MAX_MIP "+C.maxMip+".0":"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",a.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.anisotropy?"#define USE_ANISOTROPY":"",a.anisotropyMap?"#define USE_ANISOTROPYMAP":"",a.clearcoat?"#define USE_CLEARCOAT":"",a.clearcoatMap?"#define USE_CLEARCOATMAP":"",a.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.iridescence?"#define USE_IRIDESCENCE":"",a.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",a.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",a.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.alphaTest?"#define USE_ALPHATEST":"",a.alphaHash?"#define USE_ALPHAHASH":"",a.sheen?"#define USE_SHEEN":"",a.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",a.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",a.transmission?"#define USE_TRANSMISSION":"",a.transmissionMap?"#define USE_TRANSMISSIONMAP":"",a.thicknessMap?"#define USE_THICKNESSMAP":"",a.vertexTangents&&!1===a.flatShading?"#define USE_TANGENT":"",a.vertexColors||a.instancingColor?"#define USE_COLOR":"",a.vertexAlphas?"#define USE_COLOR_ALPHA":"",a.vertexUv1s?"#define USE_UV1":"",a.vertexUv2s?"#define USE_UV2":"",a.vertexUv3s?"#define USE_UV3":"",a.pointsUvs?"#define USE_POINTS_UV":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+f:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.useLegacyLights?"#define LEGACY_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&a.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",a.toneMapping!==p?"#define TONE_MAPPING":"",a.toneMapping!==p?Hi.tonemapping_pars_fragment:"",a.toneMapping!==p?getToneMappingFunction("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.opaque?"#define OPAQUE":"",Hi.colorspace_pars_fragment,getTexelEncodingFunction("linearToOutputTexel",a.outputColorSpace),a.useDepthPacking?"#define DEPTH_PACKING "+a.depthPacking:"","\n"].filter(filterEmptyLine).join("\n")),m=resolveIncludes(m),m=replaceLightNums(m,a),m=replaceClippingPlaneNums(m,a),g=resolveIncludes(g),g=replaceLightNums(g,a),g=replaceClippingPlaneNums(g,a),m=unrollLoops(m),g=unrollLoops(g),a.isWebGL2&&!0!==a.isRawShaderMaterial&&(F="#version 300 es\n",B=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+B,U=["#define varying in",a.glslVersion===Be?"":"layout(location = 0) out highp vec4 pc_fragColor;",a.glslVersion===Be?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+U);const O=F+B+m,G=F+U+g,W=WebGLShader(l,l.VERTEX_SHADER,O),q=WebGLShader(l,l.FRAGMENT_SHADER,G);if(l.attachShader(T,W),l.attachShader(T,q),void 0!==a.index0AttributeName?l.bindAttribLocation(T,0,a.index0AttributeName):!0===a.morphTargets&&l.bindAttribLocation(T,0,"position"),l.linkProgram(T),e.debug.checkShaderErrors){const t=l.getProgramInfoLog(T).trim(),i=l.getShaderInfoLog(W).trim(),n=l.getShaderInfoLog(q).trim();let r=!0,a=!0;if(!1===l.getProgramParameter(T,l.LINK_STATUS))if(r=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(l,T,W,q);else{const e=getShaderErrors(l,W,"vertex"),i=getShaderErrors(l,q,"fragment");console.error("THREE.WebGLProgram: Shader Error "+l.getError()+" - VALIDATE_STATUS "+l.getProgramParameter(T,l.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+i)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==i&&""!==n||(a=!1);a&&(this.diagnostics={runnable:r,programLog:t,vertexShader:{log:i,prefix:B},fragmentShader:{log:n,prefix:U}})}let X,j;return l.deleteShader(W),l.deleteShader(q),this.getUniforms=function(){return void 0===X&&(X=new WebGLUniforms(l,T)),X},this.getAttributes=function(){return void 0===j&&(j=function fetchAttributeLocations(e,t){const i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r0,ce=a.clearcoat>0,he=a.iridescence>0,ue=a.sheen>0,de=a.transmission>0,Ae=le&&!!a.anisotropyMap,pe=ce&&!!a.clearcoatMap,me=ce&&!!a.clearcoatNormalMap,ge=ce&&!!a.clearcoatRoughnessMap,fe=he&&!!a.iridescenceMap,ve=he&&!!a.iridescenceThicknessMap,Ee=ue&&!!a.sheenColorMap,ye=ue&&!!a.sheenRoughnessMap,_e=!!a.specularMap,xe=!!a.specularColorMap,Se=!!a.specularIntensityMap,Ce=de&&!!a.transmissionMap,Me=de&&!!a.thicknessMap,Ie=!!a.gradientMap,we=!!a.alphaMap,Te=a.alphaTest>0,Be=!!a.alphaHash,Re=!!a.extensions,Le=!!C.attributes.uv1,De=!!C.attributes.uv2,Ue=!!C.attributes.uv3;return{isWebGL2:m,shaderID:B,shaderType:a.type,shaderName:a.name,vertexShader:O,fragmentShader:G,defines:a.defines,customVertexShaderID:W,customFragmentShaderID:q,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:v,instancing:Y,instancingColor:Y&&null!==_.instanceColor,supportsVertexTextures:f,outputColorSpace:null===j?e.outputColorSpace:!0===j.isXRRenderTarget?j.texture.colorSpace:be,map:K,matcap:$,envMap:J,envMapMode:J&&I.mapping,envMapCubeUVHeight:T,aoMap:ee,lightMap:te,bumpMap:ie,normalMap:ne,displacementMap:f&&re,emissiveMap:se,normalMapObjectSpace:ne&&1===a.normalMapType,normalMapTangentSpace:ne&&0===a.normalMapType,metalnessMap:ae,roughnessMap:oe,anisotropy:le,anisotropyMap:Ae,clearcoat:ce,clearcoatMap:pe,clearcoatNormalMap:me,clearcoatRoughnessMap:ge,iridescence:he,iridescenceMap:fe,iridescenceThicknessMap:ve,sheen:ue,sheenColorMap:Ee,sheenRoughnessMap:ye,specularMap:_e,specularColorMap:xe,specularIntensityMap:Se,transmission:de,transmissionMap:Ce,thicknessMap:Me,gradientMap:Ie,opaque:!1===a.transparent&&1===a.blending,alphaMap:we,alphaTest:Te,alphaHash:Be,combine:a.combine,mapUv:K&&getChannel(a.map.channel),aoMapUv:ee&&getChannel(a.aoMap.channel),lightMapUv:te&&getChannel(a.lightMap.channel),bumpMapUv:ie&&getChannel(a.bumpMap.channel),normalMapUv:ne&&getChannel(a.normalMap.channel),displacementMapUv:re&&getChannel(a.displacementMap.channel),emissiveMapUv:se&&getChannel(a.emissiveMap.channel),metalnessMapUv:ae&&getChannel(a.metalnessMap.channel),roughnessMapUv:oe&&getChannel(a.roughnessMap.channel),anisotropyMapUv:Ae&&getChannel(a.anisotropyMap.channel),clearcoatMapUv:pe&&getChannel(a.clearcoatMap.channel),clearcoatNormalMapUv:me&&getChannel(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ge&&getChannel(a.clearcoatRoughnessMap.channel),iridescenceMapUv:fe&&getChannel(a.iridescenceMap.channel),iridescenceThicknessMapUv:ve&&getChannel(a.iridescenceThicknessMap.channel),sheenColorMapUv:Ee&&getChannel(a.sheenColorMap.channel),sheenRoughnessMapUv:ye&&getChannel(a.sheenRoughnessMap.channel),specularMapUv:_e&&getChannel(a.specularMap.channel),specularColorMapUv:xe&&getChannel(a.specularColorMap.channel),specularIntensityMapUv:Se&&getChannel(a.specularIntensityMap.channel),transmissionMapUv:Ce&&getChannel(a.transmissionMap.channel),thicknessMapUv:Me&&getChannel(a.thicknessMap.channel),alphaMapUv:we&&getChannel(a.alphaMap.channel),vertexTangents:!!C.attributes.tangent&&(ne||le),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!C.attributes.color&&4===C.attributes.color.itemSize,vertexUv1s:Le,vertexUv2s:De,vertexUv3s:Ue,pointsUvs:!0===_.isPoints&&!!C.attributes.uv&&(K||we),fog:!!x,useFog:!0===a.fog,fogExp2:x&&x.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:g,skinning:!0===_.isSkinnedMesh,morphTargets:void 0!==C.morphAttributes.position,morphNormals:void 0!==C.morphAttributes.normal,morphColors:void 0!==C.morphAttributes.color,morphTargetsCount:F,morphTextureStride:X,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numSpotLightMaps:h.spotLightMap.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numDirLightShadows:h.directionalShadowMap.length,numPointLightShadows:h.pointShadowMap.length,numSpotLightShadows:h.spotShadowMap.length,numSpotLightShadowsWithMaps:h.numSpotLightShadowsWithMaps,numClippingPlanes:c.numPlanes,numClipIntersection:c.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&A.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:p,useLegacyLights:e.useLegacyLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===l,flipSided:a.side===o,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:Re&&!0===a.extensions.derivatives,extensionFragDepth:Re&&!0===a.extensions.fragDepth,extensionDrawBuffers:Re&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:Re&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:m||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:m||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:m||n.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function getProgramCacheKey(t){const i=[];if(t.shaderID?i.push(t.shaderID):(i.push(t.customVertexShaderID),i.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)i.push(e),i.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function getProgramCacheKeyParameters(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(i,t),function getProgramCacheKeyBooleans(e,t){h.disableAll(),t.isWebGL2&&h.enable(0);t.supportsVertexTextures&&h.enable(1);t.instancing&&h.enable(2);t.instancingColor&&h.enable(3);t.matcap&&h.enable(4);t.envMap&&h.enable(5);t.normalMapObjectSpace&&h.enable(6);t.normalMapTangentSpace&&h.enable(7);t.clearcoat&&h.enable(8);t.iridescence&&h.enable(9);t.alphaTest&&h.enable(10);t.vertexColors&&h.enable(11);t.vertexAlphas&&h.enable(12);t.vertexUv1s&&h.enable(13);t.vertexUv2s&&h.enable(14);t.vertexUv3s&&h.enable(15);t.vertexTangents&&h.enable(16);t.anisotropy&&h.enable(17);e.push(h.mask),h.disableAll(),t.fog&&h.enable(0);t.useFog&&h.enable(1);t.flatShading&&h.enable(2);t.logarithmicDepthBuffer&&h.enable(3);t.skinning&&h.enable(4);t.morphTargets&&h.enable(5);t.morphNormals&&h.enable(6);t.morphColors&&h.enable(7);t.premultipliedAlpha&&h.enable(8);t.shadowMapEnabled&&h.enable(9);t.useLegacyLights&&h.enable(10);t.doubleSided&&h.enable(11);t.flipSided&&h.enable(12);t.useDepthPacking&&h.enable(13);t.dithering&&h.enable(14);t.transmission&&h.enable(15);t.sheen&&h.enable(16);t.opaque&&h.enable(17);t.pointsUvs&&h.enable(18);e.push(h.mask)}(i,t),i.push(e.outputColorSpace)),i.push(t.customProgramCacheKey),i.join()},getUniforms:function getUniforms(e){const t=E[e.type];let i;if(t){const e=Wi[t];i=Fi.clone(e.uniforms)}else i=e.uniforms;return i},acquireProgram:function acquireProgram(t,i){let n;for(let e=0,t=A.length;e0?n.push(h):!0===a.transparent?r.push(h):i.push(h)},unshift:function unshift(e,t,a,o,l,c){const h=getNextRenderItem(e,t,a,o,l,c);a.transmission>0?n.unshift(h):!0===a.transparent?r.unshift(h):i.unshift(h)},finish:function finish(){for(let i=t,n=e.length;i1&&i.sort(e||painterSortStable),n.length>1&&n.sort(t||reversePainterSortStable),r.length>1&&r.sort(t||reversePainterSortStable)}}}function WebGLRenderLists(){let e=new WeakMap;return{get:function get(t,i){const n=e.get(t);let r;return void 0===n?(r=new WebGLRenderList,e.set(t,[r])):i>=n.length?(r=new WebGLRenderList,n.push(r)):r=n[i],r},dispose:function dispose(){e=new WeakMap}}}function UniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new Vector3,color:new Color};break;case"SpotLight":i={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new Vector3,color:new Color,distance:0,decay:0};break;case"HemisphereLight":i={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case"RectAreaLight":i={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3}}return e[t.id]=i,i}}}let vn=0;function shadowCastingAndTexturingLightsFirst(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function WebGLLights(e,t){const i=new UniformsCache,n=function ShadowUniformsCache(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=i,i}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let e=0;e<9;e++)r.probe.push(new Vector3);const a=new Vector3,o=new Matrix4,l=new Matrix4;return{setup:function setup(a,o){let l=0,c=0,h=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let d=0,A=0,p=0,m=0,g=0,f=0,v=0,E=0,y=0,_=0;a.sort(shadowCastingAndTexturingLightsFirst);const x=!0===o?Math.PI:1;for(let e=0,t=a.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=zi.LTC_FLOAT_1,r.rectAreaLTC2=zi.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=zi.LTC_HALF_1,r.rectAreaLTC2=zi.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=l,r.ambient[1]=c,r.ambient[2]=h;const S=r.hash;S.directionalLength===d&&S.pointLength===A&&S.spotLength===p&&S.rectAreaLength===m&&S.hemiLength===g&&S.numDirectionalShadows===f&&S.numPointShadows===v&&S.numSpotShadows===E&&S.numSpotMaps===y||(r.directional.length=d,r.spot.length=p,r.rectArea.length=m,r.point.length=A,r.hemi.length=g,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=v,r.pointShadowMap.length=v,r.spotShadow.length=E,r.spotShadowMap.length=E,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=v,r.spotLightMatrix.length=E+y-_,r.spotLightMap.length=y,r.numSpotLightShadowsWithMaps=_,S.directionalLength=d,S.pointLength=A,S.spotLength=p,S.rectAreaLength=m,S.hemiLength=g,S.numDirectionalShadows=f,S.numPointShadows=v,S.numSpotShadows=E,S.numSpotMaps=y,r.version=vn++)},setupView:function setupView(e,t){let i=0,n=0,c=0,h=0,d=0;const A=t.matrixWorldInverse;for(let t=0,p=e.length;t=a.length?(o=new WebGLRenderState(e,t),a.push(o)):o=a[r],o},dispose:function dispose(){i=new WeakMap}}}class MeshDepthMaterial extends Material$1{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material$1{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function WebGLShadowMap(e,t,n){let c=new Frustum;const h=new Vector2,d=new Vector2,A=new Vector4,p=new MeshDepthMaterial({depthPacking:3201}),m=new MeshDistanceMaterial,g={},f=n.maxTextureSize,v={[a]:o,[o]:a,[l]:l},E=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=E.clone();y.defines.HORIZONTAL_PASS=1;const _=new BufferGeometry;_.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Mesh(_,E),S=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=i;let C=this.type;function VSMPass(i,n){const r=t.update(x);E.defines.VSM_SAMPLES!==i.blurSamples&&(E.defines.VSM_SAMPLES=i.blurSamples,y.defines.VSM_SAMPLES=i.blurSamples,E.needsUpdate=!0,y.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new WebGLRenderTarget(h.x,h.y)),E.uniforms.shadow_pass.value=i.map.texture,E.uniforms.resolution.value=i.mapSize,E.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(n,null,r,E,x,null),y.uniforms.shadow_pass.value=i.mapPass.texture,y.uniforms.resolution.value=i.mapSize,y.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(n,null,r,y,x,null)}function getDepthMaterial(t,i,n,a){let o=null;const l=!0===n.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==l)o=l;else if(o=!0===n.isPointLight?m:p,e.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){const e=o.uuid,t=i.uuid;let n=g[e];void 0===n&&(n={},g[e]=n);let r=n[t];void 0===r&&(r=o.clone(),n[t]=r),o=r}if(o.visible=i.visible,o.wireframe=i.wireframe,o.side=a===r?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:v[i.side],o.alphaMap=i.alphaMap,o.alphaTest=i.alphaTest,o.map=i.map,o.clipShadows=i.clipShadows,o.clippingPlanes=i.clippingPlanes,o.clipIntersection=i.clipIntersection,o.displacementMap=i.displacementMap,o.displacementScale=i.displacementScale,o.displacementBias=i.displacementBias,o.wireframeLinewidth=i.wireframeLinewidth,o.linewidth=i.linewidth,!0===n.isPointLight&&!0===o.isMeshDistanceMaterial){e.properties.get(o).light=n}return o}function renderObject(i,n,a,o,l){if(!1===i.visible)return;if(i.layers.test(n.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&l===r)&&(!i.frustumCulled||c.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,i.matrixWorld);const n=t.update(i),r=i.material;if(Array.isArray(r)){const t=n.groups;for(let c=0,h=t.length;cf||h.y>f)&&(h.x>f&&(d.x=Math.floor(f/v.x),h.x=d.x*v.x,l.mapSize.x=d.x),h.y>f&&(d.y=Math.floor(f/v.y),h.y=d.y*v.y,l.mapSize.y=d.y)),null===l.map||!0===m||!0===g){const e=this.type!==r?{minFilter:T,magFilter:T}:{};null!==l.map&&l.map.dispose(),l.map=new WebGLRenderTarget(h.x,h.y,e),l.map.texture.name=o.name+".shadowMap",l.camera.updateProjectionMatrix()}e.setRenderTarget(l.map),e.clear();const E=l.getViewportCount();for(let e=0;e=1):-1!==j.indexOf("OpenGL ES")&&(X=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),q=X>=2);let Y=null,K={};const $=e.getParameter(e.SCISSOR_BOX),J=e.getParameter(e.VIEWPORT),ee=(new Vector4).fromArray($),te=(new Vector4).fromArray(J);function createTexture(t,i,r,a){const o=new Uint8Array(4),l=e.createTexture();e.bindTexture(t,l),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let l=0;ln||e.height>n)&&(r=n/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const n=t?floorPowerOfTwo:Math.floor,a=n(r*e.width),o=n(r*e.height);void 0===f&&(f=createCanvas(a,o));const l=i?createCanvas(a,o):f;l.width=a,l.height=o;return l.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function isPowerOfTwo$1(e){return isPowerOfTwo(e.width)&&isPowerOfTwo(e.height)}function textureNeedsGenerateMipmaps(e,t){return e.generateMipmaps&&t&&e.minFilter!==T&&e.minFilter!==F}function generateMipmap(t){e.generateMipmap(t)}function getInternalFormat(i,n,r,a,o=!1){if(!1===l)return n;if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let c=n;return n===e.RED&&(r===e.FLOAT&&(c=e.R32F),r===e.HALF_FLOAT&&(c=e.R16F),r===e.UNSIGNED_BYTE&&(c=e.R8)),n===e.RG&&(r===e.FLOAT&&(c=e.RG32F),r===e.HALF_FLOAT&&(c=e.RG16F),r===e.UNSIGNED_BYTE&&(c=e.RG8)),n===e.RGBA&&(r===e.FLOAT&&(c=e.RGBA32F),r===e.HALF_FLOAT&&(c=e.RGBA16F),r===e.UNSIGNED_BYTE&&(c=a===Me&&!1===o?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)),c!==e.R16F&&c!==e.R32F&&c!==e.RG16F&&c!==e.RG32F&&c!==e.RGBA16F&&c!==e.RGBA32F||t.get("EXT_color_buffer_float"),c}function getMipLevels(e,t,i){return!0===textureNeedsGenerateMipmaps(e,i)||e.isFramebufferTexture&&e.minFilter!==T&&e.minFilter!==F?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function filterFallback(t){return t===T||t===B||t===U?e.NEAREST:e.LINEAR}function onTextureDispose(e){const t=e.target;t.removeEventListener("dispose",onTextureDispose),function deallocateTexture(e){const t=n.get(e);if(void 0===t.__webglInit)return;const i=e.source,r=v.get(i);if(r){const n=r[t.__cacheKey];n.usedTimes--,0===n.usedTimes&&deleteTexture(e),0===Object.keys(r).length&&v.delete(i)}n.remove(e)}(t),t.isVideoTexture&&g.delete(t)}function onRenderTargetDispose(t){const i=t.target;i.removeEventListener("dispose",onRenderTargetDispose),function deallocateRenderTarget(t){const i=t.texture,r=n.get(t),a=n.get(i);void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(r.__webglFramebuffer[t]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&e.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let t=0;t0&&a.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void uploadTexture(a,t,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+r)}const _={[C]:e.REPEAT,[b]:e.CLAMP_TO_EDGE,[I]:e.MIRRORED_REPEAT},x={[T]:e.NEAREST,[B]:e.NEAREST_MIPMAP_NEAREST,[U]:e.NEAREST_MIPMAP_LINEAR,[F]:e.LINEAR,[O]:e.LINEAR_MIPMAP_NEAREST,[G]:e.LINEAR_MIPMAP_LINEAR},S={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function setTextureParameters(i,a,o){if(o?(e.texParameteri(i,e.TEXTURE_WRAP_S,_[a.wrapS]),e.texParameteri(i,e.TEXTURE_WRAP_T,_[a.wrapT]),i!==e.TEXTURE_3D&&i!==e.TEXTURE_2D_ARRAY||e.texParameteri(i,e.TEXTURE_WRAP_R,_[a.wrapR]),e.texParameteri(i,e.TEXTURE_MAG_FILTER,x[a.magFilter]),e.texParameteri(i,e.TEXTURE_MIN_FILTER,x[a.minFilter])):(e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i!==e.TEXTURE_3D&&i!==e.TEXTURE_2D_ARRAY||e.texParameteri(i,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),a.wrapS===b&&a.wrapT===b||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(i,e.TEXTURE_MAG_FILTER,filterFallback(a.magFilter)),e.texParameteri(i,e.TEXTURE_MIN_FILTER,filterFallback(a.minFilter)),a.minFilter!==T&&a.minFilter!==F&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(e.texParameteri(i,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(i,e.TEXTURE_COMPARE_FUNC,S[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===T)return;if(a.minFilter!==U&&a.minFilter!==G)return;if(a.type===Y&&!1===t.has("OES_texture_float_linear"))return;if(!1===l&&a.type===K&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(e.texParameterf(i,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,r.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function initTexture(t,i){let n=!1;void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",onTextureDispose));const r=i.source;let a=v.get(r);void 0===a&&(a={},v.set(r,a));const l=function getTextureCacheKey(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(i);if(l!==t.__cacheKey){void 0===a[l]&&(a[l]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,n=!0),a[l].usedTimes++;const r=a[t.__cacheKey];void 0!==r&&(a[t.__cacheKey].usedTimes--,0===r.usedTimes&&deleteTexture(i)),t.__cacheKey=l,t.__webglTexture=a[l].texture}return n}function uploadTexture(t,r,o){let c=e.TEXTURE_2D;(r.isDataArrayTexture||r.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),r.isData3DTexture&&(c=e.TEXTURE_3D);const h=initTexture(t,r),A=r.source;i.bindTexture(c,t.__webglTexture,e.TEXTURE0+o);const p=n.get(A);if(A.version!==p.__version||!0===h){i.activeTexture(e.TEXTURE0+o),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=function textureNeedsPowerOfTwo(e){return!l&&(e.wrapS!==b||e.wrapT!==b||e.minFilter!==T&&e.minFilter!==F)}(r)&&!1===isPowerOfTwo$1(r.image);let n=resizeImage(r.image,t,!1,d);n=verifyColorSpace(r,n);const m=isPowerOfTwo$1(n)||l,g=a.convert(r.format,r.colorSpace);let f,v=a.convert(r.type),E=getInternalFormat(r.internalFormat,g,v,r.colorSpace);setTextureParameters(c,r,m);const y=r.mipmaps,_=l&&!0!==r.isVideoTexture,x=void 0===p.__version||!0===h,S=getMipLevels(r,n,m);if(r.isDepthTexture)E=e.DEPTH_COMPONENT,l?E=r.type===Y?e.DEPTH_COMPONENT32F:r.type===j?e.DEPTH_COMPONENT24:r.type===$?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:r.type===Y&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===ee&&E===e.DEPTH_COMPONENT&&r.type!==q&&r.type!==j&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=j,v=a.convert(r.type)),r.format===te&&E===e.DEPTH_COMPONENT&&(E=e.DEPTH_STENCIL,r.type!==$&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=$,v=a.convert(r.type))),x&&(_?i.texStorage2D(e.TEXTURE_2D,1,E,n.width,n.height):i.texImage2D(e.TEXTURE_2D,0,E,n.width,n.height,0,g,v,null));else if(r.isDataTexture)if(y.length>0&&m){_&&x&&i.texStorage2D(e.TEXTURE_2D,S,E,y[0].width,y[0].height);for(let t=0,n=y.length;t>=1,r>>=1}}else if(y.length>0&&m){_&&x&&i.texStorage2D(e.TEXTURE_2D,S,E,y[0].width,y[0].height);for(let t=0,n=y.length;t=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,l,c,n.get(o).__webglTexture,0),i.bindFramebuffer(e.FRAMEBUFFER,null)}function setupRenderBufferStorage(t,i,n){if(e.bindRenderbuffer(e.RENDERBUFFER,t),i.depthBuffer&&!i.stencilBuffer){let r=e.DEPTH_COMPONENT16;if(n||useMultisampledRTT(i)){const t=i.depthTexture;t&&t.isDepthTexture&&(t.type===Y?r=e.DEPTH_COMPONENT32F:t.type===j&&(r=e.DEPTH_COMPONENT24));const n=getRenderTargetSamples(i);useMultisampledRTT(i)?p.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,n,r,i.width,i.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,n,r,i.width,i.height)}else e.renderbufferStorage(e.RENDERBUFFER,r,i.width,i.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(i.depthBuffer&&i.stencilBuffer){const r=getRenderTargetSamples(i);n&&!1===useMultisampledRTT(i)?e.renderbufferStorageMultisample(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,i.width,i.height):useMultisampledRTT(i)?p.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,e.DEPTH24_STENCIL8,i.width,i.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===i.isWebGLMultipleRenderTargets?i.texture:[i.texture];for(let r=0;r0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function verifyColorSpace(e,i){const n=e.colorSpace,r=e.format,a=e.type;return!0===e.isCompressedTexture||e.format===Re||n!==be&&n!==Ce&&(n===Me?!1===l?!0===t.has("EXT_sRGB")&&r===J?(e.format=Re,e.minFilter=F,e.generateMipmaps=!1):i=ImageUtils.sRGBToLinear(i):r===J&&a===W||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),i}this.allocateTextureUnit=function allocateTextureUnit(){const e=y;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),y+=1,e},this.resetTextureUnits=function resetTextureUnits(){y=0},this.setTexture2D=setTexture2D,this.setTexture2DArray=function setTexture2DArray(t,r){const a=n.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,r):i.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+r)},this.setTexture3D=function setTexture3D(t,r){const a=n.get(t);t.version>0&&a.__version!==t.version?uploadTexture(a,t,r):i.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function setTextureCube(t,r){const o=n.get(t);t.version>0&&o.__version!==t.version?function uploadCubeTexture(t,r,o){if(6!==r.image.length)return;const c=initTexture(t,r),d=r.source;i.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);const A=n.get(d);if(d.version!==A.__version||!0===c){i.activeTexture(e.TEXTURE0+o),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=r.isCompressedTexture||r.image[0].isCompressedTexture,n=r.image[0]&&r.image[0].isDataTexture,p=[];for(let e=0;e<6;e++)p[e]=t||n?n?r.image[e].image:r.image[e]:resizeImage(r.image[e],!1,!0,h),p[e]=verifyColorSpace(r,p[e]);const m=p[0],g=isPowerOfTwo$1(m)||l,f=a.convert(r.format,r.colorSpace),v=a.convert(r.type),E=getInternalFormat(r.internalFormat,f,v,r.colorSpace),y=l&&!0!==r.isVideoTexture,_=void 0===A.__version||!0===c;let x,S=getMipLevels(r,m,g);if(setTextureParameters(e.TEXTURE_CUBE_MAP,r,g),t){y&&_&&i.texStorage2D(e.TEXTURE_CUBE_MAP,S,E,m.width,m.height);for(let t=0;t<6;t++){x=p[t].mipmaps;for(let n=0;n0&&S++,i.texStorage2D(e.TEXTURE_CUBE_MAP,S,E,p[0].width,p[0].height));for(let t=0;t<6;t++)if(n){y?i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,p[t].width,p[t].height,f,v,p[t].data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,E,p[t].width,p[t].height,0,f,v,p[t].data);for(let n=0;n0&&!1===useMultisampledRTT(t)){const n=p?c:[c];h.__webglMultisampledFramebuffer=e.createFramebuffer(),h.__webglColorRenderbuffer=[],i.bindFramebuffer(e.FRAMEBUFFER,h.__webglMultisampledFramebuffer);for(let i=0;i0&&!1===useMultisampledRTT(t)){const r=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,o=t.height;let l=e.COLOR_BUFFER_BIT;const c=[],h=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,d=n.get(t),A=!0===t.isWebGLMultipleRenderTargets;if(A)for(let t=0;tl+h?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=l-h&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==l&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),null!==r&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));null!==o&&(n=t.getPose(e.targetRaySpace,i),null===n&&null!==r&&(n=r),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(En)))}return null!==o&&(o.visible=null!==n),null!==l&&(l.visible=null!==r),null!==c&&(c.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new Group;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class DepthTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h){if((h=void 0!==h?h:ee)!==ee&&h!==te)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&h===ee&&(i=j),void 0===i&&h===te&&(i=$),super(null,n,r,a,o,l,h,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:T,this.minFilter=void 0!==l?l:T,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class WebXRManager extends EventDispatcher{constructor(e,t){super();const i=this;let n=null,r=1,a=null,o="local-floor",l=1,c=null,h=null,d=null,A=null,p=null,m=null;const g=t.getContextAttributes();let f=null,v=null;const E=[],y=[],_=new PerspectiveCamera;_.layers.enable(1),_.viewport=new Vector4;const x=new PerspectiveCamera;x.layers.enable(2),x.viewport=new Vector4;const S=[_,x],C=new ArrayCamera;C.layers.enable(1),C.layers.enable(2);let b=null,I=null;function onSessionEvent(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const i=E[t];void 0!==i&&(i.update(e.inputSource,e.frame,c||a),i.dispatchEvent({type:e.type,data:e.inputSource}))}function onSessionEnd(){n.removeEventListener("select",onSessionEvent),n.removeEventListener("selectstart",onSessionEvent),n.removeEventListener("selectend",onSessionEvent),n.removeEventListener("squeeze",onSessionEvent),n.removeEventListener("squeezestart",onSessionEvent),n.removeEventListener("squeezeend",onSessionEvent),n.removeEventListener("end",onSessionEnd),n.removeEventListener("inputsourceschange",onInputSourcesChange);for(let e=0;e=0&&(y[n]=null,E[n].disconnect(i))}for(let t=0;t=y.length){y.push(i),n=e;break}if(null===y[e]){y[e]=i,n=e;break}}if(-1===n)break}const r=E[n];r&&r.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getGripSpace()},this.getHand=function(e){let t=E[e];return void 0===t&&(t=new WebXRController,E[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return null!==A?A:p},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return n},this.setSession=async function(h){if(n=h,null!==n){if(f=e.getRenderTarget(),n.addEventListener("select",onSessionEvent),n.addEventListener("selectstart",onSessionEvent),n.addEventListener("selectend",onSessionEvent),n.addEventListener("squeeze",onSessionEvent),n.addEventListener("squeezestart",onSessionEvent),n.addEventListener("squeezeend",onSessionEvent),n.addEventListener("end",onSessionEnd),n.addEventListener("inputsourceschange",onInputSourcesChange),!0!==g.xrCompatible&&await t.makeXRCompatible(),void 0===n.renderState.layers||!1===e.capabilities.isWebGL2){const i={antialias:void 0!==n.renderState.layers||g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};p=new XRWebGLLayer(n,t,i),n.updateRenderState({baseLayer:p}),v=new WebGLRenderTarget(p.framebufferWidth,p.framebufferHeight,{format:J,type:W,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil})}else{let i=null,a=null,o=null;g.depth&&(o=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,i=g.stencil?te:ee,a=g.stencil?$:j);const l={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:r};d=new XRWebGLBinding(n,t),A=d.createProjectionLayer(l),n.updateRenderState({layers:[A]}),v=new WebGLRenderTarget(A.textureWidth,A.textureHeight,{format:J,type:W,depthTexture:new DepthTexture(A.textureWidth,A.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:g.antialias?4:0});e.properties.get(v).__ignoreDepthValues=A.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await n.requestReferenceSpace(o),F.setContext(n),F.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const T=new Vector3,B=new Vector3;function updateCamera(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===n)return;C.near=x.near=_.near=e.near,C.far=x.far=_.far=e.far,b===C.near&&I===C.far||(n.updateRenderState({depthNear:C.near,depthFar:C.far}),b=C.near,I=C.far);const t=e.parent,i=C.cameras;updateCamera(C,t);for(let e=0;e0&&(i.alphaTest.value=n.alphaTest);const r=t.get(n).envMap;if(r&&(i.envMap.value=r,i.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,i.reflectivity.value=n.reflectivity,i.ior.value=n.ior,i.refractionRatio.value=n.refractionRatio),n.lightMap){i.lightMap.value=n.lightMap;const t=!0===e.useLegacyLights?Math.PI:1;i.lightMapIntensity.value=n.lightMapIntensity*t,refreshTransformUniform(n.lightMap,i.lightMapTransform)}n.aoMap&&(i.aoMap.value=n.aoMap,i.aoMapIntensity.value=n.aoMapIntensity,refreshTransformUniform(n.aoMap,i.aoMapTransform))}return{refreshFogUniforms:function refreshFogUniforms(t,i){i.color.getRGB(t.fogColor.value,getUnlitUniformColorSpace(e)),i.isFog?(t.fogNear.value=i.near,t.fogFar.value=i.far):i.isFogExp2&&(t.fogDensity.value=i.density)},refreshMaterialUniforms:function refreshMaterialUniforms(e,i,n,r,a){i.isMeshBasicMaterial||i.isMeshLambertMaterial?refreshUniformsCommon(e,i):i.isMeshToonMaterial?(refreshUniformsCommon(e,i),function refreshUniformsToon(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(refreshUniformsCommon(e,i),function refreshUniformsPhong(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(refreshUniformsCommon(e,i),function refreshUniformsStandard(e,i){e.metalness.value=i.metalness,i.metalnessMap&&(e.metalnessMap.value=i.metalnessMap,refreshTransformUniform(i.metalnessMap,e.metalnessMapTransform));e.roughness.value=i.roughness,i.roughnessMap&&(e.roughnessMap.value=i.roughnessMap,refreshTransformUniform(i.roughnessMap,e.roughnessMapTransform));const n=t.get(i).envMap;n&&(e.envMapIntensity.value=i.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function refreshUniformsPhysical(e,t,i){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,refreshTransformUniform(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,refreshTransformUniform(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,refreshTransformUniform(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,refreshTransformUniform(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,refreshTransformUniform(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===o&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,refreshTransformUniform(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,refreshTransformUniform(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=i.texture,e.transmissionSamplerSize.value.set(i.width,i.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,refreshTransformUniform(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,refreshTransformUniform(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,refreshTransformUniform(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,refreshTransformUniform(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,refreshTransformUniform(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,a)):i.isMeshMatcapMaterial?(refreshUniformsCommon(e,i),function refreshUniformsMatcap(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?refreshUniformsCommon(e,i):i.isMeshDistanceMaterial?(refreshUniformsCommon(e,i),function refreshUniformsDistance(e,i){const n=t.get(i).light;e.referencePosition.value.setFromMatrixPosition(n.matrixWorld),e.nearDistance.value=n.shadow.camera.near,e.farDistance.value=n.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?refreshUniformsCommon(e,i):i.isLineBasicMaterial?(!function refreshUniformsLine(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function refreshUniformsDash(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function refreshUniformsPoints(e,t,i,n){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*i,e.scale.value=.5*n,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,n,r):i.isSpriteMaterial?function refreshUniformsSprites(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,refreshTransformUniform(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,refreshTransformUniform(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function WebGLUniformsGroups(e,t,i,n){let r={},a={},o=[];const l=i.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function hasUniformChanged(e,t,i){const n=e.value;if(void 0===i[t]){if("number"==typeof n)i[t]=n;else{const e=Array.isArray(n)?n:[n],r=[];for(let t=0;t0){r=i%n;0!==r&&n-r-o.boundary<0&&(i+=n-r,a.__offset=i)}i+=o.storage}r=i%n,r>0&&(i+=n-r);return e.__size=i,e.__cache={},this}(i),h=function createBuffer(t){const i=function allocateBindingPointIndex(){for(let e=0;e0),A=!!i.morphAttributes.position,m=!!i.morphAttributes.normal,g=!!i.morphAttributes.color,f=n.toneMapped?b.toneMapping:p,v=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,E=void 0!==v?v.length:0,y=Ce.get(n),_=x.state.lights;if(!0===Ae&&(!0===pe||e!==O)){const t=e===O&&n.id===F;Ne.setState(n,e,t)}let S=!1;n.version===y.__version?y.needsLights&&y.lightsStateVersion!==_.state.version||y.outputColorSpace!==l||r.isInstancedMesh&&!1===y.instancing?S=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&!1===y.skinning?S=!0:r.isSkinnedMesh||!0!==y.skinning?y.envMap!==c||!0===n.fog&&y.fog!==a?S=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===Ne.numPlanes&&y.numIntersection===Ne.numIntersection?(y.vertexAlphas!==h||y.vertexTangents!==d||y.morphTargets!==A||y.morphNormals!==m||y.morphColors!==g||y.toneMapping!==f||!0===_e.isWebGL2&&y.morphTargetsCount!==E)&&(S=!0):S=!0:S=!0:S=!0:(S=!0,y.__version=n.version);let C=y.currentProgram;!0===S&&(C=getProgram(n,t,r));let I=!1,T=!1,B=!1;const G=C.getUniforms(),W=y.uniforms;xe.useProgram(C.program)&&(I=!0,T=!0,B=!0);n.id!==F&&(F=n.id,T=!0);if(I||O!==e){if(G.setValue(qe,"projectionMatrix",e.projectionMatrix),_e.logarithmicDepthBuffer&&G.setValue(qe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),O!==e&&(O=e,T=!0,B=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=G.map.cameraPosition;void 0!==t&&t.setValue(qe,ve.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&G.setValue(qe,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&G.setValue(qe,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){G.setOptional(qe,r,"bindMatrix"),G.setOptional(qe,r,"bindMatrixInverse");const e=r.skeleton;e&&(_e.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),G.setValue(qe,"boneTexture",e.boneTexture,Ie),G.setValue(qe,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const q=i.morphAttributes;(void 0!==q.position||void 0!==q.normal||void 0!==q.color&&!0===_e.isWebGL2)&&ke.update(r,i,C);(T||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,G.setValue(qe,"receiveShadow",r.receiveShadow));n.isMeshGouraudMaterial&&null!==n.envMap&&(W.envMap.value=c,W.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1);T&&(G.setValue(qe,"toneMappingExposure",b.toneMappingExposure),y.needsLights&&function markUniformsLightsNeedsUpdate(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(W,B),a&&!0===n.fog&&Ue.refreshFogUniforms(W,a),Ue.refreshMaterialUniforms(W,n,ae,se,me),WebGLUniforms.upload(qe,y.uniformsList,W,Ie));n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(WebGLUniforms.upload(qe,y.uniformsList,W,Ie),n.uniformsNeedUpdate=!1);n.isSpriteMaterial&&G.setValue(qe,"center",r.center);if(G.setValue(qe,"modelViewMatrix",r.modelViewMatrix),G.setValue(qe,"normalMatrix",r.normalMatrix),G.setValue(qe,"modelMatrix",r.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const e=n.uniformsGroups;for(let t=0,i=e.length;t0&&function renderTransmissionPass(e,t,i,n){const r=_e.isWebGL2;null===me&&(me=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:ye.has("EXT_color_buffer_half_float")?K:W,minFilter:G,samples:r?4:0}));b.getDrawingBufferSize(fe),r?me.setSize(fe.x,fe.y):me.setSize(floorPowerOfTwo(fe.x),floorPowerOfTwo(fe.y));const a=b.getRenderTarget();b.setRenderTarget(me),b.getClearColor(ie),ne=b.getClearAlpha(),ne<1&&b.setClearColor(16777215,.5);b.clear();const c=b.toneMapping;b.toneMapping=p,renderObjects(e,i,n),Ie.updateMultisampleRenderTarget(me),Ie.updateRenderTargetMipmap(me);let h=!1;for(let e=0,r=t.length;e0&&renderObjects(r,t,i),a.length>0&&renderObjects(a,t,i),c.length>0&&renderObjects(c,t,i),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function renderObjects(e,t,i){const n=!0===t.isScene?t.overrideMaterial:null;for(let r=0,a=e.length;r0?C[C.length-1]:null,S.pop(),_=S.length>0?S[S.length-1]:null},this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return B},this.getRenderTarget=function(){return U},this.setRenderTargetTextures=function(e,t,i){Ce.get(e.texture).__webglTexture=t,Ce.get(e.depthTexture).__webglTexture=i;const n=Ce.get(e);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===i,n.__autoAllocateDepthBuffer||!0===ye.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const i=Ce.get(e);i.__webglFramebuffer=t,i.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,i=0){U=e,T=t,B=i;let n=!0,r=null,a=!1,o=!1;if(e){const i=Ce.get(e);void 0!==i.__useDefaultFramebuffer?(xe.bindFramebuffer(qe.FRAMEBUFFER,null),n=!1):void 0===i.__webglFramebuffer?Ie.setupRenderTarget(e):i.__hasExternalTextures&&Ie.rebindTextures(e,Ce.get(e.texture).__webglTexture,Ce.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const c=Ce.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=c[t],a=!0):r=_e.isWebGL2&&e.samples>0&&!1===Ie.useMultisampledRTT(e)?Ce.get(e).__webglMultisampledFramebuffer:c,X.copy(e.viewport),ee.copy(e.scissor),te=e.scissorTest}else X.copy(ce).multiplyScalar(ae).floor(),ee.copy(he).multiplyScalar(ae).floor(),te=ue;if(xe.bindFramebuffer(qe.FRAMEBUFFER,r)&&_e.drawBuffers&&n&&xe.drawBuffers(e,r),xe.viewport(X),xe.scissor(ee),xe.setScissorTest(te),a){const n=Ce.get(e.texture);qe.framebufferTexture2D(qe.FRAMEBUFFER,qe.COLOR_ATTACHMENT0,qe.TEXTURE_CUBE_MAP_POSITIVE_X+t,n.__webglTexture,i)}else if(o){const n=Ce.get(e.texture),r=t||0;qe.framebufferTextureLayer(qe.FRAMEBUFFER,qe.COLOR_ATTACHMENT0,n.__webglTexture,i||0,r)}F=-1},this.readRenderTargetPixels=function(e,t,i,n,r,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let l=Ce.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(l=l[o]),l){xe.bindFramebuffer(qe.FRAMEBUFFER,l);try{const o=e.texture,l=o.format,c=o.type;if(l!==J&&He.convert(l)!==qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const h=c===K&&(ye.has("EXT_color_buffer_half_float")||_e.isWebGL2&&ye.has("EXT_color_buffer_float"));if(!(c===W||He.convert(c)===qe.getParameter(qe.IMPLEMENTATION_COLOR_READ_TYPE)||c===Y&&(_e.isWebGL2||ye.has("OES_texture_float")||ye.has("WEBGL_color_buffer_float"))||h))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-n&&i>=0&&i<=e.height-r&&qe.readPixels(t,i,n,r,He.convert(l),He.convert(c),a)}finally{const e=null!==U?Ce.get(U).__webglFramebuffer:null;xe.bindFramebuffer(qe.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,i=0){const n=Math.pow(2,-i),r=Math.floor(t.image.width*n),a=Math.floor(t.image.height*n);Ie.setTexture2D(t,0),qe.copyTexSubImage2D(qe.TEXTURE_2D,i,0,0,e.x,e.y,r,a),xe.unbindTexture()},this.copyTextureToTexture=function(e,t,i,n=0){const r=t.image.width,a=t.image.height,o=He.convert(i.format),l=He.convert(i.type);Ie.setTexture2D(i,0),qe.pixelStorei(qe.UNPACK_FLIP_Y_WEBGL,i.flipY),qe.pixelStorei(qe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),qe.pixelStorei(qe.UNPACK_ALIGNMENT,i.unpackAlignment),t.isDataTexture?qe.texSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,r,a,o,l,t.image.data):t.isCompressedTexture?qe.compressedTexSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):qe.texSubImage2D(qe.TEXTURE_2D,n,e.x,e.y,o,l,t.image),0===n&&i.generateMipmaps&&qe.generateMipmap(qe.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i,n,r=0){if(b.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,l=e.max.z-e.min.z+1,c=He.convert(n.format),h=He.convert(n.type);let d;if(n.isData3DTexture)Ie.setTexture3D(n,0),d=qe.TEXTURE_3D;else{if(!n.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Ie.setTexture2DArray(n,0),d=qe.TEXTURE_2D_ARRAY}qe.pixelStorei(qe.UNPACK_FLIP_Y_WEBGL,n.flipY),qe.pixelStorei(qe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),qe.pixelStorei(qe.UNPACK_ALIGNMENT,n.unpackAlignment);const A=qe.getParameter(qe.UNPACK_ROW_LENGTH),p=qe.getParameter(qe.UNPACK_IMAGE_HEIGHT),m=qe.getParameter(qe.UNPACK_SKIP_PIXELS),g=qe.getParameter(qe.UNPACK_SKIP_ROWS),f=qe.getParameter(qe.UNPACK_SKIP_IMAGES),v=i.isCompressedTexture?i.mipmaps[0]:i.image;qe.pixelStorei(qe.UNPACK_ROW_LENGTH,v.width),qe.pixelStorei(qe.UNPACK_IMAGE_HEIGHT,v.height),qe.pixelStorei(qe.UNPACK_SKIP_PIXELS,e.min.x),qe.pixelStorei(qe.UNPACK_SKIP_ROWS,e.min.y),qe.pixelStorei(qe.UNPACK_SKIP_IMAGES,e.min.z),i.isDataTexture||i.isData3DTexture?qe.texSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,h,v.data):i.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),qe.compressedTexSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,v.data)):qe.texSubImage3D(d,r,t.x,t.y,t.z,a,o,l,c,h,v),qe.pixelStorei(qe.UNPACK_ROW_LENGTH,A),qe.pixelStorei(qe.UNPACK_IMAGE_HEIGHT,p),qe.pixelStorei(qe.UNPACK_SKIP_PIXELS,m),qe.pixelStorei(qe.UNPACK_SKIP_ROWS,g),qe.pixelStorei(qe.UNPACK_SKIP_IMAGES,f),0===r&&n.generateMipmaps&&qe.generateMipmap(d),xe.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Ie.setTextureCube(e,0):e.isData3DTexture?Ie.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Ie.setTexture2DArray(e,0):Ie.setTexture2D(e,0),xe.unbindTexture()},this.resetState=function(){T=0,B=0,U=null,xe.reset(),ze.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Le}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Me?Se:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Se?Me:be}}(class WebGL1Renderer extends WebGLRenderer{}).prototype.isWebGL1Renderer=!0;class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class InterleavedBuffer{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Te,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,r=this.stride;nl)continue;A.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(A);ae.far||t.push({distance:a,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,a.start),n=Math.min(g.count,a.start+a.count)-1;il)continue;A.applyMatrix4(this.matrixWorld);const n=e.ray.origin.distanceTo(A);ne.far||t.push({distance:n,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;er.far)return;a.push({distance:c,distanceToRay:Math.sqrt(l),point:i,index:t,face:null,object:o})}}class VideoTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c){super(e,t,i,n,r,a,o,l,c),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:F,this.magFilter=void 0!==r?r:F,this.generateMipmaps=!1;const h=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function updateVideo(){h.needsUpdate=!0,e.requestVideoFrameCallback(updateVideo)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class CompressedTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c,h,d,A){super(null,a,o,l,c,h,n,r,d,A),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CompressedArrayTexture extends CompressedTexture{constructor(e,t,i,n,r,a){super(e,t,i,r,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=b}}class CanvasTexture extends Texture$1{constructor(e,t,i,n,r,a,o,l,c){super(e,t,i,n,r,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class MeshStandardMaterial extends Material$1{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Color(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Vector2(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return clamp$1(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Color(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Color(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Color(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}function arraySlice(e,t,i){return isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)}function convertArray(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function isTypedArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function getKeyframeOrder(e){const t=e.length,i=new Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort((function compareTime(t,i){return e[t]-e[i]})),i}function sortedArray(e,t,i){const n=e.length,r=new e.constructor(n);for(let a=0,o=0;o!==n;++a){const n=i[a]*t;for(let i=0;i!==t;++i)r[o++]=e[n+i]}return r}function flattenJSON(e,t,i,n){let r=1,a=e[0];for(;void 0!==a&&void 0===a[n];)a=e[r++];if(void 0===a)return;let o=a[n];if(void 0!==o)if(Array.isArray(o))do{o=a[n],void 0!==o&&(t.push(a.time),i.push.apply(i,o)),a=e[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[n],void 0!==o&&(t.push(a.time),o.toArray(i,i.length)),a=e[r++]}while(void 0!==a);else do{o=a[n],void 0!==o&&(t.push(a.time),i.push(o)),a=e[r++]}while(void 0!==a)}class Interpolant{constructor(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,n=t[i],r=t[i-1];e:{t:{let a;i:{n:if(!(e=r)break e;{const o=t[1];e=r)break t}a=i,i=0}}for(;i>>1;et;)--a;if(++a,0!==r||a!==n){r>=a&&(a=Math.max(a,1),r=a-1);const e=this.getValueSize();this.times=arraySlice(i,r,a),this.values=arraySlice(this.values,r*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==r;t++){const n=i[t];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==a&&a>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,n,a),e=!1;break}a=n}if(void 0!==n&&isTypedArray(n))for(let t=0,i=n.length;t!==i;++t){const i=n[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){const e=arraySlice(this.times),t=arraySlice(this.values),i=this.getValueSize(),n=this.getInterpolation()===ve,r=e.length-1;let a=1;for(let o=1;o0){e[a]=e[r];for(let e=r*i,n=a*i,o=0;o!==i;++o)t[n+o]=t[e+o];++a}return a!==e.length?(this.times=arraySlice(e,0,a),this.values=arraySlice(t,0,a*i)):(this.times=e,this.values=t),this}clone(){const e=arraySlice(this.times,0),t=arraySlice(this.values,0),i=new(0,this.constructor)(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=fe;class BooleanKeyframeTrack extends KeyframeTrack{}BooleanKeyframeTrack.prototype.ValueTypeName="bool",BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=ge,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){const r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(i-t)/(n-t);let c=e*o;for(let e=c+o;c!==e;c+=4)Quaternion.slerpFlat(r,0,a,c-o,a,c,l);return r}}class QuaternionKeyframeTrack extends KeyframeTrack{InterpolantFactoryMethodLinear(e){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),e)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion",QuaternionKeyframeTrack.prototype.DefaultInterpolation=fe,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{}StringKeyframeTrack.prototype.ValueTypeName="string",StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=ge,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(e,t=-1,i,n=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=generateUUID(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,n=1/(e.fps||1);for(let e=0,r=i.length;e!==r;++e)t.push(parseKeyframeTrack(i[e]).scale(n));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,n=i.length;e!==n;++e)t.push(KeyframeTrack.toJSON(i[e]));return n}static CreateFromMorphTargetSequence(e,t,i,n){const r=t.length,a=[];for(let e=0;e1){const e=a[1];let t=n[e];t||(n[e]=t=[]),t.push(i)}}const a=[];for(const e in n)a.push(this.CreateFromMorphTargetSequence(e,n[e],t,i));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const addNonemptyTrack=function(e,t,i,n,r){if(0!==i.length){const a=[],o=[];flattenJSON(i,a,o,n),0!==a.length&&r.push(new e(t,a,o))}},i=[],n=e.name||"default",r=e.fps||30,a=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let e=0;e{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==Jn[e])return void Jn[e].push({onLoad:t,onProgress:i,onError:n});Jn[e]=[],Jn[e].push({onLoad:t,onProgress:i,onError:n});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const i=Jn[e],n=t.body.getReader(),r=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=r?parseInt(r):0,o=0!==a;let l=0;const c=new ReadableStream({start(e){!function readData(){n.read().then((({done:t,value:n})=>{if(t)e.close();else{l+=n.byteLength;const t=new ProgressEvent("progress",{lengthComputable:o,loaded:l,total:a});for(let e=0,n=i.length;e{switch(l){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,o)));case"json":return e.json();default:if(void 0===o)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(o),i=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(i);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{Kn.add(e,t);const i=Jn[e];delete Jn[e];for(let e=0,n=i.length;e{const i=Jn[e];if(void 0===i)throw this.manager.itemError(e),t;delete Jn[e];for(let e=0,n=i.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ImageLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,a=Kn.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout((function(){t&&t(a),r.manager.itemEnd(e)}),0),a;const o=createElementNS("img");function onImageLoad(){removeEventListeners(),Kn.add(e,this),t&&t(this),r.manager.itemEnd(e)}function onImageError(t){removeEventListeners(),n&&n(t),r.manager.itemError(e),r.manager.itemEnd(e)}function removeEventListeners(){o.removeEventListener("load",onImageLoad,!1),o.removeEventListener("error",onImageError,!1)}return o.addEventListener("load",onImageLoad,!1),o.addEventListener("error",onImageError,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o}}class DataTextureLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){const r=this,a=new DataTexture,o=new FileLoader(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(r.withCredentials),o.load(e,(function(e){const i=r.parse(e);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:b,a.wrapT=void 0!==i.wrapT?i.wrapT:b,a.magFilter=void 0!==i.magFilter?i.magFilter:F,a.minFilter=void 0!==i.minFilter?i.minFilter:F,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.colorSpace?a.colorSpace=i.colorSpace:void 0!==i.encoding&&(a.encoding=i.encoding),void 0!==i.flipY&&(a.flipY=i.flipY),void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps,a.minFilter=G),1===i.mipmapCount&&(a.minFilter=F),void 0!==i.generateMipmaps&&(a.generateMipmaps=i.generateMipmaps),a.needsUpdate=!0,t&&t(a,i))}),i,n),a}}class TextureLoader extends Loader{constructor(e){super(e)}load(e,t,i,n){const r=new Texture$1,a=new ImageLoader(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)}),i,n),r}}class Light extends Object3D{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Color(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const Zn=new Matrix4,er=new Vector3,tr=new Vector3;class LightShadow{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Vector2(512,512),this.map=null,this.mapPass=null,this.matrix=new Matrix4,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Frustum,this._frameExtents=new Vector2(1,1),this._viewportCount=1,this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;er.setFromMatrixPosition(e.matrixWorld),t.position.copy(er),tr.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(tr),t.updateMatrixWorld(),Zn.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zn),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Zn)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=2*Ne*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;i===t.fov&&n===t.aspect&&r===t.far||(t.fov=i,t.aspect=n,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class SpotLight extends Light{constructor(e,t,i=0,n=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.distance=i,this.angle=n,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const ir=new Matrix4,nr=new Vector3,rr=new Vector3;class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Vector2(4,2),this._viewportCount=6,this._viewports=[new Vector4(2,1,1,1),new Vector4(0,1,1,1),new Vector4(3,1,1,1),new Vector4(1,1,1,1),new Vector4(3,0,1,1),new Vector4(1,0,1,1)],this._cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,1,0),new Vector3(0,-1,0)],this._cubeUps=[new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,0,1),new Vector3(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,n=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),nr.setFromMatrixPosition(e.matrixWorld),i.position.copy(nr),rr.copy(i.position),rr.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(rr),i.updateMatrixWorld(),n.makeTranslation(-nr.x,-nr.y,-nr.z),ir.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ir)}}class PointLight extends Light{constructor(e,t,i=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new PointLightShadow}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class DirectionalLight extends Light{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Object3D.DEFAULT_UP),this.updateMatrix(),this.target=new Object3D,this.shadow=new DirectionalLightShadow}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Vector3)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*n),t.addScaledVector(a[2],.488603*r),t.addScaledVector(a[3],.488603*i),t.addScaledVector(a[4],i*n*1.092548),t.addScaledVector(a[5],n*r*1.092548),t.addScaledVector(a[6],.315392*(3*r*r-1)),t.addScaledVector(a[7],i*r*1.092548),t.addScaledVector(a[8],.546274*(i*i-n*n)),t}getIrradianceAt(e,t){const i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*n),t.addScaledVector(a[2],1.023328*r),t.addScaledVector(a[3],1.023328*i),t.addScaledVector(a[4],.858086*i*n),t.addScaledVector(a[5],.858086*n*r),t.addScaledVector(a[6],.743125*r*r-.247708),t.addScaledVector(a[7],.858086*i*r),t.addScaledVector(a[8],.429043*(i*i-n*n)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].fromArray(e,t+3*n);return this}toArray(e=[],t=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].toArray(e,t+3*n);return e}static getBasisAt(e,t){const i=e.x,n=e.y,r=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*r,t[3]=.488603*i,t[4]=1.092548*i*n,t[5]=1.092548*n*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*i*r,t[8]=.546274*(i*i-n*n)}}class LightProbe extends Light{constructor(e=new SphericalHarmonics3,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class LoaderUtils{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let i=0,n=e.length;i0&&this._mixBufferRegionAdditive(i,n,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(i[e]!==i[e+t]){o.setValue(i,n);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,n=i*this._origIndex;e.getValue(t,n);for(let e=i,r=n;e!==r;++e)t[e]=t[n+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let n=0;n!==r;++n)e[t+n]=e[i+n]}_slerp(e,t,i,n){Quaternion.slerpFlat(e,t,e,t,e,i,n)}_slerpAdditive(e,t,i,n,r){const a=this._workIndex*r;Quaternion.multiplyQuaternionsFlat(e,a,e,t,e,i),Quaternion.slerpFlat(e,t,e,t,e,a,n)}_lerp(e,t,i,n,r){const a=1-n;for(let o=0;o!==r;++o){const r=t+o;e[r]=e[r]*a+e[i+o]*n}}_lerpAdditive(e,t,i,n,r){for(let a=0;a!==r;++a){const r=t+a;e[r]=e[r]+e[i+a]*n}}}const sr="\\[\\]\\.:\\/",ar=new RegExp("["+sr+"]","g"),or="[^"+sr+"]",lr="[^"+sr.replace("\\.","")+"]",cr=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",or)+/(WCOD+)?/.source.replace("WCOD",lr)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",or)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",or)+"$"),hr=["material","materials","bones","map"];class PropertyBinding{constructor(e,t,i){this.path=t,this.parsedPath=i||PropertyBinding.parseTrackName(t),this.node=PropertyBinding.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new PropertyBinding.Composite(e,t,i):new PropertyBinding(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ar,"")}static parseTrackName(e){const t=cr.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const e=i.nodeName.substring(n+1);-1!==hr.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){const searchNodeSubtree=function(e){for(let i=0;i0){const e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(a),t[i].accumulateAdditive(o);else for(let i=0,r=e.length;i!==r;++i)e[i].evaluate(a),t[i].accumulate(n,o)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(null!==i){t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let n=this.time+e,r=this._loopCount;const a=i===me;if(0===e)return-1===r?n:a&&1==(1&r)?t-n:n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=t)n=t;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=t||n<0){const i=Math.floor(n/t);n-=t*i,r+=Math.abs(i);const o=this.repetitions-r;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===o){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(a&&1==(1&r))return t-n}return n}_setEndings(e,t,i){const n=this._interpolantSettings;i?(n.endingStart=ye,n.endingEnd=ye):(n.endingStart=e?this.zeroSlopeAtStart?ye:Ee:_e,n.endingEnd=t?this.zeroSlopeAtEnd?ye:Ee:_e)}_scheduleFading(e,t,i){const n=this._mixer,r=n.time;let a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=r,l[0]=t,o[1]=r+e,l[1]=i,this}}const ur=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,a=e._propertyBindings,o=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let h=c[l];void 0===h&&(h={},c[l]=h);for(let e=0;e!==r;++e){const r=n[e],c=r.name;let d=h[c];if(void 0!==d)++d.referenceCount,a[e]=d;else{if(d=a[e],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,l,c));continue}const n=t&&t._propertyBindings[e].binding.parsedPath;d=new PropertyMixer(PropertyBinding.create(i,c,n),r.ValueTypeName,r.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,c),a[e]=d}o[e].resultBuffer=d.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,n=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==i;++o){t[o]._update(n,e,r,a)}const o=this._bindings,l=this._nActiveBindings;for(let e=0;e!==l;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e{var e;return null===(e=i.webAnimation)||void 0===e?void 0:e.pause()}))}play(){this.clients.forEach((i=>{var e;return null===(e=i.webAnimation)||void 0===e?void 0:e.play()}))}cancel(){this.clients.forEach((i=>{var e;return null===(e=i.webAnimation)||void 0===e?void 0:e.cancel()})),this.clients.clear()}finish(){this.clients.forEach((i=>{var e;return null===(e=i.webAnimation)||void 0===e?void 0:e.finish()})),this.clients.clear()}togglePlay(){this.isPlaying?this.pause():this.play()}get isAnimating(){return this.clients.size>0}get isPlaying(){return Array.from(this.clients).some((i=>{var e;return"running"===(null===(e=i.webAnimation)||void 0===e?void 0:e.playState)}))}async finished(){await Promise.all(Array.from(this.clients).map((i=>i.finished)))}}export{t as AnimateController,i as controllerMap}; \ No newline at end of file +const i=new WeakMap;class t{constructor(s,e){this.startPaused=!1,this.disabled=!1,this.clients=new Set,this.pendingComplete=!1,this.host=s,this.defaultOptions=e.defaultOptions||{},this.startPaused=!!e.startPaused,this.disabled=!!e.disabled,this.onComplete=e.onComplete,i.set(this.host,this)}async add(i){this.clients.add(i),this.startPaused&&i.webAnimation?.pause(),this.pendingComplete=!0,await i.finished,this.pendingComplete&&!this.isAnimating&&(this.pendingComplete=!1,this.onComplete?.())}remove(i){this.clients.delete(i)}pause(){this.clients.forEach((i=>i.webAnimation?.pause()))}play(){this.clients.forEach((i=>i.webAnimation?.play()))}cancel(){this.clients.forEach((i=>i.webAnimation?.cancel())),this.clients.clear()}finish(){this.clients.forEach((i=>i.webAnimation?.finish())),this.clients.clear()}togglePlay(){this.isPlaying?this.pause():this.play()}get isAnimating(){return this.clients.size>0}get isPlaying(){return Array.from(this.clients).some((i=>"running"===i.webAnimation?.playState))}async finished(){await Promise.all(Array.from(this.clients).map((i=>i.finished)))}}export{t as AnimateController,i as controllerMap}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map b/cdn/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map index 829b8eac16..8638937702 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map +++ b/cdn/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map @@ -1 +1 @@ -{"version":3,"file":"animate-controller.js","sources":["src/animate-controller.ts"],"sourcesContent":["import {ReactiveControllerHost} from 'lit';\nimport {Animate, Options} from './animate.js';\n\nexport const controllerMap: WeakMap =\n new WeakMap();\n\n/**\n * AnimateController can be used to provide default configuration options to all\n * `animate()` directives in a given component.\n *\n * It also provides control over all the `animate()` animations within a given\n * component, for example, `this.animateController.pause()` pauses all animations.\n */\nexport class AnimateController {\n host: ReactiveControllerHost;\n defaultOptions: Options;\n startPaused = false;\n disabled = false;\n onComplete?: () => void;\n\n constructor(\n host: ReactiveControllerHost,\n options: {\n defaultOptions?: Options;\n startPaused?: boolean;\n disabled?: boolean;\n onComplete?: () => void;\n }\n ) {\n this.host = host;\n this.defaultOptions = options.defaultOptions || {};\n this.startPaused = !!options.startPaused;\n this.disabled = !!options.disabled;\n this.onComplete = options.onComplete;\n controllerMap.set(this.host, this);\n }\n\n /**\n * Set of active `animate()` directives in the host component\n */\n clients: Set = new Set();\n\n protected pendingComplete = false;\n\n async add(animate: Animate) {\n this.clients.add(animate);\n if (this.startPaused) {\n animate.webAnimation?.pause();\n }\n this.pendingComplete = true;\n await animate.finished;\n if (this.pendingComplete && !this.isAnimating) {\n this.pendingComplete = false;\n this.onComplete?.();\n }\n }\n\n remove(animate: Animate) {\n this.clients.delete(animate);\n }\n\n /**\n * Pauses all animations running in the host component.\n */\n pause() {\n this.clients.forEach((f) => f.webAnimation?.pause());\n }\n\n /**\n * Plays all active animations in the host component.\n */\n play() {\n this.clients.forEach((f) => f.webAnimation?.play());\n }\n\n cancel() {\n this.clients.forEach((f) => f.webAnimation?.cancel());\n this.clients.clear();\n }\n\n finish() {\n this.clients.forEach((f) => f.webAnimation?.finish());\n this.clients.clear();\n }\n\n /**\n * Toggles the play/pause state of all active `animate()` animations in the host component.\n */\n togglePlay() {\n if (this.isPlaying) {\n this.pause();\n } else {\n this.play();\n }\n }\n\n /**\n * Returns true if the host component has any active `animate()` animations.\n */\n get isAnimating() {\n return this.clients.size > 0;\n }\n\n /**\n * Returns true if the host component has any playing `animate()` animations.\n */\n get isPlaying() {\n return Array.from(this.clients).some(\n (a) => a.webAnimation?.playState === 'running'\n );\n }\n\n async finished() {\n await Promise.all(Array.from(this.clients).map((f) => f.finished));\n }\n}\n"],"names":["controllerMap","WeakMap","AnimateController","constructor","host","options","this","startPaused","disabled","clients","Set","pendingComplete","defaultOptions","onComplete","set","async","animate","add","_a","webAnimation","pause","finished","isAnimating","_b","call","remove","delete","forEach","f","play","cancel","clear","finish","togglePlay","isPlaying","size","Array","from","some","a","playState","Promise","all","map"],"mappings":"AAGa,MAAAA,EACX,IAAIC,cASOC,EAOXC,YACEC,EACAC,GANFC,KAAWC,aAAG,EACdD,KAAQE,UAAG,EAuBXF,KAAAG,QAAwB,IAAIC,IAElBJ,KAAeK,iBAAG,EAb1BL,KAAKF,KAAOA,EACZE,KAAKM,eAAiBP,EAAQO,gBAAkB,CAAA,EAChDN,KAAKC,cAAgBF,EAAQE,YAC7BD,KAAKE,WAAaH,EAAQG,SAC1BF,KAAKO,WAAaR,EAAQQ,WAC1Bb,EAAcc,IAAIR,KAAKF,KAAME,KAC9B,CASDS,UAAUC,WACRV,KAAKG,QAAQQ,IAAID,GACbV,KAAKC,cACe,QAAtBW,EAAAF,EAAQG,oBAAc,IAAAD,GAAAA,EAAAE,SAExBd,KAAKK,iBAAkB,QACjBK,EAAQK,SACVf,KAAKK,kBAAoBL,KAAKgB,cAChChB,KAAKK,iBAAkB,EACR,QAAfY,EAAAjB,KAAKO,kBAAU,IAAAU,GAAAA,EAAAC,KAAAlB,MAElB,CAEDmB,OAAOT,GACLV,KAAKG,QAAQiB,OAAOV,EACrB,CAKDI,QACEd,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEE,OAAO,GACpD,CAKDS,OACEvB,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEW,MAAM,GACnD,CAEDC,SACExB,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEY,QAAQ,IACpDxB,KAAKG,QAAQsB,OACd,CAEDC,SACE1B,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEc,QAAQ,IACpD1B,KAAKG,QAAQsB,OACd,CAKDE,aACM3B,KAAK4B,UACP5B,KAAKc,QAELd,KAAKuB,MAER,CAKGP,kBACF,OAAOhB,KAAKG,QAAQ0B,KAAO,CAC5B,CAKGD,gBACF,OAAOE,MAAMC,KAAK/B,KAAKG,SAAS6B,MAC7BC,IAAK,IAAArB,EAAC,MAA8B,aAAd,QAAhBA,EAAAqB,EAAEpB,oBAAc,IAAAD,OAAA,EAAAA,EAAAsB,UAAuB,GAEjD,CAEDzB,uBACQ0B,QAAQC,IAAIN,MAAMC,KAAK/B,KAAKG,SAASkC,KAAKf,GAAMA,EAAEP,WACzD"} \ No newline at end of file +{"version":3,"file":"animate-controller.js","sources":["src/animate-controller.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {ReactiveControllerHost} from 'lit';\nimport {Animate, Options} from './animate.js';\n\nexport const controllerMap = new WeakMap<\n ReactiveControllerHost,\n AnimateController\n>();\n\n/**\n * AnimateController can be used to provide default configuration options to all\n * `animate()` directives in a given component.\n *\n * It also provides control over all the `animate()` animations within a given\n * component, for example, `this.animateController.pause()` pauses all animations.\n */\nexport class AnimateController {\n host: ReactiveControllerHost;\n defaultOptions: Options;\n startPaused = false;\n disabled = false;\n onComplete?: () => void;\n\n constructor(\n host: ReactiveControllerHost,\n options: {\n defaultOptions?: Options;\n startPaused?: boolean;\n disabled?: boolean;\n onComplete?: () => void;\n }\n ) {\n this.host = host;\n this.defaultOptions = options.defaultOptions || {};\n this.startPaused = !!options.startPaused;\n this.disabled = !!options.disabled;\n this.onComplete = options.onComplete;\n controllerMap.set(this.host, this);\n }\n\n /**\n * Set of active `animate()` directives in the host component\n */\n clients = new Set();\n\n protected pendingComplete = false;\n\n async add(animate: Animate) {\n this.clients.add(animate);\n if (this.startPaused) {\n animate.webAnimation?.pause();\n }\n this.pendingComplete = true;\n await animate.finished;\n if (this.pendingComplete && !this.isAnimating) {\n this.pendingComplete = false;\n this.onComplete?.();\n }\n }\n\n remove(animate: Animate) {\n this.clients.delete(animate);\n }\n\n /**\n * Pauses all animations running in the host component.\n */\n pause() {\n this.clients.forEach((f) => f.webAnimation?.pause());\n }\n\n /**\n * Plays all active animations in the host component.\n */\n play() {\n this.clients.forEach((f) => f.webAnimation?.play());\n }\n\n cancel() {\n this.clients.forEach((f) => f.webAnimation?.cancel());\n this.clients.clear();\n }\n\n finish() {\n this.clients.forEach((f) => f.webAnimation?.finish());\n this.clients.clear();\n }\n\n /**\n * Toggles the play/pause state of all active `animate()` animations in the host component.\n */\n togglePlay() {\n if (this.isPlaying) {\n this.pause();\n } else {\n this.play();\n }\n }\n\n /**\n * Returns true if the host component has any active `animate()` animations.\n */\n get isAnimating() {\n return this.clients.size > 0;\n }\n\n /**\n * Returns true if the host component has any playing `animate()` animations.\n */\n get isPlaying() {\n return Array.from(this.clients).some(\n (a) => a.webAnimation?.playState === 'running'\n );\n }\n\n async finished() {\n await Promise.all(Array.from(this.clients).map((f) => f.finished));\n }\n}\n"],"names":["controllerMap","WeakMap","AnimateController","constructor","host","options","this","startPaused","disabled","clients","Set","pendingComplete","defaultOptions","onComplete","set","add","animate","webAnimation","pause","finished","isAnimating","remove","delete","forEach","f","play","cancel","clear","finish","togglePlay","isPlaying","size","Array","from","some","a","playState","Promise","all","map"],"mappings":"AAQa,MAAAA,EAAgB,IAAIC,cAYpBC,EAOX,WAAAC,CACEC,EACAC,GANFC,KAAWC,aAAG,EACdD,KAAQE,UAAG,EAuBXF,KAAAG,QAAU,IAAIC,IAEJJ,KAAeK,iBAAG,EAb1BL,KAAKF,KAAOA,EACZE,KAAKM,eAAiBP,EAAQO,gBAAkB,CAAA,EAChDN,KAAKC,cAAgBF,EAAQE,YAC7BD,KAAKE,WAAaH,EAAQG,SAC1BF,KAAKO,WAAaR,EAAQQ,WAC1Bb,EAAcc,IAAIR,KAAKF,KAAME,KAC9B,CASD,SAAMS,CAAIC,GACRV,KAAKG,QAAQM,IAAIC,GACbV,KAAKC,aACPS,EAAQC,cAAcC,QAExBZ,KAAKK,iBAAkB,QACjBK,EAAQG,SACVb,KAAKK,kBAAoBL,KAAKc,cAChCd,KAAKK,iBAAkB,EACvBL,KAAKO,eAER,CAED,MAAAQ,CAAOL,GACLV,KAAKG,QAAQa,OAAON,EACrB,CAKD,KAAAE,GACEZ,KAAKG,QAAQc,SAASC,GAAMA,EAAEP,cAAcC,SAC7C,CAKD,IAAAO,GACEnB,KAAKG,QAAQc,SAASC,GAAMA,EAAEP,cAAcQ,QAC7C,CAED,MAAAC,GACEpB,KAAKG,QAAQc,SAASC,GAAMA,EAAEP,cAAcS,WAC5CpB,KAAKG,QAAQkB,OACd,CAED,MAAAC,GACEtB,KAAKG,QAAQc,SAASC,GAAMA,EAAEP,cAAcW,WAC5CtB,KAAKG,QAAQkB,OACd,CAKD,UAAAE,GACMvB,KAAKwB,UACPxB,KAAKY,QAELZ,KAAKmB,MAER,CAKD,eAAIL,GACF,OAAOd,KAAKG,QAAQsB,KAAO,CAC5B,CAKD,aAAID,GACF,OAAOE,MAAMC,KAAK3B,KAAKG,SAASyB,MAC7BC,GAAoC,YAA9BA,EAAElB,cAAcmB,WAE1B,CAED,cAAMjB,SACEkB,QAAQC,IAAIN,MAAMC,KAAK3B,KAAKG,SAAS8B,KAAKf,GAAMA,EAAEL,WACzD"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map index 6953a3467b..5f0d2355a7 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map +++ b/cdn/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,aAAa,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,EAAY,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,oBAAY,SAAS,GAAG;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,oBAAY,iBAAiB,GAAG,MAAM,EAAE,CAAC;AAQzC,oBAAY,OAAO,GAAG;IAEpB,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAE3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IAEtB,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEhB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEjB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAErC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,QAAQ,EAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,cAAc,wBA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AAE,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAkB1E,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,QAAQ;IAiBhB,OAAO,CAAC,SAAS;IAqBjB,UAAU;IAeJ,WAAW;IA2DjB,WAAW;IAOX,YAAY;IAOH,WAAW;IAGL,YAAY;IAoD3B,OAAO;IAIP,KAAK;IAIL,SAAS,CAAC,UAAU,EAAE,OAAO;IAU7B,OAAO,CAAC,aAAa;IAerB,SAAS,KAAK,cAAc,YAQ3B;IAED,OAAO,CAAC,yBAAyB;IAcjC,OAAO,CAAC,yBAAyB;IAmCjC,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,UAAQ;cAqC3D,OAAO,CACrB,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAC9B,OAAO,uCAA+B;IA4BxC,SAAS,CAAC,WAAW;IAMrB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAKpC;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,+BA9aO,OAAO,iFA8aO,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/animate.js b/cdn/build/es6/node_modules/@lit-labs/motion/animate.js index 889719bf5d..f74f1c75d8 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/animate.js +++ b/cdn/build/es6/node_modules/@lit-labs/motion/animate.js @@ -1 +1 @@ -import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as e}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";import{controllerMap as o}from"./animate-controller.js";export{AnimateController}from"./animate-controller.js";let n=0;const r=new Map,l=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),h=[{transform:"translateY(100%) scale(0)",opacity:0}],d=[{transform:"translateY(-100%) scale(0)",opacity:0}],p=[{transform:"translateX(-100%) scale(0)",opacity:0}],c=[{transform:"translateX(100%) scale(0)",opacity:0}],m=[{}],f=[{opacity:0}],u=f,v=[{opacity:0},{opacity:1}],y=[{opacity:0},{opacity:.25,offset:.75},{opacity:1}],g=(t,i)=>{const e=t-i;return 0===e?void 0:e},w=(t,i)=>{const e=t/i;return 1===e?void 0:e},b={left:(t,i)=>{const e=g(t,i);return{value:e,transform:e&&`translateX(${e}px)`}},top:(t,i)=>{const e=g(t,i);return{value:e,transform:e&&`translateY(${e}px)`}},width:(t,i)=>{const e=w(t,i);return{value:e,transform:e&&`scaleX(${e})`}},height:(t,i)=>{const e=w(t,i);return{value:e,transform:e&&`scaleY(${e})`}}},A={duration:333,easing:"ease-in-out"},O=["left","top","width","height","opacity","color","background"],C=new WeakMap;class S extends s{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(i){return t}getController(){return o.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[i]){var e;const s=void 0===this.l;return s&&(this.l=null===(e=t.options)||void 0===e?void 0:e.host,this.l.addController(this),this.element=t.element,C.set(this.element,this)),this.optionsOrCallback=i,(s||"function"!=typeof i)&&this.u(i),this.render(i)}u(t){var i,e;t=null!=t?t:{};const s=this.getController();void 0!==s&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(i=(e=t).properties)&&void 0!==i||(e.properties=O),this.options=t}v(){const t={},i=this.element.getBoundingClientRect(),e=getComputedStyle(this.element);return this.options.properties.forEach((s=>{var o;const n=null!==(o=i[s])&&void 0!==o?o:b[s]?void 0:e[s],r=Number(n);t[s]=isNaN(r)?n+"":r})),t}p(){let t,i=!0;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,e)=>t===i[e])))return!1}else if(i===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this._(),e=this.A(this.options.keyframeOptions,i),s=this.v();if(void 0!==this.g){const{from:e,to:o}=this.O(this.g,s,i);this.log("measured",[this.g,s,e,o]),t=this.calculateKeyframes(e,o)}else{const e=r.get(this.options.inId);if(e){r.delete(this.options.inId);const{from:o,to:l}=this.O(e,s,i);t=this.calculateKeyframes(o,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,n++,t.forEach((t=>t.zIndex=n))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,e)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,i;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(i=this.webAnimation)||void 0===i||i.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&r.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await a(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const i=this.g.left-t.left,e=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===e||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==e&&(this.element.style.top=e+"px")}}const i=this.A(this.options.keyframeOptions);await this.animate(this.options.out,i),this.element.remove()}prepare(){this.createFinished()}start(){var t,i;null===(i=(t=this.options).onStart)||void 0===i||i.call(t,this)}didFinish(t){var i,e;t&&(null===(e=(i=this.options).onComplete)||void 0===e||e.call(i,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let i=this.element.parentNode;i;i=null==i?void 0:i.parentNode){const e=C.get(i);e&&!e.isDisabled()&&e&&t.push(e)}return t}get isHostRendered(){const t=l.has(this.l);return t||this.l.updateComplete.then((()=>{l.add(this.l)})),t}A(t,i=this._()){const e={...A};return i.forEach((t=>Object.assign(e,t.options.keyframeOptions))),Object.assign(e,t),e}O(t,i,e){t={...t},i={...i};const s=e.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,n=1;return void 0!==s&&(s.forEach((t=>{t.width&&(o/=t.width),t.height&&(n/=t.height)})),void 0!==t.left&&void 0!==i.left&&(t.left=o*t.left,i.left=o*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=n*t.top,i.top=n*i.top)),{from:t,to:i}}calculateKeyframes(t,i,e=!1){var s;const o={},n={};let r=!1;const l={};for(const e in i){const h=t[e],d=i[e];if(e in b){const t=b[e];if(void 0===h||void 0===d)continue;const i=t(h,d);void 0!==i.transform&&(l[e]=i.value,r=!0,o.transform=`${null!==(s=o.transform)&&void 0!==s?s:""} ${i.transform}`)}else h!==d&&void 0!==h&&void 0!==d&&(r=!0,o[e]=h,n[e]=d)}return o.transformOrigin=n.transformOrigin=e?"center center":"top left",this.animatingProperties=l,r?[o,n]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let e=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),e=!0,this.webAnimation=this.element.animate(t,i);const s=this.getController();null==s||s.add(this);try{await this.webAnimation.finished}catch(t){}null==s||s.remove(this)}return this.didFinish(e),e}isAnimating(){var t,i;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(i=this.webAnimation)||void 0===i?void 0:i.pending)}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i)}}const k=i(S);export{S as Animate,k as animate,a as animationFrame,O as defaultCssProperties,A as defaultKeyframeOptions,u as fade,v as fadeIn,y as fadeInSlow,f as fadeOut,d as flyAbove,h as flyBelow,p as flyLeft,c as flyRight,m as none,b as transformProps}; \ No newline at end of file +import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as e}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";import{controllerMap as o}from"./animate-controller.js";export{AnimateController}from"./animate-controller.js";let n=0;const r=new Map,h=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),l=[{transform:"translateY(100%) scale(0)",opacity:0}],d=[{transform:"translateY(-100%) scale(0)",opacity:0}],p=[{transform:"translateX(-100%) scale(0)",opacity:0}],m=[{transform:"translateX(100%) scale(0)",opacity:0}],c=[{}],f=[{opacity:0}],u=f,v=[{opacity:0},{opacity:1}],y=[{opacity:0},{opacity:.25,offset:.75},{opacity:1}],g=(t,i)=>{const e=t-i;return 0===e?void 0:e},w=(t,i)=>{const e=t/i;return 1===e?void 0:e},b={left:(t,i)=>{const e=g(t,i);return{value:e,transform:null==e||isNaN(e)?void 0:`translateX(${e}px)`}},top:(t,i)=>{const e=g(t,i);return{value:e,transform:null==e||isNaN(e)?void 0:`translateY(${e}px)`}},width:(t,i)=>{let e;0===i&&(i=1,e={width:"1px"});const s=w(t,i);return{value:s,overrideFrom:e,transform:null==s||isNaN(s)?void 0:`scaleX(${s})`}},height:(t,i)=>{let e;0===i&&(i=1,e={height:"1px"});const s=w(t,i);return{value:s,overrideFrom:e,transform:null==s||isNaN(s)?void 0:`scaleY(${s})`}}},A={duration:333,easing:"ease-in-out"},O=["left","top","width","height","opacity","color","background"],C=new WeakMap;class x extends s{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){this.h?.(),this.h=void 0}render(i){return t}getController(){return o.get(this.l)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[i]){const e=void 0===this.l;return e&&(this.l=t.options?.host,this.l.addController(this),this.element=t.element,C.set(this.element,this)),this.optionsOrCallback=i,(e||"function"!=typeof i)&&this.u(i),this.render(i)}u(t){t=t??{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=O,this.options=t}p(){const t={},i=this.element.getBoundingClientRect(),e=getComputedStyle(this.element);return this.options.properties.forEach((s=>{const o=i[s]??(b[s]?void 0:e[s]),n=Number(o);t[s]=isNaN(n)?o+"":n})),t}m(){let t,i=!0;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,e)=>t===i[e])))return!1}else if(i===t)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this._(),e=this.A(this.options.keyframeOptions,i),s=this.p();if(void 0!==this.g){const{from:e,to:o}=this.O(this.g,s,i);this.log("measured",[this.g,s,e,o]),t=this.calculateKeyframes(e,o)}else{const e=r.get(this.options.inId);if(e){r.delete(this.options.inId);const{from:o,to:h}=this.O(e,s,i);t=this.calculateKeyframes(o,h),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,n++,t.forEach((t=>t.zIndex=n))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,e)}resetStyles(){void 0!==this.j&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){this.j=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.o)return;if(void 0!==this.options.id&&r.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await a(),this.t?.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.p();this.log("stabilizing out");const i=this.g.left-t.left,e=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===e||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==e&&(this.element.style.top=e+"px")}}const t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(t){t&&this.options.onComplete?.(this),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let i=this.element.parentNode;i;i=i?.parentNode){const e=C.get(i);e&&!e.isDisabled()&&e&&t.push(e)}return t}get isHostRendered(){const t=h.has(this.l);return t||this.l.updateComplete.then((()=>{h.add(this.l)})),t}A(t,i=this._()){const e={...A};return i.forEach((t=>Object.assign(e,t.options.keyframeOptions))),Object.assign(e,t),e}O(t,i,e){t={...t},i={...i};const s=e.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,n=1;return void 0!==s&&(s.forEach((t=>{t.width&&(o/=t.width),t.height&&(n/=t.height)})),void 0!==t.left&&void 0!==i.left&&(t.left=o*t.left,i.left=o*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=n*t.top,i.top=n*i.top)),{from:t,to:i}}calculateKeyframes(t,i,e=!1){const s={},o={};let n=!1;const r={};for(const e in i){const h=t[e],l=i[e];if(e in b){const t=b[e];if(void 0===h||void 0===l)continue;const i=t(h,l);void 0!==i.transform&&(r[e]=i.value,n=!0,s.transform=`${s.transform??""} ${i.transform}`,void 0!==i.overrideFrom&&Object.assign(s,i.overrideFrom))}else h!==l&&void 0!==h&&void 0!==l&&(n=!0,s[e]=h,o[e]=l)}return s.transformOrigin=o.transformOrigin=e?"center center":"top left",this.animatingProperties=r,n?[s,o]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let e=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),e=!0,this.webAnimation=this.element.animate(t,i);const s=this.getController();s?.add(this);try{await this.webAnimation.finished}catch(t){}s?.remove(this)}return this.didFinish(e),e}isAnimating(){return"running"===this.webAnimation?.playState||this.webAnimation?.pending}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i)}}const F=i(x);export{x as Animate,F as animate,a as animationFrame,O as defaultCssProperties,A as defaultKeyframeOptions,u as fade,v as fadeIn,y as fadeInSlow,f as fadeOut,d as flyAbove,l as flyBelow,p as flyLeft,m as flyRight,c as none,b as transformProps}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/animate.js.map b/cdn/build/es6/node_modules/@lit-labs/motion/animate.js.map index c0ba4e0379..070db9f77a 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/animate.js.map +++ b/cdn/build/es6/node_modules/@lit-labs/motion/animate.js.map @@ -1 +1 @@ -{"version":3,"file":"animate.js","sources":["src/animate.ts"],"sourcesContent":["import {LitElement, ReactiveControllerHost} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\nimport {controllerMap} from './animate-controller.js';\nexport {AnimateController} from './animate-controller.js';\n\nexport type CSSValues = {\n [index: string]: string | number;\n};\n\nexport type CSSPropertiesList = string[];\n\n// zIndex for \"in\" animations\nlet z = 0;\n\nconst disconnectedProps: Map = new Map();\nconst renderedHosts: WeakSet = new WeakSet();\n\nexport type Options = {\n // Options used for the animation\n keyframeOptions?: KeyframeAnimationOptions;\n // List of css properties to animate\n properties?: CSSPropertiesList;\n // if `true`, the `animate` is disabled\n disabled?: boolean;\n // Callback run to produce a value which is dirty checked to determine if animation should run.\n guard?: () => unknown;\n // Id for this `animate`; used to link to other `animate`s via e.g. `inId`\n id?: unknown;\n // Set to the `animate` id to map to when rendering \"in\"\n inId?: unknown;\n // Keyframes to use when animating \"in\"\n in?: Keyframe[];\n // Keyframes to use when animating \"out\"\n out?: Keyframe[];\n // Set to true to match DOM position when animating \"out\"\n stabilizeOut?: boolean;\n // Skips animation when initially rendering\n skipInitial?: boolean;\n // Callback run when the `animate` animation starts\n onStart?: (animate: Animate) => void;\n // Callback run when the animation is complete\n onComplete?: (animate: Animate) => void;\n // Callback run to modify frames used to animate\n onFrames?: (animate: Animate) => Keyframe[] | undefined;\n};\n\nexport const animationFrame = () =>\n new Promise((resolve) => requestAnimationFrame(resolve));\n\n// Presets for animating \"in\" and \"out\" of the DOM.\nexport const flyBelow = [{transform: 'translateY(100%) scale(0)', opacity: 0}];\nexport const flyAbove = [{transform: 'translateY(-100%) scale(0)', opacity: 0}];\nexport const flyLeft = [{transform: 'translateX(-100%) scale(0)', opacity: 0}];\nexport const flyRight = [{transform: 'translateX(100%) scale(0)', opacity: 0}];\nexport const none = [{}];\nexport const fadeOut = [{opacity: 0}];\nexport const fade = fadeOut;\nexport const fadeIn = [{opacity: 0}, {opacity: 1}];\nexport const fadeInSlow = [\n {opacity: 0},\n {opacity: 0.25, offset: 0.75},\n {opacity: 1},\n];\n\nconst diffOp = (a: number, b: number) => {\n const v = a - b;\n return v === 0 ? undefined : v;\n};\nconst quotientOp = (a: number, b: number) => {\n const v = a / b;\n return v === 1 ? undefined : v;\n};\n\n// Computes a transform given a before and after input for given properties.\nexport const transformProps = {\n left: (a: number, b: number) => {\n const value = diffOp(a, b);\n return {value, transform: value && `translateX(${value}px)`};\n },\n top: (a: number, b: number) => {\n const value = diffOp(a, b);\n return {value, transform: value && `translateY(${value}px)`};\n },\n width: (a: number, b: number) => {\n const value = quotientOp(a, b);\n return {value, transform: value && `scaleX(${value})`};\n },\n height: (a: number, b: number) => {\n const value = quotientOp(a, b);\n return {value, transform: value && `scaleY(${value})`};\n },\n};\n\nexport const defaultKeyframeOptions: KeyframeAnimationOptions = {\n duration: 333,\n easing: `ease-in-out`,\n};\n\nexport const defaultCssProperties: CSSPropertiesList = [\n 'left',\n 'top',\n 'width',\n 'height',\n 'opacity',\n 'color',\n 'background',\n];\n\n// Dirty checks the value received from the `guard` option.\nconst isDirty = (value: unknown, previous: unknown) => {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(previous) &&\n previous.length === value.length &&\n value.every((v, i) => v === (previous as Array)[i])\n ) {\n return false;\n }\n } else if (previous === value) {\n // Dirty-check non-arrays by identity\n return false;\n }\n return true;\n};\n\n// Mapping of node on which the `animate` directive is used to the `animate` directive.\n// Used to get the ancestor `animate` animations (which are used to modify\n// `animate` transforms), done by ascending the DOM.\nconst nodeToAnimateMap: WeakMap = new WeakMap();\n\n/**\n * `animate` directive class. Animates a node's position between renders.\n */\nexport class Animate extends AsyncDirective {\n private _host?: LitElement;\n private _fromValues?: CSSValues;\n private _parentNode: Element | null = null;\n private _nextSibling: Node | null = null;\n private _shouldAnimate = true;\n private _previousValue: unknown;\n private _styles?: string | undefined | null;\n element!: HTMLElement;\n\n shouldLog = false;\n animatingProperties?: CSSValues;\n frames?: Keyframe[];\n webAnimation?: Animation;\n options!: Options;\n optionsOrCallback?: (() => Options) | Options;\n\n finished!: Promise;\n private _resolveFinished?: () => void;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type === PartType.CHILD) {\n throw new Error(\n 'The `animate` directive must be used in attribute position.'\n );\n }\n this.createFinished();\n }\n\n createFinished() {\n this.resolveFinished?.();\n this.finished = new Promise((r) => {\n this._resolveFinished = r;\n });\n }\n\n async resolveFinished() {\n this._resolveFinished?.();\n this._resolveFinished = undefined;\n }\n\n render(_options?: (() => Options) | Options) {\n return nothing;\n }\n\n getController() {\n return controllerMap.get(this._host!);\n }\n\n isDisabled() {\n return this.options.disabled || this.getController()?.disabled;\n }\n\n override update(part: AttributePart, [options]: Parameters) {\n const firstUpdate = this._host === undefined;\n if (firstUpdate) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n this.element = part.element;\n nodeToAnimateMap.set(this.element, this);\n }\n this.optionsOrCallback = options;\n if (firstUpdate || typeof options !== 'function') {\n this._setOptions(options as Options);\n }\n return this.render(options);\n }\n\n // TODO(sorvell): instead of a function/object, just use an object that the\n // user can mutate and create accessors for the data that do lookups as needed.\n // We're doing this every hostUpdate anyway and these lookups are fast.\n private _setOptions(options?: Options) {\n options = options ?? {};\n // Mixin controller options.\n const controller = this.getController();\n if (controller !== undefined) {\n options = {\n ...controller.defaultOptions,\n ...options,\n };\n options.keyframeOptions = {\n ...controller.defaultOptions.keyframeOptions,\n ...options.keyframeOptions,\n };\n }\n // Ensure there are some properties to animation and some animation options.\n options!.properties ??= defaultCssProperties;\n this.options = options;\n }\n\n // Measures and returns metrics for the element's bounding box and styling\n private _measure() {\n const props: CSSValues = {};\n const bounds = this.element.getBoundingClientRect();\n const computedStyle = getComputedStyle(this.element);\n this.options.properties!.forEach((p) => {\n const v =\n bounds[p as keyof typeof bounds] ??\n (!transformProps[p as keyof typeof transformProps]\n ? computedStyle[p as keyof CSSStyleDeclaration]\n : undefined);\n const asNum = Number(v);\n props[p] = isNaN(asNum) ? String(v) : asNum;\n });\n return props;\n }\n\n // Returns true if a `animate` should be started.\n private _canStart() {\n let dirty = true,\n value = undefined;\n if (this.options.guard) {\n value = this.options.guard();\n dirty = isDirty(value, this._previousValue);\n }\n this._shouldAnimate =\n this._host!.hasUpdated &&\n !this.isDisabled() &&\n !this.isAnimating() &&\n dirty &&\n this.element.isConnected;\n if (this._shouldAnimate) {\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n }\n return this._shouldAnimate;\n }\n\n hostUpdate() {\n // TODO(sorvell): If options will change that will affect measuring,\n // then the user must pass a callback which can be called at update time.\n if (typeof this.optionsOrCallback === 'function') {\n this._setOptions(this.optionsOrCallback());\n }\n if (this._canStart()) {\n this._fromValues = this._measure();\n // Record parent and nextSibling used to re-attach node when animating \"out\"\n this._parentNode =\n this._parentNode ?? (this.element.parentNode as Element);\n this._nextSibling = this.element.nextSibling;\n }\n }\n\n async hostUpdated() {\n if (\n !this._shouldAnimate ||\n !this.element.isConnected ||\n (this.options.skipInitial && !this.isHostRendered)\n ) {\n return;\n }\n this.prepare();\n // Wait for rendering so any sub-elements have a chance to render.\n await animationFrame;\n let frames: Keyframe[] | undefined;\n const ancestors = this._getAncestors();\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const animationOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions,\n ancestors\n );\n const toValues = this._measure();\n // Normal or inverse scale\n if (this._fromValues !== undefined) {\n const {from, to} = this._applyAncestorAdjustments(\n this._fromValues,\n toValues,\n ancestors\n );\n this.log('measured', [this._fromValues, toValues, from, to]);\n frames = this.calculateKeyframes(from, to);\n // \"In\" `animate`.\n } else {\n const disconnected = disconnectedProps.get(this.options.inId);\n if (disconnected) {\n // use disconnected data only once.\n disconnectedProps.delete(this.options.inId);\n const {from, to} = this._applyAncestorAdjustments(\n disconnected!,\n toValues,\n ancestors\n );\n frames = this.calculateKeyframes(from, to);\n // \"merge\" with \"in\" frames\n frames = this.options.in\n ? [\n {...this.options.in[0], ...frames![0]},\n ...this.options.in.slice(1),\n frames![1],\n ]\n : frames;\n // adjust z so always on top...\n z++;\n frames!.forEach((f) => (f.zIndex = z));\n } else if (this.options.in) {\n frames = [...this.options.in, {}];\n }\n }\n this.animate(frames, animationOptions);\n }\n\n resetStyles() {\n if (this._styles !== undefined) {\n this.element.setAttribute('style', this._styles ?? '');\n this._styles = undefined;\n }\n }\n\n commitStyles() {\n this._styles = this.element.getAttribute('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.webAnimation as any)?.commitStyles();\n this.webAnimation?.cancel();\n }\n\n override reconnected() {}\n\n // Experimental animate out functionality.\n override async disconnected() {\n if (!this._shouldAnimate) {\n return;\n }\n if (this.options.id !== undefined) {\n disconnectedProps.set(this.options.id, this._fromValues!);\n }\n if (this.options.out === undefined) {\n return;\n }\n this.prepare();\n await animationFrame();\n if (this._parentNode?.isConnected) {\n // put element back in DOM\n const ref =\n this._nextSibling && this._nextSibling.parentNode === this._parentNode\n ? this._nextSibling\n : null;\n this._parentNode.insertBefore(this.element, ref);\n // Optionally move element back to its position before it was detached.\n if (this.options.stabilizeOut) {\n // Measure current position after re-attaching.\n const shifted = this._measure();\n this.log('stabilizing out');\n // TODO(sorvell): these nudges could conflict with existing styling\n // or animation but setting left/top should be rare, especially via\n // animation.\n const left =\n (this._fromValues!.left as number) - (shifted.left as number);\n const top = (this._fromValues!.top as number) - (shifted.top as number);\n const isStatic = getComputedStyle(this.element).position === 'static';\n if (isStatic && (left !== 0 || top !== 0)) {\n this.element.style.position = 'relative';\n }\n if (left !== 0) {\n this.element.style.left = left + 'px';\n }\n if (top !== 0) {\n this.element.style.top = top + 'px';\n }\n }\n }\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const keyframeOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions\n );\n await this.animate(this.options.out, keyframeOptions);\n this.element.remove();\n }\n\n prepare() {\n this.createFinished();\n }\n\n start() {\n this.options.onStart?.(this);\n }\n\n didFinish(didAnimate: boolean) {\n if (didAnimate) {\n this.options.onComplete?.(this);\n }\n this._fromValues = undefined;\n this.animatingProperties = undefined;\n this.frames = undefined;\n this.resolveFinished();\n }\n\n private _getAncestors() {\n const ancestors = [];\n for (\n let p: Node | null | undefined = this.element.parentNode;\n p;\n p = p?.parentNode\n ) {\n const a = nodeToAnimateMap.get(p!);\n if (a && !a.isDisabled() && a) {\n ancestors.push(a);\n }\n }\n return ancestors;\n }\n\n protected get isHostRendered() {\n const hostRendered = renderedHosts.has(this._host!);\n if (!hostRendered) {\n this._host!.updateComplete.then(() => {\n renderedHosts.add(this._host!);\n });\n }\n return hostRendered;\n }\n\n private _calculateKeyframeOptions(\n options: KeyframeAnimationOptions | undefined,\n ancestors: Animate[] = this._getAncestors()\n ) {\n // merges this `animate`'s options over ancestor options over defaults\n const keyframeOptions = {...defaultKeyframeOptions};\n ancestors.forEach((a) =>\n Object.assign(keyframeOptions, a.options.keyframeOptions)\n );\n Object.assign(keyframeOptions, options);\n return keyframeOptions;\n }\n\n // Adjust position based on ancestor scaling.\n private _applyAncestorAdjustments(\n from: CSSValues,\n to: CSSValues,\n ancestors: Animate[]\n ) {\n from = {...from};\n to = {...to};\n const ancestorProps = ancestors\n .map((a) => a.animatingProperties)\n .filter((a) => a !== undefined) as CSSValues[];\n let dScaleX = 1;\n let dScaleY = 1;\n if (ancestorProps !== undefined) {\n // gather scaling data for ancestors\n ancestorProps.forEach((a) => {\n if (a.width) {\n dScaleX = dScaleX / (a.width as number);\n }\n if (a.height) {\n dScaleY = dScaleY / (a.height as number);\n }\n });\n // Move position by ancestor scaling amount.\n if (from.left !== undefined && to.left !== undefined) {\n from.left = dScaleX * (from.left as number);\n to.left = dScaleX * (to.left as number);\n }\n if (from.top !== undefined && to.top !== undefined) {\n from.top = dScaleY * (from.top as number);\n to.top = dScaleY * (to.top as number);\n }\n }\n return {from, to};\n }\n\n protected calculateKeyframes(from: CSSValues, to: CSSValues, center = false) {\n const fromFrame: Keyframe = {};\n const toFrame: Keyframe = {};\n let hasFrames = false;\n const props: CSSValues = {};\n for (const p in to) {\n const f = from[p],\n t = to[p];\n if (p in transformProps) {\n const tp = transformProps[p as keyof typeof transformProps];\n if (f === undefined || t === undefined) {\n continue;\n }\n const op = tp(f as number, t as number);\n if (op.transform !== undefined) {\n props[p] = op.value!;\n hasFrames = true;\n fromFrame.transform = `${fromFrame.transform ?? ''} ${op.transform}`;\n }\n } else if (f !== t && f !== undefined && t !== undefined) {\n hasFrames = true;\n fromFrame[p] = f;\n toFrame[p] = t;\n }\n }\n fromFrame.transformOrigin = toFrame.transformOrigin = center\n ? 'center center'\n : 'top left';\n this.animatingProperties = props;\n return hasFrames ? [fromFrame, toFrame] : undefined;\n }\n\n protected async animate(\n frames: Keyframe[] | undefined,\n options = this.options.keyframeOptions\n ) {\n this.start();\n this.frames = frames;\n let didAnimate = false;\n if (!this.isAnimating() && !this.isDisabled()) {\n if (this.options.onFrames) {\n this.frames = frames = this.options.onFrames(this);\n this.log('modified frames', frames);\n }\n if (frames !== undefined) {\n this.log('animate', [frames, options]);\n didAnimate = true;\n this.webAnimation = this.element.animate(frames, options);\n const controller = this.getController();\n controller?.add(this);\n try {\n await this.webAnimation.finished;\n } catch (e) {\n // cancelled.\n }\n controller?.remove(this);\n }\n }\n this.didFinish(didAnimate);\n return didAnimate;\n }\n\n protected isAnimating() {\n return (\n this.webAnimation?.playState === 'running' || this.webAnimation?.pending\n );\n }\n\n log(message: string, data?: unknown) {\n if (this.shouldLog && !this.isDisabled()) {\n console.log(message, this.options.id, data);\n }\n }\n}\n\n/**\n * The `animate` directive animates a node's layout between renders.\n * It will perform a \"tweening\" animation between the two states based on\n * the options given. In addition, elements can animate when they initially\n * render to DOM and when they are removed.\n *\n * Options include:\n * * animationOptions: configure animation via standard KeyframeAnimationOptions\n * * properties: list of properties to animate, defaults to\n * ['left', 'top','width', 'height', 'opacity', 'color', 'background']\n * * disabled: disables animation\n * * guard: function producing values that must change for the `animate` to run\n * * in: keyframes to use when animating in\n * * out: keyframes to use when animating out\n * * skipInitial: skip animating in the first time\n * * id: used to link to other `animate`s via `inId`\n * * inId: id of the `animate` to render from when animating in\n * * onStart: run when the `animate` starts\n * * onComplete: run when the `animate` completes\n * * onFrames: run when the frames are produces, use to modify frames\n */\nexport const animate = directive(Animate);\n"],"names":["z","disconnectedProps","Map","renderedHosts","WeakSet","animationFrame","Promise","resolve","requestAnimationFrame","flyBelow","transform","opacity","flyAbove","flyLeft","flyRight","none","fadeOut","fade","fadeIn","fadeInSlow","offset","diffOp","a","b","v","undefined","quotientOp","transformProps","left","value","top","width","height","defaultKeyframeOptions","duration","easing","defaultCssProperties","nodeToAnimateMap","WeakMap","Animate","AsyncDirective","constructor","part","super","this","_parentNode","_nextSibling","_shouldAnimate","shouldLog","type","PartType","CHILD","Error","createFinished","_a","resolveFinished","call","finished","r","_resolveFinished","async","render","_options","nothing","getController","controllerMap","get","_host","isDisabled","options","disabled","update","firstUpdate","host","addController","element","set","optionsOrCallback","_setOptions","controller","defaultOptions","keyframeOptions","_b","properties","_measure","props","bounds","getBoundingClientRect","computedStyle","getComputedStyle","forEach","p","asNum","Number","isNaN","String","_canStart","dirty","guard","previous","Array","isArray","length","every","i","isDirty","_previousValue","hasUpdated","isAnimating","isConnected","from","hostUpdate","_fromValues","parentNode","nextSibling","skipInitial","isHostRendered","frames","prepare","ancestors","_getAncestors","animationOptions","_calculateKeyframeOptions","toValues","to","_applyAncestorAdjustments","log","calculateKeyframes","disconnected","inId","delete","in","slice","f","zIndex","animate","resetStyles","_styles","setAttribute","commitStyles","getAttribute","webAnimation","cancel","reconnected","id","out","ref","insertBefore","stabilizeOut","shifted","position","style","remove","start","onStart","didFinish","didAnimate","onComplete","animatingProperties","push","hostRendered","has","updateComplete","then","add","Object","assign","ancestorProps","map","filter","dScaleX","dScaleY","center","fromFrame","toFrame","hasFrames","t","tp","op","transformOrigin","onFrames","e","playState","pending","message","data","console","directive"],"mappings":"wQAcA,IAAIA,EAA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,IAAIuC,GAAa,EACjB,IAAKhH,KAAKgE,gBAAkBhE,KAAKwB,eAC3BxB,KAAKyB,QAAQ+G,WACfxI,KAAKyE,OAASA,EAASzE,KAAKyB,QAAQ+G,SAASxI,MAC7CA,KAAKkF,IAAI,kBAAmBT,SAEf5F,IAAX4F,GAAsB,CACxBzE,KAAKkF,IAAI,UAAW,CAACT,EAAQhD,IAC7BuF,GAAa,EACbhH,KAAKiG,aAAejG,KAAK+B,QAAQ4D,QAAQlB,EAAQhD,GACjD,MAAMU,EAAanC,KAAKoB,gBACxBe,SAAAA,EAAYqF,IAAIxH,MAChB,UACQA,KAAKiG,aAAapF,QAGzB,CAFC,MAAO4H,GAER,CACDtG,SAAAA,EAAYyE,OAAO5G,KACpB,CAGH,OADAA,KAAK+G,UAAUC,GACRA,CACR,CAEShD,sBACR,MACmC,qBAAjCtD,EAAAV,KAAKiG,mCAAcyC,qBAA2BpG,EAAAtC,KAAKiG,mCAAc0C,QAEpE,CAEDzD,IAAI0D,EAAiBC,GACf7I,KAAKI,YAAcJ,KAAKwB,cAC1BsH,QAAQ5D,IAAI0D,EAAS5I,KAAKyB,QAAQ2E,GAAIyC,EAEzC,QAwBUlD,EAAUoD,EAAUpJ"} \ No newline at end of file +{"version":3,"file":"animate.js","sources":["src/animate.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {LitElement, ReactiveControllerHost} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\nimport {controllerMap} from './animate-controller.js';\nexport {AnimateController} from './animate-controller.js';\n\nexport type CSSValues = {\n [index: string]: string | number;\n};\n\nexport type CSSPropertiesList = string[];\n\n// zIndex for \"in\" animations\nlet z = 0;\n\nconst disconnectedProps = new Map();\nconst renderedHosts = new WeakSet();\n\nexport type Options = {\n // Options used for the animation\n keyframeOptions?: KeyframeAnimationOptions;\n // List of css properties to animate\n properties?: CSSPropertiesList;\n // if `true`, the `animate` is disabled\n disabled?: boolean;\n // Callback run to produce a value which is dirty checked to determine if animation should run.\n guard?: () => unknown;\n // Id for this `animate`; used to link to other `animate`s via e.g. `inId`\n id?: unknown;\n // Set to the `animate` id to map to when rendering \"in\"\n inId?: unknown;\n // Keyframes to use when animating \"in\"\n in?: Keyframe[];\n // Keyframes to use when animating \"out\"\n out?: Keyframe[];\n // Set to true to match DOM position when animating \"out\"\n stabilizeOut?: boolean;\n // Skips animation when initially rendering\n skipInitial?: boolean;\n // Callback run when the `animate` animation starts\n onStart?: (animate: Animate) => void;\n // Callback run when the animation is complete\n onComplete?: (animate: Animate) => void;\n // Callback run to modify frames used to animate\n onFrames?: (animate: Animate) => Keyframe[] | undefined;\n};\n\nexport const animationFrame = () =>\n new Promise((resolve) => requestAnimationFrame(resolve));\n\n// Presets for animating \"in\" and \"out\" of the DOM.\nexport const flyBelow = [{transform: 'translateY(100%) scale(0)', opacity: 0}];\nexport const flyAbove = [{transform: 'translateY(-100%) scale(0)', opacity: 0}];\nexport const flyLeft = [{transform: 'translateX(-100%) scale(0)', opacity: 0}];\nexport const flyRight = [{transform: 'translateX(100%) scale(0)', opacity: 0}];\nexport const none = [{}];\nexport const fadeOut = [{opacity: 0}];\nexport const fade = fadeOut;\nexport const fadeIn = [{opacity: 0}, {opacity: 1}];\nexport const fadeInSlow = [\n {opacity: 0},\n {opacity: 0.25, offset: 0.75},\n {opacity: 1},\n];\n\nconst diffOp = (a: number, b: number) => {\n const v = a - b;\n return v === 0 ? undefined : v;\n};\nconst quotientOp = (a: number, b: number) => {\n const v = a / b;\n return v === 1 ? undefined : v;\n};\n\n// Computes a transform given a before and after input for given properties.\nexport const transformProps: {\n [p: string]: (\n a: number,\n b: number\n ) => {\n value?: number;\n transform?: string;\n overrideFrom?: {[k: string]: string};\n };\n} = {\n left: (a: number, b: number) => {\n const value = diffOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `translateX(${value}px)`;\n return {value, transform};\n },\n top: (a: number, b: number) => {\n const value = diffOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `translateY(${value}px)`;\n return {value, transform};\n },\n width: (a: number, b: number) => {\n let override: {} | undefined = undefined;\n // 'To' values of 0 would cause `value` to be Infinity. Instead we override\n // `b` to be 1 and add 1px as an override of width.\n if (b === 0) {\n b = 1;\n override = {width: '1px'};\n }\n const value = quotientOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `scaleX(${value})`;\n return {value, overrideFrom: override, transform};\n },\n height: (a: number, b: number) => {\n let override: {} | undefined = undefined;\n // 'To' values of 0 would cause `value` to be Infinity. Instead we override\n // `b` to be 1 and add 1px as an override of height.\n if (b === 0) {\n b = 1;\n override = {height: '1px'};\n }\n const value = quotientOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `scaleY(${value})`;\n return {value, overrideFrom: override, transform};\n },\n};\n\nexport const defaultKeyframeOptions: KeyframeAnimationOptions = {\n duration: 333,\n easing: `ease-in-out`,\n};\n\nexport const defaultCssProperties: CSSPropertiesList = [\n 'left',\n 'top',\n 'width',\n 'height',\n 'opacity',\n 'color',\n 'background',\n];\n\n// Dirty checks the value received from the `guard` option.\nconst isDirty = (value: unknown, previous: unknown) => {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(previous) &&\n previous.length === value.length &&\n value.every((v, i) => v === (previous as Array)[i])\n ) {\n return false;\n }\n } else if (previous === value) {\n // Dirty-check non-arrays by identity\n return false;\n }\n return true;\n};\n\n// Mapping of node on which the `animate` directive is used to the `animate` directive.\n// Used to get the ancestor `animate` animations (which are used to modify\n// `animate` transforms), done by ascending the DOM.\nconst nodeToAnimateMap = new WeakMap();\n\n/**\n * `animate` directive class. Animates a node's position between renders.\n */\nexport class Animate extends AsyncDirective {\n private _host?: LitElement;\n private _fromValues?: CSSValues;\n private _parentNode: Element | null = null;\n private _nextSibling: Node | null = null;\n private _shouldAnimate = true;\n private _previousValue: unknown;\n private _styles?: string | undefined | null;\n element!: HTMLElement;\n\n shouldLog = false;\n animatingProperties?: CSSValues;\n frames?: Keyframe[];\n webAnimation?: Animation;\n options!: Options;\n optionsOrCallback?: (() => Options) | Options;\n\n finished!: Promise;\n private _resolveFinished?: () => void;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type === PartType.CHILD) {\n throw new Error(\n 'The `animate` directive must be used in attribute position.'\n );\n }\n this.createFinished();\n }\n\n createFinished() {\n this.resolveFinished?.();\n this.finished = new Promise((r) => {\n this._resolveFinished = r;\n });\n }\n\n async resolveFinished() {\n this._resolveFinished?.();\n this._resolveFinished = undefined;\n }\n\n render(_options?: (() => Options) | Options) {\n return nothing;\n }\n\n getController() {\n return controllerMap.get(this._host!);\n }\n\n isDisabled() {\n return this.options.disabled || this.getController()?.disabled;\n }\n\n override update(part: AttributePart, [options]: Parameters) {\n const firstUpdate = this._host === undefined;\n if (firstUpdate) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n this.element = part.element;\n nodeToAnimateMap.set(this.element, this);\n }\n this.optionsOrCallback = options;\n if (firstUpdate || typeof options !== 'function') {\n this._setOptions(options as Options);\n }\n return this.render(options);\n }\n\n // TODO(sorvell): instead of a function/object, just use an object that the\n // user can mutate and create accessors for the data that do lookups as needed.\n // We're doing this every hostUpdate anyway and these lookups are fast.\n private _setOptions(options?: Options) {\n options = options ?? {};\n // Mixin controller options.\n const controller = this.getController();\n if (controller !== undefined) {\n options = {\n ...controller.defaultOptions,\n ...options,\n };\n options.keyframeOptions = {\n ...controller.defaultOptions.keyframeOptions,\n ...options.keyframeOptions,\n };\n }\n // Ensure there are some properties to animation and some animation options.\n options!.properties ??= defaultCssProperties;\n this.options = options;\n }\n\n // Measures and returns metrics for the element's bounding box and styling\n private _measure() {\n const props: CSSValues = {};\n const bounds = this.element.getBoundingClientRect();\n const computedStyle = getComputedStyle(this.element);\n this.options.properties!.forEach((p) => {\n const v =\n bounds[p as keyof typeof bounds] ??\n (!transformProps[p as keyof typeof transformProps]\n ? computedStyle[p as keyof CSSStyleDeclaration]\n : undefined);\n const asNum = Number(v);\n props[p] = isNaN(asNum) ? String(v) : asNum;\n });\n return props;\n }\n\n // Returns true if a `animate` should be started.\n private _canStart() {\n let dirty = true,\n value = undefined;\n if (this.options.guard) {\n value = this.options.guard();\n dirty = isDirty(value, this._previousValue);\n }\n this._shouldAnimate =\n this._host!.hasUpdated &&\n !this.isDisabled() &&\n !this.isAnimating() &&\n dirty &&\n this.element.isConnected;\n if (this._shouldAnimate) {\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n }\n return this._shouldAnimate;\n }\n\n hostUpdate() {\n // TODO(sorvell): If options will change that will affect measuring,\n // then the user must pass a callback which can be called at update time.\n if (typeof this.optionsOrCallback === 'function') {\n this._setOptions(this.optionsOrCallback());\n }\n if (this._canStart()) {\n this._fromValues = this._measure();\n // Record parent and nextSibling used to re-attach node when animating \"out\"\n this._parentNode =\n this._parentNode ?? (this.element.parentNode as Element);\n this._nextSibling = this.element.nextSibling;\n }\n }\n\n async hostUpdated() {\n if (\n !this._shouldAnimate ||\n !this.element.isConnected ||\n (this.options.skipInitial && !this.isHostRendered)\n ) {\n return;\n }\n this.prepare();\n // Wait for rendering so any sub-elements have a chance to render.\n await animationFrame;\n let frames: Keyframe[] | undefined;\n const ancestors = this._getAncestors();\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const animationOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions,\n ancestors\n );\n const toValues = this._measure();\n // Normal or inverse scale\n if (this._fromValues !== undefined) {\n const {from, to} = this._applyAncestorAdjustments(\n this._fromValues,\n toValues,\n ancestors\n );\n this.log('measured', [this._fromValues, toValues, from, to]);\n frames = this.calculateKeyframes(from, to);\n // \"In\" `animate`.\n } else {\n const disconnected = disconnectedProps.get(this.options.inId);\n if (disconnected) {\n // use disconnected data only once.\n disconnectedProps.delete(this.options.inId);\n const {from, to} = this._applyAncestorAdjustments(\n disconnected!,\n toValues,\n ancestors\n );\n frames = this.calculateKeyframes(from, to);\n // \"merge\" with \"in\" frames\n frames = this.options.in\n ? [\n {...this.options.in[0], ...frames![0]},\n ...this.options.in.slice(1),\n frames![1],\n ]\n : frames;\n // adjust z so always on top...\n z++;\n frames!.forEach((f) => (f['zIndex'] = z));\n } else if (this.options.in) {\n frames = [...this.options.in, {}];\n }\n }\n noAwait(this.animate(frames, animationOptions));\n }\n\n resetStyles() {\n if (this._styles !== undefined) {\n this.element.setAttribute('style', this._styles ?? '');\n this._styles = undefined;\n }\n }\n\n commitStyles() {\n this._styles = this.element.getAttribute('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.webAnimation as any)?.commitStyles();\n this.webAnimation?.cancel();\n }\n\n override reconnected() {}\n\n // Experimental animate out functionality.\n override async disconnected() {\n if (!this._shouldAnimate) {\n return;\n }\n if (this.options.id !== undefined) {\n disconnectedProps.set(this.options.id, this._fromValues!);\n }\n if (this.options.out === undefined) {\n return;\n }\n this.prepare();\n await animationFrame();\n if (this._parentNode?.isConnected) {\n // put element back in DOM\n const ref =\n this._nextSibling && this._nextSibling.parentNode === this._parentNode\n ? this._nextSibling\n : null;\n this._parentNode.insertBefore(this.element, ref);\n // Optionally move element back to its position before it was detached.\n if (this.options.stabilizeOut) {\n // Measure current position after re-attaching.\n const shifted = this._measure();\n this.log('stabilizing out');\n // TODO(sorvell): these nudges could conflict with existing styling\n // or animation but setting left/top should be rare, especially via\n // animation.\n const left =\n (this._fromValues!['left'] as number) - (shifted['left'] as number);\n const top =\n (this._fromValues!['top'] as number) - (shifted['top'] as number);\n const isStatic = getComputedStyle(this.element).position === 'static';\n if (isStatic && (left !== 0 || top !== 0)) {\n this.element.style.position = 'relative';\n }\n if (left !== 0) {\n this.element.style.left = left + 'px';\n }\n if (top !== 0) {\n this.element.style.top = top + 'px';\n }\n }\n }\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const keyframeOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions\n );\n await this.animate(this.options.out, keyframeOptions);\n this.element.remove();\n }\n\n prepare() {\n this.createFinished();\n }\n\n start() {\n this.options.onStart?.(this);\n }\n\n didFinish(didAnimate: boolean) {\n if (didAnimate) {\n this.options.onComplete?.(this);\n }\n this._fromValues = undefined;\n this.animatingProperties = undefined;\n this.frames = undefined;\n this.resolveFinished();\n }\n\n private _getAncestors() {\n const ancestors = [];\n for (\n let p: Node | null | undefined = this.element.parentNode;\n p;\n p = p?.parentNode\n ) {\n const a = nodeToAnimateMap.get(p!);\n if (a && !a.isDisabled() && a) {\n ancestors.push(a);\n }\n }\n return ancestors;\n }\n\n protected get isHostRendered() {\n const hostRendered = renderedHosts.has(this._host!);\n if (!hostRendered) {\n this._host!.updateComplete.then(() => {\n renderedHosts.add(this._host!);\n });\n }\n return hostRendered;\n }\n\n private _calculateKeyframeOptions(\n options: KeyframeAnimationOptions | undefined,\n ancestors: Animate[] = this._getAncestors()\n ) {\n // merges this `animate`'s options over ancestor options over defaults\n const keyframeOptions = {...defaultKeyframeOptions};\n ancestors.forEach((a) =>\n Object.assign(keyframeOptions, a.options.keyframeOptions)\n );\n Object.assign(keyframeOptions, options);\n return keyframeOptions;\n }\n\n // Adjust position based on ancestor scaling.\n private _applyAncestorAdjustments(\n from: CSSValues,\n to: CSSValues,\n ancestors: Animate[]\n ) {\n from = {...from};\n to = {...to};\n const ancestorProps = ancestors\n .map((a) => a.animatingProperties)\n .filter((a) => a !== undefined) as CSSValues[];\n let dScaleX = 1;\n let dScaleY = 1;\n if (ancestorProps !== undefined) {\n // gather scaling data for ancestors\n ancestorProps.forEach((a) => {\n if (a['width']) {\n dScaleX = dScaleX / (a['width'] as number);\n }\n if (a['height']) {\n dScaleY = dScaleY / (a['height'] as number);\n }\n });\n // Move position by ancestor scaling amount.\n if (from['left'] !== undefined && to['left'] !== undefined) {\n from['left'] = dScaleX * (from['left'] as number);\n to['left'] = dScaleX * (to['left'] as number);\n }\n if (from['top'] !== undefined && to['top'] !== undefined) {\n from['top'] = dScaleY * (from['top'] as number);\n to['top'] = dScaleY * (to['top'] as number);\n }\n }\n return {from, to};\n }\n\n protected calculateKeyframes(from: CSSValues, to: CSSValues, center = false) {\n const fromFrame: Keyframe = {};\n const toFrame: Keyframe = {};\n let hasFrames = false;\n const props: CSSValues = {};\n for (const p in to) {\n const f = from[p],\n t = to[p];\n if (p in transformProps) {\n const tp = transformProps[p as keyof typeof transformProps];\n if (f === undefined || t === undefined) {\n continue;\n }\n const op = tp(f as number, t as number);\n if (op.transform !== undefined) {\n props[p] = op.value!;\n hasFrames = true;\n fromFrame['transform'] = `${fromFrame['transform'] ?? ''} ${\n op['transform']\n }`;\n if (op.overrideFrom !== undefined) {\n Object.assign(fromFrame, op.overrideFrom);\n }\n }\n } else if (f !== t && f !== undefined && t !== undefined) {\n hasFrames = true;\n fromFrame[p] = f;\n toFrame[p] = t;\n }\n }\n fromFrame['transformOrigin'] = toFrame['transformOrigin'] = center\n ? 'center center'\n : 'top left';\n this.animatingProperties = props;\n return hasFrames ? [fromFrame, toFrame] : undefined;\n }\n\n protected async animate(\n frames: Keyframe[] | undefined,\n options = this.options.keyframeOptions\n ) {\n this.start();\n this.frames = frames;\n let didAnimate = false;\n if (!this.isAnimating() && !this.isDisabled()) {\n if (this.options.onFrames) {\n this.frames = frames = this.options.onFrames(this);\n this.log('modified frames', frames);\n }\n if (frames !== undefined) {\n this.log('animate', [frames, options]);\n didAnimate = true;\n this.webAnimation = this.element.animate(frames, options);\n const controller = this.getController();\n noAwait(controller?.add(this));\n try {\n await this.webAnimation.finished;\n } catch (e) {\n // cancelled.\n }\n controller?.remove(this);\n }\n }\n this.didFinish(didAnimate);\n return didAnimate;\n }\n\n protected isAnimating() {\n return (\n this.webAnimation?.playState === 'running' || this.webAnimation?.pending\n );\n }\n\n log(message: string, data?: unknown) {\n if (this.shouldLog && !this.isDisabled()) {\n console.log(message, this.options.id, data);\n }\n }\n}\n\n/**\n * Used in an async function to mark a promise that we're deliberately not\n * awaiting.\n */\nfunction noAwait(_p: null | undefined | Promise) {}\n\n/**\n * The `animate` directive animates a node's layout between renders.\n * It will perform a \"tweening\" animation between the two states based on\n * the options given. In addition, elements can animate when they initially\n * render to DOM and when they are removed.\n *\n * Options include:\n * * animationOptions: configure animation via standard KeyframeAnimationOptions\n * * properties: list of properties to animate, defaults to\n * ['left', 'top','width', 'height', 'opacity', 'color', 'background']\n * * disabled: disables animation\n * * guard: function producing values that must change for the `animate` to run\n * * in: keyframes to use when animating in\n * * out: keyframes to use when animating out\n * * skipInitial: skip animating in the first time\n * * id: used to link to other `animate`s via `inId`\n * * inId: id of the `animate` to render from when animating in\n * * onStart: run when the `animate` starts\n * * onComplete: run when the `animate` completes\n * * onFrames: run when the frames are produces, use to modify frames\n */\nexport const animate = directive(Animate);\n"],"names":["z","disconnectedProps","Map","renderedHosts","WeakSet","animationFrame","Promise","resolve","requestAnimationFrame","flyBelow","transform","opacity","flyAbove","flyLeft","flyRight","none","fadeOut","fade","fadeIn","fadeInSlow","offset","diffOp","a","b","v","undefined","quotientOp","transformProps","left","value","isNaN","top","width","override","overrideFrom","height","defaultKeyframeOptions","duration","easing","defaultCssProperties","nodeToAnimateMap","WeakMap","Animate","AsyncDirective","constructor","part","super","this","_parentNode","_nextSibling","_shouldAnimate","shouldLog","type","PartType","CHILD","Error","createFinished","resolveFinished","finished","r","_resolveFinished","render","_options","nothing","getController","controllerMap","get","_host","isDisabled","options","disabled","update","firstUpdate","host","addController","element","set","optionsOrCallback","_setOptions","controller","defaultOptions","keyframeOptions","properties","_measure","props","bounds","getBoundingClientRect","computedStyle","getComputedStyle","forEach","p","asNum","Number","String","_canStart","dirty","guard","previous","Array","isArray","length","every","i","isDirty","_previousValue","hasUpdated","isAnimating","isConnected","from","hostUpdate","_fromValues","parentNode","nextSibling","hostUpdated","skipInitial","isHostRendered","frames","prepare","ancestors","_getAncestors","animationOptions","_calculateKeyframeOptions","toValues","to","_applyAncestorAdjustments","log","calculateKeyframes","disconnected","inId","delete","in","slice","f","animate","resetStyles","_styles","setAttribute","commitStyles","getAttribute","webAnimation","cancel","reconnected","id","out","ref","insertBefore","stabilizeOut","shifted","position","style","remove","start","onStart","didFinish","didAnimate","onComplete","animatingProperties","push","hostRendered","has","updateComplete","then","add","Object","assign","ancestorProps","map","filter","dScaleX","dScaleY","center","fromFrame","toFrame","hasFrames","t","tp","op","onFrames","e","playState","pending","message","data","console","directive"],"mappings":"wQAmBA,IAAIA,EAAI,EAER,MAAMC,EAAoB,IAAIC,IACxBC,EAAgB,IAAIC,QA+BbC,EAAiB,IAC5B,IAAIC,SAASC,GAAYC,sBAAsBD,KAGpCE,EAAW,CAAC,CAACC,UAAW,4BAA6BC,QAAS,IAC9DC,EAAW,CAAC,CAACF,UAAW,6BAA8BC,QAAS,IAC/DE,EAAU,CAAC,CAACH,UAAW,6BAA8BC,QAAS,IAC9DG,EAAW,CAAC,CAACJ,UAAW,4BAA6BC,QAAS,IAC9DI,EAAO,CAAC,CAAA,GACRC,EAAU,CAAC,CAACL,QAAS,IACrBM,EAAOD,EACPE,EAAS,CAAC,CAACP,QAAS,GAAI,CAACA,QAAS,IAClCQ,EAAa,CACxB,CAACR,QAAS,GACV,CAACA,QAAS,IAAMS,OAAQ,KACxB,CAACT,QAAS,IAGNU,EAAS,CAACC,EAAWC,KACzB,MAAMC,EAAIF,EAAIC,EACd,OAAa,IAANC,OAAUC,EAAYD,CAAC,EAE1BE,EAAa,CAACJ,EAAWC,KAC7B,MAAMC,EAAIF,EAAIC,EACd,OAAa,IAANC,OAAUC,EAAYD,CAAC,EAInBG,EAST,CACFC,KAAM,CAACN,EAAWC,KAChB,MAAMM,EAAQR,EAAOC,EAAGC,GAGxB,MAAO,CAACM,QAAOnB,UADJ,MAATmB,GAAiBC,MAAMD,QAASJ,EAAY,cAAcI,OACnC,EAE3BE,IAAK,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,EAAyB,gBAAIF,EACxD,gBACA,WACJ3H,KAAK6G,oBAAsBxE,EACpByF,EAAY,CAACF,EAAWC,QAAWnJ,CAC3C,CAES,aAAM4G,CACdjB,EACA/C,EAAUtB,KAAKsB,QAAQY,iBAEvBlC,KAAKwG,QACLxG,KAAKqE,OAASA,EACd,IAAIsC,GAAa,EACjB,IAAK3G,KAAK2D,gBAAkB3D,KAAKqB,eAC3BrB,KAAKsB,QAAQ4G,WACflI,KAAKqE,OAASA,EAASrE,KAAKsB,QAAQ4G,SAASlI,MAC7CA,KAAK8E,IAAI,kBAAmBT,SAEf3F,IAAX2F,GAAsB,CACxBrE,KAAK8E,IAAI,UAAW,CAACT,EAAQ/C,IAC7BqF,GAAa,EACb3G,KAAK4F,aAAe5F,KAAK4B,QAAQ0D,QAAQjB,EAAQ/C,GACjD,MAAMU,EAAahC,KAAKiB,gBAChBe,GAAYmF,IAAInH,MACxB,UACQA,KAAK4F,aAAajF,QACzB,CAAC,MAAOwH,GAER,CACDnG,GAAYuE,OAAOvG,KACpB,CAGH,OADAA,KAAK0G,UAAUC,GACRA,CACR,CAES,WAAAhD,GACR,MACmC,YAAjC3D,KAAK4F,cAAcwC,WAA2BpI,KAAK4F,cAAcyC,OAEpE,CAED,GAAAvD,CAAIwD,EAAiBC,GACfvI,KAAKI,YAAcJ,KAAKqB,cAC1BmH,QAAQ1D,IAAIwD,EAAStI,KAAKsB,QAAQyE,GAAIwC,EAEzC,QA8BUjD,EAAUmD,EAAU9I"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/position.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/motion/position.d.ts.map index 4c9ff10939..6f33e3700e 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/position.d.ts.map +++ b/cdn/build/es6/node_modules/@lit-labs/motion/position.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../src/position.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,aA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,OAAO,EAAY,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEtD,UAAU,aAAa;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,KAAK,GAAG,GAAG;IAAC,KAAK,EAAE,WAAW,CAAA;CAAC,CAAC;AAChC,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,GAAG,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;AAInD,qBAAa,QAAS,SAAQ,cAAc;IAC1C,OAAO,CAAC,KAAK,CAAC,CAAa;IAC3B,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,UAAU,CAAC,CAAY;gBAEnB,IAAI,EAAE,QAAQ;IAS1B,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,SAAS;IAI9D,MAAM,CACb,IAAI,EAAE,aAAa,EACnB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAYjD,WAAW;IAIX,OAAO,CAAC,SAAS;CAgBlB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,wIAAsB,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/position.js b/cdn/build/es6/node_modules/@lit-labs/motion/position.js index a830f06681..b072dc3b73 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/position.js +++ b/cdn/build/es6/node_modules/@lit-labs/motion/position.js @@ -1 +1 @@ -import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as o}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";const n=["top","right","bottom","left"];class e extends s{constructor(t){if(super(t),t.type!==o.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}render(i,o){return t}update(t,[i,o]){var s;return void 0===this.l&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this)),this.j=t.element,this.S=i,this.C=null!=o?o:["left","top","width","height"],this.render(i,o)}hostUpdated(){this.F()}F(){var t,i;const o="function"==typeof this.S?this.S():null===(t=this.S)||void 0===t?void 0:t.value,s=o.offsetParent;if(void 0===o||!s)return;const r=o.getBoundingClientRect(),l=s.getBoundingClientRect();null===(i=this.C)||void 0===i||i.forEach((t=>{const i=n.includes(t)?r[t]-l[t]:r[t];this.j.style[t]=i+"px"}))}}const r=i(e);export{e as Position,r as position}; \ No newline at end of file +import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as s}from"../../lit/directive.js";import{AsyncDirective as o}from"../../lit/async-directive.js";const r=["top","right","bottom","left"];class e extends o{constructor(t){if(super(t),t.type!==s.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}render(i,s){return t}update(t,[i,s]){return void 0===this.l&&(this.l=t.options?.host,this.l.addController(this)),this.N=t.element,this.P=i,this.S=s??["left","top","width","height"],this.render(i,s)}hostUpdated(){this.C()}C(){const t="function"==typeof this.P?this.P():this.P?.value,i=t.offsetParent;if(void 0===t||!i)return;const s=t.getBoundingClientRect(),o=i.getBoundingClientRect();this.S?.forEach((t=>{const i=r.includes(t)?s[t]-o[t]:s[t];this.N.style[t]=i+"px"}))}}const n=i(e);export{e as Position,n as position}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/motion/position.js.map b/cdn/build/es6/node_modules/@lit-labs/motion/position.js.map index 3e02fe3236..63ed9007c6 100644 --- a/cdn/build/es6/node_modules/@lit-labs/motion/position.js.map +++ b/cdn/build/es6/node_modules/@lit-labs/motion/position.js.map @@ -1 +1 @@ -{"version":3,"file":"position.js","sources":["src/position.ts"],"sourcesContent":["import {LitElement} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\n\ninterface Positionables {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n}\n\ntype Ref = {value: HTMLElement};\nexport type TargetCallbackOrRef = (() => HTMLElement) | Ref;\n\nexport type Positions = Array;\n\nconst positionedPoints = ['top', 'right', 'bottom', 'left'];\n\nexport class Position extends AsyncDirective {\n private _host?: LitElement;\n private _element?: Element;\n private _targetCallbackOrRef!: TargetCallbackOrRef;\n private _positions?: Positions;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `position` directive must be used in attribute position.'\n );\n }\n }\n\n render(_targetCallbackOrRef: TargetCallbackOrRef, _positions: Positions) {\n return nothing;\n }\n\n override update(\n part: AttributePart,\n [target, positions]: Parameters\n ) {\n if (this._host === undefined) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n }\n this._element = part.element;\n this._targetCallbackOrRef = target;\n this._positions = positions ?? ['left', 'top', 'width', 'height'];\n return this.render(target, positions);\n }\n\n hostUpdated() {\n this._position();\n }\n\n private _position() {\n const target =\n typeof this._targetCallbackOrRef === 'function'\n ? this._targetCallbackOrRef()\n : this._targetCallbackOrRef?.value;\n const parent = target.offsetParent;\n if (target === undefined || !parent) {\n return;\n }\n const tr = target.getBoundingClientRect();\n const pr = parent.getBoundingClientRect();\n this._positions?.forEach((p) => {\n const x = positionedPoints.includes(p) ? tr[p] - pr[p] : tr[p];\n (this._element as HTMLElement).style[p] = `${x}px`;\n });\n }\n}\n\n/**\n * Positions and sizes the element on which the `position()` directive is used\n * relative to the given target element.\n */\nexport const position = directive(Position);\n"],"names":["positionedPoints","Position","AsyncDirective","constructor","part","super","type","PartType","ELEMENT","Error","render","_targetCallbackOrRef","_positions","nothing","update","target","positions","undefined","this","_host","_a","options","host","addController","_element","element","hostUpdated","_position","value","parent","offsetParent","tr","getBoundingClientRect","pr","_b","forEach","p","x","includes","style","position","directive"],"mappings":"yJAmBA,MAAMA,EAAmB,CAAC,MAAO,QAAS,SAAU,QAE9C,MAAOC,UAAiBC,EAM5BC,YAAYC,GAEV,GADAC,MAAMD,GACFA,EAAKE,OAASC,EAASC,QACzB,MAAUC,MACR,+DAGL,CAEDC,OAAOC,EAA2CC,GAChD,OAAOC,CACR,CAEQC,OACPV,GACCW,EAAQC,UAST,YAPmBC,IAAfC,KAAKC,IACPD,KAAKC,EAAsB,QAAdC,EAAAhB,EAAKiB,eAAS,IAAAD,OAAA,EAAAA,EAAAE,KAC3BJ,KAAKC,EAAMI,cAAcL,OAE3BA,KAAKM,EAAWpB,EAAKqB,QACrBP,KAAKP,EAAuBI,EAC5BG,KAAKN,EAAaI,QAAAA,EAAa,CAAC,OAAQ,MAAO,QAAS,UACjDE,KAAKR,OAAOK,EAAQC,EAC5B,CAEDU,cACER,KAAKS,GACN,CAEOA,YACN,MAAMZ,EACiC,mBAA9BG,KAAKP,EACRO,KAAKP,IACoB,QAAzBS,EAAAF,KAAKP,SAAoB,IAAAS,OAAA,EAAAA,EAAEQ,MAC3BC,EAASd,EAAOe,aACtB,QAAeb,IAAXF,IAAyBc,EAC3B,OAEF,MAAME,EAAKhB,EAAOiB,wBACZC,EAAKJ,EAAOG,wBACH,QAAfE,EAAAhB,KAAKN,SAAU,IAAAsB,GAAAA,EAAEC,SAASC,IACxB,MAAMC,EAAIrC,EAAiBsC,SAASF,GAAKL,EAAGK,GAAKH,EAAGG,GAAKL,EAAGK,GAC3DlB,KAAKM,EAAyBe,MAAMH,GAAQC,EAAH,IAAQ,GAErD,QAOUG,EAAWC,EAAUxC"} \ No newline at end of file +{"version":3,"file":"position.js","sources":["src/position.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {LitElement} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\n\ninterface Positionables {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n}\n\ntype Ref = {value: HTMLElement};\nexport type TargetCallbackOrRef = (() => HTMLElement) | Ref;\n\nexport type Positions = Array;\n\nconst positionedPoints = ['top', 'right', 'bottom', 'left'];\n\nexport class Position extends AsyncDirective {\n private _host?: LitElement;\n private _element?: Element;\n private _targetCallbackOrRef!: TargetCallbackOrRef;\n private _positions?: Positions;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `position` directive must be used in attribute position.'\n );\n }\n }\n\n render(_targetCallbackOrRef: TargetCallbackOrRef, _positions: Positions) {\n return nothing;\n }\n\n override update(\n part: AttributePart,\n [target, positions]: Parameters\n ) {\n if (this._host === undefined) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n }\n this._element = part.element;\n this._targetCallbackOrRef = target;\n this._positions = positions ?? ['left', 'top', 'width', 'height'];\n return this.render(target, positions);\n }\n\n hostUpdated() {\n this._position();\n }\n\n private _position() {\n const target =\n typeof this._targetCallbackOrRef === 'function'\n ? this._targetCallbackOrRef()\n : this._targetCallbackOrRef?.value;\n const parent = target.offsetParent;\n if (target === undefined || !parent) {\n return;\n }\n const tr = target.getBoundingClientRect();\n const pr = parent.getBoundingClientRect();\n this._positions?.forEach((p) => {\n const x = positionedPoints.includes(p) ? tr[p] - pr[p] : tr[p];\n (this._element as HTMLElement).style[p] = `${x}px`;\n });\n }\n}\n\n/**\n * Positions and sizes the element on which the `position()` directive is used\n * relative to the given target element.\n */\nexport const position = directive(Position);\n"],"names":["positionedPoints","Position","AsyncDirective","constructor","part","super","type","PartType","ELEMENT","Error","render","_targetCallbackOrRef","_positions","nothing","update","target","positions","undefined","this","_host","options","host","addController","_element","element","hostUpdated","_position","value","parent","offsetParent","tr","getBoundingClientRect","pr","forEach","p","x","includes","style","position","directive"],"mappings":"yJAwBA,MAAMA,EAAmB,CAAC,MAAO,QAAS,SAAU,QAE9C,MAAOC,UAAiBC,EAM5B,WAAAC,CAAYC,GAEV,GADAC,MAAMD,GACFA,EAAKE,OAASC,EAASC,QACzB,MAAUC,MACR,+DAGL,CAED,MAAAC,CAAOC,EAA2CC,GAChD,OAAOC,CACR,CAEQ,MAAAC,CACPV,GACCW,EAAQC,IAST,YAPmBC,IAAfC,KAAKC,IACPD,KAAKC,EAAQf,EAAKgB,SAASC,KAC3BH,KAAKC,EAAMG,cAAcJ,OAE3BA,KAAKK,EAAWnB,EAAKoB,QACrBN,KAAKP,EAAuBI,EAC5BG,KAAKN,EAAaI,GAAa,CAAC,OAAQ,MAAO,QAAS,UACjDE,KAAKR,OAAOK,EAAQC,EAC5B,CAED,WAAAS,GACEP,KAAKQ,GACN,CAEO,CAAAA,GACN,MAAMX,EACiC,mBAA9BG,KAAKP,EACRO,KAAKP,IACLO,KAAKP,GAAsBgB,MAC3BC,EAASb,EAAOc,aACtB,QAAeZ,IAAXF,IAAyBa,EAC3B,OAEF,MAAME,EAAKf,EAAOgB,wBACZC,EAAKJ,EAAOG,wBAClBb,KAAKN,GAAYqB,SAASC,IACxB,MAAMC,EAAInC,EAAiBoC,SAASF,GAAKJ,EAAGI,GAAKF,EAAGE,GAAKJ,EAAGI,GAC3DhB,KAAKK,EAAyBc,MAAMH,GAAQC,EAAH,IAAQ,GAErD,QAOUG,EAAWC,EAAUtC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.d.ts.map new file mode 100644 index 0000000000..0bfb8b43e8 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LitVirtualizer.d.ts","sourceRoot":"","sources":["src/LitVirtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAO,UAAU,EAAC,MAAM,KAAK,CAAC;AAErC,OAAO,EAAC,KAAK,EAAC,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAML,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,qBAAa,cAAc,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,UAAU;IAEzD,KAAK,EAAE,CAAC,EAAE,CAAM;IAGhB,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAqB;IAGtD,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAsB;IAG3C,MAAM,EAAE,iBAAiB,CAAM;IAG/B,QAAQ,UAAS;IAEjB,gBAAgB;IAIhB,MAAM;IAWN,OAAO,CAAC,KAAK,EAAE,MAAM;IAIrB,IAAI,cAAc,8BAEjB;IAED;;;OAGG;IACH,aAAa,CACX,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAmB;CAI7D"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js new file mode 100644 index 0000000000..7767004bb1 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{__decorate as t}from"../../tslib/tslib.es6.js";import{html as e,LitElement as r}from"../../lit/index.js";import{property as i}from"../../lit/decorators/property.js";import{virtualize as o,virtualizerRef as l,defaultRenderItem as s,defaultKeyFunction as n}from"./virtualize.js";export class LitVirtualizer extends r{constructor(){super(...arguments),this.items=[],this.renderItem=s,this.keyFunction=n,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){const{items:t,renderItem:r,keyFunction:i,layout:l,scroller:s}=this;return e`${o({items:t,renderItem:r,keyFunction:i,layout:l,scroller:s})}`}element(t){return this[l]?.element(t)}get layoutComplete(){return this[l]?.layoutComplete}scrollToIndex(t,e="start"){this.element(t)?.scrollIntoView({block:e})}}t([i({attribute:!1})],LitVirtualizer.prototype,"items",void 0),t([i()],LitVirtualizer.prototype,"renderItem",void 0),t([i()],LitVirtualizer.prototype,"keyFunction",void 0),t([i({attribute:!1})],LitVirtualizer.prototype,"layout",void 0),t([i({reflect:!0,type:Boolean})],LitVirtualizer.prototype,"scroller",void 0); \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js.map new file mode 100644 index 0000000000..1b833568fd --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/LitVirtualizer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LitVirtualizer.js","sourceRoot":"","sources":["src/LitVirtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAC,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EACL,UAAU,EACV,cAAc,EAEd,iBAAiB,EACjB,kBAAkB,GAEnB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,cAA4B,SAAQ,UAAU;IAA3D;;QAEE,UAAK,GAAQ,EAAE,CAAC;QAGhB,eAAU,GAA0B,iBAAiB,CAAC;QAGtD,gBAAW,GAAa,kBAAkB,CAAC;QAG3C,WAAM,GAAsB,EAAE,CAAC;QAG/B,aAAQ,GAAG,KAAK,CAAC;IAmCnB,CAAC;IAjCC,gBAAgB;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM;QACJ,MAAM,EAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC;QAChE,OAAO,IAAI,CAAA,GAAG,UAAU,CAAC;YACvB,KAAK;YACL,UAAU;YACV,WAAW;YACX,MAAM;YACN,QAAQ;SACT,CAAC,EAAE,CAAC;IACP,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,OAAQ,IAA+B,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,cAAc;QAChB,OAAQ,IAA+B,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,KAAa,EACb,WAAmD,OAAO;QAE1D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,CAAC,CAAC;IACzD,CAAC;CACF;AA/CC;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;6CACb;AAGhB;IADC,QAAQ,EAAE;kDAC2C;AAGtD;IADC,QAAQ,EAAE;mDACgC;AAG3C;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;8CACE;AAG/B;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;gDACxB","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {html, LitElement} from 'lit';\nimport {property} from 'lit/decorators/property.js';\nimport {KeyFn} from 'lit/directives/repeat.js';\nimport {LayoutConfigValue} from './layouts/shared/Layout.js';\nimport {\n virtualize,\n virtualizerRef,\n VirtualizerHostElement,\n defaultRenderItem,\n defaultKeyFunction,\n RenderItemFunction,\n} from './virtualize.js';\n\nexport class LitVirtualizer extends LitElement {\n @property({attribute: false})\n items: T[] = [];\n\n @property()\n renderItem: RenderItemFunction = defaultRenderItem;\n\n @property()\n keyFunction: KeyFn = defaultKeyFunction;\n\n @property({attribute: false})\n layout: LayoutConfigValue = {};\n\n @property({reflect: true, type: Boolean})\n scroller = false;\n\n createRenderRoot() {\n return this;\n }\n\n render() {\n const {items, renderItem, keyFunction, layout, scroller} = this;\n return html`${virtualize({\n items,\n renderItem,\n keyFunction,\n layout,\n scroller,\n })}`;\n }\n\n element(index: number) {\n return (this as VirtualizerHostElement)[virtualizerRef]?.element(index);\n }\n\n get layoutComplete() {\n return (this as VirtualizerHostElement)[virtualizerRef]?.layoutComplete;\n }\n\n /**\n * This scrollToIndex() shim is here to provide backwards compatibility with other 0.x versions of\n * lit-virtualizer. It is deprecated and will likely be removed in the 1.0.0 release.\n */\n scrollToIndex(\n index: number,\n position: 'start' | 'center' | 'end' | 'nearest' = 'start'\n ) {\n this.element(index)?.scrollIntoView({block: position});\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.d.ts.map new file mode 100644 index 0000000000..8a7afe10f7 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScrollerController.d.ts","sourceRoot":"","sources":["src/ScrollerController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAE/D,KAAK,sBAAsB,GAAG,MAAM,mBAAmB,CAAC;AACxD,KAAK,iBAAiB,GAAG,MAAM,IAAI,CAAC;AACpC,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE5B,qBAAa,YAAY;IACvB,SAAS,CAAC,KAAK,EAAE,OAAO,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Ae;IAqBvB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,sBAAsB;IAQvB,eAAe,CACpB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,sBAAsB,EAChC,GAAG,EAAE,iBAAiB;IAMjB,kBAAkB,CAAC,WAAW,EAAE,mBAAmB;IAkB1D,OAAO,CAAC,gBAAgB;IAkBjB,MAAM,CAAC,MAAM,EAAE,OAAO;IAgB7B,OAAO,CAAC,OAAO;CAchB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js new file mode 100644 index 0000000000..2490767a10 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +export class ScrollerShim{constructor(t){this._element=null;const e=t??window;this._node=e,t&&(this._element=t)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}}export class ScrollerController extends ScrollerShim{constructor(t,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);const i=this._node;this._originalScrollTo=i.scrollTo,this._originalScrollBy=i.scrollBy,this._originalScroll=i.scroll,this._attach(t)}get _destination(){return this.__destination}get scrolling(){return null!==this._destination}scrollTo(t,e){const i="number"==typeof t&&"number"==typeof e?{left:t,top:e}:t;this._scrollTo(i)}scrollBy(t,e){const i="number"==typeof t&&"number"==typeof e?{left:t,top:e}:t;void 0!==i.top&&(i.top+=this.scrollTop),void 0!==i.left&&(i.left+=this.scrollLeft),this._scrollTo(i)}_nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t)}_scrollTo(t,e=null,i=null){null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=e,this._end=i):this._resetScrollState(),this._nativeScrollTo(t)}_setDestination(t){let{top:e,left:i}=t;return e=void 0===e?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollLeft)),(null===this._destination||i!==this._destination.left||e!==this._destination.top)&&(this.__destination={top:e,left:i,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination)}managedScrollTo(t,e,i){return this._scrollTo(t,e,i),this._updateManagedScrollTo}correctScrollError(t){this.correctingScrollError=!0,requestAnimationFrame((()=>requestAnimationFrame((()=>this.correctingScrollError=!1)))),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(null!==this._destination){const{scrollTop:t,scrollLeft:e}=this;let{top:i,left:l}=this._destination;i=Math.min(i||0,this.maxScrollTop),l=Math.min(l||0,this.maxScrollLeft);const o=Math.abs(i-t),s=Math.abs(l-e);o<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(t){return this._clients.delete(t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js.map new file mode 100644 index 0000000000..ec36074b2d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/ScrollerController.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScrollerController.js","sourceRoot":"","sources":["src/ScrollerController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,OAAO,YAAY;IAIvB,YAAY,OAAiB;QAFnB,aAAQ,GAAsB,IAAI,CAAC;QAG3C,MAAM,IAAI,GAAG,OAAO,IAAI,MAAM,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;SACzB;IACH,CAAC;IAED,IAAW,OAAO;QAChB,OAAO,CACL,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,gBAAgB,IAAI,QAAQ,CAAC,eAAe,CACvE,CAAC;IACJ,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC;IAClD,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC;IACnD,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC;IAED,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;IAClC,CAAC;IAED,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,QAAQ;YAClB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,MAAM;YAC9C,CAAC,CAAC,MAAM,CAAC,WAAW,C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AC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC;YAClC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAC9D;IACH,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ScrollToCoordinates} from './layouts/shared/Layout.js';\n\ntype retargetScrollCallback = () => ScrollToCoordinates;\ntype endScrollCallback = () => void;\ntype Nullable = T | null;\n\nexport class ScrollerShim {\n protected _node: Element | Window;\n protected _element: Nullable = null;\n\n constructor(element?: Element) {\n const node = element ?? window;\n this._node = node;\n if (element) {\n this._element = element;\n }\n }\n\n public get element() {\n return (\n this._element || document.scrollingElement || document.documentElement\n );\n }\n\n public get scrollTop() {\n return this.element.scrollTop || window.scrollY;\n }\n\n public get scrollLeft() {\n return this.element.scrollLeft || window.scrollX;\n }\n\n public get scrollHeight() {\n return this.element.scrollHeight;\n }\n\n public get scrollWidth() {\n return this.element.scrollWidth;\n }\n\n public get viewportHeight() {\n return this._element\n ? this._element.getBoundingClientRect().height\n : window.innerHeight;\n }\n\n public get viewportWidth() {\n return this._element\n ? this._element.getBoundingClientRect().width\n : window.innerWidth;\n }\n\n public get maxScrollTop() {\n return this.scrollHeight - this.viewportHeight;\n }\n\n public get maxScrollLeft() {\n return this.scrollWidth - this.viewportWidth;\n }\n}\n\nexport class ScrollerController extends ScrollerShim {\n private _originalScrollTo:\n | typeof Element.prototype.scrollTo\n | typeof window.scrollTo;\n private _originalScrollBy:\n | typeof Element.prototype.scrollBy\n | typeof window.scrollBy;\n private _originalScroll:\n | typeof Element.prototype.scroll\n | typeof window.scroll;\n private _clients = new Set();\n private _retarget: Nullable = null;\n private _end: Nullable = null;\n private __destination: Nullable = null;\n\n constructor(client: unknown, element?: Element) {\n super(element);\n\n this._checkForArrival = this._checkForArrival.bind(this);\n this._updateManagedScrollTo = this._updateManagedScrollTo.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n this.scrollBy = this.scrollBy.bind(this);\n\n const node = this._node;\n\n this._originalScrollTo = node.scrollTo;\n this._originalScrollBy = node.scrollBy;\n this._originalScroll = node.scroll;\n this._attach(client);\n }\n\n public correctingScrollError = false;\n\n private get _destination() {\n return this.__destination;\n }\n\n public get scrolling() {\n return this._destination !== null;\n }\n\n public scrollTo(options: ScrollToOptions): void;\n public scrollTo(x: number, y: number): void;\n public scrollTo(p1: ScrollToOptions | number, p2?: number): void;\n public scrollTo(p1: ScrollToOptions | number, p2?: number) {\n const options: ScrollToOptions =\n typeof p1 === 'number' && typeof p2 === 'number'\n ? {left: p1, top: p2}\n : (p1 as ScrollToOptions);\n this._scrollTo(options);\n }\n\n public scrollBy(options: ScrollToOptions): void;\n public scrollBy(x: number, y: number): void;\n public scrollBy(p1: ScrollToOptions | number, p2?: number): void;\n public scrollBy(p1: ScrollToOptions | number, p2?: number) {\n const options: ScrollToOptions =\n typeof p1 === 'number' && typeof p2 === 'number'\n ? {left: p1, top: p2}\n : (p1 as ScrollToOptions);\n if (options.top !== undefined) {\n options.top += this.scrollTop;\n }\n if (options.left !== undefined) {\n options.left += this.scrollLeft;\n }\n this._scrollTo(options);\n }\n\n private _nativeScrollTo(options: ScrollToOptions) {\n this._originalScrollTo!.bind(this._element || window)(options);\n }\n\n private _scrollTo(\n options: ScrollToOptions,\n retarget: retargetScrollCallback | null = null,\n end: endScrollCallback | null = null\n ) {\n if (this._end !== null) {\n this._end();\n }\n if (options.behavior === 'smooth') {\n this._setDestination(options);\n this._retarget = retarget;\n this._end = end;\n } else {\n this._resetScrollState();\n }\n this._nativeScrollTo(options);\n }\n\n private _setDestination(options: ScrollToOptions) {\n let {top, left} = options;\n top =\n top === undefined\n ? undefined\n : Math.max(0, Math.min(top, this.maxScrollTop));\n left =\n left === undefined\n ? undefined\n : Math.max(0, Math.min(left, this.maxScrollLeft));\n if (\n this._destination !== null &&\n left === this._destination.left &&\n top === this._destination.top\n ) {\n return false;\n }\n this.__destination = {top, left, behavior: 'smooth'};\n return true;\n }\n\n private _resetScrollState() {\n this.__destination = null;\n this._retarget = null;\n this._end = null;\n }\n\n private _updateManagedScrollTo(coordinates: ScrollToCoordinates) {\n if (this._destination) {\n if (this._setDestination(coordinates)) {\n this._nativeScrollTo(this._destination);\n }\n }\n }\n\n public managedScrollTo(\n options: ScrollToOptions,\n retarget: retargetScrollCallback,\n end: endScrollCallback\n ) {\n this._scrollTo(options, retarget, end);\n return this._updateManagedScrollTo;\n }\n\n public correctScrollError(coordinates: ScrollToCoordinates) {\n this.correctingScrollError = true;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => (this.correctingScrollError = false))\n );\n // Correct the error\n this._nativeScrollTo(coordinates);\n // Then, if we were headed for a specific destination, we continue scrolling:\n // First, we update our target destination, if applicable...\n if (this._retarget) {\n this._setDestination(this._retarget());\n }\n // Then we go ahead and resume scrolling\n if (this._destination) {\n this._nativeScrollTo(this._destination);\n }\n }\n\n private _checkForArrival() {\n if (this._destination !== null) {\n const {scrollTop, scrollLeft} = this;\n let {top, left} = this._destination;\n top = Math.min(top || 0, this.maxScrollTop);\n left = Math.min(left || 0, this.maxScrollLeft);\n const topDiff = Math.abs(top - scrollTop);\n const leftDiff = Math.abs(left - scrollLeft);\n // We check to see if we've arrived at our destination.\n if (topDiff < 1 && leftDiff < 1) {\n if (this._end) {\n this._end();\n }\n this._resetScrollState();\n }\n }\n }\n\n public detach(client: unknown) {\n this._clients.delete(client);\n\n /**\n * If there aren't any more clients, then return the node's default\n * scrolling methods\n */\n if (this._clients.size === 0) {\n this._node.scrollTo = this._originalScrollTo;\n this._node.scrollBy = this._originalScrollBy;\n this._node.scroll = this._originalScroll;\n this._node.removeEventListener('scroll', this._checkForArrival);\n }\n return null;\n }\n\n private _attach(client: unknown) {\n this._clients.add(client);\n\n /**\n * The node should only have the methods shimmed when adding the first\n * client – otherwise it's redundant\n */\n if (this._clients.size === 1) {\n this._node.scrollTo = this.scrollTo;\n this._node.scrollBy = this.scrollBy;\n this._node.scroll = this.scrollTo;\n this._node.addEventListener('scroll', this._checkForArrival);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.d.ts.map new file mode 100644 index 0000000000..bf7b956ec9 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Virtualizer.d.ts","sourceRoot":"","sources":["src/Virtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,OAAO,EAEP,iBAAiB,EAEjB,iBAAiB,EAIjB,mBAAmB,EAGnB,oBAAoB,EAGpB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACd,MAAM,aAAa,CAAC;AAWrB;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,cAAc,QAEhE;AAED,eAAO,MAAM,cAAc,eAA2B,CAAC;AAGvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,mBAAmB;QAC3B,YAAY,EAAE,iBAAiB,CAAC;QAChC,iBAAiB,EAAE,sBAAsB,CAAC;QAC1C,QAAQ,EAAE,aAAa,CAAC;KACzB;CACF;AAED,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,CAAC,cAAc,CAAC,CAAC,EAAE,WAAW,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC3D;AAUD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,iB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CAAC,gBAAgB;IAiBxB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;YAuBX,YAAY;IAc1B,OAAO,CAAC,mBAAmB;IAYpB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,4BAA4B,GAAG,SAAS;IAYvE,OAAO,CAAC,sBAAsB;IAqB9B;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IASlC;;;OAGG;IACH,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,iBAAiB;IASzB,IAAW,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CASzC;IAED,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,6BAA6B;IAOrC,OAAO,CAAC,yBAAyB;IAOjC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,oBAAoB;CAmB7B"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js new file mode 100644 index 0000000000..98c50fd03d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{RangeChangedEvent as t,VisibilityChangedEvent as e,UnpinnedEvent as i}from"./events.js";import{ScrollerController as s}from"./ScrollerController.js";let l=window?.ResizeObserver;export function provideResizeObserver(t){l=t}export const virtualizerRef=Symbol("virtualizerRef");const n="virtualizer-sizer";let r;export class Virtualizer{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t)}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const e=t.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new l((()=>this._hostElementSizeChanged())),this._childrenRO=new l(this._childrenSizeChanged.bind(this))}_initHostElement(t){const e=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),e[virtualizerRef]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=function getClippingAncestors(t,e=!1){let i=!1;return function getElementAncestors(t,e=!1){const i=[];let s=e?t:getParentElement(t);for(;null!==s;)i.push(s),s=getParentElement(s);return i}(t,e).filter((t=>{if(i)return!1;const e=getComputedStyle(t);return i="fixed"===e.position,"visible"!==e.overflow}))}(this._hostElement,t),this._scrollerController=new s(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen()}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((t=>this._childrenRO.observe(t))),this._scrollEventListeners.forEach((t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((t=>t.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected")}_applyVirtualizerStyles(){const t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let e=t.querySelector(`[${n}]`);e||(e=document.createElement("div"),e.setAttribute(n,""),t.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(n,""),this._sizer=e}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const e=t.type||r;if("function"==typeof e&&this._layout instanceof e){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let e,i;if("function"==typeof t.type){i=t.type;const s={...t};delete s.type,e=s}else e=t;void 0===i&&(r=i=(await import("./layouts/flow.js")).FlowLayout),this._layout=new i((t=>this._handleLayoutMessage(t)),e),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const t=window.performance.now(),e=t-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter((e=>e.startTime>=this._benchmarkStart&&e.startTimet+e.duration),0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:i}}return null}_measureChildren(){const t={},e=this._children,i=this._measureChildOverride||this._measureChild;for(let s=0;sthis._childrenRO.observe(t))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end")}_updateLayout(){this._layout&&this._scrollerController&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(t){console.warn("Error measuring performance data: ",t)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t)}_handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new i)}get _children(){const t=[];let e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(n)||t.push(e),e=e.nextElementSibling;return t}_updateView(){const t=this._hostElement,e=this._scrollerController?.element,i=this._layout;if(t&&e&&i){let s,l,n,r;const o=t.getBoundingClientRect();s=0,l=0,n=window.innerHeight,r=window.innerWidth;const h=this._clippingAncestors.map((t=>t.getBoundingClientRect()));h.unshift(o);for(const t of h)s=Math.max(s,t.top),l=Math.max(l,t.left),n=Math.min(n,t.bottom),r=Math.min(r,t.right);const a=e.getBoundingClientRect(),_={left:o.left-a.left,top:o.top-a.top},c={width:e.scrollWidth,height:e.scrollHeight},u=s-o.top+t.scrollTop,d=l-o.left+t.scrollLeft,m=n-s,p=r-l;i.viewportSize={width:p,height:m},i.viewportScroll={top:u,left:d},i.totalScrollSize=c,i.offsetWithinScroller=_}}_sizeHostElement(t){const e=82e5,i=t&&null!==t.width?Math.min(e,t.width):0,s=t&&null!==t.height?Math.min(e,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${s}px)`;else{const t=this._hostElement.style;t.minWidth=i?`${i}px`:"100%",t.minHeight=s?`${s}px`:"100%"}}_positionChildren(t){t&&t.forEach((({top:t,left:e,width:i,height:s,xOffset:l,yOffset:n},r)=>{const o=this._children[r-this._first];o&&(o.style.position="absolute",o.style.boxSizing="border-box",o.style.transform=`translate(${e}px, ${t}px)`,void 0!==i&&(o.style.width=i+"px"),void 0!==s&&(o.style.height=s+"px"),o.style.left=void 0===l?null:l+"px",o.style.top=void 0===n?null:n+"px")}))}async _adjustRange(t){const{_first:e,_last:i,_firstVisible:s,_lastVisible:l}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==s||this._lastVisible!==l}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:e}=this._scrollerController,{top:i,left:s}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-i,left:e-s})}}element(t){return t===1/0&&(t=this._items.length-1),void 0===this._items?.[t]?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){const e=this._layout.getScrollIntoViewCoordinates(t),{behavior:i}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:i}),(()=>this._layout.getScrollIntoViewCoordinates(t)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:e}=this._scrollIntoViewTarget||{};e&&t?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new t({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new e({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((t,e)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=e}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){if(this._layout?.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function getMarginValue(t){const e=t?parseFloat(t):NaN;return Number.isNaN(e)?0:e}function getParentElement(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;const e=t.parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host||null} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js.map new file mode 100644 index 0000000000..dec21a0997 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/Virtualizer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Virtualizer.js","sourceRoot":"","sources":["src/Virtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAE3D,iEAAiE;AACjE,4DAA4D;AAC5D,0DAA0D;AAC1D,gEAAgE;AAChE,gEAAgE;AAChE,4BAA4B;AAC5B,IAAI,eAAe,GAAsC,MAAM,EAAE,cAAc,CAAC;AAEhF;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAA2B;IAC/D,eAAe,GAAG,IAAI,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACvD,MAAM,eAAe,GAAG,mBAAmB,CAAC;AA4C5C,IAAI,wBAA2C,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,OAAO,WAAW;IAmItB,YAAY,MAAyB;QAlI7B,oBAAe,GAAkB,IAAI,CAAC;QAEtC,YAAO,GAAkB,IAAI,CAAC;QAE9B,uBAAkB,GAAkB,EAAE,CAAC;QAE/C;;;WAGG;QACK,gBAAW,GAAgB,IAAI,CAAC;QAExC;;;WAGG;QACK,iBAAY,GAAuC,IAAI,CAAC;QAEhE;;WAEG;QACK,iBAAY,GAA0B,IAAI,CAAC;QAEnD,2BAA2B;QACnB,uBAAkB,GAA6B,IAAI,CAAC;QAEpD,kBAAa,GAAG,IAAI,GAAG,EAAwB,CAAC;QAEhD,kBAAa,GAAG,IAAI,CAAC;QAErB,kBAAa,GAAG,IAAI,CAAC;QAErB,uBAAkB,GAAG,IAAI,CAAC;QAO1B,wBAAm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import {\n ItemBox,\n Margins,\n LayoutConfigValue,\n ChildPositions,\n ChildMeasurements,\n Layout,\n LayoutConstructor,\n LayoutSpecifier,\n StateChangedMessage,\n Size,\n InternalRange,\n MeasureChildFunction,\n ScrollToCoordinates,\n BaseLayoutConfig,\n LayoutHostMessage,\n} from './layouts/shared/Layout.js';\nimport {\n RangeChangedEvent,\n VisibilityChangedEvent,\n UnpinnedEvent,\n} from './events.js';\nimport {ScrollerController} from './ScrollerController.js';\n\n// Virtualizer depends on `ResizeObserver`, which is supported in\n// all modern browsers. For developers whose browser support\n// matrix includes older browsers, we include a compatible\n// polyfill in the package; this bit of module state facilitates\n// a simple mechanism (see ./polyfillLoaders/ResizeObserver.js.)\n// for loading the polyfill.\nlet _ResizeObserver: typeof ResizeObserver | undefined = window?.ResizeObserver;\n\n/**\n * Call this function to provide a `ResizeObserver` polyfill for Virtualizer to use.\n * @param Ctor Constructor for a `ResizeObserver` polyfill (recommend using the one provided with the Virtualizer package)\n */\nexport function provideResizeObserver(Ctor: typeof ResizeObserver) {\n _ResizeObserver = Ctor;\n}\n\nexport const virtualizerRef = Symbol('virtualizerRef');\nconst SIZER_ATTRIBUTE = 'virtualizer-sizer';\n\ndeclare global {\n interface HTMLElementEventMap {\n rangeChanged: RangeChangedEvent;\n visibilityChanged: VisibilityChangedEvent;\n unpinned: UnpinnedEvent;\n }\n}\n\nexport interface VirtualizerHostElement extends HTMLElement {\n [virtualizerRef]?: Virtualizer;\n}\n\n/**\n * A very limited proxy object for a virtualizer child,\n * returned by Virtualizer.element(idx: number). Introduced\n * to enable scrolling a virtual element into view using\n * a call that looks and behaves essentially the same as for\n * a real Element. May be useful for other things later.\n */\nexport interface VirtualizerChildElementProxy {\n scrollIntoView: (options?: ScrollIntoViewOptions) => void;\n}\n\n/**\n * Used internally for scrolling a (possibly virtual) element\n * into view, given its index\n */\ninterface ScrollElementIntoViewOptions extends ScrollIntoViewOptions {\n index: number;\n}\n\nexport interface VirtualizerConfig {\n layout?: LayoutConfigValue;\n\n /**\n * The parent of all child nodes to be rendered.\n */\n hostElement: VirtualizerHostElement;\n\n scroller?: boolean;\n}\n\nlet DefaultLayoutConstructor: LayoutConstructor;\n\n/**\n * Provides virtual scrolling boilerplate.\n *\n * Extensions of this class must set hostElement and layout.\n *\n * Extensions of this class must also override VirtualRepeater's DOM\n * manipulation methods.\n */\nexport class Virtualizer {\n private _benchmarkStart: number | null = null;\n\n private _layout: Layout | null = null;\n\n private _clippingAncestors: HTMLElement[] = [];\n\n /**\n * Layout provides these values, we set them on _render().\n * TODO @straversi: Can we find an XOR type, usable for the key here?\n */\n private _scrollSize: Size | null = null;\n\n /**\n * Difference between scroll target's current and required scroll offsets.\n * Provided by layout.\n */\n private _scrollError: {left: number; top: number} | null = null;\n\n /**\n * A list of the positions (top, left) of the children in the current range.\n */\n private _childrenPos: ChildPositions | null = null;\n\n // TODO: (graynorton): type\n private _childMeasurements: ChildMeasurements | null = null;\n\n private _toBeMeasured = new Map();\n\n private _rangeChanged = true;\n\n private _itemsChanged = true;\n\n private _visibilityChanged = true;\n\n /**\n * The HTMLElement that hosts the virtualizer. Set by hostElement.\n */\n protected _hostElement?: VirtualizerHostElement;\n\n private _scrollerController: ScrollerController | null = null;\n\n private _isScroller = false;\n\n private _sizer: HTMLElement | null = null;\n\n /**\n * Resize observer attached to hostElement.\n */\n private _hostElementRO: ResizeObserver | null = null;\n\n /**\n * Resize observer attached to children.\n */\n private _childrenRO: ResizeObserver | null = null;\n\n private _mutationObserver: MutationObserver | null = null;\n\n private _scrollEventListeners: (Element | Window)[] = [];\n private _scrollEventListenerOptions: AddEventListenerOptions = {\n passive: true,\n };\n\n // TODO (graynorton): Rethink, per longer comment below\n\n private _loadListener = this._childLoaded.bind(this);\n\n /**\n * Index of element to scroll into view, plus scroll\n * behavior options, as imperatively specified via\n * `element(index).scrollIntoView()`\n */\n private _scrollIntoViewTarget: ScrollElementIntoViewOptions | null = null;\n\n private _updateScrollIntoViewCoordinates:\n | ((coordinates: ScrollToCoordinates) => void)\n | null = null;\n\n /**\n * Items to render. Set by items.\n */\n private _items: Array = [];\n\n /**\n * Index of the first child in the range, not necessarily the first visible child.\n * TODO @straversi: Consider renaming these.\n */\n protected _first = -1;\n\n /**\n * Index of the last child in the range.\n */\n protected _last = -1;\n\n /**\n * Index of the first item intersecting the viewport.\n */\n private _firstVisible = -1;\n\n /**\n * Index of the last item intersecting the viewport.\n */\n private _lastVisible = -1;\n\n protected _scheduled = new WeakSet();\n\n /**\n * Invoked at the end of each render cycle: children in the range are\n * measured, and their dimensions passed to this callback. Use it to layout\n * children as needed.\n */\n protected _measureCallback: ((sizes: ChildMeasurements) => void) | null =\n null;\n\n protected _measureChildOverride: MeasureChildFunction | null = null;\n\n /**\n * State for `layoutComplete` promise\n */\n private _layoutCompletePromise: Promise | null = null;\n private _layoutCompleteResolver: Function | null = null;\n private _layoutCompleteRejecter: Function | null = null;\n private _pendingLayoutComplete: number | null = null;\n\n /**\n * Layout initialization is async because we dynamically load\n * the default layout if none is specified. This state is to track\n * whether init is complete.\n */\n private _layoutInitialized: Promise | null = null;\n\n constructor(config: VirtualizerConfig) {\n if (!config) {\n throw new Error(\n 'Virtualizer constructor requires a configuration object'\n );\n }\n if (config.hostElement) {\n this._init(config);\n } else {\n throw new Error(\n 'Virtualizer configuration requires the \"hostElement\" property'\n );\n }\n }\n\n set items(items: Array | undefined) {\n if (Array.isArray(items) && items !== this._items) {\n this._itemsChanged = true;\n this._items = items;\n this._schedule(this._updateLayout);\n }\n }\n\n _init(config: VirtualizerConfig) {\n this._isScroller = !!config.scroller;\n this._initHostElement(config);\n // If no layout is specified, we make an empty\n // layout config, which will result in the default\n // layout with default parameters\n const layoutConfig = config.layout || ({} as BaseLayoutConfig);\n // Save the promise returned by `_initLayout` as a state\n // variable we can check before updating layout config\n this._layoutInitialized = this._initLayout(layoutConfig);\n }\n\n private _initObservers() {\n this._mutationObserver = new MutationObserver(\n this._finishDOMUpdate.bind(this)\n );\n this._hostElementRO = new _ResizeObserver!(() =>\n this._hostElementSizeChanged()\n );\n this._childrenRO = new _ResizeObserver!(\n this._childrenSizeChanged.bind(this)\n );\n }\n\n _initHostElement(config: VirtualizerConfig) {\n const hostElement = (this._hostElement = config.hostElement);\n this._applyVirtualizerStyles();\n hostElement[virtualizerRef] = this;\n }\n\n connected() {\n this._initObservers();\n const includeSelf = this._isScroller;\n this._clippingAncestors = getClippingAncestors(\n this._hostElement!,\n includeSelf\n );\n\n this._scrollerController = new ScrollerController(\n this,\n this._clippingAncestors[0]\n );\n\n this._schedule(this._updateLayout);\n this._observeAndListen();\n }\n\n _observeAndListen() {\n this._mutationObserver!.observe(this._hostElement!, {childList: true});\n this._hostElementRO!.observe(this._hostElement!);\n this._scrollEventListeners.push(window);\n window.addEventListener('scroll', this, this._scrollEventListenerOptions);\n this._clippingAncestors.forEach((ancestor) => {\n ancestor.addEventListener(\n 'scroll',\n this,\n this._scrollEventListenerOptions\n );\n this._scrollEventListeners.push(ancestor);\n this._hostElementRO!.observe(ancestor);\n });\n this._hostElementRO!.observe(this._scrollerController!.element);\n this._children.forEach((child) => this._childrenRO!.observe(child));\n this._scrollEventListeners.forEach((target) =>\n target.addEventListener('scroll', this, this._scrollEventListenerOptions)\n );\n }\n\n disconnected() {\n this._scrollEventListeners.forEach((target) =>\n target.removeEventListener(\n 'scroll',\n this,\n this._scrollEventListenerOptions\n )\n );\n this._scrollEventListeners = [];\n this._clippingAncestors = [];\n this._scrollerController?.detach(this);\n this._scrollerController = null;\n this._mutationObserver?.disconnect();\n this._mutationObserver = null;\n this._hostElementRO?.disconnect();\n this._hostElementRO = null;\n this._childrenRO?.disconnect();\n this._childrenRO = null;\n this._rejectLayoutCompletePromise('disconnected');\n }\n\n private _applyVirtualizerStyles() {\n const hostElement = this._hostElement!;\n // Would rather set these CSS properties on the host using Shadow Root\n // style scoping (and falling back to a global stylesheet where native\n // Shadow DOM is not available), but this Mobile Safari bug is preventing\n // that from working: https://bugs.webkit.org/show_bug.cgi?id=226195\n const style = hostElement.style as CSSStyleDeclaration & {contain: string};\n style.display = style.display || 'block';\n style.position = style.position || 'relative';\n style.contain = style.contain || 'size layout';\n\n if (this._isScroller) {\n style.overflow = style.overflow || 'auto';\n style.minHeight = style.minHeight || '150px';\n }\n }\n\n _getSizer() {\n const hostElement = this._hostElement!;\n if (!this._sizer) {\n // Use a preexisting sizer element if provided (for better integration\n // with vDOM renderers)\n let sizer = hostElement.querySelector(\n `[${SIZER_ATTRIBUTE}]`\n ) as HTMLElement;\n if (!sizer) {\n sizer = document.createElement('div');\n sizer.setAttribute(SIZER_ATTRIBUTE, '');\n hostElement.appendChild(sizer);\n }\n // When the scrollHeight is large, the height of this element might be\n // ignored. Setting content and font-size ensures the element has a size.\n Object.assign(sizer.style, {\n position: 'absolute',\n margin: '-2px 0 0 0',\n padding: 0,\n visibility: 'hidden',\n fontSize: '2px',\n });\n sizer.textContent = ' ';\n sizer.setAttribute(SIZER_ATTRIBUTE, '');\n this._sizer = sizer;\n }\n return this._sizer;\n }\n\n async updateLayoutConfig(layoutConfig: LayoutConfigValue) {\n // If layout initialization hasn't finished yet, we wait\n // for it to finish so we can check whether the new config\n // is compatible with the existing layout before proceeding.\n await this._layoutInitialized;\n const Ctor =\n ((layoutConfig as LayoutSpecifier).type as LayoutConstructor) ||\n // The new config is compatible with the current layout,\n // so we update the config and return true to indicate\n // a successful update\n DefaultLayoutConstructor;\n if (typeof Ctor === 'function' && this._layout instanceof Ctor) {\n const config = {...(layoutConfig as LayoutSpecifier)} as {\n type?: LayoutConstructor;\n };\n delete config.type;\n this._layout.config = config as BaseLayoutConfig;\n // The new config requires a different layout altogether, but\n // to limit implementation complexity we don't support dynamically\n // changing the layout of an existing virtualizer instance.\n // Returning false here lets the caller know that they should\n // instead make a new virtualizer instance with the desired layout.\n return true;\n }\n return false;\n }\n\n private async _initLayout(layoutConfig: LayoutConfigValue) {\n let config: BaseLayoutConfig | undefined;\n let Ctor: LayoutConstructor | undefined;\n if (typeof (layoutConfig as LayoutSpecifier).type === 'function') {\n // If we have a full LayoutSpecifier, the `type` property\n // gives us our constructor...\n Ctor = (layoutConfig as LayoutSpecifier).type as LayoutConstructor;\n // ...while the rest of the specifier is our layout config\n const copy = {...(layoutConfig as LayoutSpecifier)} as {\n type?: LayoutConstructor;\n };\n delete copy.type;\n config = copy as BaseLayoutConfig;\n } else {\n // If we don't have a full LayoutSpecifier, we just\n // have a config for the default layout\n config = layoutConfig as BaseLayoutConfig;\n }\n\n if (Ctor === undefined) {\n // If we don't have a constructor yet, load the default\n DefaultLayoutConstructor = Ctor = (await import('./layouts/flow.js'))\n .FlowLayout as unknown as LayoutConstructor;\n }\n\n this._layout = new Ctor(\n (message: LayoutHostMessage) => this._handleLayoutMessage(message),\n config\n );\n\n if (\n this._layout.measureChildren &&\n typeof this._layout.updateItemSizes === 'function'\n ) {\n if (typeof this._layout.measureChildren === 'function') {\n this._measureChildOverride = this._layout.measureChildren;\n }\n this._measureCallback = this._layout.updateItemSizes.bind(this._layout);\n }\n\n if (this._layout.listenForChildLoadEvents) {\n this._hostElement!.addEventListener('load', this._loadListener, true);\n }\n\n this._schedule(this._updateLayout);\n }\n\n // TODO (graynorton): Rework benchmarking so that it has no API and\n // instead is always on except in production builds\n startBenchmarking() {\n if (this._benchmarkStart === null) {\n this._benchmarkStart = window.performance.now();\n }\n }\n\n stopBenchmarking() {\n if (this._benchmarkStart !== null) {\n const now = window.performance.now();\n const timeElapsed = now - this._benchmarkStart;\n const entries = performance.getEntriesByName(\n 'uv-virtualizing',\n 'measure'\n );\n const virtualizationTime = entries\n .filter(\n (e) => e.startTime >= this._benchmarkStart! && e.startTime < now\n )\n .reduce((t, m) => t + m.duration, 0);\n this._benchmarkStart = null;\n return {timeElapsed, virtualizationTime};\n }\n return null;\n }\n\n private _measureChildren(): void {\n const mm: ChildMeasurements = {};\n const children = this._children;\n const fn = this._measureChildOverride || this._measureChild;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n const idx = this._first + i;\n if (this._itemsChanged || this._toBeMeasured.has(child)) {\n mm[idx] = fn.call(this, child, this._items[idx]);\n }\n }\n this._childMeasurements = mm;\n this._schedule(this._updateLayout);\n this._toBeMeasured.clear();\n }\n\n /**\n * Returns the width, height, and margins of the given child.\n */\n _measureChild(element: Element): ItemBox {\n // offsetWidth doesn't take transforms in consideration, so we use\n // getBoundingClientRect which does.\n const {width, height} = element.getBoundingClientRect();\n return Object.assign({width, height}, getMargins(element));\n }\n\n protected async _schedule(method: Function): Promise {\n if (!this._scheduled.has(method)) {\n this._scheduled.add(method);\n await Promise.resolve();\n this._scheduled.delete(method);\n method.call(this);\n }\n }\n\n async _updateDOM(state: StateChangedMessage) {\n this._scrollSize = state.scrollSize;\n this._adjustRange(state.range);\n this._childrenPos = state.childPositions;\n this._scrollError = state.scrollError || null;\n const {_rangeChanged, _itemsChanged} = this;\n if (this._visibilityChanged) {\n this._notifyVisibility();\n this._visibilityChanged = false;\n }\n if (_rangeChanged || _itemsChanged) {\n this._notifyRange();\n this._rangeChanged = false;\n }\n this._finishDOMUpdate();\n }\n\n _finishDOMUpdate() {\n this._children.forEach((child) => this._childrenRO!.observe(child));\n this._checkScrollIntoViewTarget(this._childrenPos);\n this._positionChildren(this._childrenPos);\n this._sizeHostElement(this._scrollSize);\n this._correctScrollError();\n if (this._benchmarkStart && 'mark' in window.performance) {\n window.performance.mark('uv-end');\n }\n }\n\n _updateLayout() {\n // Only update the layout and trigger a re-render if we have:\n // a) A layout\n // b) A scrollerController, which means we're connected\n if (this._layout && this._scrollerController) {\n this._layout.items = this._items;\n this._updateView();\n if (this._childMeasurements !== null) {\n // If the layout has been changed, we may have measurements but no callback\n if (this._measureCallback) {\n this._measureCallback(this._childMeasurements);\n }\n this._childMeasurements = null;\n }\n this._layout.reflowIfNeeded();\n if (this._benchmarkStart && 'mark' in window.performance) {\n window.performance.mark('uv-end');\n }\n }\n }\n\n private _handleScrollEvent() {\n if (this._benchmarkStart && 'mark' in window.performance) {\n try {\n window.performance.measure('uv-virtualizing', 'uv-start', 'uv-end');\n } catch (e) {\n console.warn('Error measuring performance data: ', e);\n }\n window.performance.mark('uv-start');\n }\n if (this._scrollerController!.correctingScrollError === false) {\n // This is a user-initiated scroll, so we unpin the layout\n this._layout?.unpin();\n }\n this._schedule(this._updateLayout);\n }\n\n handleEvent(event: CustomEvent) {\n switch (event.type) {\n case 'scroll':\n if (\n event.currentTarget === window ||\n this._clippingAncestors.includes(event.currentTarget as HTMLElement)\n ) {\n this._handleScrollEvent();\n }\n break;\n default:\n console.warn('event not handled', event);\n }\n }\n\n _handleLayoutMessage(message: LayoutHostMessage) {\n if (message.type === 'stateChanged') {\n this._updateDOM(message);\n } else if (message.type === 'visibilityChanged') {\n this._firstVisible = message.firstVisible;\n this._lastVisible = message.lastVisible;\n this._notifyVisibility();\n } else if (message.type === 'unpinned') {\n this._hostElement!.dispatchEvent(new UnpinnedEvent());\n }\n }\n\n get _children(): Array {\n const arr: Array = [];\n let next = this._hostElement!.firstElementChild as HTMLElement;\n while (next) {\n if (!next.hasAttribute(SIZER_ATTRIBUTE)) {\n arr.push(next);\n }\n next = next.nextElementSibling as HTMLElement;\n }\n return arr;\n }\n\n private _updateView() {\n const hostElement = this._hostElement;\n const scrollingElement = this._scrollerController?.element;\n const layout = this._layout;\n\n if (hostElement && scrollingElement && layout) {\n let top, left, bottom, right;\n\n const hostElementBounds = hostElement.getBoundingClientRect();\n\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n\n const ancestorBounds = this._clippingAncestors.map((ancestor) =>\n ancestor.getBoundingClientRect()\n );\n ancestorBounds.unshift(hostElementBounds);\n\n for (const bounds of ancestorBounds) {\n top = Math.max(top, bounds.top);\n left = Math.max(left, bounds.left);\n bottom = Math.min(bottom, bounds.bottom);\n right = Math.min(right, bounds.right);\n }\n\n const scrollingElementBounds = scrollingElement.getBoundingClientRect();\n\n const offsetWithinScroller = {\n left: hostElementBounds.left - scrollingElementBounds.left,\n top: hostElementBounds.top - scrollingElementBounds.top,\n };\n\n const totalScrollSize = {\n width: scrollingElement.scrollWidth,\n height: scrollingElement.scrollHeight,\n };\n\n const scrollTop = top - hostElementBounds.top + hostElement.scrollTop;\n const scrollLeft = left - hostElementBounds.left + hostElement.scrollLeft;\n\n const height = bottom - top;\n const width = right - left;\n\n layout.viewportSize = {width, height};\n layout.viewportScroll = {top: scrollTop, left: scrollLeft};\n layout.totalScrollSize = totalScrollSize;\n layout.offsetWithinScroller = offsetWithinScroller;\n }\n }\n\n /**\n * Styles the host element so that its size reflects the\n * total size of all items.\n */\n private _sizeHostElement(size?: Size | null) {\n // Some browsers seem to crap out if the host element gets larger than\n // a certain size, so we clamp it here (this value based on ad hoc\n // testing in Chrome / Safari / Firefox Mac)\n const max = 8200000;\n const h = size && size.width !== null ? Math.min(max, size.width) : 0;\n const v = size && size.height !== null ? Math.min(max, size.height) : 0;\n\n if (this._isScroller) {\n this._getSizer().style.transform = `translate(${h}px, ${v}px)`;\n } else {\n const style = this._hostElement!.style;\n (style.minWidth as string | null) = h ? `${h}px` : '100%';\n (style.minHeight as string | null) = v ? `${v}px` : '100%';\n }\n }\n\n /**\n * Sets the top and left transform style of the children from the values in\n * pos.\n */\n private _positionChildren(pos: ChildPositions | null) {\n if (pos) {\n pos.forEach(({top, left, width, height, xOffset, yOffset}, index) => {\n const child = this._children[index - this._first];\n if (child) {\n child.style.position = 'absolute';\n child.style.boxSizing = 'border-box';\n child.style.transform = `translate(${left}px, ${top}px)`;\n if (width !== undefined) {\n child.style.width = width + 'px';\n }\n if (height !== undefined) {\n child.style.height = height + 'px';\n }\n (child.style.left as string | null) =\n xOffset === undefined ? null : xOffset + 'px';\n (child.style.top as string | null) =\n yOffset === undefined ? null : yOffset + 'px';\n }\n });\n }\n }\n\n private async _adjustRange(range: InternalRange) {\n const {_first, _last, _firstVisible, _lastVisible} = this;\n this._first = range.first;\n this._last = range.last;\n this._firstVisible = range.firstVisible;\n this._lastVisible = range.lastVisible;\n this._rangeChanged =\n this._rangeChanged || this._first !== _first || this._last !== _last;\n this._visibilityChanged =\n this._visibilityChanged ||\n this._firstVisible !== _firstVisible ||\n this._lastVisible !== _lastVisible;\n }\n\n private _correctScrollError() {\n if (this._scrollError) {\n const {scrollTop, scrollLeft} = this._scrollerController!;\n const {top, left} = this._scrollError;\n this._scrollError = null;\n this._scrollerController!.correctScrollError({\n top: scrollTop - top,\n left: scrollLeft - left,\n });\n }\n }\n\n public element(index: number): VirtualizerChildElementProxy | undefined {\n if (index === Infinity) {\n index = this._items.length - 1;\n }\n return this._items?.[index] === undefined\n ? undefined\n : {\n scrollIntoView: (options: ScrollIntoViewOptions = {}) =>\n this._scrollElementIntoView({...options, index}),\n };\n }\n\n private _scrollElementIntoView(options: ScrollElementIntoViewOptions) {\n if (options.index >= this._first && options.index <= this._last) {\n this._children[options.index - this._first].scrollIntoView(options);\n } else {\n options.index = Math.min(options.index, this._items.length - 1);\n if (options.behavior === 'smooth') {\n const coordinates = this._layout!.getScrollIntoViewCoordinates(options);\n const {behavior} = options;\n this._updateScrollIntoViewCoordinates =\n this._scrollerController!.managedScrollTo(\n Object.assign(coordinates, {behavior}),\n () => this._layout!.getScrollIntoViewCoordinates(options),\n () => (this._scrollIntoViewTarget = null)\n );\n this._scrollIntoViewTarget = options;\n } else {\n this._layout!.pin = options;\n }\n }\n }\n\n /**\n * If we are smoothly scrolling to an element and the target element\n * is in the DOM, we update our target coordinates as needed\n */\n private _checkScrollIntoViewTarget(pos: ChildPositions | null) {\n const {index} = this._scrollIntoViewTarget || {};\n if (index && pos?.has(index)) {\n this._updateScrollIntoViewCoordinates!(\n this._layout!.getScrollIntoViewCoordinates(this._scrollIntoViewTarget!)\n );\n }\n }\n\n /**\n * Emits a rangechange event with the current first, last, firstVisible, and\n * lastVisible.\n */\n private _notifyRange() {\n this._hostElement!.dispatchEvent(\n new RangeChangedEvent({first: this._first, last: this._last})\n );\n }\n\n private _notifyVisibility() {\n this._hostElement!.dispatchEvent(\n new VisibilityChangedEvent({\n first: this._firstVisible,\n last: this._lastVisible,\n })\n );\n }\n\n public get layoutComplete(): Promise {\n // Lazily create promise\n if (!this._layoutCompletePromise) {\n this._layoutCompletePromise = new Promise((resolve, reject) => {\n this._layoutCompleteResolver = resolve;\n this._layoutCompleteRejecter = reject;\n });\n }\n return this._layoutCompletePromise;\n }\n\n private _rejectLayoutCompletePromise(reason: string) {\n if (this._layoutCompleteRejecter !== null) {\n this._layoutCompleteRejecter(reason);\n }\n this._resetLayoutCompleteState();\n }\n\n private _scheduleLayoutComplete() {\n // Don't do anything unless we have a pending promise\n // And only request a frame if we haven't already done so\n if (this._layoutCompletePromise && this._pendingLayoutComplete === null) {\n // Wait one additional frame to be sure the layout is stable\n this._pendingLayoutComplete = requestAnimationFrame(() =>\n requestAnimationFrame(() => this._resolveLayoutCompletePromise())\n );\n }\n }\n\n private _resolveLayoutCompletePromise() {\n if (this._layoutCompleteResolver !== null) {\n this._layoutCompleteResolver();\n }\n this._resetLayoutCompleteState();\n }\n\n private _resetLayoutCompleteState() {\n this._layoutCompletePromise = null;\n this._layoutCompleteResolver = null;\n this._layoutCompleteRejecter = null;\n this._pendingLayoutComplete = null;\n }\n\n /**\n * Render and update the view at the next opportunity with the given\n * hostElement size.\n */\n private _hostElementSizeChanged() {\n this._schedule(this._updateLayout);\n }\n\n // TODO (graynorton): Rethink how this works. Probably child loading is too specific\n // to have dedicated support for; might want some more generic lifecycle hooks for\n // layouts to use. Possibly handle measurement this way, too, or maybe that remains\n // a first-class feature?\n\n private _childLoaded() {}\n\n // This is the callback for the ResizeObserver that watches the\n // virtualizer's children. We land here at the end of every virtualizer\n // update cycle that results in changes to physical items, and we also\n // end up here if one or more children change size independently of\n // the virtualizer update cycle.\n private _childrenSizeChanged(changes: ResizeObserverEntry[]) {\n // Only measure if the layout requires it\n if (this._layout?.measureChildren) {\n for (const change of changes) {\n this._toBeMeasured.set(\n change.target as HTMLElement,\n change.contentRect\n );\n }\n this._measureChildren();\n }\n // If this is the end of an update cycle, we need to reset some\n // internal state. This should be a harmless no-op if we're handling\n // an out-of-cycle ResizeObserver callback, so we don't need to\n // distinguish between the two cases.\n this._scheduleLayoutComplete();\n this._itemsChanged = false;\n this._rangeChanged = false;\n }\n}\n\nfunction getMargins(el: Element): Margins {\n const style = window.getComputedStyle(el);\n return {\n marginTop: getMarginValue(style.marginTop),\n marginRight: getMarginValue(style.marginRight),\n marginBottom: getMarginValue(style.marginBottom),\n marginLeft: getMarginValue(style.marginLeft),\n };\n}\n\nfunction getMarginValue(value: string): number {\n const float = value ? parseFloat(value) : NaN;\n return Number.isNaN(float) ? 0 : float;\n}\n\n// TODO (graynorton): Deal with iframes?\nfunction getParentElement(el: Element) {\n if (el.assignedSlot !== null) {\n return el.assignedSlot;\n }\n if (el.parentElement !== null) {\n return el.parentElement;\n }\n const parentNode = el.parentNode;\n if (parentNode && parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n return (parentNode as ShadowRoot).host || null;\n }\n return null;\n}\n\n///\n\nfunction getElementAncestors(el: HTMLElement, includeSelf = false) {\n const ancestors: Array = [];\n let parent = includeSelf ? el : (getParentElement(el) as HTMLElement);\n while (parent !== null) {\n ancestors.push(parent);\n parent = getParentElement(parent) as HTMLElement;\n }\n return ancestors;\n}\n\nfunction getClippingAncestors(el: HTMLElement, includeSelf = false) {\n let foundFixed = false;\n return getElementAncestors(el, includeSelf).filter((a) => {\n if (foundFixed) {\n return false;\n }\n const style = getComputedStyle(a);\n foundFixed = style.position === 'fixed';\n return style.overflow !== 'visible';\n });\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.d.ts.map new file mode 100644 index 0000000000..450465e2d0 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["src/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,MAAM,CAAC,SAAS,SAAkB;IAElC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;gBAED,KAAK,EAAE,KAAK;CAKzB;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAC,SAAS,SAAuB;IAEvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;gBAED,KAAK,EAAE,KAAK;CAKzB;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,MAAM,CAAC,SAAS,SAAc;;CAK/B;AAED,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js new file mode 100644 index 0000000000..9497b55665 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +export class RangeChangedEvent extends Event{constructor(e){super(RangeChangedEvent.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}}RangeChangedEvent.eventName="rangeChanged";export class VisibilityChangedEvent extends Event{constructor(e){super(VisibilityChangedEvent.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}}VisibilityChangedEvent.eventName="visibilityChanged";export class UnpinnedEvent extends Event{constructor(){super(UnpinnedEvent.eventName,{bubbles:!1})}}UnpinnedEvent.eventName="unpinned"; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js.map new file mode 100644 index 0000000000..e9e7600666 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/events.js.map @@ -0,0 +1 @@ +{"version":3,"file":"events.js","sourceRoot":"","sources":["src/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAM1C,YAAY,KAAY;QACtB,KAAK,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;;AATM,2BAAS,GAAG,cAAc,CAAC;AAYpC,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAM/C,YAAY,KAAY;QACtB,KAAK,CAAC,sBAAsB,CAAC,SAAS,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;;AATM,gCAAS,GAAG,mBAAmB,CAAC;AAYzC,MAAM,OAAO,aAAc,SAAQ,KAAK;IAGtC;QACE,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;IACnD,CAAC;;AAJM,uBAAS,GAAG,UAAU,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nexport class RangeChangedEvent extends Event {\n static eventName = 'rangeChanged';\n\n first: number;\n last: number;\n\n constructor(range: Range) {\n super(RangeChangedEvent.eventName, {bubbles: false});\n this.first = range.first;\n this.last = range.last;\n }\n}\n\nexport class VisibilityChangedEvent extends Event {\n static eventName = 'visibilityChanged';\n\n first: number;\n last: number;\n\n constructor(range: Range) {\n super(VisibilityChangedEvent.eventName, {bubbles: false});\n this.first = range.first;\n this.last = range.last;\n }\n}\n\nexport class UnpinnedEvent extends Event {\n static eventName = 'unpinned';\n\n constructor() {\n super(UnpinnedEvent.eventName, {bubbles: false});\n }\n}\n\ninterface Range {\n first: number;\n last: number;\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.d.ts.map new file mode 100644 index 0000000000..95cb5212d7 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flexWrap.d.ts","sourceRoot":"","sources":["../src/layouts/flexWrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,OAAO,EACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,UAAU,oBAAqB,SAAQ,8BAA8B;IACnE,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,KAAK,uBAAuB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,KACJ,QAAQ,EAAE,cAAc,EACxB,MAAM,CAAC,EAAE,oBAAoB,KAC1B,cAAc,CAAC;CACrB,CAAC;AAEF,KAAK,8BAA8B,GAAG,CACpC,MAAM,CAAC,EAAE,oBAAoB,KAC1B,uBAAuB,CAAC;AAE7B,eAAO,MAAM,YAAY,EAAE,8BAQxB,CAAC;AAEJ,UAAU,MAAM;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AAeD;;GAEG;AACH,qBAAa,cAAe,SAAQ,wBAAwB,CAAC,oBAAoB,CAAC;IAChF,OAAO,CAAC,UAAU,CAAmB;IAIrC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAA4C;IAEtE,OAAO,CAAC,aAAa,CAAoB;IACzC,OAAO,CAAC,6BAA6B,CAAK;IAG1C,wBAAwB,UAAQ;IAEhC,IAAI,GAAG,CAAC,IAAI,EAAE,OAAO,EAEpB;IAED;;OAEG;IACH,eAAe,EAAE,oBAAoB,CAUnC;IAEF,eAAe,CAAC,KAAK,EAAE,iBAAiB;IAyBxC,SAAS;;;;;;IAST,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAO9B,kBAAkB,CAAC,IAAI,EAAE,OAAO;IAYhC,qBAAqB,IAAI,IAAI;IAkB7B,eAAe;IAsCf,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM/B,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAYtC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IA+D7C,aAAa,IAAI,IAAI;IAoBrB,iBAAiB;CAQlB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js new file mode 100644 index 0000000000..3edc554534 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{SizeCache as t}from"./shared/SizeCache.js";import{SizeGapPaddingBaseLayout as i}from"./shared/SizeGapPaddingBaseLayout.js";export const layout1dFlex=t=>Object.assign({type:FlexWrapLayout},t);export class FlexWrapLayout extends i{constructor(){super(...arguments),this._itemSizes=[],this._chunkLength=null,this._chunks=[],this._chunkSizeCache=new t,this._rolumnSizeCache=new t,this._rolumnLengthCache=new t({roundAverageSize:!1}),this._aspectRatios={},this._numberOfAspectRatiosMeasured=0,this.listenForChildLoadEvents=!0,this.measureChildren=function(t,i){const{naturalWidth:s,naturalHeight:e}=t;if(void 0!==s&&null!=e)return{width:s,height:e};const{o_width:h,o_height:n}=i;return void 0!==h&&void 0!==n?{width:h,height:n}:{width:-1,height:-1}}}set gap(t){this._setGap(t)}updateItemSizes(t){let i;Object.keys(t).forEach((s=>{const e=Number(s),h=this._getChunk(e),n=t[e],o=this._itemSizes[e];n.width&&n.height&&(o&&o.width===n.width&&o.height===n.height||(h._dirty=!0,i=!0,this._itemSizes[e]=t[e],this._recordAspectRatio(t[e])))})),i&&this._scheduleLayoutUpdate()}_newChunk(){return{_rolumns:[],_itemPositions:[],_size:0,_dirty:!1}}_getChunk(t){return this._chunks[Math.floor(Number(t)/this._chunkLength)]||this._newChunk()}_recordAspectRatio(t){if(t.width&&t.height){const i=Math.round(t.width/t.height*10)/10;this._aspectRatios[i]?this._aspectRatios[i]++:this._aspectRatios[i]=1,this._numberOfAspectRatiosMeasured++}}_getRandomAspectRatio(){if(0===this._numberOfAspectRatiosMeasured)return{width:1,height:1};const t=Math.random()*this._numberOfAspectRatiosMeasured,i=Object.keys(this._aspectRatios);let s=-1,e=0;for(;es;)o--;for(this._first=t._rolumns[o]._startIdx,this._physicalMin=t._rolumns[o]._startPos;(n=t._rolumns[o]._startPos+t._rolumns[o]._size+2*this._gap){const n={_startIdx:t,_endIdx:i,_startPos:h-e,_size:0};s._rolumns.push(n);let o=this._gap;for(let n=t;n<=i;n++){const t=s._itemPositions[n];t.width=t.width*_,t.height=t.height*_,t.left="left"===this._positionDim?h:o,t.top="top"===this._positionDim?h:o,o+=t[this._secondarySizeDim]+e}n._size=s._itemPositions[i][this._sizeDim]};for(;n<=i;){const r=this._getNaturalItemDims(n),a=this._viewDim2-e*(n-t+2),u=r[this._sizeDim],c=r[this._secondarySizeDim],l=this._idealSize/u,m=l*u,d=l*c;s._itemPositions[n]={left:0,top:0,width:"width"===this._sizeDim?m:d,height:"height"===this._sizeDim?m:d};const g=a/(o+d);Math.abs(1-g)>Math.abs(1-_)?(finishRolumn(n-1),t=n,h+=this._idealSize*_+e,_=(this._viewDim2-2*e)/d,o=d):(o+=d,_=g),n===i&&finishRolumn(n),n++}const r=s._rolumns[s._rolumns.length-1];return s._size=r._startPos+r._size,s}_updateLayout(){if(0===this._viewDim2)return;this._chunkLength=Math.ceil(this._viewDim1*this._viewDim2*2/(this._idealSize*this._idealSize)),console.log("chunkLength",this._chunkLength);const t=this._layOutChunk(0,this._chunkLength-1);this._chunks[0]=t,this._chunkSizeCache.set(0,t._size),t._rolumns.forEach(((t,i)=>{const s=`0:${i}`;this._rolumnSizeCache.set(s,t._size),this._rolumnLengthCache.set(s,t._endIdx-t._startIdx+1)}))}_updateScrollSize(){const t=this._chunks[0];this._scrollSize=t&&0!==t._rolumns.length?t._size+2*this._gap:1}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js.map new file mode 100644 index 0000000000..1a79985543 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flexWrap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flexWrap.js","sourceRoot":"","sources":["../src/layouts/flexWrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,wBAAwB,GAGzB,MAAM,sCAAsC,CAAC;AAyB9C,MAAM,CAAC,MAAM,Y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B,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW;YACd,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,IAAK,CAAC;QAC3E,wDAAwD;QACxD,mEAAmE;QACnE,mBAAmB;IACrB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {SizeCache} from './shared/SizeCache.js';\nimport {\n SizeGapPaddingBaseLayout,\n SizeGapPaddingBaseLayoutConfig,\n GapSpec,\n} from './shared/SizeGapPaddingBaseLayout.js';\nimport {\n ChildMeasurements,\n ItemBox,\n LayoutHostSink,\n MeasureChildFunction,\n Positions,\n Size,\n} from './shared/Layout.js';\n\ninterface FlexWrapLayoutConfig extends SizeGapPaddingBaseLayoutConfig {\n gap?: GapSpec;\n}\n\ntype FlexWrapLayoutSpecifier = FlexWrapLayoutConfig & {\n type: new (\n hostSink: LayoutHostSink,\n config?: FlexWrapLayoutConfig\n ) => FlexWrapLayout;\n};\n\ntype FlexWrapLayoutSpecifierFactory = (\n config?: FlexWrapLayoutConfig\n) => FlexWrapLayoutSpecifier;\n\nexport const layout1dFlex: FlexWrapLayoutSpecifierFactory = (\n config?: FlexWrapLayoutConfig\n) =>\n Object.assign(\n {\n type: FlexWrapLayout,\n },\n config\n );\n\ninterface Rolumn {\n _startIdx: number;\n _endIdx: number;\n _startPos: number;\n _size: number;\n}\n\ninterface Chunk {\n _itemPositions: Array;\n _rolumns: Array;\n _size: number;\n _dirty: boolean;\n}\n\ninterface AspectRatios {\n // conceptually, key is a number, but strictly speaking it's a string\n [key: string]: number;\n}\n\n/**\n * TODO graynorton@ Don't hard-code Flickr - probably need a config option\n */\ninterface FlickrImageData {\n o_width: number;\n o_height: number;\n}\n\n/**\n * TODO @straversi: document and test this Layout.\n */\nexport class FlexWrapLayout extends SizeGapPaddingBaseLayout {\n private _itemSizes: Array = [];\n // private _itemPositions: Array = [];\n // private _rolumnStartIdx: Array = [];\n // private _rolumnStartPos: Array = [];\n private _chunkLength: number | null = null;\n private _chunks: Array = [];\n private _chunkSizeCache = new SizeCache();\n private _rolumnSizeCache = new SizeCache();\n private _rolumnLengthCache = new SizeCache({roundAverageSize: false});\n // private _rolumnStartPositions = new Map();\n private _aspectRatios: AspectRatios = {};\n private _numberOfAspectRatiosMeasured = 0;\n // protected _config: FlexWrapLayoutConfig = {};\n\n listenForChildLoadEvents = true;\n\n set gap(spec: GapSpec) {\n this._setGap(spec);\n }\n\n /**\n * TODO graynorton@ Don't hard-code Flickr - probably need a config option\n */\n measureChildren: MeasureChildFunction = function (e: Element, i: unknown) {\n const {naturalWidth, naturalHeight} = e as HTMLImageElement;\n if (naturalWidth !== undefined && naturalHeight != undefined) {\n return {width: naturalWidth, height: naturalHeight};\n }\n const {o_width, o_height} = i as FlickrImageData;\n if (o_width !== undefined && o_height !== undefined) {\n return {width: o_width, height: o_height};\n }\n return {width: -1, height: -1};\n };\n\n updateItemSizes(sizes: ChildMeasurements) {\n let dirty;\n Object.keys(sizes).forEach((key) => {\n const n = Number(key);\n const chunk = this._getChunk(n);\n const dims = sizes[n];\n const prevDims = this._itemSizes[n];\n if (dims.width && dims.height) {\n if (\n !prevDims ||\n prevDims.width !== dims.width ||\n prevDims.height !== dims.height\n ) {\n chunk._dirty = true;\n dirty = true;\n this._itemSizes[n] = sizes[n];\n this._recordAspectRatio(sizes[n]);\n }\n }\n });\n if (dirty) {\n this._scheduleLayoutUpdate();\n }\n }\n\n _newChunk() {\n return {\n ['_rolumns']: [],\n _itemPositions: [],\n _size: 0,\n _dirty: false,\n };\n }\n\n _getChunk(idx: number | string) {\n return (\n this._chunks[Math.floor(Number(idx) / this._chunkLength!)] ||\n this._newChunk()\n );\n }\n\n _recordAspectRatio(dims: ItemBox) {\n if (dims.width && dims.height) {\n const bucket = Math.round((dims.width / dims.height) * 10) / 10;\n if (this._aspectRatios[bucket]) {\n this._aspectRatios[bucket]++;\n } else {\n this._aspectRatios[bucket] = 1;\n }\n this._numberOfAspectRatiosMeasured++;\n }\n }\n\n _getRandomAspectRatio(): Size {\n if (this._numberOfAspectRatiosMeasured === 0) {\n return {width: 1, height: 1};\n }\n const n = Math.random() * this._numberOfAspectRatiosMeasured;\n const buckets = Object.keys(this._aspectRatios);\n let i = -1,\n m = 0;\n while (m < n && i < buckets.length) {\n m += this._aspectRatios[buckets[++i]];\n }\n return {width: Number(buckets[i]), height: 1};\n }\n\n // _viewDim2Changed() {\n // this._scheduleLayoutUpdate();\n // }\n\n _getActiveItems() {\n const chunk = this._getChunk(0);\n if (chunk._rolumns.length === 0) return;\n const scrollPos = Math.max(\n 0,\n Math.min(this._scrollPosition, this._scrollSize - this._viewDim1)\n );\n const min = Math.max(0, scrollPos - this._overhang);\n const max = Math.min(\n this._scrollSize,\n scrollPos + this._viewDim1 + this._overhang\n );\n const mid = (min + max) / 2;\n const estMidRolumn = Math.round(\n (mid / this._scrollSize) * chunk._rolumns.length\n );\n let idx = estMidRolumn;\n while (chunk._rolumns[idx]._startPos < min) {\n idx++;\n }\n while (chunk._rolumns[idx]._startPos > min) {\n idx--;\n }\n this._first = chunk._rolumns[idx]._startIdx;\n this._physicalMin = chunk._rolumns[idx]._startPos;\n let rolumnMax;\n while (\n (rolumnMax =\n chunk._rolumns[idx]._startPos +\n chunk._rolumns[idx]._size +\n this._gap! * 2) < max\n ) {\n idx++;\n }\n this._last = chunk._rolumns[idx]._endIdx;\n this._physicalMax = rolumnMax;\n }\n\n _getItemPosition(idx: number): Positions {\n const chunk = this._getChunk(0);\n return chunk._itemPositions[idx];\n }\n\n _getItemSize(idx: number): Size {\n const chunk = this._getChunk(0);\n const {width, height} = chunk._itemPositions[idx];\n return {width, height} as Size;\n }\n\n _getNaturalItemDims(idx: number): Size {\n let itemDims = this._itemSizes[idx];\n if (\n itemDims === undefined ||\n itemDims.width === -1 ||\n itemDims.height === -1\n ) {\n itemDims = this._getRandomAspectRatio();\n }\n return itemDims;\n }\n\n _layOutChunk(startIdx: number, endIdx: number /*, reverse=false*/) {\n const chunk: Chunk = this._newChunk();\n const gap = this._gap!;\n let startPos = gap;\n let idx = 0;\n let rolumnSize2 = 0;\n let lastRatio = Infinity;\n const finishRolumn = (lastIdx: number) => {\n const rolumn = {\n _startIdx: startIdx,\n _endIdx: lastIdx,\n _startPos: startPos - gap,\n _size: 0,\n };\n chunk._rolumns.push(rolumn);\n let itemStartPos = this._gap!;\n for (let i = startIdx; i <= lastIdx; i++) {\n const pos = chunk._itemPositions[i];\n pos.width = pos.width! * lastRatio;\n pos.height = pos.height! * lastRatio;\n pos.left = this._positionDim === 'left' ? startPos : itemStartPos;\n pos.top = this._positionDim === 'top' ? startPos : itemStartPos;\n itemStartPos += pos[this._secondarySizeDim]! + gap;\n }\n rolumn._size = chunk._itemPositions[lastIdx][this._sizeDim]!;\n };\n while (idx <= endIdx) {\n const itemDims = this._getNaturalItemDims(idx);\n const availableSpace = this._viewDim2 - gap * (idx - startIdx + 2);\n const itemSize = itemDims[this._sizeDim];\n const itemSize2 = itemDims[this._secondarySizeDim];\n const idealScaleFactor = this._idealSize! / itemSize;\n const adjItemSize = idealScaleFactor * itemSize;\n const adjItemSize2 = idealScaleFactor * itemSize2;\n chunk._itemPositions[idx] = {\n left: 0,\n top: 0,\n width: this._sizeDim === 'width' ? adjItemSize : adjItemSize2,\n height: this._sizeDim === 'height' ? adjItemSize : adjItemSize2,\n };\n const ratio = availableSpace / (rolumnSize2 + adjItemSize2);\n if (Math.abs(1 - ratio) > Math.abs(1 - lastRatio)) {\n // rolumn is better without adding this item\n finishRolumn(idx - 1);\n startIdx = idx;\n startPos += this._idealSize! * lastRatio + gap;\n lastRatio = (this._viewDim2 - 2 * gap) / adjItemSize2;\n rolumnSize2 = adjItemSize2;\n } else {\n // add this item and continue\n rolumnSize2 += adjItemSize2;\n lastRatio = ratio;\n }\n if (idx === endIdx) {\n finishRolumn(idx);\n }\n idx++;\n }\n const lastRolumn = chunk._rolumns[chunk._rolumns.length - 1];\n chunk._size = lastRolumn._startPos + lastRolumn._size;\n return chunk;\n }\n\n _updateLayout(): void {\n if (/*this._rolumnStartIdx === undefined ||*/ this._viewDim2 === 0) return;\n this._chunkLength = Math.ceil(\n (2 * (this._viewDim1 * this._viewDim2)) /\n (this._idealSize! * this._idealSize!)\n );\n console.log('chunkLength', this._chunkLength);\n // TODO: An odd place to do this, need to think through the logistics of getting size info to the layout\n // in all cases\n // this._itemSizes.length = 100;//this._totalItems;\n const chunk = this._layOutChunk(0, this._chunkLength - 1);\n this._chunks[0] = chunk;\n this._chunkSizeCache.set(0, chunk._size);\n chunk._rolumns.forEach((rolumn, idx) => {\n const id = `0:${idx}`;\n this._rolumnSizeCache.set(id, rolumn._size);\n this._rolumnLengthCache.set(id, rolumn._endIdx - rolumn._startIdx + 1);\n });\n }\n\n _updateScrollSize() {\n const chunk = this._chunks[0];\n this._scrollSize =\n !chunk || chunk._rolumns.length === 0 ? 1 : chunk._size + 2 * this._gap!;\n // chunk._rolumns[chunk._rolumns.length - 1]._startPos +\n // chunk._itemPositions[chunk._rolumns.length - 1][this._sizeDim] +\n // (this._gap * 2);\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.d.ts.map new file mode 100644 index 0000000000..a3e807dfac --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/layouts/flow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,UAAU,EAAO,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,SAAS,EACT,IAAI,EACJ,OAAO,EAEP,eAAe,EAEf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,QAAQ,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,UAAU,CAAC;CACvE,CAAC;AAEF,KAAK,mBAAmB,GAAG,gBAAgB,GAAG;IAC5C,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,KAAK,0BAA0B,GAAG,CAChC,MAAM,CAAC,EAAE,gBAAgB,KACtB,mBAAmB,CAAC;AAEzB,eAAO,MAAM,IAAI,EAAE,0BAMhB,CAAC;AAmBJ,cAAM,YAAY;IAChB,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,aAAa,CAAqC;IAE1D,MAAM,CAAC,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAA;KAAC,EAAE,SAAS,EAAE,eAAe;IAgB3E,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED,qBAAqB,CAAC,KAAK,EAAE,MAAM,EA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gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAWxC;;OAEG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO/B,gBAAgB;CAIjB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js new file mode 100644 index 0000000000..97c4941c4d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{SizeCache as i}from"./shared/SizeCache.js";import{BaseLayout as t,dim1 as e}from"./shared/BaseLayout.js";export const flow=i=>Object.assign({type:FlowLayout},i);function leadingMargin(i){return"horizontal"===i?"marginLeft":"marginTop"}function trailingMargin(i){return"horizontal"===i?"marginRight":"marginBottom"}function collapseMargins(i,t){const e=[i,t].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}class MetricsCache{constructor(){this._childSizeCache=new i,this._marginSizeCache=new i,this._metricsCache=new Map}update(i,t){const s=new Set;Object.keys(i).forEach((h=>{const a=Number(h);this._metricsCache.set(a,i[a]),this._childSizeCache.set(a,i[a][e(t)]),s.add(a),s.add(a+1)}));for(const i of s){const e=this._metricsCache.get(i)?.[leadingMargin(t)]||0,s=this._metricsCache.get(i-1)?.[trailingMargin(t)]||0;this._marginSizeCache.set(i,collapseMargins(e,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(i,t){return this._metricsCache.get(i)?.[leadingMargin(t)]||0}getChildSize(i){return this._childSizeCache.getSize(i)}getMarginSize(i){return this._marginSizeCache.getSize(i)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}export class FlowLayout extends t{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new MetricsCache,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(i){this._metricsCache.update(i,this.direction),this._scheduleReflow()}_getPhysicalItem(i){return this._newPhysicalItems.get(i)??this._physicalItems.get(i)}_getSize(i){return this._getPhysicalItem(i)&&this._metricsCache.getChildSize(i)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(i){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+i*(t.averageMarginSize+this._getAverageSize());if(ithis._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((i+t)/2/this._delta)))}_getAnchor(i,t){if(0===this._physicalItems.size)return this._calculateAnchor(i,t);if(this._first<0)return this._calculateAnchor(i,t);if(this._last<0)return this._calculateAnchor(i,t);const e=this._getPhysicalItem(this._first),s=this._getPhysicalItem(this._last),h=e.pos;if(s.pos+this._metricsCache.getChildSize(this._last)t)return this._calculateAnchor(i,t);let a=this._firstVisible-1,r=-1/0;for(;rthis._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,e),this._anchorPos=this._getPosition(this._anchorIdx));let s=this._getSize(this._anchorIdx);void 0===s&&(this._stable=!1,s=this._getAverageSize());const h=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,a=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=h),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-a-s);let r=0;for(this._anchorPos+s+ae&&(r=e-(this._anchorPos-h)),r&&(this._scrollPosition-=r,t-=r,e-=r,this._scrollError+=r),i.set(this._anchorIdx,{pos:this._anchorPos,size:s}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-h,this._physicalMax=this._anchorPos+s+a;this._physicalMin>t&&this._first>0;){let t=this._getSize(--this._first);void 0===t&&(this._stable=!1,t=this._getAverageSize());let e=this._metricsCache.getMarginSize(this._first);void 0===e&&(this._stable=!1,e=this._metricsCache.averageMarginSize),this._physicalMin-=t;const s=this._physicalMin;if(i.set(this._first,{pos:s,size:t}),this._physicalMin-=e,!1===this._stable&&!1===this._estimate)break}for(;this._physicalMaxi.pos-=c)),this._scrollError+=c),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=i)}_calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:i,_last:t}=this;super._reflow(),(-1===this._first&&-1==this._last||this._first===i&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:i}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(i+this._getAverageSize())+i)}get _delta(){const{averageMarginSize:i}=this._metricsCache;return this._getAverageSize()+i}_getItemPosition(i){return{[this._positionDim]:this._getPosition(i),[this._secondaryPositionDim]:0,[(t=this.direction,"horizontal"===t?"xOffset":"yOffset")]:-(this._metricsCache.getLeadingMarginValue(i,this.direction)??this._metricsCache.averageMarginSize)};var t}_getItemSize(i){return{[this._sizeDim]:this._getSize(i)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js.map new file mode 100644 index 0000000000..b3a63fac96 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flow.js","sourceRoot":"","sources":["../src/layouts/flow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,wBAAwB,CAAC;AA+BxD,MAAM,CAAC,MAAM,IAAI,GAA+B,CAAC,MAAyB,EAAE,EAAE,CAC5E,MAAM,CAAC,MAAM,CACX;IACE,IAAI,EAAE,UAAU;CACjB,EACD,MAAM,CACP,CAAC;AAEJ,SAAS,aAAa,CAAC,SAA0B;IAC/C,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;AACjE,CAAC;AAED,SAAS,cAAc,CAAC,SAA0B;IAChD,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;AACrE,CAAC;AAED,SAAS,MAAM,CAAC,SAA0B;IACxC,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5D,CAAC;AAED,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS;IAC3C,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E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CAAC,aAAa,CAAC,iBAAiB,CACrC;SACW,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,GAAW;QACtB,OAAO;YACL,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE;YAC7D,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC;SACzD,CAAC;IACZ,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {SizeCache} from './shared/SizeCache.js';\nimport {BaseLayout, dim1} from './shared/BaseLayout.js';\nimport {\n Positions,\n Size,\n Margins,\n margin,\n ScrollDirection,\n offsetAxis,\n ChildMeasurements,\n BaseLayoutConfig,\n LayoutHostSink,\n} from './shared/Layout.js';\n\ntype ItemBounds = {\n pos: number;\n size: number;\n};\n\ntype FlowLayoutConstructor = {\n prototype: FlowLayout;\n new (hostSink: LayoutHostSink, config?: BaseLayoutConfig): FlowLayout;\n};\n\ntype FlowLayoutSpecifier = BaseLayoutConfig & {\n type: FlowLayoutConstructor;\n};\n\ntype FlowLayoutSpecifierFactory = (\n config?: BaseLayoutConfig\n) => FlowLayoutSpecifier;\n\nexport const flow: FlowLayoutSpecifierFactory = (config?: BaseLayoutConfig) =>\n Object.assign(\n {\n type: FlowLayout,\n },\n config\n );\n\nfunction leadingMargin(direction: ScrollDirection): margin {\n return direction === 'horizontal' ? 'marginLeft' : 'marginTop';\n}\n\nfunction trailingMargin(direction: ScrollDirection): margin {\n return direction === 'horizontal' ? 'marginRight' : 'marginBottom';\n}\n\nfunction offset(direction: ScrollDirection): offsetAxis {\n return direction === 'horizontal' ? 'xOffset' : 'yOffset';\n}\n\nfunction collapseMargins(a: number, b: number): number {\n const m = [a, b].sort();\n return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];\n}\n\nclass MetricsCache {\n private _childSizeCache = new SizeCache();\n private _marginSizeCache = new SizeCache();\n private _metricsCache = new Map();\n\n update(metrics: {[key: number]: Size & Margins}, direction: ScrollDirection) {\n const marginsToUpdate = new Set();\n Object.keys(metrics).forEach((key) => {\n const k = Number(key);\n this._metricsCache.set(k, metrics[k]);\n this._childSizeCache.set(k, metrics[k][dim1(direction)]);\n marginsToUpdate.add(k);\n marginsToUpdate.add(k + 1);\n });\n for (const k of marginsToUpdate) {\n const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;\n const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;\n this._marginSizeCache.set(k, collapseMargins(a, b));\n }\n }\n\n get averageChildSize(): number {\n return this._childSizeCache.averageSize;\n }\n\n get totalChildSize(): number {\n return this._childSizeCache.totalSize;\n }\n\n get averageMarginSize(): number {\n return this._marginSizeCache.averageSize;\n }\n\n get totalMarginSize(): number {\n return this._marginSizeCache.totalSize;\n }\n\n getLeadingMarginValue(index: number, direction: ScrollDirection) {\n return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;\n }\n\n getChildSize(index: number) {\n return this._childSizeCache.getSize(index);\n }\n\n getMarginSize(index: number) {\n return this._marginSizeCache.getSize(index);\n }\n\n clear() {\n this._childSizeCache.clear();\n this._marginSizeCache.clear();\n this._metricsCache.clear();\n }\n}\n\nexport class FlowLayout extends BaseLayout {\n /**\n * Initial estimate of item size\n */\n _itemSize: Size = {width: 100, height: 100};\n\n /**\n * Indices of children mapped to their (position and length) in the scrolling\n * direction. Used to keep track of children that are in range.\n */\n _physicalItems = new Map();\n\n /**\n * Used in tandem with _physicalItems to track children in range across\n * reflows.\n */\n _newPhysicalItems = new Map();\n\n /**\n * Width and height of children by their index.\n */\n _metricsCache = new MetricsCache();\n\n /**\n * anchorIdx is the anchor around which we reflow. It is designed to allow\n * jumping to any point of the scroll size. We choose it once and stick with\n * it until stable. _first and _last are deduced around it.\n */\n _anchorIdx: number | null = null;\n\n /**\n * Position in the scrolling direction of the anchor child.\n */\n _anchorPos: number | null = null;\n\n /**\n * Whether all children in range were in range during the previous reflow.\n */\n _stable = true;\n\n private _measureChildren = true;\n\n _estimate = true;\n\n // protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {\n\n // })\n\n // constructor(config: Layout1dConfig) {\n // super(config);\n // }\n\n get measureChildren() {\n return this._measureChildren;\n }\n\n /**\n * Determine the average size of all children represented in the sizes\n * argument.\n */\n updateItemSizes(sizes: ChildMeasurements) {\n this._metricsCache.update(sizes as Size & Margins, this.direction);\n // if (this._nMeasured) {\n // this._updateItemSize();\n this._scheduleReflow();\n // }\n }\n\n /**\n * Set the average item size based on the total length and number of children\n * in range.\n */\n // _updateItemSize() {\n // // Keep integer values.\n // this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;\n // }\n\n _getPhysicalItem(idx: number): ItemBounds | undefined {\n return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);\n }\n\n _getSize(idx: number): number | undefined {\n const item = this._getPhysicalItem(idx);\n return item && this._metricsCache.getChildSize(idx);\n }\n\n _getAverageSize(): number {\n return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];\n }\n\n _estimatePosition(idx: number): number {\n const c = this._metricsCache;\n if (this._first === -1 || this._last === -1) {\n return (\n c.averageMarginSize +\n idx * (c.averageMarginSize + this._getAverageSize())\n );\n } else {\n if (idx < this._first) {\n const delta = this._first - idx;\n const refItem = this._getPhysicalItem(this._first);\n return (\n refItem!.pos -\n (c.getMarginSize(this._first - 1) || c.averageMarginSize) -\n (delta * c.averageChildSize + (delta - 1) * c.averageMarginSize)\n );\n } else {\n const delta = idx - this._last;\n const refItem = this._getPhysicalItem(this._last);\n return (\n refItem!.pos +\n (c.getChildSize(this._last) || c.averageChildSize) +\n (c.getMarginSize(this._last) || c.averageMarginSize) +\n delta * (c.averageChildSize + c.averageMarginSize)\n );\n }\n }\n }\n\n /**\n * Returns the position in the scrolling direction of the item at idx.\n * Estimates it if the item at idx is not in the DOM.\n */\n _getPosition(idx: number): number {\n const item = this._getPhysicalItem(idx);\n const {averageMarginSize} = this._metricsCache;\n return idx === 0\n ? this._metricsCache.getMarginSize(0) ?? averageMarginSize\n : item\n ? item.pos\n : this._estimatePosition(idx);\n }\n\n _calculateAnchor(lower: number, upper: number): number {\n if (lower <= 0) {\n return 0;\n }\n if (upper > this._scrollSize - this._viewDim1) {\n return this.items.length - 1;\n }\n return Math.max(\n 0,\n Math.min(\n this.items.length - 1,\n Math.floor((lower + upper) / 2 / this._delta)\n )\n );\n }\n\n _getAnchor(lower: number, upper: number): number {\n if (this._physicalItems.size === 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._first < 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._last < 0) {\n return this._calculateAnchor(lower, upper);\n }\n\n const firstItem = this._getPhysicalItem(this._first),\n lastItem = this._getPhysicalItem(this._last),\n firstMin = firstItem!.pos,\n lastMin = lastItem!.pos,\n lastMax = lastMin + this._metricsCache.getChildSize(this._last)!;\n\n if (lastMax < lower) {\n // Window is entirely past physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n if (firstMin > upper) {\n // Window is entirely before physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n // Window contains a physical item\n // Find one, starting with the one that was previously first visible\n let candidateIdx = this._firstVisible - 1;\n let cMax = -Infinity;\n while (cMax < lower) {\n const candidate = this._getPhysicalItem(++candidateIdx);\n cMax = candidate!.pos + this._metricsCache.getChildSize(candidateIdx)!;\n }\n return candidateIdx;\n }\n\n /**\n * Updates _first and _last based on items that should be in the current\n * viewed range.\n */\n _getActiveItems() {\n if (this._viewDim1 === 0 || this.items.length === 0) {\n this._clearItems();\n } else {\n this._getItems();\n }\n }\n\n /**\n * Sets the range to empty.\n */\n _clearItems() {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n const items = this._newPhysicalItems;\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n this._stable = true;\n }\n\n /*\n * Updates _first and _last based on items that should be in the given range.\n */\n _getItems() {\n const items = this._newPhysicalItems;\n this._stable = true;\n let lower, upper;\n\n // The anchorIdx is the anchor around which we reflow. It is designed to\n // allow jumping to any point of the scroll size. We choose it once and\n // stick with it until stable. first and last are deduced around it.\n\n // If we have a pinned item, we anchor on it\n if (this.pin !== null) {\n const {index} = this.pin;\n this._anchorIdx = index;\n this._anchorPos = this._getPosition(index);\n }\n\n // Determine the lower and upper bounds of the region to be\n // rendered, relative to the viewport\n lower = this._scrollPosition - this._overhang; //leadingOverhang;\n upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;\n\n if (upper < 0 || lower > this._scrollSize) {\n this._clearItems();\n return;\n }\n\n // If we are scrolling to a specific index or if we are doing another\n // pass to stabilize a previously started reflow, we will already\n // have an anchor. If not, establish an anchor now.\n if (this._anchorIdx === null || this._anchorPos === null) {\n this._anchorIdx = this._getAnchor(lower, upper);\n this._anchorPos = this._getPosition(this._anchorIdx);\n }\n\n let anchorSize = this._getSize(this._anchorIdx);\n if (anchorSize === undefined) {\n this._stable = false;\n anchorSize = this._getAverageSize();\n }\n\n const anchorLeadingMargin =\n this._metricsCache.getMarginSize(this._anchorIdx) ??\n this._metricsCache.averageMarginSize;\n const anchorTrailingMargin =\n this._metricsCache.getMarginSize(this._anchorIdx + 1) ??\n this._metricsCache.averageMarginSize;\n\n if (this._anchorIdx === 0) {\n this._anchorPos = anchorLeadingMargin;\n }\n\n if (this._anchorIdx === this.items.length - 1) {\n this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;\n }\n\n // Anchor might be outside bounds, so prefer correcting the error and keep\n // that anchorIdx.\n let anchorErr = 0;\n\n if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {\n anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);\n }\n\n if (this._anchorPos - anchorLeadingMargin > upper) {\n anchorErr = upper - (this._anchorPos - anchorLeadingMargin);\n }\n\n if (anchorErr) {\n this._scrollPosition -= anchorErr;\n lower -= anchorErr;\n upper -= anchorErr;\n this._scrollError += anchorErr;\n }\n\n items.set(this._anchorIdx, {pos: this._anchorPos, size: anchorSize});\n\n this._first = this._last = this._anchorIdx;\n this._physicalMin = this._anchorPos - anchorLeadingMargin;\n this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;\n\n while (this._physicalMin > lower && this._first > 0) {\n let size = this._getSize(--this._first);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._first);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n this._physicalMin -= size;\n const pos = this._physicalMin;\n items.set(this._first, {pos, size});\n this._physicalMin -= margin;\n if (this._stable === false && this._estimate === false) {\n break;\n }\n }\n\n while (this._physicalMax < upper && this._last < this.items.length - 1) {\n let size = this._getSize(++this._last);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._last);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n const pos = this._physicalMax;\n items.set(this._last, {pos, size});\n this._physicalMax += size + margin;\n if (!this._stable && !this._estimate) {\n break;\n }\n }\n\n // This handles the cases where we were relying on estimated sizes.\n const extentErr = this._calculateError();\n if (extentErr) {\n this._physicalMin -= extentErr;\n this._physicalMax -= extentErr;\n this._anchorPos -= extentErr;\n this._scrollPosition -= extentErr;\n items.forEach((item) => (item.pos -= extentErr));\n this._scrollError += extentErr;\n }\n\n if (this._stable) {\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n }\n }\n\n _calculateError(): number {\n if (this._first === 0) {\n return this._physicalMin;\n } else if (this._physicalMin <= 0) {\n return this._physicalMin - this._first * this._delta;\n } else if (this._last === this.items.length - 1) {\n return this._physicalMax - this._scrollSize;\n } else if (this._physicalMax >= this._scrollSize) {\n return (\n this._physicalMax -\n this._scrollSize +\n (this.items.length - 1 - this._last) * this._delta\n );\n }\n return 0;\n }\n\n override _reflow() {\n const {_first, _last} = this;\n super._reflow();\n if (\n (this._first === -1 && this._last == -1) ||\n (this._first === _first && this._last === _last)\n ) {\n this._resetReflowState();\n }\n }\n\n _resetReflowState() {\n this._anchorIdx = null;\n this._anchorPos = null;\n this._stable = true;\n }\n\n _updateScrollSize() {\n const {averageMarginSize} = this._metricsCache;\n this._scrollSize = Math.max(\n 1,\n this.items.length * (averageMarginSize + this._getAverageSize()) +\n averageMarginSize\n );\n }\n\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n protected get _delta(): number {\n const {averageMarginSize} = this._metricsCache;\n return this._getAverageSize() + averageMarginSize;\n }\n\n /**\n * Returns the top and left positioning of the item at idx.\n */\n _getItemPosition(idx: number): Positions {\n return {\n [this._positionDim]: this._getPosition(idx),\n [this._secondaryPositionDim]: 0,\n [offset(this.direction)]: -(\n this._metricsCache.getLeadingMarginValue(idx, this.direction) ??\n this._metricsCache.averageMarginSize\n ),\n } as Positions;\n }\n\n /**\n * Returns the height and width of the item at idx.\n */\n _getItemSize(idx: number): Size {\n return {\n [this._sizeDim]: this._getSize(idx) || this._getAverageSize(),\n [this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],\n } as Size;\n }\n\n _viewDim2Changed() {\n this._metricsCache.clear();\n this._scheduleReflow();\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.d.ts.map new file mode 100644 index 0000000000..b1a07195bc --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../src/layouts/grid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAEhF,KAAK,mBAAmB,GAAG,oBAAoB,GAAG;IAChD,IAAI,EAAE,KACJ,QAAQ,EAAE,cAAc,EACxB,MAAM,CAAC,EAAE,oBAAoB,KAC1B,UAAU,CAAC;CACjB,CAAC;AAEF,KAAK,0BAA0B,GAAG,CAChC,MAAM,CAAC,EAAE,oBAAoB,KAC1B,mBAAmB,CAAC;AAEzB,eAAO,MAAM,IAAI,EAAE,0BAQhB,CAAC;AAEJ,qBAAa,UAAW,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IAClE;;;OAGG;IACH,SAAS,KAAK,MAAM,WAEnB;IAED,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO1C,eAAe;IA+Bf,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAWxC,iBAAiB;CAUlB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js new file mode 100644 index 0000000000..2637346fbe --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{dim1 as t,dim2 as i}from"./shared/BaseLayout.js";import{GridBaseLayout as s}from"./shared/GridBaseLayout.js";export const grid=t=>Object.assign({type:GridLayout},t);export class GridLayout extends s{get _delta(){return this._metrics.itemSize1+this._metrics.gap1}_getItemSize(t){return{[this._sizeDim]:this._metrics.itemSize1,[this._secondarySizeDim]:this._metrics.itemSize2}}_getActiveItems(){const t=this._metrics,{rolumns:i}=t;if(0===i)this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;else{const{padding1:s}=t,e=Math.max(0,this._scrollPosition-this._overhang),h=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang),a=Math.max(0,Math.floor((e-s.start)/this._delta)),r=Math.max(0,Math.ceil((h-s.start)/this._delta));this._first=a*i,this._last=Math.min(r*i-1,this.items.length-1),this._physicalMin=s.start+this._delta*a,this._physicalMax=s.start+this._delta*r}}_getItemPosition(s){const{rolumns:e,padding1:h,positions:a,itemSize1:r,itemSize2:o}=this._metrics;return{[this._positionDim]:h.start+Math.floor(s/e)*this._delta,[this._secondaryPositionDim]:a[s%e],[t(this.direction)]:r,[i(this.direction)]:o}}_updateScrollSize(){const{rolumns:t,gap1:i,padding1:s,itemSize1:e}=this._metrics;let h=1;if(t>0){const a=Math.ceil(this.items.length/t);h=s.start+a*e+(a-1)*i+s.end}this._scrollSize=h}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js.map new file mode 100644 index 0000000000..acfe32fe34 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/grid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"grid.js","sourceRoot":"","sources":["../src/layouts/grid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAuB,MAAM,4BAA4B,CAAC;AAahF,MAAM,CAAC,MAAM,IAAI,GAA+B,CAC9C,MAA6B,EAC7B,EAAE,CACF,MAAM,CAAC,MAAM,CACX;IACE,IAAI,EAAE,UAAU;CACjB,EACD,MAAM,CACP,CAAC;AAEJ,MAAM,OAAO,UAAW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,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;YACpD,IAAI;gBACF,QAAQ,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC;SACxE;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {LayoutHostSink, Positions, Size} from './shared/Layout.js';\nimport {dim1, dim2} from './shared/BaseLayout.js';\nimport {GridBaseLayout, GridBaseLayoutConfig} from './shared/GridBaseLayout.js';\n\ntype GridLayoutSpecifier = GridBaseLayoutConfig & {\n type: new (\n hostSink: LayoutHostSink,\n config?: GridBaseLayoutConfig\n ) => GridLayout;\n};\n\ntype GridLayoutSpecifierFactory = (\n config?: GridBaseLayoutConfig\n) => GridLayoutSpecifier;\n\nexport const grid: GridLayoutSpecifierFactory = (\n config?: GridBaseLayoutConfig\n) =>\n Object.assign(\n {\n type: GridLayout,\n },\n config\n );\n\nexport class GridLayout extends GridBaseLayout {\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n protected get _delta() {\n return this._metrics!.itemSize1 + this._metrics!.gap1;\n }\n\n protected _getItemSize(_idx: number): Size {\n return {\n [this._sizeDim]: this._metrics!.itemSize1,\n [this._secondarySizeDim]: this._metrics!.itemSize2,\n } as unknown as Size;\n }\n\n _getActiveItems() {\n const metrics = this._metrics!;\n const {rolumns} = metrics;\n if (rolumns === 0) {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n } else {\n const {padding1} = metrics;\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(\n this._scrollSize,\n this._scrollPosition + this._viewDim1 + this._overhang\n );\n const firstCow = Math.max(\n 0,\n Math.floor((min - padding1.start) / this._delta)\n );\n const lastCow = Math.max(\n 0,\n Math.ceil((max - padding1.start) / this._delta)\n );\n\n this._first = firstCow * rolumns;\n this._last = Math.min(lastCow * rolumns - 1, this.items.length - 1);\n this._physicalMin = padding1.start + this._delta * firstCow;\n this._physicalMax = padding1.start + this._delta * lastCow;\n }\n }\n\n _getItemPosition(idx: number): Positions {\n const {rolumns, padding1, positions, itemSize1, itemSize2} = this._metrics!;\n return {\n [this._positionDim]:\n padding1.start + Math.floor(idx / rolumns) * this._delta,\n [this._secondaryPositionDim]: positions[idx % rolumns],\n [dim1(this.direction)]: itemSize1,\n [dim2(this.direction)]: itemSize2,\n } as unknown as {top: number; left: number};\n }\n\n _updateScrollSize() {\n const {rolumns, gap1, padding1, itemSize1} = this._metrics!;\n let size = 1;\n if (rolumns > 0) {\n const cows = Math.ceil(this.items.length / rolumns);\n size =\n padding1.start + cows * itemSize1 + (cows - 1) * gap1 + padding1.end;\n }\n this._scrollSize = size;\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.d.ts.map new file mode 100644 index 0000000000..aec5cf3dfe --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"masonry.d.ts","sourceRoot":"","sources":["../src/layouts/masonry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAC,SAAS,EAAC,MAAM,sCAAsC,CAAC;AAE/D,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,CAAC;AAEhD,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,UAAU,CAAC;IACvD,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,KAAK,sBAAsB,GAAG,mBAAmB,GAAG;IAClD,IAAI,EAAE,KACJ,QAAQ,EAAE,cAAc,EACxB,MAAM,CAAC,EAAE,mBAAmB,KACzB,aAAa,CAAC;CACpB,CAAC;AAEF,KAAK,6BAA6B,GAAG,CACnC,MAAM,CAAC,EAAE,mBAAmB,KACzB,sBAAsB,CAAC;AAE5B,eAAO,MAAM,OAAO,EAAE,6BAQnB,CAAC;AAQJ,qBAAa,aAAc,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IACpE,OAAO,CAAC,sBAAsB,CAAO;IACrC,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,SAAS,CAAoC;IACrD,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,SAAS,CAAC,iBAAiB,IAAI,mBAAmB;IAMlD,IAAI,cAAc,CAAC,cAAc,EAAE,cAAc,EAEhD;IAED,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE;IAOpC,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO1C,SAAS,CAAC,aAAa;IAMvB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,eAAe;IA8DvB,eAAe;IA6Bf,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAIxC,iBAAiB;CAIlB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js new file mode 100644 index 0000000000..0a1d4a824d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/masonry.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{GridBaseLayout as t}from"./shared/GridBaseLayout.js";export const masonry=t=>Object.assign({type:MasonryLayout},t);const s="MIN";export class MasonryLayout extends t{constructor(){super(...arguments),this._RANGE_MAP_GRANULARITY=100,this._positions=new Map,this._rangeMap=new Map}_getDefaultConfig(){return Object.assign({},super._getDefaultConfig(),{getAspectRatio:()=>1})}set getAspectRatio(t){this._getAspectRatio=t}_setItems(t){t!==this._items&&this._scheduleLayoutUpdate(),super._setItems(t)}_getItemSize(t){return{[this._sizeDim]:this._metrics.itemSize1,[this._secondarySizeDim]:this._metrics.itemSize2}}_updateLayout(){super._updateLayout(),this._layOutChildren()}_getRangeMapKey(t,i){const e=this._RANGE_MAP_GRANULARITY;return i===s?Math.floor(t/e)*e:Math.ceil(t/e)*e}_layOutChildren(){const t=this._RANGE_MAP_GRANULARITY;this._positions.clear(),this._rangeMap.clear();const{rolumns:i,padding1:e,itemSize2:a,gap1:o,positions:h}=this._metrics;let n=e.start;const _=new Array(i).fill(null).map((t=>n));let r=0,c=0,p=1/0,l=-1/0;if(this.items.forEach(((i,g)=>{const M=this._getAspectRatio(i),m="horizontal"===this.direction?a*M:a/M,u=_[r],A=h[r];this._positions.set(g,{[this._positionDim]:u,[this._secondaryPositionDim]:A,[this._sizeDim]:m,[this._secondarySizeDim]:a});const y=u+m,R=this._getRangeMapKey(u,s);Rl&&(l=f);for(let s=R;s<=f;s+=t){const[t,i]=this._rangeMap.get(s)??[1/0,-1/0];this._rangeMap.set(s,[Math.min(g,t),Math.max(g,i)])}c=Math.max(c,y+e.end),_[r]+=m+o,n=1/0,_.forEach(((t,s)=>{t number;\n\nexport interface MasonryLayoutConfig\n extends Omit {\n flex: boolean;\n itemSize: PixelSize;\n getAspectRatio: GetAspectRatio;\n}\n\ntype MasonryLayoutSpecifier = MasonryLayoutConfig & {\n type: new (\n hostSink: LayoutHostSink,\n config?: MasonryLayoutConfig\n ) => MasonryLayout;\n};\n\ntype MasonryLayoutSpecifierFactory = (\n config?: MasonryLayoutConfig\n) => MasonryLayoutSpecifier;\n\nexport const masonry: MasonryLayoutSpecifierFactory = (\n config?: MasonryLayoutConfig\n) =>\n Object.assign(\n {\n type: MasonryLayout,\n },\n config\n );\n\ntype RangeMapEntry = [number, number];\n\nconst MIN = 'MIN';\nconst MAX = 'MAX';\ntype MinOrMax = 'MIN' | 'MAX';\n\nexport class MasonryLayout extends GridBaseLayout {\n private _RANGE_MAP_GRANULARITY = 100;\n private _positions = new Map();\n private _rangeMap = new Map();\n private _getAspectRatio?: GetAspectRatio;\n\n protected _getDefaultConfig(): MasonryLayoutConfig {\n return Object.assign({}, super._getDefaultConfig(), {\n getAspectRatio: () => 1,\n });\n }\n\n set getAspectRatio(getAspectRatio: GetAspectRatio) {\n this._getAspectRatio = getAspectRatio;\n }\n\n protected _setItems(items: unknown[]) {\n if (items !== this._items) {\n this._scheduleLayoutUpdate();\n }\n super._setItems(items);\n }\n\n protected _getItemSize(_idx: number): Size {\n return {\n [this._sizeDim]: this._metrics!.itemSize1,\n [this._secondarySizeDim]: this._metrics!.itemSize2,\n } as unknown as Size;\n }\n\n protected _updateLayout() {\n super._updateLayout();\n // Possibly, we want to do this somewhere else instead\n this._layOutChildren();\n }\n\n private _getRangeMapKey(scrollPos: number, minOrMax: MinOrMax) {\n const G = this._RANGE_MAP_GRANULARITY;\n return minOrMax === MIN\n ? Math.floor(scrollPos / G) * G\n : Math.ceil(scrollPos / G) * G;\n }\n\n private _layOutChildren() {\n const G = this._RANGE_MAP_GRANULARITY;\n this._positions.clear();\n this._rangeMap.clear();\n const {rolumns, padding1, itemSize2, gap1, positions} = this._metrics!;\n let nextPos = padding1.start;\n const nextPosPerRolumn = new Array(rolumns).fill(null).map((_) => nextPos);\n let nextRolumn = 0;\n let scrollSize = 0;\n let minRangeMapKey = Infinity;\n let maxRangeMapKey = -Infinity;\n this.items.forEach((item, idx) => {\n const aspectRatio = this._getAspectRatio!(item as {integer: number});\n const size1 =\n this.direction === 'horizontal'\n ? itemSize2 * aspectRatio\n : itemSize2 / aspectRatio;\n const pos1 = nextPosPerRolumn[nextRolumn];\n const pos2 = positions[nextRolumn];\n this._positions.set(idx, {\n [this._positionDim]: pos1,\n [this._secondaryPositionDim]: pos2,\n [this._sizeDim]: size1,\n [this._secondarySizeDim]: itemSize2,\n } as Positions);\n const max1 = pos1 + size1;\n const firstRangeMapKey = this._getRangeMapKey(pos1, MIN);\n if (firstRangeMapKey < minRangeMapKey) {\n minRangeMapKey = firstRangeMapKey;\n }\n const lastRangeMapKey = this._getRangeMapKey(max1, MAX);\n if (lastRangeMapKey > maxRangeMapKey) {\n maxRangeMapKey = lastRangeMapKey;\n }\n for (let n = firstRangeMapKey; n <= lastRangeMapKey; n += G) {\n const [minIdx, maxIdx] = this._rangeMap.get(n) ?? [Infinity, -Infinity];\n this._rangeMap.set(n, [Math.min(idx, minIdx), Math.max(idx, maxIdx)]);\n }\n scrollSize = Math.max(scrollSize, max1 + padding1.end);\n nextPosPerRolumn[nextRolumn] += size1 + gap1;\n nextPos = Infinity;\n nextPosPerRolumn.forEach((pos, rolumn) => {\n if (pos < nextPos) {\n nextPos = pos;\n nextRolumn = rolumn;\n }\n });\n });\n if (minRangeMapKey !== Infinity) {\n for (let n = 0; n < minRangeMapKey; n += G) {\n this._rangeMap.set(n, [-1, -1]);\n }\n }\n if (maxRangeMapKey !== -Infinity) {\n const maxRange = this._rangeMap.get(maxRangeMapKey)!;\n for (let n = maxRangeMapKey + G; n < scrollSize + G; n += G) {\n this._rangeMap.set(n, maxRange);\n }\n }\n this._scrollSize = scrollSize;\n }\n\n _getActiveItems() {\n const metrics = this._metrics!;\n const {rolumns} = metrics;\n if (rolumns === 0 || this._rangeMap.size === 0) {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n } else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(\n this._scrollSize,\n this._scrollPosition + this._viewDim1 + this._overhang\n );\n const maxIdx = this.items.length - 1;\n const minKey = this._getRangeMapKey(min, MIN);\n const maxKey = this._getRangeMapKey(max, MAX);\n let first = maxIdx;\n let last = 0;\n for (let n = minKey; n <= maxKey; n += this._RANGE_MAP_GRANULARITY) {\n const [rangeFirst, rangeLast] = this._rangeMap.get(n) ?? [maxIdx, 0];\n first = Math.min(first, rangeFirst);\n last = Math.max(last, rangeLast);\n }\n this._first = first;\n this._last = last;\n }\n }\n\n _getItemPosition(idx: number): Positions {\n return this._positions.get(idx)!;\n }\n\n _updateScrollSize() {\n // We calculate scrollSize in _layouOutChildren(),\n // no need to do it here\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.d.ts.map new file mode 100644 index 0000000000..baefc9ebcb --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/shared/BaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,MAAM,EAEN,SAAS,EACT,eAAe,EACf,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAEhB,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,KAAK,2BAA2B,GAAG;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,CAE1D;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,CAE1D;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,QAAQ,CAEzD;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,QAAQ,CAEzD;AAED,8BAAsB,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SAAS,CAAC,qBAAqB;IAO/B,SAAS,CAAC,cAAc;IASxB,SAAS,CAAC,OAAO;IAYjB;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB;IAY7B;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,gCAAgC,CAAC,OAAO,EAAE,UAAU;IA6BvD,4BAA4B,CACjC,OAAO,EAAE,UAAU,GAClB,mBAAmB;IAOtB,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,6BAA6B;IAQrC,SAAS,CAAC,wBAAwB;IA+BlC;;OAEG;IACH,OAAO,KAAK,IAAI,GAKf;IAED,OAAO,CAAC,gBAAgB;IAiBxB;;;OAGG;IACH,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,2BAA2B;CAkCtE"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js new file mode 100644 index 0000000000..07c4fe0fc9 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +export function dim1(i){return"horizontal"===i?"width":"height"}export function dim2(i){return"horizontal"===i?"height":"width"}export function pos1(i){return"horizontal"===i?"left":"top"}export function pos2(i){return"horizontal"===i?"top":"left"}export class BaseLayout{_getDefaultConfig(){return{direction:"vertical"}}constructor(i,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=i,Promise.resolve().then((()=>this.config=t||this._getDefaultConfig()))}set config(i){Object.assign(this,Object.assign({},this._getDefaultConfig(),i))}get config(){return{direction:this.direction}}get items(){return this._items}set items(i){this._setItems(i)}_setItems(i){i!==this._items&&(this._items=i,this._scheduleReflow())}get direction(){return this._direction}set direction(i){(i="horizontal"===i?i:"vertical")!==this._direction&&(this._direction=i,this._sizeDim="horizontal"===i?"width":"height",this._secondarySizeDim="horizontal"===i?"height":"width",this._positionDim="horizontal"===i?"left":"top",this._secondaryPositionDim="horizontal"===i?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(i){const{_viewDim1:t,_viewDim2:s}=this;Object.assign(this._viewportSize,i),s!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(i){Object.assign(this._latestCoords,i);const t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(i=!1){(i||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(i){this._pin=i,this._triggerReflow()}get pin(){if(null!==this._pin){const{index:i,block:t}=this._pin;return{index:Math.max(0,Math.min(i,this.items.length-1)),block:t}}return null}_clampScrollPosition(i){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(i,this.totalScrollSize[dim1(this.direction)]-this._viewDim1))}unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then((()=>this.reflowIfNeeded()))}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(null!==this.pin){const i=this._scrollPosition,{index:t,block:s}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:s||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=i-this._scrollPosition}}_calculateScrollIntoViewPosition(i){const{block:t}=i,s=Math.min(this.items.length,Math.max(0,i.index)),e=this._getItemPosition(s)[this._positionDim];let o=e;if("start"!==t){const i=this._getItemSize(s)[this._sizeDim];if("center"===t)o=e-.5*this._viewDim1+.5*i;else{const s=e-this._viewDim1+i;if("end"===t)o=s;else{const i=this._scrollPosition;o=Math.abs(i-e)0||null!==this._pin)this._scheduleReflow();else{const i=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>i||this._physicalMaxthis._first&&Math.round(this._getItemPosition(s)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)s--;t===this._firstVisible&&s===this._lastVisible||(this._firstVisible=t,this._lastVisible=s,i&&i.emit&&this._sendVisibilityChangedMessage())}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js.map new file mode 100644 index 0000000000..f8edb4bdab --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseLayout.js","sourceRoot":"","sources":["../../src/layouts/shared/BaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqBH,MAAM,UAAU,IAAI,CAAC,SAA0B;IAC7C,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,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AK,CAAC;QAC7B,OACE,WAAW,GAAG,IAAI,CAAC,MAAM;YACzB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC/D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,EACnD;YACA,WAAW,EAAE,CAAC;SACf;QAED,IACE,YAAY,KAAK,IAAI,CAAC,aAAa;YACnC,WAAW,KAAK,IAAI,CAAC,YAAY,EACjC;YACA,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;YAClC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;YAChC,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;gBAC3B,IAAI,CAAC,6BAA6B,EAAE,CAAC;aACtC;SACF;IACH,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {\n Layout,\n ChildPositions,\n Positions,\n ScrollDirection,\n Size,\n dimension,\n position,\n PinOptions,\n ScrollToCoordinates,\n BaseLayoutConfig,\n StateChangedMessage,\n LayoutHostSink,\n} from './Layout.js';\n\ntype UpdateVisibleIndicesOptions = {\n emit?: boolean;\n};\n\nexport function dim1(direction: ScrollDirection): dimension {\n return direction === 'horizontal' ? 'width' : 'height';\n}\n\nexport function dim2(direction: ScrollDirection): dimension {\n return direction === 'horizontal' ? 'height' : 'width';\n}\n\nexport function pos1(direction: ScrollDirection): position {\n return direction === 'horizontal' ? 'left' : 'top';\n}\n\nexport function pos2(direction: ScrollDirection): position {\n return direction === 'horizontal' ? 'top' : 'left';\n}\n\nexport abstract class BaseLayout implements Layout {\n /**\n * The last set viewport scroll position.\n */\n private _latestCoords: Positions = {left: 0, top: 0};\n\n /**\n * Scrolling direction.\n */\n private _direction: ScrollDirection | null = null;\n\n /**\n * Dimensions of the viewport.\n */\n private _viewportSize: Size = {width: 0, height: 0};\n\n public totalScrollSize: Size = {width: 0, height: 0};\n\n public offsetWithinScroller: Positions = {left: 0, top: 0};\n\n /**\n * Flag for debouncing asynchronous reflow requests.\n */\n private _pendingReflow = false;\n\n private _pendingLayoutUpdate = false;\n\n protected _pin: PinOptions | null = null;\n\n /**\n * The index of the first item intersecting the viewport.\n */\n protected _firstVisible = 0;\n\n /**\n * The index of the last item intersecting the viewport.\n */\n protected _lastVisible = 0;\n\n /**\n * Pixel offset in the scroll direction of the first child.\n */\n protected _physicalMin = 0;\n\n /**\n * Pixel offset in the scroll direction of the last child.\n */\n protected _physicalMax = 0;\n\n /**\n * Index of the first child.\n */\n protected _first = -1;\n\n /**\n * Index of the last child.\n */\n protected _last = -1;\n\n /**\n * Length in the scrolling direction.\n */\n protected _sizeDim: dimension = 'height';\n\n /**\n * Length in the non-scrolling direction.\n */\n protected _secondarySizeDim: dimension = 'width';\n\n /**\n * Position in the scrolling direction.\n */\n protected _positionDim: position = 'top';\n\n /**\n * Position in the non-scrolling direction.\n */\n protected _secondaryPositionDim: position = 'left';\n\n /**\n * Current scroll offset in pixels.\n */\n protected _scrollPosition = 0;\n\n /**\n * Difference between current scroll offset and scroll offset calculated due\n * to a reflow.\n */\n protected _scrollError = 0;\n\n /**\n * Total number of items that could possibly be displayed. Used to help\n * calculate the scroll size.\n */\n protected _items: unknown[] = [];\n\n /**\n * The total (estimated) length of all items in the scrolling direction.\n */\n protected _scrollSize = 1;\n\n /**\n * Number of pixels beyond the viewport to still include\n * in the active range of items.\n */\n // TODO (graynorton): Probably want to make this something we calculate based\n // on viewport size, item size, other factors, possibly still with a dial of some kind\n protected _overhang = 1000;\n\n /**\n * Call this to deliver messages (e.g. stateChanged, unpinned) to host\n */\n private _hostSink: LayoutHostSink;\n\n protected _getDefaultConfig(): C {\n return {\n direction: 'vertical',\n } as C;\n }\n\n constructor(hostSink: LayoutHostSink, config?: C) {\n this._hostSink = hostSink;\n // Delay setting config so that subclasses do setup work first\n Promise.resolve().then(\n () => (this.config = config || this._getDefaultConfig())\n );\n }\n\n set config(config: C) {\n Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));\n }\n\n get config(): C {\n return {\n direction: this.direction,\n } as C;\n }\n\n /**\n * Maximum index of children + 1, to help estimate total height of the scroll\n * space.\n */\n get items(): unknown[] {\n return this._items;\n }\n\n set items(items: unknown[]) {\n this._setItems(items);\n }\n\n protected _setItems(items: unknown[]) {\n if (items !== this._items) {\n this._items = items;\n this._scheduleReflow();\n }\n }\n\n /**\n * Primary scrolling direction.\n */\n get direction(): ScrollDirection {\n return this._direction!;\n }\n set direction(dir) {\n // Force it to be either horizontal or vertical.\n dir = dir === 'horizontal' ? dir : 'vertical';\n if (dir !== this._direction) {\n this._direction = dir;\n this._sizeDim = dir === 'horizontal' ? 'width' : 'height';\n this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';\n this._positionDim = dir === 'horizontal' ? 'left' : 'top';\n this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';\n this._triggerReflow();\n }\n }\n\n /**\n * Height and width of the viewport.\n */\n get viewportSize(): Size {\n return this._viewportSize;\n }\n set viewportSize(dims) {\n const {_viewDim1, _viewDim2} = this;\n Object.assign(this._viewportSize, dims);\n if (_viewDim2 !== this._viewDim2) {\n // this._viewDim2Changed();\n this._scheduleLayoutUpdate();\n } else if (_viewDim1 !== this._viewDim1) {\n this._checkThresholds();\n }\n }\n\n /**\n * Scroll offset of the viewport.\n */\n get viewportScroll(): Positions {\n return this._latestCoords;\n }\n set viewportScroll(coords) {\n Object.assign(this._latestCoords, coords);\n const oldPos = this._scrollPosition;\n this._scrollPosition = this._latestCoords[this._positionDim];\n const change = Math.abs(oldPos - this._scrollPosition);\n if (change >= 1) {\n this._checkThresholds();\n }\n }\n\n /**\n * Perform a reflow if one has been scheduled.\n */\n reflowIfNeeded(force = false) {\n if (force || this._pendingReflow) {\n this._pendingReflow = false;\n this._reflow();\n }\n }\n\n set pin(options: PinOptions | null) {\n this._pin = options;\n this._triggerReflow();\n }\n\n get pin() {\n if (this._pin !== null) {\n const {index, block} = this._pin;\n return {\n index: Math.max(0, Math.min(index, this.items.length - 1)),\n block,\n };\n }\n return null;\n }\n\n _clampScrollPosition(val: number) {\n return Math.max(\n -this.offsetWithinScroller[this._positionDim],\n Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1)\n );\n }\n\n unpin() {\n if (this._pin !== null) {\n this._sendUnpinnedMessage();\n this._pin = null;\n }\n }\n\n /**\n * Get the top and left positioning of the item at idx.\n */\n protected abstract _getItemPosition(idx: number): Positions;\n\n /**\n * Update _first and _last based on items that should be in the current\n * range.\n */\n protected abstract _getActiveItems(): void;\n\n protected abstract _getItemSize(_idx: number): Size;\n\n /**\n * Calculates (precisely or by estimating, if needed) the total length of all items in\n * the scrolling direction, including spacing, caching the value in the `_scrollSize` field.\n *\n * Should return a minimum value of 1 to ensure at least one item is rendered.\n * TODO (graynorton): Possibly no longer required, but leaving here until it can be verified.\n */\n protected abstract _updateScrollSize(): void;\n\n protected _updateLayout(): void {\n // Override\n }\n\n // protected _viewDim2Changed(): void {\n // this._scheduleLayoutUpdate();\n // }\n\n /**\n * The height or width of the viewport, whichever corresponds to the scrolling direction.\n */\n protected get _viewDim1(): number {\n return this._viewportSize[this._sizeDim];\n }\n\n /**\n * The height or width of the viewport, whichever does NOT correspond to the scrolling direction.\n */\n protected get _viewDim2(): number {\n return this._viewportSize[this._secondarySizeDim];\n }\n\n protected _scheduleReflow() {\n this._pendingReflow = true;\n }\n\n protected _scheduleLayoutUpdate() {\n this._pendingLayoutUpdate = true;\n this._scheduleReflow();\n }\n\n // For triggering a reflow based on incoming changes to\n // the layout config.\n protected _triggerReflow() {\n this._scheduleLayoutUpdate();\n // TODO graynorton@: reflowIfNeeded() isn't really supposed\n // to be called internally. Address in larger cleanup\n // of virtualizer / layout interaction pattern.\n // this.reflowIfNeeded(true);\n Promise.resolve().then(() => this.reflowIfNeeded());\n }\n\n protected _reflow() {\n if (this._pendingLayoutUpdate) {\n this._updateLayout();\n this._pendingLayoutUpdate = false;\n }\n this._updateScrollSize();\n this._setPositionFromPin();\n this._getActiveItems();\n this._updateVisibleIndices();\n this._sendStateChangedMessage();\n }\n\n /**\n * If we are supposed to be pinned to a particular\n * item or set of coordinates, we set `_scrollPosition`\n * accordingly and adjust `_scrollError` as needed\n * so that the virtualizer can keep the scroll\n * position in the DOM in sync\n */\n protected _setPositionFromPin() {\n if (this.pin !== null) {\n const lastScrollPosition = this._scrollPosition;\n const {index, block} = this.pin;\n this._scrollPosition =\n this._calculateScrollIntoViewPosition({\n index,\n block: block || 'start',\n }) - this.offsetWithinScroller[this._positionDim];\n this._scrollError = lastScrollPosition - this._scrollPosition;\n }\n }\n /**\n * Calculate the coordinates to scroll to, given\n * a request to scroll to the element at a specific\n * index.\n *\n * Supports the same positioning options (`start`,\n * `center`, `end`, `nearest`) as the standard\n * `Element.scrollIntoView()` method, but currently\n * only considers the provided value in the `block`\n * dimension, since we don't yet have any layouts\n * that support virtualization in two dimensions.\n */\n protected _calculateScrollIntoViewPosition(options: PinOptions) {\n const {block} = options;\n const index = Math.min(this.items.length, Math.max(0, options.index));\n const itemStartPosition = this._getItemPosition(index)[this._positionDim];\n let scrollPosition = itemStartPosition;\n if (block !== 'start') {\n const itemSize = this._getItemSize(index)[this._sizeDim];\n if (block === 'center') {\n scrollPosition =\n itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;\n } else {\n const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;\n if (block === 'end') {\n scrollPosition = itemEndPosition;\n } else {\n // block === 'nearest'\n const currentScrollPosition = this._scrollPosition;\n scrollPosition =\n Math.abs(currentScrollPosition - itemStartPosition) <\n Math.abs(currentScrollPosition - itemEndPosition)\n ? itemStartPosition\n : itemEndPosition;\n }\n }\n }\n scrollPosition += this.offsetWithinScroller[this._positionDim];\n return this._clampScrollPosition(scrollPosition);\n }\n\n public getScrollIntoViewCoordinates(\n options: PinOptions\n ): ScrollToCoordinates {\n return {\n [this._positionDim as position]:\n this._calculateScrollIntoViewPosition(options),\n } as ScrollToOptions;\n }\n\n private _sendUnpinnedMessage() {\n this._hostSink({\n type: 'unpinned',\n });\n }\n\n private _sendVisibilityChangedMessage() {\n this._hostSink({\n type: 'visibilityChanged',\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n });\n }\n\n protected _sendStateChangedMessage() {\n const childPositions: ChildPositions = new Map();\n if (this._first !== -1 && this._last !== -1) {\n for (let idx = this._first; idx <= this._last; idx++) {\n childPositions.set(idx, this._getItemPosition(idx));\n }\n }\n const message: StateChangedMessage = {\n type: 'stateChanged',\n scrollSize: {\n [this._sizeDim]: this._scrollSize,\n [this._secondarySizeDim]: null,\n } as Size,\n range: {\n first: this._first,\n last: this._last,\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n },\n childPositions,\n };\n if (this._scrollError) {\n message.scrollError = {\n [this._positionDim]: this._scrollError,\n [this._secondaryPositionDim]: 0,\n } as Positions;\n this._scrollError = 0;\n }\n this._hostSink(message);\n }\n\n /**\n * Number of items to display.\n */\n private get _num(): number {\n if (this._first === -1 || this._last === -1) {\n return 0;\n }\n return this._last - this._first + 1;\n }\n\n private _checkThresholds() {\n if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {\n this._scheduleReflow();\n } else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(\n this._scrollSize,\n this._scrollPosition + this._viewDim1 + this._overhang\n );\n if (this._physicalMin > min || this._physicalMax < max) {\n this._scheduleReflow();\n } else {\n this._updateVisibleIndices({emit: true});\n }\n }\n }\n\n /**\n * Find the indices of the first and last items to intersect the viewport.\n * Emit a visibleindiceschange event when either index changes.\n */\n protected _updateVisibleIndices(options?: UpdateVisibleIndicesOptions) {\n if (this._first === -1 || this._last === -1) return;\n\n let firstVisible = this._first;\n while (\n firstVisible < this._last &&\n Math.round(\n this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]\n ) <= Math.round(this._scrollPosition)\n ) {\n firstVisible++;\n }\n\n let lastVisible = this._last;\n while (\n lastVisible > this._first &&\n Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=\n Math.round(this._scrollPosition + this._viewDim1)\n ) {\n lastVisible--;\n }\n\n if (\n firstVisible !== this._firstVisible ||\n lastVisible !== this._lastVisible\n ) {\n this._firstVisible = firstVisible;\n this._lastVisible = lastVisible;\n if (options && options.emit) {\n this._sendVisibilityChangedMessage();\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.d.ts.map new file mode 100644 index 0000000000..0cf528a68e --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GridBaseLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/shared/GridBaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,WAAW,EAEZ,MAAM,+BAA+B,CAAC;AAGvC,KAAK,QAAQ,GACT,OAAO,GACP;IAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;CAAC,CAAC;AAC7D,KAAK,WAAW,GACZ,OAAO,GACP,QAAQ,GACR,KAAK,GACL,cAAc,GACd,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,8BAA8B,EAAE,KAAK,CAAC;IACnD,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAID,8BAAsB,cAAc,CAClC,CAAC,SAAS,oBAAoB,CAC9B,SAAQ,wBAAwB,CAAC,CAAC,CAAC;IACnC,SAAS,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACpD,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAC7B,OAAO,EAAE,WAAW,GAAG,IAAI,CAAQ;IAEnC,SAAS,CAAC,iBAAiB,IAAI,CAAC;IAOhC,IAAI,GAAG,CAAC,IAAI,EAAE,WAAW,EAExB;IAED,SAAS,CAAC,aAAa;CA4JxB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js new file mode 100644 index 0000000000..a26d1ec518 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/GridBaseLayout.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{SizeGapPaddingBaseLayout as e,gap2 as i}from"./SizeGapPaddingBaseLayout.js";import{dim1 as t}from"./BaseLayout.js";export class GridBaseLayout extends e{constructor(){super(...arguments),this._metrics=null,this.flex=null,this.justify=null}_getDefaultConfig(){return Object.assign({},super._getDefaultConfig(),{flex:!1,justify:"start"})}set gap(e){super._setGap(e)}_updateLayout(){const e=this.justify,[s,a]=this._padding1,[n,r]=this._padding2;["_gap1","_gap2"].forEach((t=>{const s=this[t];if(s===1/0&&!["space-between","space-around","space-evenly"].includes(e))throw new Error("grid layout: gap can only be set to 'auto' when justify is set to 'space-between', 'space-around' or 'space-evenly'");if(s===1/0&&"_gap2"===t)throw new Error(`grid layout: ${i(this.direction)}-gap cannot be set to 'auto' when direction is set to ${this.direction}`)}));const o=this.flex||["start","center","end"].includes(e),d={rolumns:-1,itemSize1:-1,itemSize2:-1,gap1:this._gap1===1/0?-1:this._gap1,gap2:o?this._gap2:0,padding1:{start:s===1/0?this._gap1:s,end:a===1/0?this._gap1:a},padding2:o?{start:n===1/0?this._gap2:n,end:r===1/0?this._gap2:r}:{start:0,end:0},positions:[]},p=this._viewDim2-d.padding2.start-d.padding2.end;if(p<=0)d.rolumns=0;else{const i=o?d.gap2:0;let n,r=0,h=0;if(p>=this._idealSize2&&(r=Math.floor((p-this._idealSize2)/(this._idealSize2+i))+1,h=r*this._idealSize2+(r-1)*i),this.flex){(p-h)/(this._idealSize2+i)>=.5&&(r+=1),d.rolumns=r,d.itemSize2=Math.round((p-i*(r-1))/r);switch(!0===this.flex?"area":this.flex.preserve){case"aspect-ratio":d.itemSize1=Math.round(this._idealSize1/this._idealSize2*d.itemSize2);break;case t(this.direction):d.itemSize1=Math.round(this._idealSize1);break;default:d.itemSize1=Math.round(this._idealSize1*this._idealSize2/d.itemSize2)}}else d.itemSize1=this._idealSize1,d.itemSize2=this._idealSize2,d.rolumns=r;if(o){const i=d.rolumns*d.itemSize2+(d.rolumns-1)*d.gap2;n=this.flex||"start"===e?d.padding2.start:"end"===e?this._viewDim2-d.padding2.end-i:Math.round(this._viewDim2/2-i/2)}else{const i=p-d.rolumns*d.itemSize2;"space-between"===e?(d.gap2=Math.round(i/(d.rolumns-1)),n=0):"space-around"===e?(d.gap2=Math.round(i/d.rolumns),n=Math.round(d.gap2/2)):(d.gap2=Math.round(i/(d.rolumns+1)),n=d.gap2),this._gap1===1/0&&(d.gap1=d.gap2,s===1/0&&(d.padding1.start=n),a===1/0&&(d.padding1.end=n))}for(let e=0;e {\n gap?: AutoGapSpec;\n flex?: FlexSpec;\n justify?: JustifySpec;\n}\n\ninterface GridLayoutMetrics {\n rolumns: number;\n itemSize1: number;\n itemSize2: number;\n gap1: number;\n gap2: number;\n padding1: {\n start: number;\n end: number;\n };\n padding2: {\n start: number;\n end: number;\n };\n positions: number[];\n}\n\n///\n\nexport abstract class GridBaseLayout<\n C extends GridBaseLayoutConfig\n> extends SizeGapPaddingBaseLayout {\n protected _metrics: GridLayoutMetrics | null = null;\n flex: FlexSpec | null = null;\n justify: JustifySpec | null = null;\n\n protected _getDefaultConfig(): C {\n return Object.assign({}, super._getDefaultConfig(), {\n flex: false,\n justify: 'start',\n });\n }\n\n set gap(spec: AutoGapSpec) {\n super._setGap(spec);\n }\n\n protected _updateLayout() {\n const justify = this.justify as JustifySpec;\n const [padding1Start, padding1End] = this._padding1;\n const [padding2Start, padding2End] = this._padding2;\n\n // TODO (graynorton): Omit these checks in production mode\n ['_gap1', '_gap2'].forEach((gap) => {\n const gapValue = this[gap as '_gap1' | '_gap2'];\n if (\n gapValue === Infinity &&\n !['space-between', 'space-around', 'space-evenly'].includes(justify)\n ) {\n throw new Error(\n `grid layout: gap can only be set to 'auto' when justify is set to 'space-between', 'space-around' or 'space-evenly'`\n );\n }\n if (gapValue === Infinity && gap === '_gap2') {\n throw new Error(\n `grid layout: ${gap2Name(\n this.direction\n )}-gap cannot be set to 'auto' when direction is set to ${\n this.direction\n }`\n );\n }\n });\n\n const usePaddingAndGap2 =\n this.flex || ['start', 'center', 'end'].includes(justify);\n\n const metrics: GridLayoutMetrics = {\n rolumns: -1,\n itemSize1: -1,\n itemSize2: -1,\n // Infinity represents 'auto', so we set an invalid placeholder until we can calculate\n gap1: this._gap1 === Infinity ? -1 : this._gap1,\n gap2: usePaddingAndGap2 ? this._gap2 : 0,\n // Infinity represents 'match-gap', so we set padding to match gap\n padding1: {\n start: padding1Start === Infinity ? this._gap1 : padding1Start,\n end: padding1End === Infinity ? this._gap1 : padding1End,\n },\n padding2: usePaddingAndGap2\n ? {\n start: padding2Start === Infinity ? this._gap2 : padding2Start,\n end: padding2End === Infinity ? this._gap2 : padding2End,\n }\n : {\n start: 0,\n end: 0,\n },\n positions: [],\n };\n\n // 1. Calculate available space, taking padding into account\n const availableSpace =\n this._viewDim2 - metrics.padding2.start - metrics.padding2.end;\n if (availableSpace <= 0) {\n // If we have no space, we won't render any rolumns\n metrics.rolumns = 0;\n } else {\n // 2. Calculate how many ideally sized \"rolumns\" (including gaps) fit in the available space\n const gapSize = usePaddingAndGap2 ? metrics.gap2 : 0;\n let rolumns = 0;\n let spaceTaken = 0;\n if (availableSpace >= this._idealSize2) {\n rolumns =\n Math.floor(\n (availableSpace - this._idealSize2) / (this._idealSize2 + gapSize)\n ) + 1;\n spaceTaken = rolumns * this._idealSize2 + (rolumns - 1) * gapSize;\n }\n // 3. If we're flexing items to fill the available space exactly, decide whether to add\n // a rolumn and reduce item size, or keep the number of rolumns and increase item size\n if (this.flex) {\n // If we have at least half the space we need for another rolumn, go ahead and add one\n if (\n (availableSpace - spaceTaken) / (this._idealSize2 + gapSize) >=\n 0.5\n ) {\n rolumns = rolumns + 1;\n }\n metrics.rolumns = rolumns;\n // Calculate the flexed item size\n metrics.itemSize2 = Math.round(\n (availableSpace - gapSize * (rolumns - 1)) / rolumns\n );\n // Calculate item size in the other dimension, preserving area (the default), aspect ratio or ideal size in that dimension as specified\n const preserve = this.flex === true ? 'area' : this.flex.preserve;\n switch (preserve) {\n case 'aspect-ratio':\n metrics.itemSize1 = Math.round(\n (this._idealSize1 / this._idealSize2) * metrics.itemSize2\n );\n break;\n case dim1(this.direction):\n metrics.itemSize1 = Math.round(this._idealSize1);\n break;\n case 'area':\n default:\n metrics.itemSize1 = Math.round(\n (this._idealSize1 * this._idealSize2) / metrics.itemSize2\n );\n }\n } else {\n // We're not flexing, so use the specified sizes unmodified\n metrics.itemSize1 = this._idealSize1;\n metrics.itemSize2 = this._idealSize2;\n metrics.rolumns = rolumns;\n }\n // 4. Calculate the position for each item in a template rolumn\n let pos: number;\n if (usePaddingAndGap2) {\n const spaceTaken =\n metrics.rolumns * metrics.itemSize2 +\n (metrics.rolumns - 1) * metrics.gap2;\n pos =\n this.flex || justify === 'start'\n ? metrics.padding2.start\n : justify === 'end'\n ? this._viewDim2 - metrics.padding2.end - spaceTaken\n : Math.round(this._viewDim2 / 2 - spaceTaken / 2);\n } else {\n const spaceToDivide =\n availableSpace - metrics.rolumns * metrics.itemSize2;\n if (justify === 'space-between') {\n metrics.gap2 = Math.round(spaceToDivide / (metrics.rolumns - 1));\n pos = 0;\n } else if (justify === 'space-around') {\n metrics.gap2 = Math.round(spaceToDivide / metrics.rolumns);\n pos = Math.round(metrics.gap2 / 2);\n } else {\n // justify == 'space-evenly'\n metrics.gap2 = Math.round(spaceToDivide / (metrics.rolumns + 1));\n pos = metrics.gap2;\n }\n // If primary-axis gap was set to 'auto', provide the value now\n // (and set 'match-gap' padding values transitively)\n if (this._gap1 === Infinity) {\n metrics.gap1 = metrics.gap2;\n if (padding1Start === Infinity) {\n metrics.padding1.start = pos;\n }\n if (padding1End === Infinity) {\n metrics.padding1.end = pos;\n }\n }\n }\n for (let i = 0; i < metrics.rolumns; i++) {\n metrics.positions.push(pos);\n pos += metrics.itemSize2 + metrics.gap2;\n }\n }\n\n this._metrics = metrics;\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.d.ts.map new file mode 100644 index 0000000000..6776b49170 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/layouts/shared/Layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,SAAS,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WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,OAAO,EAAE,CAAC;IAEjB,SAAS,EAAE,eAAe,CAAC;IAE3B,YAAY,EAAE,IAAI,CAAC;IAEnB,cAAc,EAAE,SAAS,CAAC;IAE1B,eAAe,EAAE,IAAI,CAAC;IAEtB,oBAAoB,EAAE,SAAS,CAAC;IAEhC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,oBAAoB,CAAC;IAE1D,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAE5C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAErD,GAAG,EAAE,UAAU,GAAG,IAAI,CAAC;IAEvB,KAAK,EAAE,QAAQ,CAAC;IAEhB,4BAA4B,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,mBAAmB,CAAC;IAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,cAAc,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js new file mode 100644 index 0000000000..0ba3c6edc5 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +export{}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js.map new file mode 100644 index 0000000000..7033be785c --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/Layout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../src/layouts/shared/Layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nexport type dimension = 'height' | 'width';\nexport type Size = {\n [key in dimension]: number;\n};\n\nexport type margin =\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft';\n\nexport type Margins = {\n [key in margin]: number;\n};\n\nexport type ItemBox = Size | (Size & Margins);\n\nexport type position = 'left' | 'top';\nexport type offset = 'top' | 'right' | 'bottom' | 'left';\nexport type offsetAxis = 'xOffset' | 'yOffset';\n\n// TODO (graynorton@): This has become a bit of a\n// grab-bag. It might make sense to let each layout define\n// its own type and provide its own implementation of\n// `positionChildren()` that knows how to translate the\n// provided fields into the appropriate DOM manipulations.\nexport type Positions = {\n left: number;\n top: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n};\n\nexport interface Range {\n first: number;\n last: number;\n}\nexport interface InternalRange extends Range {\n firstVisible: number;\n lastVisible: number;\n}\n\nexport interface StateChangedMessage {\n type: 'stateChanged';\n scrollSize: Size;\n range: InternalRange;\n childPositions: ChildPositions;\n scrollError?: Positions;\n}\n\nexport interface VisibilityChangedMessage {\n type: 'visibilityChanged';\n firstVisible: number;\n lastVisible: number;\n}\n\nexport interface UnpinnedMessage {\n type: 'unpinned';\n}\n\nexport type LayoutHostMessage =\n | StateChangedMessage\n | UnpinnedMessage\n | VisibilityChangedMessage;\n\nexport type LayoutHostSink = (message: LayoutHostMessage) => void;\n\nexport type ChildPositions = Map;\n\nexport type ChildMeasurements = {[key: number]: ItemBox};\n\nexport type MeasureChildFunction = (element: Element, item: T) => ItemBox;\n\nexport interface PinOptions {\n index: number;\n block?: ScrollLogicalPosition;\n}\n\nexport type LayoutConstructor = new (\n sink: LayoutHostSink,\n config?: object\n) => Layout;\n\nexport interface LayoutSpecifier {\n type: LayoutConstructor;\n}\n\nexport type LayoutSpecifierFactory = (config?: object) => LayoutSpecifier;\n\nexport interface BaseLayoutConfig {\n direction?: ScrollDirection;\n pin?: PinOptions;\n}\n\nexport type LayoutConfigValue = LayoutSpecifier | BaseLayoutConfig;\n\nexport interface ScrollToCoordinates {\n top?: number;\n left?: number;\n}\n\nexport type ScrollDirection = 'vertical' | 'horizontal';\n\n/**\n * Interface for layouts consumed by Virtualizer.\n */\nexport interface Layout {\n config?: object;\n\n items: unknown[];\n\n direction: ScrollDirection;\n\n viewportSize: Size;\n\n viewportScroll: Positions;\n\n totalScrollSize: Size;\n\n offsetWithinScroller: Positions;\n\n readonly measureChildren?: boolean | MeasureChildFunction;\n\n readonly listenForChildLoadEvents?: boolean;\n\n updateItemSizes?: (sizes: ChildMeasurements) => void;\n\n pin: PinOptions | null;\n\n unpin: Function;\n\n getScrollIntoViewCoordinates: (options: PinOptions) => ScrollToCoordinates;\n\n /**\n * Called by a Virtualizer when an update that\n * potentially affects layout has occurred. For example, a viewport size\n * change.\n *\n * The layout is in turn responsible for dispatching events, as necessary,\n * to the Virtualizer. Each of the following events\n * represents an update that should be determined during a reflow. Dispatch\n * each event at maximum once during a single reflow.\n *\n * Events that should be dispatched:\n * - scrollsizechange\n * Dispatch when the total length of all items in the scrolling direction,\n * including spacing, changes.\n * detail: {\n * 'height' | 'width': number\n * }\n * - rangechange\n * Dispatch when the range of children that should be displayed changes.\n * detail: {\n * first: number,\n * last: number,\n * num: number,\n * stable: boolean,\n * remeasure: boolean,\n * firstVisible: number,\n * lastVisible: number,\n * }\n * - itempositionchange\n * Dispatch when the child positions change, for example due to a range\n * change.\n * detail {\n * [number]: {\n * left: number,\n * top: number\n * }\n * }\n * - scrollerrorchange\n * Dispatch when the set viewportScroll offset is not what it should be.\n * detail {\n * height: number,\n * width: number,\n * }\n */\n reflowIfNeeded: (force?: boolean) => void;\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.d.ts.map new file mode 100644 index 0000000000..e4c5c5d704 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SizeCache.d.ts","sourceRoot":"","sources":["../../src/layouts/shared/SizeCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,iBAAiB,CAAS;IAClC,SAAS,SAAK;gBAEF,MAAM,CAAC,EAAE,eAAe;IAMpC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAMhD,IAAI,WAAW,IAAI,MAAM,CAMxB;IAED,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI9B,KAAK;CAIN"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js new file mode 100644 index 0000000000..b674530ef2 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +export class SizeCache{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===e?.roundAverageSize&&(this._roundAverageSize=!0)}set(e,t){const i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){const e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js.map new file mode 100644 index 0000000000..fbcbb56a73 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SizeCache.js","sourceRoot":"","sources":["../../src/layouts/shared/SizeCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,OAAO,SAAS;IAKpB,YAAY,MAAwB;QAJ5B,SAAI,GAAG,IAAI,GAAG,EAA2B,CAAC;QAC1C,sBAAiB,GAAG,KAAK,CAAC;QAClC,cAAS,GAAG,CAAC,CAAC;QAGZ,IAAI,MAAM,EAAE,gBAAgB,KAAK,IAAI,EAAE;YACrC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;SAC/B;IACH,CAAC;IAED,GAAG,CAAC,KAAsB,EAAE,KAAa;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,IAAI,KAAK,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,IAAI,WAAW;QACb,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE;YACtB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;SAC/D;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,CAAC,KAAsB;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nexport interface SizeCacheConfig {\n roundAverageSize?: boolean;\n}\n\nexport class SizeCache {\n private _map = new Map();\n private _roundAverageSize = false;\n totalSize = 0;\n\n constructor(config?: SizeCacheConfig) {\n if (config?.roundAverageSize === true) {\n this._roundAverageSize = true;\n }\n }\n\n set(index: number | string, value: number): void {\n const prev = this._map.get(index) || 0;\n this._map.set(index, value);\n this.totalSize += value - prev;\n }\n\n get averageSize(): number {\n if (this._map.size > 0) {\n const average = this.totalSize / this._map.size;\n return this._roundAverageSize ? Math.round(average) : average;\n }\n return 0;\n }\n\n getSize(index: number | string) {\n return this._map.get(index);\n }\n\n clear() {\n this._map.clear();\n this.totalSize = 0;\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map new file mode 100644 index 0000000000..ea211bf84c --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SizeGapPaddingBaseLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/shared/SizeGapPaddingBaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAa,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,SAAS,GA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labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js new file mode 100644 index 0000000000..0dce94b2cb --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{BaseLayout as t,dim1 as i,dim2 as e}from"./BaseLayout.js";export function gap1(t){return"horizontal"===t?"column":"row"}export function gap2(t){return"horizontal"===t?"row":"column"}export function padding1(t){return"horizontal"===t?["left","right"]:["top","bottom"]}export function padding2(t){return"horizontal"===t?["top","bottom"]:["left","right"]}export class SizeGapPaddingBaseLayout extends t{constructor(){super(...arguments),this._itemSize={},this._gaps={},this._padding={}}_getDefaultConfig(){return Object.assign({},super._getDefaultConfig(),{itemSize:{width:"300px",height:"300px"},gap:"8px",padding:"match-gap"})}get _gap(){return this._gaps.row}get _idealSize(){return this._itemSize[i(this.direction)]}get _idealSize1(){return this._itemSize[i(this.direction)]}get _idealSize2(){return this._itemSize[e(this.direction)]}get _gap1(){return this._gaps[gap1(this.direction)]}get _gap2(){return this._gaps[gap2(this.direction)]}get _padding1(){const t=this._padding,[i,e]=padding1(this.direction);return[t[i],t[e]]}get _padding2(){const t=this._padding,[i,e]=padding2(this.direction);return[t[i],t[e]]}set itemSize(t){const i=this._itemSize;"string"==typeof t&&(t={width:t,height:t});const e=parseInt(t.width),r=parseInt(t.height);e!==i.width&&(i.width=e,this._triggerReflow()),r!==i.height&&(i.height=r,this._triggerReflow())}set gap(t){this._setGap(t)}_setGap(t){const i=t.split(" ").map((t=>function gapValueToNumber(t){return"auto"===t?1/0:parseInt(t)}(t))),e=this._gaps;i[0]!==e.row&&(e.row=i[0],this._triggerReflow()),void 0===i[1]?i[0]!==e.column&&(e.column=i[0],this._triggerReflow()):i[1]!==e.column&&(e.column=i[1],this._triggerReflow())}set padding(t){const i=this._padding,e=t.split(" ").map((t=>function paddingValueToNumber(t){return"match-gap"===t?1/0:parseInt(t)}(t)));1===e.length?(i.top=i.right=i.bottom=i.left=e[0],this._triggerReflow()):2===e.length?(i.top=i.bottom=e[0],i.right=i.left=e[1],this._triggerReflow()):3===e.length?(i.top=e[0],i.right=i.left=e[1],i.bottom=e[2],this._triggerReflow()):4===e.length&&(["top","right","bottom","left"].forEach(((t,r)=>i[t]=e[r])),this._triggerReflow())}} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js.map new file mode 100644 index 0000000000..f2e733d6c0 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SizeGapPaddingBaseLayout.js","sourceRoot":"","sources":["../../src/layouts/shared/SizeGapPaddingBaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AA4BvD,qDAAqD;AACrD,uCAAuC;AACvC,IAAI;AAEJ,SAAS,oBAAoB,CAAC,CAAe;IAC3C,IAAI,CAAC,KAAK,WAAW,EAAE;QACrB,OAAO,QAAQ,CAAC;KACjB;IACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAoB;IAC5C,IAAI,CAAC,KAAK,MAAM,EAAE;QAChB,OAAO,QAAQ,CAAC;KACjB;IACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,SAA0B;IAC7C,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,SAA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\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// import { dimension } from './Layout.js';\nimport {BaseLayoutConfig} from './Layout.js';\nimport {BaseLayout, dim1, dim2} from './BaseLayout.js';\nimport {ScrollDirection, Size} from './Layout.js';\n\nexport type PixelSize = `${'0' | `${number}px`}`;\n\ntype GapValue = PixelSize;\ntype TwoGapValues = `${GapValue} ${GapValue}`;\n\nexport type GapSpec = GapValue | TwoGapValues;\n\nexport type AutoGapSpec =\n | PixelSize\n | `${PixelSize} ${PixelSize}`\n | `auto ${PixelSize}`\n | `${PixelSize} auto`;\n\ntype PaddingValue = PixelSize | 'match-gap';\ntype TwoPaddingValues = `${PaddingValue} ${PaddingValue}`;\ntype ThreePaddingValues = `${TwoPaddingValues} ${PaddingValue}`;\ntype FourPaddingValues = `${ThreePaddingValues} ${PaddingValue}`;\ntype PaddingSpec =\n | PaddingValue\n | TwoPaddingValues\n | ThreePaddingValues\n | FourPaddingValues;\n\ntype PixelDimensions = {width: PixelSize; height: PixelSize};\n\n// function numberToPixelSize(n: number): PixelSize {\n// return n === 0 ? '0' : `${n}px`;\n// }\n\nfunction paddingValueToNumber(v: PaddingValue): number {\n if (v === 'match-gap') {\n return Infinity;\n }\n return parseInt(v);\n}\n\nfunction gapValueToNumber(v: GapValue | 'auto'): number {\n if (v === 'auto') {\n return Infinity;\n }\n return parseInt(v);\n}\n\nexport function gap1(direction: ScrollDirection) {\n return direction === 'horizontal' ? 'column' : 'row';\n}\n\nexport function gap2(direction: ScrollDirection) {\n return direction === 'horizontal' ? 'row' : 'column';\n}\n\nexport function padding1(direction: ScrollDirection): [side, side] {\n return direction === 'horizontal' ? ['left', 'right'] : ['top', 'bottom'];\n}\n\nexport function padding2(direction: ScrollDirection): [side, side] {\n return direction === 'horizontal' ? ['top', 'bottom'] : ['left', 'right'];\n}\n\nexport interface SizeGapPaddingBaseLayoutConfig extends BaseLayoutConfig {\n // gap?: GapSpec,\n padding?: PaddingSpec;\n itemSize?: PixelDimensions | PixelSize;\n}\n\ntype gap = 'row' | 'column';\ntype side = 'top' | 'right' | 'bottom' | 'left';\ntype Gaps = {[key in gap]: number};\ntype Padding = {[key in side]: number};\n\nexport abstract class SizeGapPaddingBaseLayout<\n C extends SizeGapPaddingBaseLayoutConfig\n> extends BaseLayout {\n protected _itemSize: Size | {} = {};\n protected _gaps: Gaps | {} = {};\n protected _padding: Padding | {} = {};\n\n protected _getDefaultConfig(): C {\n return Object.assign({}, super._getDefaultConfig(), {\n itemSize: {width: '300px', height: '300px'},\n gap: '8px',\n padding: 'match-gap',\n }) as C;\n }\n\n // Temp, to support current flexWrap implementation\n protected get _gap(): number {\n return (this._gaps as Gaps).row;\n }\n\n // Temp, to support current flexWrap implementation\n protected get _idealSize(): number {\n return (this._itemSize as Size)[dim1(this.direction)];\n }\n\n protected get _idealSize1(): number {\n return (this._itemSize as Size)[dim1(this.direction)];\n }\n\n protected get _idealSize2(): number {\n return (this._itemSize as Size)[dim2(this.direction)];\n }\n\n protected get _gap1(): number {\n return (this._gaps as Gaps)[gap1(this.direction)];\n }\n\n protected get _gap2(): number {\n return (this._gaps as Gaps)[gap2(this.direction)];\n }\n\n protected get _padding1(): [number, number] {\n const padding = this._padding as Padding;\n const [start, end] = padding1(this.direction);\n return [padding[start], padding[end]];\n }\n\n protected get _padding2(): [number, number] {\n const padding = this._padding as Padding;\n const [start, end] = padding2(this.direction);\n return [padding[start], padding[end]];\n }\n\n set itemSize(dims: PixelDimensions | PixelSize) {\n const size = this._itemSize as Size;\n if (typeof dims === 'string') {\n dims = {\n width: dims,\n height: dims,\n };\n }\n const width = parseInt(dims.width);\n const height = parseInt(dims.height);\n if (width !== size.width) {\n size.width = width;\n this._triggerReflow();\n }\n if (height !== size.height) {\n size.height = height;\n this._triggerReflow();\n }\n }\n\n set gap(spec: GapSpec | AutoGapSpec) {\n this._setGap(spec);\n }\n\n // This setter is overridden in specific layouts to narrow the accepted types\n protected _setGap(spec: GapSpec | AutoGapSpec) {\n const values = spec.split(' ').map((v) => gapValueToNumber(v as GapValue));\n const gaps = this._gaps as Gaps;\n if (values[0] !== gaps.row) {\n gaps.row = values[0];\n this._triggerReflow();\n }\n if (values[1] === undefined) {\n if (values[0] !== gaps.column) {\n gaps.column = values[0];\n this._triggerReflow();\n }\n } else {\n if (values[1] !== gaps.column) {\n gaps.column = values[1];\n this._triggerReflow();\n }\n }\n }\n\n set padding(spec: PaddingSpec) {\n const padding = this._padding as Padding;\n const values = spec\n .split(' ')\n .map((v) => paddingValueToNumber(v as PaddingValue));\n if (values.length === 1) {\n padding.top = padding.right = padding.bottom = padding.left = values[0];\n this._triggerReflow();\n } else if (values.length === 2) {\n padding.top = padding.bottom = values[0];\n padding.right = padding.left = values[1];\n this._triggerReflow();\n } else if (values.length === 3) {\n padding.top = values[0];\n padding.right = padding.left = values[1];\n padding.bottom = values[2];\n this._triggerReflow();\n } else if (values.length === 4) {\n ['top', 'right', 'bottom', 'left'].forEach(\n (side, idx) => (padding[side as side] = values[idx])\n );\n this._triggerReflow();\n }\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.d.ts.map new file mode 100644 index 0000000000..21bf4f02c7 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lit-virtualizer.d.ts","sourceRoot":"","sources":["src/lit-virtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,cAAc,EAAC,CAAC;AACxB,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,aAAa,CAAC;AAOtE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js new file mode 100644 index 0000000000..8f6affe601 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{LitVirtualizer as e}from"./LitVirtualizer.js";export{e as LitVirtualizer};export{RangeChangedEvent,VisibilityChangedEvent}from"./events.js";customElements.define("lit-virtualizer",e); \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js.map new file mode 100644 index 0000000000..f5ec890163 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/lit-virtualizer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lit-virtualizer.js","sourceRoot":"","sources":["src/lit-virtualizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,cAAc,EAAC,CAAC;AACxB,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,aAAa,CAAC;AAEtE;;GAEG;AACH,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {LitVirtualizer} from './LitVirtualizer.js';\nexport {LitVirtualizer};\nexport {RangeChangedEvent, VisibilityChangedEvent} from './events.js';\n\n/**\n * Import this module to declare the lit-virtualizer custom element.\n */\ncustomElements.define('lit-virtualizer', LitVirtualizer);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-virtualizer': LitVirtualizer;\n }\n}\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.d.ts.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.d.ts.map new file mode 100644 index 0000000000..f78591e8b9 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"virtualize.d.ts","sourceRoot":"","sources":["src/virtualize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAE,SAAS,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAY,eAAe,EAAE,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAS,KAAK,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAC,cAAc,EAAE,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C;;;OAGG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAEnC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI,CAC5C,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,KACV,cAAc,CAAC;AAEpB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAA2B,CAAC;AAC1E,eAAO,MAAM,iBAAiB,EAAE,kBAAkB,CAAC,OAAO,CAGP,CAAC;AAEpD,cAAM,mBAAmB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,cAAc;IAC3D,YAAY,EAAE,WAAW,GAAG,IAAI,CAAQ;IACxC,MAAM,SAAK;IACX,KAAK,SAAM;IACX,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC,CACW;IAC7C,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CACwB;IAC9C,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAM;gBAEV,IAAI,EAAE,QAAQ;IAS1B,MAAM,CAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC;IAc5C,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;YAYlD,wBAAwB;IActC,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,WAAW;IAYnB,YAAY;IAIZ,WAAW;CAGZ;AAED,eAAO,MAAM,UAAU,4DAElB,gBAAgB,0BAA0B,CAAC,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js new file mode 100644 index 0000000000..9ffa427762 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import{html as t,noChange as i}from"../../lit/index.js";import{directive as e,PartType as s}from"../../lit/directive.js";import{AsyncDirective as r}from"../../lit/async-directive.js";import{repeat as n}from"../../lit/directives/repeat.js";import{Virtualizer as o}from"./Virtualizer.js";export{virtualizerRef}from"./Virtualizer.js";export const defaultKeyFunction=t=>t;export const defaultRenderItem=(i,e)=>t`${e}: ${JSON.stringify(i,null,2)}`;export const virtualize=e(class VirtualizeDirective extends r{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,i)=>defaultRenderItem(t,i+this._first),this._keyFunction=(t,i)=>defaultKeyFunction(t,this._first),this._items=[],t.type!==s.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const i=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)i.push(this._items[t]);return n(i,this._keyFunction,this._renderItem)}update(t,[e]){this._setFunctions(e);const s=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(t,e):this._initialize(t,e),s?i:this.render()}async _updateVirtualizerConfig(t,i){if(!await this._virtualizer.updateLayoutConfig(i.layout||{})){const e=t.parentNode;this._makeVirtualizer(e,i)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:i,keyFunction:e}=t;i&&(this._renderItem=(t,e)=>i(t,e+this._first)),e&&(this._keyFunction=(t,i)=>e(t,i+this._first))}_makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();const{layout:e,scroller:s,items:r}=i;this._virtualizer=new o({hostElement:t,layout:e,scroller:s}),this._virtualizer.items=r,this._virtualizer.connected()}_initialize(t,i){const e=t.parentNode;e&&1===e.nodeType&&(e.addEventListener("rangeChanged",(t=>{this._first=t.first,this._last=t.last,this.setValue(this.render())})),this._makeVirtualizer(e,i))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}}); \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js.map b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js.map new file mode 100644 index 0000000000..e4c4c41578 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit-labs/virtualizer/virtualize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"virtualize.js","sourceRoot":"","sources":["src/virtualize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA4B,IAAI,EAAE,QAAQ,EA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AAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC;gBACtB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC;gBACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SAC5C;IACH,CAAC;IAED,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,CAAC;IACpC,CAAC;IAED,WAAW;QACT,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,CAAC;IACjC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,mBAAmB,CAEP,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {TemplateResult, ChildPart, html, noChange} from 'lit';\nimport {directive, DirectiveResult, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\nimport {repeat, KeyFn} from 'lit/directives/repeat.js';\nimport {Virtualizer} from './Virtualizer.js';\nimport {RangeChangedEvent} from './events.js';\nimport {LayoutConfigValue} from './layouts/shared/Layout.js';\n\nexport {virtualizerRef, VirtualizerHostElement} from './Virtualizer.js';\n\n/**\n * Configuration options for the virtualize directive.\n */\nexport interface VirtualizeDirectiveConfig {\n /**\n * A function that returns a lit-html TemplateResult. It will be used\n * to generate the DOM for each item in the virtual list.\n */\n renderItem?: RenderItemFunction;\n\n keyFunction?: KeyFn;\n\n scroller?: boolean;\n\n // TODO (graynorton): Document...\n layout?: LayoutConfigValue;\n\n /**\n * The list of items to display via the renderItem function.\n */\n items?: Array;\n}\n\nexport type RenderItemFunction = (\n item: T,\n index: number\n) => TemplateResult;\n\nexport const defaultKeyFunction: KeyFn = (item: unknown) => item;\nexport const defaultRenderItem: RenderItemFunction = (\n item: unknown,\n idx: number\n) => html`${idx}: ${JSON.stringify(item, null, 2)}`;\n\nclass VirtualizeDirective extends AsyncDirective {\n _virtualizer: Virtualizer | null = null;\n _first = 0;\n _last = -1;\n _renderItem: RenderItemFunction = (item: T, idx: number) =>\n defaultRenderItem(item, idx + this._first);\n _keyFunction: KeyFn = (item: T, idx: number) =>\n defaultKeyFunction(item, idx + this._first);\n _items: Array = [];\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.CHILD) {\n throw new Error(\n 'The virtualize directive can only be used in child expressions'\n );\n }\n }\n\n render(config?: VirtualizeDirectiveConfig) {\n if (config) {\n this._setFunctions(config);\n }\n const itemsToRender: Array = [];\n\n if (this._first >= 0 && this._last >= this._first) {\n for (let i = this._first; i <= this._last; i++) {\n itemsToRender.push(this._items[i]);\n }\n }\n return repeat(itemsToRender, this._keyFunction, this._renderItem);\n }\n\n update(part: ChildPart, [config]: [VirtualizeDirectiveConfig]) {\n this._setFunctions(config);\n const itemsChanged = this._items !== config.items;\n this._items = config.items || [];\n if (this._virtualizer) {\n this._updateVirtualizerConfig(part, config);\n } else {\n this._initialize(part, config);\n }\n return itemsChanged ? noChange : this.render();\n }\n\n private async _updateVirtualizerConfig(\n part: ChildPart,\n config: VirtualizeDirectiveConfig\n ) {\n const compatible = await this._virtualizer!.updateLayoutConfig(\n config.layout || {}\n );\n if (!compatible) {\n const hostElement = part.parentNode as HTMLElement;\n this._makeVirtualizer(hostElement, config);\n }\n this._virtualizer!.items = this._items;\n }\n\n private _setFunctions(config: VirtualizeDirectiveConfig) {\n const {renderItem, keyFunction} = config;\n if (renderItem) {\n this._renderItem = (item, idx) => renderItem(item, idx + this._first);\n }\n if (keyFunction) {\n this._keyFunction = (item, idx) => keyFunction(item, idx + this._first);\n }\n }\n\n private _makeVirtualizer(\n hostElement: HTMLElement,\n config: VirtualizeDirectiveConfig\n ) {\n if (this._virtualizer) {\n this._virtualizer.disconnected();\n }\n const {layout, scroller, items} = config;\n this._virtualizer = new Virtualizer({hostElement, layout, scroller});\n this._virtualizer.items = items;\n this._virtualizer.connected();\n }\n\n private _initialize(part: ChildPart, config: VirtualizeDirectiveConfig) {\n const hostElement = part.parentNode as HTMLElement;\n if (hostElement && hostElement.nodeType === 1) {\n hostElement.addEventListener('rangeChanged', (e: RangeChangedEvent) => {\n this._first = e.first;\n this._last = e.last;\n this.setValue(this.render());\n });\n this._makeVirtualizer(hostElement, config);\n }\n }\n\n disconnected() {\n this._virtualizer?.disconnected();\n }\n\n reconnected() {\n this._virtualizer?.connected();\n }\n}\n\nexport const virtualize = directive(VirtualizeDirective) as (\n config?: VirtualizeDirectiveConfig\n) => DirectiveResult;\n"]} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.d.ts.map new file mode 100644 index 0000000000..2939859476 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"css-tag.d.ts","sourceRoot":"","sources":["../src/css-tag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAIJ,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAMhE;;;;;;GAMG;AACH,qBAAa,SAAS;IAEpB,CAAC,cAAc,CAAC,UAAQ;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,WAAW,CAAC,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAmC;IAEnD,OAAO;IAgBP,IAAI,UAAU,IAAI,aAAa,GAAG,SAAS,CAoB1C;IAED,QAAQ,IAAI,MAAM;CAGnB;AAyBD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAAW,OAAO,cAKrC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,YACL,oBAAoB,aAClB,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,KACrC,SAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,eACV,UAAU,UACd,MAAM,iBAAiB,CAAC,SAkBjC,CAAC;AAUF,eAAO,MAAM,kBAAkB,MAGrB,iBAAiB,sBAEwC,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js index 2665485387..9d08023de2 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js @@ -3,4 +3,4 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),c=t.litNonce;void 0!==c&&n.setAttribute("nonce",c),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS}; \ No newline at end of file +const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),c=t.litNonce;void 0!==c&&o.setAttribute("nonce",c),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js.map new file mode 100644 index 0000000000..327914f25e --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/css-tag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"css-tag.js","sources":["src/css-tag.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n }\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n"],"names":["global","globalThis","supportsAdoptingStyleSheets","ShadowRoot","undefined","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","constructionToken","Symbol","cssTagCache","WeakMap","CSSResult","constructor","cssText","strings","safeToken","this","Error","_strings","styleSheet","_styleSheet","cacheable","length","get","replaceSync","set","toString","unsafeCSS","value","String","css","values","reduce","acc","v","idx","textFromCSSResult","adoptStyles","renderRoot","styles","adoptedStyleSheets","map","s","style","document","createElement","nonce","setAttribute","textContent","appendChild","getCompatibleStyle","sheet","rule","cssRules","cssResultFromStyleSheet"],"mappings":";;;;;AAMA,MAGMA,EAASC,WAKFC,EACXF,EAAOG,kBACcC,IAApBJ,EAAOK,UAA0BL,EAAOK,SAASC,eAClD,uBAAwBC,SAASC,WACjC,YAAaC,cAAcD,UAkBvBE,EAAoBC,SAEpBC,EAAc,IAAIC,cASXC,EAOX,WAAAC,CACEC,EACAC,EACAC,GAEA,GAVFC,KAAe,cAAI,EAUbD,IAAcR,EAChB,MAAUU,MACR,qEAGJD,KAAKH,QAAUA,EACfG,KAAKE,EAAWJ,CACjB,CAID,cAAIK,GAGF,IAAIA,EAAaH,KAAKI,EACtB,MAAMN,EAAUE,KAAKE,EACrB,GAAInB,QAA8CE,IAAfkB,EAA0B,CAC3D,MAAME,OAAwBpB,IAAZa,GAA4C,IAAnBA,EAAQQ,OAC/CD,IACFF,EAAaV,EAAYc,IAAIT,SAEZb,IAAfkB,KACDH,KAAKI,EAAcD,EAAa,IAAIb,eAAiBkB,YACpDR,KAAKH,SAEHQ,GACFZ,EAAYgB,IAAIX,EAASK,GAG9B,CACD,OAAOA,CACR,CAED,QAAAO,GACE,OAAOV,KAAKH,OACb,EAWH,MAsBac,EAAaC,GACxB,IAAKjB,EACc,iBAAViB,EAAqBA,EAAeA,EAAPC,QACpC5B,EACAM,GAWSuB,EAAM,CACjBhB,KACGiB,KAEH,MAAMlB,EACe,IAAnBC,EAAQQ,OACJR,EAAQ,GACRiB,EAAOC,QACL,CAACC,EAAKC,EAAGC,IAAQF,EA7CD,CAACL,IAEzB,IAA6C,IAAxCA,EAAkC,aACrC,OAAQA,EAAoBf,QACvB,GAAqB,iBAAVe,EAChB,OAAOA,EAEP,MAAUX,MACR,mEACKW,EADL,uFAIH,EAiC8BQ,CAAkBF,GAAKpB,EAAQqB,EAAM,IAC5DrB,EAAQ,IAEhB,OAAO,IAAKH,EACVE,EACAC,EACAP,EACD,EAYU8B,EAAc,CACzBC,EACAC,KAEA,GAAIxC,EACDuC,EAA0BE,mBAAqBD,EAAOE,KAAKC,GAC1DA,aAAapC,cAAgBoC,EAAIA,EAAEvB,kBAGrC,IAAK,MAAMuB,KAAKH,EAAQ,CACtB,MAAMI,EAAQC,SAASC,cAAc,SAE/BC,EAASjD,EAAyB,cAC1BI,IAAV6C,GACFH,EAAMI,aAAa,QAASD,GAE9BH,EAAMK,YAAeN,EAAgB7B,QACrCyB,EAAWW,YAAYN,EACxB,CACF,EAWUO,EACXnD,EAEK2C,GAAyBA,EACzBA,GACCA,aAAapC,cAbW,CAAC6C,IAC/B,IAAItC,EAAU,GACd,IAAK,MAAMuC,KAAQD,EAAME,SACvBxC,GAAWuC,EAAKvC,QAElB,OAAOc,EAAUd,EAAQ,EAQUyC,CAAwBZ,GAAKA"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.d.ts.map new file mode 100644 index 0000000000..73907919c1 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js new file mode 100644 index 0000000000..c7cb94a7ec --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js @@ -0,0 +1 @@ +export{customElement}from"./decorators/custom-element.js";export{property,standardProperty}from"./decorators/property.js";export{state}from"./decorators/state.js";export{eventOptions}from"./decorators/event-options.js";export{query}from"./decorators/query.js";export{queryAll}from"./decorators/query-all.js";export{queryAsync}from"./decorators/query-async.js";export{queryAssignedElements}from"./decorators/query-assigned-elements.js";export{queryAssignedNodes}from"./decorators/query-assigned-nodes.js"; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js.map new file mode 100644 index 0000000000..e6068f6410 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.d.ts.map new file mode 100644 index 0000000000..e20abe30f5 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js index 6cdbf6ee80..abb5bd9a31 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js @@ -3,4 +3,4 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const e=(r,n,i)=>{Object.defineProperty(n,i,r)},t=(r,n)=>({kind:"method",placement:"prototype",key:n.key,descriptor:r}),o=({finisher:r,descriptor:n})=>(i,d)=>{var c;if(void 0===d){const d=null!==(c=i.originalKey)&&void 0!==c?c:i.key,p=null!=n?{kind:"method",placement:"prototype",key:d,descriptor:n(i.key)}:{...i,key:d};return null!=r&&(p.finisher=function(n){r(n,d)}),p}{const c=i.constructor;void 0!==n&&Object.defineProperty(i,d,n(d)),null==r||r(c,d)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod}; \ No newline at end of file +const e=(t,c,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof c&&Object.defineProperty(t,c,o),o);export{e as desc}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js.map new file mode 100644 index 0000000000..838263ad51 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../src/decorators/base.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible versions of the type (e.g. from\n * multiple copies of the same package in `node_modules`).\n */\nexport type Interface = {\n [K in keyof T]: T[K];\n};\n\nexport type Constructor = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext,\n descriptor: PropertyDescriptor\n) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n typeof name !== 'object'\n ) {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n"],"names":["desc","obj","name","descriptor","configurable","enumerable","Reflect","decorate","Object","defineProperty"],"mappings":";;;;;AA8Ba,MAAAA,EAAO,CAClBC,EACAC,EACAC,KAGAA,EAAWC,cAAe,EAC1BD,EAAWE,YAAa,EAIrBC,QAAkDC,UACnC,iBAATL,GAMPM,OAAOC,eAAeR,EAAKC,EAAMC,GAE5BA"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map new file mode 100644 index 0000000000..853d730136 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"custom-element.d.ts","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IAEnC,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGhC,CACE,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,qBAAqB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,GACvD,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,YACd,MAAM,KAAG,sBAelB,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js index a780ebdd94..ed76f9e0ac 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js @@ -3,4 +3,4 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const e=n=>t=>"function"==typeof t?((n,t)=>(customElements.define(n,t),t))(n,t):((n,t)=>{const{kind:s,elements:m}=t;return{kind:s,elements:m,finisher(t){customElements.define(n,t)}}})(n,t);export{e as customElement}; \ No newline at end of file +const t=e=>(n,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(e,n)})):customElements.define(e,n)};export{t as customElement}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js.map new file mode 100644 index 0000000000..ae2319e055 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/custom-element.js.map @@ -0,0 +1 @@ +{"version":3,"file":"custom-element.js","sources":["../src/decorators/custom-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {Constructor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit;\n\nexport type CustomElementDecorator = {\n // legacy\n (cls: CustomElementClass): void;\n\n // standard\n (\n target: CustomElementClass,\n context: ClassDecoratorContext>\n ): void;\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const customElement =\n (tagName: string): CustomElementDecorator =>\n (\n classOrTarget: CustomElementClass | Constructor,\n context?: ClassDecoratorContext>\n ) => {\n if (context !== undefined) {\n context.addInitializer(() => {\n customElements.define(\n tagName,\n classOrTarget as CustomElementConstructor\n );\n });\n } else {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n }\n };\n"],"names":["customElement","tagName","classOrTarget","context","undefined","addInitializer","customElements","define"],"mappings":";;;;;AA6CO,MAAMA,EACVC,GACD,CACEC,EACAC,UAEgBC,IAAZD,EACFA,EAAQE,gBAAe,KACrBC,eAAeC,OACbN,EACAC,EACD,IAGHI,eAAeC,OAAON,EAASC,EAChC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map new file mode 100644 index 0000000000..87bbc3015e --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"event-options.d.ts","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAElC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,GAGhB,IAAI,GAAG,GAAG,CAAC;IAId,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1C,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,uBAAuB,GAC/B,qBAAqB,CAYvB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js index cdd988f315..746b6485f4 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js @@ -1,6 +1,6 @@ -import{decorateProperty as t}from"./base.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function e(r){return t({finisher:(t,o)=>{Object.assign(t.prototype[o],r)}})}export{e as eventOptions}; \ No newline at end of file + */ +function t(n){return(e,o)=>{const s="function"==typeof e?e:e[o];Object.assign(s,n)}}export{t as eventOptions}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js.map new file mode 100644 index 0000000000..ebf682eb7d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/event-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event-options.js","sources":["../src/decorators/event-options.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nexport type EventOptionsDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any>(\n value: V,\n _context: ClassMethodDecoratorContext\n ): void;\n};\n\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n *
\n * \n *
\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(\n options: AddEventListenerOptions\n): EventOptionsDecorator {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ( any>(\n protoOrValue: V,\n nameOrContext: PropertyKey | ClassMethodDecoratorContext\n ) => {\n const method =\n typeof protoOrValue === 'function'\n ? protoOrValue\n : protoOrValue[nameOrContext as keyof ReactiveElement];\n Object.assign(method, options);\n }) as EventOptionsDecorator;\n}\n"],"names":["eventOptions","options","protoOrValue","nameOrContext","method","Object","assign"],"mappings":";;;;;AA+DM,SAAUA,EACdC,GAGA,MAAQ,CACNC,EACAC,KAEA,MAAMC,EACoB,mBAAjBF,EACHA,EACAA,EAAaC,GACnBE,OAAOC,OAAOF,EAAQH,EACvB,CACH"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.d.ts.map new file mode 100644 index 0000000000..a5a559ab52 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.d.ts.map @@ -0,0 +1 @@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iB,CA4BzE"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js index bab127a81d..3303249667 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js @@ -1,6 +1,6 @@ +import{defaultConverter as t,notEqual as e}from"../reactive-element.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -const i=(e,r)=>"method"===r.kind&&r.descriptor&&!("value"in r.descriptor)?{...r,finisher(t){t.createProperty(r.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:r.key,initializer(){"function"==typeof r.initializer&&(this[r.key]=r.initializer.call(this))},finisher(t){t.createProperty(r.key,e)}};function n(e){return(r,t)=>void 0!==t?((e,r,t)=>{r.constructor.createProperty(t,e)})(e,r,t):i(e,r)}export{n as property}; \ No newline at end of file + */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,a)=>{const{kind:s,metadata:i}=a;let c=globalThis.litPropertyMetadata.get(i);if(void 0===c&&globalThis.litPropertyMetadata.set(i,c=new Map),c.set(a.name,t),"accessor"===s){const{name:o}=a;return{set(a){const s=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,s,t)},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===s){const{name:o}=a;return function(a){const s=this[o];e.call(this,a),this.requestUpdate(o,s,t)}}throw Error("Unsupported decorator location: "+s)};function n(t){return(e,o)=>"object"==typeof o?r(t,e,o):((t,e,o)=>{const a=e.hasOwnProperty(o);return e.constructor.createProperty(o,a?{...t,wrapped:!0}:t),a?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js.map new file mode 100644 index 0000000000..e862c4b02d --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/property.js.map @@ -0,0 +1 @@ +{"version":3,"file":"property.js","sources":["../src/decorators/property.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {\n type PropertyDeclaration,\n type ReactiveElement,\n defaultConverter,\n notEqual,\n} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\n// Overloads for property decorator so that TypeScript can infer the correct\n// return type when a decorator is used as an accessor decorator or a setter\n// decorator.\nexport type PropertyDecorator = {\n // accessor decorator signature\n , V>(\n target: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n\n // setter decorator signature\n , V>(\n target: (value: V) => void,\n context: ClassSetterDecoratorContext\n ): (this: C, value: V) => void;\n\n // legacy decorator signature\n (\n protoOrDescriptor: Object,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any;\n};\n\nconst legacyProperty = (\n options: PropertyDeclaration | undefined,\n proto: Object,\n name: PropertyKey\n) => {\n const hasOwnProperty = proto.hasOwnProperty(name);\n (proto.constructor as typeof ReactiveElement).createProperty(\n name,\n hasOwnProperty ? {...options, wrapped: true} : options\n );\n // For accessors (which have a descriptor on the prototype) we need to\n // return a descriptor, otherwise TypeScript overwrites the descriptor we\n // define in createProperty() with the original descriptor. We don't do this\n // for fields, which don't have a descriptor, because this could overwrite\n // descriptor defined by other decorators.\n return hasOwnProperty\n ? Object.getOwnPropertyDescriptor(proto, name)\n : undefined;\n};\n\n// This is duplicated from a similar variable in reactive-element.ts, but\n// actually makes sense to have this default defined with the decorator, so\n// that different decorators could have different defaults.\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n// Temporary type, until google3 is on TypeScript 5.2\ntype StandardPropertyContext = (\n | ClassAccessorDecoratorContext\n | ClassSetterDecoratorContext\n) & {metadata: object};\n\n/**\n * Wraps a class accessor or setter so that `requestUpdate()` is called with the\n * property name and old value when the accessor is set.\n */\nexport const standardProperty = , V>(\n options: PropertyDeclaration = defaultPropertyDeclaration,\n target: ClassAccessorDecoratorTarget | ((value: V) => void),\n context: StandardPropertyContext\n): ClassAccessorDecoratorResult | ((this: C, value: V) => void) => {\n const {kind, metadata} = context;\n\n if (DEV_MODE && metadata == null) {\n issueWarning(\n 'missing-class-metadata',\n `The class ${target} is missing decorator metadata. This ` +\n `could mean that you're using a compiler that supports decorators ` +\n `but doesn't support decorator metadata, such as TypeScript 5.1. ` +\n `Please update your compiler.`\n );\n }\n\n // Store the property options\n let properties = globalThis.litPropertyMetadata.get(metadata);\n if (properties === undefined) {\n globalThis.litPropertyMetadata.set(metadata, (properties = new Map()));\n }\n properties.set(context.name, options);\n\n if (kind === 'accessor') {\n // Standard decorators cannot dynamically modify the class, so we can't\n // replace a field with accessors. The user must use the new `accessor`\n // keyword instead.\n const {name} = context;\n return {\n set(this: ReactiveElement, v: V) {\n const oldValue = (\n target as ClassAccessorDecoratorTarget\n ).get.call(this as unknown as C);\n (target as ClassAccessorDecoratorTarget).set.call(\n this as unknown as C,\n v\n );\n this.requestUpdate(name, oldValue, options);\n },\n init(this: ReactiveElement, v: V): V {\n if (v !== undefined) {\n this._$changeProperty(name, undefined, options);\n }\n return v;\n },\n } as unknown as ClassAccessorDecoratorResult;\n } else if (kind === 'setter') {\n const {name} = context;\n return function (this: ReactiveElement, value: V) {\n const oldValue = this[name as keyof ReactiveElement];\n (target as (value: V) => void).call(this, value);\n this.requestUpdate(name, oldValue, options);\n } as unknown as (this: C, value: V) => void;\n }\n throw new Error(`Unsupported decorator location: ${kind}`);\n};\n\n/**\n * A class field or accessor decorator which creates a reactive property that\n * reflects a corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration): PropertyDecorator {\n return , V>(\n protoOrTarget:\n | object\n | ClassAccessorDecoratorTarget\n | ((value: V) => void),\n nameOrContext:\n | PropertyKey\n | ClassAccessorDecoratorContext\n | ClassSetterDecoratorContext\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any => {\n return (\n typeof nameOrContext === 'object'\n ? standardProperty(\n options,\n protoOrTarget as\n | ClassAccessorDecoratorTarget\n | ((value: V) => void),\n nameOrContext as StandardPropertyContext\n )\n : legacyProperty(\n options,\n protoOrTarget as Object,\n nameOrContext as PropertyKey\n )\n ) as PropertyDecorator;\n };\n}\n"],"names":["defaultPropertyDeclaration","attribute","type","String","converter","defaultConverter","reflect","hasChanged","notEqual","standardProperty","options","target","context","kind","metadata","properties","globalThis","litPropertyMetadata","get","undefined","set","Map","name","v","oldValue","call","this","requestUpdate","init","_$changeProperty","value","Error","property","protoOrTarget","nameOrContext","proto","hasOwnProperty","constructor","createProperty","wrapped","Object","getOwnPropertyDescriptor","legacyProperty"],"mappings":";;;;;GAkEA,MAuBMA,EAAkD,CACtDC,WAAW,EACXC,KAAMC,OACNC,UAAWC,EACXC,SAAS,EACTC,WAAYC,GAaDC,EAAmB,CAC9BC,EAA+BV,EAC/BW,EACAC,KAEA,MAAMC,KAACA,EAAIC,SAAEA,GAAYF,EAazB,IAAIG,EAAaC,WAAWC,oBAAoBC,IAAIJ,GAMpD,QALmBK,IAAfJ,GACFC,WAAWC,oBAAoBG,IAAIN,EAAWC,EAAa,IAAIM,KAEjEN,EAAWK,IAAIR,EAAQU,KAAMZ,GAEhB,aAATG,EAAqB,CAIvB,MAAMS,KAACA,GAAQV,EACf,MAAO,CACL,GAAAQ,CAA2BG,GACzB,MAAMC,EACJb,EACAO,IAAIO,KAAKC,MACVf,EAA8CS,IAAIK,KACjDC,KACAH,GAEFG,KAAKC,cAAcL,EAAME,EAAUd,EACpC,EACD,IAAAkB,CAA4BL,GAI1B,YAHUJ,IAANI,GACFG,KAAKG,EAAiBP,OAAMH,EAAWT,GAElCa,CACR,EAEJ,CAAM,GAAa,WAATV,EAAmB,CAC5B,MAAMS,KAACA,GAAQV,EACf,OAAO,SAAiCkB,GACtC,MAAMN,EAAWE,KAAKJ,GACrBX,EAA8Bc,KAAKC,KAAMI,GAC1CJ,KAAKC,cAAcL,EAAME,EAAUd,EACrC,CACD,CACD,MAAUqB,MAAM,mCAAmClB,EAAO,EAmCtD,SAAUmB,EAAStB,GACvB,MAAO,CACLuB,EAIAC,IAO2B,iBAAlBA,EACHzB,EACEC,EACAuB,EAGAC,GAtJW,EACrBxB,EACAyB,EACAb,KAEA,MAAMc,EAAiBD,EAAMC,eAAed,GAU5C,OATCa,EAAME,YAAuCC,eAC5ChB,EACAc,EAAiB,IAAI1B,EAAS6B,SAAS,GAAQ7B,GAO1C0B,EACHI,OAAOC,yBAAyBN,EAAOb,QACvCH,CAAS,EAuILuB,CACEhC,EACAuB,EACAC,EAIZ"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map new file mode 100644 index 0000000000..f46ee6b96b --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"query-all.d.ts","sourceRoot":"","sources":["../../src/decorators/query-all.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAE9B,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,QAAQ,EACvD,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAa5D"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js index 60eaa1cc6a..726b1fd62f 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js @@ -1,6 +1,6 @@ -import{decorateProperty as r}from"./base.js"; +import{desc as e}from"./base.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function e(o){return r({descriptor:r=>({get(){var r,t;return null!==(t=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelectorAll(o))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{e as queryAll}; \ No newline at end of file + */let t;function r(o){return(n,u)=>e(n,u,{get(){return(this.renderRoot??(t??=document.createDocumentFragment())).querySelectorAll(o)}})}export{r as queryAll}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js.map new file mode 100644 index 0000000000..d913345e77 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-all.js.map @@ -0,0 +1 @@ +{"version":3,"file":"query-all.js","sources":["../src/decorators/query-all.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAllDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n , V extends NodeList>(\n value: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n};\n\n// Shared fragment used to generate empty NodeLists when a render root is\n// undefined\nlet fragment: DocumentFragment;\n\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs: NodeListOf;\n *\n * render() {\n * return html`\n *
\n *
\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector: string): QueryAllDecorator {\n return ((\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext\n ) => {\n return desc(obj, name, {\n get(this: ReactiveElement) {\n const container =\n this.renderRoot ?? (fragment ??= document.createDocumentFragment());\n return container.querySelectorAll(selector);\n },\n });\n }) as QueryAllDecorator;\n}\n"],"names":["fragment","queryAll","selector","obj","name","desc","get","this","renderRoot","document","createDocumentFragment","querySelectorAll"],"mappings":";;;;;;AAkCA,IAAIA,EA0BE,SAAUC,EAASC,GACvB,MAAQ,CACNC,EACAC,IAEOC,EAAKF,EAAKC,EAAM,CACrB,GAAAE,GAGE,OADEC,KAAKC,aAAeR,IAAaS,SAASC,2BAC3BC,iBAAiBT,EACnC,GAGP"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map new file mode 100644 index 0000000000..c23e99996f --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"query-assigned-elements.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-elements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,8BAA8B,GAAG;IAE3C,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAC7D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,4BACf,SAAQ,yBAAyB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,4BAA4B,GACrC,8BAA8B,CAoBhC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js index f6c5b6cd38..9d97c687ef 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js @@ -1,6 +1,6 @@ -import{decorateProperty as e}from"./base.js"; +import{desc as e}from"./base.js"; /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var o;const t=null!=(null===(o=window.HTMLSlotElement)||void 0===o?void 0:o.prototype.assignedElements)?(e,o)=>e.assignedElements(o):(e,o)=>e.assignedNodes(o).filter((e=>e.nodeType===Node.ELEMENT_NODE));function l(o){const{slot:n,selector:r}=null!=o?o:{};return e({descriptor:e=>({get(){var e;const s="slot"+(n?`[name=${n}]`:":not([name])"),i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(s),d=null!=i?t(i,o):[];return r?d.filter((e=>e.matches(r))):d},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements}; \ No newline at end of file + */function o(t){return(s,r)=>{const{slot:n,selector:a}=t??{},c="slot"+(n?`[name=${n}]`:":not([name])");return e(s,r,{get(){const e=this.renderRoot?.querySelector(c),s=e?.assignedElements(t)??[];return void 0===a?s:s.filter((e=>e.matches(a)))}})}}export{o as queryAssignedElements}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map new file mode 100644 index 0000000000..d7225d1586 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map @@ -0,0 +1 @@ +{"version":3,"file":"query-assigned-elements.js","sources":["../src/decorators/query-assigned-elements.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAssignedElementsDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n , V extends Array>(\n value: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n};\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array;\n *\n * render() {\n * return html`\n * \n * \n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(\n options?: QueryAssignedElementsOptions\n): QueryAssignedElementsDecorator {\n return (>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext\n ) => {\n const {slot, selector} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector(slotSelector);\n const elements = slotEl?.assignedElements(options) ?? [];\n return (\n selector === undefined\n ? elements\n : elements.filter((node) => node.matches(selector))\n ) as V;\n },\n });\n }) as QueryAssignedElementsDecorator;\n}\n"],"names":["queryAssignedElements","options","obj","name","slot","selector","slotSelector","desc","get","slotEl","this","renderRoot","querySelector","elements","assignedElements","undefined","filter","node","matches"],"mappings":";;;;;GA6EM,SAAUA,EACdC,GAEA,MAAQ,CACNC,EACAC,KAEA,MAAMC,KAACA,EAAIC,SAAEA,GAAYJ,GAAW,CAAA,EAC9BK,EAAe,QAAOF,EAAO,SAASA,KAAU,gBACtD,OAAOG,EAAKL,EAAKC,EAAM,CACrB,GAAAK,GACE,MAAMC,EACJC,KAAKC,YAAYC,cAA+BN,GAC5CO,EAAWJ,GAAQK,iBAAiBb,IAAY,GACtD,YACec,IAAbV,EACIQ,EACAA,EAASG,QAAQC,GAASA,EAAKC,QAAQb,IAE9C,GAEJ,CACH"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map new file mode 100644 index 0000000000..7c90b71b9f --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"query-assigned-nodes.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-nodes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,2BAA2B,GAAG;IAExC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAC1D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,yBAAyB,GAClC,2BAA2B,CAgB7B"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js index 2f1b118916..1c6b5faedd 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js @@ -1,6 +1,6 @@ -import{decorateProperty as e}from"./base.js";import{queryAssignedElements as t}from"./query-assigned-elements.js"; +import{desc as e}from"./base.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function o(r,s,n){let l,a=r;return"object"==typeof r?(a=r.slot,l=r):l={flatten:s},n?t({slot:a,flatten:s,selector:n}):e({descriptor:e=>({get(){var e,t;const r="slot"+(a?`[name=${a}]`:":not([name])"),s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(r);return null!==(t=null==s?void 0:s.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes}; \ No newline at end of file + */function n(s){return(t,o)=>{const{slot:r}=s??{},a="slot"+(r?`[name=${r}]`:":not([name])");return e(t,o,{get(){const e=this.renderRoot?.querySelector(a);return e?.assignedNodes(s)??[]}})}}export{n as queryAssignedNodes}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map new file mode 100644 index 0000000000..b770587013 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"query-assigned-nodes.js","sources":["../src/decorators/query-assigned-nodes.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\n/**\n * Options for the {@linkcode queryAssignedNodes} decorator. Extends the options\n * that can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes).\n */\nexport interface QueryAssignedNodesOptions extends AssignedNodesOptions {\n /**\n * Name of the slot to query. Leave empty for the default slot.\n */\n slot?: string;\n}\n\nexport type QueryAssignedNodesDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n , V extends Array>(\n value: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given `slot`.\n *\n * Can be passed an optional {@linkcode QueryAssignedNodesOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedNodes({slot: 'list', flatten: true})\n * listItems!: Array;\n *\n * render() {\n * return html`\n * \n * `;\n * }\n * }\n * ```\n *\n * Note the type of this property should be annotated as `Array`. Use the\n * queryAssignedElements decorator to list only elements, and optionally filter\n * the element list using a CSS selector.\n *\n * @category Decorator\n */\nexport function queryAssignedNodes(\n options?: QueryAssignedNodesOptions\n): QueryAssignedNodesDecorator {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext\n ) => {\n const {slot} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector(slotSelector);\n return (slotEl?.assignedNodes(options) ?? []) as unknown as V;\n },\n });\n }) as QueryAssignedNodesDecorator;\n}\n"],"names":["queryAssignedNodes","options","obj","name","slot","slotSelector","desc","get","slotEl","this","renderRoot","querySelector","assignedNodes"],"mappings":";;;;;GAqEM,SAAUA,EACdC,GAGA,MAAQ,CACNC,EACAC,KAEA,MAAMC,KAACA,GAAQH,GAAW,GACpBI,EAAe,QAAOD,EAAO,SAASA,KAAU,gBACtD,OAAOE,EAAKJ,EAAKC,EAAM,CACrB,GAAAI,GACE,MAAMC,EACJC,KAAKC,YAAYC,cAA+BN,GAClD,OAAQG,GAAQI,cAAcX,IAAY,EAC3C,GAEJ,CACH"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map new file mode 100644 index 0000000000..cc8a8ae438 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"query-async.d.ts","sourceRoot":"","sources":["../../src/decorators/query-async.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAEhC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EACtE,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAOF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,uBAY1C"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js index 561970a9c6..cea53330d9 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js @@ -1,6 +1,6 @@ -import{decorateProperty as r}from"./base.js"; +import{desc as e}from"./base.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function e(t){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(t)},enumerable:!0,configurable:!0})})}export{e as queryAsync}; \ No newline at end of file + */function r(t){return(s,n)=>e(s,n,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}export{r as queryAsync}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js.map new file mode 100644 index 0000000000..5746fcfa3a --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query-async.js.map @@ -0,0 +1 @@ +{"version":3,"file":"query-async.js","sources":["../src/decorators/query-async.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAsyncDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n , V extends Promise>(\n value: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n};\n\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first: Promise;\n *\n * render() {\n * return html`\n *
\n *
\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector: string) {\n return ((\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext\n ) => {\n return desc(obj, name, {\n async get(this: ReactiveElement) {\n await this.updateComplete;\n return this.renderRoot?.querySelector(selector) ?? null;\n },\n });\n }) as QueryAsyncDecorator;\n}\n"],"names":["queryAsync","selector","obj","name","desc","get","this","updateComplete","renderRoot","querySelector"],"mappings":";;;;;;AAsEM,SAAUA,EAAWC,GACzB,MAAQ,CACNC,EACAC,IAEOC,EAAKF,EAAKC,EAAM,CACrB,SAAME,GAEJ,aADMC,KAAKC,eACJD,KAAKE,YAAYC,cAAcR,IAAa,IACpD,GAGP"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.d.ts.map new file mode 100644 index 0000000000..b73e4b6f08 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAwB/C,MAAM,MAAM,cAAc,GAAG;IAE3B,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,OAAO,GAAG,IAAI,EAC7D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,CA4EvE"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js index a35b7cbb49..1e0d543ca6 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js @@ -1,6 +1,6 @@ -import{decorateProperty as r}from"./base.js"; +import{desc as t}from"./base.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function i(e,o){return r({descriptor:r=>{const t={get(){var r,o;return null!==(o=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e))&&void 0!==o?o:null},enumerable:!0,configurable:!0};if(o){const o="symbol"==typeof r?Symbol():"__"+r;t.get=function(){var r,t;return void 0===this[o]&&(this[o]=null!==(t=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e))&&void 0!==t?t:null),this[o]}}return t}})}export{i as query}; \ No newline at end of file + */function e(r,s){return(n,u,i)=>{const o=t=>t.renderRoot?.querySelector(r)??null;if(s){const{get:r,set:s}="object"==typeof u?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(r){this[t]=r}}})();return t(n,u,{get(){let t=r.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&s.call(this,t)),t}})}return t(n,u,{get(){return o(this)}})}}export{e as query}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js.map new file mode 100644 index 0000000000..93c0ba81ad --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/query.js.map @@ -0,0 +1 @@ +{"version":3,"file":"query.js","sources":["../src/decorators/query.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set =\n (globalThis.litIssuedWarnings ??= new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n\nexport type QueryDecorator = {\n // legacy\n (\n proto: Interface,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any;\n\n // standard\n , V extends Element | null>(\n value: ClassAccessorDecoratorTarget,\n context: ClassAccessorDecoratorContext\n ): ClassAccessorDecoratorResult;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n *
\n *
\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean): QueryDecorator {\n return (, V extends Element | null>(\n protoOrTarget: ClassAccessorDecoratorTarget,\n nameOrContext: PropertyKey | ClassAccessorDecoratorContext,\n descriptor?: PropertyDescriptor\n ) => {\n const doQuery = (el: Interface): V => {\n const result = (el.renderRoot?.querySelector(selector) ?? null) as V;\n if (DEV_MODE && result === null && cache && !el.hasUpdated) {\n const name =\n typeof nameOrContext === 'object'\n ? nameOrContext.name\n : nameOrContext;\n issueWarning(\n '',\n `@query'd field ${JSON.stringify(String(name))} with the 'cache' ` +\n `flag set for selector '${selector}' has been accessed before ` +\n `the first update and returned null. This is expected if the ` +\n `renderRoot tree has not been provided beforehand (e.g. via ` +\n `Declarative Shadow DOM). Therefore the value hasn't been cached.`\n );\n }\n // TODO: if we want to allow users to assert that the query will never\n // return null, we need a new option and to throw here if the result\n // is null.\n return result;\n };\n if (cache) {\n // Accessors to wrap from either:\n // 1. The decorator target, in the case of standard decorators\n // 2. The property descriptor, in the case of experimental decorators\n // on auto-accessors.\n // 3. Functions that access our own cache-key property on the instance,\n // in the case of experimental decorators on fields.\n const {get, set} =\n typeof nameOrContext === 'object'\n ? protoOrTarget\n : descriptor ??\n (() => {\n const key = DEV_MODE\n ? Symbol(`${String(nameOrContext)} (@query() cache)`)\n : Symbol();\n type WithCache = ReactiveElement & {\n [key: symbol]: Element | null;\n };\n return {\n get() {\n return (this as WithCache)[key];\n },\n set(v) {\n (this as WithCache)[key] = v;\n },\n };\n })();\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement): V {\n let result: V = get!.call(this);\n if (result === undefined) {\n result = doQuery(this);\n if (result !== null || this.hasUpdated) {\n set!.call(this, result);\n }\n }\n return result;\n },\n });\n } else {\n // This object works as the return type for both standard and\n // experimental decorators.\n return desc(protoOrTarget, nameOrContext, {\n get(this: ReactiveElement) {\n return doQuery(this);\n },\n });\n }\n }) as QueryDecorator;\n}\n"],"names":["query","selector","cache","protoOrTarget","nameOrContext","descriptor","doQuery","el","renderRoot","querySelector","get","set","key","Symbol","this","v","desc","result","call","undefined","hasUpdated"],"mappings":";;;;;GA+EgB,SAAAA,EAAMC,EAAkBC,GACtC,OACEC,EACAC,EACAC,KAEA,MAAMC,EAAWC,GACCA,EAAGC,YAAYC,cAAcR,IAAa,KAoB5D,GAAIC,EAAO,CAOT,MAAMQ,IAACA,EAAGC,IAAEA,GACe,iBAAlBP,EACHD,EACAE,GACA,MACE,MAAMO,EAEFC,SAIJ,MAAO,CACL,GAAAH,GACE,OAAQI,KAAmBF,EAC5B,EACD,GAAAD,CAAII,GACDD,KAAmBF,GAAOG,CAC5B,EAEJ,EAfD,GAgBN,OAAOC,EAAKb,EAAeC,EAAe,CACxC,GAAAM,GACE,IAAIO,EAAYP,EAAKQ,KAAKJ,MAO1B,YANeK,IAAXF,IACFA,EAASX,EAAQQ,OACF,OAAXG,GAAmBH,KAAKM,aAC1BT,EAAKO,KAAKJ,KAAMG,IAGbA,CACR,GAEJ,CAGC,OAAOD,EAAKb,EAAeC,EAAe,CACxC,GAAAM,GACE,OAAOJ,EAAQQ,KAChB,GAGN,CACH"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.d.ts.map new file mode 100644 index 0000000000..37bb756a5b --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/decorators/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO;IAC9C;;;;OAIG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,CAAC,IAAI,GAAG,OAAO,IACpD,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEzB;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,gBAAgB,6CAS/C"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js index 9174f0283e..0047fa1573 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js @@ -1,6 +1,6 @@ -import{property as r}from"./property.js"; +import{property as t}from"./property.js"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function t(e){return r({...e,state:!0})}export{t as state}; \ No newline at end of file + */function r(e){return t({...e,state:!0,attribute:!1})}export{r as state}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js.map new file mode 100644 index 0000000000..b1f71e9db6 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/decorators/state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"state.js","sources":["../src/decorators/state.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface StateDeclaration {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * @deprecated use StateDeclaration\n */\nexport type InternalPropertyDeclaration =\n StateDeclaration;\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: StateDeclaration) {\n return property({\n ...options,\n // Add both `state` and `attribute` because we found a third party\n // controller that is keying off of PropertyOptions.state to determine\n // whether a field is a private internal property or not.\n state: true,\n attribute: false,\n });\n}\n"],"names":["state","options","property","attribute"],"mappings":";;;;;GAwCM,SAAUA,EAAMC,GACpB,OAAOC,EAAS,IACXD,EAIHD,OAAO,EACPG,WAAW,GAEf"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.d.ts.map new file mode 100644 index 0000000000..7af02709c4 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"polyfill-support.d.ts","sourceRoot":"","sources":["../src/polyfill-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js new file mode 100644 index 0000000000..9ebb271455 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js @@ -0,0 +1,7 @@ +var t;t=function(){ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var t,e="__scoped";null!==(t=globalThis.reactiveElementPolyfillSupport)&&void 0!==t||(globalThis.reactiveElementPolyfillSupport=function(t){var o=t.ReactiveElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var n=o.prototype;window.ShadyDOM&&window.ShadyDOM.inUse&&!0===window.ShadyDOM.noPatch&&window.ShadyDOM.patchElementProto(n);var i=n.createRenderRoot;n.createRenderRoot=function(){var t,o,n,a=this.localName;if(window.ShadyCSS.nativeShadow)return i.call(this);if(!this.constructor.hasOwnProperty(e)){this.constructor[e]=!0;var d=this.constructor.elementStyles.map((function(t){return t instanceof CSSStyleSheet?Array.from(t.cssRules).reduce((function(t,e){return t+e.cssText}),""):t.cssText}));null===(o=null===(t=window.ShadyCSS)||void 0===t?void 0:t.ScopingShim)||void 0===o||o.prepareAdoptedCssText(d,a),void 0===this.constructor._$AJ&&window.ShadyCSS.prepareTemplateStyles(document.createElement("template"),a)}return null!==(n=this.shadowRoot)&&void 0!==n?n:this.attachShadow(this.constructor.shadowRootOptions)};var a=n.connectedCallback;n.connectedCallback=function(){a.call(this),this.hasUpdated&&window.ShadyCSS.styleElement(this)};var d=n._$AE;n._$AE=function(t){this.hasUpdated||window.ShadyCSS.styleElement(this),d.call(this,t)}}})},"function"==typeof define&&define.amd?define(t):t(); \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js.map new file mode 100644 index 0000000000..4165403ad8 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/polyfill-support.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polyfill-support.js","sources":["src/polyfill-support.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * ReactiveElement patch to support browsers without native web components.\n *\n * This module should be used in addition to loading the web components\n * polyfills via @webcomponents/webcomponentjs. When using those polyfills\n * support for polyfilled Shadow DOM is automatic via the ShadyDOM polyfill, but\n * support for Shadow DOM like css scoping is opt-in. This module uses ShadyCSS\n * to scope styles defined via the `static styles` property.\n *\n * @packageDocumentation\n */\n\nexport {};\n\ninterface RenderOptions {\n readonly renderBefore?: ChildNode | null;\n scope?: string;\n}\n\nconst SCOPED = '__scoped';\n\ntype CSSResults = Array<{cssText: string} | CSSStyleSheet>;\n\ninterface PatchableReactiveElementConstructor {\n [SCOPED]: boolean;\n elementStyles: CSSResults;\n shadowRootOptions: ShadowRootInit;\n _$handlesPrepareStyles?: boolean;\n}\n\ninterface PatchableReactiveElement extends HTMLElement {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-misused-new\n new (...args: any[]): PatchableReactiveElement;\n constructor: PatchableReactiveElementConstructor;\n connectedCallback(): void;\n hasUpdated: boolean;\n _$didUpdate(changedProperties: unknown): void;\n createRenderRoot(): Element | ShadowRoot;\n renderOptions: RenderOptions;\n}\n\n// Note, explicitly use `var` here so that this can be re-defined when\n// bundled.\n// eslint-disable-next-line no-var\nvar DEV_MODE = true;\n\nconst polyfillSupport = ({\n ReactiveElement,\n}: {\n ReactiveElement: PatchableReactiveElement;\n}) => {\n // polyfill-support is only needed if ShadyCSS or the ApplyShim is in use\n // We test at the point of patching, which makes it safe to load\n // webcomponentsjs and polyfill-support in either order\n if (\n window.ShadyCSS === undefined ||\n (window.ShadyCSS.nativeShadow && !window.ShadyCSS.ApplyShim)\n ) {\n return;\n }\n\n // console.log(\n // '%c Making ReactiveElement compatible with ShadyDOM/CSS.',\n // 'color: lightgreen; font-style: italic'\n // );\n\n const elementProto = ReactiveElement.prototype;\n\n // In noPatch mode, patch the ReactiveElement prototype so that no\n // ReactiveElements must be wrapped.\n if (\n window.ShadyDOM &&\n window.ShadyDOM.inUse &&\n window.ShadyDOM.noPatch === true\n ) {\n window.ShadyDOM.patchElementProto(elementProto);\n }\n\n /**\n * Patch to apply adoptedStyleSheets via ShadyCSS\n */\n const createRenderRoot = elementProto.createRenderRoot;\n elementProto.createRenderRoot = function (this: PatchableReactiveElement) {\n // Pass the scope to render options so that it gets to lit-html for proper\n // scoping via ShadyCSS.\n const name = this.localName;\n // If using native Shadow DOM must adoptStyles normally,\n // otherwise do nothing.\n if (window.ShadyCSS!.nativeShadow) {\n return createRenderRoot.call(this);\n } else {\n if (!this.constructor.hasOwnProperty(SCOPED)) {\n (this.constructor as PatchableReactiveElementConstructor)[SCOPED] =\n true;\n // Use ShadyCSS's `prepareAdoptedCssText` to shim adoptedStyleSheets.\n const css = (\n this.constructor as PatchableReactiveElementConstructor\n ).elementStyles.map((v) =>\n v instanceof CSSStyleSheet\n ? Array.from(v.cssRules).reduce(\n (a: string, r: CSSRule) => (a += r.cssText),\n ''\n )\n : v.cssText\n );\n window.ShadyCSS?.ScopingShim?.prepareAdoptedCssText(css, name);\n if (this.constructor._$handlesPrepareStyles === undefined) {\n window.ShadyCSS!.prepareTemplateStyles(\n document.createElement('template'),\n name\n );\n }\n }\n return (\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as PatchableReactiveElementConstructor)\n .shadowRootOptions\n )\n );\n }\n };\n\n /**\n * Patch connectedCallback to apply ShadyCSS custom properties shimming.\n */\n const connectedCallback = elementProto.connectedCallback;\n elementProto.connectedCallback = function (this: PatchableReactiveElement) {\n connectedCallback.call(this);\n // Note, must do first update separately so that we're ensured\n // that rendering has completed before calling this.\n if (this.hasUpdated) {\n window.ShadyCSS!.styleElement(this);\n }\n };\n\n /**\n * Patch update to apply ShadyCSS custom properties shimming for first\n * update.\n */\n const didUpdate = elementProto._$didUpdate;\n elementProto._$didUpdate = function (\n this: PatchableReactiveElement,\n changedProperties: unknown\n ) {\n // Note, must do first update here so rendering has completed before\n // calling this and styles are correct by updated/firstUpdated.\n if (!this.hasUpdated) {\n window.ShadyCSS!.styleElement(this);\n }\n didUpdate.call(this, changedProperties);\n };\n};\n\nif (DEV_MODE) {\n globalThis.reactiveElementPolyfillSupportDevMode ??= polyfillSupport;\n} else {\n globalThis.reactiveElementPolyfillSupport ??= polyfillSupport;\n}\n"],"names":["SCOPED","_b","globalThis","reactiveElementPolyfillSupport","_a","ReactiveElement","undefined","window","ShadyCSS","nativeShadow","ApplyShim","elementProto","prototype","ShadyDOM","inUse","noPatch","patchElementProto","createRenderRoot","name","this","localName","call","constructor","hasOwnProperty","css","elementStyles","map","v","CSSStyleSheet","Array","from","cssRules","reduce","a","r","cssText","ScopingShim","prepareAdoptedCssText","_$handlesPrepareStyles","prepareTemplateStyles","document","createElement","_c","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","hasUpdated","styleElement","didUpdate","_$didUpdate","changedProperties"],"mappings":";;;;;aAyBMA,EAAS,WA0I4B,QAAzCC,EAAAC,WAAWC,sCAA8B,IAAAF,IAAzCC,WAAWC,+BA/GW,SAACC,GACvB,IAAAC,EAAeD,EAAAC,gBAOf,QACsBC,IAApBC,OAAOC,YACND,OAAOC,SAASC,cAAiBF,OAAOC,SAASE,WAFpD,CAYA,IAAMC,EAAeN,EAAgBO,UAKnCL,OAAOM,UACPN,OAAOM,SAASC,QACY,IAA5BP,OAAOM,SAASE,SAEhBR,OAAOM,SAASG,kBAAkBL,GAMpC,IAAMM,EAAmBN,EAAaM,iBACtCN,EAAaM,iBAAmB,qBAGxBC,EAAOC,KAAKC,UAGlB,GAAIb,OAAOC,SAAUC,aACnB,OAAOQ,EAAiBI,KAAKF,MAE7B,IAAKA,KAAKG,YAAYC,eAAevB,GAAS,CAC3CmB,KAAKG,YAAoDtB,IACxD,EAEF,IAAMwB,EACJL,KAAKG,YACLG,cAAcC,KAAI,SAACC,GACnB,OAAAA,aAAaC,cACTC,MAAMC,KAAKH,EAAEI,UAAUC,QACrB,SAACC,EAAWC,GAAe,OAACD,EAAKC,EAAEC,OAAQ,GAC3C,IAEFR,EAAEQ,OALN,IAO4B,QAA9BlC,EAAiB,QAAjBG,EAAAG,OAAOC,gBAAU,IAAAJ,OAAA,EAAAA,EAAAgC,mBAAa,IAAAnC,GAAAA,EAAAoC,sBAAsBb,EAAKN,QACTZ,IAA5Ca,KAAKG,YAAYgB,MACnB/B,OAAOC,SAAU+B,sBACfC,SAASC,cAAc,YACvBvB,EAGL,CACD,OACiB,QAAfwB,EAAAvB,KAAKwB,kBAAU,IAAAD,EAAAA,EACfvB,KAAKyB,aACFzB,KAAKG,YACHuB,kBAIX,EAKA,IAAMC,EAAoBnC,EAAamC,kBACvCnC,EAAamC,kBAAoB,WAC/BA,EAAkBzB,KAAKF,MAGnBA,KAAK4B,YACPxC,OAAOC,SAAUwC,aAAa7B,KAElC,EAMA,IAAM8B,EAAYtC,EAAauC,KAC/BvC,EAAauC,KAAc,SAEzBC,GAIKhC,KAAK4B,YACRxC,OAAOC,SAAUwC,aAAa7B,MAEhC8B,EAAU5B,KAAKF,KAAMgC,EACvB,CA5FC,CA6FH"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.d.ts.map new file mode 100644 index 0000000000..e0560d1593 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reactive-controller.d.ts","sourceRoot":"","sources":["../src/reactive-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEpD;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEvD;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;IAEtB;;;;;;;;;OASG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,aAAa,CAAC,IAAI,IAAI,CAAC;IAEvB;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,IAAI,CAAC;IAE1B;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,IAAI,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,IAAI,IAAI,CAAC;CACtB"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js.map new file mode 100644 index 0000000000..6f8b5be87e --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-controller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reactive-controller.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.d.ts.map b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.d.ts.map new file mode 100644 index 0000000000..0c2db5a14a --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reactive-element.d.ts","sourceRoot":"","sources":["../src/reactive-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAGL,cAAc,E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;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IA4F/B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,UAAU,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;IA6B9D,OAAO,CAAC,aAAa;IAKrB;;;;;;;;;;;;;;;OAeG;IACH,IAAI,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAErC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,kBAAkB,EAAE,cAAc,GAAG,OAAO;IAInE;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc;IAUnD;;;;;;;;;OASG;IACH,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAEpD;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,YAAY,CAAC,kBAAkB,EAAE,cAAc;CAC1D"} \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js index 1f342f05e7..95d7a384be 100644 --- a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js +++ b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js @@ -3,4 +3,4 @@ import{getCompatibleStyle as t,adoptStyles as e}from"./css-tag.js";export{CSSRes * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var s;const i=window,r=i.trustedTypes,o=r?r.emptyScript:"",n=i.reactiveElementPolyfillSupport,h={toAttribute(t,e){switch(e){case Boolean:t=t?o:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,e)=>e!==t&&(e==e||t==t),l={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:a},d="finalized";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=l){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)s.unshift(t(e))}else void 0!==e&&s.push(t(e));return s}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return e(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=l){var i;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:h).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:h;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:"open"},null==n||n({ReactiveElement:u}),(null!==(s=i.reactiveElementVersions)&&void 0!==s?s:i.reactiveElementVersions=[]).push("1.6.2");export{u as ReactiveElement,h as defaultConverter,a as notEqual}; \ No newline at end of file + */const{is:s,defineProperty:i,getOwnPropertyDescriptor:r,getOwnPropertyNames:o,getOwnPropertySymbols:n,getPrototypeOf:a}=Object,h=globalThis,c=h.trustedTypes,l=c?c.emptyScript:"",p=h.reactiveElementPolyfillSupport,d=(t,e)=>t,u={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},f=(t,e)=>!s(t,e),_={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),h.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&i(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=r(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=a(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,e=[...o(t),...n(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)s.unshift(t(e))}else void 0!==e&&s.push(t(e));return s}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:u).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,r){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??f)(i?r:this[t],e))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d("elementProperties")]=new Map,b[d("finalized")]=new Map,p?.({ReactiveElement:b}),(h.reactiveElementVersions??=[]).push("2.0.2");export{b as ReactiveElement,u as defaultConverter,f as notEqual}; \ No newline at end of file diff --git a/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js.map b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js.map new file mode 100644 index 0000000000..9f15aa5018 --- /dev/null +++ b/cdn/build/es6/node_modules/@lit/reactive-element/reactive-element.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reactive-element.js","sources":["src/reactive-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n getCompatibleStyle,\n adoptStyles,\n CSSResultGroup,\n CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n/**\n * Removes the `readonly` modifier from properties in the union K.\n *\n * This is a safer way to cast a value to a type with a mutable version of a\n * readonly field, than casting to an interface with the field re-declared\n * because it preserves the type of all the fields and warns on typos.\n */\ntype Mutable = Omit & {\n -readonly [P in keyof Pick]: P extends K ? T[P] : never;\n};\n\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst {\n is,\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n getPrototypeOf,\n} = Object;\n\nconst NODE_MODE = false;\n\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\n\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set = (global.litIssuedWarnings ??=\n new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning(\n 'polyfill-support-missing',\n `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`\n );\n }\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry = Update;\n export interface Update {\n kind: 'update';\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: ReactiveUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty =

(\n prop: P,\n _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter {\n /**\n * Called to convert an attribute value to a property\n * value.\n */\n fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n /**\n * Called to convert a property value to an attribute\n * value.\n *\n * It returns unknown instead of string, to be compatible with\n * https://github.com/WICG/trusted-types (and similar efforts).\n */\n toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter =\n | ComplexAttributeConverter\n | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration {\n /**\n * When set to `true`, indicates the property is internal private state. The\n * property should not be set by users. When using TypeScript, this property\n * should be marked as `private` or `protected`, and it is also a common\n * practice to use a leading `_` in the name. The property is not added to\n * `observedAttributes`.\n */\n readonly state?: boolean;\n\n /**\n * Indicates how and whether the property becomes an observed attribute.\n * If the value is `false`, the property is not added to `observedAttributes`.\n * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n * becomes `foobar`). If a string, the string value is observed (e.g\n * `attribute: 'foo-bar'`).\n */\n readonly attribute?: boolean | string;\n\n /**\n * Indicates the type of the property. This is used only as a hint for the\n * `converter` to determine how to convert the attribute\n * to/from a property.\n */\n readonly type?: TypeHint;\n\n /**\n * Indicates how to convert the attribute to/from a property. If this value\n * is a function, it is used to convert the attribute value a the property\n * value. If it's an object, it can have keys for `fromAttribute` and\n * `toAttribute`. If no `toAttribute` function is provided and\n * `reflect` is set to `true`, the property value is set directly to the\n * attribute. A default `converter` is used if none is provided; it supports\n * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n * when a property changes and the converter is used to update the attribute,\n * the property is never updated again as a result of the attribute changing,\n * and vice versa.\n */\n readonly converter?: AttributeConverter;\n\n /**\n * Indicates if the property should reflect to an attribute.\n * If `true`, when the property is set, the attribute is set using the\n * attribute name determined according to the rules for the `attribute`\n * property option and the value of the property converted using the rules\n * from the `converter` property option.\n */\n readonly reflect?: boolean;\n\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n\n /**\n * Indicates whether an accessor will be created for this property. By\n * default, an accessor will be generated for this property that requests an\n * update when set. If this flag is `true`, no accessor will be created, and\n * it will be the user's responsibility to call\n * `this.requestUpdate(propertyName, oldValue)` to request an update when\n * the property changes.\n */\n readonly noAccessor?: boolean;\n\n /**\n * Whether this property is wrapping accessors. This is set by `@property`\n * to control the initial value change and reflection logic.\n *\n * @internal\n */\n wrapped?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map;\n\ntype AttributeMap = Map;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map`, but if a developer uses\n// `PropertyValues` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues = T extends object\n ? PropertyValueMap\n : Map;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap extends Map {\n get(k: K): T[K] | undefined;\n set(key: K, value: T[K]): this;\n has(k: K): boolean;\n delete(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n toAttribute(value: unknown, type?: unknown): unknown {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n\n fromAttribute(value: string | null, type?: unknown) {\n let fromValue: unknown = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value!) as unknown;\n } catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n\nexport interface HasChanged {\n (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean =>\n !is(value, old);\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind =\n | 'change-in-update'\n | 'migration'\n | 'async-perform-update';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n// Temporary, until google3 is on TypeScript 5.2\ndeclare global {\n interface SymbolConstructor {\n readonly metadata: unique symbol;\n }\n}\n\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\n(Symbol as {metadata: symbol}).metadata ??= Symbol('metadata');\n\ndeclare global {\n // This is public global API, do not change!\n // eslint-disable-next-line no-var\n var litPropertyMetadata: WeakMap<\n object,\n Map\n >;\n}\n\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap<\n object,\n Map\n>();\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n // In the Node build, this `extends` clause will be substituted with\n // `(globalThis.HTMLElement ?? HTMLElement)`.\n //\n // This way, we will first prefer any global `HTMLElement` polyfill that the\n // user has assigned, and then fall back to the `HTMLElement` shim which has\n // been imported (see note at the top of this file about how this import is\n // generated by Rollup). Note that the `HTMLElement` variable has been\n // shadowed by this import, so it no longer refers to the global.\n extends HTMLElement\n implements ReactiveControllerHost\n{\n // Note: these are patched in only in DEV_MODE.\n /**\n * Read or set all the enabled warning categories for this class.\n *\n * This property is only used in development builds.\n *\n * @nocollapse\n * @category dev-mode\n */\n static enabledWarnings?: WarningKind[];\n\n /**\n * Enable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Enable for all ReactiveElement subclasses\n * ReactiveElement.enableWarning?.('migration');\n *\n * // Enable for only MyElement and subclasses\n * MyElement.enableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static enableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Disable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Disable for all ReactiveElement subclasses\n * ReactiveElement.disableWarning?.('migration');\n *\n * // Disable for only MyElement and subclasses\n * MyElement.disableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static disableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer: Initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n\n static _initializers?: Initializer[];\n\n /*\n * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n * all static methods and properties with initializers. Reference:\n * - https://github.com/google/closure-compiler/issues/1776\n */\n\n /**\n * Maps attribute names to properties; for example `foobar` attribute to\n * `fooBar` property. Created lazily on user subclasses when finalizing the\n * class.\n * @nocollapse\n */\n private static __attributeToPropertyMap: AttributeMap;\n\n /**\n * Marks class as having been finalized, which includes creating properties\n * from `static properties`, but does *not* include all properties created\n * from decorators.\n * @nocollapse\n */\n protected static finalized: true | undefined;\n\n /**\n * Memoized list of all element properties, including any superclass\n * properties. Created lazily on user subclasses when finalizing the class.\n *\n * @nocollapse\n * @category properties\n */\n static elementProperties: PropertyDeclarationMap;\n\n /**\n * User-supplied object that maps property names to `PropertyDeclaration`\n * objects containing options for configuring reactive properties. When\n * a reactive property is set the element will update and render.\n *\n * By default properties are public fields, and as such, they should be\n * considered as primarily settable by element users, either via attribute or\n * the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the `state: true` option. Properties\n * marked as `state` do not reflect from the corresponding attribute\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating\n * public properties should typically not be done for non-primitive (object or\n * array) properties. In other cases when an element needs to manage state, a\n * private property set with the `state: true` option should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n * @nocollapse\n * @category properties\n */\n static properties: PropertyDeclarations;\n\n /**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\n static elementStyles: Array = [];\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the {@linkcode css} tag function, via constructible stylesheets, or\n * imported from native CSS module scripts.\n *\n * Note on Content Security Policy:\n *\n * Element styles are implemented with `'];return r.cellXfs.forEach((function(t,r){var a=[];a.push(writextag("NumberFormat",null,{"ss:Format":escapexml(w._table[t.numFmtId])}));var i={"ss:ID":"s"+(21+r)};n.push(writextag("Style",a.join(""),i))})),writextag("Styles",n.join(""))}(0,r),n[3]=function write_names_xlml(t){if(!((t||{}).Workbook||{}).Names)return"";for(var r=t.Workbook.Names,n=[],a=0;a40?r:(n.l-=4,r.Reserved1=n.read_shift(0,"lpstr-ansi"),n.length-n.l<=4||1907505652!==(a=n.read_shift(4))?r:(r.UnicodeClipboardFormat=function parse_ClipboardFormatOrUnicodeString(t){return parse_ClipboardFormatOrString(t,2)}(n),0==(a=n.read_shift(4))||a>40?r:(n.l-=4,void(r.Reserved2=n.read_shift(0,"lpwstr")))))}function slurp(t,r,n,a){var i=n,o=[],l=r.slice(r.l,r.l+i);if(a&&a.enc&&a.enc.insitu&&l.length>0)switch(t.n){case"BOF":case"FilePass":case"FileLock":case"InterfaceHdr":case"RRDInfo":case"RRDHead":case"UsrExcl":case"EOF":case"BoundSheet8":break;default:a.enc.insitu(l)}o.push(l),r.l+=i;for(var c=On[__readUInt16LE(r,r.l)],f=0;null!=c&&"Continue"===c.n.slice(0,8);)i=__readUInt16LE(r,r.l+2),f=r.l+4,"ContinueFrt"==c.n?f+=4:"ContinueFrt"==c.n.slice(0,11)&&(f+=12),l=r.slice(f,r.l+4+i),o.push(l),r.l+=4+i,c=On[__readUInt16LE(r,r.l)];var h=bconcat(o);prep_blob(h,0);var u=0;h.lens=[];for(var d=0;d1)&&(n.sheetRows&&t.r>=n.sheetRows&&(k=!1),k)){if(n.cellStyles&&r.XF&&r.XF.data&&function pcs(t,r,n){var a,i=r.XF.data;i&&i.patternType&&n&&n.cellStyles&&(r.s={},r.s.patternType=i.patternType,(a=rgb2Hex(F(i.icvFore)))&&(r.s.fgColor={rgb:a}),(a=rgb2Hex(F(i.icvBack)))&&(r.s.bgColor={rgb:a}))}(0,r,n),delete r.ixfe,delete r.XF,i=t,y=encode_cell(t),b&&b.s&&b.e||(b={s:{r:0,c:0},e:{r:0,c:0}}),t.rb.e.r&&(b.e.r=t.r+1),t.c+1>b.e.c&&(b.e.c=t.c+1),n.cellFormula&&r.f)for(var a=0;at.c||C[a][0].s.r>t.r||C[a][0].e.c>8)!==$)throw new Error("rt mismatch: "+q+"!="+$);12==J.r&&(t.l+=10,Z-=10)}var Q={};Q="EOF"===J.n?J.f(t,Z,D):slurp(J,t,Z,D);var ee=J.n;if(0==W&&"BOF"!=ee)continue;switch(ee){case"Date1904":n.opts.Date1904=I.WBProps.date1904=Q;break;case"WriteProtect":n.opts.WriteProtect=!0;break;case"FilePass":if(D.enc||(t.l=0),D.enc=Q,!r.password)throw new Error("File is password-protected");if(null==Q.valid)throw new Error("Encryption scheme unsupported");if(!Q.valid)throw new Error("Password is incorrect");break;case"WriteAccess":D.lastuser=Q;break;case"FileSharing":case"Template":case"BookBool":case"UsesELFs":case"MTRSettings":case"Uncalced":case"ExtSST":case"BookExt":case"RichTextStream":case"BkHim":case"Index":case"Prot4Rev":case"Prot4RevPass":break;case"CodePage":var te=Number(Q);switch(te){case 21010:te=1200;break;case 32768:te=1e4;break;case 32769:te=1252}set_cp(D.codepage=te),K=!0;break;case"RRTabId":D.rrtabid=Q;break;case"WinProtect":D.winlocked=Q;break;case"RefreshAll":case"CalcCount":case"CalcDelta":case"CalcIter":case"CalcMode":case"CalcPrecision":case"CalcSaveRecalc":n.opts[ee]=Q;break;case"CalcRefMode":D.CalcRefMode=Q;break;case"ForceFullCalculation":n.opts.FullCalc=Q;break;case"WsBool":Q.fDialog&&(m["!type"]="dialog");break;case"XF":T.push(Q);break;case"SupBook":z.push([Q]),z[z.length-1].XTI=[];break;case"ExternName":z[z.length-1].push(Q);break;case"Lbl":X={Name:Q.Name,Ref:stringify_formula(Q.rgce,0,null,z,D)},Q.itab>0&&(X.Sheet=Q.itab-1),z.names.push(X),z[0]||(z[0]=[],z[0].XTI=[]),z[z.length-1].push(Q),"_xlnm._FilterDatabase"==Q.Name&&Q.itab>0&&Q.rgce&&Q.rgce[0]&&Q.rgce[0][0]&&"PtgArea3d"==Q.rgce[0][0][0]&&(j[Q.itab-1]={ref:encode_range(Q.rgce[0][0][1][2])});break;case"ExternCount":D.ExternCount=Q;break;case"ExternSheet":0==z.length&&(z[0]=[],z[0].XTI=[]),z[z.length-1].XTI=z[z.length-1].XTI.concat(Q),z.XTI=z.XTI.concat(Q);break;case"NameCmt":if(D.biff<8)break;null!=X&&(X.Comment=Q[1]);break;case"Protect":m["!protect"]=Q;break;case"Password":0!==Q&&D.WTF&&console.error("Password verifier: "+Q);break;case"BoundSheet8":g[Q.pos]=Q,D.snames.push(Q.name);break;case"EOF":if(--W)break;if(b.e){if(b.e.r>0&&b.e.c>0){if(b.e.r--,b.e.c--,m["!ref"]=encode_range(b),r.sheetRows&&r.sheetRows<=b.e.r){var re=b.e.r;b.e.r=r.sheetRows-1,m["!fullref"]=m["!ref"],m["!ref"]=encode_range(b),b.e.r=re}b.e.r++,b.e.c++}P.length>0&&(m["!merges"]=P),N.length>0&&(m["!objects"]=N),L.length>0&&(m["!cols"]=L),M.length>0&&(m["!rows"]=M),I.Sheets.push(R)}""===E?x=m:a[E]=m,m=r.dense?[]:{};break;case"BOF":if(8===D.biff&&(D.biff={9:2,521:3,1033:4}[$]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[Q.BIFFVer]||8),8==D.biff&&0==Q.BIFFVer&&16==Q.dt&&(D.biff=2),W++)break;if(k=!0,m=r.dense?[]:{},D.biff<8&&!K&&(K=!0,set_cp(D.codepage=r.codepage||1252)),D.biff<5){""===E&&(E="Sheet1"),b={s:{r:0,c:0},e:{r:0,c:0}};var ne={pos:t.l-Z,name:E};g[ne.pos]=ne,D.snames.push(E)}else E=(g[Y]||{name:""}).name;32==Q.dt&&(m["!type"]="chart"),64==Q.dt&&(m["!type"]="macro"),P=[],N=[],D.arrayf=C=[],L=[],M=[],0,U=!1,R={Hidden:(g[Y]||{hs:0}).hs,name:E};break;case"Number":case"BIFF2NUM":case"BIFF2INT":"chart"==m["!type"]&&(r.dense?(m[Q.r]||[])[Q.c]:m[encode_cell({c:Q.c,r:Q.r})])&&++Q.c,u={ixfe:Q.ixfe,XF:T[Q.ixfe]||{},v:Q.val,t:"n"},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r);break;case"BoolErr":u={ixfe:Q.ixfe,XF:T[Q.ixfe],v:Q.val,t:Q.t},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r);break;case"RK":u={ixfe:Q.ixfe,XF:T[Q.ixfe],v:Q.rknum,t:"n"},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r);break;case"MulRk":for(var ae=Q.c;ae<=Q.C;++ae){var se=Q.rkrec[ae-Q.c][0];u={ixfe:se,XF:T[se],v:Q.rkrec[ae-Q.c][1],t:"n"},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:ae,r:Q.r},u,r)}break;case"Formula":if("String"==Q.val){v=Q;break}if((u=make_cell(Q.val,Q.cell.ixfe,Q.tt)).XF=T[u.ixfe],r.cellFormula){var ie=Q.formula;if(ie&&ie[0]&&ie[0][0]&&"PtgExp"==ie[0][0][0]){var oe=ie[0][0][1][0],le=ie[0][0][1][1],ce=encode_cell({r:oe,c:le});B[ce]?u.f=""+stringify_formula(Q.formula,0,Q.cell,z,D):u.F=((r.dense?(m[oe]||[])[le]:m[ce])||{}).F}else u.f=""+stringify_formula(Q.formula,0,Q.cell,z,D)}V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O(Q.cell,u,r),v=Q;break;case"String":if(!v)throw new Error("String record expects Formula");v.val=Q,(u=make_cell(Q,v.cell.ixfe,"s")).XF=T[u.ixfe],r.cellFormula&&(u.f=""+stringify_formula(v.formula,0,v.cell,z,D)),V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O(v.cell,u,r),v=null;break;case"Array":C.push(Q);var fe=encode_cell(Q[0].s);if(o=r.dense?(m[Q[0].s.r]||[])[Q[0].s.c]:m[fe],r.cellFormula&&o){if(!v)break;if(!fe||!o)break;o.f=""+stringify_formula(Q[1],0,Q[0],z,D),o.F=encode_range(Q[0])}break;case"ShrFmla":if(!k)break;if(!r.cellFormula)break;if(y){if(!v)break;B[encode_cell(v.cell)]=Q[0],((o=r.dense?(m[v.cell.r]||[])[v.cell.c]:m[encode_cell(v.cell)])||{}).f=""+stringify_formula(Q[0],0,i,z,D)}break;case"LabelSst":u=make_cell(S[Q.isst].t,Q.ixfe,"s"),S[Q.isst].h&&(u.h=S[Q.isst].h),u.XF=T[u.ixfe],V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r);break;case"Blank":r.sheetStubs&&(u={ixfe:Q.ixfe,XF:T[Q.ixfe],t:"z"},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r));break;case"MulBlank":if(r.sheetStubs)for(var he=Q.c;he<=Q.C;++he){var ue=Q.ixfe[he-Q.c];u={ixfe:ue,XF:T[ue],t:"z"},V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:he,r:Q.r},u,r)}break;case"RString":case"Label":case"BIFF2STR":(u=make_cell(Q.val,Q.ixfe,"s")).XF=T[u.ixfe],V>0&&(u.z=G[u.ixfe>>8&31]),safe_format_xf(u,r,n.opts.Date1904),O({c:Q.c,r:Q.r},u,r);break;case"Dimensions":1===W&&(b=Q);break;case"SST":S=Q;break;case"Format":if(4==D.biff){G[V++]=Q[1];for(var de=0;de=163&&w.load(Q[1],V+163)}else w.load(Q[1],Q[0]);break;case"BIFF2FORMAT":G[V++]=Q;for(var pe=0;pe=163&&w.load(Q,V+163);break;case"MergeCells":P=P.concat(Q);break;case"Obj":N[Q.cmo[0]]=D.lastobj=Q;break;case"TxO":D.lastobj.TxO=Q;break;case"ImData":D.lastobj.ImData=Q;break;case"HLink":for(f=Q[0].s.r;f<=Q[0].e.r;++f)for(c=Q[0].s.c;c<=Q[0].e.c;++c)(o=r.dense?(m[f]||[])[c]:m[encode_cell({c,r:f})])&&(o.l=Q[1]);break;case"HLinkTooltip":for(f=Q[0].s.r;f<=Q[0].e.r;++f)for(c=Q[0].s.c;c<=Q[0].e.c;++c)(o=r.dense?(m[f]||[])[c]:m[encode_cell({c,r:f})])&&o.l&&(o.l.Tooltip=Q[1]);break;case"Note":if(D.biff<=5&&D.biff>=2)break;o=r.dense?(m[Q[0].r]||[])[Q[0].c]:m[encode_cell(Q[0])];var _e=N[Q[2]];o||(r.dense?(m[Q[0].r]||(m[Q[0].r]=[]),o=m[Q[0].r][Q[0].c]={t:"z"}):o=m[encode_cell(Q[0])]={t:"z"},b.e.r=Math.max(b.e.r,Q[0].r),b.s.r=Math.min(b.s.r,Q[0].r),b.e.c=Math.max(b.e.c,Q[0].c),b.s.c=Math.min(b.s.c,Q[0].c)),o.c||(o.c=[]),l={a:Q[1],t:_e.TxO.t},o.c.push(l);break;default:switch(J.n){case"ClrtClient":case"Header":case"Footer":case"HCenter":case"VCenter":case"Pls":case"GCW":case"LHRecord":case"DBCell":case"EntExU2":case"SxView":case"Sxvd":case"SXVI":case"SXVDEx":case"SxIvd":case"SXString":case"Sync":case"Addin":case"SXDI":case"SXLI":case"SXEx":case"QsiSXTag":case"Selection":case"Feat":case"FeatHdr":case"FeatHdr11":case"Feature11":case"Feature12":case"List12":case"RecalcId":case"DxGCol":case"Fbi":case"Fbi2":case"GelFrame":case"Font":case"XFCRC":case"Style":case"StyleExt":case"ScenarioProtect":case"ObjProtect":case"CondFmt12":case"Table":case"TableStyles":case"TableStyle":case"TableStyleElement":case"SXStreamID":case"SXVS":case"DConRef":case"SXAddl":case"DConBin":case"DConName":case"SXPI":case"SxFormat":case"SxSelect":case"SxRule":case"SxFilt":case"SxItm":case"SxDXF":case"ScenMan":case"DCon":case"CellWatch":case"PrintRowCol":case"PrintGrid":case"PrintSize":case"XCT":case"CRN":case"Scl":case"SheetExt":case"SheetExtOptional":case"ObNoMacros":case"ObProj":case"GUIDTypeLib":case"WOpt":case"PhoneticInfo":case"OleObjectSize":case"DXF":case"DXFN":case"DXFN12":case"DXFN12List":case"DXFN12NoCB":case"Dv":case"DVal":case"BRAI":case"Series":case"SeriesText":case"DConn":case"DbOrParamQry":case"DBQueryExt":case"OleDbConn":case"ExtString":case"IFmtRecord":case"CondFmt":case"CF":case"CF12":case"CFEx":case"Excel9File":case"Units":case"InterfaceHdr":case"Mms":case"InterfaceEnd":case"DSF":case"BuiltInFnGroupCount":case"Window1":case"HideObj":case"GridSet":case"Guts":case"UserBView":case"UserSViewBegin":case"UserSViewEnd":case"Pane":break;case"XFExt":T[Q.ixfe],Q.ext.forEach((function(t){t[0]}));break;case"DefColWidth":Q;break;case"DefaultRowHeight":Q[1];break;case"ColInfo":if(!D.cellStyles)break;for(;Q.e>=Q.s;)L[Q.e--]={width:Q.w/256},U||(U=!0,find_mdw_colw(Q.w/256)),process_col(L[Q.e+1]);break;case"Row":var me={};null!=Q.level&&(M[Q.r]=me,me.level=Q.level),Q.hidden&&(M[Q.r]=me,me.hidden=!0),Q.hpt&&(M[Q.r]=me,me.hpt=Q.hpt,me.hpx=pt2px(Q.hpt));break;case"LeftMargin":case"RightMargin":case"TopMargin":case"BottomMargin":m["!margins"]||default_margins(m["!margins"]={}),m["!margins"][ee.slice(0,-6).toLowerCase()]=Q;break;case"Setup":m["!margins"]||default_margins(m["!margins"]={}),m["!margins"].header=Q.header,m["!margins"].footer=Q.footer;break;case"Window2":Q.RTL&&(I.Views[0].RTL=!0);break;case"Country":d=Q;break;case"Palette":A=Q;break;case"Theme":_=Q;break;case"CodeName":E?R.CodeName=Q||R.name:I.WBProps.CodeName=Q||"ThisWorkbook";break;default:switch(J.n){case"Dat":case"Begin":case"End":case"StartBlock":case"EndBlock":case"Frame":case"Area":case"Axis":case"AxisLine":case"Tick":case"AxesUsed":case"CrtLayout12":case"CrtLayout12A":case"CrtLink":case"CrtLine":case"CrtMlFrt":case"CrtMlFrtContinue":case"LineFormat":case"AreaFormat":case"Chart":case"Chart3d":case"Chart3DBarShape":case"ChartFormat":case"ChartFrtInfo":case"PlotArea":case"PlotGrowth":case"SeriesList":case"SerParent":case"SerAuxTrend":case"DataFormat":case"SerToCrt":case"FontX":case"CatSerRange":case"AxcExt":case"SerFmt":case"ShtProps":case"DefaultText":case"Text":case"CatLab":case"DataLabExtContents":case"Legend":case"LegendException":case"Pie":case"Scatter":case"PieFormat":case"MarkerFormat":case"StartObject":case"EndObject":case"AlRuns":case"ObjectLink":case"SIIndex":case"AttachedLabel":case"YMult":case"Line":case"Bar":case"Surf":case"AxisParent":case"Pos":case"ValueRange":case"SXViewEx9":case"SXViewLink":case"PivotChartBits":case"SBaseRef":case"TextPropsStream":case"LnExt":case"MkrExt":case"CrtCoopt":case"Qsi":case"Qsif":case"Qsir":case"QsiSXTag":case"TxtQry":case"FilterMode":case"AutoFilter":case"AutoFilterInfo":case"AutoFilter12":case"DropDownObjIds":case"Sort":case"SortData":case"ShapePropsStream":case"MsoDrawing":case"MsoDrawingGroup":case"MsoDrawingSelection":case"WebPub":case"AutoWebPub":case"HeaderFooter":case"HFPicture":case"PLV":case"HorizontalPageBreaks":case"VerticalPageBreaks":case"Backup":case"CompressPictures":case"Compat12":case"Continue":case"ContinueFrt12":case"FrtFontList":case"FrtWrapper":break;default:switch(J.n){case"TabIdConf":case"Radar":case"RadarArea":case"DropBar":case"Intl":case"CoordList":case"SerAuxErrBar":case"BIFF2FONTCLR":case"BIFF2FMTCNT":case"BIFF2FONTXTRA":case"BIFF2XF":case"BIFF3XF":case"BIFF4XF":case"BIFF4FMTCNT":case"BIFF2ROW":case"BIFF2WINDOW2":case"SCENARIO":case"DConBin":case"PicF":case"DataLabExt":case"Lel":case"BopPop":case"BopPopCustom":case"RealTimeData":case"Name":case"LHNGraph":case"FnGroupName":case"AddMenu":case"LPr":case"ListObj":case"ListField":case"RRSort":case"BigName":case"ToolbarHdr":case"ToolbarEnd":case"DDEObjName":case"FRTArchId$":break;default:if(r.WTF)throw"Unrecognized Record "+J.n}}}}}else t.l+=Z}return n.SheetNames=keys(g).sort((function(t,r){return Number(t)-Number(r)})).map((function(t){return g[t].name})),r.bookSheets||(n.Sheets=a),n.Sheets&&j.forEach((function(t,r){n.Sheets[n.SheetNames[r]]["!autofilter"]=t})),n.Preamble=x,n.Strings=S,n.SSF=w.get_table(),D.enc&&(n.Encryption=D.enc),_&&(n.Themes=_),n.Metadata={},void 0!==d&&(n.Metadata.Country=d),z.names.length>0&&(I.Names=z.names),n.Workbook=I,n}var In={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function parse_xlscfb(t,r){var n,a,i,o;if(r||(r={}),fix_read_opts(r),reset_cp(),r.codepage&&set_ansi(r.codepage),t.FullPaths){if(C.find(t,"/encryption"))throw new Error("File is password-protected");n=C.find(t,"!CompObj"),a=C.find(t,"/Workbook")||C.find(t,"/Book")}else{switch(r.type){case"base64":t=m(u.decode(t));break;case"binary":t=m(t);break;case"buffer":break;case"array":Array.isArray(t)||(t=Array.prototype.slice.call(t))}prep_blob(t,0),a={content:t}}if(n&&parse_compobj(n),r.bookProps&&!r.bookSheets)i={};else{var l=d?"buffer":"array";if(a&&a.content)i=parse_workbook(a.content,r);else if((o=C.find(t,"PerfectOffice_MAIN"))&&o.content)i=Rt.to_workbook(o.content,(r.type=l,r));else{if(!(o=C.find(t,"NativeContent_MAIN"))||!o.content)throw new Error("Cannot find Workbook stream");i=Rt.to_workbook(o.content,(r.type=l,r))}r.bookVBA&&t.FullPaths&&C.find(t,"/_VBA_PROJECT_CUR/VBA/dir")&&(i.vbaraw=function make_vba_xls(t){var r=C.utils.cfb_new({root:"R"});return t.FullPaths.forEach((function(n,a){if("/"!==n.slice(-1)&&n.match(/_VBA_PROJECT_CUR/)){var i=n.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");C.utils.cfb_add(r,i,t.FileIndex[a].content)}})),C.write(r)}(t))}var c={};return t.FullPaths&&function parse_xls_props(t,r,n){var a=C.find(t,"!DocumentSummaryInformation");if(a&&a.size>0)try{var i=parse_PropertySetStream(a,Ue,In.DSI);for(var o in i)r[o]=i[o]}catch(t){if(n.WTF)throw t}var l=C.find(t,"!SummaryInformation");if(l&&l.size>0)try{var c=parse_PropertySetStream(l,ze,In.SI);for(var f in c)null==r[f]&&(r[f]=c[f])}catch(t){if(n.WTF)throw t}r.HeadingPairs&&r.TitlesOfParts&&(load_props_pairs(r.HeadingPairs,r.TitlesOfParts,r,n),delete r.HeadingPairs,delete r.TitlesOfParts)}(t,c,r),i.Props=i.Custprops=c,r.bookFiles&&(i.cfb=t),i}function write_xlscfb(t,r){var n=r||{},a=C.utils.cfb_new({root:"R"}),i="/Workbook";switch(n.bookType||"xls"){case"xls":n.bookType="biff8";case"xla":n.bookType||(n.bookType="xla");case"biff8":i="/Workbook",n.biff=8;break;case"biff5":i="/Book",n.biff=5;break;default:throw new Error("invalid type "+n.bookType+" for XLS CFB")}return C.utils.cfb_add(a,i,write_biff_buf(t,n)),8==n.biff&&(t.Props||t.Custprops)&&function write_xls_props(t,r){var n,a=[],i=[],o=[],l=0;if(t.Props)for(n=keys(t.Props),l=0;l-1||null!=o[l][1]&&c.push(o[l]);i.length&&C.utils.cfb_add(r,"/SummaryInformation",write_PropertySetStream(i,In.SI,We,ze)),(a.length||c.length)&&C.utils.cfb_add(r,"/DocumentSummaryInformation",write_PropertySetStream(a,In.DSI,He,Ue,c.length?c:null,In.UDI))}(t,a),8==n.biff&&t.vbaraw&&function fill_vba_xls(t,r){r.FullPaths.forEach((function(n,a){if(0!=a){var i=n.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==i.slice(-1)&&C.utils.cfb_add(t,i,r.FileIndex[a].content)}}))}(a,C.read(t.vbaraw,{type:"string"==typeof t.vbaraw?"binary":"buffer"})),a}var Rn={0:{n:"BrtRowHdr",f:function parse_BrtRowHdr(t,r){var n={},a=t.l+r;n.r=t.read_shift(4),t.l+=4;var i=t.read_shift(2);t.l+=1;var o=t.read_shift(1);return t.l=a,7&o&&(n.level=7&o),16&o&&(n.hidden=!0),32&o&&(n.hpt=i/20),n}},1:{n:"BrtCellBlank",f:function parse_BrtCellBlank(t){return[parse_XLSBCell(t)]}},2:{n:"BrtCellRk",f:function parse_BrtCellRk(t){return[parse_XLSBCell(t),parse_RkNumber(t),"n"]}},3:{n:"BrtCellError",f:function parse_BrtCellError(t){return[parse_XLSBCell(t),t.read_shift(1),"e"]}},4:{n:"BrtCellBool",f:function parse_BrtCellBool(t){return[parse_XLSBCell(t),t.read_shift(1),"b"]}},5:{n:"BrtCellReal",f:function parse_BrtCellReal(t){return[parse_XLSBCell(t),parse_Xnum(t),"n"]}},6:{n:"BrtCellSt",f:function parse_BrtCellSt(t){return[parse_XLSBCell(t),parse_XLWideString(t),"str"]}},7:{n:"BrtCellIsst",f:function parse_BrtCellIsst(t){return[parse_XLSBCell(t),t.read_shift(4),"s"]}},8:{n:"BrtFmlaString",f:function parse_BrtFmlaString(t,r,n){var a=t.l+r,i=parse_XLSBCell(t);i.r=n["!row"];var o=[i,parse_XLWideString(t),"str"];if(n.cellFormula){t.l+=2;var l=Lr(t,a-t.l,n);o[3]=stringify_formula(l,0,i,n.supbooks,n)}else t.l=a;return o}},9:{n:"BrtFmlaNum",f:function parse_BrtFmlaNum(t,r,n){var a=t.l+r,i=parse_XLSBCell(t);i.r=n["!row"];var o=[i,parse_Xnum(t),"n"];if(n.cellFormula){t.l+=2;var l=Lr(t,a-t.l,n);o[3]=stringify_formula(l,0,i,n.supbooks,n)}else t.l=a;return o}},10:{n:"BrtFmlaBool",f:function parse_BrtFmlaBool(t,r,n){var a=t.l+r,i=parse_XLSBCell(t);i.r=n["!row"];var o=[i,t.read_shift(1),"b"];if(n.cellFormula){t.l+=2;var l=Lr(t,a-t.l,n);o[3]=stringify_formula(l,0,i,n.supbooks,n)}else t.l=a;return o}},11:{n:"BrtFmlaError",f:function parse_BrtFmlaError(t,r,n){var a=t.l+r,i=parse_XLSBCell(t);i.r=n["!row"];var o=[i,t.read_shift(1),"e"];if(n.cellFormula){t.l+=2;var l=Lr(t,a-t.l,n);o[3]=stringify_formula(l,0,i,n.supbooks,n)}else t.l=a;return o}},16:{n:"BrtFRTArchID$",f:function parse_BrtFRTArchID$(t,r){var n={};return t.read_shift(4),n.ArchID=t.read_shift(4),t.l+=r-8,n}},19:{n:"BrtSSTItem",f:parse_RichStr},20:{n:"BrtPCDIMissing"},21:{n:"BrtPCDINumber"},22:{n:"BrtPCDIBoolean"},23:{n:"BrtPCDIError"},24:{n:"BrtPCDIString"},25:{n:"BrtPCDIDatetime"},26:{n:"BrtPCDIIndex"},27:{n:"BrtPCDIAMissing"},28:{n:"BrtPCDIANumber"},29:{n:"BrtPCDIABoolean"},30:{n:"BrtPCDIAError"},31:{n:"BrtPCDIAString"},32:{n:"BrtPCDIADatetime"},33:{n:"BrtPCRRecord"},34:{n:"BrtPCRRecordDt"},35:{n:"BrtFRTBegin"},36:{n:"BrtFRTEnd"},37:{n:"BrtACBegin"},38:{n:"BrtACEnd"},39:{n:"BrtName",f:function parse_BrtName(t,r,n){var a=t.l+r;t.l+=4,t.l+=1;var i=t.read_shift(4),o=Te(t),l=Mr(t,0,n),c=parse_XLNullableWideString(t);t.l=a;var f={Name:o,Ptg:l};return i<268435455&&(f.Sheet=i),c&&(f.Comment=c),f}},40:{n:"BrtIndexRowBlock"},42:{n:"BrtIndexBlock"},43:{n:"BrtFont",f:function parse_BrtFont(t,r,n){var a={};a.sz=t.read_shift(2)/20;var i=function parse_FontFlags(t){var r=t.read_shift(1);return t.l++,{fBold:1&r,fItalic:2&r,fUnderline:4&r,fStrikeout:8&r,fOutline:16&r,fShadow:32&r,fCondense:64&r,fExtend:128&r}}(t);switch(i.fItalic&&(a.italic=1),i.fCondense&&(a.condense=1),i.fExtend&&(a.extend=1),i.fShadow&&(a.shadow=1),i.fOutline&&(a.outline=1),i.fStrikeout&&(a.strike=1),700===t.read_shift(2)&&(a.bold=1),t.read_shift(2)){case 1:a.vertAlign="superscript";break;case 2:a.vertAlign="subscript"}var o=t.read_shift(1);0!=o&&(a.underline=o);var l=t.read_shift(1);l>0&&(a.family=l);var c=t.read_shift(1);switch(c>0&&(a.charset=c),t.l++,a.color=function parse_BrtColor(t){var r={},n=t.read_shift(1)>>>1,a=t.read_shift(1),i=t.read_shift(2,"i"),o=t.read_shift(1),l=t.read_shift(1),c=t.read_shift(1);switch(t.l++,n){case 0:r.auto=1;break;case 1:r.index=a;var f=Ke[a];f&&(r.rgb=rgb2Hex(f));break;case 2:r.rgb=rgb2Hex([o,l,c]);break;case 3:r.theme=a}return 0!=i&&(r.tint=i>0?i/32767:i/32768),r}(t),t.read_shift(1)){case 1:a.scheme="major";break;case 2:a.scheme="minor"}return a.name=parse_XLWideString(t),a}},44:{n:"BrtFmt",f:function parse_BrtFmt(t,r){return[t.read_shift(2),parse_XLWideString(t)]}},45:{n:"BrtFill",f:sr},46:{n:"BrtBorder",f:ir},47:{n:"BrtXF",f:function parse_BrtXF(t,r){var n=t.l+r,a=t.read_shift(2),i=t.read_shift(2);return t.l=n,{ixfe:a,numFmtId:i}}},48:{n:"BrtStyle"},49:{n:"BrtCellMeta"},50:{n:"BrtValueMeta"},51:{n:"BrtMdb"},52:{n:"BrtBeginFmd"},53:{n:"BrtEndFmd"},54:{n:"BrtBeginMdx"},55:{n:"BrtEndMdx"},56:{n:"BrtBeginMdxTuple"},57:{n:"BrtEndMdxTuple"},58:{n:"BrtMdxMbrIstr"},59:{n:"BrtStr"},60:{n:"BrtColInfo",f:parse_ColInfo},62:{n:"BrtCellRString"},63:{n:"BrtCalcChainItem$",f:function parse_BrtCalcChainItem$(t){var r={};r.i=t.read_shift(4);var n={};n.r=t.read_shift(4),n.c=t.read_shift(4),r.r=encode_cell(n);var a=t.read_shift(1);return 2&a&&(r.l="1"),8&a&&(r.a="1"),r}},64:{n:"BrtDVal",f:function parse_BrtDVal(){}},65:{n:"BrtSxvcellNum"},66:{n:"BrtSxvcellStr"},67:{n:"BrtSxvcellBool"},68:{n:"BrtSxvcellErr"},69:{n:"BrtSxvcellDate"},70:{n:"BrtSxvcellNil"},128:{n:"BrtFileVersion"},129:{n:"BrtBeginSheet"},130:{n:"BrtEndSheet"},131:{n:"BrtBeginBook",f:parsenoop,p:0},132:{n:"BrtEndBook"},133:{n:"BrtBeginWsViews"},134:{n:"BrtEndWsViews"},135:{n:"BrtBeginBookViews"},136:{n:"BrtEndBookViews"},137:{n:"BrtBeginWsView",f:function parse_BrtBeginWsView(t){var r=t.read_shift(2);return t.l+=28,{RTL:32&r}}},138:{n:"BrtEndWsView"},139:{n:"BrtBeginCsViews"},140:{n:"BrtEndCsViews"},141:{n:"BrtBeginCsView"},142:{n:"BrtEndCsView"},143:{n:"BrtBeginBundleShs"},144:{n:"BrtEndBundleShs"},145:{n:"BrtBeginSheetData"},146:{n:"BrtEndSheetData"},147:{n:"BrtWsProp",f:function parse_BrtWsProp(t,r){var n={};return t.l+=19,n.name=Ce(t,r-19),n}},148:{n:"BrtWsDim",f:_n,p:16},151:{n:"BrtPane",f:function parse_BrtPane(){}},152:{n:"BrtSel"},153:{n:"BrtWbProp",f:function parse_BrtWbProp(t,r){var n={},a=t.read_shift(4);n.defaultThemeVersion=t.read_shift(4);var i=r>8?parse_XLWideString(t):"";return i.length>0&&(n.CodeName=i),n.autoCompressPictures=!!(65536&a),n.backupFile=!!(64&a),n.checkCompatibility=!!(4096&a),n.date1904=!!(1&a),n.filterPrivacy=!!(8&a),n.hidePivotFieldList=!!(1024&a),n.promptedSolutions=!!(16&a),n.publishItems=!!(2048&a),n.refreshAllConnections=!!(262144&a),n.saveExternalLinkValues=!!(128&a),n.showBorderUnselectedTables=!!(4&a),n.showInkAnnotation=!!(32&a),n.showObjects=["all","placeholders","none"][a>>13&3],n.showPivotChartFilter=!!(32768&a),n.updateLinks=["userSet","never","always"][a>>8&3],n}},154:{n:"BrtWbFactoid"},155:{n:"BrtFileRecover"},156:{n:"BrtBundleSh",f:function parse_BrtBundleSh(t,r){var n={};return n.Hidden=t.read_shift(4),n.iTabID=t.read_shift(4),n.strRelID=Ae(t,r-8),n.name=parse_XLWideString(t),n}},157:{n:"BrtCalcProp"},158:{n:"BrtBookView"},159:{n:"BrtBeginSst",f:function parse_BrtBeginSst(t){return[t.read_shift(4),t.read_shift(4)]}},160:{n:"BrtEndSst"},161:{n:"BrtBeginAFilter",f:Re},162:{n:"BrtEndAFilter"},163:{n:"BrtBeginFilterColumn"},164:{n:"BrtEndFilterColumn"},165:{n:"BrtBeginFilters"},166:{n:"BrtEndFilters"},167:{n:"BrtFilter"},168:{n:"BrtColorFilter"},169:{n:"BrtIconFilter"},170:{n:"BrtTop10Filter"},171:{n:"BrtDynamicFilter"},172:{n:"BrtBeginCustomFilters"},173:{n:"BrtEndCustomFilters"},174:{n:"BrtCustomFilter"},175:{n:"BrtAFilterDateGroupItem"},176:{n:"BrtMergeCell",f:gn},177:{n:"BrtBeginMergeCells"},178:{n:"BrtEndMergeCells"},179:{n:"BrtBeginPivotCacheDef"},180:{n:"BrtEndPivotCacheDef"},181:{n:"BrtBeginPCDFields"},182:{n:"BrtEndPCDFields"},183:{n:"BrtBeginPCDField"},184:{n:"BrtEndPCDField"},185:{n:"BrtBeginPCDSource"},186:{n:"BrtEndPCDSource"},187:{n:"BrtBeginPCDSRange"},188:{n:"BrtEndPCDSRange"},189:{n:"BrtBeginPCDFAtbl"},190:{n:"BrtEndPCDFAtbl"},191:{n:"BrtBeginPCDIRun"},192:{n:"BrtEndPCDIRun"},193:{n:"BrtBeginPivotCacheRecords"},194:{n:"BrtEndPivotCacheRecords"},195:{n:"BrtBeginPCDHierarchies"},196:{n:"BrtEndPCDHierarchies"},197:{n:"BrtBeginPCDHierarchy"},198:{n:"BrtEndPCDHierarchy"},199:{n:"BrtBeginPCDHFieldsUsage"},200:{n:"BrtEndPCDHFieldsUsage"},201:{n:"BrtBeginExtConnection"},202:{n:"BrtEndExtConnection"},203:{n:"BrtBeginECDbProps"},204:{n:"BrtEndECDbProps"},205:{n:"BrtBeginECOlapProps"},206:{n:"BrtEndECOlapProps"},207:{n:"BrtBeginPCDSConsol"},208:{n:"BrtEndPCDSConsol"},209:{n:"BrtBeginPCDSCPages"},210:{n:"BrtEndPCDSCPages"},211:{n:"BrtBeginPCDSCPage"},212:{n:"BrtEndPCDSCPage"},213:{n:"BrtBeginPCDSCPItem"},214:{n:"BrtEndPCDSCPItem"},215:{n:"BrtBeginPCDSCSets"},216:{n:"BrtEndPCDSCSets"},217:{n:"BrtBeginPCDSCSet"},218:{n:"BrtEndPCDSCSet"},219:{n:"BrtBeginPCDFGroup"},220:{n:"BrtEndPCDFGroup"},221:{n:"BrtBeginPCDFGItems"},222:{n:"BrtEndPCDFGItems"},223:{n:"BrtBeginPCDFGRange"},224:{n:"BrtEndPCDFGRange"},225:{n:"BrtBeginPCDFGDiscrete"},226:{n:"BrtEndPCDFGDiscrete"},227:{n:"BrtBeginPCDSDTupleCache"},228:{n:"BrtEndPCDSDTupleCache"},229:{n:"BrtBeginPCDSDTCEntries"},230:{n:"BrtEndPCDSDTCEntries"},231:{n:"BrtBeginPCDSDTCEMembers"},232:{n:"BrtEndPCDSDTCEMembers"},233:{n:"BrtBeginPCDSDTCEMember"},234:{n:"BrtEndPCDSDTCEMember"},235:{n:"BrtBeginPCDSDTCQueries"},236:{n:"BrtEndPCDSDTCQueries"},237:{n:"BrtBeginPCDSDTCQuery"},238:{n:"BrtEndPCDSDTCQuery"},239:{n:"BrtBeginPCDSDTCSets"},240:{n:"BrtEndPCDSDTCSets"},241:{n:"BrtBeginPCDSDTCSet"},242:{n:"BrtEndPCDSDTCSet"},243:{n:"BrtBeginPCDCalcItems"},244:{n:"BrtEndPCDCalcItems"},245:{n:"BrtBeginPCDCalcItem"},246:{n:"BrtEndPCDCalcItem"},247:{n:"BrtBeginPRule"},248:{n:"BrtEndPRule"},249:{n:"BrtBeginPRFilters"},250:{n:"BrtEndPRFilters"},251:{n:"BrtBeginPRFilter"},252:{n:"BrtEndPRFilter"},253:{n:"BrtBeginPNames"},254:{n:"BrtEndPNames"},255:{n:"BrtBeginPName"},256:{n:"BrtEndPName"},257:{n:"BrtBeginPNPairs"},258:{n:"BrtEndPNPairs"},259:{n:"BrtBeginPNPair"},260:{n:"BrtEndPNPair"},261:{n:"BrtBeginECWebProps"},262:{n:"BrtEndECWebProps"},263:{n:"BrtBeginEcWpTables"},264:{n:"BrtEndECWPTables"},265:{n:"BrtBeginECParams"},266:{n:"BrtEndECParams"},267:{n:"BrtBeginECParam"},268:{n:"BrtEndECParam"},269:{n:"BrtBeginPCDKPIs"},270:{n:"BrtEndPCDKPIs"},271:{n:"BrtBeginPCDKPI"},272:{n:"BrtEndPCDKPI"},273:{n:"BrtBeginDims"},274:{n:"BrtEndDims"},275:{n:"BrtBeginDim"},276:{n:"BrtEndDim"},277:{n:"BrtIndexPartEnd"},278:{n:"BrtBeginStyleSheet"},279:{n:"BrtEndStyleSheet"},280:{n:"BrtBeginSXView"},281:{n:"BrtEndSXVI"},282:{n:"BrtBeginSXVI"},283:{n:"BrtBeginSXVIs"},284:{n:"BrtEndSXVIs"},285:{n:"BrtBeginSXVD"},286:{n:"BrtEndSXVD"},287:{n:"BrtBeginSXVDs"},288:{n:"BrtEndSXVDs"},289:{n:"BrtBeginSXPI"},290:{n:"BrtEndSXPI"},291:{n:"BrtBeginSXPIs"},292:{n:"BrtEndSXPIs"},293:{n:"BrtBeginSXDI"},294:{n:"BrtEndSXDI"},295:{n:"BrtBeginSXDIs"},296:{n:"BrtEndSXDIs"},297:{n:"BrtBeginSXLI"},298:{n:"BrtEndSXLI"},299:{n:"BrtBeginSXLIRws"},300:{n:"BrtEndSXLIRws"},301:{n:"BrtBeginSXLICols"},302:{n:"BrtEndSXLICols"},303:{n:"BrtBeginSXFormat"},304:{n:"BrtEndSXFormat"},305:{n:"BrtBeginSXFormats"},306:{n:"BrtEndSxFormats"},307:{n:"BrtBeginSxSelect"},308:{n:"BrtEndSxSelect"},309:{n:"BrtBeginISXVDRws"},310:{n:"BrtEndISXVDRws"},311:{n:"BrtBeginISXVDCols"},312:{n:"BrtEndISXVDCols"},313:{n:"BrtEndSXLocation"},314:{n:"BrtBeginSXLocation"},315:{n:"BrtEndSXView"},316:{n:"BrtBeginSXTHs"},317:{n:"BrtEndSXTHs"},318:{n:"BrtBeginSXTH"},319:{n:"BrtEndSXTH"},320:{n:"BrtBeginISXTHRws"},321:{n:"BrtEndISXTHRws"},322:{n:"BrtBeginISXTHCols"},323:{n:"BrtEndISXTHCols"},324:{n:"BrtBeginSXTDMPS"},325:{n:"BrtEndSXTDMPs"},326:{n:"BrtBeginSXTDMP"},327:{n:"BrtEndSXTDMP"},328:{n:"BrtBeginSXTHItems"},329:{n:"BrtEndSXTHItems"},330:{n:"BrtBeginSXTHItem"},331:{n:"BrtEndSXTHItem"},332:{n:"BrtBeginMetadata"},333:{n:"BrtEndMetadata"},334:{n:"BrtBeginEsmdtinfo"},335:{n:"BrtMdtinfo"},336:{n:"BrtEndEsmdtinfo"},337:{n:"BrtBeginEsmdb"},338:{n:"BrtEndEsmdb"},339:{n:"BrtBeginEsfmd"},340:{n:"BrtEndEsfmd"},341:{n:"BrtBeginSingleCells"},342:{n:"BrtEndSingleCells"},343:{n:"BrtBeginList"},344:{n:"BrtEndList"},345:{n:"BrtBeginListCols"},346:{n:"BrtEndListCols"},347:{n:"BrtBeginListCol"},348:{n:"BrtEndListCol"},349:{n:"BrtBeginListXmlCPr"},350:{n:"BrtEndListXmlCPr"},351:{n:"BrtListCCFmla"},352:{n:"BrtListTrFmla"},353:{n:"BrtBeginExternals"},354:{n:"BrtEndExternals"},355:{n:"BrtSupBookSrc",f:Ae},357:{n:"BrtSupSelf"},358:{n:"BrtSupSame"},359:{n:"BrtSupTabs"},360:{n:"BrtBeginSupBook"},361:{n:"BrtPlaceholderName"},362:{n:"BrtExternSheet",f:parse_ExternSheet},363:{n:"BrtExternTableStart"},364:{n:"BrtExternTableEnd"},366:{n:"BrtExternRowHdr"},367:{n:"BrtExternCellBlank"},368:{n:"BrtExternCellReal"},369:{n:"BrtExternCellBool"},370:{n:"BrtExternCellError"},371:{n:"BrtExternCellString"},372:{n:"BrtBeginEsmdx"},373:{n:"BrtEndEsmdx"},374:{n:"BrtBeginMdxSet"},375:{n:"BrtEndMdxSet"},376:{n:"BrtBeginMdxMbrProp"},377:{n:"BrtEndMdxMbrProp"},378:{n:"BrtBeginMdxKPI"},379:{n:"BrtEndMdxKPI"},380:{n:"BrtBeginEsstr"},381:{n:"BrtEndEsstr"},382:{n:"BrtBeginPRFItem"},383:{n:"BrtEndPRFItem"},384:{n:"BrtBeginPivotCacheIDs"},385:{n:"BrtEndPivotCacheIDs"},386:{n:"BrtBeginPivotCacheID"},387:{n:"BrtEndPivotCacheID"},388:{n:"BrtBeginISXVIs"},389:{n:"BrtEndISXVIs"},390:{n:"BrtBeginColInfos"},391:{n:"BrtEndColInfos"},392:{n:"BrtBeginRwBrk"},393:{n:"BrtEndRwBrk"},394:{n:"BrtBeginColBrk"},395:{n:"BrtEndColBrk"},396:{n:"BrtBrk"},397:{n:"BrtUserBookView"},398:{n:"BrtInfo"},399:{n:"BrtCUsr"},400:{n:"BrtUsr"},401:{n:"BrtBeginUsers"},403:{n:"BrtEOF"},404:{n:"BrtUCR"},405:{n:"BrtRRInsDel"},406:{n:"BrtRREndInsDel"},407:{n:"BrtRRMove"},408:{n:"BrtRREndMove"},409:{n:"BrtRRChgCell"},410:{n:"BrtRREndChgCell"},411:{n:"BrtRRHeader"},412:{n:"BrtRRUserView"},413:{n:"BrtRRRenSheet"},414:{n:"BrtRRInsertSh"},415:{n:"BrtRRDefName"},416:{n:"BrtRRNote"},417:{n:"BrtRRConflict"},418:{n:"BrtRRTQSIF"},419:{n:"BrtRRFormat"},420:{n:"BrtRREndFormat"},421:{n:"BrtRRAutoFmt"},422:{n:"BrtBeginUserShViews"},423:{n:"BrtBeginUserShView"},424:{n:"BrtEndUserShView"},425:{n:"BrtEndUserShViews"},426:{n:"BrtArrFmla",f:function parse_BrtArrFmla(t,r,n){var a=t.l+r,i=parse_RfX(t),o=t.read_shift(1),l=[i];if(l[2]=o,n.cellFormula){var c=Nr(t,a-t.l,n);l[1]=c}else t.l=a;return l}},427:{n:"BrtShrFmla",f:function parse_BrtShrFmla(t,r,n){var a=t.l+r,i=[Re(t,16)];if(n.cellFormula){var o=Ur(t,a-t.l,n);i[1]=o,t.l=a}else t.l=a;return i}},428:{n:"BrtTable"},429:{n:"BrtBeginExtConnections"},430:{n:"BrtEndExtConnections"},431:{n:"BrtBeginPCDCalcMems"},432:{n:"BrtEndPCDCalcMems"},433:{n:"BrtBeginPCDCalcMem"},434:{n:"BrtEndPCDCalcMem"},435:{n:"BrtBeginPCDHGLevels"},436:{n:"BrtEndPCDHGLevels"},437:{n:"BrtBeginPCDHGLevel"},438:{n:"BrtEndPCDHGLevel"},439:{n:"BrtBeginPCDHGLGroups"},440:{n:"BrtEndPCDHGLGroups"},441:{n:"BrtBeginPCDHGLGroup"},442:{n:"BrtEndPCDHGLGroup"},443:{n:"BrtBeginPCDHGLGMembers"},444:{n:"BrtEndPCDHGLGMembers"},445:{n:"BrtBeginPCDHGLGMember"},446:{n:"BrtEndPCDHGLGMember"},447:{n:"BrtBeginQSI"},448:{n:"BrtEndQSI"},449:{n:"BrtBeginQSIR"},450:{n:"BrtEndQSIR"},451:{n:"BrtBeginDeletedNames"},452:{n:"BrtEndDeletedNames"},453:{n:"BrtBeginDeletedName"},454:{n:"BrtEndDeletedName"},455:{n:"BrtBeginQSIFs"},456:{n:"BrtEndQSIFs"},457:{n:"BrtBeginQSIF"},458:{n:"BrtEndQSIF"},459:{n:"BrtBeginAutoSortScope"},460:{n:"BrtEndAutoSortScope"},461:{n:"BrtBeginConditionalFormatting"},462:{n:"BrtEndConditionalFormatting"},463:{n:"BrtBeginCFRule"},464:{n:"BrtEndCFRule"},465:{n:"BrtBeginIconSet"},466:{n:"BrtEndIconSet"},467:{n:"BrtBeginDatabar"},468:{n:"BrtEndDatabar"},469:{n:"BrtBeginColorScale"},470:{n:"BrtEndColorScale"},471:{n:"BrtCFVO"},472:{n:"BrtExternValueMeta"},473:{n:"BrtBeginColorPalette"},474:{n:"BrtEndColorPalette"},475:{n:"BrtIndexedColor"},476:{n:"BrtMargins",f:function parse_BrtMargins(t){var r={};return wn.forEach((function(n){r[n]=parse_Xnum(t)})),r}},477:{n:"BrtPrintOptions"},478:{n:"BrtPageSetup"},479:{n:"BrtBeginHeaderFooter"},480:{n:"BrtEndHeaderFooter"},481:{n:"BrtBeginSXCrtFormat"},482:{n:"BrtEndSXCrtFormat"},483:{n:"BrtBeginSXCrtFormats"},484:{n:"BrtEndSXCrtFormats"},485:{n:"BrtWsFmtInfo",f:function parse_BrtWsFmtInfo(){}},486:{n:"BrtBeginMgs"},487:{n:"BrtEndMGs"},488:{n:"BrtBeginMGMaps"},489:{n:"BrtEndMGMaps"},490:{n:"BrtBeginMG"},491:{n:"BrtEndMG"},492:{n:"BrtBeginMap"},493:{n:"BrtEndMap"},494:{n:"BrtHLink",f:function parse_BrtHLink(t,r){var n=t.l+r,a=Re(t,16),i=parse_XLNullableWideString(t),o=parse_XLWideString(t),l=parse_XLWideString(t),c=parse_XLWideString(t);t.l=n;var f={rfx:a,relId:i,loc:o,display:c};return l&&(f.Tooltip=l),f}},495:{n:"BrtBeginDCon"},496:{n:"BrtEndDCon"},497:{n:"BrtBeginDRefs"},498:{n:"BrtEndDRefs"},499:{n:"BrtDRef"},500:{n:"BrtBeginScenMan"},501:{n:"BrtEndScenMan"},502:{n:"BrtBeginSct"},503:{n:"BrtEndSct"},504:{n:"BrtSlc"},505:{n:"BrtBeginDXFs"},506:{n:"BrtEndDXFs"},507:{n:"BrtDXF"},508:{n:"BrtBeginTableStyles"},509:{n:"BrtEndTableStyles"},510:{n:"BrtBeginTableStyle"},511:{n:"BrtEndTableStyle"},512:{n:"BrtTableStyleElement"},513:{n:"BrtTableStyleClient"},514:{n:"BrtBeginVolDeps"},515:{n:"BrtEndVolDeps"},516:{n:"BrtBeginVolType"},517:{n:"BrtEndVolType"},518:{n:"BrtBeginVolMain"},519:{n:"BrtEndVolMain"},520:{n:"BrtBeginVolTopic"},521:{n:"BrtEndVolTopic"},522:{n:"BrtVolSubtopic"},523:{n:"BrtVolRef"},524:{n:"BrtVolNum"},525:{n:"BrtVolErr"},526:{n:"BrtVolStr"},527:{n:"BrtVolBool"},528:{n:"BrtBeginCalcChain$"},529:{n:"BrtEndCalcChain$"},530:{n:"BrtBeginSortState"},531:{n:"BrtEndSortState"},532:{n:"BrtBeginSortCond"},533:{n:"BrtEndSortCond"},534:{n:"BrtBookProtection"},535:{n:"BrtSheetProtection"},536:{n:"BrtRangeProtection"},537:{n:"BrtPhoneticInfo"},538:{n:"BrtBeginECTxtWiz"},539:{n:"BrtEndECTxtWiz"},540:{n:"BrtBeginECTWFldInfoLst"},541:{n:"BrtEndECTWFldInfoLst"},542:{n:"BrtBeginECTwFldInfo"},548:{n:"BrtFileSharing"},549:{n:"BrtOleSize"},550:{n:"BrtDrawing",f:Ae},551:{n:"BrtLegacyDrawing"},552:{n:"BrtLegacyDrawingHF"},553:{n:"BrtWebOpt"},554:{n:"BrtBeginWebPubItems"},555:{n:"BrtEndWebPubItems"},556:{n:"BrtBeginWebPubItem"},557:{n:"BrtEndWebPubItem"},558:{n:"BrtBeginSXCondFmt"},559:{n:"BrtEndSXCondFmt"},560:{n:"BrtBeginSXCondFmts"},561:{n:"BrtEndSXCondFmts"},562:{n:"BrtBkHim"},564:{n:"BrtColor"},565:{n:"BrtBeginIndexedColors"},566:{n:"BrtEndIndexedColors"},569:{n:"BrtBeginMRUColors"},570:{n:"BrtEndMRUColors"},572:{n:"BrtMRUColor"},573:{n:"BrtBeginDVals"},574:{n:"BrtEndDVals"},577:{n:"BrtSupNameStart"},578:{n:"BrtSupNameValueStart"},579:{n:"BrtSupNameValueEnd"},580:{n:"BrtSupNameNum"},581:{n:"BrtSupNameErr"},582:{n:"BrtSupNameSt"},583:{n:"BrtSupNameNil"},584:{n:"BrtSupNameBool"},585:{n:"BrtSupNameFmla"},586:{n:"BrtSupNameBits"},587:{n:"BrtSupNameEnd"},588:{n:"BrtEndSupBook"},589:{n:"BrtCellSmartTagProperty"},590:{n:"BrtBeginCellSmartTag"},591:{n:"BrtEndCellSmartTag"},592:{n:"BrtBeginCellSmartTags"},593:{n:"BrtEndCellSmartTags"},594:{n:"BrtBeginSmartTags"},595:{n:"BrtEndSmartTags"},596:{n:"BrtSmartTagType"},597:{n:"BrtBeginSmartTagTypes"},598:{n:"BrtEndSmartTagTypes"},599:{n:"BrtBeginSXFilters"},600:{n:"BrtEndSXFilters"},601:{n:"BrtBeginSXFILTER"},602:{n:"BrtEndSXFilter"},603:{n:"BrtBeginFills"},604:{n:"BrtEndFills"},605:{n:"BrtBeginCellWatches"},606:{n:"BrtEndCellWatches"},607:{n:"BrtCellWatch"},608:{n:"BrtBeginCRErrs"},609:{n:"BrtEndCRErrs"},610:{n:"BrtCrashRecErr"},611:{n:"BrtBeginFonts"},612:{n:"BrtEndFonts"},613:{n:"BrtBeginBorders"},614:{n:"BrtEndBorders"},615:{n:"BrtBeginFmts"},616:{n:"BrtEndFmts"},617:{n:"BrtBeginCellXFs"},618:{n:"BrtEndCellXFs"},619:{n:"BrtBeginStyles"},620:{n:"BrtEndStyles"},625:{n:"BrtBigName"},626:{n:"BrtBeginCellStyleXFs"},627:{n:"BrtEndCellStyleXFs"},628:{n:"BrtBeginComments"},629:{n:"BrtEndComments"},630:{n:"BrtBeginCommentAuthors"},631:{n:"BrtEndCommentAuthors"},632:{n:"BrtCommentAuthor",f:pr},633:{n:"BrtBeginCommentList"},634:{n:"BrtEndCommentList"},635:{n:"BrtBeginComment",f:function parse_BrtBeginComment(t){var r={};r.iauthor=t.read_shift(4);var n=Re(t,16);return r.rfx=n.s,r.ref=encode_cell(n.s),t.l+=16,r}},636:{n:"BrtEndComment"},637:{n:"BrtCommentText",f:Be},638:{n:"BrtBeginOleObjects"},639:{n:"BrtOleObject"},640:{n:"BrtEndOleObjects"},641:{n:"BrtBeginSxrules"},642:{n:"BrtEndSxRules"},643:{n:"BrtBeginActiveXControls"},644:{n:"BrtActiveX"},645:{n:"BrtEndActiveXControls"},646:{n:"BrtBeginPCDSDTCEMembersSortBy"},648:{n:"BrtBeginCellIgnoreECs"},649:{n:"BrtCellIgnoreEC"},650:{n:"BrtEndCellIgnoreECs"},651:{n:"BrtCsProp",f:function parse_BrtCsProp(t,r){return t.l+=10,{name:parse_XLWideString(t)}}},652:{n:"BrtCsPageSetup"},653:{n:"BrtBeginUserCsViews"},654:{n:"BrtEndUserCsViews"},655:{n:"BrtBeginUserCsView"},656:{n:"BrtEndUserCsView"},657:{n:"BrtBeginPcdSFCIEntries"},658:{n:"BrtEndPCDSFCIEntries"},659:{n:"BrtPCDSFCIEntry"},660:{n:"BrtBeginListParts"},661:{n:"BrtListPart"},662:{n:"BrtEndListParts"},663:{n:"BrtSheetCalcProp"},664:{n:"BrtBeginFnGroup"},665:{n:"BrtFnGroup"},666:{n:"BrtEndFnGroup"},667:{n:"BrtSupAddin"},668:{n:"BrtSXTDMPOrder"},669:{n:"BrtCsProtection"},671:{n:"BrtBeginWsSortMap"},672:{n:"BrtEndWsSortMap"},673:{n:"BrtBeginRRSort"},674:{n:"BrtEndRRSort"},675:{n:"BrtRRSortItem"},676:{n:"BrtFileSharingIso"},677:{n:"BrtBookProtectionIso"},678:{n:"BrtSheetProtectionIso"},679:{n:"BrtCsProtectionIso"},680:{n:"BrtRangeProtectionIso"},681:{n:"BrtDValList"},1024:{n:"BrtRwDescent"},1025:{n:"BrtKnownFonts"},1026:{n:"BrtBeginSXTupleSet"},1027:{n:"BrtEndSXTupleSet"},1028:{n:"BrtBeginSXTupleSetHeader"},1029:{n:"BrtEndSXTupleSetHeader"},1030:{n:"BrtSXTupleSetHeaderItem"},1031:{n:"BrtBeginSXTupleSetData"},1032:{n:"BrtEndSXTupleSetData"},1033:{n:"BrtBeginSXTupleSetRow"},1034:{n:"BrtEndSXTupleSetRow"},1035:{n:"BrtSXTupleSetRowItem"},1036:{n:"BrtNameExt"},1037:{n:"BrtPCDH14"},1038:{n:"BrtBeginPCDCalcMem14"},1039:{n:"BrtEndPCDCalcMem14"},1040:{n:"BrtSXTH14"},1041:{n:"BrtBeginSparklineGroup"},1042:{n:"BrtEndSparklineGroup"},1043:{n:"BrtSparkline"},1044:{n:"BrtSXDI14"},1045:{n:"BrtWsFmtInfoEx14"},1046:{n:"BrtBeginConditionalFormatting14"},1047:{n:"BrtEndConditionalFormatting14"},1048:{n:"BrtBeginCFRule14"},1049:{n:"BrtEndCFRule14"},1050:{n:"BrtCFVO14"},1051:{n:"BrtBeginDatabar14"},1052:{n:"BrtBeginIconSet14"},1053:{n:"BrtDVal14",f:function parse_BrtDVal14(){}},1054:{n:"BrtBeginDVals14"},1055:{n:"BrtColor14"},1056:{n:"BrtBeginSparklines"},1057:{n:"BrtEndSparklines"},1058:{n:"BrtBeginSparklineGroups"},1059:{n:"BrtEndSparklineGroups"},1061:{n:"BrtSXVD14"},1062:{n:"BrtBeginSXView14"},1063:{n:"BrtEndSXView14"},1064:{n:"BrtBeginSXView16"},1065:{n:"BrtEndSXView16"},1066:{n:"BrtBeginPCD14"},1067:{n:"BrtEndPCD14"},1068:{n:"BrtBeginExtConn14"},1069:{n:"BrtEndExtConn14"},1070:{n:"BrtBeginSlicerCacheIDs"},1071:{n:"BrtEndSlicerCacheIDs"},1072:{n:"BrtBeginSlicerCacheID"},1073:{n:"BrtEndSlicerCacheID"},1075:{n:"BrtBeginSlicerCache"},1076:{n:"BrtEndSlicerCache"},1077:{n:"BrtBeginSlicerCacheDef"},1078:{n:"BrtEndSlicerCacheDef"},1079:{n:"BrtBeginSlicersEx"},1080:{n:"BrtEndSlicersEx"},1081:{n:"BrtBeginSlicerEx"},1082:{n:"BrtEndSlicerEx"},1083:{n:"BrtBeginSlicer"},1084:{n:"BrtEndSlicer"},1085:{n:"BrtSlicerCachePivotTables"},1086:{n:"BrtBeginSlicerCacheOlapImpl"},1087:{n:"BrtEndSlicerCacheOlapImpl"},1088:{n:"BrtBeginSlicerCacheLevelsData"},1089:{n:"BrtEndSlicerCacheLevelsData"},1090:{n:"BrtBeginSlicerCacheLevelData"},1091:{n:"BrtEndSlicerCacheLevelData"},1092:{n:"BrtBeginSlicerCacheSiRanges"},1093:{n:"BrtEndSlicerCacheSiRanges"},1094:{n:"BrtBeginSlicerCacheSiRange"},1095:{n:"BrtEndSlicerCacheSiRange"},1096:{n:"BrtSlicerCacheOlapItem"},1097:{n:"BrtBeginSlicerCacheSelections"},1098:{n:"BrtSlicerCacheSelection"},1099:{n:"BrtEndSlicerCacheSelections"},1100:{n:"BrtBeginSlicerCacheNative"},1101:{n:"BrtEndSlicerCacheNative"},1102:{n:"BrtSlicerCacheNativeItem"},1103:{n:"BrtRangeProtection14"},1104:{n:"BrtRangeProtectionIso14"},1105:{n:"BrtCellIgnoreEC14"},1111:{n:"BrtList14"},1112:{n:"BrtCFIcon"},1113:{n:"BrtBeginSlicerCachesPivotCacheIDs"},1114:{n:"BrtEndSlicerCachesPivotCacheIDs"},1115:{n:"BrtBeginSlicers"},1116:{n:"BrtEndSlicers"},1117:{n:"BrtWbProp14"},1118:{n:"BrtBeginSXEdit"},1119:{n:"BrtEndSXEdit"},1120:{n:"BrtBeginSXEdits"},1121:{n:"BrtEndSXEdits"},1122:{n:"BrtBeginSXChange"},1123:{n:"BrtEndSXChange"},1124:{n:"BrtBeginSXChanges"},1125:{n:"BrtEndSXChanges"},1126:{n:"BrtSXTupleItems"},1128:{n:"BrtBeginSlicerStyle"},1129:{n:"BrtEndSlicerStyle"},1130:{n:"BrtSlicerStyleElement"},1131:{n:"BrtBeginStyleSheetExt14"},1132:{n:"BrtEndStyleSheetExt14"},1133:{n:"BrtBeginSlicerCachesPivotCacheID"},1134:{n:"BrtEndSlicerCachesPivotCacheID"},1135:{n:"BrtBeginConditionalFormattings"},1136:{n:"BrtEndConditionalFormattings"},1137:{n:"BrtBeginPCDCalcMemExt"},1138:{n:"BrtEndPCDCalcMemExt"},1139:{n:"BrtBeginPCDCalcMemsExt"},1140:{n:"BrtEndPCDCalcMemsExt"},1141:{n:"BrtPCDField14"},1142:{n:"BrtBeginSlicerStyles"},1143:{n:"BrtEndSlicerStyles"},1144:{n:"BrtBeginSlicerStyleElements"},1145:{n:"BrtEndSlicerStyleElements"},1146:{n:"BrtCFRuleExt"},1147:{n:"BrtBeginSXCondFmt14"},1148:{n:"BrtEndSXCondFmt14"},1149:{n:"BrtBeginSXCondFmts14"},1150:{n:"BrtEndSXCondFmts14"},1152:{n:"BrtBeginSortCond14"},1153:{n:"BrtEndSortCond14"},1154:{n:"BrtEndDVals14"},1155:{n:"BrtEndIconSet14"},1156:{n:"BrtEndDatabar14"},1157:{n:"BrtBeginColorScale14"},1158:{n:"BrtEndColorScale14"},1159:{n:"BrtBeginSxrules14"},1160:{n:"BrtEndSxrules14"},1161:{n:"BrtBeginPRule14"},1162:{n:"BrtEndPRule14"},1163:{n:"BrtBeginPRFilters14"},1164:{n:"BrtEndPRFilters14"},1165:{n:"BrtBeginPRFilter14"},1166:{n:"BrtEndPRFilter14"},1167:{n:"BrtBeginPRFItem14"},1168:{n:"BrtEndPRFItem14"},1169:{n:"BrtBeginCellIgnoreECs14"},1170:{n:"BrtEndCellIgnoreECs14"},1171:{n:"BrtDxf14"},1172:{n:"BrtBeginDxF14s"},1173:{n:"BrtEndDxf14s"},1177:{n:"BrtFilter14"},1178:{n:"BrtBeginCustomFilters14"},1180:{n:"BrtCustomFilter14"},1181:{n:"BrtIconFilter14"},1182:{n:"BrtPivotCacheConnectionName"},2048:{n:"BrtBeginDecoupledPivotCacheIDs"},2049:{n:"BrtEndDecoupledPivotCacheIDs"},2050:{n:"BrtDecoupledPivotCacheID"},2051:{n:"BrtBeginPivotTableRefs"},2052:{n:"BrtEndPivotTableRefs"},2053:{n:"BrtPivotTableRef"},2054:{n:"BrtSlicerCacheBookPivotTables"},2055:{n:"BrtBeginSxvcells"},2056:{n:"BrtEndSxvcells"},2057:{n:"BrtBeginSxRow"},2058:{n:"BrtEndSxRow"},2060:{n:"BrtPcdCalcMem15"},2067:{n:"BrtQsi15"},2068:{n:"BrtBeginWebExtensions"},2069:{n:"BrtEndWebExtensions"},2070:{n:"BrtWebExtension"},2071:{n:"BrtAbsPath15"},2072:{n:"BrtBeginPivotTableUISettings"},2073:{n:"BrtEndPivotTableUISettings"},2075:{n:"BrtTableSlicerCacheIDs"},2076:{n:"BrtTableSlicerCacheID"},2077:{n:"BrtBeginTableSlicerCache"},2078:{n:"BrtEndTableSlicerCache"},2079:{n:"BrtSxFilter15"},2080:{n:"BrtBeginTimelineCachePivotCacheIDs"},2081:{n:"BrtEndTimelineCachePivotCacheIDs"},2082:{n:"BrtTimelineCachePivotCacheID"},2083:{n:"BrtBeginTimelineCacheIDs"},2084:{n:"BrtEndTimelineCacheIDs"},2085:{n:"BrtBeginTimelineCacheID"},2086:{n:"BrtEndTimelineCacheID"},2087:{n:"BrtBeginTimelinesEx"},2088:{n:"BrtEndTimelinesEx"},2089:{n:"BrtBeginTimelineEx"},2090:{n:"BrtEndTimelineEx"},2091:{n:"BrtWorkBookPr15"},2092:{n:"BrtPCDH15"},2093:{n:"BrtBeginTimelineStyle"},2094:{n:"BrtEndTimelineStyle"},2095:{n:"BrtTimelineStyleElement"},2096:{n:"BrtBeginTimelineStylesheetExt15"},2097:{n:"BrtEndTimelineStylesheetExt15"},2098:{n:"BrtBeginTimelineStyles"},2099:{n:"BrtEndTimelineStyles"},2100:{n:"BrtBeginTimelineStyleElements"},2101:{n:"BrtEndTimelineStyleElements"},2102:{n:"BrtDxf15"},2103:{n:"BrtBeginDxfs15"},2104:{n:"brtEndDxfs15"},2105:{n:"BrtSlicerCacheHideItemsWithNoData"},2106:{n:"BrtBeginItemUniqueNames"},2107:{n:"BrtEndItemUniqueNames"},2108:{n:"BrtItemUniqueName"},2109:{n:"BrtBeginExtConn15"},2110:{n:"BrtEndExtConn15"},2111:{n:"BrtBeginOledbPr15"},2112:{n:"BrtEndOledbPr15"},2113:{n:"BrtBeginDataFeedPr15"},2114:{n:"BrtEndDataFeedPr15"},2115:{n:"BrtTextPr15"},2116:{n:"BrtRangePr15"},2117:{n:"BrtDbCommand15"},2118:{n:"BrtBeginDbTables15"},2119:{n:"BrtEndDbTables15"},2120:{n:"BrtDbTable15"},2121:{n:"BrtBeginDataModel"},2122:{n:"BrtEndDataModel"},2123:{n:"BrtBeginModelTables"},2124:{n:"BrtEndModelTables"},2125:{n:"BrtModelTable"},2126:{n:"BrtBeginModelRelationships"},2127:{n:"BrtEndModelRelationships"},2128:{n:"BrtModelRelationship"},2129:{n:"BrtBeginECTxtWiz15"},2130:{n:"BrtEndECTxtWiz15"},2131:{n:"BrtBeginECTWFldInfoLst15"},2132:{n:"BrtEndECTWFldInfoLst15"},2133:{n:"BrtBeginECTWFldInfo15"},2134:{n:"BrtFieldListActiveItem"},2135:{n:"BrtPivotCacheIdVersion"},2136:{n:"BrtSXDI15"},2137:{n:"BrtBeginModelTimeGroupings"},2138:{n:"BrtEndModelTimeGroupings"},2139:{n:"BrtBeginModelTimeGrouping"},2140:{n:"BrtEndModelTimeGrouping"},2141:{n:"BrtModelTimeGroupingCalcCol"},3072:{n:"BrtUid"},3073:{n:"BrtRevisionPtr"},5095:{n:"BrtBeginCalcFeatures"},5096:{n:"BrtEndCalcFeatures"},5097:{n:"BrtCalcFeature"},65535:{n:""}},Fn=evert_key(Rn,"n"),On={3:{n:"BIFF2NUM",f:function parse_BIFF2NUM(t){var r=parse_XLSCell(t);++t.l;var n=parse_Xnum(t);return r.t="n",r.val=n,r}},4:{n:"BIFF2STR",f:function parse_BIFF2STR(t,r,n){var a=parse_XLSCell(t);++t.l;var i=parse_XLUnicodeString2(t,0,n);return a.t="str",a.val=i,a}},6:{n:"Formula",f:parse_Formula},9:{n:"BOF",f:parse_BOF},10:{n:"EOF",f:parsenoop2},12:{n:"CalcCount",f:parseuint16},13:{n:"CalcMode",f:parseuint16},14:{n:"CalcPrecision",f:parsebool},15:{n:"CalcRefMode",f:parsebool},16:{n:"CalcDelta",f:parse_Xnum},17:{n:"CalcIter",f:parsebool},18:{n:"Protect",f:parsebool},19:{n:"Password",f:parseuint16},20:{n:"Header",f:vt},21:{n:"Footer",f:vt},23:{n:"ExternSheet",f:parse_ExternSheet},24:{n:"Lbl",f:parse_Lbl},25:{n:"WinProtect",f:parsebool},26:{n:"VerticalPageBreaks"},27:{n:"HorizontalPageBreaks"},28:{n:"Note",f:function parse_Note(t,r,n){return function parse_NoteSh(t,r,n){if(!(n.biff<8)){var a=t.read_shift(2),i=t.read_shift(2),o=t.read_shift(2),l=t.read_shift(2),c=parse_XLUnicodeString2(t,0,n);return n.biff<8&&t.read_shift(1),[{r:a,c:i},c,l,o]}}(t,0,n)}},29:{n:"Selection"},34:{n:"Date1904",f:parsebool},35:{n:"ExternName",f:parse_ExternName},36:{n:"COLWIDTH"},38:{n:"LeftMargin",f:parse_Xnum},39:{n:"RightMargin",f:parse_Xnum},40:{n:"TopMargin",f:parse_Xnum},41:{n:"BottomMargin",f:parse_Xnum},42:{n:"PrintRowCol",f:parsebool},43:{n:"PrintGrid",f:parsebool},47:{n:"FilePass",f:function parse_FilePass(t,r,n){var a={Type:n.biff>=8?t.read_shift(2):0};return a.Type?parse_FilePassHeader(t,r-2,a):function parse_XORObfuscation(t,r,n,a){var i={key:parseuint16(t),verificationBytes:parseuint16(t)};return n.password&&(i.verifier=crypto_CreatePasswordVerifier_Method1(n.password)),a.valid=i.verificationBytes===i.verifier,a.valid&&(a.insitu=crypto_MakeXorDecryptor(n.password)),i}(t,n.biff,n,a),a}},49:{n:"Font",f:function parse_Font(t,r,n){var a={dyHeight:t.read_shift(2),fl:t.read_shift(2)};switch(n&&n.biff||8){case 2:break;case 3:case 4:t.l+=2;break;default:t.l+=10}return a.name=parse_ShortXLUnicodeString(t,0,n),a}},51:{n:"PrintSize",f:parseuint16},60:{n:"Continue"},61:{n:"Window1",f:function parse_Window1(t){return{Pos:[t.read_shift(2),t.read_shift(2)],Dim:[t.read_shift(2),t.read_shift(2)],Flags:t.read_shift(2),CurTab:t.read_shift(2),FirstTab:t.read_shift(2),Selected:t.read_shift(2),TabRatio:t.read_shift(2)}}},64:{n:"Backup",f:parsebool},65:{n:"Pane",f:function parse_Pane(){}},66:{n:"CodePage",f:parseuint16},77:{n:"Pls"},80:{n:"DCon"},81:{n:"DConRef"},82:{n:"DConName"},85:{n:"DefColWidth",f:parseuint16},89:{n:"XCT"},90:{n:"CRN"},91:{n:"FileSharing"},92:{n:"WriteAccess",f:function parse_WriteAccess(t,r,n){if(n.enc)return t.l+=r,"";var a=t.l,i=parse_XLUnicodeString2(t,0,n);return t.read_shift(r+a-t.l),i}},93:{n:"Obj",f:function parse_Obj(t,r,n){if(n&&n.biff<8)return function parse_BIFF5Obj(t,r,n){t.l+=4;var a=t.read_shift(2),i=t.read_shift(2),o=t.read_shift(2);t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=2,t.l+=6,r-=36;var l=[];return l.push((Et[a]||parsenoop)(t,r,n)),{cmo:[i,a,o],ft:l}}(t,r,n);var a=parse_FtCmo(t),i=function parse_FtArray(t,r){for(var n=t.l+r,a=[];t.l7||r[1]>7)throw new Error("Bad Gutters: "+r.join("|"));return r}},129:{n:"WsBool",f:function parse_WsBool(t,r,n){return{fDialog:16&(n&&8==n.biff||2==r?t.read_shift(2):(t.l+=r,0))}}},130:{n:"GridSet",f:parseuint16},131:{n:"HCenter",f:parsebool},132:{n:"VCenter",f:parsebool},133:{n:"BoundSheet8",f:function parse_BoundSheet8(t,r,n){var a=t.read_shift(4),i=3&t.read_shift(1),o=t.read_shift(1);switch(o){case 0:o="Worksheet";break;case 1:o="Macrosheet";break;case 2:o="Chartsheet";break;case 6:o="VBAModule"}var l=parse_ShortXLUnicodeString(t,0,n);return 0===l.length&&(l="Sheet1"),{pos:a,hs:i,dt:o,name:l}}},134:{n:"WriteProtect"},140:{n:"Country",f:function parse_Country(t){var r,n=[0,0];return r=t.read_shift(2),n[0]=Ve[r]||r,r=t.read_shift(2),n[1]=Ve[r]||r,n}},141:{n:"HideObj",f:parseuint16},144:{n:"Sort"},146:{n:"Palette",f:function parse_Palette(t){for(var r=t.read_shift(2),n=[];r-- >0;)n.push(parse_LongRGB(t));return n}},151:{n:"Sync"},152:{n:"LPr"},153:{n:"DxGCol"},154:{n:"FnGroupName"},155:{n:"FilterMode"},156:{n:"BuiltInFnGroupCount",f:parseuint16},157:{n:"AutoFilterInfo"},158:{n:"AutoFilter"},160:{n:"Scl",f:yt},161:{n:"Setup",f:function parse_Setup(t,r){var n={};return r<32||(t.l+=16,n.header=parse_Xnum(t),n.footer=parse_Xnum(t),t.l+=2),n}},174:{n:"ScenMan"},175:{n:"SCENARIO"},176:{n:"SxView"},177:{n:"Sxvd"},178:{n:"SXVI"},180:{n:"SxIvd"},181:{n:"SXLI"},182:{n:"SXPI"},184:{n:"DocRoute"},185:{n:"RecipName"},189:{n:"MulRk",f:function parse_MulRk(t,r){for(var n=t.l+r-2,a=t.read_shift(2),i=t.read_shift(2),o=[];t.l>2&1,6,a.data=function parse_CellStyleXF(t,r,n,a){var i={},o=t.read_shift(4),l=t.read_shift(4),c=t.read_shift(4),f=t.read_shift(2);return i.patternType=Ge[c>>26],a.cellStyles?(i.alc=7&o,i.fWrap=o>>3&1,i.alcV=o>>4&7,i.fJustLast=o>>7&1,i.trot=o>>8&255,i.cIndent=o>>16&15,i.fShrinkToFit=o>>20&1,i.iReadOrder=o>>22&2,i.fAtrNum=o>>26&1,i.fAtrFnt=o>>27&1,i.fAtrAlc=o>>28&1,i.fAtrBdr=o>>29&1,i.fAtrPat=o>>30&1,i.fAtrProt=o>>31&1,i.dgLeft=15&l,i.dgRight=l>>4&15,i.dgTop=l>>8&15,i.dgBottom=l>>12&15,i.icvLeft=l>>16&127,i.icvRight=l>>23&127,i.grbitDiag=l>>30&3,i.icvTop=127&c,i.icvBottom=c>>7&127,i.icvDiag=c>>14&127,i.dgDiag=c>>21&15,i.icvFore=127&f,i.icvBack=f>>7&127,i.fsxButton=f>>14&1,i):i}(t,0,a.fStyle,n),a}},225:{n:"InterfaceHdr",f:function parse_InterfaceHdr(t,r){return 0===r||t.read_shift(2),1200}},226:{n:"InterfaceEnd",f:parsenoop2},227:{n:"SXVS"},229:{n:"MergeCells",f:function parse_MergeCells(t,r){for(var n=[],a=t.read_shift(2);a--;)n.push(parse_Ref8U(t));return n}},233:{n:"BkHim"},235:{n:"MsoDrawingGroup"},236:{n:"MsoDrawing"},237:{n:"MsoDrawingSelection"},239:{n:"PhoneticInfo"},240:{n:"SxRule"},241:{n:"SXEx"},242:{n:"SxFilt"},244:{n:"SxDXF"},245:{n:"SxItm"},246:{n:"SxName"},247:{n:"SxSelect"},248:{n:"SXPair"},249:{n:"SxFmla"},251:{n:"SxFormat"},252:{n:"SST",f:function parse_SST(t,r){for(var n=t.l+r,a=t.read_shift(4),i=t.read_shift(4),o=[],l=0;l!=i&&t.l255)throw new Error("Unexpected SupBook type: "+o);for(var l=parse_XLUnicodeStringNoCch(t,o),c=[];a>t.l;)c.push(parse_XLUnicodeString(t));return[o,i,l,c]}},431:{n:"Prot4Rev",f:parsebool},432:{n:"CondFmt"},433:{n:"CF"},434:{n:"DVal"},437:{n:"DConBin"},438:{n:"TxO",f:function parse_TxO(t,r,n){var a=t.l,i="";try{t.l+=4;var o=(n.lastobj||{cmo:[0,0]}).cmo[1];-1==[0,5,7,11,12,14].indexOf(o)?t.l+=6:function parse_ControlInfo(t){var r=t.read_shift(1);t.l++;var n=t.read_shift(2);return t.l+=2,[r,n]}(t);var l=t.read_shift(2);t.read_shift(2),parseuint16(t);var c=t.read_shift(2);t.l+=c;for(var f=1;f=(h?l:2*l))break}if(i.length!==l&&i.length!==2*l)throw new Error("cchText: "+l+" != "+i.length);return t.l=a+r,{t:i}}catch(n){return t.l=a+r,{t:i}}}},439:{n:"RefreshAll",f:parsebool},440:{n:"HLink",f:function parse_HLink(t,r){var n=parse_Ref8U(t);t.l+=16;var a=function parse_Hyperlink(t,r){var n=t.l+r,a=t.read_shift(4);if(2!==a)throw new Error("Unrecognized streamVersion: "+a);var i=t.read_shift(2);t.l+=2;var o,l,c,f,h,u,d="";16&i&&(o=parse_HyperlinkString(t,t.l)),128&i&&(l=parse_HyperlinkString(t,t.l)),257==(257&i)&&(c=parse_HyperlinkString(t,t.l)),1==(257&i)&&(f=parse_HyperlinkMoniker(t,t.l)),8&i&&(d=parse_HyperlinkString(t,t.l)),32&i&&(h=t.read_shift(16)),64&i&&(u=parse_FILETIME(t)),t.l=n;var _=l||c||f||"";_&&d&&(_+="#"+d),_||(_="#"+d);var m={Target:_};return h&&(m.guid=h),u&&(m.time=u),o&&(m.Tooltip=o),m}(t,r-24);return[n,a]}},441:{n:"Lel"},442:{n:"CodeName",f:parse_XLUnicodeString},443:{n:"SXFDBType"},444:{n:"Prot4RevPass",f:parseuint16},445:{n:"ObNoMacros"},446:{n:"Dv"},448:{n:"Excel9File",f:parsenoop2},449:{n:"RecalcId",f:function parse_RecalcId(t){return t.read_shift(2),t.read_shift(4)},r:2},450:{n:"EntExU2",f:parsenoop2},512:{n:"Dimensions",f:parse_Dimensions},513:{n:"Blank",f:xt},515:{n:"Number",f:function parse_Number(t){var r=parse_XLSCell(t),n=parse_Xnum(t);return r.val=n,r}},516:{n:"Label",f:function parse_Label(t,r,n){t.l;var a=parse_XLSCell(t);2==n.biff&&t.l++;var i=parse_XLUnicodeString(t,t.l,n);return a.val=i,a}},517:{n:"BoolErr",f:parse_BoolErr},518:{n:"Formula",f:parse_Formula},519:{n:"String",f:Bt},520:{n:"Row",f:function parse_Row(t){var r={};r.r=t.read_shift(2),r.c=t.read_shift(2),r.cnt=t.read_shift(2)-r.c;var n=t.read_shift(2);t.l+=4;var a=t.read_shift(1);return t.l+=3,7&a&&(r.level=7&a),32&a&&(r.hidden=!0),64&a&&(r.hpt=n/20),r}},523:{n:"Index"},545:{n:"Array",f:parse_Array},549:{n:"DefaultRowHeight",f:parse_DefaultRowHeight},566:{n:"Table"},574:{n:"Window2",f:function parse_Window2(t,r,n){return n&&n.biff>=2&&n.biff<5?{}:{RTL:64&t.read_shift(2)}}},638:{n:"RK",f:function parse_RK(t){var r=t.read_shift(2),n=t.read_shift(2),a=parse_RkRec(t);return{r,c:n,ixfe:a[0],rknum:a[1]}}},659:{n:"Style"},1030:{n:"Formula",f:parse_Formula},1048:{n:"BigName"},1054:{n:"Format",f:function parse_Format(t,r,n){return[t.read_shift(2),parse_XLUnicodeString2(t,0,n)]}},1084:{n:"ContinueBigName"},1212:{n:"ShrFmla",f:function parse_ShrFmla(t,r,n){var a=parse_RefU(t);t.l++;var i=t.read_shift(1);return[parse_SharedParsedFormula(t,r-=8,n),i,a]}},2048:{n:"HLinkTooltip",f:function parse_HLinkTooltip(t,r){t.read_shift(2);var n=parse_Ref8U(t),a=t.read_shift((r-10)/2,"dbcs-cont");return[n,a=a.replace(g,"")]}},2049:{n:"WebPub"},2050:{n:"QsiSXTag"},2051:{n:"DBQueryExt"},2052:{n:"ExtString"},2053:{n:"TxtQry"},2054:{n:"Qsir"},2055:{n:"Qsif"},2056:{n:"RRDTQSIF"},2057:{n:"BOF",f:parse_BOF},2058:{n:"OleDbConn"},2059:{n:"WOpt"},2060:{n:"SXViewEx"},2061:{n:"SXTH"},2062:{n:"SXPIEx"},2063:{n:"SXVDTEx"},2064:{n:"SXViewEx9"},2066:{n:"ContinueFrt"},2067:{n:"RealTimeData"},2128:{n:"ChartFrtInfo"},2129:{n:"FrtWrapper"},2130:{n:"StartBlock"},2131:{n:"EndBlock"},2132:{n:"StartObject"},2133:{n:"EndObject"},2134:{n:"CatLab"},2135:{n:"YMult"},2136:{n:"SXViewLink"},2137:{n:"PivotChartBits"},2138:{n:"FrtFontList"},2146:{n:"SheetExt"},2147:{n:"BookExt",r:12},2148:{n:"SXAddl"},2149:{n:"CrErr"},2150:{n:"HFPicture"},2151:{n:"FeatHdr",f:parsenoop2},2152:{n:"Feat"},2154:{n:"DataLabExt"},2155:{n:"DataLabExtContents"},2156:{n:"CellWatch"},2161:{n:"FeatHdr11"},2162:{n:"Feature11"},2164:{n:"DropDownObjIds"},2165:{n:"ContinueFrt11"},2166:{n:"DConn"},2167:{n:"List12"},2168:{n:"Feature12"},2169:{n:"CondFmt12"},2170:{n:"CF12"},2171:{n:"CFEx"},2172:{n:"XFCRC",f:function parse_XFCRC(t){t.l+=2;var r={cxfs:0,crc:0};return r.cxfs=t.read_shift(2),r.crc=t.read_shift(4),r},r:12},2173:{n:"XFExt",f:function parse_XFExt(t,r){t.l,t.l+=2;var n=t.read_shift(2);t.l+=2;for(var a=t.read_shift(2),i=[];a-- >0;)i.push(parse_ExtProp(t,t.l));return{ixfe:n,ext:i}},r:12},2174:{n:"AutoFilter12"},2175:{n:"ContinueFrt12"},2180:{n:"MDTInfo"},2181:{n:"MDXStr"},2182:{n:"MDXTuple"},2183:{n:"MDXSet"},2184:{n:"MDXProp"},2185:{n:"MDXKPI"},2186:{n:"MDB"},2187:{n:"PLV"},2188:{n:"Compat12",f:parsebool,r:12},2189:{n:"DXF"},2190:{n:"TableStyles",r:12},2191:{n:"TableStyle"},2192:{n:"TableStyleElement"},2194:{n:"StyleExt"},2195:{n:"NamePublish"},2196:{n:"NameCmt",f:function parse_NameCmt(t,r,n){if(!(n.biff<8)){var a=t.read_shift(2),i=t.read_shift(2);return[parse_XLUnicodeStringNoCch(t,a,n),parse_XLUnicodeStringNoCch(t,i,n)]}t.l+=r},r:12},2197:{n:"SortData"},2198:{n:"Theme",f:function parse_Theme(t,r,n){var a=t.l+r;if(124226!==t.read_shift(4))if(n.cellStyles&&O){var i,o=t.slice(t.l);t.l=a;try{i=new O(o)}catch(t){return}var l=getzipstr(i,"theme/theme/theme1.xml",!0);if(l)return parse_theme_xml(l,n)}else t.l=a},r:12},2199:{n:"GUIDTypeLib"},2200:{n:"FnGrp12"},2201:{n:"NameFnGrp12"},2202:{n:"MTRSettings",f:function parse_MTRSettings(t){return[0!==t.read_shift(4),0!==t.read_shift(4),t.read_shift(4)]},r:12},2203:{n:"CompressPictures",f:parsenoop2},2204:{n:"HeaderFooter"},2205:{n:"CrtLayout12"},2206:{n:"CrtMlFrt"},2207:{n:"CrtMlFrtContinue"},2211:{n:"ForceFullCalculation",f:function parse_ForceFullCalculation(t){var r=function parse_frtHeader(t){var r=t.read_shift(2),n=t.read_shift(2);return t.l+=8,{type:r,flags:n}}(t);if(2211!=r.type)throw new Error("Invalid Future Record "+r.type);return 0!==t.read_shift(4)}},2212:{n:"ShapePropsStream"},2213:{n:"TextPropsStream"},2214:{n:"RichTextStream"},2215:{n:"CrtLayout12A"},4097:{n:"Units"},4098:{n:"Chart"},4099:{n:"Series"},4102:{n:"DataFormat"},4103:{n:"LineFormat"},4105:{n:"MarkerFormat"},4106:{n:"AreaFormat"},4107:{n:"PieFormat"},4108:{n:"AttachedLabel"},4109:{n:"SeriesText"},4116:{n:"ChartFormat"},4117:{n:"Legend"},4118:{n:"SeriesList"},4119:{n:"Bar"},4120:{n:"Line"},4121:{n:"Pie"},4122:{n:"Area"},4123:{n:"Scatter"},4124:{n:"CrtLine"},4125:{n:"Axis"},4126:{n:"Tick"},4127:{n:"ValueRange"},4128:{n:"CatSerRange"},4129:{n:"AxisLine"},4130:{n:"CrtLink"},4132:{n:"DefaultText"},4133:{n:"Text"},4134:{n:"FontX",f:parseuint16},4135:{n:"ObjectLink"},4146:{n:"Frame"},4147:{n:"Begin"},4148:{n:"End"},4149:{n:"PlotArea"},4154:{n:"Chart3d"},4156:{n:"PicF"},4157:{n:"DropBar"},4158:{n:"Radar"},4159:{n:"Surf"},4160:{n:"RadarArea"},4161:{n:"AxisParent"},4163:{n:"LegendException"},4164:{n:"ShtProps",f:function parse_ShtProps(t,r,n){var a={area:!1};if(5!=n.biff)return t.l+=r,a;var i=t.read_shift(1);return t.l+=3,16&i&&(a.area=!0),a}},4165:{n:"SerToCrt"},4166:{n:"AxesUsed"},4168:{n:"SBaseRef"},4170:{n:"SerParent"},4171:{n:"SerAuxTrend"},4174:{n:"IFmtRecord"},4175:{n:"Pos"},4176:{n:"AlRuns"},4177:{n:"BRAI"},4187:{n:"SerAuxErrBar"},4188:{n:"ClrtClient",f:function parse_ClrtClient(t){for(var r=t.read_shift(2),n=[];r-- >0;)n.push(parse_LongRGB(t));return n}},4189:{n:"SerFmt"},4191:{n:"Chart3DBarShape"},4192:{n:"Fbi"},4193:{n:"BopPop"},4194:{n:"AxcExt"},4195:{n:"Dat"},4196:{n:"PlotGrowth"},4197:{n:"SIIndex"},4198:{n:"GelFrame"},4199:{n:"BopPopCustom"},4200:{n:"Fbi2"},0:{n:"Dimensions",f:parse_Dimensions},2:{n:"BIFF2INT",f:function parse_BIFF2INT(t){var r=parse_XLSCell(t);++t.l;var n=t.read_shift(2);return r.t="n",r.val=n,r}},5:{n:"BoolErr",f:parse_BoolErr},7:{n:"String",f:function parse_BIFF2STRING(t){var r=t.read_shift(1);return 0===r?(t.l++,""):t.read_shift(r,"sbcs-cont")}},8:{n:"BIFF2ROW"},11:{n:"Index"},22:{n:"ExternCount",f:parseuint16},30:{n:"BIFF2FORMAT",f:wt},31:{n:"BIFF2FMTCNT"},32:{n:"BIFF2COLINFO"},33:{n:"Array",f:parse_Array},37:{n:"DefaultRowHeight",f:parse_DefaultRowHeight},50:{n:"BIFF2FONTXTRA",f:function parse_BIFF2FONTXTRA(t,r){t.l+=6,t.l+=2,t.l+=1,t.l+=3,t.l+=1,t.l+=r-13}},52:{n:"DDEObjName"},62:{n:"BIFF2WINDOW2"},67:{n:"BIFF2XF"},69:{n:"BIFF2FONTCLR"},86:{n:"BIFF4FMTCNT"},126:{n:"RK"},127:{n:"ImData",f:function parse_ImData(t){var r=t.read_shift(2),n=t.read_shift(2),a=t.read_shift(4),i={fmt:r,env:n,len:a,data:t.slice(t.l,t.l+a)};return t.l+=a,i}},135:{n:"Addin"},136:{n:"Edg"},137:{n:"Pub"},145:{n:"Sub"},148:{n:"LHRecord"},149:{n:"LHNGraph"},150:{n:"Sound"},169:{n:"CoordList"},171:{n:"GCW"},188:{n:"ShrFmla"},191:{n:"ToolbarHdr"},192:{n:"ToolbarEnd"},194:{n:"AddMenu"},195:{n:"DelMenu"},214:{n:"RString",f:function parse_RString(t,r,n){var a=t.l+r,i=parse_XLSCell(t),o=t.read_shift(2),l=parse_XLUnicodeStringNoCch(t,o,n);return t.l=a,i.t="str",i.val=l,i}},223:{n:"UDDesc"},234:{n:"TabIdConf"},354:{n:"XL5Modify"},421:{n:"FileSharing2"},521:{n:"BOF",f:parse_BOF},536:{n:"Lbl",f:parse_Lbl},547:{n:"ExternName",f:parse_ExternName},561:{n:"Font"},579:{n:"BIFF3XF"},1033:{n:"BOF",f:parse_BOF},1091:{n:"BIFF4XF"},2157:{n:"FeatInfo"},2163:{n:"FeatInfo11"},2177:{n:"SXAddl12"},2240:{n:"AutoWebPub"},2241:{n:"ListObj"},2242:{n:"ListField"},2243:{n:"ListDV"},2244:{n:"ListCondFmt"},2245:{n:"ListCF"},2246:{n:"FMQry"},2247:{n:"FMSQry"},2248:{n:"PLV"},2249:{n:"LnExt"},2250:{n:"MkrExt"},2251:{n:"CrtCoopt"},2262:{n:"FRTArchId$",r:12},29282:{}},Dn=evert_key(On,"n");function write_biff_rec(t,r,n,a){var i=+r||+Dn[r];if(!isNaN(i)){var o=a||(n||[]).length||0,l=t.next(4);l.write_shift(2,i),l.write_shift(2,o),o>0&&ye(n)&&t.push(n)}}function write_BIFF2Cell(t,r,n){return t||(t=new_buf(7)),t.write_shift(2,r),t.write_shift(2,n),t.write_shift(2,0),t.write_shift(1,0),t}function write_ws_biff2_cell(t,r,n,a){if(null!=r.v)switch(r.t){case"d":case"n":var i="d"==r.t?datenum(parseDate(r.v)):r.v;return void(i==(0|i)&&i>=0&&i<65536?write_biff_rec(t,2,function write_BIFF2INT(t,r,n){var a=new_buf(9);return write_BIFF2Cell(a,t,r),a.write_shift(2,n),a}(n,a,i)):write_biff_rec(t,3,function write_BIFF2NUM(t,r,n){var a=new_buf(15);return write_BIFF2Cell(a,t,r),a.write_shift(8,n,"f"),a}(n,a,i)));case"b":case"e":return void write_biff_rec(t,5,function write_BIFF2BERR(t,r,n,a){var i=new_buf(9);return write_BIFF2Cell(i,t,r),"e"==a?(i.write_shift(1,n),i.write_shift(1,1)):(i.write_shift(1,n?1:0),i.write_shift(1,0)),i}(n,a,r.v,r.t));case"s":case"str":return void write_biff_rec(t,4,function write_BIFF2LABEL(t,r,n){var a=new_buf(8+2*n.length);return write_BIFF2Cell(a,t,r),a.write_shift(1,n.length),a.write_shift(n.length,n,"sbcs"),a.l255||l.e.r>16383){if(a.WTF)throw new Error("Range "+(r["!ref"]||"A1")+" exceeds format limit A1:IV16384");l.e.c=Math.min(l.e.c,255),l.e.r=Math.min(l.e.c,16383),i=encode_range(l)}for(var h=l.s.r;h<=l.e.r;++h){c=encode_row(h);for(var u=l.s.c;u<=l.e.c;++u){h===l.s.r&&(f[u]=encode_col(u)),i=f[u]+c;var d=o?(r[h]||[])[u]:r[i];d&&write_ws_biff2_cell(t,d,h,u)}}}(a,t.Sheets[t.SheetNames[i]],0,n),write_biff_rec(a,10),a.end()}function write_FONTS_biff8(t,r,n){write_biff_rec(t,"Font",function write_Font(t,r){var n=t.name||"Arial",a=r&&5==r.biff,i=new_buf(a?15+n.length:16+2*n.length);return i.write_shift(2,20*(t.sz||12)),i.write_shift(4,0),i.write_shift(2,400),i.write_shift(4,0),i.write_shift(2,0),i.write_shift(1,n.length),a||i.write_shift(1,1),i.write_shift((a?1:2)*n.length,n,a?"sbcs":"utf16le"),i}({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},n))}function write_ws_biff8_cell(t,r,n,a,i){var o=16+get_cell_style(i.cellXfs,r,i);if(null!=r.v||r.bf)if(r.bf)write_biff_rec(t,"Formula",write_Formula(r,n,a,0,o));else switch(r.t){case"d":case"n":write_biff_rec(t,"Number",function write_Number(t,r,n,a){var i=new_buf(14);return write_XLSCell(t,r,a,i),write_Xnum(n,i),i}(n,a,"d"==r.t?datenum(parseDate(r.v)):r.v,o));break;case"b":case"e":write_biff_rec(t,517,write_BoolErr(n,a,r.v,o,0,r.t));break;case"s":case"str":if(i.bookSST)write_biff_rec(t,"LabelSst",function write_LabelSst(t,r,n,a){var i=new_buf(10);return write_XLSCell(t,r,a,i),i.write_shift(4,n),i}(n,a,get_sst_id(i.Strings,r.v,i.revStrings),o));else write_biff_rec(t,"Label",function write_Label(t,r,n,a,i){var o=!i||8==i.biff,l=new_buf(+o+8+(1+o)*n.length);return write_XLSCell(t,r,a,l),l.write_shift(2,n.length),o&&l.write_shift(1,1),l.write_shift((1+o)*n.length,n,o?"utf16le":"sbcs"),l}(n,a,r.v,o,i));break;default:write_biff_rec(t,"Blank",write_XLSCell(n,a,o))}else write_biff_rec(t,"Blank",write_XLSCell(n,a,o))}function write_ws_biff8(t,r,n){var a,i=buf_array(),o=n.SheetNames[t],l=n.Sheets[o]||{},c=(n||{}).Workbook||{},f=(c.Sheets||[])[t]||{},h=Array.isArray(l),u=8==r.biff,d="",_=[],m=safe_decode_range(l["!ref"]||"A1"),g=u?65536:16384;if(m.e.c>255||m.e.r>=g){if(r.WTF)throw new Error("Range "+(l["!ref"]||"A1")+" exceeds format limit A1:IV16384");m.e.c=Math.min(m.e.c,255),m.e.r=Math.min(m.e.c,g-1)}write_biff_rec(i,2057,write_BOF(0,16,r)),write_biff_rec(i,"CalcMode",writeuint16(1)),write_biff_rec(i,"CalcCount",writeuint16(100)),write_biff_rec(i,"CalcRefMode",writebool(!0)),write_biff_rec(i,"CalcIter",writebool(!1)),write_biff_rec(i,"CalcDelta",write_Xnum(.001)),write_biff_rec(i,"CalcSaveRecalc",writebool(!0)),write_biff_rec(i,"PrintRowCol",writebool(!1)),write_biff_rec(i,"PrintGrid",writebool(!1)),write_biff_rec(i,"GridSet",writeuint16(1)),write_biff_rec(i,"Guts",function write_Guts(t){var r=new_buf(8);return r.write_shift(4,0),r.write_shift(2,t[0]?t[0]+1:0),r.write_shift(2,t[1]?t[1]+1:0),r}([0,0])),write_biff_rec(i,"HCenter",writebool(!1)),write_biff_rec(i,"VCenter",writebool(!1)),write_biff_rec(i,512,function write_Dimensions(t,r){var n=8!=r.biff&&r.biff?2:4,a=new_buf(2*n+6);return a.write_shift(n,t.s.r),a.write_shift(n,t.e.r+1),a.write_shift(2,t.s.c),a.write_shift(2,t.e.c+1),a.write_shift(2,0),a}(m,r)),u&&(l["!links"]=[]);for(var b=m.s.r;b<=m.e.r;++b){d=encode_row(b);for(var w=m.s.c;w<=m.e.c;++w){b===m.s.r&&(_[w]=encode_col(w)),a=_[w]+d;var v=h?(l[b]||[])[w]:l[a];v&&(write_ws_biff8_cell(i,v,b,w,r),u&&v.l&&l["!links"].push([a,v.l]))}}var S=f.CodeName||f.name||o;return u&&write_biff_rec(i,"Window2",function write_Window2(t){var r=new_buf(18),n=1718;return t&&t.RTL&&(n|=64),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,64),r.write_shift(4,0),r.write_shift(4,0),r}((c.Views||[])[0])),u&&(l["!merges"]||[]).length&&write_biff_rec(i,"MergeCells",function write_MergeCells(t){var r=new_buf(2+8*t.length);r.write_shift(2,t.length);for(var n=0;n/g,"")).match(/");var o=t.match(/<\/table/i),l=i.index,c=o&&o.index||t.length,f=function split_regex(t,r,n){if(D||"string"==typeof r)return t.split(r);for(var a=t.split(r),i=[a[0]],o=1;o]*>)/i,""),u=-1,d=0,_=0,m=0,g={s:{r:1e7,c:1e7},e:{r:0,c:0}},b=[];for(l=0;l/i);for(c=0;c"))>-1;)y=y.slice(B+1);for(var C=0;C")));m=T.colspan?+T.colspan:1,((_=+T.rowspan)>1||m>1)&&b.push({s:{r:u,c:d},e:{r:u+(_||1)-1,c:d+m-1}});var A=T.t||"";if(y.length){if(y=se(y),g.s.r>u&&(g.s.r=u),g.e.rd&&(g.s.c=d),g.e.cn||i[h].s.c>l||i[h].e.r1&&(m.rowspan=c),f>1&&(m.colspan=f),m.t=d&&d.t||"z",a.editable&&(_=''+_+""),m.id=(a.id||"sjs")+"-"+u,"z"!=m.t&&(m.v=d.v,null!=d.z&&(m.z=d.z)),o.push(writextag("td",_,m))}}return""+o.join("")+""}function make_html_preamble(t,r,n){return[].join("")+""}var t='SheetJS Table Export',r="";return{to_workbook:function html_to_book(t,r){return sheet_to_workbook(html_to_sheet(t,r),r)},to_sheet:html_to_sheet,_row:make_html_row,BEGIN:t,END:r,_preamble:make_html_preamble,from_sheet:function sheet_to_html(n,a){var i=a||{},o=null!=i.header?i.header:t,l=null!=i.footer?i.footer:r,c=[o],f=decode_range(n["!ref"]);i.dense=Array.isArray(n),c.push(make_html_preamble(0,0,i));for(var h=f.s.r;h<=f.e.r;++h)c.push(make_html_row(n,f,h,i));return c.push("
"+l),c.join("")}}}();function sheet_add_dom(t,r,n){var a=n||{};null!=h&&(a.dense=h);var i=0,o=0;if(null!=a.origin)if("number"==typeof a.origin)i=a.origin;else{var l="string"==typeof a.origin?decode_cell(a.origin):a.origin;i=l.r,o=l.c}var c=r.getElementsByTagName("tr"),f=Math.min(a.sheetRows||1e7,c.length),u={s:{r:0,c:0},e:{r:i,c:o}};if(t["!ref"]){var d=decode_range(t["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),-1==i&&(u.e.r=i=d.e.r+1)}var _=[],m=0,g=t["!rows"]||(t["!rows"]=[]),b=0,v=0,S=0,E=0,x=0,y=0;for(t["!cols"]||(t["!cols"]=[]);b1||y>1)&&_.push({s:{r:v+i,c:E+o},e:{r:v+i+(x||1)-1,c:E+o+(y||1)-1}});var R={t:"s",v:T},F=k.getAttribute("t")||"";null!=T&&(0==T.length?R.t=F||"z":a.raw||0==T.trim().length||"s"==F||("TRUE"===T?R={t:"b",v:!0}:"FALSE"===T?R={t:"b",v:!1}:isNaN(fuzzynum(T))?isNaN(fuzzydate(T).getDate())||(R={t:"d",v:parseDate(T)},a.cellDates||(R={t:"n",v:datenum(R.v)}),R.z=a.dateNF||w._table[14]):R={t:"n",v:fuzzynum(T)})),void 0===R.z&&null!=A&&(R.z=A),a.dense?(t[v+i]||(t[v+i]=[]),t[v+i][E+o]=R):t[encode_cell({c:E+o,r:v+i})]=R,u.e.c=f&&(t["!fullref"]=encode_range((u.e.r=c.length-b+v-1+i,u))),t}function parse_dom_table(t,r){return sheet_add_dom((r||{}).dense?[]:{},t,r)}function is_dom_element_hidden(t){var r="",n=function get_get_computed_style_function(t){return t.ownerDocument.defaultView&&"function"==typeof t.ownerDocument.defaultView.getComputedStyle?t.ownerDocument.defaultView.getComputedStyle:"function"==typeof getComputedStyle?getComputedStyle:null}(t);return n&&(r=n(t).getPropertyValue("display")),r||(r=t.style.display),"none"===r}var Nn,Ln=(Nn={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']},function pcx(t,r){var n=r||{};null!=h&&null==n.dense&&(n.dense=h);var a,i,o,l,c,f,u,d,_=xlml_normalize(t),m=[],g={name:""},b="",w=0,v={},S=[],E=n.dense?[]:{},x={value:""},y="",B=0,C=[],k=-1,T=-1,A={s:{r:1e6,c:1e7},e:{r:0,c:0}},I=0,R={},F=[],O={},D=[],P=1,N=1,L=[],M={Names:[]},U={},z=["",""],X=[],H={},W="",G=0,j=!1,K=!1,Y=0;for(An.lastIndex=0,_=_.replace(//gm,"").replace(//gm,"");c=An.exec(_);)switch(c[3]=c[3].replace(/_.*$/,"")){case"table":case"工作表":"/"===c[1]?(A.e.c>=A.s.c&&A.e.r>=A.s.r?E["!ref"]=encode_range(A):E["!ref"]="A1:A1",n.sheetRows>0&&n.sheetRows<=A.e.r&&(E["!fullref"]=E["!ref"],A.e.r=n.sheetRows-1,E["!ref"]=encode_range(A)),F.length&&(E["!merges"]=F),D.length&&(E["!rows"]=D),o.name=o["名称"]||o.name,"undefined"!=typeof JSON&&JSON.stringify(o),S.push(o.name),v[o.name]=E,K=!1):"/"!==c[0].charAt(c[0].length-2)&&(o=parsexmltag(c[0],!1),k=T=-1,A.s.r=A.s.c=1e7,A.e.r=A.e.c=0,E=n.dense?[]:{},F=[],D=[],K=!0);break;case"table-row-group":"/"===c[1]?--I:++I;break;case"table-row":case"行":if("/"===c[1]){k+=P,P=1;break}if((l=parsexmltag(c[0],!1))["行号"]?k=l["行号"]-1:-1==k&&(k=0),(P=+l["number-rows-repeated"]||1)<10)for(Y=0;Y0&&(D[k+Y]={level:I});T=-1;break;case"covered-table-cell":"/"!==c[1]&&++T,n.sheetStubs&&(n.dense?(E[k]||(E[k]=[]),E[k][T]={t:"z"}):E[encode_cell({r:k,c:T})]={t:"z"}),y="",C=[];break;case"table-cell":case"数据":if("/"===c[0].charAt(c[0].length-2))++T,x=parsexmltag(c[0],!1),N=parseInt(x["number-columns-repeated"]||"1",10),f={t:"z",v:null},x.formula&&0!=n.cellFormula&&(f.f=ods_to_csf_formula(V(x.formula))),"string"==(x["数据类型"]||x["value-type"])&&(f.t="s",f.v=V(x["string-value"]||""),n.dense?(E[k]||(E[k]=[]),E[k][T]=f):E[encode_cell({r:k,c:T})]=f),T+=N-1;else if("/"!==c[1]){N=1;var $=P?k+P-1:k;if(++T>A.e.c&&(A.e.c=T),TA.e.r&&(A.e.r=$),X=[],H={},f={t:(x=parsexmltag(c[0],!1))["数据类型"]||x["value-type"],v:null},n.cellFormula)if(x.formula&&(x.formula=V(x.formula)),x["number-matrix-columns-spanned"]&&x["number-matrix-rows-spanned"]&&(O={s:{r:k,c:T},e:{r:k+(parseInt(x["number-matrix-rows-spanned"],10)||0)-1,c:T+(parseInt(x["number-matrix-columns-spanned"],10)||0)-1}},f.F=encode_range(O),L.push([O,f.F])),x.formula)f.f=ods_to_csf_formula(x.formula);else for(Y=0;Y=L[Y][0].s.r&&k<=L[Y][0].e.r&&T>=L[Y][0].s.c&&T<=L[Y][0].e.c&&(f.F=L[Y][1]);switch((x["number-columns-spanned"]||x["number-rows-spanned"])&&(O={s:{r:k,c:T},e:{r:k+(parseInt(x["number-rows-spanned"],10)||0)-1,c:T+(parseInt(x["number-columns-spanned"],10)||0)-1}},F.push(O)),x["number-columns-repeated"]&&(N=parseInt(x["number-columns-repeated"],10)),f.t){case"boolean":f.t="b",f.v=parsexmlbool(x["boolean-value"]);break;case"float":case"percentage":case"currency":f.t="n",f.v=parseFloat(x.value);break;case"date":f.t="d",f.v=parseDate(x["date-value"]),n.cellDates||(f.t="n",f.v=datenum(f.v)),f.z="m/d/yy";break;case"time":f.t="n",f.v=parse_isodur(x["time-value"])/86400;break;case"number":f.t="n",f.v=parseFloat(x["数据数值"]);break;default:if("string"!==f.t&&"text"!==f.t&&f.t)throw new Error("Unsupported value type "+f.t);f.t="s",null!=x["string-value"]&&(y=V(x["string-value"]),C=[])}}else{if(j=!1,"s"===f.t&&(f.v=y||"",C.length&&(f.R=C),j=0==B),U.Target&&(f.l=U),X.length>0&&(f.c=X,X=[]),y&&!1!==n.cellText&&(f.w=y),j&&(f.t="z",delete f.v),(!j||n.sheetStubs)&&!(n.sheetRows&&n.sheetRows<=k))for(var Z=0;Z0;)E[k+Z][T+N]=dup(f);else for(E[encode_cell({r:k+Z,c:T})]=f;--N>0;)E[encode_cell({r:k+Z,c:T+N})]=dup(f);A.e.c<=T&&(A.e.c=T)}T+=(N=parseInt(x["number-columns-repeated"]||"1",10))-1,N=0,f={},y="",C=[]}U={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if("/"===c[1]){if((a=m.pop())[0]!==c[3])throw"Bad state: "+a}else"/"!==c[0].charAt(c[0].length-2)&&m.push([c[3],!0]);break;case"annotation":if("/"===c[1]){if((a=m.pop())[0]!==c[3])throw"Bad state: "+a;H.t=y,C.length&&(H.R=C),H.a=W,X.push(H)}else"/"!==c[0].charAt(c[0].length-2)&&m.push([c[3],!1]);W="",G=0,y="",B=0,C=[];break;case"creator":"/"===c[1]?W=_.slice(G,c.index):G=c.index+c[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if("/"===c[1]){if((a=m.pop())[0]!==c[3])throw"Bad state: "+a}else"/"!==c[0].charAt(c[0].length-2)&&m.push([c[3],!1]);y="",B=0,C=[];break;case"scientific-number":case"currency-symbol":case"currency-style":case"script":case"libraries":case"automatic-styles":case"default-style":case"page-layout":case"style":case"map":case"font-face":case"paragraph-properties":case"table-properties":case"table-column-properties":case"table-row-properties":case"table-cell-properties":case"fraction":case"boolean-style":case"boolean":case"text-style":case"text-content":case"text-properties":case"embedded-text":case"body":case"电子表格":case"forms":case"table-column":case"table-header-rows":case"table-rows":case"table-column-group":case"table-header-columns":case"table-columns":case"null-date":case"graphic-properties":case"calculation-settings":case"named-expressions":case"label-range":case"label-ranges":case"named-expression":case"sort":case"sort-by":case"sort-groups":case"tab":case"line-break":case"span":case"s":case"date":case"object":case"title":case"标题":case"desc":case"binary-data":case"table-source":case"scenario":case"iteration":case"content-validations":case"content-validation":case"help-message":case"error-message":case"database-ranges":case"filter":case"filter-and":case"filter-or":case"filter-condition":case"list-level-style-bullet":case"list-level-style-number":case"list-level-properties":case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":case"event-listener":case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":case"config-item":case"page-number":case"page-count":case"time":case"cell-range-source":case"detective":case"operation":case"highlighted-range":case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":case"rect":case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":case"properties":case"property":case"table-protection":case"data-pilot-grand-total":case"office-document-common-attrs":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if("/"===c[1]){if(R[g.name]=b,(a=m.pop())[0]!==c[3])throw"Bad state: "+a}else"/"!==c[0].charAt(c[0].length-2)&&(b="",g=parsexmltag(c[0],!1),m.push([c[3],!0]));break;case"number":case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(m[m.length-1][0]){case"time-style":case"date-style":i=parsexmltag(c[0],!1),b+=Nn[c[3]]["long"===i.style?1:0]}break;case"text":if("/>"===c[0].slice(-2))break;if("/"===c[1])switch(m[m.length-1][0]){case"number-style":case"date-style":case"time-style":b+=_.slice(w,c.index)}else w=c.index+c[0].length;break;case"named-range":z=ods_to_csf_3D((i=parsexmltag(c[0],!1))["cell-range-address"]);var J={Name:i.name,Ref:z[0]+"!"+z[1]};K&&(J.Sheet=S.length),M.Names.push(J);break;case"p":case"文本串":if(["master-styles"].indexOf(m[m.length-1][0])>-1)break;if("/"!==c[1]||x&&x["string-value"])parsexmltag(c[0],!1),B=c.index+c[0].length;else{var q=(u=_.slice(B,c.index),d=void 0,d=u.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(//g," ").replace(//g,(function(t,r){return Array(parseInt(r,10)+1).join(" ")})).replace(/]*\/>/g,"\t").replace(//g,"\n"),[V(d.replace(/<[^>]*>/g,""))]);y=(y.length>0?y+"\n":"")+q[0]}break;case"database-range":if("/"===c[1])break;try{v[(z=ods_to_csf_3D(parsexmltag(c[0])["target-range-address"]))[0]]["!autofilter"]={ref:z[1]}}catch(t){}break;case"a":if("/"!==c[1]){if(!(U=parsexmltag(c[0],!1)).href)break;U.Target=U.href,delete U.href,"#"==U.Target.charAt(0)&&U.Target.indexOf(".")>-1&&(z=ods_to_csf_3D(U.Target.slice(1)),U.Target="#"+z[0]+"!"+z[1])}break;default:switch(c[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(n.WTF)throw new Error(c)}}var Q={Sheets:v,SheetNames:S,Workbook:M};return n.bookSheets&&delete Q.Sheets,Q});function parse_ods(t,r){r=r||{};var n=!!safegetzipfile(t,"objectdata");n&&function parse_manifest(t,r){for(var n,a,i=xlml_normalize(t);n=An.exec(i);)switch(n[3]){case"manifest":break;case"file-entry":if("/"==(a=parsexmltag(n[0],!1)).path&&a.type!==at)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(r&&r.WTF)throw n}}(getzipdata(t,"META-INF/manifest.xml"),r);var a=getzipstr(t,"content.xml");if(!a)throw new Error("Missing content.xml in "+(n?"ODS":"UOF")+" file");var i=Ln(n?a:J(a),r);return safegetzipfile(t,"meta.xml")&&(i.Props=parse_core_props(getzipdata(t,"meta.xml"))),i}function parse_fods(t,r){return Ln(t,r)}var Mn=function(){var t="";return function wso(){return P+t}}(),Un=function(){var t=" \n",write_ws=function(r,n,a){var i=[];i.push(' \n');var o=0,l=0,c=decode_range(r["!ref"]),f=r["!merges"]||[],h=0,u=Array.isArray(r);for(o=0;o\n");for(;o<=c.e.r;++o){for(i.push(" \n"),l=0;ll||f[h].s.r>o||f[h].e.c\n");else{var g=encode_cell({r:o,c:l}),b=u?(r[o]||[])[l]:r[g];if(b&&b.f&&(_["table:formula"]=escapexml(csf_to_ods_formula(b.f)),b.F&&b.F.slice(0,g.length)==g)){var w=decode_range(b.F);_["table:number-matrix-columns-spanned"]=w.e.c-w.s.c+1,_["table:number-matrix-rows-spanned"]=w.e.r-w.s.r+1}if(b){switch(b.t){case"b":m=b.v?"TRUE":"FALSE",_["office:value-type"]="boolean",_["office:boolean-value"]=b.v?"true":"false";break;case"n":m=b.w||String(b.v||0),_["office:value-type"]="float",_["office:value"]=b.v||0;break;case"s":case"str":m=null==b.v?"":b.v,_["office:value-type"]="string";break;case"d":m=b.w||parseDate(b.v).toISOString(),_["office:value-type"]="date",_["office:date-value"]=parseDate(b.v).toISOString(),_["table:style-name"]="ce1";break;default:i.push(t);continue}var v=escapexml(m).replace(/ +/g,(function(t){return''})).replace(/\t/g,"").replace(/\n/g,"").replace(/^ /,"").replace(/ $/,"");if(b.l&&b.l.Target){var S=b.l.Target;v=writextag("text:a",v,{"xlink:href":S="#"==S.charAt(0)?"#"+S.slice(1).replace(/\./,"!"):S})}i.push(" "+writextag("table:table-cell",writextag("text:p",v,{}),_)+"\n")}else i.push(t)}}i.push(" \n")}return i.push(" \n"),i.join("")};return function wcx(t,r){var n=[P],a=wxt_helper({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),i=wxt_helper({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==r.bookType?n.push("\n"):n.push("\n"),function(t){t.push(" \n"),t.push(' \n'),t.push(' \n'),t.push(" /\n"),t.push(' \n'),t.push(" /\n"),t.push(" \n"),t.push(" \n"),t.push(' \n'),t.push(' \n'),t.push(" \n"),t.push(' \n'),t.push(" \n")}(n),n.push(" \n"),n.push(" \n");for(var o=0;o!=t.SheetNames.length;++o)n.push(write_ws(t.Sheets[t.SheetNames[o]],t,o));return n.push(" \n"),n.push(" \n"),"fods"==r.bookType?n.push(""):n.push(""),n.join("")}}();function write_ods(t,r){if("fods"==r.bookType)return Un(t,r);var n=zip_new(),a="",i=[],o=[];return zip_add_file(n,a="mimetype","application/vnd.oasis.opendocument.spreadsheet"),zip_add_file(n,a="content.xml",Un(t,r)),i.push([a,"text/xml"]),o.push([a,"ContentFile"]),zip_add_file(n,a="styles.xml",Mn(t,r)),i.push([a,"text/xml"]),o.push([a,"StylesFile"]),zip_add_file(n,a="meta.xml",it()),i.push([a,"text/xml"]),o.push([a,"MetadataFile"]),zip_add_file(n,a="manifest.rdf",function write_rdf(t){var r,n,a=[P];a.push('\n');for(var i=0;i!=t.length;++i)a.push(write_rdf_type(t[i][0],t[i][1])),a.push((r="",n=t[i][0],[' \n',' \n'," \n"].join("")));return a.push(write_rdf_type("","Document","pkg")),a.push(""),a.join("")}(o)),i.push([a,"application/rdf+xml"]),zip_add_file(n,a="META-INF/manifest.xml",function write_manifest(t){var r=[P];r.push('\n'),r.push(' \n');for(var n=0;n\n');return r.push(""),r.join("")}(i)),n}function write_obj_str(t){return function write_str(r,n){var a=function write_sheet_index(t,r){if(!r)return 0;var n=t.SheetNames.indexOf(r);if(-1==n)throw new Error("Sheet not found: "+r);return n}(r,n.sheet);return t.from_sheet(r.Sheets[r.SheetNames[a]],n,r)}}var zn=write_obj_str(Pn),Xn=write_obj_str({from_sheet:sheet_to_csv}),Hn=write_obj_str(void 0!==kt?kt:{}),Wn=write_obj_str(void 0!==Tt?Tt:{}),Vn=write_obj_str(void 0!==It?It:{}),Gn=write_obj_str(void 0!==Kt?Kt:{}),jn=write_obj_str({from_sheet:sheet_to_txt}),Kn=write_obj_str(void 0!==Ct?Ct:{}),Yn=write_obj_str(void 0!==At?At:{});function fix_opts_func(t){return function fix_opts(r){for(var n=0;n!=t.length;++n){var a=t[n];void 0===r[a[0]]&&(r[a[0]]=a[1]),"n"===a[2]&&(r[a[0]]=Number(r[a[0]]))}}}var fix_read_opts=function(t){fix_opts_func([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(t)},$n=fix_opts_func([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]]);function safe_parse_sheet(t,r,n,a,i,o,l,c,f,h,u,d){try{o[a]=parse_rels(getzipstr(t,n,!0),r);var _,m=getzipdata(t,r);switch(c){case"sheet":_=parse_ws(m,r,i,f,o[a],h,u,d);break;case"chart":if(!(_=parse_cs(m,r,i,f,o[a],h))||!_["!drawel"])break;var g=resolve_path(_["!drawel"].Target,r),b=get_rels_path(g),w=function parse_drawing(t,r){if(!t)return"??";var n=(t.match(/]*r:id="([^"]*)"/)||["",""])[1];return r["!id"][n].Target}(getzipstr(t,g,!0),parse_rels(getzipstr(t,b,!0),g)),v=resolve_path(w,g),S=get_rels_path(v);_=parse_chart(getzipstr(t,v,!0),0,0,parse_rels(getzipstr(t,S,!0),v),0,_);break;case"macro":_=function parse_ms(t,r,n,a,i,o,l,c){return r.slice(-4),{"!type":"macro"}}(0,r,0,0,o[a]);break;case"dialog":_=function parse_ds(t,r,n,a,i,o,l,c){return r.slice(-4),{"!type":"dialog"}}(0,r,0,0,o[a]);break;default:throw new Error("Unrecognized sheet type "+c)}l[a]=_;var E=[];o&&o[a]&&keys(o[a]).forEach((function(n){if(o[a][n].Type==tt.CMNT){var i=resolve_path(o[a][n].Target,r);if(!(E=parse_cmnt(getzipdata(t,i,!0),i,f))||!E.length)return;!function sheet_insert_comments(t,r){var n,a=Array.isArray(t);r.forEach((function(r){var i=decode_cell(r.ref);if(a?(t[i.r]||(t[i.r]=[]),n=t[i.r][i.c]):n=t[r.ref],!n){n={t:"z"},a?t[i.r][i.c]=n:t[r.ref]=n;var o=safe_decode_range(t["!ref"]||"BDWGO1000001:A1");o.s.r>i.r&&(o.s.r=i.r),o.e.ri.c&&(o.s.c=i.c),o.e.c0?r.calcchains[0]:"",r.sst=r.strs.length>0?r.strs[0]:"",r.style=r.styles.length>0?r.styles[0]:"",r.defaults=n,delete r.calcchains,r}(getzipstr(t,"[Content_Types].xml")),l=!1;if(0===o.workbooks.length&&getzipdata(t,a="xl/workbook.xml",!0)&&o.workbooks.push(a),0===o.workbooks.length){if(!getzipdata(t,a="xl/workbook.bin",!0))throw new Error("Could not find workbook");o.workbooks.push(a),l=!0}"bin"==o.workbooks[0].slice(-3)&&(l=!0);var c={},f={};if(!r.bookSheets&&!r.bookProps){if(Vr=[],o.sst)try{Vr=parse_sst(getzipdata(t,strip_front_slash(o.sst)),o.sst,r)}catch(t){if(r.WTF)throw t}r.cellStyles&&o.themes.length&&(c=function parse_theme(t,r,n){return parse_theme_xml(t,n)}(getzipstr(t,o.themes[0].replace(/^\//,""),!0)||"",o.themes[0],r)),o.style&&(f=parse_sty(getzipdata(t,strip_front_slash(o.style)),o.style,c,r))}o.links.map((function(n){try{parse_rels(getzipstr(t,get_rels_path(strip_front_slash(n))),n);return parse_xlink(getzipdata(t,strip_front_slash(n)),0,n,r)}catch(t){}}));var h=parse_wb(getzipdata(t,strip_front_slash(o.workbooks[0])),o.workbooks[0],r),u={},d="";o.coreprops.length&&((d=getzipdata(t,strip_front_slash(o.coreprops[0]),!0))&&(u=parse_core_props(d)),0!==o.extprops.length&&(d=getzipdata(t,strip_front_slash(o.extprops[0]),!0))&&function parse_ext_props(t,r,n){var a={};return r||(r={}),t=J(t),ft.forEach((function(n){var i=(t.match(ae(n[0]))||[])[1];switch(n[2]){case"string":i&&(r[n[1]]=V(i));break;case"bool":r[n[1]]="true"===i;break;case"raw":var o=t.match(new RegExp("<"+n[0]+"[^>]*>([\\s\\S]*?)"));o&&o.length>0&&(a[n[1]]=o[1])}})),a.HeadingPairs&&a.TitlesOfParts&&load_props_pairs(a.HeadingPairs,a.TitlesOfParts,r,n),r}(d,u,r));var _={};r.bookSheets&&!r.bookProps||0!==o.custprops.length&&(d=getzipstr(t,strip_front_slash(o.custprops[0]),!0))&&(_=function parse_cust_props(t,r){var n={},a="",i=t.match(ut);if(i)for(var o=0;o!=i.length;++o){var l=i[o],c=parsexmltag(l);switch(c[0]){case"":a=null;break;default:if(0===l.indexOf(""),h=f[0].slice(4),u=f[1];switch(h){case"lpstr":case"bstr":case"lpwstr":case"cy":case"error":n[a]=V(u);break;case"bool":n[a]=parsexmlbool(u);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":n[a]=parseInt(u,10);break;case"r4":case"r8":case"decimal":n[a]=parseFloat(u);break;case"filetime":case"date":n[a]=parseDate(u);break;default:if("/"==h.slice(-1))break;r.WTF&&"undefined"!=typeof console&&console.warn("Unexpected",l,h,f)}}else if("0&&(n=u.SheetNames),r.bookProps&&(m.Props=u,m.Custprops=_),r.bookSheets&&void 0!==n&&(m.SheetNames=n),r.bookSheets?m.SheetNames:r.bookProps))return m;n={};var g={};r.bookDeps&&o.calcchain&&(g=parse_cc(getzipdata(t,strip_front_slash(o.calcchain)),o.calcchain));var b,S,E=0,x={},y=h.Sheets;u.Worksheets=y.length,u.SheetNames=[];for(var B=0;B!=y.length;++B)u.SheetNames[B]=y[B].name;var C=l?"bin":"xml",k=o.workbooks[0].lastIndexOf("/"),T=(o.workbooks[0].slice(0,k+1)+"_rels/"+o.workbooks[0].slice(k+1)+".rels").replace(/^\//,"");safegetzipfile(t,T)||(T="xl/_rels/workbook."+C+".rels");var A=parse_rels(getzipstr(t,T,!0),T);A&&(A=function safe_parse_wbrels(t,r){if(!t)return 0;try{t=r.map((function pwbr(r){return r.id||(r.id=r.strRelID),[r.name,t["!id"][r.id].Target,(n=t["!id"][r.id].Type,tt.WS.indexOf(n)>-1?"sheet":tt.CS&&n==tt.CS?"chart":tt.DS&&n==tt.DS?"dialog":tt.MS&&n==tt.MS?"macro":n&&n.length?n:"sheet")];var n}))}catch(t){return null}return t&&0!==t.length?t:null}(A,h.Sheets));var I=getzipdata(t,"xl/worksheets/sheet.xml",!0)?1:0;e:for(E=0;E!=u.Worksheets;++E){var R="sheet";if(A&&A[E]?(b="xl/"+A[E][1].replace(/[\/]?xl\//,""),safegetzipfile(t,b)||(b=A[E][1]),safegetzipfile(t,b)||(b=T.replace(/_rels\/.*$/,"")+A[E][1]),R=A[E][2]):b=(b="xl/worksheets/sheet"+(E+1-I)+"."+C).replace(/sheet0\./,"sheet."),S=b.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),r&&null!=r.sheets)switch(typeof r.sheets){case"number":if(E!=r.sheets)continue e;break;case"string":if(u.SheetNames[E].toLowerCase()!=r.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(r.sheets)){for(var F=!1,O=0;O!=r.sheets.length;++O)"number"==typeof r.sheets[O]&&r.sheets[O]==E&&(F=1),"string"==typeof r.sheets[O]&&r.sheets[O].toLowerCase()==u.SheetNames[E].toLowerCase()&&(F=1);if(!F)continue e}}safe_parse_sheet(t,b,S,u.SheetNames[E],E,x,n,R,r,h,c,f)}return m={Directory:o,Workbook:h,Props:u,Custprops:_,Deps:g,Sheets:n,SheetNames:u.SheetNames,Strings:Vr,Styles:f,Themes:c,SSF:w.get_table()},r&&r.bookFiles&&(m.keys=i,m.files=t.files),r&&r.bookVBA&&(o.vba.length>0?m.vbaraw=getzipdata(t,strip_front_slash(o.vba[0]),!0):o.defaults&&o.defaults.bin===_r&&(m.vbaraw=getzipdata(t,"xl/vbaProject.bin",!0))),m}function parse_xlsxcfb(t,r){var n=r||{},a="Workbook",i=C.find(t,a);try{if(a="/!DataSpaces/Version",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);if(function parse_DataSpaceVersionInfo(t){var r={};return r.id=t.read_shift(0,"lpp4"),r.R=parse_CRYPTOVersion(t,4),r.U=parse_CRYPTOVersion(t,4),r.W=parse_CRYPTOVersion(t,4),r}(i.content),a="/!DataSpaces/DataSpaceMap",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);var o=function parse_DataSpaceMap(t){var r=[];t.l+=4;for(var n=t.read_shift(4);n-- >0;)r.push(parse_DataSpaceMapEntry(t));return r}(i.content);if(1!==o.length||1!==o[0].comps.length||0!==o[0].comps[0].t||"StrongEncryptionDataSpace"!==o[0].name||"EncryptedPackage"!==o[0].comps[0].v)throw new Error("ECMA-376 Encrypted file bad "+a);if(a="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);var l=function parse_DataSpaceDefinition(t){var r=[];t.l+=4;for(var n=t.read_shift(4);n-- >0;)r.push(t.read_shift(0,"lpp4"));return r}(i.content);if(1!=l.length||"StrongEncryptionTransform"!=l[0])throw new Error("ECMA-376 Encrypted file bad "+a);if(a="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);parse_Primary(i.content)}catch(t){}if(a="/EncryptionInfo",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);var c=function parse_EncryptionInfo(t){var r=parse_CRYPTOVersion(t);switch(r.Minor){case 2:return[r.Minor,parse_EncInfoStd(t)];case 3:return[r.Minor,parse_EncInfoExt()];case 4:return[r.Minor,parse_EncInfoAgl(t)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+r.Minor)}(i.content);if(a="/EncryptedPackage",!(i=C.find(t,a))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+a);if(4==c[0]&&"undefined"!=typeof decrypt_agile)return decrypt_agile(c[1],i.content,n.password||"",n);if(2==c[0]&&"undefined"!=typeof decrypt_std76)return decrypt_std76(c[1],i.content,n.password||"",n);throw new Error("File is password-protected")}function write_zip(t,r){if(ur=1024,"ods"==r.bookType)return write_ods(t,r);t&&!t.SSF&&(t.SSF=w.get_table()),t&&t.SSF&&(v(w),w.load_table(t.SSF),r.revssf=evert_num(t.SSF),r.revssf[t.SSF[65535]]=0,r.ssf=t.SSF),r.rels={},r.wbrels={},r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,jr?r.revStrings=new Map:(r.revStrings={},r.revStrings.foo=[],delete r.revStrings.foo);var n="xlsb"==r.bookType?"bin":"xml",a=mr.indexOf(r.bookType)>-1,i={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],TODO:[],xmlns:""};$n(r=r||{});var o=zip_new(),l="",c=0;if(r.cellXfs=[],get_cell_style(r.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),zip_add_file(o,l="docProps/core.xml",function write_core_props(t,r){var n=r||{},a=[P,ct],i={};if(!t&&!n.Props)return a.join("");t&&(null!=t.CreatedDate&&cp_doit("dcterms:created","string"==typeof t.CreatedDate?t.CreatedDate:write_w3cdtf(t.CreatedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},a,i),null!=t.ModifiedDate&&cp_doit("dcterms:modified","string"==typeof t.ModifiedDate?t.ModifiedDate:write_w3cdtf(t.ModifiedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},a,i));for(var o=0;o!=ot.length;++o){var l=ot[o],c=n.Props&&null!=n.Props[l[1]]?n.Props[l[1]]:t?t[l[1]]:null;!0===c?c="1":!1===c?c="0":"number"==typeof c&&(c=String(c)),null!=c&&cp_doit(l[0],c,null,a,i)}return a.length>2&&(a[a.length]="",a[1]=a[1].replace("/>",">")),a.join("")}(t.Props,r)),i.coreprops.push(l),add_rels(r.rels,2,l,tt.CORE_PROPS),l="docProps/app.xml",t.Props&&t.Props.SheetNames);else if(t.Workbook&&t.Workbook.Sheets){for(var f=[],h=0;hWorksheets")+n("vt:variant",n("vt:i4",String(t.Worksheets))),{size:2,baseType:"variant"})),r[r.length]=n("TitlesOfParts",n("vt:vector",t.SheetNames.map((function(t){return""+escapexml(t)+""})).join(""),{size:t.Worksheets,baseType:"lpstr"})),r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}(t.Props)),i.extprops.push(l),add_rels(r.rels,3,l,tt.EXT_PROPS),t.Custprops!==t.Props&&keys(t.Custprops||{}).length>0&&(zip_add_file(o,l="docProps/custom.xml",write_cust_props(t.Custprops)),i.custprops.push(l),add_rels(r.rels,4,l,tt.CUST_PROPS)),c=1;c<=t.SheetNames.length;++c){var u={"!id":{}},d=t.Sheets[t.SheetNames[c-1]];(d||{})["!type"];if(zip_add_file(o,l="xl/worksheets/sheet"+c+"."+n,write_ws(c-1,l,r,t,u)),i.sheets.push(l),add_rels(r.wbrels,-1,"worksheets/sheet"+c+"."+n,tt.WS[0]),d){var _=d["!comments"],m=!1;if(_&&_.length>0){var g="xl/comments"+c+"."+n;zip_add_file(o,g,write_cmnt(_,g,r)),i.comments.push(g),add_rels(u,-1,"../comments"+c+"."+n,tt.CMNT),m=!0}d["!legacy"]&&m&&zip_add_file(o,"xl/drawings/vmlDrawing"+c+".vml",write_comments_vml(c,d["!comments"])),delete d["!comments"],delete d["!legacy"]}u["!id"].rId1&&zip_add_file(o,get_rels_path(l),write_rels(u))}return null!=r.Strings&&r.Strings.length>0&&(zip_add_file(o,l="xl/sharedStrings."+n,write_sst(r.Strings,l,r)),i.strs.push(l),add_rels(r.wbrels,-1,"sharedStrings."+n,tt.SST)),zip_add_file(o,l="xl/workbook."+n,write_wb(t,l,r)),i.workbooks.push(l),add_rels(r.rels,1,l,tt.WB),zip_add_file(o,l="xl/theme/theme1.xml",write_theme(t.Themes,r)),i.themes.push(l),add_rels(r.wbrels,-1,"theme/theme1.xml",tt.THEME),zip_add_file(o,l="xl/styles."+n,function write_sty(t,r,n){return(".bin"===r.slice(-4)?write_sty_bin:write_sty_xml)(t,n)}(t,l,r)),i.styles.push(l),add_rels(r.wbrels,-1,"styles."+n,tt.STY),t.vbaraw&&a&&(zip_add_file(o,l="xl/vbaProject.bin",t.vbaraw),i.vba.push(l),add_rels(r.wbrels,-1,"vbaProject.bin",tt.VBA)),zip_add_file(o,"[Content_Types].xml",function write_ct(t,r){var n,a=[];a[a.length]=P,a[a.length]=Qe,a=a.concat(et);var f1=function(i){t[i]&&t[i].length>0&&(n=t[i][0],a[a.length]=writextag("Override",null,{PartName:("/"==n[0]?"":"/")+n,ContentType:Je[i][r.bookType||"xlsx"]}))},f2=function(n){(t[n]||[]).forEach((function(t){a[a.length]=writextag("Override",null,{PartName:("/"==t[0]?"":"/")+t,ContentType:Je[n][r.bookType||"xlsx"]})}))},f3=function(r){(t[r]||[]).forEach((function(t){a[a.length]=writextag("Override",null,{PartName:("/"==t[0]?"":"/")+t,ContentType:qe[r][0]})}))};return f1("workbooks"),f2("sheets"),f2("charts"),f3("themes"),["strs","styles"].forEach(f1),["coreprops","extprops","custprops"].forEach(f3),f3("vba"),f3("comments"),f3("drawings"),a.length>2&&(a[a.length]="",a[1]=a[1].replace("/>",">")),a.join("")}(i,r)),zip_add_file(o,"_rels/.rels",write_rels(r.rels)),zip_add_file(o,"xl/_rels/workbook."+n+".rels",write_rels(r.wbrels)),delete r.revssf,delete r.ssf,o}function firstbyte(t,r){var n="";switch((r||{}).type||"base64"){case"buffer":case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":n=u.decode(t.slice(0,12));break;case"binary":n=t;break;default:throw new Error("Unrecognized type "+(r&&r.type||"undefined"))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function read_zip(t,r){var n,a=t,i=r||{};return i.type||(i.type=d&&Buffer.isBuffer(t)?"buffer":"base64"),n=function zip_read(t,r){var n;if(O)switch(r.type){case"base64":n=new O(t,{base64:!0});break;case"binary":case"array":n=new O(t,{base64:!1});break;case"buffer":n=new O(t);break;default:throw new Error("Unrecognized type "+r.type)}else switch(r.type){case"base64":n=C.read(t,{type:"base64"});break;case"binary":n=C.read(t,{type:"binary"});break;case"buffer":case"array":n=C.read(t,{type:"buffer"});break;default:throw new Error("Unrecognized type "+r.type)}return n}(a,i),parse_zip(n,i)}function read_plaintext(t,r){var n=0;e:for(;n=2&&0===n[3])return Rt.to_workbook(a,o);break;case 3:case 131:case 139:case 140:return Ct.to_workbook(a,o);case 123:if(92===n[1]&&114===n[2]&&116===n[3])return Kt.to_workbook(a,o);break;case 10:case 13:case 32:return function read_plaintext_raw(t,r){var n="",a=firstbyte(t,r);switch(r.type){case"base64":n=u.decode(t);break;case"binary":n=t;break;case"buffer":n=t.toString("binary");break;case"array":n=cc2str(t);break;default:throw new Error("Unrecognized type "+r.type)}return 239==a[0]&&187==a[1]&&191==a[2]&&(n=J(n)),read_plaintext(n,r)}(a,o)}return Ct.versions.indexOf(n[0])>-1&&n[2]<=12&&n[3]<=31?Ct.to_workbook(a,o):read_prn(t,a,o,i)}function readFileSync(t,r){var n=r||{};return n.type="file",readSync(t,n)}function write_cfb_ctr(t,r){switch(r.type){case"base64":case"binary":break;case"buffer":case"array":r.type="";break;case"file":return write_dl(r.file,C.write(t,{type:d?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+r.bookType+"' files");default:throw new Error("Unrecognized type "+r.type)}return C.write(t,r)}function write_string_type(t,r,n){n||(n="");var a=n+t;switch(r.type){case"base64":return u.encode(utf8write(a));case"binary":return utf8write(a);case"string":return t;case"file":return write_dl(r.file,a,"utf8");case"buffer":return d?Buffer_from(a,"utf8"):write_string_type(a,{type:"binary"}).split("").map((function(t){return t.charCodeAt(0)}))}throw new Error("Unrecognized type "+r.type)}function write_binary_type(t,r){switch(r.type){case"string":case"base64":case"binary":for(var n="",a=0;a0&&(i=0);var d=encode_row(f.s.r),_=[],m=[],g=0,b=0,w=Array.isArray(t),v=f.s.r,S=0,E=0;for(w&&!t[v]&&(t[v]=[]),S=f.s.c;S<=f.e.c;++S)switch(_[S]=encode_col(S),n=w?t[v][S]:t[_[S]+d],a){case 1:o[S]=S-f.s.c;break;case 2:o[S]=_[S];break;case 3:o[S]=h.header[S-f.s.c];break;default:for(null==n&&(n={w:"__EMPTY",t:"s"}),c=l=format_cell(n,null,h),b=0,E=0;E=0&&(u='"'+u.replace(Zn,'""')+'"'));h.push(u)}return!1===c.blankrows&&f?null:h.join(l)}function sheet_to_csv(t,r){var n=[],a=null==r?{}:r;if(null==t||null==t["!ref"])return"";var i=safe_decode_range(t["!ref"]),o=void 0!==a.FS?a.FS:",",l=o.charCodeAt(0),c=void 0!==a.RS?a.RS:"\n",f=c.charCodeAt(0),h=new RegExp(("|"==o?"\\|":o)+"+$"),u="",d=[];a.dense=Array.isArray(t);for(var _=a.skipHidden&&t["!cols"]||[],m=a.skipHidden&&t["!rows"]||[],g=i.s.c;g<=i.e.c;++g)(_[g]||{}).hidden||(d[g]=encode_col(g));for(var b=i.s.r;b<=i.e.r;++b)(m[b]||{}).hidden||null!=(u=make_csv_row(t,i,b,d,l,f,o,a))&&(a.strip&&(u=u.replace(h,"")),n.push(u+c));return delete a.dense,n.join("")}function sheet_to_txt(t,r){r||(r={}),r.FS="\t",r.RS="\n";var n=sheet_to_csv(t,r);if("undefined"==typeof cptable||"string"==r.type)return n;var a=cptable.utils.encode(1200,n,"str");return String.fromCharCode(255)+String.fromCharCode(254)+a}function sheet_to_formulae(t){var r,n="",a="";if(null==t||null==t["!ref"])return[];var i,o=safe_decode_range(t["!ref"]),l="",c=[],f=[],h=Array.isArray(t);for(i=o.s.c;i<=o.e.c;++i)c[i]=encode_col(i);for(var u=o.s.r;u<=o.e.r;++u)for(l=encode_row(u),i=o.s.c;i<=o.e.c;++i)if(n=c[i]+l,a="",void 0!==(r=h?(t[u]||[])[i]:t[n])){if(null!=r.F){if(n=r.F,!r.f)continue;a=r.f,-1==n.indexOf(":")&&(n=n+":"+n)}if(null!=r.f)a=r.f;else{if("z"==r.t)continue;if("n"==r.t&&null!=r.v)a=""+r.v;else if("b"==r.t)a=r.v?"TRUE":"FALSE";else if(void 0!==r.w)a="'"+r.w;else{if(void 0===r.v)continue;a="s"==r.t?"'"+r.v:""+r.v}}f[f.length]=n+"="+a}return f}function sheet_add_json(t,r,n){var a,i=n||{},o=+!i.skipHeader,l=t||{},c=0,f=0;if(l&&null!=i.origin)if("number"==typeof i.origin)c=i.origin;else{var h="string"==typeof i.origin?decode_cell(i.origin):i.origin;c=h.r,f=h.c}var u={s:{c:0,r:0},e:{c:f,r:c+r.length-1+o}};if(l["!ref"]){var d=safe_decode_range(l["!ref"]);u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),-1==c&&(c=d.e.r+1,u.e.r=c+r.length-1+o)}else-1==c&&(c=0,u.e.r=r.length-1+o);var _=i.header||[],m=0;r.forEach((function(t,r){keys(t).forEach((function(n){-1==(m=_.indexOf(n))&&(_[m=_.length]=n);var h=t[n],u="z",d="",g=encode_cell({c:f+m,r:c+r+o});a=qn.sheet_get_cell(l,g),!h||"object"!=typeof h||h instanceof Date?("number"==typeof h?u="n":"boolean"==typeof h?u="b":"string"==typeof h?u="s":h instanceof Date&&(u="d",i.cellDates||(u="n",h=datenum(h)),d=i.dateNF||w._table[14]),a?(a.t=u,a.v=h,delete a.w,delete a.R,d&&(a.z=d)):l[g]=a={t:u,v:h},d&&(a.z=d)):l[g]=h}))})),u.e.c=Math.max(u.e.c,f+_.length-1);var g=encode_row(c);if(o)for(m=0;m<_.length;++m)l[encode_col(m+f)+g]={t:"s",v:_[m]};return l["!ref"]=encode_range(u),l}var Jn,qn={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell:function split_cell(t){return t.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")},decode_cell,decode_range,format_cell,get_formulae:sheet_to_formulae,make_csv:sheet_to_csv,make_json:sheet_to_json,make_formulae:sheet_to_formulae,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet:function json_to_sheet(t,r){return sheet_add_json(null,t,r)},table_to_sheet:parse_dom_table,table_to_book:function table_to_book(t,r){return sheet_to_workbook(parse_dom_table(t,r),r)},sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html:Pn.from_sheet,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json};!function(t){function get_default(t,r,n){return null!=t[r]?t[r]:t[r]=n}function ws_get_cell_stub(t,r,n){if("string"==typeof r){if(Array.isArray(t)){var a=decode_cell(r);return t[a.r]||(t[a.r]=[]),t[a.r][a.c]||(t[a.r][a.c]={t:"z"})}return t[r]||(t[r]={t:"z"})}return ws_get_cell_stub(t,encode_cell("number"!=typeof r?r:{r,c:n||0}))}t.consts=t.consts||{},t.sheet_get_cell=ws_get_cell_stub,t.book_new=function(){return{SheetNames:[],Sheets:{}}},t.book_append_sheet=function(t,r,n){if(!n)for(var a=1;a<=65535&&-1!=t.SheetNames.indexOf(n="Sheet"+a);++a,n=void 0);if(!n||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(check_ws_name(n),t.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");t.SheetNames.push(n),t.Sheets[n]=r},t.book_set_sheet_visibility=function(t,r,n){get_default(t,"Workbook",{}),get_default(t.Workbook,"Sheets",[]);var a=function wb_sheet_idx(t,r){if("number"==typeof r){if(r>=0&&t.SheetNames.length>r)return r;throw new Error("Cannot find sheet # "+r)}if("string"==typeof r){var n=t.SheetNames.indexOf(r);if(n>-1)return n;throw new Error("Cannot find sheet name |"+r+"|")}throw new Error("Cannot find sheet |"+r+"|")}(t,r);switch(get_default(t.Workbook.Sheets,a,{}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}t.Workbook.Sheets[a].Hidden=n},function add_consts(r){r.forEach((function(r){t.consts[r[0]]=r[1]}))}([["SHEET_VISIBLE",0],["SHEET_HIDDEN",1],["SHEET_VERY_HIDDEN",2]]),t.cell_set_number_format=function(t,r){return t.z=r,t},t.cell_set_hyperlink=function(t,r,n){return r?(t.l={Target:r},n&&(t.l.Tooltip=n)):delete t.l,t},t.cell_set_internal_link=function(r,n,a){return t.cell_set_hyperlink(r,"#"+n,a)},t.cell_add_comment=function(t,r,n){t.c||(t.c=[]),t.c.push({t:r,a:n||"SheetJS"})},t.sheet_set_array_formula=function(t,r,n){for(var a="string"!=typeof r?r:safe_decode_range(r),i="string"==typeof r?r:encode_range(r),o=a.s.r;o<=a.e.r;++o)for(var l=a.s.c;l<=a.e.c;++l){var c=ws_get_cell_stub(t,o,l);c.t="n",c.F=i,delete c.v,o==a.s.r&&l==a.s.c&&(c.f=n)}return t}}(qn),d&&"undefined"!=typeof require&&(Jn={}.Readable,t.stream={to_json:function(t,r){var n=Jn({objectMode:!0});if(null==t||null==t["!ref"])return n.push(null),n;var a={t:"n",v:0},i=0,o=1,l=[],c=0,f="",h={s:{r:0,c:0},e:{r:0,c:0}},u=r||{},d=null!=u.range?u.range:t["!ref"];switch(1===u.header?i=1:"A"===u.header?i=2:Array.isArray(u.header)&&(i=3),typeof d){case"string":h=safe_decode_range(d);break;case"number":(h=safe_decode_range(t["!ref"])).s.r=d;break;default:h=d}i>0&&(o=0);var _=encode_row(h.s.r),m=[],g=0,b=Array.isArray(t),w=h.s.r,v=0,S=0;for(b&&!t[w]&&(t[w]=[]),v=h.s.c;v<=h.e.c;++v)switch(m[v]=encode_col(v),a=b?t[w][v]:t[m[v]+_],i){case 1:l[v]=v-h.s.c;break;case 2:l[v]=m[v];break;case 3:l[v]=u.header[v-h.s.c];break;default:for(null==a&&(a={w:"__EMPTY",t:"s"}),f=c=format_cell(a,null,u),g=0,S=0;Sh.e.r)return n.push(null);for(;w<=h.e.r;){var r=make_json_row(t,h,w,m,i,l,b,u);if(++w,!1===r.isempty||(1===i?!1!==u.blankrows:u.blankrows)){n.push(r.row);break}}},n},to_html:function(t,r){var n=Jn(),a=r||{},i=null!=a.header?a.header:Pn.BEGIN,o=null!=a.footer?a.footer:Pn.END;n.push(i);var l=decode_range(t["!ref"]);a.dense=Array.isArray(t),n.push(Pn._preamble(t,l,a));var c=l.s.r,f=!1;return n._read=function(){if(c>l.e.r)return f||(f=!0,n.push(""+o)),n.push(null);for(;c<=l.e.r;){n.push(Pn._row(t,l,c,a)),++c;break}},n},to_csv:function(t,r){var n=Jn(),a=null==r?{}:r;if(null==t||null==t["!ref"])return n.push(null),n;var i=safe_decode_range(t["!ref"]),o=void 0!==a.FS?a.FS:",",l=o.charCodeAt(0),c=void 0!==a.RS?a.RS:"\n",f=c.charCodeAt(0),h=new RegExp(("|"==o?"\\|":o)+"+$"),u="",d=[];a.dense=Array.isArray(t);for(var _=a.skipHidden&&t["!cols"]||[],m=a.skipHidden&&t["!rows"]||[],g=i.s.c;g<=i.e.c;++g)(_[g]||{}).hidden||(d[g]=encode_col(g));var b=i.s.r,w=!1;return n._read=function(){if(!w)return w=!0,n.push("\ufeff");for(;b<=i.e.r;)if(++b,!(m[b-1]||{}).hidden&&null!=(u=make_csv_row(t,i,b-1,d,l,f,o,a))){a.strip&&(u=u.replace(h,"")),n.push(u+c);break}return b>i.e.r?n.push(null):void 0},n}}),t.parse_xlscfb=parse_xlscfb,t.parse_zip=parse_zip,t.read=readSync,t.readFile=readFileSync,t.readFileSync=readFileSync,t.write=writeSync,t.writeFile=writeFileSync,t.writeFileSync=writeFileSync,t.writeFileAsync=function writeFileAsync(t,r,n,a){var i=n||{};i.type="file",i.file=t,resolve_book_type(i),i.type="buffer";var o=a;return o instanceof Function||(o=n),B.writeFile(t,writeSync(r,i),o)},t.utils=qn,t.SSF=w,void 0!==C&&(t.CFB=C)}"undefined"!=typeof exports?make_xlsx_lib(exports):"undefined"!=typeof module&&module.exports?make_xlsx_lib(module.exports):"function"==typeof define&&define.amd?define((function(){return c.version||make_xlsx_lib(c),c})):make_xlsx_lib(c); \ No newline at end of file +var t,r,n,a;Object.keys||(Object.keys=(t=Object.prototype.hasOwnProperty,r=!{toString:null}.propertyIsEnumerable("toString"),a=(n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(i){if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Object.keys called on non-object");var o=[];for(var l in i)t.call(i,l)&&o.push(l);if(r)for(var c=0;c=0;--r)if(!t.charAt(r).match(/^\s/))return t.slice(0,r+1);return""}),Array.prototype.forEach||(Array.prototype.forEach=function(t){for(var r=this.length>>>0,n=arguments[1]||void 0,a=0;a>>0,n=arguments[1]||void 0,a=new Array(r),i=0;i>>0,n=0|arguments[1]||0;for(n<0&&(n+=r)<0&&(n=0);n>>0)-1;r>=0;--r)if(this[r]===t)return r;return-1}),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Date.prototype.toISOString||(Date.prototype.toISOString=function(){function p(t,r){return("0000000"+t).slice(-(r||2))}return function _toISOString(){var t=this.getUTCFullYear();return[t>9999?"+"+p(t,6):t<0?"-"+p(-t,6):p(t,4),p(this.getUTCMonth()+1),p(this.getUTCDate())].join("-")+"T"+[p(this.getUTCHours()),p(this.getUTCMinutes()),p(this.getUTCSeconds())].join(":")+"."+p(this.getUTCMilliseconds(),3)+"Z"}}()),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(t,r){if(null==t&&(t=0),t<0&&(t+=this.byteLength)<0&&(t=0),t>=this.byteLength)return new Uint8Array(0);if(null==r&&(r=this.byteLength),r<0&&(r+=this.byteLength)<0&&(r=0),r>this.byteLength&&(r=this.byteLength),t>r)return new Uint8Array(0);var n=new ArrayBuffer(r-t),a=new Uint8Array(n),i=new Uint8Array(this,t,r-t);if(a.set)a.set(i);else for(;t<=--r;)a[r-t]=i[r];return n}),"undefined"==typeof Uint8Array||Uint8Array.prototype.slice||(Uint8Array.prototype.slice=function(t,r){if(null==t&&(t=0),t<0&&(t+=this.length)<0&&(t=0),t>=this.length)return new Uint8Array(0);if(null==r&&(r=this.length),r<0&&(r+=this.length)<0&&(r=0),r>this.length&&(r=this.length),t>r)return new Uint8Array(0);for(var n=new Uint8Array(r-t);t<=--r;)n[r-t]=this[r];return n});var i=function(){try{if("undefined"==typeof IE_SaveFile_Impl&&document.write(['\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (\n this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n );\n }\n\n private __instanceProperties?: PropertyValues = undefined;\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n (options as Mutable).attribute = false;\n }\n this.__prepare();\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get(this: ReactiveElement) {\n return this[key as keyof typeof this];\n },\n set(this: ReactiveElement, v: unknown) {\n (this as unknown as Record)[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`\n );\n }\n issueWarning(\n 'reactive-property-without-getter',\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`\n );\n }\n return {\n get(this: ReactiveElement) {\n return get?.call(this);\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = get?.call(this);\n set!.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n\n // Temporary, until google3 is on TypeScript 5.2\n declare static [Symbol.metadata]: object & Record;\n\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n private static __prepare() {\n if (\n this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n ) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ] as Array;\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n\n this.elementStyles = this.finalizeStyles(this.styles);\n\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning(\n 'no-override-create-property',\n 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning(\n 'no-override-get-property-descriptor',\n 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n }\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | DocumentFragment;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Properties that should be reflected when updated.\n */\n private __reflectingProperties?: Set;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: Set;\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n // This enqueues a microtask that ust run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n this.__controllers?.delete(controller);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n const instanceProperties = new Map();\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n for (const p of elementProperties.keys() as IterableIterator) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(name: PropertyKey, value: unknown) {\n const elemProperties: PropertyDeclarationMap = (\n this.constructor as typeof ReactiveElement\n ).elementProperties;\n const options = elemProperties.get(name)!;\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'migration'\n ) &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @param initial whether this call is for the initial value of the property.\n * Initial values do not reflect to an attribute.\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void;\n /* @internal */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration,\n initial = false,\n initialValue?: unknown\n ): void {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n options ??= (\n this.constructor as typeof ReactiveElement\n ).getPropertyOptions(name);\n const hasChanged = options.hasChanged ?? notEqual;\n const newValue = initial ? initialValue : this[name as keyof this];\n if (hasChanged(newValue, oldValue)) {\n this._$changeProperty(name, oldValue, options);\n } else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n\n /**\n * @internal\n */\n _$changeProperty(\n name: PropertyKey,\n oldValue: unknown,\n options: PropertyDeclaration\n ) {\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set()).add(name);\n }\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise {\n const result = this.performUpdate();\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'async-perform-update'\n ) &&\n typeof (result as unknown as Promise | undefined)?.then ===\n 'function'\n ) {\n issueWarning(\n 'async-perform-update',\n `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`\n );\n }\n return result;\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n protected performUpdate(): void {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor as typeof ReactiveElement;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n );\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p as keyof this] = value as this[keyof this];\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // changedProperties map, but only for the case of experimental\n // decorators on accessors, which will not have already populated the\n // changedProperties map. We can't know if these accessors had\n // initializers, so we just set them anyway - a difference from\n // experimental decorators on fields and standard decorators on\n // auto-accessors.\n // For context why experimentalDecorators with auto accessors are handled\n // specifically also see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n if (\n options.wrapped === true &&\n !this._$changedProperties.has(p) &&\n this[p as keyof this] !== undefined\n ) {\n this._$changeProperty(p, this[p as keyof this], options);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'change-in-update'\n )\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n // The forEach() expression will only run when when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n this.__propertyToAttribute(p, this[p as keyof this])\n ) as undefined;\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings!.includes(warning)) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.2');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n"],"names":["is","defineProperty","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","Object","global","globalThis","trustedTypes","emptyStringForBooleanAttribute","emptyScript","polyfillSupport","reactiveElementPolyfillSupport","JSCompiler_renameProperty","prop","_obj","defaultConverter","toAttribute","value","type","Boolean","Array","JSON","stringify","fromAttribute","fromValue","Number","parse","e","notEqual","old","defaultPropertyDeclaration","attribute","String","converter","reflect","hasChanged","Symbol","metadata","litPropertyMetadata","WeakMap","ReactiveElement","HTMLElement","addInitializer","initializer","this","__prepare","_initializers","push","observedAttributes","finalize","__attributeToPropertyMap","keys","createProperty","name","options","state","elementProperties","set","noAccessor","key","descriptor","getPropertyDescriptor","undefined","prototype","get","v","call","oldValue","requestUpdate","configurable","enumerable","getPropertyOptions","hasOwnProperty","superCtor","Map","finalized","props","properties","propKeys","p","attr","__attributeNameForProperty","elementStyles","finalizeStyles","styles","isArray","Set","flat","Infinity","reverse","s","unshift","getCompatibleStyle","toLowerCase","constructor","super","__instanceProperties","isUpdatePending","hasUpdated","__reflectingProperty","__initialize","__updatePromise","Promise","res","enableUpdating","_$changedProperties","__saveInstanceProperties","forEach","i","addController","controller","__controllers","add","renderRoot","isConnected","hostConnected","removeController","delete","instanceProperties","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","adoptStyles","connectedCallback","c","_requestedUpdate","disconnectedCallback","hostDisconnected","attributeChangedCallback","_old","_$attributeToProperty","__propertyToAttribute","attrValue","removeAttribute","setAttribute","ctor","propName","initial","initialValue","_$changeProperty","__enqueueUpdate","has","__reflectingProperties","reject","result","scheduleUpdate","performUpdate","wrapped","shouldUpdate","changedProperties","willUpdate","hostUpdate","update","__markUpdated","_$didUpdate","_changedProperties","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","reactiveElementVersions"],"mappings":";;;;;GA4CA,MAAMA,GACJA,EAAEC,eACFA,EAAcC,yBACdA,EAAwBC,oBACxBA,EAAmBC,sBACnBA,EAAqBC,eACrBA,GACEC,OAKEC,EAASC,WAUTC,EAAgBF,EACnBE,aAMGC,EAAiCD,EAClCA,EAAaE,YAC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,CAAaF,GAAsC,EApgCtDrH,EAAa0C,cAA6B,GA6S1C1C,EAAAmF,kBAAoC,CAACwC,KAAM,QA4tBnD3H,EACC5B,EAA0B,sBACxB,IAAI8D,IACPlC,EACC5B,EAA0B,cACxB,IAAI8D,IAGRhE,IAAkB,CAAC8B,qBAuClBnC,EAAO+J,0BAA4B,IAAIrH,KAAK"} \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-collapse/lib/a11y-collapse-group.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-collapse/lib/a11y-collapse-group.js index c02bdd1ae1..c6901639ac 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-collapse/lib/a11y-collapse-group.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-collapse/lib/a11y-collapse-group.js @@ -16,4 +16,4 @@ import{LitElement as t,html as e,css as i}from"../../../lit/index.js";import{A11 --a11y-collapse-margin: 0 0; --a11y-collapse-border-between: none; } - `]}render(){return e`

`}constructor(){super(),this.globalOptions={},this.radio=!1,this.__items=[],this.addEventListener("a11y-collapse-attached",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this._attachItem(t.detail)})),this.addEventListener("a11y-collapse-detached",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this._detachItem(t.detail)})),this.addEventListener("a11y-collapse-click",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this.radioToggle(t.detail)})),this.addEventListener("toggle",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this.radioToggle(t.detail)}))}static get tag(){return"a11y-collapse-group"}static get properties(){return{...super.properties,...s.properties,globalOptions:{type:Object,attribute:"global-options",reflect:!0},radio:{type:Boolean,attribute:"radio"},__items:{type:Array}}}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}get items(){return this.__items}_attachItem(t){this.__items.push(t),Object.keys(A11yCollapseGroup.properties||{}).forEach((e=>this._updateItem(t,e)))}updated(t){t.forEach(((t,e)=>{this.__items.forEach((i=>this._updateItem(i,e,t)))}))}_updateItem(t,e,i=void 0){if("globalOptions"===e||"__items"===e){if(this.globalOptions!=={})for(let e in this.globalOptions)this.globalOptions.hasOwnProperty(e)&&(t[e]=this.globalOptions[e])}else"radio"===e&&this.radio?t.expanded=!1:null===this[e]&&void 0===this[e]||(t[e]=this[e])}_detachItem(t){if(this.__items&&t)for(let e=0;e `}constructor(){super(),this.globalOptions={},this.radio=!1,this.__items=[],this.addEventListener("a11y-collapse-attached",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this._attachItem(t.detail)})),this.addEventListener("a11y-collapse-detached",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this._detachItem(t.detail)})),this.addEventListener("a11y-collapse-click",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this.radioToggle(t.detail)})),this.addEventListener("toggle",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),this.radioToggle(t.detail)}))}static get tag(){return"a11y-collapse-group"}static get properties(){return{...super.properties,...s.properties,globalOptions:{type:Object,attribute:"global-options",reflect:!0},radio:{type:Boolean,attribute:"radio"},__items:{type:Array}}}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}get items(){return this.__items}_attachItem(t){this.__items.push(t),Object.keys(A11yCollapseGroup.properties||{}).forEach((e=>this._updateItem(t,e)))}updated(t){t.forEach(((t,e)=>{this.__items.forEach((i=>this._updateItem(i,e,t)))}))}_updateItem(t,e,i=void 0){if("globalOptions"===e||"__items"===e){if(this.globalOptions!={})for(let e in this.globalOptions)this.globalOptions.hasOwnProperty(e)&&(t[e]=this.globalOptions[e])}else"radio"===e&&this.radio?t.expanded=!1:null===this[e]&&void 0===this[e]||(t[e]=this[e])}_detachItem(t){if(this.__items&&t)for(let e=0;e -
`}static get properties(){return{...super.properties,__playerReady:{type:Boolean},allowConcurrent:{attribute:"allow-concurrent",type:Boolean},audioOnly:{attribute:"audio-only",type:Boolean,reflect:!0},autoplay:{attribute:"autoplay",type:Boolean},captionsTrack:{attribute:"captions-track",type:Object},cc:{attribute:"cc",type:Boolean},currentTime:{type:Number},crossorigin:{attribute:"crossorigin",type:String},disablePrintButton:{attribute:"disable-print-button",type:Boolean},disableSearch:{attribute:"disable-search",type:Boolean},disableScroll:{attribute:"disable-scroll",type:Boolean},disableSeek:{attribute:"disable-seek",type:Boolean},darkTranscript:{attribute:"dark-transcript",type:Boolean},disableFullscreen:{attribute:"disable-fullscreen",type:Boolean},disableInteractive:{attribute:"disable-interactive",type:Boolean},height:{attribute:"height",type:String},hideElapsedTime:{attribute:"hide-elapsed-time",type:Boolean},hideTimestamps:{attribute:"hide-timestamps",type:Boolean},hideTranscript:{attribute:"hide-transcript",type:Boolean,reflect:!0},id:{attribute:"id",type:String,reflect:!0},lang:{attribute:"lang",type:String},learningMode:{attribute:"learning-mode",type:Boolean},linkable:{attribute:"linkable",type:Boolean},localization:{attribute:"localization",type:Object},loop:{attribute:"loop",type:Boolean},mediaLang:{attribute:"media-lang",type:String},mediaTitle:{attribute:"media-title",type:String},muted:{attribute:"muted",type:Boolean},hideYoutubeLink:{type:Boolean,attribute:"hide-youtube-link"},playbackRate:{attribute:"playback-rate",type:Number},preload:{attribute:"preload",type:String,reflect:!0},responsiveSize:{attribute:"responsive-size",type:String,reflect:!0},search:{attribute:"search",type:Object},standAlone:{attribute:"stand-alone",type:Boolean,reflect:!0},source:{type:String,reflect:!0},sources:{attribute:"sources",type:Array},stackedLayout:{attribute:"stacked-layout",type:Boolean},sticky:{attribute:"sticky",type:Boolean,reflect:!0},stickyCorner:{attribute:"sticky-corner",type:String,reflect:!0},thumbnailSrc:{attribute:"thumbnail-src",type:String,reflect:!0},tracks:{attribute:"tracks",type:Array},transcriptTrack:{attribute:"transcript-track",type:Object},volume:{attribute:"volume",type:Number},width:{attribute:"width",type:String},youtubeId:{attribute:"youtube-id",reflect:!0,type:String},__currentTime:{type:Number},__captionsOption:{type:Number},__cues:{type:Array},__loadedTracks:{type:Object},__playing:{type:Boolean},__preloadedDuration:{type:Number},__settingsOpen:{type:Boolean},__transcriptOption:{type:Number}}}static get tag(){return"a11y-media-player"}constructor(){super(),window.ResponsiveUtility.requestAvailability(),window.A11yMediaStateManager.requestAvailability(),this.__playerReady=!1,this.audioOnly=!1,this.autoplay=!1,this.allowConcurrent=!1,this.cc=!1,this.darkTranscript=!1,this.disableFullscreen=!1,this.disableInteractive=!1,this.disablePrintButton=!1,this.disableSearch=!1,this.disableScroll=!1,this.disableSeek=!1,this.hideElapsedTime=!1,this.hideTimestamps=!1,this.hideTranscript=!1,this.id=null,this.lang="en",this.learningMode=!1,this.linkable=!1,this.localization={},this.loop=!1,this.mediaTitle="",this.mediaLang="en",this.muted=!1,this.hideYoutubeLink=!1,this.preload="metadata",this.playbackRate=1,this.search=null,this.standAlone=!1,this.responsiveSize="sm",this.captionsTrack=null,this.transcriptTrack=null,this.sources=[],this.stackedLayout=!1,this.sticky=!1,this.stickyCorner="top-right",this.tracks=[],this.volume=70,this.width=null,this.youtubeId=null,this.__cues=[],this.__currentTime=0,this.__captionsOption=-1,this.__loadedTracks=null,this.__playing=!1,this.__settingsOpen=!1,this.__transcriptOption=-1,this.querySelectorAll("video,audio").forEach((t=>{t.addEventListener("loadedmetadata",(e=>{this.__preloadedDuration=t.duration}))}))}get anchor(){let t=window.AnchorBehaviors;return{target:!!t&&t.getTarget(this),params:t?t.params:{}}}get aspect(){let t=this.media&&this.media.aspectRatio?this.media.aspectRatio:16/9;return null===this.width||this.width,this.style.maxWidth=this.width,t}get audioNoThumb(){return this.audioOnly&&(null===this.thumbnailSrc||void 0===this.thumbnailSrc)}get buffered(){return this.media&&this.media.buffered&&this.media.buffered>0?this.media.buffered:0}get captionCues(){return this.captionsTrack&&this.captionsTrack.cues?this.isYoutube?Object.keys(this.captionsTrack.cues).map((t=>{let e=this.captionsTrack.cues[t];return e.startTime<=this.currentTime&&e.endTime>=this.currentTime?e:{}})):this.captionsTrack.activeCues:[]}get captionsPicker(){let t={};return t[-1]=this._getLocal(this.localization,"captions","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get captionsTrackKey(){return this.cc?this._getTrackId(this.captionsTrack):-1}get cues(){return this.__cues}get duration(){return this.media&&this.media.duration&&this.media.duration>0?this.media.duration:this.__preloadedDuration?this.__preloadedDuration:0}get flexLayout(){return this.hasCaptions&&!this.standAlone&&!this.hideTranscript&&!this.audioNoThumb&&!this.stackedLayout}get fullFlex(){return this.flexLayout&&"xs"!==this.responsiveSize&&"sm"!==this.responsiveSize}get fullscreenButton(){return this.fullscreenEnabled&&!this.disableFullscreen&&!this.audioNoThumb}get hasCaptions(){return this.cues.length>1}get isYoutube(){return!!this.youtubeId}get loadedTracks(){return this.__loadedTracks}get localizationDefaults(){return{audio:{label:"Audio",notSupported:"HTML5 video is not supported."},autoScroll:{label:"Scroll Transcript",icon:"swap-vert"},captions:{label:"Closed Captions",icon:"av:closed-caption",off:"Off"},download:{label:"Download Transcript",icon:"file-download"},forward:{label:"Forward",icon:"av:fast-forward"},fullscreen:{label:"Fullscreen",icon:"fullscreen"},copyLink:{label:"Copy Media Link",icon:"link"},closeLink:{label:"Close",icon:"close"},loading:{label:"Loading..."},loop:{label:"Loop Playback"},mute:{label:"Mute",icon:"av:volume-up"},nextResult:{label:"Next",icon:"arrow-forward"},pause:{label:"Pause",icon:"av:pause"},play:{label:"Play",icon:"av:play-arrow"},prevResult:{label:"Previous",icon:"arrow-back"},print:{label:"Print Transcript",icon:"print"},restart:{label:"Restart",icon:"av:replay"},rewind:{label:"Backward",icon:"av:fast-rewind"},search:{label:"Search the transcript.",icon:"search"},seekSlider:{label:"Seek Slider"},settings:{label:"Settings",icon:"settings"},speed:{label:"Speed %"},transcript:{label:"Transcript",icon:"description",loading:"Loading the transcript(s)...",off:"Off",skip:"Skip to the transcript."},unmute:{label:"Unmute",icon:"av:volume-off"},video:{label:"Video",notSupported:"HTML5 video is not supported."},volume:{label:"Volume"},youTubeLoading:{label:"Loading...",startLoading:"Press play."},youTubeTranscript:{label:"Transcript will load once media plays."}}}get media(){return this.isYoutube?this.youtube:this.loadedTracks}get mediaCaption(){let t=this._getLocal(this.localization,"audio","label"),e=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&e?this.mediaTitle+" ("+t+")":this.audioOnly?t:e?this.mediaTitle:void 0}get mediaEnd(){return!(!this.mediaSeekable||!this.media.seekable.end(0))&&this.media.seekable.end(0)}get mediaMaxWidth(){return`max-width:${this.fullscreen||this.audioNoThumb?"unset":`calc(${100*this.aspect}vh - ${80*this.aspect}px)`};`}get mediaSeekable(){return!(!this.media||!this.media.seekable)&&this.media.seekable.length>0}get mediaStart(){return this.mediaSeekable&&this.media.seekable.start(0)?this.media.seekable.start(0):0}get playing(){return this.__playing}get playerStyle(){return`height:${this.audioNoThumb?"60px":"unset"};padding-top:${this.fullscreen||this.audioNoThumb||this.height?"unset":100/this.aspect+"%"};${this.poster&&(this.isYoutube||this.audioOnly)?`background-image:url(${this.poster});`:""}`}get poster(){let t=this.thumbnailSrc?this.thumbnailSrc:!(!this.media||this.media.poster)&&this.media.poster;return!this.thumbnailSrc&&this.youtubeId?`https://img.youtube.com/vi/${this.youtubeId.replace(/[\?&].*/,"")}/hqdefault.jpg`:t}get printCaption(){let t=this._getLocal(this.localization,"audio","label"),e=this._getLocal(this.localization,"video","label"),i=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&i?this.mediaTitle+" ("+t+")":this.audioOnly?t:i?this.mediaTitle+" ("+e+")":e}get currentTime(){let t=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");return t&&!t.disabled&&t.dragging?this.shadowRoot.querySelector("#slider").immediateValue:this.__currentTime}get shareLink(){let t=window.location.href.split(/[#?]/)[0],e=this.id?`?id=${this.id}`:"";return`${t}${e}${""!==e&&this.currentTime&&0!==this.currentTime?`&t=${this.currentTime}`:""}`}get showCustomCaptions(){return(this.isYoutube||this.audioOnly)&&this.hasCaptions&&this.cc}get status(){return this.duration>0?e` +
`}static get properties(){return{...super.properties,__playerReady:{type:Boolean},allowConcurrent:{attribute:"allow-concurrent",type:Boolean},audioOnly:{attribute:"audio-only",type:Boolean,reflect:!0},autoplay:{attribute:"autoplay",type:Boolean},captionsTrack:{attribute:"captions-track",type:Object},cc:{attribute:"cc",type:Boolean},currentTime:{type:Number},crossorigin:{attribute:"crossorigin",type:String},disablePrintButton:{attribute:"disable-print-button",type:Boolean},disableSearch:{attribute:"disable-search",type:Boolean},disableScroll:{attribute:"disable-scroll",type:Boolean},disableSeek:{attribute:"disable-seek",type:Boolean},darkTranscript:{attribute:"dark-transcript",type:Boolean},disableFullscreen:{attribute:"disable-fullscreen",type:Boolean},disableInteractive:{attribute:"disable-interactive",type:Boolean},height:{attribute:"height",type:String},hideElapsedTime:{attribute:"hide-elapsed-time",type:Boolean},hideTimestamps:{attribute:"hide-timestamps",type:Boolean},hideTranscript:{attribute:"hide-transcript",type:Boolean,reflect:!0},id:{attribute:"id",type:String,reflect:!0},lang:{attribute:"lang",type:String},learningMode:{attribute:"learning-mode",type:Boolean},linkable:{attribute:"linkable",type:Boolean},localization:{attribute:"localization",type:Object},loop:{attribute:"loop",type:Boolean},mediaLang:{attribute:"media-lang",type:String},mediaTitle:{attribute:"media-title",type:String},muted:{attribute:"muted",type:Boolean},hideYoutubeLink:{type:Boolean,attribute:"hide-youtube-link"},playbackRate:{attribute:"playback-rate",type:Number},preload:{attribute:"preload",type:String,reflect:!0},responsiveSize:{attribute:"responsive-size",type:String,reflect:!0},search:{attribute:"search",type:Object},standAlone:{attribute:"stand-alone",type:Boolean,reflect:!0},source:{type:String,reflect:!0},sources:{attribute:"sources",type:Array},stackedLayout:{attribute:"stacked-layout",type:Boolean},sticky:{attribute:"sticky",type:Boolean,reflect:!0},stickyCorner:{attribute:"sticky-corner",type:String,reflect:!0},thumbnailSrc:{attribute:"thumbnail-src",type:String,reflect:!0},tracks:{attribute:"tracks",type:Array},transcriptTrack:{attribute:"transcript-track",type:Object},volume:{attribute:"volume",type:Number},width:{attribute:"width",type:String},youtubeId:{attribute:"youtube-id",reflect:!0,type:String},__currentTime:{type:Number},__captionsOption:{type:Number},__cues:{type:Array},__loadedTracks:{type:Object},__playing:{type:Boolean},__preloadedDuration:{type:Number},__settingsOpen:{type:Boolean},__transcriptOption:{type:Number}}}static get tag(){return"a11y-media-player"}constructor(){super(),window.ResponsiveUtility.requestAvailability(),window.A11yMediaStateManager.requestAvailability(),this.__playerReady=!1,this.audioOnly=!1,this.autoplay=!1,this.allowConcurrent=!1,this.cc=!1,this.darkTranscript=!1,this.disableFullscreen=!1,this.disableInteractive=!1,this.disablePrintButton=!1,this.disableSearch=!1,this.disableScroll=!1,this.disableSeek=!1,this.hideElapsedTime=!1,this.hideTimestamps=!1,this.hideTranscript=!1,this.id=null,this.lang="en",this.learningMode=!1,this.linkable=!1,this.localization={},this.loop=!1,this.mediaTitle="",this.mediaLang="en",this.muted=!1,this.hideYoutubeLink=!1,this.preload="metadata",this.playbackRate=1,this.search=null,this.standAlone=!1,this.responsiveSize="sm",this.captionsTrack=null,this.transcriptTrack=null,this.sources=[],this.stackedLayout=!1,this.sticky=!1,this.stickyCorner="top-right",this.tracks=[],this.volume=70,this.width=null,this.youtubeId=null,this.__cues=[],this.__currentTime=0,this.__captionsOption=-1,this.__loadedTracks=null,this.__playing=!1,this.__settingsOpen=!1,this.__transcriptOption=-1,this.querySelectorAll("video,audio").forEach((t=>{t.addEventListener("loadedmetadata",(e=>{this.__preloadedDuration=t.duration}))}))}get anchor(){let t=window.AnchorBehaviors;return{target:!!t&&t.getTarget(this),params:t?t.params:{}}}get aspect(){let t=this.media&&this.media.aspectRatio?this.media.aspectRatio:16/9;return null===this.width||this.width,this.style.maxWidth=this.width,t}get audioNoThumb(){return this.audioOnly&&(null===this.thumbnailSrc||void 0===this.thumbnailSrc)}get buffered(){return this.media&&this.media.buffered&&this.media.buffered>0?this.media.buffered:0}get captionCues(){return this.captionsTrack&&this.captionsTrack.cues?this.isYoutube?Object.keys(this.captionsTrack.cues).map((t=>{let e=this.captionsTrack.cues[t];return e.startTime<=this.currentTime&&e.endTime>=this.currentTime?e:{}})):this.captionsTrack.activeCues:[]}get captionsPicker(){let t={};return t[-1]=this._getLocal(this.localization,"captions","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get captionsTrackKey(){return this.cc?this._getTrackId(this.captionsTrack):-1}get cues(){return this.__cues}get duration(){return this.media&&this.media.duration&&this.media.duration>0?this.media.duration:this.__preloadedDuration?this.__preloadedDuration:0}get flexLayout(){return this.hasCaptions&&!this.standAlone&&!this.hideTranscript&&!this.audioNoThumb&&!this.stackedLayout}get fullFlex(){return this.flexLayout&&"xs"!==this.responsiveSize&&"sm"!==this.responsiveSize}get fullscreenButton(){return this.fullscreenEnabled&&!this.disableFullscreen&&!this.audioNoThumb}get hasCaptions(){return this.cues.length>1}get isYoutube(){return!!this.youtubeId}get loadedTracks(){return this.__loadedTracks}get localizationDefaults(){return{audio:{label:"Audio",notSupported:"HTML5 video is not supported."},autoScroll:{label:"Scroll Transcript",icon:"swap-vert"},captions:{label:"Closed Captions",icon:"av:closed-caption",off:"Off"},download:{label:"Download Transcript",icon:"file-download"},forward:{label:"Forward",icon:"av:fast-forward"},fullscreen:{label:"Fullscreen",icon:"fullscreen"},copyLink:{label:"Copy Media Link",icon:"link"},closeLink:{label:"Close",icon:"close"},loading:{label:"Loading..."},loop:{label:"Loop Playback"},mute:{label:"Mute",icon:"av:volume-up"},nextResult:{label:"Next",icon:"arrow-forward"},pause:{label:"Pause",icon:"av:pause"},play:{label:"Play",icon:"av:play-arrow"},prevResult:{label:"Previous",icon:"arrow-back"},print:{label:"Print Transcript",icon:"print"},restart:{label:"Restart",icon:"av:replay"},rewind:{label:"Backward",icon:"av:fast-rewind"},search:{label:"Search the transcript.",icon:"search"},seekSlider:{label:"Seek Slider"},settings:{label:"Settings",icon:"settings"},speed:{label:"Speed %"},transcript:{label:"Transcript",icon:"description",loading:"Loading the transcript(s)...",off:"Off",skip:"Skip to the transcript."},unmute:{label:"Unmute",icon:"av:volume-off"},video:{label:"Video",notSupported:"HTML5 video is not supported."},volume:{label:"Volume"},youTubeLoading:{label:"Loading...",startLoading:"Press play."},youTubeTranscript:{label:"Transcript will load once media plays."}}}get media(){return this.isYoutube?this.youtube:this.loadedTracks}get mediaCaption(){let t=this._getLocal(this.localization,"audio","label"),e=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&e?this.mediaTitle+" ("+t+")":this.audioOnly?t:e?this.mediaTitle:void 0}get mediaEnd(){return!(!this.mediaSeekable||!this.media.seekable.end(0))&&this.media.seekable.end(0)}get mediaMaxWidth(){return`max-width:${this.fullscreen||this.audioNoThumb?"unset":`calc(${100*this.aspect}vh - ${80*this.aspect}px)`};`}get mediaSeekable(){return!(!this.media||!this.media.seekable)&&this.media.seekable.length>0}get mediaStart(){return this.mediaSeekable&&this.media.seekable.start(0)?this.media.seekable.start(0):0}get playing(){return this.__playing}get playerStyle(){return`height:${this.audioNoThumb?"60px":"unset"};padding-top:${this.fullscreen||this.audioNoThumb||this.height?"unset":100/this.aspect+"%"};${this.poster&&(this.isYoutube||this.audioOnly)?`background-image:url('${this.poster}');`:""}`}get poster(){let t=this.thumbnailSrc?this.thumbnailSrc:!(!this.media||this.media.poster)&&this.media.poster;return!this.thumbnailSrc&&this.youtubeId?`https://img.youtube.com/vi/${this.youtubeId.replace(/[\?&].*/,"")}/hqdefault.jpg`:t}get printCaption(){let t=this._getLocal(this.localization,"audio","label"),e=this._getLocal(this.localization,"video","label"),i=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&i?this.mediaTitle+" ("+t+")":this.audioOnly?t:i?this.mediaTitle+" ("+e+")":e}get currentTime(){let t=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");return t&&!t.disabled&&t.dragging?this.shadowRoot.querySelector("#slider").immediateValue:this.__currentTime}get shareLink(){let t=window.location.href.split(/[#?]/)[0],e=this.id?`?id=${this.id}`:"";return`${t}${e}${""!==e&&this.currentTime&&0!==this.currentTime?`&t=${this.currentTime}`:""}`}get showCustomCaptions(){return(this.isYoutube||this.audioOnly)&&this.hasCaptions&&this.cc}get status(){return this.duration>0?e` ${this._getHHMMSS(this.currentTime,this.duration)}/${this._getHHMMSS(this.duration)} `:this.isYoutube?this.__playing?this._getLocal(this.localization,"youTubeLoading","label"):this._getLocal(this.localization,"youTubeLoading","startLoading"):this._getLocal(this.localization,"loading","label")}get stickyMode(){return this.sticky&&"none"!==this.stickyCorner}get t(){let t=this._getSeconds(this.anchor.params.t||this.anchor.params.start||"0s");return this.anchor&&this.anchor.target===this?t:this.videoData?this.videoData.t||this.videoData.start:void 0}get transcriptCues(){return(this.cues?this.cues.slice():[]).filter((t=>t.track===this.transcriptTrack))}get transcriptPicker(){let t={};return t[-1]=this._getLocal(this.localization,"transcript","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get transcriptTrackKey(){return this.hideTranscript?-1:this._getTrackId(this.transcriptTrack)}get videoData(){if(this.youtubeId){let t=this.youtubeId.split(/[\?\&]/),e={};return e.videoId=t[0],t.forEach(((t,i)=>{if(i>0){let i=t.split(/=/);e[i[0]]=this._getSeconds(i[1])}})),e}}get videoId(){if(this.videoData)return this.videoData.videoId}get youtube(){return null!==this.shadowRoot.querySelector("a11y-media-youtube")&&this.shadowRoot.querySelector("a11y-media-youtube")}_setAttribute(t,e){e?this.setAttribute(t,e):this.removeAttribute(t)}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{"learningMode"===e&&(this.disableSeek=this[e],this.hideTranscript=this[e]);let change=t=>t.includes(e),mediaChange=t=>change(["__loadedTracks","youtubeId","media",t]),i=change(["standAlone","hideTranscript","audioNoThumb","stackedLayout","__cues"]),s=this.media?this.media:this.__loadedTracks;"id"===e&&null===this.id&&(this.id="a11y-media-player"+Date.now()),change(["media","muted"])&&this._handleMuteChanged(),change(["media","volume"])&&this.setVolume(this.volume),change(["media","autoplay"])&&this.autoplay&&this.play(),"__captionsOption"===e&&this._captionsOptionChanged(),change(["cc","captionsTrack"])&&this._captionsChanged(),i&&this._setAttribute("flex-layout",this.flexLayout),(i||"responsiveSize"===e)&&this._setAttribute("full-flex",this.fullFlex),change(["sticky","sticky-corner","__playing"])&&this._setAttribute("sticky-mode",this.stickyMode&&this.__playing),change(["height"])&&(this.style.setProperty("--a11y-media-player-height",this.height?this.height:"unset"),this.style.setProperty("--a11y-media-transcript-max-height",this.height?"146px":"unset")),null!==this.media&&(mediaChange("cc")&&this._setAttribute("cc",this.cc,this.__loadedTracks),mediaChange("isYoutube")&&this.__loadedTracks&&(this.__loadedTracks.hidden,this.isYoutube),mediaChange("mediaLang")&&this._setAttribute("lang",this.mediaLang,s),mediaChange("loop")&&this._setAttribute("loop",this.loop,s),mediaChange("playbackRate")&&this._setAttribute("playbackRate",this.playbackRate,s),mediaChange("isYoutube")&&this._setAttribute("poster",!this.isYoutube&&this.thumbnailSrc,this.__loadedTracks),!change(["isYoutube","poster","media","audioOnly"])||!this.poster||this.isYoutube||this.audioOnly||this.media.poster||(this.media.poster=this.poster)),this.dispatchEvent(new CustomEvent(`${e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}-changed`,{detail:{value:this[e]}}))}))}_captionsChanged(){let t=-1;Object.keys(this.loadedTracks.textTracks).forEach((e=>{let i=this.cc&&this.loadedTracks.textTracks[e]===this.captionsTrack;this.loadedTracks.textTracks[e].mode=i?"showing":"hidden",i&&(t=e)})),this.__captionsOption=t}_captionsOptionChanged(){this.cc=this.__captionsOption>-1,Object.keys(this.loadedTracks.textTracks).forEach((t=>{let e=parseInt(t)==parseInt(this.__captionsOption);this.loadedTracks.textTracks[t].mode=e?"showing":"hidden",e&&(this.captionsTrack=this.loadedTracks.textTracks[t])}))}_handleMuteChanged(){this.media&&(this.media.muted=this.muted),this.dispatchEvent(new CustomEvent("mute-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}download(){let t=document.createElement("a"),e=this.mediaTitle&&""!=this.mediaTitle.trim()?`${this.mediaTitle} (${this._getLocal(this.localization,"transcript","label")})`:this._getLocal(this.localization,"transcript","label"),i=e.replace(/[^\w\d]/g,""),s=this.transcriptTrack.cues,o=Object.keys(s).map((t=>`${this._getHHMMSS(s[t].startTime)} - ${this._getHHMMSS(s[t].endTime)}: \t${s[t].text.replace(/[\n\r\s*]/g," ")}\n`)).join("");t.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(e+"\n"+o)),t.setAttribute("download",i+".txt"),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),this.dispatchEvent(new CustomEvent("transcript-downloaded",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}goToYoutube(){window.open(`https://www.youtube.com/watch?v=${this.youtubeId}`)}print(){let t=this.transcriptTrack.cues,e=this.mediaTitle&&""!=this.mediaTitle.trim()?`${this.mediaTitle} (${this._getLocal(this.localization,"transcript","label")})`:this._getLocal(this.localization,"transcript","label"),i=window.open("","","left=0,top=0,width=552,height=477,toolbar=0,scrollbars=0,status =0");i.document.body.innerHTML=`\n

${e}

\n ${Object.keys(t).map((e=>`
\n ${this.hideTimestamps?"":`\n \n ${this._getHHMMSS(t[e].startTime)} - \n ${this._getHHMMSS(t[e].endTime)}:\n `}\n \n ${t[e].text}\n \n
`)).join("")}\n `,i.document.close(),i.focus(),i.print(),i.addEventListener("afterprint",(t=>{i.close()})),this.dispatchEvent(new CustomEvent("transcript-printed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}play(){this.__playing=!0,this.media&&this.media.play&&this.media.play(),this.dispatchEvent(new CustomEvent("play",{bubbles:!0,composed:!0,cancelable:!1,detail:this})),window.dispatchEvent(new CustomEvent("a11y-player-playing",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}pause(){this.__playing=!1,this.media&&this.media.pause&&this.media.pause(),this.dispatchEvent(new CustomEvent("pause",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}stop(){this.pause(),this.seek(0),window.dispatchEvent(new CustomEvent("stop",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}restart(){this.seek(0),this.play(),window.dispatchEvent(new CustomEvent("restart",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}rewind(t){t=void 0!==t?t:this.duration/20,this.seek(this.currentTime-t,0),window.dispatchEvent(new CustomEvent("backward",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}forward(t){t=void 0!==t?t:this.duration/20,this.seek(this.currentTime+t),window.dispatchEvent(new CustomEvent("forward",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}seek(t=0){this.mediaSeekable&&(this.media.seek(Math.max(0,Math.min(t,this.duration))),this._handleTimeUpdate(),window.dispatchEvent(new CustomEvent("seek",{bubbles:!0,composed:!0,cancelable:!1,detail:this})))}selectCaptionByKeyEvent(t){this.selectCaptionByKey(t.detail.value)}selectCaptionByKey(t){(t=parseInt(t))>-1&&(this.captionsTrack=this.loadedTracks.textTracks[t]),this.cc=t>-1}selectTranscriptByKeyEvent(t){this.selectTranscriptByKey(t.detail.value)}selectTranscriptByKey(t){(t=parseInt(t))>-1&&(this.transcriptTrack=this.loadedTracks.textTracks[t]),this.hideTranscript=t<0}getloadedTracks(){let t=this.querySelector("audio,video"),e=t?t.getAttribute("crossorigin"):void 0,i=null,s=this.source&&!this.source&&this.source.match(/webm|ogv|mov|mp4$/),o=(this.sources||[]).filter((t=>`${t.type||""}${t.kind||""}`.match(/video|mp4|webm|ogv/))).length>0,l=this.isYoutube||s||o;if(t&&(e||t.setAttribute("crossorigin",this.crossorigin),t.removeAttribute("autoplay"),t.removeAttribute("controls"),t.setAttribute("preload","metadata")),!this.youtubeId){let t=!(!this.querySelector("iframe")||!this.querySelector("iframe"))&&this.querySelector("iframe").src;!!t&&(t.match(/youtube(-\w*)*.com/)||t.src.match(/youtu.be/))&&t&&(this.youtubeId=t.replace(/.*\//g,""),l=!0,this.querySelector("iframe").remove())}return t?i=t:(i=document.createElement(this.querySelectorAll('source[type*="audio"]').length>0||!l?"audio":"video"),e||i.setAttribute("crossorigin",this.crossorigin),i.setAttribute("preload","metadata"),this.querySelectorAll("source,track").forEach((t=>{t.parentNode===this&&i.appendChild(t)})),this.appendChild(i)),this.audioOnly="AUDIO"===i.tagName,i.style.width="100%",i.style.maxWidth="100%",(this.tracks||[]).forEach((t=>{let e=document.createElement("track");Object.keys(t).forEach((i=>e.setAttribute(i,t[i]))),i.appendChild(e)})),(this.sources||[]).forEach((t=>{let e=document.createElement("source");Object.keys(t).forEach((i=>e.setAttribute(i,t[i]))),i.appendChild(e)})),i.seek=t=>i.currentTime=t,this._addSourcesAndTracks(i,i),i}_getTrack(t){if(!t){let t=this.loadedTracks.textTracks.filter((t=>!0===t.default));return t?t[0].track:this.loadedTracks.textTracks[0].track}return t}selectTranscript(t){this.transcriptTrack=this._getTrack(t)}setPlaybackRate(t){t=null!==t?t:1,this.media.playbackRate=null!==t?t:1,window.dispatchEvent(new CustomEvent("playback-rate-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}setVolume(t=70){this.volume=Math.max(0,Math.min(t,100)),this.media&&(this.media.volume=t/100),window.dispatchEvent(new CustomEvent("volume-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleCC(t){this.cc=void 0===t?!this.cc:t,window.dispatchEvent(new CustomEvent("cc-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}get fullscreenTarget(){return this.shadowRoot&&this.shadowRoot.querySelector("#player-section")?this.shadowRoot.querySelector("#player-section"):this}toggleFullscreen(t){super.toggleFullscreen(t),window.dispatchEvent(new CustomEvent("fullscreen-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleLoop(t){this.loop=void 0===t?!this.loop:t,this.media.loop=!0===t,window.dispatchEvent(new CustomEvent("loop-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}togglePlay(){this.__playing?this.pause():this.play(),window.dispatchEvent(new CustomEvent("play-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleMute(t){this.muted=void 0===t?!this.muted:t,window.dispatchEvent(new CustomEvent("muted-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleSettings(t){t=void 0===t?!this.__settingsOpen:t,this.__settingsOpen=t,this.dispatchEvent(new CustomEvent("settings-toggled",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleSticky(t){t=void 0===t?!this.sticky:t,this.sticky!==t&&(this.sticky=t,this.dispatchEvent(new CustomEvent("player-sticky",{bubbles:!0,composed:!0,cancelable:!1,detail:this})))}toggleTranscript(t){(t=void 0===t?this.hideTranscript:t)&&!this.selectTranscriptByKey>-1&&this.selectTranscriptByKey(0),this.hideTranscript=!t,this.dispatchEvent(new CustomEvent("transcript-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}_addSourcesAndTracks(t){t.style.width="100%",t.style.maxWidth="100%",Object.keys(t.textTracks).forEach((e=>this._onAddTrack(t.textTracks[e]))),t.textTracks.onremovetrack=t=>this._onRemoveTrack(t.track),t.textTracks.onaddtrack=t=>this._onAddTrack(t.track);let e=t.querySelector("track[default]")?t.querySelector("track[default]"):t.querySelector("track"),i=Object.keys(t.textTracks).find((i=>e.label===t.textTracks[i].label&&e.kind===t.textTracks[i].kind&&e.srclang===t.textTracks[i].scrlang))||0;this.captionsTrack=t.textTracks[i],this.hideTranscript||(this.transcriptTrack=this.captionsTrack),this._handleTimeUpdate()}_handleCloseLink(){this.shadowRoot.querySelector("#link")&&this.shadowRoot.querySelector("#link").close&&this.shadowRoot.querySelector("#link").close()}_handleCopyLink(){let t=document.createElement("textarea");this.pause(),t.value=this.shareLink,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),o.showSimpleToast({detail:{duration:3e3,text:`Copied to clipboard: ${this.shareLink}`}})}_handleCueSeek(t){this.standAlone||this.seek(t.startTime)}_handleMediaLoaded(t){this._handleTimeUpdate(),this.youtubeId||this.anchor.target!==this||this.seek(this._getSeconds(this.anchor.params.t||this.anchor.params.start||"0s"))}_handleSearchAdded(t){this.search=t.detail}_handleSpeedChanged(t){var e=r(t)[0];this.setPlaybackRate(e.value)}_handleSliderDragging(t){let e=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");if(e&&!e.disabled&&e.dragging&&this.__playing&&e.dragging){let t=setInterval((()=>{e.dragging||(this.play(),clearInterval(t))}));this.pause()}}_handleSliderChanged(t){let e=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");this.playing&&e.immediateValue!=this.__currentTime||this.seek(e.immediateValue)}_handleTimeUpdate(){this.__wait||(this.__currentTime=this.media&&this.media.currentTime&&this.media.currentTime>0?this.media.currentTime:0,this.__wait=!0,setTimeout((()=>{this.__wait=!1}),1e3))}_getTrackId(t){return this.loadedTracks&&Object.keys(this.loadedTracks.textTracks).find((e=>this.loadedTracks.textTracks[e]===t))||-1}_handleVolumeChanged(t){var e=r(t)[0];this.volume=e.value}_onAddTrack(t){null===this.captionsTrack&&(this.captionsTrack=t),t&&(t.mode="hidden");let e=setInterval((()=>{if(t.cues&&t.cues.length>0){clearInterval(e);let i=Object.keys(t.cues).map((e=>t.cues[e]));this._onRemoveTrack(t),this.__cues=this.cues.concat(i).sort(((t,e)=>{let i=t.startTime-e.startTime,s=t.endTime-e.endTime;return 0!==i?i:0!==s?s:t.track-e.track}))}}))}_onRemoveTrack(t){this.loadedTracks&&this.loadedTracks.textTracks&&Object.keys(this.loadedTracks.textTracks).filter((e=>this.loadedTracks.textTracks[e]!==t)),this.__cues=this.cues?this.cues.filter((e=>e.track!==t)):[]}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),this.style.setProperty("--a11y-media-transcript-max-height",this.height?"146px":"unset"),this.__loadedTracks=this.getloadedTracks(),this._handleMediaLoaded(),this.__loadedTracks.addEventListener("loadedmetadata",(t=>this._handleMediaLoaded(t))),this.__loadedTracks.addEventListener("timeupdate",(t=>{this._handleTimeUpdate(t)})),window.dispatchEvent(new CustomEvent("responsive-element",{detail:{element:this,attribute:"responsive-size",relativeToParent:!0,sm:400,md:700,lg:1e3,xl:1500}})),window.dispatchEvent(new CustomEvent("a11y-player",{bubbles:!0,composed:!0,cancelable:!1,detail:this})),this.__playerReady=!0}_setActiveCue(t){let e=t.detail.element,i=e.parentNode,s=null!=i?i.offsetTop:0;if(!this.disableScroll){let scrollingTo=(t,e,i)=>{if(!(i<=0)){var s=(e-t.scrollTop)/i*10;setTimeout((()=>{t.scrollTop=t.scrollTop+s,t.scrollTop!==e&&scrollingTo(t,e,i-10)}),10)}};scrollingTo(e.parentNode.parentNode,e.offsetTop-s,250)}}_transcriptScroll(t){this.disableScroll=!this.disableScroll}_getHHMMSS(t,e){t=parseFloat(t),e=void 0===e?t:parseFloat(e);let a=t=>t<10?`0${t}`:t,b=(t,i,s)=>e>=i?a(Math.floor(t/i))+":":s;return b(t,3600,"")+b(t%3600,60,"00:")+a(Math.round(t%60))}_getSeconds(t=0){let e=t.replace(/[hm]{1,2}&?/g,":0").replace(/[s]{1,2}$/g,"").split(/:/);return 3600*(e.length>2?parseInt(e[e.length-3]):0)+60*(e.length>1?parseInt(e[e.length-2]):0)+(e.length>0?parseFloat(e[e.length-1]):0)}_getLocal(t,e,i){let s="";return void 0!==t&&void 0!==t[e]&&void 0!==t[e][i]?s=t[e][i]:void 0!==this.localizationDefaults&&void 0!==this.localizationDefaults[e]&&void 0!==this.localizationDefaults[e][i]&&(s=this.localizationDefaults[e][i]),s}}customElements.define(A11yMediaPlayer.tag,A11yMediaPlayer);export{A11yMediaPlayer}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-tabs/lib/a11y-tab.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-tabs/lib/a11y-tab.js index 9d5b30f818..c80ee63a57 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-tabs/lib/a11y-tab.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/a11y-tabs/lib/a11y-tab.js @@ -41,6 +41,7 @@ import{LitElement as t,html as e,css as a}from"../../../lit/index.js";import"../ display: none; } #content-inner { + height: var(--a11y-tabs-tab-height, --a11y-tabs-height); max-width: 100%; overflow: auto; } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/absolute-position-behavior/lib/absolute-position-state-manager.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/absolute-position-behavior/lib/absolute-position-state-manager.js index 9364c5e499..9341e75489 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/absolute-position-behavior/lib/absolute-position-state-manager.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/absolute-position-behavior/lib/absolute-position-state-manager.js @@ -2,4 +2,4 @@ * Copyright 2018 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{LitElement as t}from"../../../lit/index.js";window.AbsolutePositionStateManager=window.AbsolutePositionStateManager||{},window.AbsolutePositionStateManager.requestAvailability=()=>{if(!window.AbsolutePositionStateManager.instance){window.AbsolutePositionStateManager.instance=document.createElement("absolute-position-state-manager");let t=window.AbsolutePositionStateManager.instance;document.body.appendChild(t)}return window.AbsolutePositionStateManager.instance};class AbsolutePositionStateManager extends t{static get tag(){return"absolute-position-state-manager"}static get properties(){return{scrollTarget:{type:Object},elements:{type:Array},__observer:{type:Object},__timeout:{type:Object},__timeout2:{type:Object}}}constructor(){super(),this.windowControllers=new AbortController,this.elements=[],this.__timeout=!1,this.__observer=new MutationObserver((t=>this.checkMutations(t)))}loadElement(t){this.elements.length<1&&(this.__observer.observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),this.updateElements(),this.windowControllers=new AbortController,document.addEventListener("load",this.updateElements.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("resize",this._handleResize.bind(this),{signal:this.windowControllers.signal})),this.elements.filter((e=>e===t)).length<1&&(this.elements.push(t),t.style.top=0,t.style.left=0),this.positionElement(t)}unloadElement(t){this.elements=this.elements.filter((e=>e!==t)),this.elements.length<1&&this.removeEventListeners()}_handleScroll(){this.__timeout2&&clearTimeout(this.__timeout2),this.__timeout2=setTimeout(window.AbsolutePositionStateManager.instance.updateStickyElements(),1e3)}_handleResize(){this.__timeout&&clearTimeout(this.__timeout),this.__timeout=setTimeout(window.AbsolutePositionStateManager.instance.updateElements(),250)}checkMutations(t){let e=!1;t.forEach((t=>{e||(e=e||!("attributes"===t.type&&"style"===t.attributeName&&this.elements.includes(t.target)))})),e&&(this.__timeout&&clearTimeout(this.__timeout),this.__timeout=setTimeout(window.AbsolutePositionStateManager.instance.updateElements(),250))}findTarget(t){let e="#"+t.for,i=t.target,o=t;for(;t.for&&!i&&o&&o.parentNode&&o!==document;)o=o.parentNode,i=o?o.querySelector(e):void 0,11===o.nodeType&&(o=o.host),i=!i&&o?o.querySelector(e):i;return i}removeEventListeners(){this.__observer&&this.__observer.disconnect&&this.__observer.disconnect(),this.windowControllers.abort(),this.__watchSticky&&this.scrollTarget.removeEventListener("scroll",this._handleScroll)}updateElements(){this.elements.forEach((t=>this.positionElement(t))),this.loadSticky()}updateStickyElements(){this.elements.forEach((t=>{t.sticky&&this.positionElement(t)}))}loadSticky(){!this.__watchSticky&&this.elements.filter((t=>t.sticky)).length>0&&this.scrollTarget?(this.__watchSticky=!0,this.scrollTarget.addEventListener("scroll",this._handleScroll,{passive:!0})):this.__watchSticky&&this.elements.filter((t=>t.sticky)).length<1&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this._handleScroll,{passive:!0}),this.__watchSticky=!1)}_getParentNode(t){let e=t.parentNode;return null!=e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e}positionElement(t){t.position||(t.position="bottom"),t.style.position="absolute",t.style.top||(t.style.top="0px"),t.style.left||(t.style.left="0px");let e=this.findTarget(t),i=t.offsetParent,o=e&&e.getBoundingClientRect?e.getBoundingClientRect():{};if(!e||!i)return;t.justify&&(t.style.width=`${o.width}px`);let s=document.body.getBoundingClientRect(),n=i.getBoundingClientRect(),l=t.getBoundingClientRect(),r=parseFloat(t.offset),pxToNum=t=>parseFloat(t.replace("px","")),vertical=(e=t.position)=>"left"!==e&&"right"!==e,setAlign=(e=vertical(t.position))=>{let i,n=e?pxToNum(t.style.left)-l.left:pxToNum(t.style.top)-l.top,r=e?"left":"top",distance=t=>e?t.width:t.height,a=n+distance(s)-distance(l),h=n;return"end"===t.positionAlign?h+=o[r]-distance(l)+distance(o):"start"===t.positionAlign?h+=o[r]:h+=o[r]-distance(l)/2+distance(o)/2,i=t.fitToVisibleBounds?Math.max(n,Math.min(a,h)):h,i},getCoord=(e=t.position)=>{let i,s=vertical(e)?pxToNum(t.style.top)-l.top:pxToNum(t.style.left)-l.left,n=t.allowOverlap||"visible"!=window.getComputedStyle(t,null).overflowY?l.height:Math.max(l.height,t.scrollHeight),a=t.allowOverlap||"visible"!=window.getComputedStyle(t,null).overflowX?l.width:Math.max(l.width,t.scrollWidth);return i="top"===e?o.top+s-n-r:"left"===e?o.left+s-a-r:o[e]+s+r,i},isFit=(e=t.position)=>{let distance=t=>vertical(e)?l.height+r:l.width+r;return((e=t.position)=>"left"===e||"top"===e)(e)?o[e]-s[e]>distance:s[e]-o[e]>distance},a=!1!==t.fitToVisibleBounds&&!isFit(t.position),h={top:["bottom","left","right"],left:["right","top","bottom"],bottom:["top","right","left"],right:["left","bottom","top"]};a&&isFit(h[t.position][0])?t.position=h[t.position][0]:a&&isFit(h[t.position][1])?t.position=h[t.position][1]:a&&isFit(h[t.position][2])&&(t.position=h[t.position][2]);let d=vertical(t.position)?getCoord():setAlign(),p=vertical(t.position)?setAlign():getCoord();if(t.sticky){let e=window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop,s=window.innerHeight,n=0===l.height&&t.children&&t.children[0]?t.children[0].offsetHeight:l.height,r=o.top-l.height<0&&o.top+o.height>20+n,a=o.top+o.height+l.height>s&&o.top{if(!window.AbsolutePositionStateManager.instance){window.AbsolutePositionStateManager.instance=document.createElement("absolute-position-state-manager");let t=window.AbsolutePositionStateManager.instance;document.body.appendChild(t)}return window.AbsolutePositionStateManager.instance};class AbsolutePositionStateManager extends t{static get tag(){return"absolute-position-state-manager"}static get properties(){return{scrollTarget:{type:Object},elements:{type:Array},__observer:{type:Object},__timeout:{type:Object},__timeout2:{type:Object}}}constructor(){super(),this.windowControllers=new AbortController,this.elements=[],this.__timeout=!1,this.__observer=new MutationObserver((t=>this.checkMutations(t)))}loadElement(t){this.elements.length<1&&(this.__observer.observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),this.updateElements(),this.windowControllers=new AbortController,document.addEventListener("load",this.updateElements.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("resize",this._handleResize.bind(this),{signal:this.windowControllers.signal})),this.elements.filter((e=>e===t)).length<1&&(this.elements.push(t),t.style.top=0,t.style.left=0),this.positionElement(t)}unloadElement(t){this.elements=this.elements.filter((e=>e!==t)),this.elements.length<1&&this.removeEventListeners()}_handleScroll(){this.__timeout2&&clearTimeout(this.__timeout2),this.__timeout2=setTimeout(window.AbsolutePositionStateManager.instance.updateStickyElements(),1e3)}_handleResize(){this.__timeout&&clearTimeout(this.__timeout),this.__timeout=setTimeout(window.AbsolutePositionStateManager.instance.updateElements(),250)}checkMutations(t){let e=!1;t.forEach((t=>{e||(e=e||!("attributes"===t.type&&"style"===t.attributeName&&this.elements.includes(t.target)))})),e&&(this.__timeout&&clearTimeout(this.__timeout),this.__timeout=setTimeout(window.AbsolutePositionStateManager.instance.updateElements(),250))}findTarget(t){let e="#"+t.for,i=t.target,o=t;for(;t.for&&!i&&o&&o.parentNode&&o!==document;)o=o.parentNode,i=o?o.querySelector(e):void 0,11===o.nodeType&&(o=o.host),i=!i&&o?o.querySelector(e):i;return i}removeEventListeners(){this.__observer&&this.__observer.disconnect&&this.__observer.disconnect(),this.windowControllers.abort(),this.__watchSticky&&this.scrollTarget&&this.scrollTarget.removeEventListener("scroll",this._handleScroll)}updateElements(){this.elements.forEach((t=>this.positionElement(t))),this.loadSticky()}updateStickyElements(){this.elements.forEach((t=>{t.sticky&&this.positionElement(t)}))}loadSticky(){!this.__watchSticky&&this.elements.filter((t=>t.sticky)).length>0&&this.scrollTarget?(this.__watchSticky=!0,this.scrollTarget.addEventListener("scroll",this._handleScroll,{passive:!0})):this.__watchSticky&&this.elements.filter((t=>t.sticky)).length<1&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this._handleScroll,{passive:!0}),this.__watchSticky=!1)}_getParentNode(t){let e=t.parentNode;return null!=e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e}positionElement(t){t.position||(t.position="bottom"),t.style.position="absolute",t.style.top||(t.style.top="0px"),t.style.left||(t.style.left="0px");let e=this.findTarget(t),i=t.offsetParent,o=e&&e.getBoundingClientRect?e.getBoundingClientRect():{};if(!e||!i)return;t.justify&&(t.style.width=`${o.width}px`);let s=document.body.getBoundingClientRect(),n=i.getBoundingClientRect(),l=t.getBoundingClientRect(),r=parseFloat(t.offset),pxToNum=t=>parseFloat(t.replace("px","")),vertical=(e=t.position)=>"left"!==e&&"right"!==e,setAlign=(e=vertical(t.position))=>{let i,n=e?pxToNum(t.style.left)-l.left:pxToNum(t.style.top)-l.top,r=e?"left":"top",distance=t=>e?t.width:t.height,a=n+distance(s)-distance(l),h=n;return"end"===t.positionAlign?h+=o[r]-distance(l)+distance(o):"start"===t.positionAlign?h+=o[r]:h+=o[r]-distance(l)/2+distance(o)/2,i=t.fitToVisibleBounds?Math.max(n,Math.min(a,h)):h,i},getCoord=(e=t.position)=>{let i,s=vertical(e)?pxToNum(t.style.top)-l.top:pxToNum(t.style.left)-l.left,n=t.allowOverlap||"visible"!=window.getComputedStyle(t,null).overflowY?l.height:Math.max(l.height,t.scrollHeight),a=t.allowOverlap||"visible"!=window.getComputedStyle(t,null).overflowX?l.width:Math.max(l.width,t.scrollWidth);return i="top"===e?o.top+s-n-r:"left"===e?o.left+s-a-r:o[e]+s+r,i},isFit=(e=t.position)=>{let distance=t=>vertical(e)?l.height+r:l.width+r;return((e=t.position)=>"left"===e||"top"===e)(e)?o[e]-s[e]>distance:s[e]-o[e]>distance},a=!1!==t.fitToVisibleBounds&&!isFit(t.position),h={top:["bottom","left","right"],left:["right","top","bottom"],bottom:["top","right","left"],right:["left","bottom","top"]};a&&isFit(h[t.position][0])?t.position=h[t.position][0]:a&&isFit(h[t.position][1])?t.position=h[t.position][1]:a&&isFit(h[t.position][2])&&(t.position=h[t.position][2]);let d=vertical(t.position)?getCoord():setAlign(),p=vertical(t.position)?setAlign():getCoord();if(t.sticky){let e=window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop,s=window.innerHeight,n=0===l.height&&t.children&&t.children[0]?t.children[0].offsetHeight:l.height,r=o.top-l.height<0&&o.top+o.height>20+n,a=o.top+o.height+l.height>s&&o.top
diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/app-hax.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/app-hax.js index 4bc48e1514..28902cf61e 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/app-hax.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/app-hax.js @@ -1,4 +1,4 @@ -import{css as e,html as t,unsafeCSS as o}from"../../lit/index.js";import{toJS as a,autorun as i}from"../../mobx/dist/mobx.esm.js";import{localStorageSet as n,localStorageGet as s}from"../utils/utils.js";import"../simple-tooltip/simple-tooltip.js";import{SimpleColors as r}from"../simple-colors/simple-colors.js";import{store as l}from"./lib/v1/AppHaxStore.js";import{I18NMixin as p}from"../i18n-manager/lib/I18NMixin.js";import{AppHaxAPI as d}from"./lib/v1/AppHaxBackendAPI.js";import{SimpleTourManager as c}from"../simple-popover/lib/simple-tour.js";import{SuperDaemonInstance as m}from"../super-daemon/super-daemon.js";import"../simple-toolbar/lib/simple-toolbar-button.js";import"../simple-colors-shared-styles/simple-colors-shared-styles.js";import"./lib/v1/AppHaxRouter.js";import"./lib/v1/app-hax-label.js";import"./lib/v1/app-hax-top-bar.js";import{SimpleTourFinder as h}from"../simple-popover/lib/SimpleTourFinder.js";const u=new URL("./lib/assets/images/Logout.svg",import.meta.url).href;function darkToggle(e){e.matches?l.darkMode=!0:l.darkMode=!1}function soundToggle(){l.soundStatus=!a(l.soundStatus),n("app-hax-soundStatus",a(l.soundStatus)),l.appEl.playSound("click")}export class AppHax extends(p(h(r))){static get tag(){return"app-hax"}_openExternalLink(e){window.open(e,"_blank")}async _haxStoreContribute(e,t,o=null){let a="";if("merlin"==e){var i=`[${e}] New command request from HAX daemon`;a=`Location: ${window.location.href}\nMerlin command: ${o}\nWhat did you want merlin to do?\n`}else{i=`[${e}] User report from HAX daemon`;if(a=`Location: ${window.location.href}\nBrowser: ${navigator.userAgent}\nOS: ${navigator.userAgentData.platform} - ${navigator.deviceMemory}GB RAM - ${navigator.hardwareConcurrency} cores\nScreen: ${window.screen.width}x${window.screen.height}\nWindow size: ${window.innerWidth}x${window.innerHeight}\n`,navigator.getBattery){a+=`Battery: ${100*(await navigator.getBattery()).level}%\n`}navigator.connection&&navigator.connection.effectiveType&&(a+=`Connection: ${navigator.connection.effectiveType}\n`),a+=("feature"==e?"Your idea:":"Bug you experienced:")+"\n"}window.open(`https://github.com/elmsln/issues/issues/new?assignees=&labels=${t}&template=issue-report.md&title=${i}&body=${encodeURIComponent(a)}`,"_blank")}playSound(e="coin2"){return new Promise((t=>{if(l.soundStatus&&l.appReady){let o=["click","click2","coin","coin2","hit","success"].includes(e)?e:"hit";this.audio=new Audio(new URL(`./lib/assets/sounds/${o}.mp3`,import.meta.url).href),this.audio.volume=.5,this.audio.onended=e=>{t()},this.audio.play(),setTimeout((()=>{t()}),1e3)}else t()}))}_tokenRefreshFailed(e){window.dispatchEvent(new CustomEvent("jwt-login-logout",{composed:!0,bubbles:!0,cancelable:!1,detail:!0})),setTimeout((()=>{this.reset(!0)}),100)}connectedCallback(){super.connectedCallback(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",darkToggle,{signal:this.windowControllers.signal}),window.addEventListener("jwt-logged-in",this._jwtLoggedIn.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("jwt-login-refresh-error",this._tokenRefreshFailed.bind(this),{signal:this.windowControllers.signal})}goToLocation(e){window.location=e}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}constructor(){super(),this.unlockComingSoon=!1,this.unlockTerrible=!1,this.t=this.t||{},this.t={...this.t,selectPage:"Select page",backToSiteList:"Back to site list",listMySites:"List my sites",cancel:"Cancel",editDetails:"Page details",add:"Add",editSettings:"Edit settings",source:"Source",viewSource:"View source",findMedia:"Find media",undo:"Undo",redo:"Redo",media:"Media",outline:"Outline",blocks:"Blocks",addBlock:"Add block",addPage:"Add page",addChildPage:"Add child page",clonePage:"Clone page",importDocxFile:"Import docx file",delete:"Delete page",siteSettings:"Site settings",close:"Close",settings:"Settings",editPage:"Edit page",edit:"Edit",configureBlock:"Configure block",configure:"Configure",save:"Save",home:"Home",saveChanges:"Save changes",startNewJourney:"Start new journey",newJourney:"New Journey",accountInfo:"Account Info",outlineDesigner:"Outline designer",pageOutline:"Page outline",more:"More",siteActions:"Site actions",insights:"Insights dashboard",merlin:"Merlin",summonMerlin:"Summon Merlin",logOut:"Log out",menu:"Menu",showMore:"More"},void 0!==window.speechSynthesis&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition)&&(m.voiceSearch=!0),m.icon="hax:wizard-hat",m.appendContext("*"),m.allowedCallback=()=>!(!a(l.appReady)||!a(l.isLoggedIn)),m.questionTags=[{value:"*",label:"List everything I can do"},{value:"?",label:"HELP!"}],m.defineOption({title:"Tour of top menu buttons",icon:"help",tags:["Help","ui","tour"],priority:-1e3,value:{target:this,method:"helpClick",args:[]},eventName:"super-daemon-element-method",path:"HAX/app/tour",context:["*","?"]}),m.defineOption({title:"Unlock hidden features",icon:"hax:hax2022",tags:["Developer","features","hidden"],value:{target:this,method:"fireUnlocked",args:[]},eventName:"super-daemon-element-method",path:">developer/hax/unlockAll",context:[">"]}),m.defineOption({title:"Unlock terrible 2000s themes",icon:"hax:table-multiple",tags:["Developer","terrible","2000","tables"],value:{target:this,method:"fireTerrible",args:[]},eventName:"super-daemon-element-method",path:">developer/hax/terrible2000s",context:[">"]}),m.defineOption({title:"Go to site",icon:"hax:hax2022",tags:["Sites","Administration","change"],eventName:"super-daemon-run-program",path:"HAX/action/goToSite",value:{name:"Go to site",program:async(e,t)=>{let o=[];return a(l.manifest.items).forEach((async t=>{(""==e||t.metadata.site&&t.metadata.site.name&&t.metadata.site.name.includes(e))&&o.push({title:t.title,icon:t.metadata.theme&&t.metadata.theme.variables&&t.metadata.theme.variables.icon?t.metadata.theme.variables.icon:"hax:hax2022",tags:["site",t.description],value:{target:this,method:"goToLocation",args:[t.slug]},eventName:"super-daemon-element-method",context:["*","HAX/action/goToSite/"+t.metadata.site.name],path:"HAX/action/goToSite/"+t.metadata.site.name})})),o}},context:["*"]}),m.defineOption({title:"Join our Community",icon:"hax:discord",priority:-100,tags:["community","discord","chat","help"],value:{target:this,method:"_openExternalLink",args:["https://bit.ly/hax-discord"]},eventName:"super-daemon-element-method",path:"HAX/community/join",context:["logged-in","CMS","HAX","?","*"]}),m.defineOption({title:"User Tutorials",icon:"hax:hax2022",priority:-1e3,tags:["Documentation","community","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/tutorials"]},eventName:"super-daemon-element-method",path:"HAX/community/tutorials",context:["logged-in","CMS","HAX","?","*"]}),m.defineOption({title:"User Documentation",icon:"hax:hax2022",tags:["Documentation","community","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/documentation"]},eventName:"super-daemon-element-method",path:"HAX/community/documentation",context:["logged-in","CMS","HAX","?","*"]}),m.defineOption({title:"HAX Teaching Excellence",icon:"hax:hax2022",tags:["Ontology","community","pedagogy","documentation","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/ontology"]},eventName:"super-daemon-element-method",path:"HAX/community/pedagogy",context:["logged-in","CMS","HAX","?","*"]}),m.defineOption({title:"Bug / issue",icon:"mdi-social:github-circle",tags:["Bug report","github","git","community","issue queue"],value:{target:this,method:"_haxStoreContribute",args:["bug","POP,bug"]},eventName:"super-daemon-element-method",path:"HAX/community/contribute",context:["logged-in","CMS","HAX","?","*"]}),m.defineOption({title:"Idea / Feature request",icon:"mdi-social:github-circle",tags:["Feature request","idea","github","git","community","issue queue"],value:{target:this,method:"_haxStoreContribute",args:["feature","POP,enhancement"]},context:["logged-in","CMS","HAX","?","*"],eventName:"super-daemon-element-method",path:"HAX/community/contribute"}),this.windowControllers=new AbortController,this.__tour=c,this.__tour.registerNewTour({key:"hax",name:"HAX top menu",style:"\n simple-popover-manager::part(simple-popover) {\n max-width: 250px;\n font-family: sans-serif;\n }\n simple-popover-manager button {\n font-family: sans-serif;\n font-size: 12px;\n margin: 0px 2px;\n color: var(--simple-colors-default-theme-grey-12);\n }\n simple-popover-manager p {\n font-family: sans-serif;\n padding: 0;\n margin: 0;\n width: 250px;\n font-size: 10px;\n line-height: 20px;\n }\n simple-popover-manager h1 {\n font-family: sans-serif;\n margin: 0;\n font-size: 12px;\n width: 250px;\n padding: 0;\n }\n simple-popover-manager::part(simple-popover-body),\n simple-popover-manager::part(simple-popover-heading) {\n color: black;\n background-color: white;\n font-family: sans-serif;\n }\n body.dark-mode simple-popover-manager::part(simple-popover-body),\n body.dark-mode simple-popover-manager::part(simple-popover-heading) {\n color: white;\n background-color: black;\n font-family: sans-serif;\n }\n body.dark-mode simple-popover-manager simple-icon-button-lite {\n color: white;\n background-color: black;\n font-family: sans-serif;\n }\n "}),this.tourName="hax",i((()=>{const e=a(l.activeItem);e&&e.title&&l.setPageTitle(e.title)})),i((()=>{this.siteReady=a(l.siteReady)})),i((()=>{const e=a(l.badDevice);!1===e?(import("../rpg-character/rpg-character.js"),import("./lib/random-word/random-word.js")):!0===e&&document.body.classList.add("bad-device")})),this.userMenuOpen=!1,this.courses=[],this.activeItem={},this.phrases={new:["What's ya name?","HAX to the moon","Welcome to the Jungle","We like to party","Build something awesome","Everything is awesome!","Everything is cool","When you're part of the team","When you're living our dream","Welcome to the up-side-down"],return:["Welcome back, take 2?","That wasn't very long","Stranger thiings have happened","Student driven platform","Faculty centered platform","Instructional designer influenced platform","Free, Open, Community driven","One brick at a time..","Sup?","You again? Awesome!","Let's do this","There can only be one ring...","There is another","Fancy that, I love HAX and you show up"]},this.isNewUser=null,this.basePath="/",this.searchTerm="",this.appMode="",this.soundIcon="",this.store=l,this.sound=new Audio,i((()=>{this.isNewUser=a(l.isNewUser),this.isNewUser&&"create"!==a(l.appMode)&&"404"!==a(l.appMode)&&(l.appMode="create",setTimeout((()=>{l.createSiteSteps=!0}),0))})),i((()=>{this.userName=a(l.user.name)})),i((()=>{this.appMode=a(l.appMode)})),i((()=>{this.searchTerm=a(l.searchTerm)})),i((async()=>{const e=a(l.location);e&&e.route&&(e.route.step?(l.appMode="create",l.createSiteSteps=!0):e.route.slug?(this.reset(),setTimeout((()=>{window.location=e.route.slug}),0)):"404"===e.route.name?(l.createSiteSteps=!1,l.appMode="404",setTimeout((()=>{l.toast("the page miss.. it burns!!!",3e3,{fire:!0,walking:!0})}),500)):"home"!==e.route.name&&"search"!==e.route.name||(l.appMode="home",l.createSiteSteps=!1))})),i((()=>{l.routes.length>0&&null===l.location&&(l.location=a(l.routes[0]))})),null===s("app-hax-darkMode",null)&&(l.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches),i((()=>{n("app-hax-darkMode",a(l.darkMode)),requestAnimationFrame((()=>{a(l.darkMode)?(document.body.classList.add("dark-mode"),l.toast("I'm ascared of the dark",2e3,{fire:!0}),this.dark=!0,m.dark=!0,m.toastInstance.darkMode=!0):(document.body.classList.remove("dark-mode"),l.toast("Sunny day it is",2e3,{hat:"random"}),this.dark=!1,m.dark=!1,m.toastInstance.darkMode=!1)}))})),i((()=>{const e=a(l.appMode);e&&(document.body.classList.remove("app-hax-search"),document.body.classList.remove("app-hax-create"),document.body.classList.remove("app-hax-404"),document.body.classList.remove("app-hax-home"),document.body.classList.add(`app-hax-${e}`))}))}static get properties(){return{...super.properties,unlockComingSoon:{type:Boolean},unlockTerrible:{type:Boolean},courses:{type:Array},userName:{type:String},activeItem:{type:Object},soundIcon:{type:String},searchTerm:{type:String},appMode:{type:String},isNewUser:{type:Boolean},phrases:{type:Object},userMenuOpen:{type:Boolean},siteReady:{type:Boolean},basePath:{type:String,attribute:"base-path"},token:{type:String}}}reset(e=!1){try{window.localStorage.removeItem("app-hax-step"),window.localStorage.removeItem("app-hax-site"),e&&(document.querySelector("base")?window.location=document.querySelector("base").href:window.location.reload())}catch(e){}}fireTerrible(){this.unlockTerrible=!0,l.appEl.playSound("coin").then((()=>{l.appEl.playSound("coin2").then((()=>{l.appEl.playSound("success").then((()=>{m.merlinSpeak("Enjoy these early 2000s table based layouts. May they remind you how never to web, again.")}))}))}))}fireUnlocked(){this.unlockComingSoon=!0,l.appEl.playSound("coin").then((()=>{l.appEl.playSound("coin2").then((()=>{l.appEl.playSound("success").then((()=>{m.merlinSpeak("Unbelievable! You, (Subject Name), must be the pride of (Subject Hometown). Enjoy all locked features as a boon!")}))}))}))}logout(){window.dispatchEvent(new CustomEvent("jwt-login-logout",{composed:!0,bubbles:!0,cancelable:!1,detail:!0})),this.closeMenu(),this.__logoutUserAction=!0}_jwtLoggedIn(e){!1===e.detail&&this.__logoutUserAction&&(this.__logoutUserAction=!1,setTimeout((()=>{this.reset(!0)}),100))}login(){import("./lib/v1/app-hax-site-login.js").then((()=>{const e=document.createElement("app-hax-site-login");if(this.querySelector('[slot="externalproviders"]')){const t=this.querySelector('[slot="externalproviders"]').cloneNode(!0);e.appendChild(t)}import("../simple-modal/simple-modal.js").then((()=>{setTimeout((()=>{this.dispatchEvent(new CustomEvent("simple-modal-show",{bubbles:!0,cancelable:!0,composed:!0,detail:{title:"< login >",elements:{content:e},modal:!0,styles:{"--simple-modal-titlebar-background":"transparent","--simple-modal-titlebar-color":"black","--simple-modal-width":"40vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"62vh","--simple-modal-min-height":"400px","--simple-modal-titlebar-height":"64px"}}}))}),0)}))}))}static get styles(){return[...super.styles,e` +import{css as e,html as t,unsafeCSS as o}from"../../lit/index.js";import{toJS as a,autorun as i}from"../../mobx/dist/mobx.esm.js";import{localStorageSet as n,localStorageGet as s}from"../utils/utils.js";import"../simple-tooltip/simple-tooltip.js";import{SimpleColors as r}from"../simple-colors/simple-colors.js";import{store as l}from"./lib/v1/AppHaxStore.js";import{I18NMixin as p}from"../i18n-manager/lib/I18NMixin.js";import{AppHaxAPI as d}from"./lib/v1/AppHaxBackendAPI.js";import{SimpleTourManager as c}from"../simple-popover/lib/simple-tour.js";import{SuperDaemonInstance as m}from"../super-daemon/super-daemon.js";import"../simple-toolbar/lib/simple-toolbar-button.js";import"../simple-colors-shared-styles/simple-colors-shared-styles.js";import"./lib/v1/AppHaxRouter.js";import"./lib/v1/app-hax-label.js";import"./lib/v1/app-hax-top-bar.js";import{SimpleTourFinder as h}from"../simple-popover/lib/SimpleTourFinder.js";const u=new URL("./lib/assets/images/Logout.svg",import.meta.url).href;function darkToggle(e){e.matches?l.darkMode=!0:l.darkMode=!1}function soundToggle(){l.soundStatus=!a(l.soundStatus),n("app-hax-soundStatus",a(l.soundStatus)),l.appEl.playSound("click")}export class AppHax extends(p(h(r))){static get tag(){return"app-hax"}_openExternalLink(e){window.open(e,"_blank")}async _haxStoreContribute(e,t,o=null){let a="";if("merlin"==e){var i=`[${e}] New command request from HAX daemon`;a=`Location: ${window.location.href}\nMerlin command: ${o}\nWhat did you want merlin to do?\n`}else{i=`[${e}] User report from HAX daemon`;if(a=`Location: ${window.location.href}\nBrowser: ${navigator.userAgent}\nOS: ${navigator.userAgentData.platform} - ${navigator.deviceMemory}GB RAM - ${navigator.hardwareConcurrency} cores\nScreen: ${window.screen.width}x${window.screen.height}\nWindow size: ${window.innerWidth}x${window.innerHeight}\n`,navigator.getBattery){a+=`Battery: ${100*(await navigator.getBattery()).level}%\n`}navigator.connection&&navigator.connection.effectiveType&&(a+=`Connection: ${navigator.connection.effectiveType}\n`),a+=("feature"==e?"Your idea:":"Bug you experienced:")+"\n"}window.open(`https://github.com/elmsln/issues/issues/new?assignees=&labels=${t}&template=issue-report.md&title=${i}&body=${encodeURIComponent(a)}`,"_blank")}playSound(e="coin2"){return new Promise((t=>{if(l.soundStatus&&l.appReady){let o=["click","click2","coin","coin2","hit","success"].includes(e)?e:"hit";this.audio=new Audio(new URL(`./lib/assets/sounds/${o}.mp3`,import.meta.url).href),this.audio.volume=.3,this.audio.onended=e=>{t()},this.audio.play(),setTimeout((()=>{t()}),1e3)}else t()}))}_tokenRefreshFailed(e){window.dispatchEvent(new CustomEvent("jwt-login-logout",{composed:!0,bubbles:!0,cancelable:!1,detail:!0})),setTimeout((()=>{this.reset(!0)}),100)}connectedCallback(){super.connectedCallback(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",darkToggle,{signal:this.windowControllers.signal}),window.addEventListener("jwt-logged-in",this._jwtLoggedIn.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("jwt-login-refresh-error",this._tokenRefreshFailed.bind(this),{signal:this.windowControllers.signal})}goToLocation(e){window.location=e}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}constructor(){super(),this.unlockComingSoon=!1,this.unlockTerrible=!1,this.t=this.t||{},this.t={...this.t,selectPage:"Select page",backToSiteList:"Back to site list",listMySites:"List my sites",cancel:"Cancel",editDetails:"Page details",add:"Add",editSettings:"Edit settings",source:"Source",viewSource:"View source",findMedia:"Find media",undo:"Undo",redo:"Redo",media:"Media",outline:"Outline",blocks:"Blocks",addBlock:"Add block",addPage:"Add page",addChildPage:"Add child page",clonePage:"Clone page",delete:"Delete page",siteSettings:"Site settings",close:"Close",settings:"Settings",edit:"Edit",configureBlock:"Configure block",configure:"Configure",save:"Save",home:"Home",startNewJourney:"Start new journey",newJourney:"New Journey",accountInfo:"Account Info",outlineDesigner:"Outline designer",pageOutline:"Page outline",more:"More",siteActions:"Site actions",insights:"Insights dashboard",merlin:"Merlin",summonMerlin:"Summon Merlin",logOut:"Log out",menu:"Menu",showMore:"More"},void 0!==window.speechSynthesis&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition||window.oSpeechRecognition)&&(m.voiceSearch=!0),m.icon="hax:wizard-hat",m.appendContext("*"),m.allowedCallback=()=>!(!a(l.appReady)||!a(l.isLoggedIn)),m.defineOption({title:"Tour of top menu buttons",icon:"help",tags:["Help","ui","tour"],priority:-1e3,value:{target:this,method:"helpClick",args:[]},eventName:"super-daemon-element-method",path:"HAX/app/tour",context:["*"]}),m.defineOption({title:"Unlock hidden features",icon:"hax:hax2022",tags:["Developer","features","hidden"],value:{target:this,method:"fireUnlocked",args:[]},eventName:"super-daemon-element-method",path:">developer/hax/unlockAll",context:[">"]}),m.defineOption({title:"Unlock terrible 2000s themes",icon:"hax:table-multiple",tags:["Developer","terrible","2000","tables"],value:{target:this,method:"fireTerrible",args:[]},eventName:"super-daemon-element-method",path:">developer/hax/terrible2000s",context:[">"]}),m.defineOption({title:"Go to site",icon:"hax:hax2022",tags:["Sites","Administration","change"],eventName:"super-daemon-run-program",path:"HAX/action/goToSite",value:{name:"Go to site",program:async(e,t)=>{let o=[];return a(l.manifest.items).forEach((async t=>{(""==e||t.metadata.site&&t.metadata.site.name&&t.metadata.site.name.includes(e))&&o.push({title:t.title,icon:t.metadata.theme&&t.metadata.theme.variables&&t.metadata.theme.variables.icon?t.metadata.theme.variables.icon:"hax:hax2022",tags:["site",t.description],value:{target:this,method:"goToLocation",args:[t.slug]},eventName:"super-daemon-element-method",context:["*","HAX/action/goToSite/"+t.metadata.site.name],path:"HAX/action/goToSite/"+t.metadata.site.name})})),o}},context:["*"]}),m.defineOption({title:"Join our Community",icon:"hax:discord",priority:-100,tags:["community","discord","chat","help"],value:{target:this,method:"_openExternalLink",args:["https://bit.ly/hax-discord"]},eventName:"super-daemon-element-method",path:"HAX/community/join",context:["logged-in","CMS","HAX","*"]}),m.defineOption({title:"User Tutorials",icon:"hax:hax2022",priority:-1e3,tags:["Documentation","community","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/tutorials"]},eventName:"super-daemon-element-method",path:"HAX/community/tutorials",context:["logged-in","CMS","HAX","*"]}),m.defineOption({title:"User Documentation",icon:"hax:hax2022",tags:["Documentation","community","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/documentation"]},eventName:"super-daemon-element-method",path:"HAX/community/documentation",context:["logged-in","CMS","HAX","*"]}),m.defineOption({title:"HAX Teaching Excellence",icon:"hax:hax2022",tags:["Ontology","community","pedagogy","documentation","help"],value:{target:this,method:"_openExternalLink",args:["https://oer.hax.psu.edu/bto108/sites/haxcellence/ontology"]},eventName:"super-daemon-element-method",path:"HAX/community/pedagogy",context:["logged-in","CMS","HAX","*"]}),m.defineOption({title:"Bug / issue",icon:"mdi-social:github-circle",tags:["Bug report","github","git","community","issue queue"],value:{target:this,method:"_haxStoreContribute",args:["bug","POP,bug"]},eventName:"super-daemon-element-method",path:"HAX/community/contribute",context:["logged-in","CMS","HAX","*"]}),m.defineOption({title:"Idea / Feature request",icon:"mdi-social:github-circle",tags:["Feature request","idea","github","git","community","issue queue"],value:{target:this,method:"_haxStoreContribute",args:["feature","POP,enhancement"]},context:["logged-in","CMS","HAX","*"],eventName:"super-daemon-element-method",path:"HAX/community/contribute"}),this.windowControllers=new AbortController,this.__tour=c,this.__tour.registerNewTour({key:"hax",name:"HAX top menu",style:"\n simple-popover-manager::part(simple-popover) {\n max-width: 250px;\n font-family: sans-serif;\n }\n simple-popover-manager button {\n font-family: sans-serif;\n font-size: 12px;\n margin: 0px 2px;\n color: var(--simple-colors-default-theme-grey-12);\n }\n simple-popover-manager p {\n font-family: sans-serif;\n padding: 0;\n margin: 0;\n width: 250px;\n font-size: 10px;\n line-height: 20px;\n }\n simple-popover-manager h1 {\n font-family: sans-serif;\n margin: 0;\n font-size: 12px;\n width: 250px;\n padding: 0;\n }\n simple-popover-manager::part(simple-popover-body),\n simple-popover-manager::part(simple-popover-heading) {\n color: black;\n background-color: white;\n font-family: sans-serif;\n }\n body.dark-mode simple-popover-manager::part(simple-popover-body),\n body.dark-mode simple-popover-manager::part(simple-popover-heading) {\n color: white;\n background-color: black;\n font-family: sans-serif;\n }\n body.dark-mode simple-popover-manager simple-icon-button-lite {\n color: white;\n background-color: black;\n font-family: sans-serif;\n }\n "}),this.tourName="hax",i((()=>{const e=a(l.activeItem);e&&e.title&&l.setPageTitle(e.title)})),i((()=>{this.siteReady=a(l.siteReady)})),i((()=>{const e=a(l.badDevice);!1===e?(import("../rpg-character/rpg-character.js"),import("./lib/random-word/random-word.js")):!0===e&&document.body.classList.add("bad-device")})),this.userMenuOpen=!1,this.courses=[],this.activeItem={},this.phrases={new:["What's ya name?","HAX to the moon","Welcome to the Jungle","We like to party","Build something awesome","Everything is awesome!","Everything is cool","When you're part of the team","When you're living our dream","Welcome to the up-side-down"],return:["Welcome back, take 2?","That wasn't very long","Stranger thiings have happened","Student driven platform","Faculty centered platform","Instructional designer influenced platform","Free, Open, Community driven","One brick at a time..","Sup?","You again? Awesome!","Let's do this","There can only be one ring...","There is another","Fancy that, I love HAX and you show up"]},this.isNewUser=null,this.basePath="/",this.searchTerm="",this.appMode="",this.soundIcon="",this.store=l,this.sound=new Audio,i((()=>{this.isNewUser=a(l.isNewUser),this.isNewUser&&"create"!==a(l.appMode)&&"404"!==a(l.appMode)&&(l.appMode="create",setTimeout((()=>{l.createSiteSteps=!0}),0))})),i((()=>{this.userName=a(l.user.name)})),i((()=>{this.appMode=a(l.appMode)})),i((()=>{this.searchTerm=a(l.searchTerm)})),i((async()=>{const e=a(l.location);e&&e.route&&(e.route.step?(l.appMode="create",l.createSiteSteps=!0):e.route.slug?(this.reset(),setTimeout((()=>{window.location=e.route.slug}),0)):"404"===e.route.name?(l.createSiteSteps=!1,l.appMode="404",setTimeout((()=>{l.toast("the page miss.. it burns!!!",3e3,{fire:!0,walking:!0})}),500)):"home"!==e.route.name&&"search"!==e.route.name||(l.appMode="home",l.createSiteSteps=!1))})),i((()=>{l.routes.length>0&&null===l.location&&(l.location=a(l.routes[0]))})),null===s("app-hax-darkMode",null)&&(l.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches),i((()=>{n("app-hax-darkMode",a(l.darkMode)),requestAnimationFrame((()=>{a(l.darkMode)?(document.body.classList.add("dark-mode"),l.toast("I'm ascared of the dark",2e3,{fire:!0}),this.dark=!0,m.dark=!0,m.toastInstance.darkMode=!0):(document.body.classList.remove("dark-mode"),l.toast("Sunny day it is",2e3,{hat:"random"}),this.dark=!1,m.dark=!1,m.toastInstance.darkMode=!1)}))})),i((()=>{const e=a(l.appMode);e&&(document.body.classList.remove("app-hax-search"),document.body.classList.remove("app-hax-create"),document.body.classList.remove("app-hax-404"),document.body.classList.remove("app-hax-home"),document.body.classList.add(`app-hax-${e}`))}))}static get properties(){return{...super.properties,unlockComingSoon:{type:Boolean},unlockTerrible:{type:Boolean},courses:{type:Array},userName:{type:String},activeItem:{type:Object},soundIcon:{type:String},searchTerm:{type:String},appMode:{type:String},isNewUser:{type:Boolean},phrases:{type:Object},userMenuOpen:{type:Boolean},siteReady:{type:Boolean},basePath:{type:String,attribute:"base-path"},token:{type:String}}}reset(e=!1){try{window.localStorage.removeItem("app-hax-step"),window.localStorage.removeItem("app-hax-site"),e&&(document.querySelector("base")?window.location=document.querySelector("base").href:window.location.reload())}catch(e){}}fireTerrible(){this.unlockTerrible=!0,l.appEl.playSound("coin").then((()=>{l.appEl.playSound("coin2").then((()=>{l.appEl.playSound("success").then((()=>{m.merlinSpeak("Enjoy these early 2000s table based layouts. May they remind you how never to web, again.")}))}))}))}fireUnlocked(){this.unlockComingSoon=!0,l.appEl.playSound("coin").then((()=>{l.appEl.playSound("coin2").then((()=>{l.appEl.playSound("success").then((()=>{m.merlinSpeak("Unbelievable! You, (Subject Name), must be the pride of (Subject Hometown). Enjoy all locked features as a boon!")}))}))}))}logout(){window.dispatchEvent(new CustomEvent("jwt-login-logout",{composed:!0,bubbles:!0,cancelable:!1,detail:!0})),this.closeMenu(),this.__logoutUserAction=!0}_jwtLoggedIn(e){!1===e.detail&&this.__logoutUserAction&&(this.__logoutUserAction=!1,setTimeout((()=>{this.reset(!0)}),100))}login(){import("./lib/v1/app-hax-site-login.js").then((()=>{const e=document.createElement("app-hax-site-login");if(this.querySelector('[slot="externalproviders"]')){const t=this.querySelector('[slot="externalproviders"]').cloneNode(!0);e.appendChild(t)}import("../simple-modal/simple-modal.js").then((()=>{setTimeout((()=>{this.dispatchEvent(new CustomEvent("simple-modal-show",{bubbles:!0,cancelable:!0,composed:!0,detail:{title:"< login >",elements:{content:e},modal:!0,styles:{"--simple-modal-titlebar-background":"transparent","--simple-modal-titlebar-color":"black","--simple-modal-width":"40vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"62vh","--simple-modal-min-height":"400px","--simple-modal-titlebar-height":"64px"}}}))}),0)}))}))}static get styles(){return[...super.styles,e` :host { display: block; --app-hax-background-color-active: var(--app-hax-accent-color); diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js new file mode 100644 index 0000000000..525df449bf --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js @@ -0,0 +1,615 @@ +/** + * Copyright 2020 The Pennsylvania State University + * @license Apache-2.0, see License.md for full text. + */ +import{html as e,css as t,unsafeCSS as o}from"../../../lit/index.js";import{HAXCMSLitElementTheme as i}from"../../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSThemeParts as n}from"../../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{HAXCMSRememberRoute as a}from"../../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{QRCodeMixin as s}from"../../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as r}from"../../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{store as l}from"../../haxcms-elements/lib/core/haxcms-site-store.js";import{autorun as m,toJS as d}from"../../../mobx/dist/mobx.esm.js";import"../../scroll-button/scroll-button.js";import"../../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import{SimpleColorsSuper as c}from"../../simple-colors/simple-colors.js";import{PrintBranchMixin as p}from"../../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{PDFPageMixin as h}from"../../haxcms-elements/lib/core/utils/PDFPageMixin.js";import"../../haxcms-elements/lib/ui-components/navigation/site-menu-button.js";class AppHaxTheme extends(a(p(h(s(n(r(c(i)))))))){static get styles(){return[...super.styles,t` + :host { + color: #242A31; + width: 100%; + margin: 0; + display: flex; + padding: 0; + min-height: 100vh; + flex-direction: column; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + font-size: 18px; + font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + letter-spacing: normal; + line-height: 28.8px; + --haxcms-base-styles-body-font-size:18px; + --hax-base-styles-a-font-size: 18px; + --hax-base-styles-p-font-size: 18px; + --hax-base-styles-list-font-size: 18px; + --haxcms-base-styles-body-font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + --haxcms-base-styles-body-line-height: 28.8px; + --hax-base-styles-list-line-height: 28.8px + --hax-base-styles-p-line-height: 28.8px; + --hax-base-styles-p-letter-spacing: normal; + --haxcms-base-styles-body-letter-spacing : normal; + --hax-base-styles-p-min-height: auto; + --hax-base-styles-list-max-width: auto; + --haxcms-base-styles-p-min-height: auto; + --hax-base-styles-list-padding-bottom: auto; + --hax-base-styles-h1-font-size: inherit; + --hax-base-styles-h2-font-size: inherit; + --hax-base-styles-h3-font-size: inherit; + --hax-base-styles-h4-font-size: inherit; + --hax-base-styles-h5-font-size: inherit; + --hax-base-styles-h6-font-size: inherit; + --simple-tooltip-background: #000000; + --simple-tooltip-opacity: 1; + --simple-tooltip-text-color: #ffffff; + --simple-tooltip-delay-in: 0; + --simple-tooltip-border-radius: 0; + } + #haxcmsmobilemenunav { + height: 100vh; + overflow-y: auto; + } + scroll-button, + site-breadcrumb { + color: var(--haxcms-user-styles-color-theme-color-1); + } + * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: transparent; + -webkit-text-size-adjust: none; + -webkit-touch-callout: none; + -webkit-font-smoothing: antialiased; + } + /* links */ + + a { + text-decoration: none; + } + a:hover, + a:focus, + a:active { + outline: thin dotted; + } + a:-webkit-any-link { + color: -webkit-link; + cursor: pointer; + text-decoration: underline; + } + :host([menu-open]) .menu-outline { + left: 0; + } + .menu-outline { + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + position: absolute; + top: 0; + left: -300px; + bottom: 0; + z-index: 1; + overflow-y: hidden; + width: 300px; + color: #364149; + background-color: #ffffffEE; + border-right: 1px solid rgba(0,0,0,.07); + transition: left 250ms ease; + } + :host([dark]) .menu-outline { + color: white; + background-color: #000000AA; + } + /* content */ + .main-section h1 { + font-size: 2em; + } + :host([edit-mode]) .main-section { + outline: 1px solid grey; + outline-offset: 20px; + } + .main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 { + margin-top: 1.275em; + margin-bottom: .85em; + font-weight: 700; + } + .main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5 { + page-break-after: avoid; + } + :host([responsive-size="xs"][menu-open]) .pull-right { + display: none; + } + .pull-right { + top: 0px; + right: 16px; + position: fixed; + } + .main-content *, + .main-content ::slotted(*) { + box-sizing: border-box; + -webkit-box-sizing: border-box; + font-size: inherit; + } + @media (prefers-reduced-motion: reduce) { + .site-body, + .navigation, + .menu-outline { + transition: none !important; + } + } + + :host([menu-open]) .site-body { + left: 300px; + } + .site-body { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + min-width: 400px; + overflow-y: auto; + transition: left 250ms ease; + } + + :host([responsive-size="xs"]) .page-inner, + :host([responsive-size="sm"]) .page-inner, + :host([responsive-size="md"]) .page-inner, + :host([responsive-size="lg"]) .page-inner { + padding: 48px 0px 48px 28px; + } + :host([responsive-size="sm"]) .site-inner { + padding: 0px 24px; + } + + :host([responsive-size="xs"]) .page-inner { + overflow-x: auto; + } + @media screen and (max-width: 640px) { + site-breadcrumb { + display: none; + } + .site-header { + padding: 0px; + } + .header { + height: 0px; + } + .main-content site-active-title h1 { + height: 48px; + overflow: hidden; + margin-top: 64px; + text-overflow: ellipsis; + word-break: break-all; + margin-top: 64px; + margin-bottom: 8px; + } + } + h1 { + font-size: 2em; + margin: .67em 0; + } + .main-content h2 { + font-size: 1.75em; + } + .main-content h3 { + font-size: 1.5em; + } + .main-content h4 { + font-size: 1.25em; + } + .main-content h5 { + font-size: 1em; + } + .main-content h6 { + font-size: 1em; + color: #777; + } + .main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 { + margin-top: 1.275em; + margin-bottom: .85em; + font-weight: 700; + } + + .main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5 { + page-break-after: avoid; + } + .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content p { + orphans: 3; + widows: 3; + } + .main-content blockquote, .main-content dl, .main-content ol, .main-content p, .main-content table, .main-content ul { + margin-top: 0; + margin-bottom: .85em; + } + .main-content ol, .main-content ul { + padding: 0; + margin: 0; + margin-bottom: .85em; + padding-left: 2em; + } + .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content p { + orphans: 3; + widows: 3; + } + article, aside, details, figcaption, figure, header, hgroup, main, nav, section, summary { + display: block; + } + footer { + display: flex; + max-width: 860px; + padding-bottom: 24px; + } + .site-header { + overflow: visible; + z-index: 2; + background: transparent; + position: fixed; + display: block; + padding: 0 16px; + } + @media (max-width: 1200px) { + .site-header { + height: 50px; + position: fixed; + width: 100vw; + background-color: white; + } + } + @media (max-width: 900px) { + footer { + position: fixed; + bottom: 0; + left: 0; + right: 0; + } + :host([menu-open]) footer { + left: 300px; + } + } + + @media (max-width: 700px){ + .link-actions { + display: none; + } + } + @media (max-width: 1240px){ + .site-body .body-inner { + position: static; + min-height: calc(100% - 98px); + } + } + @media (max-width: 1240px){ + .site-body { + padding-bottom: 20px; + } + } + .site-body .site-inner { + position: relative; + top: 0; + right: 0; + left: 0; + bottom: 0; + overflow-y: auto; + } + .main-content * { + box-sizing: border-box; + -webkit-box-sizing: border-box; + font-size: inherit; + } + .page-wrapper { + position: relative; + outline: 0; + } + .page-inner { + position: relative; + max-width: 840px; + margin: 0 24px; + min-height: 90vh; + padding: 20px 15px 40px 15px; + background-color: #ffffffAA; + } + :host([dark]) .page-inner { + color: white; + background-color: #000000AA; + } + .main-section { + display: block; + word-wrap: break-word; + color: var(--haxcms-user-styles-color-theme-color-color); + line-height: 1.7; + text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + -moz-text-size-adjust: 100%; + } + /* Navigation arrows */ + site-menu-button { + --site-menu-button-icon-width: 48px; + --site-menu-button-icon-height: 48px; + } + .main-content site-active-title h1 { + font-size: 36px; + margin: 20px 0; + text-rendering: optimizeLegibility; + } + .navigation { + margin: 0 auto; + display: flex; + justify-content: center; + align-content: center; + flex-direction: column; + font-size: 40px; + color: #ccc; + text-align: center; + } + @media screen and (max-width: 600px) { + #slot ::slotted(iframe) { + width: auto; + } + #slot ::slotted(h1), + #slot ::slotted(h2), + #slot ::slotted(h3) { + font-size: 1.5em !important; + } + #slot ::slotted(h4), + #slot ::slotted(h5), + #slot ::slotted(h6) { + font-size: 1.2em !important; + } + #slot ::slotted(replace-tag) { + overflow: hidden; + } + } + @media (max-width: 1240px) { + .navigation { + position: static; + margin: 0 auto; + display: inline-flex; + } + } + /* color,font,size switchers */ + + .site-header .font-settings .font-enlarge { + line-height: 30px; + font-size: 1.4em; + } + .site-header .font-settings .font-reduce { + line-height: 30px; + font-size: 1em; + } + .site-header .font-settings .font-reduce { + line-height: 30px; + font-size: 1em; + } + + .site-body { + overflow-y: scroll; + color: var(--haxcms-user-styles-color-theme-color-color); + } + button, select { + text-transform: none; + } + button, input { + line-height: normal; + } + button, input, select, textarea { + font-family: inherit; + font-size: 100%; + margin: 0; + } + scroll-button { + position: absolute; + bottom: 0; + right: 16px; + } + `]}render(){return e` +
+ +
+
+
+
+
+ ${this.HAXCMSMobileMenuButton()} + + + + +
+
+
+ +
+
+
+
+
+
+
+ + + +
+
+ +
+ `}static get tag(){return"app-hax-theme"}constructor(){super(),this.HAXCMSThemeSettings.autoScroll=!0,this.__disposer=this.__disposer?this.__disposer:[],m((e=>{this.activeManifestIndex=d(l.activeManifestIndex),this.__disposer.push(e)}))}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),document.body.style.overflow="hidden",this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector("#body"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,this.shadowRoot.querySelector("scroll-button").target=this.shadowRoot.querySelector("#haxcms-theme-top")}HAXCMSGlobalStyleSheetContent(){const e=new URL("./assets/images/LMGridBox.svg",import.meta.url).href,i=new URL("./assets/images/DMGridBox.svg",import.meta.url).href,n=new URL("./assets/images/DesignLightModeLeft.svg",import.meta.url).href,a=new URL("./assets/images/DesignLightModeRight.svg",import.meta.url).href,s=new URL("./assets/images/DesignDarkModeLeft.svg",import.meta.url).href,r=new URL("./assets/images/DesignDarkModeRight.svg",import.meta.url).href;return[...super.HAXCMSGlobalStyleSheetContent(),t` + body { + margin: 0; + padding: 0; + font-family: "Press Start 2P", sans-serif; + overflow-x: hidden; + background-image: url("${o(e)}"); + background-repeat: repeat; + background-position: center center; + background-size: auto, 20% auto, 20% auto; + --app-hax-accent-color: black; + --app-hax-background-color: white; + --simple-tooltip-background: #000000; + --simple-tooltip-opacity: 1; + --simple-tooltip-text-color: #ffffff; + --simple-tooltip-delay-in: 0; + --simple-tooltip-duration-in: 200ms; + --simple-tooltip-duration-out: 0; + --simple-tooltip-border-radius: 0; + --simple-tooltip-font-size: 14px; + } + body.app-hax-create { + overflow: hidden; + } + body.dark-mode { + background-color: black; + background-image: url("${o(i)}"); + --app-hax-accent-color: white; + --app-hax-background-color: black; + } + body:not(.bad-device) { + background-image: url("${o(e)}"), + url("${o(n)}"), + url("${o(a)}"); + background-repeat: repeat, repeat-y, repeat-y; + background-position: center center, top left, top right; + background-size: auto, 20% auto, 20% auto; + background-attachment: fixed, fixed, fixed; + } + div[slot="externalproviders"] { + display: none; + } + body div[slot="externalproviders"] { + display: unset; + } + body.dark-mode { + background-image: url("${o(i)}"), + url("${o(s)}"), + url("${o(r)}"); + } + + #loading { + font-family: "Press Start 2P", sans-serif; + text-align: center; + margin-top: 100px; + } + + #loading .title { + -webkit-text-stroke: 1px + var(--app-hax-accent-color, var(--accent-color)); + -webkit-text-fill-color: var( + --app-hax-background-color, + var(--background-color) + ); + font-weight: normal; + font-size: 4vw; + display: inline-flex; + align-items: center; + } + + #loading .subtitle { + color: var(--app-hax-accent-color, var(--accent-color)); + font-weight: normal; + margin-top: 2.5px; + font-size: 2vw; + } + + #loading .bracket { + font-size: 10vw; + font-weight: normal; + vertical-align: middle; + -webkit-text-stroke: 0px; + -webkit-text-fill-color: var( + --app-hax-accent-color, + var(--accent-color) + ); + } + + @media (min-width: 721px) { + :root { + background-size: auto, 23% auto, 23% auto; + } + } + + @media (min-width: 601px) and (max-width: 720px) { + :root { + background-size: auto, 26% auto, 26% auto; + } + } + + @media (min-width: 481px) and (max-width: 600px) { + :root { + background-size: auto, 30% auto, 30% auto; + } + } + + @media (min-width: 371px) and (max-width: 480px) { + :root { + background-size: auto, 35% auto, 35% auto; + } + } + + @media (max-width: 370px) { + :root { + background-size: auto, 37% auto, 37% auto; + } + } + .version { + position: fixed; + left: 0; + bottom: 0; + background-color: var(--simple-colors-default-theme-yellow-6); + display: inline-block; + padding: 8px; + color: var(--simple-colors-default-theme-grey-12); + border-right: 3px solid var(--simple-colors-default-theme-grey-12); + border-top: 3px solid var(--simple-colors-default-theme-grey-12); + } + body.dark-mode .version { + background-color: var(--simple-colors-default-theme-yellow-8); + color: var(--simple-colors-default-theme-grey-1); + border-right: 3px solid var(--simple-colors-default-theme-grey-1); + border-top: 3px solid var(--simple-colors-default-theme-grey-1); + } + simple-modal::part(title) { + background-color: transparent; + margin: 0; + padding: 0; + text-align: center; + font-size: 20px; + line-height: 20px; + color: black; + } + simple-modal button.hax-modal-btn { + font-size: 30px; + padding: 8px; + margin: 4px; + color: white; + background-color: green; + border: 4px solid black; + border-radius: 8px; + font-family: "Press Start 2P", sans-serif; + } + simple-modal button.hax-modal-btn.cancel { + background-color: red; + } + simple-modal button.hax-modal-btn:hover, + simple-modal button.hax-modal-btn:focus { + outline: 2px solid black; + cursor: pointer; + background-color: darkgreen; + } + simple-modal button.hax-modal-btn.cancel:hover, + simple-modal button.hax-modal-btn.cancel:focus { + background-color: darkred; + } + `]}disconnectedCallback(){for(var e in this.__disposer)this.__disposer[e].dispose();super.disconnectedCallback()}}customElements.define(AppHaxTheme.tag,AppHaxTheme);export{AppHaxTheme}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js index 523fe400e9..8feeaba154 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js @@ -1,4 +1,4 @@ -import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{SimpleToastEl as a}from"../../../simple-toast/lib/simple-toast-el.js";import"../../../rpg-character/rpg-character.js";import"../../../future-terminal-text/future-terminal-text.js";const l=new URL("./images/SpeechBubbleL.svg",import.meta.url).href,s=new URL("./images/SpeechBubbleMiddle.svg",import.meta.url).href,r=new URL("./images/SpeechBubbleR.svg",import.meta.url).href;export class RPGCharacterToast extends a{static get tag(){return"rpg-character-toast"}constructor(){super(),this.awaitingMerlinInput=!1,this.windowControllers=new AbortController,this.text="Saved",this.merlin=!1,this.classStyle="",this.future=!1,this.duration=3e3,this.accentColor="grey",this.dark=!1,this.eventCallback=null,this.fire=!1,this.hat="coffee",this.walking=!1}static get styles(){return[...super.styles,t` +import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{SimpleToastEl as a}from"../../../simple-toast/lib/simple-toast-el.js";import"../../../rpg-character/rpg-character.js";import"../../../future-terminal-text/future-terminal-text.js";const l=new URL("./images/SpeechBubbleL.svg",import.meta.url).href,s=new URL("./images/SpeechBubbleMiddle.svg",import.meta.url).href,r=new URL("./images/SpeechBubbleR.svg",import.meta.url).href;export class RPGCharacterToast extends a{static get tag(){return"rpg-character-toast"}constructor(){super(),this.awaitingMerlinInput=!1,this.windowControllers=new AbortController,this.text="Saved",this.closeText="Close",this.merlin=!1,this.classStyle="",this.future=!1,this.duration=3e3,this.accentColor="grey",this.dark=!1,this.eventCallback=null,this.fire=!1,this.hat="coffee",this.speed=500,this.walking=!1}static get styles(){return[...super.styles,t` :host([opened]) { display: flex; } @@ -6,7 +6,7 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S future-terminal-text { min-width: 300px; overflow-wrap: break-all; - text-elipsis: ellipsis; + text-overflow: ellipsis; line-height: 36px; font-size: 18px; text-align: left; @@ -57,17 +57,15 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S border: var(--simple-toast-border); z-index: var(--simple-toast-z-index, 10000000); font-size: var(--simple-toast-font-size, 18px); - font-family: "Press Start 2P", sans-serif; + font-family: sans-serif; font-weight: bold; text-align: center; vertical-align: middle; } rpg-character { - margin: 30px -30px 0 -30px; - width: 145px; - margin: 6px 0 0 0; - padding: 16px; - background-color: var(--simple-colors-default-theme-orange-1, orange); + width: 64px; + margin: 0; + padding: 0; } .bubble { height: 142px; @@ -79,15 +77,40 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S background-color: white; background-repeat: repeat-x; background-image: url("${i(s)}"); + padding: 54px 2px 0 2px; + display: block; + } + .message { + line-height: 16px; + font-size: 16px; + height: 16px; + display: block; + margin-bottom: 16px; + } + .buttons { + display: block; + line-height: 16px; + font-size: 16px; + height: 16px; + } + .dismiss { + padding: 4px; + font-weight: bold; + background-color: black; + color: white; + border: 4px solid black; + border-radius: none; + margin-left: 4px; + cursor: pointer; } .leftedge { background-image: url("${i(l)}"); - width: 24px; + width: 20px; background-color: white; } .rightedge { background-image: url("${i(r)}"); - width: 54px; + width: 40px; background-color: white; } :host([dark-mode]) .mid, @@ -95,40 +118,7 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S :host([dark-mode]) .rightedge { filter: invert(1); } - @media (max-width: 800px) { - :host { - --simple-toast-width: 80vw; - --simple-toast-font-size: 12px; - } - } - @media (max-width: 500px) { - :host { - height: 50px; - line-height: 50px; - border: none; - } - rpg-character { - display: none; - } - .rightedge { - display: none; - } - .leftedge { - display: none; - } - .mid { - height: 50px; - line-height: 50px; - background-image: unset; - } - .bubble { - height: 50px; - margin: 0; - border: 2px solid black; - border-radius: 5px; - } - } - `]}static get properties(){return{...super.properties,darkMode:{type:Boolean,reflect:!0,attribute:"dark-mode"},fire:{type:Boolean},hat:{type:String},walking:{type:Boolean},opened:{type:Boolean,reflect:!0},awaitingMerlinInput:{type:Boolean,attribute:"awaiting-merlin-input"},merlin:{type:Boolean},future:{type:Boolean},text:{type:String},classStyle:{type:String,attribute:"class-style"},duration:{type:Number},eventCallback:{type:String,attribute:"event-callback"}}}render(){return e`
+ `]}static get properties(){return{...super.properties,darkMode:{type:Boolean,reflect:!0,attribute:"dark-mode"},fire:{type:Boolean},hat:{type:String},walking:{type:Boolean},speed:{type:Number},opened:{type:Boolean,reflect:!0},awaitingMerlinInput:{type:Boolean,attribute:"awaiting-merlin-input"},merlin:{type:Boolean},future:{type:Boolean},text:{type:String},classStyle:{type:String,attribute:"class-style"},duration:{type:Number},eventCallback:{type:String,attribute:"event-callback"}}}render(){return e`
@@ -137,12 +127,17 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S glitch glitch-max="3" glitch-duration="40" - >`:e`${this.text}`} + >`:e`
${this.text}
`} ${this.awaitingMerlinInput?e``:""} - + ${this.merlin?"":e`
+ +
`}
${this.merlin?e` `:e` `} -
`}updated(t){super.updated(t),t.has("text")&&this.future&&this.shadowRoot.querySelector("future-terminal-text")&&(this.shadowRoot.querySelector("future-terminal-text").innerText=this.text,this.shadowRoot.querySelector("future-terminal-text")._doGlitch())}connectedCallback(){super.connectedCallback(),window.addEventListener("rpg-character-toast-hide",this.hideSimpleToast.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("rpg-character-toast-show",this.showSimpleToast.bind(this),{signal:this.windowControllers.signal})}hideSimpleToast(t){this.awaitingMerlinInput=!1,this.hide()}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}showSimpleToast(t){for(;null!==this.firstChild;)this.removeChild(this.firstChild);setTimeout((()=>{t.detail.slot&&this.appendChild(t.detail.slot)}),0),this.duration=t.detail.duration?t.detail.duration:4e3,this.fire=!!t.detail.fire&&t.detail.fire,this.hat=t.detail.hat?t.detail.hat:"coffee",this.merlin=!!t.detail.merlin&&t.detail.merlin,this.walking=!!t.detail.walking&&t.detail.walking,this.text=t.detail.text?t.detail.text:"Saved",this.future=!!t.detail.future&&t.detail.future,this.classStyle=t.detail.classStyle?t.detail.classStyle:"",this.eventCallback=t.detail.eventCallback?t.detail.eventCallback:null,this.dark=!!t.detail.dark&&t.detail.dark,this.accentColor=t.detail.accentColor?t.detail.accentColor:"grey",this.alwaysvisible=!!t.detail.alwaysvisible&&t.detail.alwaysvisible,t.detail.awaitingMerlinInput&&this.duration?setTimeout((()=>{this.style.animation="none",this.awaitingMerlinInput=t.detail.awaitingMerlinInput}),this.duration/2):this.awaitingMerlinInput=!1,this.show()}show(){this.opened||(this.opened=!0)}hide(){if(this.awaitingMerlinInput)this.style.animation="fadein 0.3s";else{if(this.eventCallback){const t=new CustomEvent(this.eventCallback,{bubbles:!0,cancelable:!0,detail:!0,composed:!0});this.dispatchEvent(t)}this.alwaysvisible?this.style.animation="fadein 0.3s":this.opened=!1}}}customElements.define(RPGCharacterToast.tag,RPGCharacterToast); \ No newline at end of file +
`}updated(t){super.updated(t),t.has("text")&&this.future&&this.shadowRoot.querySelector("future-terminal-text")&&(this.shadowRoot.querySelector("future-terminal-text").innerText=this.text,this.shadowRoot.querySelector("future-terminal-text")._doGlitch())}connectedCallback(){super.connectedCallback(),window.addEventListener("rpg-character-toast-hide",this.hideSimpleToast.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("rpg-character-toast-show",this.showSimpleToast.bind(this),{signal:this.windowControllers.signal})}hideSimpleToast(t){this.awaitingMerlinInput=!1,this.hide()}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}showSimpleToast(t){for(;null!==this.firstChild;)this.removeChild(this.firstChild);setTimeout((()=>{t.detail.slot&&this.appendChild(t.detail.slot)}),0),this.duration=t.detail.duration?t.detail.duration:4e3,this.fire=!!t.detail.fire&&t.detail.fire,this.hat=t.detail.hat?t.detail.hat:"coffee",this.merlin=!!t.detail.merlin&&t.detail.merlin,this.walking=!!t.detail.walking&&t.detail.walking,this.speed=t.detail.speed?t.detail.speed:500,this.text=t.detail.text?t.detail.text:"Saved",this.future=!!t.detail.future&&t.detail.future,this.classStyle=t.detail.classStyle?t.detail.classStyle:"",this.eventCallback=t.detail.eventCallback?t.detail.eventCallback:null,this.dark=!!t.detail.dark&&t.detail.dark,this.accentColor=t.detail.accentColor?t.detail.accentColor:"grey",this.alwaysvisible=!!t.detail.alwaysvisible&&t.detail.alwaysvisible,t.detail.awaitingMerlinInput&&this.duration?setTimeout((()=>{this.style.animation="none",this.awaitingMerlinInput=t.detail.awaitingMerlinInput}),this.duration/2):this.awaitingMerlinInput=!1,this.show()}show(){this.opened||(this.opened=!0)}hide(){if(this.awaitingMerlinInput)this.style.animation="fadein 0.3s";else{if(this.walking=!1,this.speed=500,this.eventCallback){const t=new CustomEvent(this.eventCallback,{bubbles:!0,cancelable:!0,detail:!0,composed:!0});this.dispatchEvent(t)}this.alwaysvisible?this.style.animation="fadein 0.3s":this.opened=!1}}}customElements.define(RPGCharacterToast.tag,RPGCharacterToast); \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-button.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-button.js index 6c2a4ed2b7..27ca9a54c8 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-button.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-button.js @@ -1,4 +1,4 @@ -import"../../../simple-icon/lib/simple-icon-lite.js";import"../../../hax-iconset/lib/simple-hax-iconset.js";import"../../../../wired-elements/lib/wired-button.js";import{html as t,css as e,LitElement as i}from"../../../../lit/index.js";const o=new URL("../assets/images/PostIt.svg",import.meta.url).href,a=new URL("../assets/images/BetaPostIt.svg",import.meta.url).href;export class AppHaxButton extends i{static get tag(){return"app-hax-button"}constructor(){super(),this.icon="save",this.type=null,this.value=null,this.disabled=!1,this.elevation=2,this.active=!1,this.comingSoon=!1,this.prompt=null,this.callback=null,this.param=null,this.beta=!1,this.addEventListener("click",this._handleClick),this.addEventListener("click",this._handleClick),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur),this.addEventListener("mouseover",this._handleFocus),this.addEventListener("mouseout",this._handleBlur)}_handleFocus(){this.disabled||this.comingSoon||(this.active=!0,this.elevation="4")}_handleBlur(){this.disabled||this.comingSoon||(this.active=!1,this.elevation="2")}_handleClick(){this.disabled||this.comingSoon||this.shadowRoot.querySelector(".haxButton").blur()}static get properties(){return{icon:{type:String},type:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},elevation:{type:Number},active:{type:Boolean,reflect:!0},comingSoon:{type:Boolean,reflect:!0,attribute:"coming-soon"},beta:{type:Boolean,reflect:!0},prompt:{type:String},callback:{type:String},param:{type:String}}}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),t.forEach(((t,e)=>{if("type"===e)switch(this.type){case"technology":this.icon="hardware:desktop-mac",this.value="technology";break;case"business":this.icon="maps:local-atm",this.value="business";break;case"art":this.icon="image:palette",this.value="art";break;case"6w":this.icon="hax:messages-6",this.value="6 Week";break;case"15w":this.icon="social:school",this.value="15 Week";break;case"training":this.icon="hax:bricks",this.value="Training";break;case"docx import":case"docx":this.icon="hax:file-docx",this.value="docx";break;case"evolution":this.icon="communication:business",this.value="evo";break;case"pressbooks":this.icon="hax:wordpress",this.value="pressbooks";break;case"gitbook":this.icon="mdi-social:github-circle",this.value="gitbook";break;case"elms:ln":this.icon="lrn:network",this.value="elmsln";break;case"haxcms":this.icon="hax:hax2022",this.value="haxcms";break;case"notion":this.icon="book",this.value="notion";break;case"Blog":this.icon="social:public",this.value="Blog";break;default:this.icon="image:photo-filter",this.value="own",this.type="Create Your Own"}}))}static get styles(){return[e` +import"../../../simple-icon/lib/simple-icon-lite.js";import"../../../hax-iconset/lib/simple-hax-iconset.js";import"../../../../wired-elements/lib/wired-button.js";import{html as t,css as e,LitElement as i}from"../../../../lit/index.js";const o=new URL("../assets/images/PostIt.svg",import.meta.url).href,a=new URL("../assets/images/BetaPostIt.svg",import.meta.url).href;export class AppHaxButton extends i{static get tag(){return"app-hax-button"}constructor(){super(),this.icon="save",this.type=null,this.value=null,this.disabled=!1,this.elevation=2,this.active=!1,this.comingSoon=!1,this.prompt=null,this.callback=null,this.param=null,this.beta=!1,this.addEventListener("click",this._handleClick),this.addEventListener("click",this._handleClick),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur),this.addEventListener("mouseover",this._handleFocus),this.addEventListener("mouseout",this._handleBlur)}_handleFocus(){this.disabled||this.comingSoon||(this.active=!0,this.elevation="4")}_handleBlur(){this.disabled||this.comingSoon||(this.active=!1,this.elevation="2")}_handleClick(){this.disabled||this.comingSoon||this.shadowRoot.querySelector(".haxButton").blur()}static get properties(){return{icon:{type:String},type:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},elevation:{type:Number},active:{type:Boolean,reflect:!0},comingSoon:{type:Boolean,reflect:!0,attribute:"coming-soon"},beta:{type:Boolean,reflect:!0},prompt:{type:String},callback:{type:String},param:{type:String}}}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),t.forEach(((t,e)=>{if("type"===e)switch(this.type){case"technology":this.icon="hardware:desktop-mac",this.value="technology";break;case"business":this.icon="maps:local-atm",this.value="business";break;case"art":this.icon="image:palette",this.value="art";break;case"6w":this.icon="hax:messages-6",this.value="6 Week";break;case"15w":this.icon="social:school",this.value="15 Week";break;case"training":this.icon="hax:bricks",this.value="Training";break;case"docx import":case"docx":this.icon="hax:file-docx",this.value="docx";break;case"evolution":this.icon="communication:business",this.value="evo";break;case"pressbooks":this.icon="hax:wordpress",this.value="pressbooks";break;case"gitbook":this.icon="mdi-social:github-circle",this.value="gitbook";break;case"elms:ln":this.icon="lrn:network",this.value="elmsln";break;case"haxcms":this.icon="hax:hax2022",this.value="haxcms";break;case"notion":this.icon="book",this.value="notion";break;case"html":this.icon="icons:code",this.value="HTML";break;case"Blog":this.icon="social:public",this.value="Blog";break;default:this.icon="image:photo-filter",this.value="own",this.type="Create Your Own"}}))}static get styles(){return[e` :host { display: block; --background-color: transparent; diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-steps.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-steps.js index 609a52b794..417d8b208a 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-steps.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/v1/app-hax-steps.js @@ -1,4 +1,4 @@ -import{html as t,css as e,unsafeCSS as s}from"../../../../lit/index.js";import{SimpleColors as i}from"../../../simple-colors/simple-colors.js";import{autorun as o,toJS as a}from"../../../../mobx/dist/mobx.esm.js";import{store as n}from"./AppHaxStore.js";import{localStorageSet as p}from"../../../utils/utils.js";import"../../../../scrollable-component/index.js";import"../../../simple-icon/lib/simple-icon-lite.js";import{MicroFrontendRegistry as r}from"../../../micro-frontend-registry/micro-frontend-registry.js";import{enableServices as l}from"../../../micro-frontend-registry/lib/microServices.js";import"./app-hax-site-button.js";import"./app-hax-hat-progress.js";import"./app-hax-button.js";const c=new URL("../assets/images/Home.svg",import.meta.url).href,h=new URL("../assets/images/DisabledCircle.svg",import.meta.url).href,d=new URL("../assets/images/TransparentCircle.svg",import.meta.url).href,m=new URL("../assets/images/EnabledCircle.svg",import.meta.url).href,u={portfolio:["haxor-slevin","bootstrap-theme"],course:["clean-one","clean-two","learn-two-theme"],website:["bootstrap-theme","outline-player","haxor-slevin"],import:["clean-one","clean-two","learn-two-theme"]};export class AppHaxSteps extends i{static get tag(){return"app-hax-steps"}constructor(){super(),this.unlockComingSoon=!1,this.unlockTerrible=!1,this.windowControllers=new AbortController,this.nameTyped="",this.stepRoutes=[],this._progressReady=!1,this.step=null,this.loaded=!1,this.themeNames=[],this.appSettings={},o((()=>{this.appSettings=a(n.appSettings);const t=a(n.site.structure);this.themeNames=Object.keys(this.appSettings.themes).filter((e=>t&&u[t]&&u[t].includes(e)))})),o((()=>{this.dark=a(n.darkMode)})),o((()=>{p("app-hax-step",a(n.step))})),o((()=>{p("app-hax-site",a(n.site)),this.step=n.stepTest(this.step)})),o((()=>{a(n.createSiteSteps)&&a(n.location)&&(this.step=n.stepTest(this.step))})),o((()=>{const t=a(n.routes);this.stepRoutes=t.filter((t=>t.step))}))}static get properties(){return{...super.properties,step:{type:Number,reflect:!0},stepRoutes:{type:Array},themeNames:{type:Array},unlockComingSoon:{type:Boolean,reflect:!0,attribute:"unlock-coming-soon"},unlockTerrible:{type:Boolean,reflect:!0,attribute:"unlock-terrible"},loaded:{type:Boolean,reflect:!0},appSettings:{type:Object},nameTyped:{type:String}}}chooseStructure(t){if(!t.target.comingSoon){const{value:e}=t.target;n.site.structure=e,"course"===e&&(n.site.type="own",n.site.theme="clean-one"),n.appEl.playSound("click2")}}chooseType(t){if(!t.target.comingSoon){const{type:e}=t.target;n.site.type=e,n.appEl.playSound("click2")}}async docxImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/lib/docx-file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("docx"),o=new FormData;o.append("method","site"),o.append("type",a(n.site.structure)),o.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/docxToSite",o);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(".docx","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}async evoImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("zip"),o=new FormData;o.append("method","site"),o.append("type",a(n.site.structure)),o.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/evolutionToSite",o,null,null,"?jwt="+a(n.AppHaxAPI.jwt));n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,this.nameTyped=p.data.filename.replace(".zip","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}async gbImport(t){if(!t.target.comingSoon){const{type:e}=t.target;let s=window.prompt("URL for the Gitbook repo");l(["haxcms"]),this.setProcessingVisual();const i=await r.call("@haxcms/gitbookToSite",{md:s});n.toast("Processed!",300),200==i.status&&i.data&&""!=i.data.contents?(n.items=i.data.items,i.data.files&&(n.itemFiles=i.data.files),this.nameTyped=i.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async importFromURL(t){const{type:e,prompt:s,callback:i,param:o}=t.target;if(!t.target.comingSoon){let t=window.prompt(s);l(["haxcms"]),this.setProcessingVisual();const a={};a[o]=t;const p=await r.call(i,a);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async notionImport(t){if(!t.target.comingSoon){const{type:e}=t.target;let s=window.prompt("URL for the Github Notion repo");l(["haxcms"]),this.setProcessingVisual();const i=await r.call("@haxcms/notionToSite",{repoUrl:s});n.toast("Processed!",300),200==i.status&&i.data&&""!=i.data.contents?(n.items=i.data.items,i.data.files&&(n.itemFiles=i.data.files),this.nameTyped=i.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async pressbooksImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/lib/docx-file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("html"),o=new FormData;o.append("method","site"),o.append("type",a(n.site.structure)),o.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/pressbooksToSite",o);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(".html","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}setProcessingVisual(){let t=document.createElement("simple-icon-lite");t.icon="hax:loading",t.style.setProperty("--simple-icon-height","40px"),t.style.setProperty("--simple-icon-width","40px"),t.style.height="150px",t.style.marginLeft="8px",n.toast("Processing",6e4,{hat:"construction",slot:t})}chooseTheme(t){if(!t.target.comingSoon){const{value:e}=t.target;n.site.theme=e,n.appEl.playSound("click2")}}chooseName(){if(""!==this.nameTyped){const t=this.shadowRoot.querySelector("#sitename").value;n.site.name=t,n.appEl.playSound("click2")}}progressReady(t){t.detail&&(this._progressReady=!0,5===this.step&&setTimeout((()=>{this.shadowRoot.querySelector("app-hax-hat-progress").process()}),300))}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{if(4===this.step&&"step"===e&&this.shadowRoot&&(this.shadowRoot.querySelector("#sitename").value=a(n.site.name)),5===this.step&&"step"===e&&this.shadowRoot&&this._progressReady&&setTimeout((()=>{this.shadowRoot.querySelector("app-hax-hat-progress").process()}),600),"step"===e&&(n.step=this.step),"unlockTerrible"===e&&this[e]){Object.keys(u).forEach((t=>{u[t]=[...u[t],"terrible-themes","terrible-productionz-themes","terrible-outlet-themes","terrible-best-themes","terrible-resume-themes"]}));const t=a(n.site.structure);this.themeNames=Object.keys(this.appSettings.themes).filter((e=>t&&u[t]&&u[t].includes(e)))}}))}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.maintainScroll.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("popstate",this.popstateListener.bind(this),{signal:this.windowControllers.signal})}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}popstateListener(t){if("popstate"===t.type&&null===t.state)try{setTimeout((()=>{const e=t.target.document.location.pathname.split("/").pop();if(e.includes("createSite")){const t=parseInt(e.replace("createSite-step-",""));tn.stepTest(t)&&(n.toast("Please select an option"),this.step=n.stepTest(t),this.shadowRoot.querySelector("#link-step-"+this.step).click())}}),0)}catch(t){}}maintainScroll(){this.shadowRoot&&this.step&&(this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"}),setTimeout((()=>{this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"})}),100))}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),setTimeout((()=>{null===this.step&&(this.step=1),this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"})}),100),o((()=>{if(a(n.createSiteSteps)&&a(n.appReady)){const t=a(n.location);t.route&&t.route.step&&t.route.name&&setTimeout((()=>{this.scrollToThing("#".concat(t.route.name),{behavior:"smooth",block:"start",inline:"nearest"}),4===t.route.step&&4===n.stepTest(4)&&setTimeout((()=>{this.shadowRoot.querySelector("#sitename").focus(),this.scrollToThing("#step-4",{behavior:"instant",block:"start",inline:"nearest"})}),800)}),300)}})),o((()=>{if(this.shadowRoot&&a(n.createSiteSteps)&&a(n.appReady)){const t=a(n.activeItem);t&&t.name&&t.step&&!this.__overrideProgression&&this.shadowRoot.querySelector("#link-".concat(t.name)).click()}}))}scrollToThing(t,e){const s=void 0!==window.safari;this.shadowRoot.querySelector(".carousel-with-snapping-item.active-step")&&this.shadowRoot.querySelector(".carousel-with-snapping-item.active-step").classList.remove("active-step"),s?this.shadowRoot.querySelector(t).scrollIntoView():this.shadowRoot.querySelector(t).scrollIntoView(e),this.shadowRoot.querySelector(t).classList.add("active-step")}static get styles(){return[...super.styles,e` +import{html as t,css as e,unsafeCSS as s}from"../../../../lit/index.js";import{SimpleColors as i}from"../../../simple-colors/simple-colors.js";import{autorun as a,toJS as o}from"../../../../mobx/dist/mobx.esm.js";import{store as n}from"./AppHaxStore.js";import{localStorageSet as p}from"../../../utils/utils.js";import"../../../../scrollable-component/index.js";import"../../../simple-icon/lib/simple-icon-lite.js";import{MicroFrontendRegistry as r}from"../../../micro-frontend-registry/micro-frontend-registry.js";import{enableServices as l}from"../../../micro-frontend-registry/lib/microServices.js";import"./app-hax-site-button.js";import"./app-hax-hat-progress.js";import"./app-hax-button.js";const c=new URL("../assets/images/Home.svg",import.meta.url).href,h=new URL("../assets/images/DisabledCircle.svg",import.meta.url).href,d=new URL("../assets/images/TransparentCircle.svg",import.meta.url).href,m=new URL("../assets/images/EnabledCircle.svg",import.meta.url).href,u={collection:["collections-theme","bootstrap-theme"],blog:["haxor-slevin"],course:["clean-one","clean-two","learn-two-theme"],website:["polaris-theme"],training:["training-theme"],import:["clean-one","clean-two","learn-two-theme"]};export class AppHaxSteps extends i{static get tag(){return"app-hax-steps"}constructor(){super(),this.unlockComingSoon=!1,this.unlockTerrible=!1,this.windowControllers=new AbortController,this.nameTyped="",this.stepRoutes=[],this._progressReady=!1,this.step=null,this.loaded=!1,this.themeNames=[],this.appSettings={},a((()=>{this.appSettings=o(n.appSettings);const t=o(n.site.structure);this.themeNames=Object.keys(this.appSettings.themes).filter((e=>t&&u[t]&&u[t].includes(e)))})),a((()=>{this.dark=o(n.darkMode)})),a((()=>{p("app-hax-step",o(n.step))})),a((()=>{p("app-hax-site",o(n.site)),this.step=n.stepTest(this.step)})),a((()=>{o(n.createSiteSteps)&&o(n.location)&&(this.step=n.stepTest(this.step))})),a((()=>{const t=o(n.routes);this.stepRoutes=t.filter((t=>t.step))}))}static get properties(){return{...super.properties,step:{type:Number,reflect:!0},stepRoutes:{type:Array},themeNames:{type:Array},unlockComingSoon:{type:Boolean,reflect:!0,attribute:"unlock-coming-soon"},unlockTerrible:{type:Boolean,reflect:!0,attribute:"unlock-terrible"},loaded:{type:Boolean,reflect:!0},appSettings:{type:Object},nameTyped:{type:String}}}chooseStructure(t){if(!t.target.comingSoon){const{value:e}=t.target;n.site.structure=e,"course"===e&&(n.site.type="own",n.site.theme="clean-one"),"blog"===e&&(n.site.type="own",n.site.theme="haxor-slevin"),"collection"===e&&(n.site.type="own",n.site.theme="collections-theme"),"website"===e&&(n.site.type="own",n.site.theme="polaris-theme"),"training"===e&&(n.site.type="own",n.site.theme="training-theme"),n.appEl.playSound("click2")}}chooseType(t){if(!t.target.comingSoon){const{type:e}=t.target;n.site.type=e,n.appEl.playSound("click2")}}async docxImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/lib/docx-file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("docx"),a=new FormData;a.append("method","site"),a.append("type",o(n.site.structure)),a.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/docxToSite",a);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(".docx","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}async evoImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("zip"),a=new FormData;a.append("method","site"),a.append("type",o(n.site.structure)),a.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/evolutionToSite",a,null,null,"?jwt="+o(n.AppHaxAPI.jwt));n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,this.nameTyped=p.data.filename.replace(".zip","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}async gbImport(t){if(!t.target.comingSoon){const{type:e}=t.target;let s=window.prompt("URL for the Gitbook repo");l(["haxcms"]),this.setProcessingVisual();const i=await r.call("@haxcms/gitbookToSite",{md:s});n.toast("Processed!",300),200==i.status&&i.data&&""!=i.data.contents?(n.items=i.data.items,i.data.files&&(n.itemFiles=i.data.files),this.nameTyped=i.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async importFromURL(t){const{type:e,prompt:s,callback:i,param:a}=t.target;if(!t.target.comingSoon){let t=window.prompt(s);l(["haxcms"]),this.setProcessingVisual();const o={};o[a]=t;const p=await r.call(i,o);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async notionImport(t){if(!t.target.comingSoon){const{type:e}=t.target;let s=window.prompt("URL for the Github Notion repo");l(["haxcms"]),this.setProcessingVisual();const i=await r.call("@haxcms/notionToSite",{repoUrl:s});n.toast("Processed!",300),200==i.status&&i.data&&""!=i.data.contents?(n.items=i.data.items,i.data.files&&(n.itemFiles=i.data.files),this.nameTyped=i.data.filename.replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("Repo did not return valid structure"))}}async pressbooksImport(t){if(!t.target.comingSoon){const{type:e}=t.target;import("../../../file-system-broker/lib/docx-file-system-broker.js").then((async t=>{l(["haxcms"]);const s=window.FileSystemBroker.requestAvailability(),i=await s.loadFile("html"),a=new FormData;a.append("method","site"),a.append("type",o(n.site.structure)),a.append("upload",i),this.setProcessingVisual();const p=await r.call("@haxcms/pressbooksToSite",a);n.toast("Processed!",300),200==p.status&&p.data&&""!=p.data.contents?(n.items=p.data.items,p.data.files&&(n.itemFiles=p.data.files),this.nameTyped=p.data.filename.replace(".html","").replace("outline","").replace(/\s/g,"").replace(/-/g,"").toLowerCase(),setTimeout((()=>{this.shadowRoot.querySelector("#sitename").value=this.nameTyped,this.shadowRoot.querySelector("#sitename").select()}),800),n.site.type=e,n.site.theme="clean-one",n.appEl.playSound("click2")):(n.appEl.playSound("error"),n.toast("File did not return valid HTML structure"))}))}}setProcessingVisual(){let t=document.createElement("simple-icon-lite");t.icon="hax:loading",t.style.setProperty("--simple-icon-height","40px"),t.style.setProperty("--simple-icon-width","40px"),t.style.height="150px",t.style.marginLeft="8px",n.toast("Processing",6e4,{hat:"construction",slot:t})}chooseTheme(t){if(!t.target.comingSoon){const{value:e}=t.target;n.site.theme=e,n.appEl.playSound("click2")}}chooseName(){if(""!==this.nameTyped){const t=this.shadowRoot.querySelector("#sitename").value;n.site.name=t,n.appEl.playSound("click2")}}progressReady(t){t.detail&&(this._progressReady=!0,5===this.step&&setTimeout((()=>{this.shadowRoot.querySelector("app-hax-hat-progress").process()}),300))}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{if(4===this.step&&"step"===e&&this.shadowRoot&&(this.shadowRoot.querySelector("#sitename").value=o(n.site.name)),5===this.step&&"step"===e&&this.shadowRoot&&this._progressReady&&setTimeout((()=>{this.shadowRoot.querySelector("app-hax-hat-progress").process()}),600),"step"===e&&(n.step=this.step),"unlockTerrible"===e&&this[e]){Object.keys(u).forEach((t=>{u[t]=[...u[t],"terrible-themes","terrible-productionz-themes","terrible-outlet-themes","terrible-best-themes","terrible-resume-themes"]}));const t=o(n.site.structure);this.themeNames=Object.keys(this.appSettings.themes).filter((e=>t&&u[t]&&u[t].includes(e)))}}))}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.maintainScroll.bind(this),{signal:this.windowControllers.signal}),window.addEventListener("popstate",this.popstateListener.bind(this),{signal:this.windowControllers.signal})}disconnectedCallback(){this.windowControllers.abort(),super.disconnectedCallback()}popstateListener(t){if("popstate"===t.type&&null===t.state)try{setTimeout((()=>{const e=t.target.document.location.pathname.split("/").pop();if(e.includes("createSite")){const t=parseInt(e.replace("createSite-step-",""));tn.stepTest(t)&&(n.toast("Please select an option"),this.step=n.stepTest(t),this.shadowRoot.querySelector("#link-step-"+this.step).click())}}),0)}catch(t){}}maintainScroll(){this.shadowRoot&&this.step&&(this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"}),setTimeout((()=>{this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"})}),100))}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),setTimeout((()=>{null===this.step&&(this.step=1),this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"})}),100),a((()=>{if(o(n.createSiteSteps)&&o(n.appReady)){const t=o(n.location);t.route&&t.route.step&&t.route.name&&setTimeout((()=>{this.scrollToThing("#".concat(t.route.name),{behavior:"smooth",block:"start",inline:"nearest"}),4===t.route.step&&4===n.stepTest(4)&&setTimeout((()=>{this.shadowRoot.querySelector("#sitename").focus(),this.scrollToThing("#step-4",{behavior:"instant",block:"start",inline:"nearest"})}),800)}),300)}})),a((()=>{if(this.shadowRoot&&o(n.createSiteSteps)&&o(n.appReady)){const t=o(n.activeItem);t&&t.name&&t.step&&!this.__overrideProgression&&this.shadowRoot.querySelector("#link-".concat(t.name)).click()}}))}scrollToThing(t,e){const s=void 0!==window.safari;this.shadowRoot.querySelector(".carousel-with-snapping-item.active-step")&&this.shadowRoot.querySelector(".carousel-with-snapping-item.active-step").classList.remove("active-step"),s?this.shadowRoot.querySelector(t).scrollIntoView():this.shadowRoot.querySelector(t).scrollIntoView(e),this.shadowRoot.querySelector(t).classList.add("active-step")}static get styles(){return[...super.styles,e` :host { display: block; } @@ -213,7 +213,7 @@ import{html as t,css as e,unsafeCSS as s}from"../../../../lit/index.js";import{S left: 20%; } } - `]}progressFinished(t){t.detail&&(this.loaded=!0,n.appEl.playSound("success"),t.target.shadowRoot.querySelector(".game").focus(),this.scrollToThing(`#step-${this.step}`,{behavior:"instant",block:"start",inline:"nearest"}))}typeKey(){this.nameTyped=this.shadowRoot.querySelector("#sitename").value}keydown(t){[" ","/","\\","&","#","?","+","=","{","}","|","^","~","[","]","`",'"',"'"].includes(t.key)?(n.appEl.playSound("error"),n.toast(`"${t.key}" not allowed in names`),t.preventDefault()):"Enter"===t.key?this.chooseName():["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].includes(t.key)||n.appEl.playSound("click")}stepLinkClick(t){const e=parseInt(t.target.getAttribute("data-step"),10);this.stepe&&(this.nameTyped="",n.siteReady=!1,1===e?(n.site.structure=null,n.site.type=null,n.site.theme=null,n.site.name=null):2===e?(n.site.type=null,n.site.theme=null,n.site.name=null):3===e?(n.site.theme=null,n.site.name=null):4===e&&(n.site.name=null),this.step=e)}renderTypes(e){const s=a(n.site.structure);var i=t``;switch(s){case"portfolio":i=t` e&&(this.nameTyped="",n.siteReady=!1,1===e?(n.site.structure=null,n.site.type=null,n.site.theme=null,n.site.name=null):2===e?(n.site.type=null,n.site.theme=null,n.site.name=null):3===e?(n.site.theme=null,n.site.name=null):4===e&&(n.site.name=null),this.step=e)}renderTypes(e){const s=o(n.site.structure);var i=t``;switch(s){case"collection":i=t` @@ -243,15 +243,18 @@ import{html as t,css as e,unsafeCSS as s}from"../../../../lit/index.js";import{S @click=${this.chooseType} type="15w" >`;break;case"website":i=t` - `;break;case"import":i=t` `;break;case"training":i=t` `;break;case"blog":i=t` `;break;case"import":i=t` +
@@ -399,7 +420,7 @@ import{html as t,css as e,unsafeCSS as s}from"../../../../lit/index.js";import{S @input="${this.typeKey}" @keydown="${this.keydown}" maxlength="30" - placeholder="${a(n.site.structure)} name.." + placeholder="${o(n.site.structure)} name.." tabindex="${4!==this.step?"-1":""}" /> ${this.HAXCMSMobileMenuButton()} ${this.HAXCMSUserStylesMenu()} - ${p.has("@haxcms/siteToHtml")?this.PrintBranchButton("bottom"):e` + ${d.has("@haxcms/siteToHtml")?this.PrintBranchButton("bottom"):e` `} - ${p.has("@core/htmlToPdf")?this.PDFPageButton("bottom"):""} + ${d.has("@core/htmlToPdf")?this.PDFPageButton("bottom"):""}
- ${this.QRCodeButton()} + ${this.EmailPageButton()} + ${this.QRCodeButton()}
- `}searchChanged(e){e.detail.value?import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{"search"!==l.getInternalRoute()&&window.history.replaceState({},null,"x/search"),this.searchTerm=e.detail.value})):this.searchTerm=""}static get properties(){return{...super.properties,searchTerm:{type:String}}}static get tag(){return"clean-one"}constructor(){super(),this.searchTerm="",this.HAXCMSThemeSettings.autoScroll=!0,import("../haxcms-elements/lib/ui-components/navigation/site-menu-button.js"),import("../haxcms-elements/lib/ui-components/site/site-print-button.js"),import("../haxcms-elements/lib/ui-components/site/site-rss-button.js"),import("../haxcms-elements/lib/ui-components/active-item/site-git-corner.js"),this.__disposer=this.__disposer?this.__disposer:[],c((e=>{this.activeManifestIndex=m(l.activeManifestIndex),this.searchTerm="",this.__disposer.push(e)}))}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),document.body.style.overflow="hidden",this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector("#body"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,this.shadowRoot.querySelector("scroll-button").target=this.shadowRoot.querySelector("#haxcms-theme-top");const t=new URLSearchParams(l.currentRouterLocation.search);"search"===l.getInternalRoute()&&t.get("search")&&import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{this.searchTerm=t.get("search"),this.shadowRoot.querySelector("clean-one-search-box").focus(),setTimeout((()=>{this.shadowRoot.querySelector("clean-one-search-box").select()}),0)}))}HAXCMSGlobalStyleSheetContent(){return[...super.HAXCMSGlobalStyleSheetContent(),t` + `}searchChanged(e){e.detail.value?import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{"search"!==c.getInternalRoute()&&window.history.replaceState({},null,"x/search"),this.searchTerm=e.detail.value})):this.searchTerm=""}static get properties(){return{...super.properties,searchTerm:{type:String}}}static get tag(){return"clean-one"}constructor(){super(),this.searchTerm="",this.HAXCMSThemeSettings.autoScroll=!0,import("../haxcms-elements/lib/ui-components/navigation/site-menu-button.js"),import("../haxcms-elements/lib/ui-components/site/site-print-button.js"),import("../haxcms-elements/lib/ui-components/site/site-rss-button.js"),import("../haxcms-elements/lib/ui-components/active-item/site-git-corner.js"),this.__disposer=this.__disposer?this.__disposer:[],m((e=>{this.activeManifestIndex=h(c.activeManifestIndex),this.searchTerm="",this.__disposer.push(e)}))}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),document.body.style.overflow="hidden",this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector("#body"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,this.shadowRoot.querySelector("scroll-button").target=this.shadowRoot.querySelector("#haxcms-theme-top");const t=new URLSearchParams(c.currentRouterLocation.search);"search"===c.getInternalRoute()&&t.get("search")&&import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{this.searchTerm=t.get("search"),this.shadowRoot.querySelector("clean-one-search-box").focus(),setTimeout((()=>{this.shadowRoot.querySelector("clean-one-search-box").select()}),0)}))}HAXCMSGlobalStyleSheetContent(){return[...super.HAXCMSGlobalStyleSheetContent(),t` clean-one a { text-decoration-thickness: 3px; } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js index f88fe1feb1..611b00cdb1 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js @@ -2,7 +2,7 @@ * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme as i}from"../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSRememberRoute as o}from"../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{HAXCMSThemeParts as s}from"../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{PrintBranchMixin as a}from"../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{PDFPageMixin as r}from"../haxcms-elements/lib/core/utils/PDFPageMixin.js";import{QRCodeMixin as n}from"../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as l}from"../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{HAXCMSOperationButtons as p}from"../haxcms-elements/lib/core/utils/HAXCMSOperationButtons.js";import{store as c}from"../haxcms-elements/lib/core/haxcms-site-store.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import{autorun as d,toJS as m}from"../../mobx/dist/mobx.esm.js";import"../simple-icon/simple-icon.js";import"../simple-icon/lib/simple-icons.js";import{normalizeEventPath as h}from"../utils/utils.js";import{MicroFrontendRegistry as b}from"../micro-frontend-registry/micro-frontend-registry.js";import"../haxcms-elements/lib/ui-components/layout/site-modal.js";import"../haxcms-elements/lib/ui-components/navigation/site-menu-content.js";class CleanTwo extends(p(o(r(a(n(s(l(i)))))))){static get styles(){return[...super.styles,t` +import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme as i}from"../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSRememberRoute as o}from"../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{HAXCMSThemeParts as s}from"../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{PrintBranchMixin as a}from"../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{EmailPageMixin as r}from"../haxcms-elements/lib/core/utils/EmailPageMixin.js";import{PDFPageMixin as n}from"../haxcms-elements/lib/core/utils/PDFPageMixin.js";import{QRCodeMixin as l}from"../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as p}from"../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{HAXCMSOperationButtons as c}from"../haxcms-elements/lib/core/utils/HAXCMSOperationButtons.js";import{store as d}from"../haxcms-elements/lib/core/haxcms-site-store.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import{autorun as m,toJS as h}from"../../mobx/dist/mobx.esm.js";import"../simple-icon/simple-icon.js";import"../simple-icon/lib/simple-icons.js";import{normalizeEventPath as b}from"../utils/utils.js";import{MicroFrontendRegistry as x}from"../micro-frontend-registry/micro-frontend-registry.js";import"../haxcms-elements/lib/ui-components/layout/site-modal.js";import"../haxcms-elements/lib/ui-components/navigation/site-menu-content.js";class CleanTwo extends(c(o(r(n(a(l(s(p(i))))))))){static get styles(){return[...super.styles,t` :host { display: block; font-size: 18px; @@ -113,6 +113,7 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme display: block; float: unset; } + .email-btn, .print-branch-btn simple-icon-button-lite, .pdf-page-btn simple-icon-button-lite { --simple-icon-height: 24px; @@ -400,9 +401,6 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme #slot ::slotted(iframe) { width: auto; } - #slot ::slotted(*) { - word-break: break-all; - } #slot ::slotted(h1), #slot ::slotted(h2), #slot ::slotted(h3) { @@ -521,7 +519,7 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme .search-modal-btn { margin-top: 16px; } - `]}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),document.body.style.overflow="hidden",this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector(".body-wrapper"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,c.internalRoutes.search.callback=this.siteModalForceClick}searchItemSelected(e){this.searchTerm=""}searchChanged(e){var t=h(e)[0];t.value?import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{this.searchTerm=t.value})):this.searchTerm=""}render(){return e` + `]}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),document.body.style.overflow="hidden",this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector(".body-wrapper"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,d.internalRoutes.search.callback=this.siteModalForceClick}searchItemSelected(e){this.searchTerm=""}searchChanged(e){var t=b(e)[0];t.value?import("../haxcms-elements/lib/ui-components/site/site-search.js").then((()=>{this.searchTerm=t.value})):this.searchTerm=""}render(){return e`
${this.HAXCMSMobileMenu()}
@@ -548,15 +546,16 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme > - ${b.has("@core/htmlToPdf")?this.PDFPageButton():""} - ${b.has("@haxcms/siteToHtml")?this.PrintBranchButton():e``} - ${this.QRCodeButton("right")} + ${this.EmailPageButton("right")} + ${this.QRCodeButton("right")} `:""}
- `}__prevPageLabelChanged(e){this.prevPage=e.detail.value}__nextPageLabelChanged(e){this.nextPage=e.detail.value}static get properties(){let e={};return super.properties&&(e=super.properties),{...e,searchTerm:{type:String},prevPage:{type:String},nextPage:{type:String},pageTimestamp:{type:Number}}}static get tag(){return"clean-two"}constructor(){super(),this.HAXCMSThemeSettings.autoScroll=!0,this.searchTerm="",this.__disposer=this.__disposer?this.__disposer:[],d((e=>{this.activeManifestIndex=m(c.activeManifestIndex),this.__disposer.push(e)})),d((()=>{if(!1===m(c.badDevice)){const e=document.createElement("link");e.setAttribute("href","https://fonts.googleapis.com/css2?family=Open+Sans&display=swap"),e.setAttribute("rel","stylesheet"),e.setAttribute("fetchpriority","low"),document.head.appendChild(e)}})),d((e=>{c.activeItem&&c.activeItem.metadata&&c.activeItem.metadata.updated&&(this.pageTimestamp=m(c.activeItem.metadata.updated)),this.__disposer.push(e)}))}siteModalForceClick(e){setTimeout((()=>{const e=document.querySelector("clean-two");e&&e.shadowRoot&&e.shadowRoot.querySelector("site-modal")&&e.shadowRoot.querySelector("site-modal").shadowRoot&&e.shadowRoot.querySelector("site-modal").shadowRoot.querySelector("simple-icon-button-lite")&&e.shadowRoot.querySelector("site-modal").shadowRoot.querySelector("simple-icon-button-lite").click()}),500)}siteModalClick(e){import("../haxcms-elements/lib/ui-components/site/site-search.js").then((e=>{"search"!==c.getInternalRoute()&&window.history.replaceState({},null,"x/search");const t=new URLSearchParams(c.currentRouterLocation.search),i=window.SimpleModal.requestAvailability().querySelector("site-search").shadowRoot.querySelector("simple-fields-field");i.focus(),t.get("search")&&(i.value=t.get("search"),setTimeout((()=>{i.select()}),0))}))}disconnectedCallback(){for(var e in this.__disposer)this.__disposer[e].dispose();super.disconnectedCallback()}}customElements.define(CleanTwo.tag,CleanTwo);export{CleanTwo}; \ No newline at end of file + `}__prevPageLabelChanged(e){this.prevPage=e.detail.value}__nextPageLabelChanged(e){this.nextPage=e.detail.value}static get properties(){let e={};return super.properties&&(e=super.properties),{...e,searchTerm:{type:String},prevPage:{type:String},nextPage:{type:String},pageTimestamp:{type:Number}}}static get tag(){return"clean-two"}constructor(){super(),this.HAXCMSThemeSettings.autoScroll=!0,this.searchTerm="",this.__disposer=this.__disposer?this.__disposer:[],m((e=>{this.activeManifestIndex=h(d.activeManifestIndex),this.__disposer.push(e)})),m((()=>{if(!1===h(d.badDevice)){const e=document.createElement("link");e.setAttribute("href","https://fonts.googleapis.com/css2?family=Open+Sans&display=swap"),e.setAttribute("rel","stylesheet"),e.setAttribute("fetchpriority","low"),document.head.appendChild(e)}})),m((e=>{d.activeItem&&d.activeItem.metadata&&d.activeItem.metadata.updated&&(this.pageTimestamp=h(d.activeItem.metadata.updated)),this.__disposer.push(e)}))}siteModalForceClick(e){setTimeout((()=>{const e=document.querySelector("clean-two");e&&e.shadowRoot&&e.shadowRoot.querySelector("site-modal")&&e.shadowRoot.querySelector("site-modal").shadowRoot&&e.shadowRoot.querySelector("site-modal").shadowRoot.querySelector("simple-icon-button-lite")&&e.shadowRoot.querySelector("site-modal").shadowRoot.querySelector("simple-icon-button-lite").click()}),500)}siteModalClick(e){import("../haxcms-elements/lib/ui-components/site/site-search.js").then((e=>{"search"!==d.getInternalRoute()&&window.history.replaceState({},null,"x/search");const t=new URLSearchParams(d.currentRouterLocation.search),i=window.SimpleModal.requestAvailability().querySelector("site-search").shadowRoot.querySelector("simple-fields-field");i.focus(),t.get("search")&&(i.value=t.get("search"),setTimeout((()=>{i.select()}),0))}))}disconnectedCallback(){for(var e in this.__disposer)this.__disposer[e].dispose();super.disconnectedCallback()}}customElements.define(CleanTwo.tag,CleanTwo);export{CleanTwo}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/code-editor/lib/code-pen-button.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/code-editor/lib/code-pen-button.js index c951efb002..a140b9c1d9 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/code-editor/lib/code-pen-button.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/code-editor/lib/code-pen-button.js @@ -15,4 +15,4 @@ import{LitElement as t,html as e,css as n}from"../../../lit/index.js";class Code part="button" /> - `}static get tag(){return"code-pen-button"}firstUpdated(){this.setAttribute("title",this.checkItOut)}constructor(){super(),this.checkItOut="Check it out on codepen",this.endPoint="https://codepen.io/pen/define",this.data={}}updated(t){t.forEach(((t,e)=>{"data"==e&&this[e]&&(this.dataString=this._getDataString(this[e]))}))}static get properties(){return{checkItOut:{type:String,attribute:"check-it-out"},endPoint:{type:String,attribute:"end-point"},dataString:{type:String,attribute:"data-string"},data:{type:Object}}}_getDataString(t){return JSON.stringify(t).replace(/"/g,""").replace(/'/g,"'")}}customElements.define(CodePenButton.tag,CodePenButton);export{CodePenButton}; \ No newline at end of file + `}static get tag(){return"code-pen-button"}firstUpdated(){this.setAttribute("title",this.checkItOut)}constructor(){super(),this.checkItOut="Check it out on codepen",this.endPoint="https://codepen.io/pen/define",this.data={},this.dataString=""}updated(t){t.forEach(((t,e)=>{"data"==e&&this[e]&&""==this.dataString&&(this.dataString=this._getDataString(this[e]))}))}static get properties(){return{checkItOut:{type:String,attribute:"check-it-out"},endPoint:{type:String,attribute:"end-point"},dataString:{type:String,attribute:"data-string"},data:{type:Object}}}_getDataString(t){return JSON.stringify(t).replace(/"/g,""").replace(/'/g,"'")}}customElements.define(CodePenButton.tag,CodePenButton);export{CodePenButton}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/collection-list.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/collection-list.js new file mode 100644 index 0000000000..b859904d78 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/collection-list.js @@ -0,0 +1,88 @@ +/** + * Copyright 2023 + * @license , see License.md for full text. + */ +import{LitElement as e,html as r,css as t}from"../../lit/index.js";import"../responsive-utility/responsive-utility.js";class CollectionList extends e{constructor(){super(),this.itemsPerRow=null,this.breakpointSm=900,this.breakpointMd=1200,this.breakpointLg=1500,this.breakpointXl=1800}static get properties(){return{breakpointSm:{type:Number,attribute:"breakpoint-sm"},breakpointMd:{type:Number,attribute:"breakpoint-md"},breakpointLg:{type:Number,attribute:"breakpoint-lg"},breakpointXl:{type:Number,attribute:"breakpoint-xl"},itemsPerRow:{type:String,reflect:!0,attribute:"items-per-row"},responsiveSize:{type:String,reflect:!0,attribute:"responsive-size"}}}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),window.dispatchEvent(new CustomEvent("responsive-element",{detail:{element:this,attribute:"responsive-size",relativeToParent:!1,sm:this.breakpointSm,md:this.breakpointMd,lg:this.breakpointLg,xl:this.breakpointXl}}))}static get styles(){let e=[];return super.styles&&(e=super.styles),[...e,t` + :host { + display: block; + } + :host .wrapper { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + column-gap: 2vw; + row-gap: 2vw; + } + :host([responsive-size="sm"]) .wrapper { + column-gap: 1.5vw; + row-gap: 1.5vw; + } + :host([responsive-size="xs"]) .wrapper { + column-gap: 1vw; + row-gap: 1vw; + } + + :host([items-per-row="1"]) .wrapper { + grid-template-columns: repeat(1, minmax(250px, 1fr)); + } + :host([items-per-row="2"]) .wrapper { + grid-template-columns: repeat(2, minmax(250px, 1fr)); + } + :host([items-per-row="3"]) .wrapper { + grid-template-columns: repeat(3, minmax(250px, 1fr)); + } + :host([items-per-row="3"][responsive-size="xs"]) .wrapper { + column-gap: 1.5vw; + row-gap: 1.5vw; + grid-template-columns: repeat(2, minmax(250px, 1fr)); + } + :host([items-per-row="4"]) .wrapper { + grid-template-columns: repeat(4, minmax(200px, 1fr)); + column-gap: 1.5vw; + row-gap: 1.5vw; + } + :host([items-per-row="4"][responsive-size="xs"]) .wrapper { + grid-template-columns: repeat(2, minmax(200px, 1fr)); + } + :host([items-per-row="5"]) .wrapper { + grid-template-columns: repeat(5, minmax(200px, 1fr)); + column-gap: 1.25vw; + row-gap: 1.25vw; + } + :host([items-per-row="5"][responsive-size="xs"]) .wrapper { + grid-template-columns: repeat(3, minmax(150px, 1fr)); + } + :host([items-per-row="6"]) .wrapper { + grid-template-columns: repeat(6, minmax(150px, 1fr)); + column-gap: 1vw; + row-gap: 1vw; + } + :host([items-per-row="6"][responsive-size="xs"]) .wrapper { + grid-template-columns: repeat(3, minmax(150px, 1fr)); + } + :host([items-per-row="7"]) .wrapper { + grid-template-columns: repeat(7, minmax(150px, 1fr)); + column-gap: 0.5vw; + row-gap: 0.5vw; + } + :host([items-per-row="7"][responsive-size="sm"]) .wrapper { + grid-template-columns: repeat(4, minmax(125px, 1fr)); + } + :host([items-per-row="7"][responsive-size="xs"]) .wrapper { + grid-template-columns: repeat(3, minmax(125px, 1fr)); + } + :host([items-per-row="8"]) .wrapper { + grid-template-columns: repeat(8, minmax(125px, 1fr)); + column-gap: 0.5vw; + row-gap: 0.5vw; + } + :host([items-per-row="8"][responsive-size="sm"]) .wrapper { + grid-template-columns: repeat(4, minmax(125px, 1fr)); + } + :host([items-per-row="8"][responsive-size="xs"]) .wrapper { + grid-template-columns: repeat(3, minmax(125px, 1fr)); + } + `]}render(){return r` +
+ +
+ `}static get haxProperties(){return new URL(`./lib/${this.tag}.haxProperties.json`,import.meta.url).href}static get tag(){return"collection-list"}}customElements.define(CollectionList.tag,CollectionList);export{CollectionList}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.haxProperties.json b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.haxProperties.json new file mode 100644 index 0000000000..3ac49466b2 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.haxProperties.json @@ -0,0 +1,118 @@ +{ + "api": "1", + "type": "element", + "editingElement": "core", + "hideDefaultSettings": true, + "canScale": false, + "canPosition": false, + "canEditSource": true, + "contentEditable": false, + "gizmo": { + "title": "Collection item", + "description": "", + "icon": "hax:figure", + "color": "purple", + "tags": ["Layout", "collection", "list", "card"], + "handles": [], + "meta": { + "author": "HAXTheWeb core team" + } + }, + "settings": { + "configure": [ + { + "property": "url", + "inputMethod": "haxupload", + "title": "Link", + "description": "Link this card somewhere", + "required": true + }, + { + "property": "image", + "inputMethod": "haxupload", + "title": "Image", + "description": "Background image", + "required": false + }, + { + "property": "line1", + "inputMethod": "textfield", + "title": "Line 1", + "description": "First line of text in the design", + "required": true + }, + { + "property": "line2", + "inputMethod": "textfield", + "title": "Line 2", + "description": "Second line of text", + "required": false + }, + { + "property": "line3", + "inputMethod": "textfield", + "title": "Line 3", + "description": "Third line of text", + "required": false + } + ], + "advanced": [ + { + "property": "icon", + "inputMethod": "iconpicker", + "title": "Icon", + "description": "Icon to represent the item", + "required": false + }, + { + "property": "saturate", + "inputMethod": "boolean", + "title": "Saturation effect", + "description": "Image saturation shifts based on user focus", + "required": false + }, + { + "property": "tags", + "title": "Tags", + "description": "Comma separated list of tags", + "inputMethod": "textfield", + "required": true + }, + { + "property": "accentColor", + "title": "Color", + "description": "color for tags", + "inputMethod": "colorpicker" + }, + { + "property": "alt", + "inputMethod": "alt", + "title": "Alt", + "description": "Alternative text to describe the link", + "required": false + } + ], + "developer": [] + }, + "saveOptions": { + "unsetAttributes": ["editable"] + }, + "documentation": { + "howTo": null, + "purpose": null + }, + "demoSchema": [ + { + "tag": "collection-item", + "content": "", + "properties": { + "line1": "HAX @ PSU", + "line2": "Write HTML without realizing it", + "line3": "by @btopro", + "url": "https://hax.psu.edu/", + "icon": "hax:hax2022", + "tags": "innovative, sustainable" + } + } + ] +} diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.js new file mode 100644 index 0000000000..890b14b898 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-item.js @@ -0,0 +1,137 @@ +import{html as t,css as e}from"../../../lit/index.js";import"../../simple-icon/simple-icon.js";import{SimpleColors as i}from"../../simple-colors/simple-colors.js";import"../../simple-fields/lib/simple-tags.js";class CollectionItem extends i{static get properties(){return{...super.properties,url:{type:String},image:{type:String},alt:{type:String},icon:{type:String},line1:{type:String},line2:{type:String},line3:{type:String},saturate:{type:Boolean,reflect:!0},tags:{type:String}}}constructor(){super(),this._haxstate=!1,this.tags=null,this.saturate=!1,this.url=null,this.image=null,this.alt=null,this.icon=null,this.line1=null,this.line2=null,this.line3=null,this.accentColor=null}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}static get styles(){return[...super.styles,e` + :host { + display: inline-block; + font-family: "Roboto", sans-serif; + background-color: var(--simple-colors-default-theme-accent-1); + } + a { + text-decoration: none; + color: var(--icon-color); + display: block; + min-height: 300px; + border: solid 1px #dcdcdc; + transition: 0.3s ease-in-out opacity, 0.3s ease-in-out filter; + } + :host([saturate]) a { + -webkit-filter: saturate(30%); + filter: saturate(30%); + } + a:focus-within, + a:focus, + a:hover { + box-shadow: 1px 1px 5px #dcdcdc; + } + :host([saturate]) a:focus-within, + :host([saturate]) a:focus, + :host([saturate]) a:hover { + filter: saturate(200%); + } + + a:focus-within .image, + a:focus .image, + a:hover .image { + opacity: 1; + } + + .wrap { + display: flex; + flex-direction: column; + align-items: center; + } + + simple-tags { + margin-left: 2px; + margin-bottom: -32px; + padding: 0; + height: 32px; + line-height: 32px; + width: 100%; + z-index: 1; + display: flex; + overflow: hidden; + } + + .line-1 { + font-size: 28px; + text-transform: uppercase; + text-align: center; + line-height: 1.4; + padding: 0; + margin: 0; + } + + .line-2 { + font-size: 18px; + max-height: 38px; + overflow: hidden; + text-align: center; + margin: 0px; + line-height: 1.2; + padding: 4px 4px 4px; + letter-spacing: -0.5px; + } + + .line-3 { + max-height: 24px; + line-height: 24px; + font-size: 14px; + letter-spacing: -0.5px; + overflow: hidden; + word-break: break-all; + } + + .icon { + background-color: #fff; + border-radius: 50%; + position: relative; + bottom: 50px; + border: solid; + border-color: var(--icon-color); + border-width: 5px; + margin: 0 0 -40px 0; + height: 70px; + width: 70px; + } + + simple-icon { + fill: var(--icon-color); + --simple-icon-width: 50px; + --simple-icon-height: 50px; + margin: 10px; + } + + .image { + background-color: grey; + background-repeat: no-repeat; + background-size: cover; + background-position: right center; + width: 100%; + height: 150px; + opacity: 0.9; + transition: 0.3s ease-in-out opacity, 0.3s ease-in-out filter; + } + `]}render(){return t` +
+
+ ${this.tags?t``:""} +
+ ${this.icon?t`
+ +
`:""} +
+
${this.line1}
+
${this.line2}
+
${this.line3}
+
+
+ `}_handleClick(t){(this._haxstate||this.parentNode&&"lock-items"===this.parentNode.getAttribute("lock-items"))&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}haxHooks(){return{editModeChanged:"haxeditModeChanged",activeElementChanged:"haxactiveElementChanged"}}haxactiveElementChanged(t,e){e&&(this._haxstate=e)}haxeditModeChanged(t){this._haxstate=t}static get tag(){return"collection-item"}}customElements.define(CollectionItem.tag,CollectionItem);export{CollectionItem}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-list.haxProperties.json b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-list.haxProperties.json new file mode 100644 index 0000000000..4457f27664 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collection-list.haxProperties.json @@ -0,0 +1,92 @@ +{ + "api": "1", + "type": "grid", + "editingElement": "core", + "hideDefaultSettings": false, + "canScale": { + "min": 30, + "step": 10, + "max": 100 + }, + "canPosition": true, + "canEditSource": true, + "contentEditable": true, + "gizmo": { + "title": "Collection", + "description": "", + "icon": "lrn:canban", + "color": "purple", + "tags": ["Layout", "collection", "list", "items"], + "handles": [], + "meta": { + "author": "HAXTheWeb core team" + } + }, + "settings": { + "configure": [ + { + "property": "itemsPerRow", + "inputMethod": "select", + "title": "Items per row", + "options": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "": "auto" + }, + "description": "How many collection items should be displayed per row", + "required": true + } + ], + "advanced": [], + "developer": [ + { + "property": "breakpointSm", + "title": "Small Breakpoint", + "description": "Anything less than this number (in pixels) will render with the smallest version of this layout", + "inputMethod": "textfield", + "validationType": "number" + }, + { + "property": "breakpointMd", + "title": "Medium Breakpoint", + "description": "Anything less than this number (in pixels) will render with the small version of this layout", + "inputMethod": "textfield", + "validationType": "number" + }, + { + "property": "breakpointLg", + "title": "Large Breakpoint", + "description": "Anything less than this number (in pixels) will render with the medium version of this layout.", + "inputMethod": "textfield", + "validationType": "number" + }, + { + "property": "breakpointXl", + "title": "Extra-Large Breakpoint", + "description": "Anything less than this number (in pixels) will render with the large version of this layout. Anything greater than or equal to this number will display with the maximum number of columns for this layout.", + "inputMethod": "textfield", + "validationType": "number" + } + ] + }, + "saveOptions": { + "unsetAttributes": [] + }, + "documentation": { + "howTo": null, + "purpose": null + }, + "demoSchema": [ + { + "tag": "collection-list", + "content": "", + "properties": {} + } + ] +} diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme-banner.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme-banner.js new file mode 100644 index 0000000000..c363346fd2 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme-banner.js @@ -0,0 +1,121 @@ +import{LitElement as e,html as i,css as t}from"../../../lit/index.js";class CollectionsThemeBanner extends e{static get properties(){return{image:{type:String},sitename:{type:String},pagetitle:{type:String},logo:{type:String}}}constructor(){super(),this.image=null,this.sitename="",this.pagetitle="",this.logo=null}static get styles(){return[t` + :host { + display: block; + line-height: initial; + } + + .wrap { + background-repeat: no-repeat; + background-size: cover; + background-position: right center; + width: 100%; + min-height: 32vw; + display: flex; + justify-content: flex-end; + align-items: center; + flex: 1 1 auto; + margin: 0; + padding: 0; + } + + @media screen and (max-width: 700px) { + .wrap { + height: 55vw; + } + } + + .image-text { + background: rgba(0, 0, 0, 0.8); + backdrop-filter: blur(2px); + width: calc(150px + (355 - 28) * ((100vw - 300px) / (1600 - 300))); + margin: 0 5vw; + padding: 2vw; + } + + .image-text h1 { + font-size: calc(23px + (72 - 28) * ((100vw - 300px) / (1600 - 300))); + color: #ffffff; + font-weight: 400; + line-height: 1.1; + margin: 0; + padding: 0; + width: 100%; + } + + .branding { + display: flex; + align-items: center; + background-color: var(--header-bg-color); + border-top: solid; + border-top-width: 4px; + border-top-color: #ffffff; + } + + .logo { + position: absolute; + width: 40%; + } + + .logo img { + width: 300px; + border: solid; + height: 300px; + border-width: 4px; + border-color: #ffffff; + border-radius: 50%; + background-color: var(--header-bg-color); + margin: -64px 0px 0px 64px; + } + + @media only screen and (max-width: 1600px) { + .logo img { + width: 200px; + height: 200px; + margin: -50px 0px 0px 50px; + } + } + + @media only screen and (max-width: 1200px) { + .logo img { + width: 100px; + height: 100px; + margin: 0px 0px 0px 25px; + } + } + + @media only screen and (max-width: 800px) { + .logo img { + width: 64px; + height: 64px; + margin: 0px 0px 0px 16px; + } + } + + .company { + width: 76%; + margin: 0 0 0 auto; + padding: 0; + } + + .company h2 { + font-size: calc(18px + (72 - 28) * ((100vw - 300px) / (1600 - 300))); + font-weight: 400; + color: #ffffff; + margin: 4px 0 4px 0; + padding: 0; + } + `]}render(){return i` +
+
+

${this.pagetitle}

+
+
+
+ +
+

${this.sitename}

+
+
+ `}static get tag(){return"collections-theme-banner"}}customElements.define(CollectionsThemeBanner.tag,CollectionsThemeBanner);export{CollectionsThemeBanner}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme.js new file mode 100644 index 0000000000..b48194f254 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/collection-list/lib/collections-theme.js @@ -0,0 +1,319 @@ +/** + * Copyright 2023 The Pennsylvania State University + * @license Apache-2.0, see License.md for full text. + */ +import{html as e,css as t,render as o}from"../../../lit/index.js";import{HAXCMSLitElementTheme as i}from"../../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSRememberRoute as s}from"../../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{HAXCMSThemeParts as a}from"../../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{PrintBranchMixin as r}from"../../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{PDFPageMixin as l}from"../../haxcms-elements/lib/core/utils/PDFPageMixin.js";import{QRCodeMixin as n}from"../../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as c}from"../../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{HAXCMSOperationButtons as m}from"../../haxcms-elements/lib/core/utils/HAXCMSOperationButtons.js";import{varExists as p,varGet as h}from"../../utils/utils.js";import{store as f}from"../../haxcms-elements/lib/core/haxcms-site-store.js";import"../../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import{autorun as d,toJS as g}from"../../../mobx/dist/mobx.esm.js";import"../../simple-icon/simple-icon.js";import"../../simple-icon/lib/simple-icons.js";import"../../haxcms-elements/lib/ui-components/layout/site-region.js";import"../../haxcms-elements/lib/ui-components/navigation/site-top-menu.js";import"../../scroll-button/scroll-button.js";import"./collections-theme-banner.js";class CollectionsTheme extends(m(s(l(r(n(a(c(i)))))))){static get properties(){return{...super.properties,image:{type:String},title:{type:String},color:{type:String},icon:{type:String},activeTitle:{type:String}}}HAXCMSGlobalStyleSheetEditModeContent(){return[...super.HAXCMSGlobalStyleSheetEditModeContent(),t` + #bodycontainer ::slotted(*) { + font-family: "Roboto", sans-serif; + font-weight: 300; + } + #bodycontainer ::slotted(h1), + #bodycontainer ::slotted(h2), + #bodycontainer ::slotted(h3), + #bodycontainer ::slotted(h4), + #bodycontainer ::slotted(h5), + #bodycontainer ::slotted(h6) { + font-family: "Roboto", sans-serif; + font-weight: 400; + } + #bodycontainer ::slotted(p), + #bodycontainer ::slotted(ul), + #bodycontainer ::slotted(ol), + #bodycontainer ::slotted(blockquote) { + font-size: 18px; + margin-block-start: 16px; + margin-block-end: 16px; + } + `]}HAXCMSGlobalStyleSheetContent(){return[...super.HAXCMSGlobalStyleSheetContent(),t` + collections-theme { + font-family: "Roboto", sans-serif; + font-weight: 300; + } + collections-theme h1, + collections-theme h2, + collections-theme h3, + collections-theme h4, + collections-theme h5, + collections-theme h6 { + font-family: "Roboto", sans-serif; + font-weight: 400; + } + collections-theme p, + collections-theme ul, + collections-theme ol, + collections-theme blockquote { + font-size: 18px; + margin-block-start: 16px; + margin-block-end: 16px; + } + `]}static get styles(){return[...super.styles,t` + :host { + --bg-color: #ffffff; + --content-bg-color: #ffffff; + --nav-link-color: #363533; + --icon-color: #363533; + --header-bg-color: var(--haxcms-color, var(--simple-colors-default-theme-orange-6, #e2801e)); + --nav-bg-color: var(--haxcms-color, var(--simple-colors-default-theme-orange-6, #e2801e)); + --footer-secondary-bg-color: var(--haxcms-color, var(--simple-colors-default-theme-orange-6, #e2801e)); + --footer-primary-bg-color: var(--haxcms-color, var(--simple-colors-default-theme-orange-6, #e2801e)); + + display: block; + font-size: 18px; + font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + letter-spacing: normal; + line-height: 28.8px; + background-color: var(--bg-color); + --haxcms-base-styles-body-font-size:18px; + --hax-base-styles-a-font-size: 18px; + --hax-base-styles-p-font-size: 18px; + --hax-base-styles-list-font-size: 18px; + --haxcms-base-styles-body-font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + --haxcms-base-styles-body-line-height: 28.8px; + --hax-base-styles-list-line-height: 28.8px + --hax-base-styles-p-line-height: 28.8px; + --hax-base-styles-p-letter-spacing: normal; + --haxcms-base-styles-body-letter-spacing : normal; + --hax-base-styles-p-min-height: auto; + --hax-base-styles-list-max-width: auto; + --haxcms-base-styles-p-min-height: auto; + --hax-base-styles-list-padding-bottom: auto; + --hax-base-styles-h1-font-size: inherit; + --hax-base-styles-h2-font-size: inherit; + --hax-base-styles-h3-font-size: inherit; + --hax-base-styles-h4-font-size: inherit; + --hax-base-styles-h5-font-size: inherit; + --hax-base-styles-h6-font-size: inherit; + --simple-tooltip-background: #000000; + --simple-tooltip-opacity: 1; + --simple-tooltip-text-color: #ffffff; + --simple-tooltip-delay-in: 0; + --simple-tooltip-border-radius: 0; + --hax-base-styles-a-color-visited: var(--haxcms-color, var(--simple-colors-default-theme-orange-6)); + --hax-base-styles-a-color: var(--haxcms-color, var(--simple-colors-default-theme-orange-6)); + --hax-base-styles-a-color-active: #000000; + --site-search-result-background-color: transparent; + --site-search-result-background-color-hover: #F5F5F5; + --site-search-link-color-hover: #252737; + --site-search-link-text-color: #252737; + --site-search-link-color: #252737; + --site-search-result-color: #252737; + } + + #contentcontainer { + width: 68%; + margin: 0 auto 24px; + } + + :host([edit-mode]) #contentcontainer { + width: 68%; + margin: 0 336px 24px; + } + + #nav { + display: flex; + justify-content: flex-end; + background-color: var(--nav-bg-color); + } + site-top-menu { + font-family: "Roboto", sans-serif; + --site-top-menu-wrapper-justify-content: end; + --site-top-menu-bg: var(--nav-bg-color); + --site-top-menu-indicator-color: #ffffff; + --site-top-menu-link-active-color: #ffffff; + --site-top-menu-link-color: #ffffff; + --site-top-menu-link-bg-color: var(--nav-link-color); + --site-top-menu-link-color-hover: var(--nav-bg-color); + --site-top-menu-link-bg-color-hover: var(--nav-link-color); + clear: both; + font-weight: 300; + line-height: 1.5; + width: 100%; + } + site-top-menu::part(button) { + font-size: 18px; + padding: 16px; + font-family: "Roboto", sans-serif; + font-weight: 300; + text-decoration: none; + text-transform: uppercase; + } + site-top-menu::part(indicator) { + margin-top: -4px; + border-bottom-width: 4px; + } + + @media only screen and (max-width: 700px) { + .link a { + font-size: 16px; + padding: 4px; + } + } + + + main { + padding-top: 100px; + font-family: "Roboto", sans-serif; + } + + @media only screen and (max-width: 1600px) { + main { + padding-top: 90px; + } + } + + @media only screen and (max-width: 1200px) { + main { + padding-top: 60px; + } + } + + @media only screen and (max-width: 800px) { + main { + padding-top: 50px; + } + } + scroll-button { + --scroll-button-color: var(--bg-color); + --scroll-button-active-color: var(--nav-bg-color); + --scroll-button-background-color: var(--nav-bg-color); + --scroll-button-tooltip-background-color:var(--nav-link-color); + --scroll-button-tooltip-color: var(--bg-color); + --simple-icon-height: 24px; + --simple-icon-width: 24px; + position: fixed; + right: 0; + bottom: 64px; + margin-right: 24px; + } + header { + padding: 4px; + margin-top: 2px; + } + footer { + display: block; + } + footer .wrap { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: var(--footer-primary-bg-color); + min-height: 200px; + margin: 0; + padding: 0; + } + footer .site-region-wrapper .footer-secondary + footer .site-region-wrapper .footer-primary { + display: flex; + } + .footer-primary { + font-family: "Roboto", sans-serif; + color: #ffffff; + font-weight: 300; + font-size: 18px; + line-height: 1.2; + text-align: center; + margin: 0; + padding: 0; + } + .footer-secondary { + font-family: "Roboto", sans-serif; + font-size: 18px; + color: #ffffff; + font-weight: 300; + line-height: 1.2; + margin: 24px 0 0 0; + padding: 0; + } + .legal-statement { + display: flex; + margin: 0; + padding: 10px 0px 0px; + } + .legal-item { + color: #ffffff; + padding: 0px 8px 24px; + border-right: 2px solid #ffffff; + height: 0px; + margin: 0; + } + .legal-item:last-child { + border: none; + } + .legal-item a { + text-decoration: none; + color: #ffffff; + } + .legal-item a:focus, + .legal-item a:hover { + color: #000000; + } + .legal-item a:focus { + outline-offset: 4px; + } + .mark a { + display: flex; + background-color: var(--footer-primary-bg-color); + border: 2px solid #ffffff; + border-radius: 50%; + padding: 8px; + opacity: 0.4; + } + .mark { + margin: 24px 0px 16px; + padding: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } +`]}firstUpdated(e){super.firstUpdated&&super.firstUpdated(e),this.__link=document.createElement("link"),this.__link.rel="stylesheet",this.__link.href="https://fonts.googleapis.com/css2?family=Caveat&family=Lato:wght@300;700&family=Open+Sans&display=swap",document.head.appendChild(this.__link),this.HAXCMSThemeSettings.scrollTarget=this.shadowRoot.querySelector("#contentcontainer"),window.AbsolutePositionStateManager.requestAvailability().scrollTarget=this.HAXCMSThemeSettings.scrollTarget,this.shadowRoot.querySelector("scroll-button").target=this.shadowRoot.querySelector("#haxcms-theme-top")}render(){return e` +
+ +
+ + + +
+
+
+
+ +
+
+
+
+ + +
+ `}static get tag(){return"collections-theme"}constructor(){super(),this.HAXCMSThemeSettings.autoScroll=!0,d((()=>{if(!1===g(f.badDevice)){const e=document.createElement("link");e.setAttribute("href","https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400&display=swap"),e.setAttribute("rel","stylesheet"),e.setAttribute("fetchpriority","low"),document.head.appendChild(e)}})),d((e=>{let t=g(f.manifest);this.color=this._getColor(t),this.title=h(t,"title",""),this.image=h(t,"metadata.theme.variables.image","assets/banner.jpg"),this.logo=h(t,"metadata.site.logo","assets/banner.jpg"),this.__disposer.push(e)})),d((e=>{let t=g(f.activeItem);if(t&&t.metadata&&t.metadata.image)this.image=t.metadata.image;else{let e=g(f.manifest);this.image=h(e,"metadata.theme.variables.image","assets/banner.jpg")}this.__disposer.push(e)})),d((e=>{this.activeTitle=g(f.activeTitle),this.__disposer.push(e)}))}_getColor(e){if(e&&p(e,"metadata.theme.variables.cssVariable"))return e.metadata.theme.variables.cssVariable.replace("--simple-colors-default-theme-","").replace("-7","")}}customElements.define(CollectionsTheme.tag,CollectionsTheme);export{CollectionsTheme}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/count-up/count-up.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/count-up/count-up.js index 2440c96455..2306115fdc 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/count-up/count-up.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/count-up/count-up.js @@ -2,7 +2,7 @@ * Copyright 2019 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{LitElement as t,html as e,css as i}from"../../lit/index.js";import{IntersectionObserverMixin as r}from"../intersection-element/lib/IntersectionObserverMixin.js";import{CountUp as n}from"./lib/countup.js";class CountUpElement extends(r(t)){static get styles(){return[i` +import{LitElement as t,html as e,css as i}from"../../lit/index.js";import{IntersectionObserverMixin as r}from"../intersection-element/lib/IntersectionObserverMixin.js";import{CountUp as s}from"./lib/countup.js";class CountUpElement extends(r(t)){static get styles(){return[i` :host { display: inline-flex; --count-up-color: #000000; @@ -28,4 +28,4 @@ import{LitElement as t,html as e,css as i}from"../../lit/index.js";import{Inters
-
`}static get haxProperties(){return{canScale:!0,canPosition:!0,canEditSource:!0,gizmo:{title:"Count up",description:"count up js wrapper with minimal styling",icon:"icons:android",color:"green",groups:["Up"],handles:[],meta:{author:"HAXTheWeb core team",owner:"The Pennsylvania State University"}},settings:{configure:[{property:"start",description:"",inputMethod:"textfield"},{property:"end",description:"",inputMethod:"textfield"},{property:"duration",description:"",inputMethod:"textfield"},{property:"noeasing",description:"",inputMethod:"boolean"},{property:"decimalplaces",description:"",inputMethod:"textfield"},{property:"separator",description:"",inputMethod:"textfield"},{property:"decimal",description:"",inputMethod:"textfield"},{property:"prefix",description:"",inputMethod:"textfield"},{property:"suffix",description:"",inputMethod:"textfield"}],advanced:[]},saveOptions:{unsetAttributes:["element-visible"]}}}static get properties(){return{...super.properties,start:{type:Number},end:{type:Number},duration:{type:Number},noeasing:{type:Boolean},decimalplaces:{type:Number},separator:{type:String},decimal:{type:String},prefixtext:{type:String},suffixtext:{type:String},thresholds:{type:Array},rootMargin:{type:String,attribute:"root-margin"},ratio:{type:Number,reflect:!0},elementVisible:{type:Boolean}}}static get tag(){return"count-up"}constructor(){super(),this.start=0,this.end=100,this.duration=2.5,this.noeasing=!1,this.decimalplaces=0,this.separator=",",this.decimal=".",this.prefixtext=" ",this.suffixtext=" "}firstUpdated(){const t={startVal:this.start,decimalPlaces:this.decimalplaces,duration:this.duration,useEasing:!this.noeasing,separator:this.separator,decimal:this.decimal,prefix:this.prefixtext,suffix:this.suffixtext};this._countUp=new n(this.shadowRoot.querySelector("#counter"),this.end,t)}updated(t){t.forEach(((t,e)=>{"elementVisible"==e&&this[e]&&this._countUp.start()}))}}customElements.define(CountUpElement.tag,CountUpElement);export{CountUpElement,n as CountUp}; \ No newline at end of file + `}static get haxProperties(){return{canScale:!0,canPosition:!0,canEditSource:!0,gizmo:{title:"Count up",description:"count up js wrapper with minimal styling",icon:"icons:android",color:"green",groups:["Up"],handles:[],meta:{author:"HAXTheWeb core team",owner:"The Pennsylvania State University"}},settings:{configure:[{property:"start",description:"",inputMethod:"textfield"},{property:"end",description:"",inputMethod:"textfield"},{property:"duration",description:"",inputMethod:"textfield"},{property:"noeasing",description:"",inputMethod:"boolean"},{property:"decimalplaces",description:"",inputMethod:"textfield"},{property:"separator",description:"",inputMethod:"textfield"},{property:"decimal",description:"",inputMethod:"textfield"},{property:"prefix",description:"",inputMethod:"textfield"},{property:"suffix",description:"",inputMethod:"textfield"}],advanced:[]},saveOptions:{unsetAttributes:["element-visible"]}}}static get properties(){return{...super.properties,start:{type:Number},end:{type:Number},duration:{type:Number},noeasing:{type:Boolean},decimalplaces:{type:Number},separator:{type:String},decimal:{type:String},prefixtext:{type:String},suffixtext:{type:String},thresholds:{type:Array},rootMargin:{type:String,attribute:"root-margin"},ratio:{type:Number,reflect:!0},elementVisible:{type:Boolean}}}static get tag(){return"count-up"}constructor(){super(),this.start=0,this.end=100,this.duration=2.5,this.noeasing=!1,this.decimalplaces=0,this.separator=",",this.decimal=".",this.prefixtext=" ",this.suffixtext=" "}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),this._buildCountUp()}_buildCountUp(){const t={startVal:this.start,decimalPlaces:this.decimalplaces,duration:this.duration,useEasing:!this.noeasing,separator:this.separator,decimal:this.decimal,prefix:this.prefixtext,suffix:this.suffixtext};this._countUp=new s(this.shadowRoot.querySelector("#counter"),this.end,t)}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{"elementVisible"==e&&this[e]&&this._countUp.start(),this.shadowRoot&&"end"==e&&this[e]&&(this._buildCountUp(),this.elementVisible&&this._countUp.start())}))}}customElements.define(CountUpElement.tag,CountUpElement);export{CountUpElement,s as CountUp}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.haxProperties.json b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.haxProperties.json index 41ca05b541..c3380741a2 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.haxProperties.json +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.haxProperties.json @@ -4,11 +4,18 @@ "canEditSource": true, "type": "grid", "gizmo": { - "title": "Blockquote", + "title": "Block quote", "description": "Designed Quote", "icon": "editor:format-quote", "color": "blue", - "tags": ["Layout", "content", "design", "presentation"], + "tags": [ + "Layout", + "quote", + "blockquote", + "content", + "design", + "presentation" + ], "meta": { "author": "HAXTheWeb core team" } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.js index eaec624e13..cdb74f710d 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/block-quote.js @@ -1,9 +1,9 @@ -import{LitElement as i,html as t,css as e}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";export class BlockQuote extends i{static get properties(){return{citation:{type:String},image:{type:String},alt:{type:String}}}static get haxProperties(){return new URL("./block-quote.haxProperties.json",import.meta.url).href}constructor(){super(),this.citation="",this.image="",this.alt=""}render(){return t` +import{html as e,css as i}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";import{SimpleColors as t}from"../../simple-colors/simple-colors.js";export class BlockQuote extends t{static get properties(){return{...super.properties,citation:{type:String},image:{type:String},alt:{type:String}}}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}constructor(){super(),this.citation="",this.image="",this.alt="",this.accentColor="grey"}render(){return e`
- ${this.image?t` + ${this.image?e`
`:""} @@ -19,22 +19,23 @@ import{LitElement as i,html as t,css as e}from"../../../lit/index.js";import"../
- ${this.citation?t`

-- ${this.citation}

`:""} + ${this.citation?e`

-- ${this.citation}

`:""}
- `}static get tag(){return"block-quote"}static get styles(){return[e` + `}static get tag(){return"block-quote"}static get styles(){return[...super.styles,i` :host { + background-color: var(--simple-colors-default-theme-accent-2, #f5f5f5); + color: var(--simple-colors-default-theme-accent-12, #000000); display: block; } #wrap { display: flex; - background-color: var(--block-quote-background-color, #f5f5f5); + border-left-color: var( --simple-colors-default-theme-accent-3, #747474); border-left: solid; border-left-width: 8px; - border-left-color: var(--block-quote-border-color, #747474); padding: 25px; } @@ -71,7 +72,7 @@ import{LitElement as i,html as t,css as e}from"../../../lit/index.js";import"../ } simple-icon-lite { - color: #747474; + color: var( --simple-colors-default-theme-accent-7, #747474); height: 30px; width: 30px; } @@ -91,7 +92,7 @@ import{LitElement as i,html as t,css as e}from"../../../lit/index.js";import"../ margin: 0 auto 0; border: solid; border-width: 6px; - border-color: var(--block-quote-border-color, #747474); + border-color: var( --simple-colors-default-theme-accent-3, #747474); border-radius: 50%; } } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/learning-component.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/learning-component.js index 8fdc2a0009..a6084a1499 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/learning-component.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/learning-component.js @@ -2,27 +2,24 @@ * Copyright 2021 * @license Apache-2.0, see License.md for full text. */ -import{LitElement as e,html as t,css as n,unsafeCSS as i}from"../../../lit-element/lit-element.js";import"../../simple-tooltip/simple-tooltip.js";import"../../hax-iconset/lib/simple-hax-iconset.js";import"../../simple-icon/lib/simple-icon-lite.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-button-lite.js";import{I18NMixin as o}from"../../i18n-manager/lib/I18NMixin.js";export const learningComponentNouns={content:"Content",assessment:"Assessment",quiz:"Quiz",submission:"Submission",lesson:"Lesson",module:"Module",task:"Task",activity:"Activity",project:"Project",practice:"Practice",unit:"Unit",objectives:"Learning Objectives"};export const learningComponentVerbs={connection:"Connection",knowledge:"Did You Know?",strategy:"Learning Strategy",discuss:"Discuss",listen:"Listen",make:"Make",observe:"Observe",present:"Present",read:"Read",reflect:"Reflect",research:"Research",watch:"Watch",write:"Write"};export const learningComponentTypes={...learningComponentVerbs,...learningComponentNouns};export const learningComponentColors={content:"blue-grey",assessment:"red",quiz:"blue",submission:"deep-purple",lesson:"purple",module:"red",task:"blue-grey",activity:"orange",project:"deep-orange",practice:"brown",unit:"light-green",objectives:"indigo",connection:"green",knowledge:"cyan",strategy:"teal",discuss:"blue",listen:"purple",make:"orange",observe:"yellow",present:"light-blue",read:"lime",reflect:"amber",research:"deep-orange",watch:"pink",write:"deep-purple"};export function iconFromPageType(e){switch(e){case"content":return"lrn:page";case"assessment":return"lrn:assessment";case"quiz":return"lrn:quiz";case"submission":return"icons:move-to-inbox";case"lesson":return"hax:lesson";case"module":return"hax:module";case"unit":return"hax:unit";case"task":return"hax:task";case"activity":return"hax:ticket";case"project":return"hax:bulletin-board";case"practice":return"hax:shovel";case"connection":return"courseicons:chem-connection";case"knowledge":return"courseicons:knowledge";case"strategy":case"discuss":case"make":case"observe":case"present":case"reading":case"reflect":case"research":case"watch":return"courseicons:strategy";case"listen":return"courseicons:listen";case"write":return"lrn:write"}return"courseicons:learning-objectives"}class LearningComponent extends(o(e)){static get tag(){return"learning-component"}static get properties(){return{type:{type:String,reflect:!0},subtitle:{type:String},url:{type:String}}}constructor(){super(),this.type="objectives",this.subtitle=null,this.url=null,this.t={...super.t,readMore:"Read More"}}static get styles(){let e=Object.keys(learningComponentColors).map((e=>{let t=learningComponentColors[e];return`\n :host([type="${e}"]) .header {\n --header-objectives-bg-color: var(--header-${e}-bg-color, var(--simple-colors-default-theme-${t}-8));\n }\n :host([type="${e}"]) simple-icon-button-lite {\n --simple-icon-color: var(--svg-url-${e}-fill-color, var(--simple-colors-default-theme-${t}-8));\n }\n `}));return[n` +import{html as e,css as t,unsafeCSS as i}from"../../../lit-element/lit-element.js";import"../../simple-tooltip/simple-tooltip.js";import"../../hax-iconset/lib/simple-hax-iconset.js";import"../../simple-icon/lib/simple-icon-lite.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-button-lite.js";import{SimpleColors as n}from"../../simple-colors/simple-colors.js";import{I18NMixin as o}from"../../i18n-manager/lib/I18NMixin.js";export const learningComponentNouns={content:"Content",assessment:"Assessment",quiz:"Quiz",submission:"Submission",lesson:"Lesson",module:"Module",task:"Task",activity:"Activity",project:"Project",practice:"Practice",unit:"Unit",objectives:"Learning Objectives"};export const learningComponentVerbs={connection:"Connection",knowledge:"Did You Know?",strategy:"Learning Strategy",discuss:"Discuss",listen:"Listen",make:"Make",observe:"Observe",present:"Present",read:"Read",reflect:"Reflect",research:"Research",watch:"Watch",write:"Write"};export const learningComponentTypes={...learningComponentVerbs,...learningComponentNouns};export const learningComponentColors={content:"blue-grey",assessment:"red",quiz:"blue",submission:"deep-purple",lesson:"purple",module:"red",task:"blue-grey",activity:"orange",project:"deep-orange",practice:"brown",unit:"light-green",objectives:"indigo",connection:"green",knowledge:"cyan",strategy:"teal",discuss:"blue",listen:"purple",make:"orange",observe:"yellow",present:"light-blue",read:"lime",reflect:"amber",research:"deep-orange",watch:"pink",write:"deep-purple"};export function iconFromPageType(e){switch(e){case"content":return"lrn:page";case"assessment":return"lrn:assessment";case"quiz":return"lrn:quiz";case"submission":return"icons:move-to-inbox";case"lesson":return"hax:lesson";case"module":return"hax:module";case"unit":return"hax:unit";case"task":return"hax:task";case"activity":return"hax:ticket";case"project":return"hax:bulletin-board";case"practice":return"hax:shovel";case"connection":return"courseicons:chem-connection";case"knowledge":return"courseicons:knowledge";case"strategy":case"discuss":case"make":case"observe":case"present":case"reading":case"reflect":case"research":case"watch":return"courseicons:strategy";case"listen":return"courseicons:listen";case"write":return"lrn:write"}return"courseicons:learning-objectives"}class LearningComponent extends(o(n)){static get tag(){return"learning-component"}static get properties(){return{...super.properties,type:{type:String,reflect:!0},subtitle:{type:String},title:{type:String},icon:{type:String},url:{type:String}}}updated(e){super.updated(e),e.has("type")&&this.type&&(this.accentColor=learningComponentColors[this.type],this.title=learningComponentTypes[this.type],this.icon=iconFromPageType(this.type))}constructor(){super(),this.icon=null,this.accentColor=null,this.dark=!1,this.type="objectives",this.subtitle=null,this.title=null,this.url=null,this.t={...super.t,readMore:"Read More"}}static get styles(){return[super.styles,t` :host { display: block; font-family: "Open Sans", sans-serif; border: 1px solid var(--card-border-color, #d9d9d9); margin: 15px 0 15px; } - - ${i(e.join("\n"))} - .header { display: flex; align-items: center; background-color: var( --header-objectives-bg-color, - var(--simple-colors-default-theme-orange-7, #dc7927) + var(--simple-colors-default-theme-accent-8, #dc7927) ); padding: 10px; color: var( --header-font-color, - var(--simple-colors-default-theme-grey-1, #fff) + var(--simple-colors-default-theme-accent-1, #fff) ); } .title { @@ -49,7 +46,7 @@ import{LitElement as e,html as t,css as n,unsafeCSS as i}from"../../../lit-eleme } simple-icon-lite, simple-icon-button-lite { - fill: var( + color: var( --header-svg-fill-color, var(--simple-colors-default-theme-grey-1, #fff) ); @@ -58,6 +55,10 @@ import{LitElement as e,html as t,css as n,unsafeCSS as i}from"../../../lit-eleme padding: 5px; } + simple-icon-button-lite { + color: var(--simple-colors-default-theme-accent-8); + } + @media screen and (min-width: 320px) { .content { padding: 25px 30px; @@ -107,21 +108,21 @@ import{LitElement as e,html as t,css as n,unsafeCSS as i}from"../../../lit-eleme width: 50px; } } - `]}render(){return t` + `]}render(){return e`
${this.subtitle}
-
${learningComponentTypes[this.type]}
+
${this.title}
- ${this.url?t`
+ ${this.url?e` `:""}
- `}static get haxProperties(){return{type:"grid",canScale:!0,canPosition:!1,canEditSource:!0,gizmo:{title:"Learning Component",description:"A card for instructors to communicate pedagogy and instructional strategies.",icon:"icons:bookmark",color:"orange",tags:["Instructional","content","design","presentation"],handles:[],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"type",title:"Type",description:"The type of card to be used.",inputMethod:"select",options:learningComponentTypes,required:!0},{property:"subtitle",title:"Sub-Title",description:"The sub-title of the card.",inputMethod:"textfield",icon:"editor:title"},{property:"url",title:"Link",description:"An optional link for the card (Link not available for Learning Objectives).",inputMethod:"url",icon:"editor:insert-link"},{slot:"",title:"Contents"}],advanced:[]},demoSchema:[{tag:"learning-component",properties:{type:"objectives",subtitle:"Unit 1"},content:"

By the end of this lesson, you should be able to...

"}]}}}customElements.define(LearningComponent.tag,LearningComponent);export{LearningComponent}; \ No newline at end of file + `}static get haxProperties(){return{type:"grid",canScale:!1,canPosition:!1,hideDefaultSettings:!0,gizmo:{title:"Learning Component",description:"A card for instructors to communicate pedagogy and instructional strategies.",icon:"icons:bookmark",color:"orange",tags:["Instructional","content","design","presentation","instruction","course","learning","card"],handles:[],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"type",title:"Type",description:"The type of card to be used.",inputMethod:"select",options:learningComponentTypes,required:!0},{property:"subtitle",title:"Sub-Title",description:"The sub-title of the card.",inputMethod:"textfield"},{property:"url",title:"Link",description:"An optional link for the card (Link not available for Learning Objectives).",inputMethod:"url"},{slot:"",title:"Contents"}],advanced:[{property:"title",title:"Title",description:"Set Title, this overrides type based title",inputMethod:"textfield"},{property:"icon",title:"Icon",description:"Set icon, this overrides type based icon",inputMethod:"iconpicker"},{property:"accentColor",title:"Accent color",description:"Set accent color, this overrides type based color",inputMethod:"colorpicker"},{property:"dark",title:"Dark mode",description:"Invert high and low tones",inputMethod:"boolean"}]},demoSchema:[{tag:"learning-component",properties:{type:"objectives",subtitle:"Unit 1"},content:"

By the end of this lesson, you should be able to...

"}]}}}customElements.define(LearningComponent.tag,LearningComponent);export{LearningComponent}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js index c29c4e9009..7ac9d276af 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js @@ -1,4 +1,4 @@ -import{LitElement as t,html as e,css as o}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";export class WorksheetDownload extends t{static get properties(){return{title:{type:String},link:{type:String}}}static get tag(){return"worksheet-download"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!1,gizmo:{title:"Worksheet Download",description:"A button for displaying files available for download.",icon:"icons:file-download",color:"blue",tags:["Instructional","link","worksheet","download","url","file"],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"title",title:"Title",description:"The title of the download.",inputMethod:"textfield",icon:"editor:title"},{property:"link",title:"Link",description:"The link for the download.",inputMethod:"textfield",icon:"editor:insert-link"}],advanced:[]},demoSchema:[{tag:"worksheet-download",properties:{title:"Download worksheet"},content:""}]}}haxHooks(){return{editModeChanged:"haxeditModeChanged",activeElementChanged:"haxactiveElementChanged"}}haxactiveElementChanged(t,e){e&&(this._haxstate=e)}haxeditModeChanged(t){this._haxstate=t}_clickLink(t){this._haxstate&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}constructor(){super(),this.title="",this.link=""}static get styles(){return[o` +import{LitElement as t,html as e,css as o}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";export class WorksheetDownload extends t{static get properties(){return{title:{type:String},link:{type:String}}}static get tag(){return"worksheet-download"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!1,gizmo:{title:"Worksheet Download",description:"A button for displaying files available for download.",icon:"icons:file-download",color:"blue",tags:["Instructional","link","worksheet","download","url","file"],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"title",title:"Title",description:"The title of the download.",inputMethod:"textfield",icon:"editor:title"},{property:"link",title:"Link",description:"The link for the download.",inputMethod:"haxupload",icon:"editor:insert-link"}],advanced:[]},demoSchema:[{tag:"worksheet-download",properties:{title:"Download worksheet"},content:""}]}}haxHooks(){return{editModeChanged:"haxeditModeChanged",activeElementChanged:"haxactiveElementChanged"}}haxactiveElementChanged(t,e){e&&(this._haxstate=e)}haxeditModeChanged(t){this._haxstate=t}_clickLink(t){this._haxstate&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}constructor(){super(),this.title="",this.link=""}static get styles(){return[o` :host { display: block; } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-model/course-model.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-model/course-model.js index a7ddedc068..7d1bb67ca5 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/course-model/course-model.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/course-model/course-model.js @@ -66,7 +66,7 @@ import{LitElement as e,html as t,css as i}from"../../lit/index.js";import"../../ #info-wrap { background: rgba(0, 0, 0, 0.8); - color: rgb(255, 255, 255); + color: #ffffff; position: absolute; z-index: 1; overflow-y: scroll; diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/date-card.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/date-card.js index 208e33400a..eb03ac47ee 100644 --- a/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/date-card.js +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/date-card.js @@ -20,7 +20,7 @@ import{html as t,css as e}from"../../lit/index.js";import{SimpleColors as r}from .dayName { text-align: center; vertical-align: middle; - font-family: roboto; + font-family: "Roboto", sans-serif; line-height: 16px; margin-bottom: 8px; margin-top: 15px; @@ -52,7 +52,7 @@ import{html as t,css as e}from"../../lit/index.js";import{SimpleColors as r}from .time, .location { vertical-align: middle; - font-family: roboto; + font-family: "Roboto", sans-serif; line-height: 16px; margin-bottom: 8px; } diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/lib/date-chip.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/lib/date-chip.js new file mode 100644 index 0000000000..0c6e7b07c8 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/date-card/lib/date-chip.js @@ -0,0 +1,41 @@ +import{html as t,css as e}from"../../../lit/index.js";import{SimpleColors as a}from"../../simple-colors/simple-colors.js";class DateChip extends a{static get tag(){return"date-chip"}static get properties(){return{...super.properties,timestamp:{type:Number},unix:{type:Boolean},month:{type:String},day:{type:Number}}}static get styles(){return[...super.styles,e` + :host { + display: block; + } + + .date-container { + text-align: center; + } + + .date-month { + display: block; + border-radius: 4px 4px 0 0; + background: var(--simple-colors-default-theme-accent-12, #1e407c); + color: var(--simple-colors-default-theme-grey-1, #f7f7f7); + font-size: var( + --date-chip-month-font-size, + var(--date-chip-font-size, 18px) + ); + font-weight: bold; + line-height: 1.8; + padding: 0px 8px; + text-transform: uppercase; + } + + .date-container .date-day { + background: var(--simple-colors-default-theme-accent-2, #f7f7f7); + border-radius: 0 0 4px 4px; + border-style: solid; + border-color: var(--simple-colors-default-theme-accent-12, #f7f7f7); + color: var(--simple-colors-default-theme-grey-12, #444); + display: block; + font-size: var(--date-chip-font-size, 18px); + font-weight: 900; + padding: 8px 16px; + } + `]}constructor(){super(),this.timestamp=null,this.unix=null,this.month=null,this.day=null}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{if(["timestamp","format","unix"].includes(e)&&this.timestamp){let t=this.timestamp;this.unix&&(t*=1e3),this.month=new Date(t).toLocaleString("default",{month:"long"}).substring(0,3),this.day=new Date(t).getDate()}}))}render(){return t` +
+ ${this.month} + ${this.day} +
+ `}}customElements.define(DateChip.tag,DateChip); \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/discord-embed.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/discord-embed.js new file mode 100644 index 0000000000..928fef3bb6 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/discord-embed.js @@ -0,0 +1,13 @@ +/** + * Copyright 2023 + * @license , see License.md for full text. + */ +import{LitElement as e,html as t,css as r}from"../../lit/index.js";import"../iframe-loader/iframe-loader.js";class DiscordEmbed extends e{constructor(){super(),this.source="",this.height=500,this.width="100%"}static get styles(){return[r` + :host { + display: block; + } + `]}static get properties(){return{height:{type:String},width:{type:String},source:{type:String,reflect:!0}}}static get haxProperties(){return new URL(`./lib/${this.tag}.haxProperties.json`,import.meta.url).href}static get tag(){return"discord-embed"}render(){return t`${this.source&&(this.source.includes("discord.com")||this.source.includes("e.widgetbot.io"))?t` + + + + `:t`
Invalid Discord share link
`}`}updated(e){super.updated&&super.updated(e),e.forEach(((e,t)=>{"source"===t&&this.source&&this.source.includes("https://discord.com/channels")&&(this.source=this.source.replace("https://discord.com/channels/","https://e.widgetbot.io/channels/"))}))}}customElements.define(DiscordEmbed.tag,DiscordEmbed);export{DiscordEmbed}; \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/lib/discord-embed.haxProperties.json b/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/lib/discord-embed.haxProperties.json new file mode 100644 index 0000000000..aa014035d4 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/discord-embed/lib/discord-embed.haxProperties.json @@ -0,0 +1,55 @@ +{ + "api": "1", + "type": "element", + "editingElement": "core", + "hideDefaultSettings": true, + "canScale": true, + "canPosition": true, + "canEditSource": false, + "contentEditable": false, + "gizmo": { + "title": "Discord Embed", + "description": "Embed discord communities based on share URL", + "icon": "hax:discord", + "color": "purple", + "tags": ["Resource", "discord", "embed", "link", "social"], + "handles": [], + "meta": { + "author": "HAXTheWeb core team" + } + }, + "settings": { + "configure": [ + { + "property": "source", + "title": "Resource url", + "description": "Resource url", + "inputMethod": "textfield", + "icon": "link", + "required": true, + "validationType": "url" + }, + { + "property": "height", + "title": "Height", + "description": "Content frame height", + "inputMethod": "textfield" + }, + { + "property": "width", + "title": "Width", + "description": "Content frame width", + "inputMethod": "textfield" + } + ], + "advanced": [] + }, + "demoSchema": [ + { + "tag": "discord-embed", + "content": "", + "properties": { + } + } + ] +} \ No newline at end of file diff --git a/haxcms/build/es6/node_modules/@lrnwebcomponents/documentation-player/documentation-player.js b/haxcms/build/es6/node_modules/@lrnwebcomponents/documentation-player/documentation-player.js new file mode 100644 index 0000000000..26c7a490b8 --- /dev/null +++ b/haxcms/build/es6/node_modules/@lrnwebcomponents/documentation-player/documentation-player.js @@ -0,0 +1,30 @@ +/** + * Copyright 2023 + * @license , see License.md for full text. + */ +import{LitElement as t,html as e,css as i,render as r,nothing as s}from"../../lit/index.js";import"../simple-img/simple-img.js";import"../simple-icon/lib/simple-icon-button-lite.js";import"../play-list/play-list.js";import"../code-sample/code-sample.js";import"../code-editor/lib/code-pen-button.js";import{nodeToHaxElement as n}from"../utils/utils.js";class DocumentationPlayer extends t{constructor(){super(),this.label="",this.haxSchema=[],this.imageUrl="",this.url="",setTimeout((async()=>{for(let t=0;twindow.WCGlobalCDNPath="https://cdn.webcomponents.psu.edu/cdn/";<\/script>