@paperless/core 1.9.4 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/build/p-2540301a.entry.js +3 -0
- package/dist/build/p-2540301a.entry.js.map +1 -0
- package/dist/build/p-2cb55f24.entry.js +2 -0
- package/dist/build/p-2cb55f24.entry.js.map +1 -0
- package/dist/build/p-fac13366.entry.js +2 -0
- package/dist/build/p-fac13366.entry.js.map +1 -0
- package/dist/build/paperless.css +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-cropper.cjs.entry.js +2815 -0
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js +3 -2
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +2 -1
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +20 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -1
- package/dist/collection/components/molecules/cropper/cropper.component.css +1 -0
- package/dist/collection/components/molecules/cropper/cropper.component.js +235 -0
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js +26 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js.map +1 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js +17 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js.map +1 -0
- package/dist/collection/components/organisms/modal/modal.component.js +21 -2
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/components/modal-body.component.js +5 -3
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/p-cropper.d.ts +11 -0
- package/dist/components/p-cropper.js +2841 -0
- package/dist/components/p-cropper.js.map +1 -0
- package/dist/components/p-modal.js +3 -1
- package/dist/components/p-modal.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-cropper.entry.js +2811 -0
- package/dist/esm/p-cropper.entry.js.map +1 -0
- package/dist/esm/p-modal-body_4.entry.js +3 -2
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js +2 -1
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-2540301a.entry.js +3 -0
- package/dist/paperless/p-2540301a.entry.js.map +1 -0
- package/dist/paperless/p-2cb55f24.entry.js +2 -0
- package/dist/paperless/p-2cb55f24.entry.js.map +1 -0
- package/dist/paperless/p-fac13366.entry.js +2 -0
- package/dist/paperless/p-fac13366.entry.js.map +1 -0
- package/dist/paperless/paperless.css +35 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/style/form/_range.scss +13 -0
- package/dist/style/form/index.scss +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +4 -0
- package/dist/types/components/molecules/cropper/cropper.component.d.ts +38 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +4 -0
- package/dist/types/components.d.ts +61 -0
- package/hydrate/index.js +2834 -9
- package/package.json +3 -1
- package/dist/build/p-997962db.entry.js +0 -2
- package/dist/build/p-997962db.entry.js.map +0 -1
- package/dist/build/p-b7893a63.entry.js +0 -2
- package/dist/build/p-b7893a63.entry.js.map +0 -1
- package/dist/paperless/p-997962db.entry.js +0 -2
- package/dist/paperless/p-997962db.entry.js.map +0 -1
- package/dist/paperless/p-b7893a63.entry.js +0 -2
- package/dist/paperless/p-b7893a63.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-modal.entry.js","mappings":";;MAea,KAAK;;;;;
|
|
1
|
+
{"file":"p-modal.entry.js","mappings":";;MAea,KAAK;;;;;IAwEN,mBAAc,GAAG,KAAK,CAAC;IACvB,mBAAc,GAAG,KAAK,CAAC;gBArEW,IAAI;mBAKP,SAAS;;gBAUxB,KAAK;qBAKA,KAAK;qBAKd,IAAI;4BAKG,KAAK;8BAKH,IAAI;sBAKH,IAAI;mBAKP,IAAI;oBA0BH,KAAK;;EAEjC,iBAAiB;IACb,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1C,0BAA0B,CAC7B,CAAC;IACF,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1C,0BAA0B,CAC7B,CAAC;GACL;EAED,MAAM;;IACF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACZ,OAAO;KACV;IAED,MAAM,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAC7C,MAAM,WAAW,GAAG,YAAM,IAAI,EAAC,SAAS,GAAG,CAAC;IAC5C,MAAM,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAE7C,QACI,EAAC,IAAI,IAAC,KAAK,EAAC,SAAS,IACjB,kBACI,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EACjD,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,UAAU,EAAE,IAAI,CAAC,UAAU,IAE3B,yBAAmB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,IACrD,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,KAAI,IAAI,CAAC,cAAc,MACxC,sBACI,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAErC,IAAI,CAAC,cAAc;QACd,aAAa;QACb,IAAI,CAAC,MAAM,CACJ,CACpB,EACD,oBACI,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,EAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,WAAW,CACD,EACd,IAAI,CAAC,cAAc,KAChB,0BAAiB,aAAa,CAAkB,CACnD,CACe,CACX,CACV,EACT;GACL;EAEO,cAAc,CAAC,EAAc;IACjC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;MAC1B,OAAO;KACV;IAED,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;GAClB;EAEM,KAAK,CAAC,EAAc;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC;MACP,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;MAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MAEtB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB,EAAE,GAAG,CAAC,CAAC;GACX;;;;;;","names":[],"sources":["src/components/organisms/modal/modal.component.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'p-modal',\n shadow: true,\n})\nexport class Modal {\n /**\n * The size of the modal container\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * The variant of the modal body\n */\n @Prop() variant: 'default' | 'table' = 'default';\n\n /**\n * The Header of the modal\n */\n @Prop() header?: string;\n\n /**\n * Wether to show the modal or not\n */\n @Prop() show: boolean = false;\n\n /**\n * Wether to apply blur to the backdrop\n */\n @Prop() applyBlur: boolean = false;\n\n /**\n * Wether to show the close button in the header\n */\n @Prop() showClose = true;\n\n /**\n * Wether to show the footer on mobile\n */\n @Prop() showMobileFooter = false;\n\n /**\n * Wether to hide the modal when the backdrop is clicked\n */\n @Prop() backdropClickClose = true;\n\n /**\n * Wether we should scroll lock the body\n */\n @Prop() scrollLock: boolean = true;\n\n /**\n * Wether the body should have padding\n */\n @Prop() padding: boolean = true;\n\n /**\n * Close click event\n */\n @Event({\n bubbles: false,\n })\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Closed event\n */\n @Event({\n bubbles: false,\n })\n closed: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _hasFooterSlot = false;\n private _hasHeaderSlot = false;\n\n @State() private _closing = false;\n\n componentWillLoad() {\n this._hasFooterSlot = !!this._el.querySelector(\n ':scope > [slot=\"footer\"]'\n );\n this._hasHeaderSlot = !!this._el.querySelector(\n ':scope > [slot=\"header\"]'\n );\n }\n\n render() {\n if (!this.show) {\n return;\n }\n\n const headerContent = <slot name=\"header\" />;\n const bodyContent = <slot name=\"content\" />;\n const footerContent = <slot name=\"footer\" />;\n\n return (\n <Host class=\"p-modal\">\n <p-backdrop\n applyBlur={this.applyBlur}\n onClicked={(ev) => this._backdropClick(ev.detail)}\n closing={this._closing}\n scrollLock={this.scrollLock}\n >\n <p-modal-container size={this.size} closing={this._closing}>\n {(this.header?.length || this._hasHeaderSlot) && (\n <p-modal-header\n showClose={this.showClose}\n onClose={(ev) => this.close(ev.detail)}\n >\n {this._hasHeaderSlot\n ? headerContent\n : this.header}\n </p-modal-header>\n )}\n <p-modal-body\n variant={this.variant}\n rounded={!this._hasFooterSlot}\n padding={this.padding}\n >\n {bodyContent}\n </p-modal-body>\n {this._hasFooterSlot && (\n <p-modal-footer>{footerContent}</p-modal-footer>\n )}\n </p-modal-container>\n </p-backdrop>\n </Host>\n );\n }\n\n private _backdropClick(ev: MouseEvent) {\n if (!this.backdropClickClose) {\n return;\n }\n\n this.close(ev);\n }\n\n public close(ev: MouseEvent) {\n this.closeClicked.emit(ev);\n\n this._closing = true;\n\n setTimeout(() => {\n this.show = false;\n this._closing = false;\n\n this.closed.emit();\n }, 550);\n }\n}\n"],"version":3}
|
package/dist/esm/paperless.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy(JSON.parse("[[\"p-button_3\",[[4,\"p-button\",{\"variant\":[1],\"href\":[1],\"target\":[1],\"size\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"p-modal\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]}]]],[\"p-select\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"p-datepicker\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]}]]],[\"p-attachment\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-accordion\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-info-panel\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"p-stepper-item\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-divider\",[[1,\"p-divider\"]]],[\"p-tab-group\",[[1,\"p-tab-group\"]]],[\"p-avatar\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"_src\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-avatar-group\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-toast-container\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-counter\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[4]}]]],[\"p-dropdown_2\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]]]]],[\"p-helper_3\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"focusMethod\":[1,\"focus-method\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-illustration_6\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
17
|
+
return bootstrapLazy(JSON.parse("[[\"p-button_3\",[[4,\"p-button\",{\"variant\":[1],\"href\":[1],\"target\":[1],\"size\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"p-modal\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]}]]],[\"p-select\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"p-datepicker\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]}]]],[\"p-attachment\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-divider\",[[1,\"p-divider\"]]],[\"p-accordion\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"p-stepper-item\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group\",[[1,\"p-tab-group\"]]],[\"p-avatar\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"_src\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-avatar-group\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-toast-container\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-counter\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[4]}]]],[\"p-dropdown_2\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]]]]],[\"p-helper_3\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"focusMethod\":[1,\"focus-method\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-illustration_6\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=paperless.js.map
|
package/dist/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <script type="module" src="/build/paperless.esm.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> </head> <body> <p-button>Buttono</p-button> <script data-build="2023-
|
|
1
|
+
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <script type="module" src="/build/paperless.esm.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> </head> <body> <p-button>Buttono</p-button> <script data-build="2023-11-01T13:41:18">
|
|
2
2
|
if ('serviceWorker' in navigator && location.protocol !== 'file:') {
|
|
3
3
|
window.addEventListener('load', function() {
|
|
4
4
|
navigator.serviceWorker.register('/sw.js')
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e}from"./p-e4d5e7a7.js";function n(t){var s,i,e="";if("string"==typeof t||"number"==typeof t)e+=t;else if("object"==typeof t)if(Array.isArray(t))for(s=0;s<t.length;s++)t[s]&&(i=n(t[s]))&&(e&&(e+=" "),e+=i);else for(s in t)t[s]&&(e&&(e+=" "),e+=s);return e}function o(){for(var t,s,i=0,e="";i<arguments.length;)(t=arguments[i++])&&(s=n(t))&&(e&&(e+=" "),e+=s);return e}const h=typeof window!=="undefined"&&typeof window.document!=="undefined";const r=h?window:{};const a=h?"ontouchstart"in r.document.documentElement:false;const c=h?"PointerEvent"in r:false;const l="cropper";const f=`${l}-canvas`;const u=`${l}-crosshair`;const p=`${l}-grid`;const d=`${l}-handle`;const b=`${l}-image`;const m=`${l}-selection`;const g=`${l}-shade`;const w=`${l}-viewer`;const v="select";const $="move";const k="scale";const y="rotate";const x="transform";const z="none";const M="n-resize";const C="e-resize";const A="s-resize";const j="w-resize";const O="ne-resize";const S="nw-resize";const T="se-resize";const E="sw-resize";const I="action";const N=a?"touchend touchcancel":"mouseup";const X=a?"touchmove":"mousemove";const Y=a?"touchstart":"mousedown";const R=c?"pointerdown":Y;const W=c?"pointermove":X;const P=c?"pointerup pointercancel":N;const _="error";const D="keydown";const L="load";const H="wheel";const B="action";const F="actionend";const U="actionmove";const K="actionstart";const Z="change";const q="transform";function G(t){return typeof t==="string"}const J=Number.isNaN||r.isNaN;function Q(t){return typeof t==="number"&&!J(t)}function V(t){return Q(t)&&t>0&&t<Infinity}function tt(t){return typeof t==="undefined"}function st(t){return typeof t==="object"&&t!==null}const{hasOwnProperty:it}=Object.prototype;function et(t){if(!st(t)){return false}try{const{constructor:s}=t;const{prototype:i}=s;return s&&i&&it.call(i,"isPrototypeOf")}catch(t){return false}}function nt(t){return typeof t==="function"}function ot(t){return typeof t==="object"&&t!==null&&t.nodeType===1}const ht=/([a-z\d])([A-Z])/g;function rt(t){return String(t).replace(ht,"$1-$2").toLowerCase()}const at=/-[A-z\d]/g;function ct(t){return t.replace(at,(t=>t.slice(1).toUpperCase()))}const lt=/\s\s*/;function ft(t,s,i,e){s.trim().split(lt).forEach((s=>{t.removeEventListener(s,i,e)}))}function ut(t,s,i,e){s.trim().split(lt).forEach((s=>{t.addEventListener(s,i,e)}))}function pt(t,s,i,e){ut(t,s,i,Object.assign(Object.assign({},e),{once:true}))}const dt={bubbles:true,cancelable:true,composed:true};function bt(t,s,i,e){return t.dispatchEvent(new CustomEvent(s,Object.assign(Object.assign(Object.assign({},dt),{detail:i}),e)))}const mt=Promise.resolve();function gt(t,s){return s?mt.then(t?s.bind(t):s):mt}function wt(t){const{documentElement:s}=t.ownerDocument;const i=t.getBoundingClientRect();return{left:i.left+(r.pageXOffset-s.clientLeft),top:i.top+(r.pageYOffset-s.clientTop)}}const vt=/deg|g?rad|turn$/i;function $t(t){const s=parseFloat(t)||0;if(s!==0){const[i="rad"]=String(t).match(vt)||[];switch(i.toLowerCase()){case"deg":return s/360*(Math.PI*2);case"grad":return s/400*(Math.PI*2);case"turn":return s*(Math.PI*2)}}return s}const kt="contain";const yt="cover";function xt(t,s=kt){const{aspectRatio:i}=t;let{width:e,height:n}=t;const o=V(e);const h=V(n);if(o&&h){const t=n*i;if(s===kt&&t>e||s===yt&&t<e){n=e/i}else{e=n*i}}else if(o){n=e/i}else if(h){e=n*i}return{width:e,height:n}}function zt(t,...s){if(s.length===0){return t}const[i,e,n,o,h,r]=t;const[a,c,l,f,u,p]=s[0];t=[i*a+n*c,e*a+o*c,i*l+n*f,e*l+o*f,i*u+n*p+h,e*u+o*p+r];return zt(t,...s.slice(1))}var Mt=`:host([hidden]){display:none!important}`;const Ct=/left|top|width|height/i;const At="open";const jt=new WeakMap;const Ot=new WeakMap;const St=new Map;const Tt=r.document&&Array.isArray(r.document.adoptedStyleSheets)&&"replaceSync"in r.CSSStyleSheet.prototype;class Et extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${Mt}`}constructor(){var t,s;super();this.shadowRootMode=At;this.slottable=true;const i=(s=(t=Object.getPrototypeOf(this))===null||t===void 0?void 0:t.constructor)===null||s===void 0?void 0:s.$name;if(i){St.set(i,this.tagName.toLowerCase())}}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}const e=ct(t);const n=this[e];let o=i;switch(typeof n){case"boolean":o=i!==null&&i!=="false";break;case"number":o=Number(i);break}this[e]=o;switch(t){case"theme-color":{const t=Ot.get(this);const s=this.$sharedStyle;if(t&&s){if(Tt){t.replaceSync(s)}else{t.textContent=s}}break}}}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}t=rt(t);switch(typeof i){case"boolean":if(i===true){if(!this.hasAttribute(t)){this.setAttribute(t,"")}}else{this.removeAttribute(t)}break;case"number":if(J(i)){i=""}else{i=String(i)}default:if(i){if(this.getAttribute(t)!==i){this.setAttribute(t,i)}}else{this.removeAttribute(t)}}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach((t=>{const s=ct(t);let i=this[s];if(!tt(i)){this.$propertyChangedCallback(s,undefined,i)}Object.defineProperty(this,s,{enumerable:true,configurable:true,get(){return i},set(t){const e=i;i=t;this.$propertyChangedCallback(s,e,t)}})}));const t=this.attachShadow({mode:this.shadowRootMode||At});if(!this.shadowRoot){jt.set(this,t)}Ot.set(this,this.$addStyles(this.$sharedStyle));if(this.$style){this.$addStyles(this.$style)}if(this.$template){const s=document.createElement("template");s.innerHTML=this.$template;t.appendChild(s.content)}if(this.slottable){const s=document.createElement("slot");t.appendChild(s)}}disconnectedCallback(){if(Ot.has(this)){Ot.delete(this)}if(jt.has(this)){jt.delete(this)}}$getTagNameOf(t){var s;return(s=St.get(t))!==null&&s!==void 0?s:t}$setStyles(t){Object.keys(t).forEach((s=>{let i=t[s];if(Q(i)){if(i!==0&&Ct.test(s)){i=`${i}px`}else{i=String(i)}}this.style[s]=i}));return this}$getShadowRoot(){return this.shadowRoot||jt.get(this)}$addStyles(t){let s;const i=this.$getShadowRoot();if(Tt){s=new CSSStyleSheet;s.replaceSync(t);i.adoptedStyleSheets=i.adoptedStyleSheets.concat(s)}else{s=document.createElement("style");s.textContent=t;i.appendChild(s)}return s}$emit(t,s,i){return bt(this,t,s,i)}$nextTick(t){return gt(this,t)}static $define(t,s){if(st(t)){s=t;t=""}if(!t){t=this.$name||this.name}t=rt(t);if(h&&r.customElements&&!r.customElements.get(t)){customElements.define(t,this,s)}}}Et.$version="2.0.0-beta.4";var It=`:host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}`;class Nt extends Et{constructor(){super(...arguments);this.$onPointerDown=null;this.$onPointerMove=null;this.$onPointerUp=null;this.$onWheel=null;this.$wheeling=false;this.$pointers=new Map;this.$style=It;this.$action=z;this.background=false;this.disabled=false;this.scaleStep=.1;this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback();if(!this.disabled){this.$bind()}}disconnectedCallback(){if(!this.disabled){this.$unbind()}super.disconnectedCallback()}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"disabled":if(i){this.$unbind()}else{this.$bind()}break}}$bind(){if(!this.$onPointerDown){this.$onPointerDown=this.$handlePointerDown.bind(this);ut(this,R,this.$onPointerDown)}if(!this.$onPointerMove){this.$onPointerMove=this.$handlePointerMove.bind(this);ut(this.ownerDocument,W,this.$onPointerMove)}if(!this.$onPointerUp){this.$onPointerUp=this.$handlePointerUp.bind(this);ut(this.ownerDocument,P,this.$onPointerUp)}if(!this.$onWheel){this.$onWheel=this.$handleWheel.bind(this);ut(this,H,this.$onWheel,{passive:false,capture:true})}}$unbind(){if(this.$onPointerDown){ft(this,R,this.$onPointerDown);this.$onPointerDown=null}if(this.$onPointerMove){ft(this.ownerDocument,W,this.$onPointerMove);this.$onPointerMove=null}if(this.$onPointerUp){ft(this.ownerDocument,P,this.$onPointerUp);this.$onPointerUp=null}if(this.$onWheel){ft(this,H,this.$onWheel,{capture:true});this.$onWheel=null}}$handlePointerDown(t){const{buttons:s,button:i,type:e}=t;if(this.disabled||(e==="pointerdown"&&t.pointerType==="mouse"||e==="mousedown")&&(Q(s)&&s!==1||Q(i)&&i!==0||t.ctrlKey)){return}const{$pointers:n}=this;let o="";if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:i})=>{n.set(t,{startX:s,startY:i,endX:s,endY:i})}))}else{const{pointerId:s=0,pageX:i,pageY:e}=t;n.set(s,{startX:i,startY:e,endX:i,endY:e})}if(n.size>1){o=x}else if(ot(t.target)){o=t.target.action||t.target.getAttribute(I)||""}if(this.$emit(K,{action:o,relatedEvent:t})===false){return}t.preventDefault();this.$action=o;this.style.willChange="transform"}$handlePointerMove(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===z||i.size===0){return}if(this.$emit(U,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:e})=>{const n=i.get(t);if(n){Object.assign(n,{endX:s,endY:e})}}))}else{const{pointerId:s=0,pageX:e,pageY:n}=t;const o=i.get(s);if(o){Object.assign(o,{endX:e,endY:n})}}const e={action:s,relatedEvent:t};if(s===x){const s=new Map(i);let n=0;let o=0;let h=0;let r=0;let a=t.pageX;let c=t.pageY;i.forEach(((t,i)=>{s.delete(i);s.forEach((s=>{let i=s.startX-t.startX;let e=s.startY-t.startY;let l=s.endX-t.endX;let f=s.endY-t.endY;let u=0;let p=0;let d=0;let b=0;if(i===0){if(e<0){d=Math.PI*2}else if(e>0){d=Math.PI}}else if(i>0){d=Math.PI/2+Math.atan(e/i)}else if(i<0){d=Math.PI*1.5+Math.atan(e/i)}if(l===0){if(f<0){b=Math.PI*2}else if(f>0){b=Math.PI}}else if(l>0){b=Math.PI/2+Math.atan(f/l)}else if(l<0){b=Math.PI*1.5+Math.atan(f/l)}if(b>0||d>0){const i=b-d;const e=Math.abs(i);if(e>n){n=e;h=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}i=Math.abs(i);e=Math.abs(e);l=Math.abs(l);f=Math.abs(f);if(i>0&&e>0){u=Math.sqrt(i*i+e*e)}else if(i>0){u=i}else if(e>0){u=e}if(l>0&&f>0){p=Math.sqrt(l*l+f*f)}else if(l>0){p=l}else if(f>0){p=f}if(u>0&&p>0){const i=(p-u)/u;const e=Math.abs(i);if(e>o){o=e;r=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}}))}));const l=n>0;const f=o>0;if(l&&f){e.rotate=h;e.scale=r;e.centerX=a;e.centerY=c}else if(l){e.action=y;e.rotate=h;e.centerX=a;e.centerY=c}else if(f){e.action=k;e.scale=r;e.centerX=a;e.centerY=c}else{e.action=z}}else{const[t]=Array.from(i.values());Object.assign(e,t)}i.forEach((t=>{t.startX=t.endX;t.startY=t.endY}));if(e.action!==z){this.$emit(B,e,{cancelable:false})}}$handlePointerUp(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===z){return}if(this.$emit(F,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t})=>{i.delete(t)}))}else{const{pointerId:s=0}=t;i.delete(s)}if(i.size===0){this.style.willChange="";this.$action=z}}$handleWheel(t){if(this.disabled){return}t.preventDefault();if(this.$wheeling){return}this.$wheeling=true;setTimeout((()=>{this.$wheeling=false}),50);const s=t.deltaY>0?-1:1;const i=s*this.scaleStep;this.$emit(B,{action:k,scale:i,relatedEvent:t},{cancelable:false})}$setAction(t){if(G(t)){this.$action=t}return this}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let n=this.offsetWidth;let o=this.offsetHeight;let h=1;if(et(t)&&(V(t.width)||V(t.height))){({width:n,height:o}=xt({aspectRatio:n/o,width:t.width,height:t.height}));h=n/this.offsetWidth}e.width=n;e.height=o;const r=this.querySelector(this.$getTagNameOf(b));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,p]=r.$getTransform();let d=u;let b=p;let m=i.naturalWidth;let g=i.naturalHeight;if(h!==1){d*=h;b*=h;m*=h;g*=h}const w=m/2;const v=g/2;a.fillStyle="transparent";a.fillRect(0,0,n,o);if(et(t)&&nt(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(w,v);a.transform(s,c,l,f,d,b);a.translate(-w,-v);a.drawImage(i,0,0,m,g);a.restore()}s(e)})).catch(i)}))}}Nt.$name=f;Nt.$version="2.0.0-beta.4";var Xt=`:host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}`;const Yt=new WeakMap;const Rt=["alt","crossorigin","decoding","importance","loading","referrerpolicy","sizes","src","srcset"];class Wt extends Et{constructor(){super(...arguments);this.$matrix=[1,0,0,1,0,0];this.$onLoad=null;this.$onCanvasAction=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$actionStartTarget=null;this.$style=Xt;this.$image=new Image;this.rotatable=true;this.scalable=true;this.skewable=true;this.slottable=false;this.translatable=true}set $canvas(t){Yt.set(this,t)}get $canvas(){return Yt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(Rt,["rotatable","scalable","skewable","translatable"])}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}super.attributeChangedCallback(t,s,i);if(Rt.includes(t)){this.$image.setAttribute(t,i)}}connectedCallback(){super.connectedCallback();const{$image:t}=this;const s=this.closest(this.$getTagNameOf(f));if(s){this.$canvas=s;this.$setStyles({display:"block",position:"absolute"});this.$onCanvasActionStart=t=>{var s,i;this.$actionStartTarget=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target};this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null};this.$onCanvasAction=this.$handleAction.bind(this);ut(s,K,this.$onCanvasActionStart);ut(s,F,this.$onCanvasActionEnd);ut(s,B,this.$onCanvasAction)}this.$onLoad=this.$handleLoad.bind(this);ut(t,L,this.$onLoad);this.$getShadowRoot().appendChild(t)}disconnectedCallback(){const{$image:t,$canvas:s}=this;if(s){if(this.$onCanvasActionStart){ft(s,K,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ft(s,F,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){ft(s,B,this.$onCanvasAction);this.$onCanvasAction=null}}if(t&&this.$onLoad){ft(t,L,this.$onLoad);this.$onLoad=null}this.$getShadowRoot().removeChild(t);super.disconnectedCallback()}$handleLoad(){const{$image:t}=this;this.$setStyles({width:t.naturalWidth,height:t.naturalHeight});if(this.$canvas){this.$center("cover")}}$handleAction(t){if(this.hidden||!(this.rotatable||this.scalable||this.translatable)){return}const{$canvas:s}=this;const{detail:i}=t;if(i){const{relatedEvent:t}=i;let{action:e}=i;if(e===x&&(!this.rotatable||!this.scalable)){if(this.rotatable){e=y}else if(this.scalable){e=k}else{e=z}}switch(e){case $:if(this.translatable){const t=this.$getTagNameOf(m);let e=s.querySelector(t);if(e&&e.multiple&&!e.active){e=s.querySelector(`${t}[active]`)}if(!e||e.hidden||!e.movable||!(this.$actionStartTarget&&e.contains(this.$actionStartTarget))){this.$move(i.endX-i.startX,i.endY-i.startY)}}break;case y:if(this.rotatable){if(t){const{x:s,y:e}=this.getBoundingClientRect();this.$rotate(i.rotate,t.clientX-s,t.clientY-e)}else{this.$rotate(i.rotate)}}break;case k:if(this.scalable){if(t){const{x:s,y:e}=this.getBoundingClientRect();this.$zoom(i.scale,t.clientX-s,t.clientY-e)}else{this.$zoom(i.scale)}}break;case x:if(this.rotatable&&this.scalable){const{rotate:s}=i;let{scale:e}=i;if(e<0){e=1/(1-e)}else{e+=1}const n=Math.cos(s);const o=Math.sin(s);const[h,r,a,c]=[n*e,o*e,-o*e,n*e];if(t){const s=this.getBoundingClientRect();const i=t.clientX-s.x;const e=t.clientY-s.y;const[n,o,l,f]=this.$matrix;const u=s.width/2;const p=s.height/2;const d=i-u;const b=e-p;const m=(d*f-l*b)/(n*f-l*o);const g=(b-o*m)/f;this.$transform(h,r,a,c,m*(1-h)+g*a,g*(1-c)+m*r)}else{this.$transform(h,r,a,c,0,0)}}break}}}$ready(t){const{$image:s}=this;const i=new Promise(((t,i)=>{const e=new Error("Failed to load the image source");if(s.complete){if(s.naturalWidth>0&&s.naturalHeight>0){t(s)}else{i(e)}}else{const n=()=>{ft(s,_,o);t(s)};const o=()=>{ft(s,L,n);i(e)};pt(s,L,n);pt(s,_,o)}}));if(nt(t)){i.then((s=>{t(s);return s}))}return i}$center(t){const{parentElement:s}=this;if(!s){return this}const i=s.getBoundingClientRect();const e=i.width;const n=i.height;const{x:o,y:h,width:r,height:a}=this.getBoundingClientRect();const c=o+r/2;const l=h+a/2;const f=i.x+e/2;const u=i.y+n/2;this.$move(f-c,u-l);if(t&&(r!==e||a!==n)){const s=e/r;const i=n/a;switch(t){case"cover":this.$scale(Math.max(s,i));break;case"contain":this.$scale(Math.min(s,i));break}}return this}$move(t,s=t){if(this.translatable&&Q(t)&&Q(s)){const[i,e,n,o]=this.$matrix;const h=(t*o-n*s)/(i*o-n*e);const r=(s-e*h)/o;this.$translate(h,r)}return this}$moveTo(t,s=t){if(this.translatable&&Q(t)&&Q(s)){const[i,e,n,o]=this.$matrix;const h=(t*o-n*s)/(i*o-n*e);const r=(s-e*h)/o;this.$setTransform(i,e,n,o,h,r)}return this}$rotate(t,s,i){if(this.rotatable){const e=$t(t);const n=Math.cos(e);const o=Math.sin(e);const[h,r,a,c]=[n,o,-o,n];if(Q(s)&&Q(i)){const[t,e,n,o]=this.$matrix;const{width:l,height:f}=this.getBoundingClientRect();const u=l/2;const p=f/2;const d=s-u;const b=i-p;const m=(d*o-n*b)/(t*o-n*e);const g=(b-e*m)/o;this.$transform(h,r,a,c,m*(1-h)-g*a,g*(1-c)-m*r)}else{this.$transform(h,r,a,c,0,0)}}return this}$zoom(t,s,i){if(!this.scalable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}if(Q(s)&&Q(i)){const[e,n,o,h]=this.$matrix;const{width:r,height:a}=this.getBoundingClientRect();const c=r/2;const l=a/2;const f=s-c;const u=i-l;const p=(f*h-o*u)/(e*h-o*n);const d=(u-n*p)/h;this.$transform(t,0,0,t,p*(1-t),d*(1-t))}else{this.$scale(t)}return this}$scale(t,s=t){if(this.scalable){this.$transform(t,0,0,s,0,0)}return this}$skew(t,s=0){if(this.skewable){const i=$t(t);const e=$t(s);this.$transform(1,Math.tan(e),Math.tan(i),1,0,0)}return this}$translate(t,s=t){if(this.translatable&&Q(t)&&Q(s)){this.$transform(1,0,0,1,t,s)}return this}$transform(t,s,i,e,n,o){if(Q(t)&&Q(s)&&Q(i)&&Q(e)&&Q(n)&&Q(o)){return this.$setTransform(zt(this.$matrix,[t,s,i,e,n,o]))}return this}$setTransform(t,s,i,e,n,o){if(this.rotatable||this.scalable||this.skewable||this.translatable){if(Array.isArray(t)){[t,s,i,e,n,o]=t}if(Q(t)&&Q(s)&&Q(i)&&Q(e)&&Q(n)&&Q(o)){const h=[t,s,i,e,n,o];if(this.$emit(q,{matrix:h,oldMatrix:this.$matrix})===false){return this}this.$matrix=h;this.style.transform=`matrix(${h.join(", ")})`}}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}}Wt.$name=b;Wt.$version="2.0.0-beta.4";var Pt=`:host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}`;const _t=new WeakMap;class Dt extends Et{constructor(){super(...arguments);this.$onCanvasChange=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$style=Pt;this.x=0;this.y=0;this.width=0;this.height=0;this.slottable=false;this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(t){_t.set(this,t)}get $canvas(){return _t.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(f));if(t){this.$canvas=t;this.style.position="absolute";const s=t.querySelector(this.$getTagNameOf(m));if(s){this.$onCanvasActionStart=t=>{if(s.hidden&&t.detail.action===v){this.hidden=false}};this.$onCanvasActionEnd=t=>{if(s.hidden&&t.detail.action===v){this.hidden=true}};this.$onCanvasChange=t=>{const{x:i,y:e,width:n,height:o}=t.detail;this.$change(i,e,n,o);if(s.hidden||i===0&&e===0&&n===0&&o===0){this.hidden=true}};ut(t,K,this.$onCanvasActionStart);ut(t,F,this.$onCanvasActionEnd);ut(t,Z,this.$onCanvasChange)}}this.$render()}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){ft(t,K,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ft(t,F,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasChange){ft(t,Z,this.$onCanvasChange);this.$onCanvasChange=null}}super.disconnectedCallback()}$change(t,s,i=this.width,e=this.height){if(!Q(t)||!Q(s)||!Q(i)||!Q(e)||t===this.x&&s===this.y&&i===this.width&&e===this.height){return this}if(this.hidden){this.hidden=false}this.x=t;this.y=s;this.width=i;this.height=e;return this.$render()}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:r.innerWidth})}}Dt.$name=g;Dt.$version="2.0.0-beta.4";var Lt=`:host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}`;class Ht extends Et{constructor(){super(...arguments);this.$onCanvasCropEnd=null;this.$onCanvasCropStart=null;this.$style=Lt;this.action=z;this.plain=false;this.slottable=false;this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}}Ht.$name=d;Ht.$version="2.0.0-beta.4";var Bt=`:host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}`;const Ft=new WeakMap;class Ut extends Et{constructor(){super(...arguments);this.$onCanvasAction=null;this.$onCanvasActionStart=null;this.$onCanvasActionEnd=null;this.$onDocumentKeyDown=null;this.$action="";this.$actionStartTarget=null;this.$style=Bt;this.x=0;this.y=0;this.width=0;this.height=0;this.aspectRatio=NaN;this.initialAspectRatio=NaN;this.initialCoverage=NaN;this.active=false;this.movable=false;this.resizable=false;this.zoomable=false;this.multiple=false;this.keyboard=false;this.outlined=false;this.precise=false}set $canvas(t){Ft.set(this,t)}get $canvas(){return Ft.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","height","initial-aspect-ratio","initial-coverage","keyboard","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"aspectRatio":if(!V(i)){this.aspectRatio=NaN}break;case"initialAspectRatio":if(!V(i)){this.initialAspectRatio=NaN}break;case"initialCoverage":if(!V(i)||i>1){this.initialCoverage=NaN}break;case"keyboard":this.$nextTick((()=>{if(this.$canvas){if(i){if(!this.$onDocumentKeyDown){this.$onDocumentKeyDown=this.$handleKeyDown.bind(this);ut(this.ownerDocument,D,this.$onDocumentKeyDown)}}else if(this.$onDocumentKeyDown){ft(this.ownerDocument,D,this.$onDocumentKeyDown);this.$onDocumentKeyDown=null}}}));break;case"multiple":this.$nextTick((()=>{if(this.$canvas){const t=this.$getSelections();if(i){t.forEach((t=>{t.active=false}));this.active=true;this.$emit(Z,{x:this.x,y:this.y,width:this.width,height:this.height})}else{this.active=false;t.slice(1).forEach((t=>{this.$removeSelection(t)}))}}}));break}}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(f));if(t){this.$canvas=t;this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`});if(!this.hidden){this.$render()}const{initialCoverage:s,parentElement:i}=this;if(V(s)&&i){const t=this.aspectRatio||this.initialAspectRatio;const{offsetWidth:e,offsetHeight:n}=i;let o=e*s;let h=n*s;if(V(t)){({width:o,height:h}=xt({aspectRatio:t,width:o,height:h}))}this.$change(this.x,this.y,o,h);this.$center()}this.$onCanvasActionStart=this.$handleActionStart.bind(this);this.$onCanvasActionEnd=this.$handleActionEnd.bind(this);this.$onCanvasAction=this.$handleAction.bind(this);ut(t,K,this.$onCanvasActionStart);ut(t,F,this.$onCanvasActionStart);ut(t,B,this.$onCanvasAction)}else{this.$render()}}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){ft(t,K,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ft(t,F,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){ft(t,B,this.$onCanvasAction);this.$onCanvasAction=null}}super.disconnectedCallback()}$getSelections(){let t=[];if(this.parentElement){t=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(m)))}return t}$createSelection(){const t=this.cloneNode(true);if(this.hasAttribute("id")){t.removeAttribute("id")}this.active=false;if(this.parentElement){this.parentElement.insertBefore(t,this.nextSibling)}return t}$removeSelection(t=this){if(this.parentElement){const s=this.$getSelections();if(s.length>1){const i=s.indexOf(t);const e=s[i+1]||s[i-1];if(e){t.active=false;this.parentElement.removeChild(t);e.active=true;e.$emit(Z,{x:e.x,y:e.y,width:e.width,height:e.height})}}else{this.$reset();this.hidden=true}}}$handleActionStart(t){var s,i;const e=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target;this.$action="";this.$actionStartTarget=e;if(!this.hidden&&this.multiple&&!this.active&&e===this&&this.parentElement){this.$getSelections().forEach((t=>{t.active=false}));this.active=true;this.$emit(Z,{x:this.x,y:this.y,width:this.width,height:this.height})}}$handleAction(t){const{currentTarget:s,detail:i}=t;if(s&&i){const{relatedEvent:e}=i;let{action:n}=i;if(!n&&this.multiple){n=this.$action||(e===null||e===void 0?void 0:e.target.action);this.$action=n}if(!n||this.hidden&&n!==v||this.multiple&&!this.active&&n!==k){return}const o=i.endX-i.startX;const h=i.endY-i.startY;const{width:r,height:a}=this;let{aspectRatio:c}=this;if(!V(c)&&t.shiftKey){c=V(r)&&V(a)?r/a:1}switch(n){case v:{const{$canvas:t}=this;const e=wt(s);(this.multiple&&!this.hidden?this.$createSelection():this).$change(i.startX-e.left,i.startY-e.top,o,h,c);n=T;if(o<0){if(h>0){n=E}else if(h<0){n=S}}else if(o>0){if(h<0){n=O}}if(t){t.$action=n}break}case $:if(this.movable&&(this.$actionStartTarget&&this.contains(this.$actionStartTarget))){this.$move(o,h)}break;case k:if(e&&this.zoomable){const t=wt(s);this.$zoom(i.scale,e.pageX-t.left,e.pageY-t.top)}break;default:this.$resize(n,o,h,c)}}}$handleActionEnd(){this.$action="";this.$actionStartTarget=null}$handleKeyDown(t){if(this.hidden||!this.keyboard||this.multiple&&!this.active||t.defaultPrevented){return}switch(t.key){case"Backspace":if(t.metaKey){t.preventDefault();this.$removeSelection()}break;case"Delete":t.preventDefault();this.$removeSelection();break;case"ArrowLeft":t.preventDefault();this.$move(-1,0);break;case"ArrowRight":t.preventDefault();this.$move(1,0);break;case"ArrowUp":t.preventDefault();this.$move(0,-1);break;case"ArrowDown":t.preventDefault();this.$move(0,1);break;case"+":t.preventDefault();this.$zoom(.1);break;case"-":t.preventDefault();this.$zoom(-.1);break}}$center(){const{parentElement:t}=this;if(!t){return this}const s=(t.offsetWidth-this.width)/2;const i=(t.offsetHeight-this.height)/2;return this.$change(s,i)}$move(t,s=t){return this.$moveTo(this.x+t,this.y+s)}$moveTo(t,s=t){if(!this.movable){return this}return this.$change(t,s)}$resize(t,s=0,i=0,e=this.aspectRatio){if(!this.resizable){return this}const n=V(e);const{$canvas:o}=this;let{x:h,y:r,width:a,height:c}=this;switch(t){case M:r+=i;c-=i;if(c<0){t=A;c=-c;r-=c}if(n){s=i*e;h+=s/2;a-=s;if(a<0){a=-a;h-=a}}break;case C:a+=s;if(a<0){t=j;a=-a;h-=a}if(n){i=s/e;r-=i/2;c+=i;if(c<0){c=-c;r-=c}}break;case A:c+=i;if(c<0){t=M;c=-c;r-=c}if(n){s=i*e;h-=s/2;a+=s;if(a<0){a=-a;h-=a}}break;case j:h+=s;a-=s;if(a<0){t=C;a=-a;h-=a}if(n){i=s/e;r+=i/2;c-=i;if(c<0){c=-c;r-=c}}break;case O:if(n){i=-s/e}r+=i;c-=i;a+=s;if(a<0&&c<0){t=E;a=-a;c=-c;h-=a;r-=c}else if(a<0){t=S;a=-a;h-=a}else if(c<0){t=T;c=-c;r-=c}break;case S:if(n){i=s/e}h+=s;r+=i;a-=s;c-=i;if(a<0&&c<0){t=T;a=-a;c=-c;h-=a;r-=c}else if(a<0){t=O;a=-a;h-=a}else if(c<0){t=E;c=-c;r-=c}break;case T:if(n){i=s/e}a+=s;c+=i;if(a<0&&c<0){t=S;a=-a;c=-c;h-=a;r-=c}else if(a<0){t=E;a=-a;h-=a}else if(c<0){t=O;c=-c;r-=c}break;case E:if(n){i=-s/e}h+=s;a-=s;c+=i;if(a<0&&c<0){t=O;a=-a;c=-c;h-=a;r-=c}else if(a<0){t=T;a=-a;h-=a}else if(c<0){t=S;c=-c;r-=c}break}if(o){o.$setAction(t)}return this.$change(h,r,a,c)}$zoom(t,s,i){if(!this.zoomable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}const{width:e,height:n}=this;const o=e*t;const h=n*t;let r=this.x;let a=this.y;if(Q(s)&&Q(i)){r-=(o-e)*((s-this.x)/e);a-=(h-n)*((i-this.y)/n)}else{r-=(o-e)/2;a-=(h-n)/2}return this.$change(r,a,o,h)}$change(t,s,i=this.width,e=this.height,n=this.aspectRatio){if(!Q(t)||!Q(s)||!Q(i)||!Q(e)){return this}if(!this.precise){t=Math.round(t);s=Math.round(s);i=Math.round(i);e=Math.round(e)}if(t===this.x&&s===this.y&&i===this.width&&e===this.height){return this}if(this.hidden){this.hidden=false}if(V(n)){({width:i,height:e}=xt({aspectRatio:n,width:i,height:e},"cover"))}if(this.$emit(Z,{x:t,y:s,width:i,height:e})===false){return this}this.x=t;this.y=s;this.width=i;this.height=e;return this.$render()}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let{width:n,height:o}=this;let h=1;if(et(t)&&(V(t.width)||V(t.height))){({width:n,height:o}=xt({aspectRatio:n/o,width:t.width,height:t.height}));h=n/this.width}e.width=n;e.height=o;if(!this.$canvas){s(e);return}const r=this.$canvas.querySelector(this.$getTagNameOf(b));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,p]=r.$getTransform();const d=-this.x;const b=-this.y;const m=(d*f-l*b)/(s*f-l*c);const g=(b-c*m)/f;let w=s*m+l*g+u;let v=c*m+f*g+p;let $=i.naturalWidth;let k=i.naturalHeight;if(h!==1){w*=h;v*=h;$*=h;k*=h}const y=$/2;const x=k/2;a.fillStyle="transparent";a.fillRect(0,0,n,o);if(et(t)&&nt(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(y,x);a.transform(s,c,l,f,w,v);a.translate(-y,-x);a.drawImage(i,0,0,$,k);a.restore()}s(e)})).catch(i)}))}}Ut.$name=m;Ut.$version="2.0.0-beta.4";var Kt=`:host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}`;class Zt extends Et{constructor(){super(...arguments);this.$style=Kt;this.bordered=false;this.columns=3;this.covered=false;this.rows=3;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);if(t==="rows"||t==="columns"){this.$render()}}connectedCallback(){super.connectedCallback();this.$render()}$render(){const t=this.$getShadowRoot();const s=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){const t=document.createElement("span");t.setAttribute("role","row");for(let s=0;s<this.columns;s+=1){const s=document.createElement("span");s.setAttribute("role","gridcell");t.appendChild(s)}s.appendChild(t)}if(t){t.innerHTML="";t.appendChild(s)}}}Zt.$name=p;Zt.$version="2.0.0-beta.4";var qt=`:host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`;class Gt extends Et{constructor(){super(...arguments);this.$style=qt;this.centered=false;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}}Gt.$name=u;Gt.$version="2.0.0-beta.4";var Jt=`:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}`;const Qt=new WeakMap;const Vt=new WeakMap;const ts=new WeakMap;const ss="both";const is="horizontal";const es="vertical";const ns="none";class os extends Et{constructor(){super(...arguments);this.$onSelectionChange=null;this.$onSourceImageLoad=null;this.$onSourceImageTransform=null;this.$scale=1;this.$style=Jt;this.resize=es;this.selection="";this.slottable=false}set $image(t){Qt.set(this,t)}get $image(){return Qt.get(this)}set $sourceImage(t){ts.set(this,t)}get $sourceImage(){return ts.get(this)}set $selection(t){Vt.set(this,t)}get $selection(){return Vt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){super.connectedCallback();let t=null;if(this.selection){t=this.ownerDocument.querySelector(this.selection)}else{t=this.closest(this.$getTagNameOf(m))}if(ot(t)){this.$selection=t;this.$onSelectionChange=this.$handleSelectionChange.bind(this);ut(t,Z,this.$onSelectionChange);const s=t.closest(this.$getTagNameOf(f));if(s){const t=s.querySelector(this.$getTagNameOf(b));if(t){this.$sourceImage=t;this.$image=t.cloneNode(true);this.$getShadowRoot().appendChild(this.$image);this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this);this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this);ut(t.$image,L,this.$onSourceImageLoad);ut(t,q,this.$onSourceImageTransform)}}this.$render()}}disconnectedCallback(){const{$selection:t,$sourceImage:s}=this;if(t&&this.$onSelectionChange){ft(t,Z,this.$onSelectionChange);this.$onSelectionChange=null}if(s&&this.$onSourceImageLoad){ft(s.$image,L,this.$onSourceImageLoad);this.$onSourceImageLoad=null}if(s&&this.$onSourceImageTransform){ft(s,q,this.$onSourceImageTransform);this.$onSourceImageTransform=null}super.disconnectedCallback()}$handleSelectionChange(t){this.$render(t.detail)}$handleSourceImageLoad(){const{$image:t,$sourceImage:s}=this;const i=t.getAttribute("src");const e=s.getAttribute("src");if(e&&e!==i){t.setAttribute("src",e);t.$ready((()=>{setTimeout((()=>{const{x:t,y:i}=this.$selection;this.$transformImageByOffset(s.$getTransform(),-t,-i)}))}))}}$handleSourceImageTransform(t){const{x:s,y:i}=this.$selection;this.$transformImageByOffset(t.detail.matrix,-s,-i)}$render(t){const{x:s,y:i,width:e,height:n}=t||this.$selection;const o={};const{clientWidth:h,clientHeight:r}=this;let a=h;let c=r;let l=NaN;switch(this.resize){case ss:l=1;a=e;c=n;o.width=e;o.height=n;break;case is:l=r/n;a=e*l;o.width=a;break;case es:l=h/e;c=n*l;o.height=c;break;case ns:default:if(h>0){l=h/e}else if(r>0){l=r/n}}this.$scale=l;this.$setStyles(o);if(this.$sourceImage){this.$transformImageByOffset(this.$sourceImage.$getTransform(),-s,-i)}}$transformImageByOffset(t,s,i){const{$image:e,$scale:n,$sourceImage:o}=this;if(o&&e&&n>0){const[o,h,r,a,c,l]=t;const f=(s*a-r*i)/(o*a-r*h);const u=(i-h*f)/a;const p=o*f+r*u+c;const d=h*f+a*u+l;e.$ready((t=>{this.$setStyles.call(e,{width:t.naturalWidth*n,height:t.naturalHeight*n})}));e.$setTransform(o,h,r,a,p*n,d*n)}}}os.$name=w;os.$version="2.0.0-beta.4";
|
|
2
|
+
/*! Cropper.js v2.0.0-beta.4 | (c) 2015-present Chen Fengyuan | MIT */Nt.$define();Gt.$define();Zt.$define();Ht.$define();Wt.$define();Ut.$define();Dt.$define();os.$define();const hs=".relative{position:relative!important}.mb-6{margin-bottom:1.5rem!important}.flex{display:flex!important}.h-4{height:1rem!important}.h-\\[2px\\]{height:2px!important}.w-4{width:1rem!important}.w-full{width:100%!important}.appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.rounded-round{border-radius:100%!important}.border-0{border-width:0!important}*{box-sizing:border-box}:host{align-items:center;display:flex;flex-direction:column;gap:1.5rem;justify-content:space-between;margin-bottom:1.5rem;width:100%}:host .p-input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;position:relative}:host .p-input[type=range]::-moz-range-track,:host .p-input[type=range]::-webkit-slider-runnable-track{--tw-bg-opacity:1;background-color:rgb(218 230 240/var(--tw-bg-opacity));height:2px}:host .p-input[type=range]::-moz-range-thumb,:host .p-input[type=range]::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));border-radius:100%;border-width:0;height:1rem;width:1rem}.static{position:static!important}.hidden{display:none!important}.h-\\[17\\.5rem\\]{height:17.5rem!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.resize{resize:both!important}.gap-2{gap:.5rem!important}.rounded{border-radius:.25rem!important}.border-b{border-bottom-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-medium{--tw-border-opacity:1!important;border-color:rgb(227 236 243/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-14{padding-left:3.5rem!important;padding-right:3.5rem!important}.text-storm-vague{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\\:max-w-xs{max-width:20rem!important}.tablet\\:px-1{padding-left:.25rem!important;padding-right:.25rem!important}}";const rs=class{constructor(i){t(this,i);this.valueChange=s(this,"valueChange",3);this._maxScale=0;this._minScale=0;this.variant="user";this.value=undefined;this.returnType="base64";this._loaded=false;this._currentScale=0}onResize(){if(this._resizeDebounceTimeout){clearTimeout(this._resizeDebounceTimeout)}this._resizeDebounceTimeout=setTimeout((()=>{this._selectionRef.$center();this._imageRef.$center()}),200)}componentDidLoad(){setTimeout((()=>{this._loaded=true}),200)}render(){return i(e,{class:"p-cropper"},this._loaded&&i("cropper-canvas",{class:"h-[17.5rem] w-full border-0 border-b border-solid border-mystic-medium bg-white",onAction:()=>this._onAction()},i("cropper-image",{src:this.value,alt:"Picture",ref:t=>this._setImageRef(t),scalable:true,crossorigin:"anonymous"}),i("cropper-shade",{class:o({"rounded-round":this.variant==="user",rounded:this.variant==="company"}),"theme-color":"rgba(255, 255, 255, 0.5)",hidden:true}),i("cropper-selection",{"initial-coverage":"0.7","aspect-ratio":"1",ref:t=>this._selectionRef=t}),i("cropper-handle",{action:"move",plain:true})),i("div",{class:"flex w-full items-center gap-2 px-14 text-storm-vague tablet:max-w-xs tablet:px-1"},i("p-icon",{variant:"minus"}),i("input",{class:"p-input w-full",type:"range",min:"0",max:"100",value:this._currentScale,onInput:t=>this._onInput(t.target.value),step:"0.5"}),i("p-icon",{variant:"plus"})))}_setImageRef(t){if(this._imageRef){return}this._imageRef=t;this._imageRef.$ready((t=>setTimeout((()=>this._setInitialState(t)),200)))}_setInitialState(t){let s;if(t.naturalWidth>t.naturalHeight){s=200/t.naturalHeight}if(t.naturalHeight>=t.naturalWidth){s=200/t.naturalWidth}const i=this._imageRef.$getTransform();this._minScale=s;this._maxScale=i[0];this._selectionRef.$resize("nw-resize",200,200,1);this._selectionRef.$center();this._setScale(s);this._toCanvas()}_onAction(){this._setCurrentScale();this._toCanvas()}_setScale(t,s=true,i=true){const e=this._imageRef.$getTransform();this._imageRef.$setTransform([t,0,0,t,e[4],e[5]]);if(s){this._imageRef.$center()}if(i){this._setCurrentScale()}}_setCurrentScale(){const t=this._imageRef.$getTransform();const s=t[0];if(s<this._minScale){this._setScale(this._minScale,true,false);this._currentScale=0;return}if(s>this._maxScale){this._setScale(this._maxScale,true,false);this._currentScale=100;return}if(s===this._minScale){this._currentScale=0;return}if(s===this._maxScale){this._currentScale=100;return}const i=this._maxScale-this._minScale;const e=s-this._minScale;const n=e/i*100;this._currentScale=n}_onInput(t){const s=this._imageRef.$getTransform();const i=s[0];const e=this._maxScale-this._minScale;const n=e*(t/100);if(n===i){return}this._setScale(n+this._minScale,false,false);this._currentScale=t;this._toCanvas()}_toCanvas(){if(this._toCanvasDebounceTimeout){clearTimeout(this._toCanvasDebounceTimeout)}this._toCanvasDebounceTimeout=setTimeout((async()=>{const t=await this._selectionRef.$toCanvas();if(this.returnType==="canvas"){this.valueChange.emit(t);return}const s=t.toDataURL("image/png");this.valueChange.emit(s)}),200)}};rs.style=hs;export{rs as p_cropper};
|
|
3
|
+
//# sourceMappingURL=p-2540301a.entry.js.map
|