@nhtio/lucid-resourceful-vue-components 0.1.0-master-e14740ea → 0.1.0-master-dc6af70b
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/{VBtn-DhfYEt9V.mjs → VBtn-CEYzcx0y.mjs} +8 -8
- package/{VBtn-DhfYEt9V.mjs.map → VBtn-CEYzcx0y.mjs.map} +1 -1
- package/{VDatePicker-D0OTAyvJ.mjs → VDatePicker-BHcvHHhM.mjs} +133 -133
- package/{VDatePicker-D0OTAyvJ.mjs.map → VDatePicker-BHcvHHhM.mjs.map} +1 -1
- package/{VEmptyState-BFrXSTJ-.mjs → VEmptyState-CkYtN0q5.mjs} +84 -84
- package/{VEmptyState-BFrXSTJ-.mjs.map → VEmptyState-CkYtN0q5.mjs.map} +1 -1
- package/{VHover-DLvOmsjv.mjs → VHover-Bj6QrQff.mjs} +3 -3
- package/{VHover-DLvOmsjv.mjs.map → VHover-Bj6QrQff.mjs.map} +1 -1
- package/{VListItem-LNaoM8S4.mjs → VListItem-BnxAmKd_.mjs} +55 -55
- package/{VListItem-LNaoM8S4.mjs.map → VListItem-BnxAmKd_.mjs.map} +1 -1
- package/{VMenu-9rTbTKtH.mjs → VMenu-BSB7YSpb.mjs} +28 -28
- package/{VMenu-9rTbTKtH.mjs.map → VMenu-BSB7YSpb.mjs.map} +1 -1
- package/{VPicker-BGuRD0KW.mjs → VPicker-DMOVvCIE.mjs} +5 -5
- package/{VPicker-BGuRD0KW.mjs.map → VPicker-DMOVvCIE.mjs.map} +1 -1
- package/{VRadioGroup-Dx_wEqzl.mjs → VRadioGroup-ByydeX8x.mjs} +21 -21
- package/{VRadioGroup-Dx_wEqzl.mjs.map → VRadioGroup-ByydeX8x.mjs.map} +1 -1
- package/{VRow-DaLdbIGw.mjs → VRow-Dmn82Xaa.mjs} +18 -18
- package/{VRow-DaLdbIGw.mjs.map → VRow-Dmn82Xaa.mjs.map} +1 -1
- package/{VSheet-DnIfs-1c.mjs → VSheet-B9ALb0PQ.mjs} +14 -14
- package/{VSheet-DnIfs-1c.mjs.map → VSheet-B9ALb0PQ.mjs.map} +1 -1
- package/{actions-8bWGsB-p.mjs → actions-BEmdy8bu.mjs} +11 -11
- package/{actions-8bWGsB-p.mjs.map → actions-BEmdy8bu.mjs.map} +1 -1
- package/{alert-IW1AIWZw.mjs → alert-DftADRGk.mjs} +13 -13
- package/{alert-IW1AIWZw.mjs.map → alert-DftADRGk.mjs.map} +1 -1
- package/{bigint-Jmfa2L4S.mjs → bigint-DiC37zMo.mjs} +6 -6
- package/{bigint-Jmfa2L4S.mjs.map → bigint-DiC37zMo.mjs.map} +1 -1
- package/{boolean-BEY7eBxf.mjs → boolean-DZDryWHA.mjs} +74 -74
- package/{boolean-BEY7eBxf.mjs.map → boolean-DZDryWHA.mjs.map} +1 -1
- package/{clipboard-BoKd7mFG.mjs → clipboard--JAZokR3.mjs} +14 -14
- package/{clipboard-BoKd7mFG.mjs.map → clipboard--JAZokR3.mjs.map} +1 -1
- package/{colorUtils-DmtKYNgW.mjs → colorUtils-I1lKouL3.mjs} +3 -3
- package/{colorUtils-DmtKYNgW.mjs.map → colorUtils-I1lKouL3.mjs.map} +1 -1
- package/{common-BeDAn4wu.mjs → common-BDwb9uGU.mjs} +8881 -8880
- package/common-BDwb9uGU.mjs.map +1 -0
- package/{component-CjPpW_A2.mjs → component-C-qp70Rp.mjs} +2 -2
- package/{component-CjPpW_A2.mjs.map → component-C-qp70Rp.mjs.map} +1 -1
- package/components/autorefresh_controller.mjs +1 -1
- package/components/control_button.mjs +1 -1
- package/components/control_button_bar.mjs +2 -2
- package/components/control_menu.mjs +1 -1
- package/components/custom_field.mjs +1 -1
- package/components/exporter.mjs +1 -1
- package/components/fields/bigint.mjs +1 -1
- package/components/fields/boolean.mjs +1 -1
- package/components/fields/date.mjs +1 -1
- package/components/fields/date_time.mjs +1 -1
- package/components/fields/enum.mjs +1 -1
- package/components/fields/integer.mjs +1 -1
- package/components/fields/number.mjs +1 -1
- package/components/fields/string.mjs +1 -1
- package/components/fields/unsigned_integer.mjs +1 -1
- package/components/fields.mjs +9 -9
- package/components/form_with_validation.mjs +1 -1
- package/components/resourceful_alerter.mjs +1 -1
- package/components/resourceful_index.mjs +1 -1
- package/components/resourceful_record.mjs +2 -2
- package/components/resourceful_record_default_form.mjs +1 -1
- package/components/resourceful_record_form.mjs +1 -1
- package/components/sortable.mjs +1 -1
- package/components/svg_icon.mjs +1 -1
- package/components/timezone_picker.mjs +1 -1
- package/components.mjs +23 -23
- package/composables.mjs +11 -11
- package/{console-CRXioSFP.mjs → console-CAez8ceh.mjs} +2 -2
- package/{console-CRXioSFP.mjs.map → console-CAez8ceh.mjs.map} +1 -1
- package/{custom-Y1WJVKP9.mjs → custom-Tm6_792A.mjs} +12 -12
- package/{custom-Y1WJVKP9.mjs.map → custom-Tm6_792A.mjs.map} +1 -1
- package/{date-BxEeCNWD.mjs → date-CxaBVvlO.mjs} +10 -10
- package/{date-BxEeCNWD.mjs.map → date-CxaBVvlO.mjs.map} +1 -1
- package/{date_time-6kpv7eDF.mjs → date_time-DhABUkGT.mjs} +169 -169
- package/{date_time-6kpv7eDF.mjs.map → date_time-DhABUkGT.mjs.map} +1 -1
- package/{display-DvzWa1QO.mjs → display-BdjbLG1_.mjs} +32 -32
- package/{display-DvzWa1QO.mjs.map → display-BdjbLG1_.mjs.map} +1 -1
- package/{display-CO0pTIEs.mjs → display-DPktlWOz.mjs} +42 -42
- package/{display-CO0pTIEs.mjs.map → display-DPktlWOz.mjs.map} +1 -1
- package/{display-kAyhIPBH.mjs → display-DazBkrbZ.mjs} +7 -7
- package/{display-kAyhIPBH.mjs.map → display-DazBkrbZ.mjs.map} +1 -1
- package/{elevation-CMzO50xm.mjs → elevation-DFBVIqom.mjs} +56 -56
- package/{elevation-CMzO50xm.mjs.map → elevation-DFBVIqom.mjs.map} +1 -1
- package/{enum-noYU2Cqh.mjs → enum-KB4xPkOL.mjs} +9 -9
- package/{enum-noYU2Cqh.mjs.map → enum-KB4xPkOL.mjs.map} +1 -1
- package/factories.mjs +1 -1
- package/{field_composer-DpJx0Oz1.mjs → field_composer-CLJuJevf.mjs} +7 -7
- package/{field_composer-DpJx0Oz1.mjs.map → field_composer-CLJuJevf.mjs.map} +1 -1
- package/{form-CDLcDPyU.mjs → form-9YRVcrxM.mjs} +17 -17
- package/{form-CDLcDPyU.mjs.map → form-9YRVcrxM.mjs.map} +1 -1
- package/{guards-B99p3BPj.mjs → guards-BrpRx6ly.mjs} +2 -2
- package/{guards-B99p3BPj.mjs.map → guards-BrpRx6ly.mjs.map} +1 -1
- package/guards.mjs +4 -4
- package/helpers.mjs +6 -6
- package/{index-B2rKM3mR.mjs → index-BaOM0Cyz.mjs} +8 -8
- package/{index-B2rKM3mR.mjs.map → index-BaOM0Cyz.mjs.map} +1 -1
- package/{index-C9UuBVyI.mjs → index-BkjiQEyJ.mjs} +12 -12
- package/{index-C9UuBVyI.mjs.map → index-BkjiQEyJ.mjs.map} +1 -1
- package/{index-slHxe6b-.mjs → index-Bs4A8qUO.mjs} +2 -2
- package/{index-slHxe6b-.mjs.map → index-Bs4A8qUO.mjs.map} +1 -1
- package/{index-BUpccfIz.mjs → index-BsazeUn6.mjs} +3 -3
- package/{index-BUpccfIz.mjs.map → index-BsazeUn6.mjs.map} +1 -1
- package/{index-BaWthszI.mjs → index-CWwCXXNl.mjs} +2 -2
- package/{index-BaWthszI.mjs.map → index-CWwCXXNl.mjs.map} +1 -1
- package/{index-Bi050X9r.mjs → index-DBXOwXpe.mjs} +6 -6
- package/{index-Bi050X9r.mjs.map → index-DBXOwXpe.mjs.map} +1 -1
- package/{index-CzI9mHIx.mjs → index-DDobJ49b.mjs} +7 -7
- package/{index-CzI9mHIx.mjs.map → index-DDobJ49b.mjs.map} +1 -1
- package/{index-CIvylvfa.mjs → index-DwOjHbRP.mjs} +44 -44
- package/{index-CIvylvfa.mjs.map → index-DwOjHbRP.mjs.map} +1 -1
- package/{index-bXmNb9jX.mjs → index-UxsEIZVi.mjs} +4 -4
- package/{index-bXmNb9jX.mjs.map → index-UxsEIZVi.mjs.map} +1 -1
- package/index.mjs +47 -47
- package/{integer-BIJ4_I8y.mjs → integer-uzh0nwpb.mjs} +3 -3
- package/{integer-BIJ4_I8y.mjs.map → integer-uzh0nwpb.mjs.map} +1 -1
- package/{mdi-CqMJqgQi.mjs → mdi-C9DbASEx.mjs} +40 -40
- package/{mdi-CqMJqgQi.mjs.map → mdi-C9DbASEx.mjs.map} +1 -1
- package/{number-z_LAINPM.mjs → number-CfHLDQFY.mjs} +28 -28
- package/{number-z_LAINPM.mjs.map → number-CfHLDQFY.mjs.map} +1 -1
- package/package.json +46 -46
- package/{position-Ai5XksAO.mjs → position-CPuNp03H.mjs} +2 -2
- package/{position-Ai5XksAO.mjs.map → position-CPuNp03H.mjs.map} +1 -1
- package/{props-BYX22zcE.mjs → props-Cq9daNwa.mjs} +4 -4
- package/{props-BYX22zcE.mjs.map → props-Cq9daNwa.mjs.map} +1 -1
- package/{props-p4f5Pa5h.mjs → props-KPFuptNy.mjs} +8 -8
- package/{props-p4f5Pa5h.mjs.map → props-KPFuptNy.mjs.map} +1 -1
- package/{renderers-BKUvrrVm.mjs → renderers-COT3aAu3.mjs} +13 -13
- package/{renderers-BKUvrrVm.mjs.map → renderers-COT3aAu3.mjs.map} +1 -1
- package/{string-Dmr8SRMf.mjs → string-DvwPf_Ob.mjs} +61 -61
- package/{string-Dmr8SRMf.mjs.map → string-DvwPf_Ob.mjs.map} +1 -1
- package/{unsigned_integer-BliPiCXO.mjs → unsigned_integer-C9nrNAn_.mjs} +4 -4
- package/{unsigned_integer-BliPiCXO.mjs.map → unsigned_integer-C9nrNAn_.mjs.map} +1 -1
- package/useRender-Dpj9Jrbr.mjs +9 -0
- package/{useRender-BD1xw5zG.mjs.map → useRender-Dpj9Jrbr.mjs.map} +1 -1
- package/{utils-DqXWb-4f.mjs → utils-DxV2ZNaE.mjs} +10 -10
- package/{utils-DqXWb-4f.mjs.map → utils-DxV2ZNaE.mjs.map} +1 -1
- package/{validation-DS3tTSk5.mjs → validation-CZ6xx4aX.mjs} +4 -4
- package/{validation-DS3tTSk5.mjs.map → validation-CZ6xx4aX.mjs.map} +1 -1
- package/VBtn.css +0 -1
- package/VDatePicker.css +0 -1
- package/VEmptyState.css +0 -1
- package/VListItem.css +0 -1
- package/VMenu.css +0 -1
- package/VPicker.css +0 -1
- package/VRadioGroup.css +0 -1
- package/VSheet.css +0 -1
- package/actions.css +0 -1
- package/boolean.css +0 -1
- package/clipboard.css +0 -1
- package/common-BeDAn4wu.mjs.map +0 -1
- package/common.css +0 -1
- package/date_time.css +0 -1
- package/display.css +0 -1
- package/display2.css +0 -1
- package/elevation.css +0 -1
- package/index.css +0 -1
- package/mdi.css +0 -1
- package/number.css +0 -1
- package/string.css +0 -1
- package/useRender-BD1xw5zG.mjs +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useDisplay as te } from "vuetify";
|
|
2
|
-
import {
|
|
2
|
+
import { A as ne, t as p, r as B } from "./utils-DxV2ZNaE.mjs";
|
|
3
3
|
import { S as se, I as U } from "./encoding-C1W2Cp3X-DzgQRCVx.mjs";
|
|
4
4
|
import { shallowRef as A, reactive as ie, onMounted as oe, watch as a, onUnmounted as le, toRefs as re, triggerRef as S, nextTick as ae } from "vue";
|
|
5
5
|
const ce = U && "ResizeObserver" in window, T = U && "visualViewport" in window, ve = (D, L = ne("resourcefulComposables")) => {
|
|
@@ -9,7 +9,7 @@ const ce = U && "ResizeObserver" in window, T = U && "visualViewport" in window,
|
|
|
9
9
|
platform: R,
|
|
10
10
|
thresholds: c,
|
|
11
11
|
ssr: M,
|
|
12
|
-
update:
|
|
12
|
+
update: y
|
|
13
13
|
} = H, l = [];
|
|
14
14
|
let u, m;
|
|
15
15
|
const o = A(0), f = A(0), h = A(!1), x = A(!1), t = ie({
|
|
@@ -51,8 +51,8 @@ const ce = U && "ResizeObserver" in window, T = U && "visualViewport" in window,
|
|
|
51
51
|
h.value = s, x.value = i, S(h), S(x);
|
|
52
52
|
}, w = (e = 0, s = 0) => {
|
|
53
53
|
o.value = e, f.value = s, S(o), S(f);
|
|
54
|
-
},
|
|
55
|
-
|
|
54
|
+
}, z = () => {
|
|
55
|
+
y();
|
|
56
56
|
const e = k();
|
|
57
57
|
if (e) {
|
|
58
58
|
const s = e.getBoundingClientRect();
|
|
@@ -90,7 +90,7 @@ const ce = U && "ResizeObserver" in window, T = U && "visualViewport" in window,
|
|
|
90
90
|
}, 50), V = B(() => {
|
|
91
91
|
t.intersecting = h.value, t.visible = x.value;
|
|
92
92
|
}, 50), v = B(() => {
|
|
93
|
-
|
|
93
|
+
y(), ae(z);
|
|
94
94
|
}, 50);
|
|
95
95
|
return oe(() => {
|
|
96
96
|
l.push(a(b, g, { immediate: !0 })), l.push(
|
|
@@ -102,11 +102,11 @@ const ce = U && "ResizeObserver" in window, T = U && "visualViewport" in window,
|
|
|
102
102
|
), l.push(a(x, V, { immediate: !0 })), U && window.addEventListener("resize", v), T && (window.visualViewport.addEventListener("resize", v), window.visualViewport.addEventListener("scroll", v));
|
|
103
103
|
}), le(() => {
|
|
104
104
|
U && window.removeEventListener("resize", v), T && (window.visualViewport.removeEventListener("resize", v), window.visualViewport.removeEventListener("scroll", v)), l.forEach((e) => e()), l.splice(0, l.length), u && (u.disconnect(), u = void 0), m && (m.disconnect(), m = void 0);
|
|
105
|
-
}), { ...re(t), update:
|
|
105
|
+
}), { ...re(t), update: z, ssr: !!M };
|
|
106
106
|
};
|
|
107
107
|
export {
|
|
108
108
|
ce as S,
|
|
109
109
|
T as a,
|
|
110
110
|
ve as u
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=display-
|
|
112
|
+
//# sourceMappingURL=display-DazBkrbZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-kAyhIPBH.mjs","sources":["../src/private/ux/display.ts"],"sourcesContent":["import { useDisplay } from 'vuetify'\nimport { toUnreactive } from '../common/utils'\nimport { debounce } from '@nhtio/vuetifiable/util/helpers'\nimport { IN_BROWSER, SUPPORTS_INTERSECTION } from '@nhtio/vuetifiable/util/globals'\nimport { getCurrentInstanceName } from '@nhtio/vuetifiable/util/getCurrentInstance'\nimport {\n reactive,\n shallowRef,\n triggerRef,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n nextTick,\n} from 'vue'\nimport type { Ref, ComponentPublicInstance, UnwrapRef, WatchStopHandle } from 'vue'\nimport type { DisplayInstance, DisplayBreakpoint, DisplayThresholds } from 'vuetify'\n\nexport const SUPPORTS_RESIZE_OBSERVATION = IN_BROWSER && 'ResizeObserver' in window\n\nexport const SUPPORTS_VISUAL_VIEWPORT = IN_BROWSER && 'visualViewport' in window\n\ntype DisplayPlatform = DisplayInstance['platform']\n\nexport type ReferencedContainer = Ref<HTMLElement | ComponentPublicInstance | null>\n\nexport const ScopedDisplayOrientation = ['landscape', 'portrait', 'square'] as const\nexport type ScopedDisplayOrientation = (typeof ScopedDisplayOrientation)[number]\n\nexport type ScopedDisplayInstance = DisplayInstance & {\n ssr: boolean\n intersecting: Ref<boolean>\n visible: Ref<boolean>\n orientation: Ref<ScopedDisplayOrientation>\n}\n\n// Extract the ref types as non-ref types and exclude functions\ntype InternalReactiveScopedDisplayStateTypes = {\n [key in keyof ScopedDisplayInstance]: ScopedDisplayInstance[key] extends Ref<any>\n ? UnwrapRef<ScopedDisplayInstance[key]>\n : ScopedDisplayInstance[key] extends Function\n ? never\n : ScopedDisplayInstance[key]\n}\n\n// Create a type that only includes the non-excluded keys\ntype InternalReactiveScopedDisplayState = {\n [K in keyof InternalReactiveScopedDisplayStateTypes as InternalReactiveScopedDisplayStateTypes[K] extends never\n ? never\n : K]: InternalReactiveScopedDisplayStateTypes[K]\n}\n\nexport const useScopedDisplay = (\n container: ReferencedContainer,\n name: string = getCurrentInstanceName('resourcefulComposables')\n) => {\n const vuetifyState = useDisplay({ mobile: null }, name)\n const {\n mobile,\n mobileBreakpoint,\n platform,\n thresholds,\n ssr,\n update: vuetifyUseDisplayUpdate,\n } = vuetifyState\n // despite the urge to use a Set here, an array is more peformant for doing simple iterations\n const watchStopHandles: WatchStopHandle[] = []\n let resizeObserver: ResizeObserver | undefined\n let intersectionObserver: IntersectionObserver | undefined\n const width = shallowRef<number>(0)\n const height = shallowRef<number>(0)\n const intersecting = shallowRef<boolean>(false)\n const visible = shallowRef<boolean>(false)\n const state = reactive<Omit<InternalReactiveScopedDisplayState, 'ssr'>>({\n xs: false,\n sm: false,\n md: false,\n lg: false,\n xl: false,\n xxl: false,\n smAndUp: false,\n mdAndUp: false,\n lgAndUp: false,\n xlAndUp: false,\n smAndDown: false,\n mdAndDown: false,\n lgAndDown: false,\n xlAndDown: false,\n name: 'xs' as const,\n width: 0,\n height: 0,\n mobile: false,\n mobileBreakpoint: toUnreactive(mobileBreakpoint),\n platform: toUnreactive(platform),\n thresholds: toUnreactive(thresholds),\n intersecting: false,\n visible: false,\n orientation: 'square' as ScopedDisplayOrientation,\n })\n const resizeObserverHandler = (entries: ResizeObserverEntry[]) => {\n let w: number = 0\n let h: number = 0\n for (const entry of entries) {\n if ('contentBoxSize' in entry && 'undefined' !== typeof entry.contentBoxSize) {\n const contentBoxSize = Array.isArray(entry.contentBoxSize)\n ? (entry.contentBoxSize[0] as ResizeObserverSize)\n : // Old versions of Firefox treat ResizeObserverSize as a single item\n (entry.contentBoxSize as unknown as ResizeObserverSize)\n w = contentBoxSize.inlineSize\n } else {\n w = entry.contentRect.width\n }\n h = entry.contentRect.height\n updateDimensions(w, h)\n }\n }\n const intersectionObserverHandler = (entries: IntersectionObserverEntry[]) => {\n const isIntersecting = entries.some((entry) => entry.isIntersecting)\n const isVisible = entries.some((entry) =>\n 'isVisible' in entry ? (entry as any).isVisible : entry.isIntersecting\n )\n intersecting.value = isIntersecting\n visible.value = isVisible\n triggerRef(intersecting)\n triggerRef(visible)\n }\n // helper utility to ensure that the width and height are updated\n const updateDimensions = (w: number = 0, h: number = 0) => {\n width.value = w\n height.value = h\n triggerRef(width)\n triggerRef(height)\n }\n // an exposed method to force an update of the display state\n const update = () => {\n vuetifyUseDisplayUpdate()\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n // helper utility to get the mobile breakpoint as a number for comparisons\n const getMobileBreakpointAsNumber = () => {\n if (typeof state.mobileBreakpoint === 'number') {\n return state.mobileBreakpoint\n }\n if (state.mobileBreakpoint in state.thresholds) {\n return state.thresholds[state.mobileBreakpoint]\n }\n // fallback to 600\n return 600\n }\n // helper utility to get the element from a referenced value\n // used to get the container element from the reference, and in watchers\n const getReferencedHtmlElement = (value: HTMLElement | ComponentPublicInstance | null) => {\n if (!value) return undefined\n if (value instanceof HTMLElement) return value\n if ('$el' in value && value.$el instanceof HTMLElement) {\n return value.$el\n }\n return undefined\n }\n // helper utility to get the referenced container element\n const getContainerHtmlElement = (): HTMLElement | undefined => {\n return getReferencedHtmlElement(container.value)\n }\n // observers for changes in the values from vuetify's useDisplay composable\n const vuetifyUseDisplayMobileObserver = (is: boolean) => {\n if (true === is) {\n state.mobile = true\n } else if (width.value < getMobileBreakpointAsNumber()) {\n state.mobile = true\n } else {\n state.mobile = false\n }\n }\n const vuetifyUseDisplayMobileBreakpointObserver = (is: number | DisplayBreakpoint) => {\n state.mobileBreakpoint = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const vuetifyUseDisplayPlatformObserver = (is: DisplayPlatform) => {\n state.platform = toUnreactive(is)\n }\n const vuetifyUseDisplayThresholdsObserver = (is: DisplayThresholds) => {\n state.thresholds = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const containerObserver = (\n is: HTMLElement | ComponentPublicInstance | null,\n was: HTMLElement | ComponentPublicInstance | null | undefined\n ) => {\n const newEl = getReferencedHtmlElement(is)\n const oldEl = getReferencedHtmlElement(was ?? null)\n if (newEl === oldEl) return\n if (intersectionObserver) {\n if (oldEl) {\n intersectionObserver.unobserve(oldEl)\n }\n if (newEl) {\n intersectionObserver.observe(newEl)\n }\n }\n if (resizeObserver) {\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n }\n if (newEl) {\n resizeObserver.observe(newEl)\n }\n }\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n const dimensionsObserver = debounce(() => {\n state.width = width.value\n state.height = height.value\n vuetifyUseDisplayMobileObserver(mobile.value)\n const xs = width.value < thresholds.value.sm\n const sm = width.value < thresholds.value.md && !xs\n const md = width.value < thresholds.value.lg && !(sm || xs)\n const lg = width.value < thresholds.value.xl && !(md || sm || xs)\n const xl = width.value < thresholds.value.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.value.xxl\n const breakpointName = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl'\n const smAndUp = !xs\n const mdAndUp = !(xs || sm)\n const lgAndUp = !(xs || sm || md)\n const xlAndUp = !(xs || sm || md || lg)\n const smAndDown = !(md || lg || xl || xxl)\n const mdAndDown = !(lg || xl || xxl)\n const lgAndDown = !(xl || xxl)\n const xlAndDown = !xxl\n const orientation: ScopedDisplayOrientation =\n width.value > height.value ? 'landscape' : height.value > width.value ? 'portrait' : 'square'\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.name = breakpointName\n state.smAndUp = smAndUp\n state.mdAndUp = mdAndUp\n state.lgAndUp = lgAndUp\n state.xlAndUp = xlAndUp\n state.smAndDown = smAndDown\n state.mdAndDown = mdAndDown\n state.lgAndDown = lgAndDown\n state.xlAndDown = xlAndDown\n state.orientation = orientation\n }, 50)\n const intersectionAndVisibilityObserver = debounce(() => {\n state.intersecting = intersecting.value\n state.visible = visible.value\n }, 50)\n const windowResizeHandler = debounce(() => {\n // Update Vuetify's display state (handles viewport breakpoints)\n vuetifyUseDisplayUpdate()\n // Give the process a tick and then force an update\n nextTick(update)\n }, 50)\n onMounted(() => {\n watchStopHandles.push(watch(mobile, vuetifyUseDisplayMobileObserver, { immediate: true }))\n watchStopHandles.push(\n watch(mobileBreakpoint, vuetifyUseDisplayMobileBreakpointObserver, { immediate: true })\n )\n watchStopHandles.push(watch(platform, vuetifyUseDisplayPlatformObserver, { immediate: true }))\n watchStopHandles.push(\n watch(thresholds, vuetifyUseDisplayThresholdsObserver, { immediate: true })\n )\n if (SUPPORTS_RESIZE_OBSERVATION) {\n resizeObserver = new ResizeObserver(resizeObserverHandler)\n }\n if (SUPPORTS_INTERSECTION) {\n intersectionObserver = new IntersectionObserver(intersectionObserverHandler)\n }\n watchStopHandles.push(watch(container, containerObserver, { immediate: true }))\n watchStopHandles.push(watch(width, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(watch(height, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(\n watch(intersecting, intersectionAndVisibilityObserver, { immediate: true })\n )\n watchStopHandles.push(watch(visible, intersectionAndVisibilityObserver, { immediate: true }))\n // Add window resize listener\n if (IN_BROWSER) {\n window.addEventListener('resize', windowResizeHandler)\n }\n // Add visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.addEventListener('resize', windowResizeHandler)\n window.visualViewport!.addEventListener('scroll', windowResizeHandler)\n }\n })\n onUnmounted(() => {\n // Remove window resize listener\n if (IN_BROWSER) {\n window.removeEventListener('resize', windowResizeHandler)\n }\n // Remove visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.removeEventListener('resize', windowResizeHandler)\n window.visualViewport!.removeEventListener('scroll', windowResizeHandler)\n }\n // clear all of the watch stop handles\n watchStopHandles.forEach((stopHandle) => stopHandle())\n watchStopHandles.splice(0, watchStopHandles.length)\n // cleanup the resize observer\n if (resizeObserver) {\n resizeObserver.disconnect()\n resizeObserver = undefined\n }\n // cleanup the intersection observer\n if (intersectionObserver) {\n intersectionObserver.disconnect()\n intersectionObserver = undefined\n }\n })\n return { ...toRefs(state), update, ssr: !!ssr }\n}\n"],"names":["SUPPORTS_RESIZE_OBSERVATION","IN_BROWSER","SUPPORTS_VISUAL_VIEWPORT","useScopedDisplay","container","name","getCurrentInstanceName","vuetifyState","useDisplay","mobile","mobileBreakpoint","platform","thresholds","ssr","vuetifyUseDisplayUpdate","watchStopHandles","resizeObserver","intersectionObserver","width","shallowRef","height","intersecting","visible","state","reactive","toUnreactive","resizeObserverHandler","entries","w","h","entry","updateDimensions","intersectionObserverHandler","isIntersecting","isVisible","triggerRef","update","el","getContainerHtmlElement","rect","getMobileBreakpointAsNumber","getReferencedHtmlElement","value","vuetifyUseDisplayMobileObserver","is","vuetifyUseDisplayMobileBreakpointObserver","vuetifyUseDisplayPlatformObserver","vuetifyUseDisplayThresholdsObserver","containerObserver","was","newEl","oldEl","dimensionsObserver","debounce","xs","sm","md","lg","xl","xxl","breakpointName","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","orientation","intersectionAndVisibilityObserver","windowResizeHandler","nextTick","onMounted","watch","SUPPORTS_INTERSECTION","onUnmounted","stopHandle","toRefs"],"mappings":";;;;AAkBO,MAAMA,KAA8BC,KAAc,oBAAoB,QAEhEC,IAA2BD,KAAc,oBAAoB,QAgC7DE,KAAmB,CAC9BC,GACAC,IAAeC,GAAuB,wBAAwB,MAC3D;AACH,QAAMC,IAAeC,GAAW,EAAE,QAAQ,KAAA,GAAQH,CAAI,GAChD;AAAA,IACJ,QAAAI;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC;AAAA,IACA,QAAQC;AAAA,EAAA,IACNP,GAEEQ,IAAsC,CAAA;AAC5C,MAAIC,GACAC;AACJ,QAAMC,IAAQC,EAAmB,CAAC,GA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C,EAAiB,KAAK2D,EAAMtD,GAAQgC,GAAoB,EAAE,WAAW,GAAA,CAAM,CAAC,GAC5ErC,EAAiB;AAAA,MACf2D,EAAMrD,GAAciD,GAAmC,EAAE,WAAW,IAAM;AAAA,IAAA,GAE5EvD,EAAiB,KAAK2D,EAAMpD,GAASgD,GAAmC,EAAE,WAAW,GAAA,CAAM,CAAC,GAExFrE,KACF,OAAO,iBAAiB,UAAUsE,CAAmB,GAGnDrE,MACF,OAAO,eAAgB,iBAAiB,UAAUqE,CAAmB,GACrE,OAAO,eAAgB,iBAAiB,UAAUA,CAAmB;AAAA,EAEzE,CAAC,GACDK,GAAY,MAAM;AAEhB,IAAI3E,KACF,OAAO,oBAAoB,UAAUsE,CAAmB,GAGtDrE,MACF,OAAO,eAAgB,oBAAoB,UAAUqE,CAAmB,GACxE,OAAO,eAAgB,oBAAoB,UAAUA,CAAmB,IAG1ExD,EAAiB,QAAQ,CAAC8D,MAAeA,EAAA,CAAY,GACrD9D,EAAiB,OAAO,GAAGA,EAAiB,MAAM,GAE9CC,MACFA,EAAe,WAAA,GACfA,IAAiB,SAGfC,MACFA,EAAqB,WAAA,GACrBA,IAAuB;AAAA,EAE3B,CAAC,GACM,EAAE,GAAG6D,GAAOvD,CAAK,GAAG,QAAAa,GAAQ,KAAK,CAAC,CAACvB,EAAA;AAC5C;"}
|
|
1
|
+
{"version":3,"file":"display-DazBkrbZ.mjs","sources":["../src/private/ux/display.ts"],"sourcesContent":["import { useDisplay } from 'vuetify'\nimport { toUnreactive } from '../common/utils'\nimport { debounce } from '@nhtio/vuetifiable/util/helpers'\nimport { IN_BROWSER, SUPPORTS_INTERSECTION } from '@nhtio/vuetifiable/util/globals'\nimport { getCurrentInstanceName } from '@nhtio/vuetifiable/util/getCurrentInstance'\nimport {\n reactive,\n shallowRef,\n triggerRef,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n nextTick,\n} from 'vue'\nimport type { Ref, ComponentPublicInstance, UnwrapRef, WatchStopHandle } from 'vue'\nimport type { DisplayInstance, DisplayBreakpoint, DisplayThresholds } from 'vuetify'\n\nexport const SUPPORTS_RESIZE_OBSERVATION = IN_BROWSER && 'ResizeObserver' in window\n\nexport const SUPPORTS_VISUAL_VIEWPORT = IN_BROWSER && 'visualViewport' in window\n\ntype DisplayPlatform = DisplayInstance['platform']\n\nexport type ReferencedContainer = Ref<HTMLElement | ComponentPublicInstance | null>\n\nexport const ScopedDisplayOrientation = ['landscape', 'portrait', 'square'] as const\nexport type ScopedDisplayOrientation = (typeof ScopedDisplayOrientation)[number]\n\nexport type ScopedDisplayInstance = DisplayInstance & {\n ssr: boolean\n intersecting: Ref<boolean>\n visible: Ref<boolean>\n orientation: Ref<ScopedDisplayOrientation>\n}\n\n// Extract the ref types as non-ref types and exclude functions\ntype InternalReactiveScopedDisplayStateTypes = {\n [key in keyof ScopedDisplayInstance]: ScopedDisplayInstance[key] extends Ref<any>\n ? UnwrapRef<ScopedDisplayInstance[key]>\n : ScopedDisplayInstance[key] extends Function\n ? never\n : ScopedDisplayInstance[key]\n}\n\n// Create a type that only includes the non-excluded keys\ntype InternalReactiveScopedDisplayState = {\n [K in keyof InternalReactiveScopedDisplayStateTypes as InternalReactiveScopedDisplayStateTypes[K] extends never\n ? never\n : K]: InternalReactiveScopedDisplayStateTypes[K]\n}\n\nexport const useScopedDisplay = (\n container: ReferencedContainer,\n name: string = getCurrentInstanceName('resourcefulComposables')\n) => {\n const vuetifyState = useDisplay({ mobile: null }, name)\n const {\n mobile,\n mobileBreakpoint,\n platform,\n thresholds,\n ssr,\n update: vuetifyUseDisplayUpdate,\n } = vuetifyState\n // despite the urge to use a Set here, an array is more peformant for doing simple iterations\n const watchStopHandles: WatchStopHandle[] = []\n let resizeObserver: ResizeObserver | undefined\n let intersectionObserver: IntersectionObserver | undefined\n const width = shallowRef<number>(0)\n const height = shallowRef<number>(0)\n const intersecting = shallowRef<boolean>(false)\n const visible = shallowRef<boolean>(false)\n const state = reactive<Omit<InternalReactiveScopedDisplayState, 'ssr'>>({\n xs: false,\n sm: false,\n md: false,\n lg: false,\n xl: false,\n xxl: false,\n smAndUp: false,\n mdAndUp: false,\n lgAndUp: false,\n xlAndUp: false,\n smAndDown: false,\n mdAndDown: false,\n lgAndDown: false,\n xlAndDown: false,\n name: 'xs' as const,\n width: 0,\n height: 0,\n mobile: false,\n mobileBreakpoint: toUnreactive(mobileBreakpoint),\n platform: toUnreactive(platform),\n thresholds: toUnreactive(thresholds),\n intersecting: false,\n visible: false,\n orientation: 'square' as ScopedDisplayOrientation,\n })\n const resizeObserverHandler = (entries: ResizeObserverEntry[]) => {\n let w: number = 0\n let h: number = 0\n for (const entry of entries) {\n if ('contentBoxSize' in entry && 'undefined' !== typeof entry.contentBoxSize) {\n const contentBoxSize = Array.isArray(entry.contentBoxSize)\n ? (entry.contentBoxSize[0] as ResizeObserverSize)\n : // Old versions of Firefox treat ResizeObserverSize as a single item\n (entry.contentBoxSize as unknown as ResizeObserverSize)\n w = contentBoxSize.inlineSize\n } else {\n w = entry.contentRect.width\n }\n h = entry.contentRect.height\n updateDimensions(w, h)\n }\n }\n const intersectionObserverHandler = (entries: IntersectionObserverEntry[]) => {\n const isIntersecting = entries.some((entry) => entry.isIntersecting)\n const isVisible = entries.some((entry) =>\n 'isVisible' in entry ? (entry as any).isVisible : entry.isIntersecting\n )\n intersecting.value = isIntersecting\n visible.value = isVisible\n triggerRef(intersecting)\n triggerRef(visible)\n }\n // helper utility to ensure that the width and height are updated\n const updateDimensions = (w: number = 0, h: number = 0) => {\n width.value = w\n height.value = h\n triggerRef(width)\n triggerRef(height)\n }\n // an exposed method to force an update of the display state\n const update = () => {\n vuetifyUseDisplayUpdate()\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n // helper utility to get the mobile breakpoint as a number for comparisons\n const getMobileBreakpointAsNumber = () => {\n if (typeof state.mobileBreakpoint === 'number') {\n return state.mobileBreakpoint\n }\n if (state.mobileBreakpoint in state.thresholds) {\n return state.thresholds[state.mobileBreakpoint]\n }\n // fallback to 600\n return 600\n }\n // helper utility to get the element from a referenced value\n // used to get the container element from the reference, and in watchers\n const getReferencedHtmlElement = (value: HTMLElement | ComponentPublicInstance | null) => {\n if (!value) return undefined\n if (value instanceof HTMLElement) return value\n if ('$el' in value && value.$el instanceof HTMLElement) {\n return value.$el\n }\n return undefined\n }\n // helper utility to get the referenced container element\n const getContainerHtmlElement = (): HTMLElement | undefined => {\n return getReferencedHtmlElement(container.value)\n }\n // observers for changes in the values from vuetify's useDisplay composable\n const vuetifyUseDisplayMobileObserver = (is: boolean) => {\n if (true === is) {\n state.mobile = true\n } else if (width.value < getMobileBreakpointAsNumber()) {\n state.mobile = true\n } else {\n state.mobile = false\n }\n }\n const vuetifyUseDisplayMobileBreakpointObserver = (is: number | DisplayBreakpoint) => {\n state.mobileBreakpoint = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const vuetifyUseDisplayPlatformObserver = (is: DisplayPlatform) => {\n state.platform = toUnreactive(is)\n }\n const vuetifyUseDisplayThresholdsObserver = (is: DisplayThresholds) => {\n state.thresholds = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const containerObserver = (\n is: HTMLElement | ComponentPublicInstance | null,\n was: HTMLElement | ComponentPublicInstance | null | undefined\n ) => {\n const newEl = getReferencedHtmlElement(is)\n const oldEl = getReferencedHtmlElement(was ?? null)\n if (newEl === oldEl) return\n if (intersectionObserver) {\n if (oldEl) {\n intersectionObserver.unobserve(oldEl)\n }\n if (newEl) {\n intersectionObserver.observe(newEl)\n }\n }\n if (resizeObserver) {\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n }\n if (newEl) {\n resizeObserver.observe(newEl)\n }\n }\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n const dimensionsObserver = debounce(() => {\n state.width = width.value\n state.height = height.value\n vuetifyUseDisplayMobileObserver(mobile.value)\n const xs = width.value < thresholds.value.sm\n const sm = width.value < thresholds.value.md && !xs\n const md = width.value < thresholds.value.lg && !(sm || xs)\n const lg = width.value < thresholds.value.xl && !(md || sm || xs)\n const xl = width.value < thresholds.value.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.value.xxl\n const breakpointName = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl'\n const smAndUp = !xs\n const mdAndUp = !(xs || sm)\n const lgAndUp = !(xs || sm || md)\n const xlAndUp = !(xs || sm || md || lg)\n const smAndDown = !(md || lg || xl || xxl)\n const mdAndDown = !(lg || xl || xxl)\n const lgAndDown = !(xl || xxl)\n const xlAndDown = !xxl\n const orientation: ScopedDisplayOrientation =\n width.value > height.value ? 'landscape' : height.value > width.value ? 'portrait' : 'square'\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.name = breakpointName\n state.smAndUp = smAndUp\n state.mdAndUp = mdAndUp\n state.lgAndUp = lgAndUp\n state.xlAndUp = xlAndUp\n state.smAndDown = smAndDown\n state.mdAndDown = mdAndDown\n state.lgAndDown = lgAndDown\n state.xlAndDown = xlAndDown\n state.orientation = orientation\n }, 50)\n const intersectionAndVisibilityObserver = debounce(() => {\n state.intersecting = intersecting.value\n state.visible = visible.value\n }, 50)\n const windowResizeHandler = debounce(() => {\n // Update Vuetify's display state (handles viewport breakpoints)\n vuetifyUseDisplayUpdate()\n // Give the process a tick and then force an update\n nextTick(update)\n }, 50)\n onMounted(() => {\n watchStopHandles.push(watch(mobile, vuetifyUseDisplayMobileObserver, { immediate: true }))\n watchStopHandles.push(\n watch(mobileBreakpoint, vuetifyUseDisplayMobileBreakpointObserver, { immediate: true })\n )\n watchStopHandles.push(watch(platform, vuetifyUseDisplayPlatformObserver, { immediate: true }))\n watchStopHandles.push(\n watch(thresholds, vuetifyUseDisplayThresholdsObserver, { immediate: true })\n )\n if (SUPPORTS_RESIZE_OBSERVATION) {\n resizeObserver = new ResizeObserver(resizeObserverHandler)\n }\n if (SUPPORTS_INTERSECTION) {\n intersectionObserver = new IntersectionObserver(intersectionObserverHandler)\n }\n watchStopHandles.push(watch(container, containerObserver, { immediate: true }))\n watchStopHandles.push(watch(width, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(watch(height, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(\n watch(intersecting, intersectionAndVisibilityObserver, { immediate: true })\n )\n watchStopHandles.push(watch(visible, intersectionAndVisibilityObserver, { immediate: true }))\n // Add window resize listener\n if (IN_BROWSER) {\n window.addEventListener('resize', windowResizeHandler)\n }\n // Add visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.addEventListener('resize', windowResizeHandler)\n window.visualViewport!.addEventListener('scroll', windowResizeHandler)\n }\n })\n onUnmounted(() => {\n // Remove window resize listener\n if (IN_BROWSER) {\n window.removeEventListener('resize', windowResizeHandler)\n }\n // Remove visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.removeEventListener('resize', windowResizeHandler)\n window.visualViewport!.removeEventListener('scroll', windowResizeHandler)\n }\n // clear all of the watch stop handles\n watchStopHandles.forEach((stopHandle) => stopHandle())\n watchStopHandles.splice(0, watchStopHandles.length)\n // cleanup the resize observer\n if (resizeObserver) {\n resizeObserver.disconnect()\n resizeObserver = undefined\n }\n // cleanup the intersection observer\n if (intersectionObserver) {\n intersectionObserver.disconnect()\n intersectionObserver = undefined\n }\n })\n return { ...toRefs(state), update, ssr: !!ssr }\n}\n"],"names":["SUPPORTS_RESIZE_OBSERVATION","IN_BROWSER","SUPPORTS_VISUAL_VIEWPORT","useScopedDisplay","container","name","getCurrentInstanceName","vuetifyState","useDisplay","mobile","mobileBreakpoint","platform","thresholds","ssr","vuetifyUseDisplayUpdate","watchStopHandles","resizeObserver","intersectionObserver","width","shallowRef","height","intersecting","visible","state","reactive","toUnreactive","resizeObserverHandler","entries","w","h","entry","updateDimensions","intersectionObserverHandler","isIntersecting","isVisible","triggerRef","update","el","getContainerHtmlElement","rect","getMobileBreakpointAsNumber","getReferencedHtmlElement","value","vuetifyUseDisplayMobileObserver","is","vuetifyUseDisplayMobileBreakpointObserver","vuetifyUseDisplayPlatformObserver","vuetifyUseDisplayThresholdsObserver","containerObserver","was","newEl","oldEl","dimensionsObserver","debounce","xs","sm","md","lg","xl","xxl","breakpointName","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","orientation","intersectionAndVisibilityObserver","windowResizeHandler","nextTick","onMounted","watch","SUPPORTS_INTERSECTION","onUnmounted","stopHandle","toRefs"],"mappings":";;;;AAkBO,MAAMA,KAA8BC,KAAc,oBAAoB,QAEhEC,IAA2BD,KAAc,oBAAoB,QAgC7DE,KAAmB,CAC9BC,GACAC,IAAeC,GAAuB,wBAAwB,MAC3D;AACH,QAAMC,IAAeC,GAAW,EAAE,QAAQ,KAAA,GAAQH,CAAI,GAChD;AAAA,IACJ,QAAAI;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC;AAAA,IACA,QAAQC;AAAA,EAAA,IACNP,GAEEQ,IAAsC,CAAA;AAC5C,MAAIC,GACAC;AACJ,QAAMC,IAAQC,EAAmB,CAAC,GAC5BC,IAASD,EAAmB,CAAC,GAC7BE,IAAeF,EAAoB,EAAK,GACxCG,IAAUH,EAAoB,EAAK,GACnCI,IAAQC,GAA0D;AAAA,IACtE,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAA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AgB,iBAAiB,UAAUqE,CAAmB,GACrE,OAAO,eAAgB,iBAAiB,UAAUA,CAAmB;AAAA,EAEzE,CAAC,GACDK,GAAY,MAAM;AAEhB,IAAI3E,KACF,OAAO,oBAAoB,UAAUsE,CAAmB,GAGtDrE,MACF,OAAO,eAAgB,oBAAoB,UAAUqE,CAAmB,GACxE,OAAO,eAAgB,oBAAoB,UAAUA,CAAmB,IAG1ExD,EAAiB,QAAQ,CAAC8D,MAAeA,EAAA,CAAY,GACrD9D,EAAiB,OAAO,GAAGA,EAAiB,MAAM,GAE9CC,MACFA,EAAe,WAAA,GACfA,IAAiB,SAGfC,MACFA,EAAqB,WAAA,GACrBA,IAAuB;AAAA,EAE3B,CAAC,GACM,EAAE,GAAG6D,GAAOvD,CAAK,GAAG,QAAAa,GAAQ,KAAK,CAAC,CAACvB,EAAA;AAC5C;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { inject as Qe, toRef as _, shallowRef as O, computed as I, watch as xe, createVNode as b, normalizeStyle as Xe, normalizeClass as j, createElementVNode as k, mergeProps as ue, withDirectives as ye, vShow as Ye, Fragment as he, toDisplayString as Ze } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as je } from "./console-
|
|
5
|
-
|
|
2
|
+
import { A as De, aa as ce, ab as Je, U as Te, ac as et, ad as tt, Q as nt, g as fe, p as de, ae as lt, af as ze, ag as be, D as Se, o as Re, ah as Ce, a as x, ai as $e, r as ve, aj as at, y as pe, L as D, C as st, S as Oe, q as Fe, ak as ot, f as We, al as it, a2 as ke, T as rt, i as ut, a4 as ct, k as ft, n as dt, am as vt, u as pt, an as Ie, a3 as mt, O as gt, R as yt, ao as ht, E as N, a6 as we, ap as bt, a7 as St, s as Ct, aq as kt, w as It, a8 as wt, z as Vt, a9 as Ve } from "./display-BdjbLG1_.mjs";
|
|
3
|
+
import { B as Be, V as Le, Q as q, W as _t, N as At, X as Pt, Y as Ge, M as Et, Z as H, _ as F, $ as xt, p as U, x as Dt, E as w, a0 as Tt, L as zt, A as Rt, C as Me, a1 as $t } from "./utils-DxV2ZNaE.mjs";
|
|
4
|
+
import { c as je } from "./console-CAez8ceh.mjs";
|
|
5
|
+
const Ot = Symbol.for("vuetify:goto");
|
|
6
6
|
function Ft() {
|
|
7
7
|
return {
|
|
8
8
|
container: void 0,
|
|
@@ -36,13 +36,13 @@ async function _e(e, t, n, l) {
|
|
|
36
36
|
const p = window.getComputedStyle(f).getPropertyValue("--v-layout-top");
|
|
37
37
|
p && (y -= parseInt(p, 10));
|
|
38
38
|
}
|
|
39
|
-
y += s.offset, y =
|
|
39
|
+
y += s.offset, y = Lt(i, y, !!o, !!n);
|
|
40
40
|
const d = i[a] ?? 0;
|
|
41
41
|
if (y === d) return Promise.resolve(y);
|
|
42
42
|
const m = performance.now();
|
|
43
43
|
return new Promise((v) => requestAnimationFrame(function p(S) {
|
|
44
|
-
const C = (S - m) / s.duration,
|
|
45
|
-
if (i[a] =
|
|
44
|
+
const C = (S - m) / s.duration, A = Math.floor(d + (y - d) * r(Te(C, 0, 1)));
|
|
45
|
+
if (i[a] = A, C >= 1 && Math.abs(A - i[a]) < 10)
|
|
46
46
|
return v(y);
|
|
47
47
|
if (C > 2)
|
|
48
48
|
return et("Scroll target is not reachable"), v(i[a]);
|
|
@@ -65,7 +65,7 @@ function Bt() {
|
|
|
65
65
|
}
|
|
66
66
|
return a.horizontal = async (s, o) => _e(s, ce(e, o), !0, l), a;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Lt(e, t, n, l) {
|
|
69
69
|
const {
|
|
70
70
|
scrollWidth: a,
|
|
71
71
|
scrollHeight: s
|
|
@@ -73,14 +73,14 @@ function Gt(e, t, n, l) {
|
|
|
73
73
|
let i, r;
|
|
74
74
|
return l ? n ? (i = -(a - o), r = 0) : (i = 0, r = a - o) : (i = 0, r = s + -f), Te(t, i, r);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Gt(e) {
|
|
77
77
|
let {
|
|
78
78
|
selectedElement: t,
|
|
79
79
|
containerElement: n,
|
|
80
80
|
isRtl: l,
|
|
81
81
|
isHorizontal: a
|
|
82
82
|
} = e;
|
|
83
|
-
const s = W(a, n), o =
|
|
83
|
+
const s = W(a, n), o = Ne(a, l, n), f = W(a, t), i = He(a, t), r = f * 0.4;
|
|
84
84
|
return o > i ? i - r : o + s < i + f ? i - s + f + r : o;
|
|
85
85
|
}
|
|
86
86
|
function Mt(e) {
|
|
@@ -89,16 +89,16 @@ function Mt(e) {
|
|
|
89
89
|
containerElement: n,
|
|
90
90
|
isHorizontal: l
|
|
91
91
|
} = e;
|
|
92
|
-
const a = W(l, n), s =
|
|
92
|
+
const a = W(l, n), s = He(l, t), o = W(l, t);
|
|
93
93
|
return s - a / 2 + o / 2;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function Ae(e, t) {
|
|
96
96
|
return t?.[e ? "scrollWidth" : "scrollHeight"] || 0;
|
|
97
97
|
}
|
|
98
98
|
function jt(e, t) {
|
|
99
99
|
return t?.[e ? "clientWidth" : "clientHeight"] || 0;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ne(e, t, n) {
|
|
102
102
|
if (!n)
|
|
103
103
|
return 0;
|
|
104
104
|
const {
|
|
@@ -111,7 +111,7 @@ function He(e, t, n) {
|
|
|
111
111
|
function W(e, t) {
|
|
112
112
|
return t?.[e ? "offsetWidth" : "offsetHeight"] || 0;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function He(e, t) {
|
|
115
115
|
return t?.[e ? "offsetLeft" : "offsetTop"] || 0;
|
|
116
116
|
}
|
|
117
117
|
const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
@@ -149,7 +149,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
149
149
|
...$e({
|
|
150
150
|
selectedClass: "v-slide-group-item--active"
|
|
151
151
|
})
|
|
152
|
-
}, "VSlideGroup"),
|
|
152
|
+
}, "VSlideGroup"), Pe = fe()({
|
|
153
153
|
name: "VSlideGroup",
|
|
154
154
|
props: Ke(),
|
|
155
155
|
emits: {
|
|
@@ -174,7 +174,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
174
174
|
container: m.el,
|
|
175
175
|
duration: 200,
|
|
176
176
|
easing: "easeOutQuart"
|
|
177
|
-
})),
|
|
177
|
+
})), A = I(() => o.selected.value.length ? o.items.value.findIndex((u) => u.id === o.selected.value[0]) : -1), Y = I(() => o.selected.value.length ? o.items.value.findIndex((u) => u.id === o.selected.value[o.selected.value.length - 1]) : -1);
|
|
178
178
|
if (Se) {
|
|
179
179
|
let u = -1;
|
|
180
180
|
xe(() => [o.selected.value, v.value, S.value, d.value], () => {
|
|
@@ -183,21 +183,21 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
183
183
|
const c = d.value ? "width" : "height";
|
|
184
184
|
r.value = v.value[c], y.value = S.value[c], f.value = r.value + 1 < y.value;
|
|
185
185
|
}
|
|
186
|
-
if (e.scrollToActive &&
|
|
186
|
+
if (e.scrollToActive && A.value >= 0 && p.el) {
|
|
187
187
|
const c = p.el.children[Y.value];
|
|
188
188
|
B(c, e.centerActive);
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
-
const
|
|
193
|
+
const P = O(!1);
|
|
194
194
|
function B(u, c) {
|
|
195
195
|
let g = 0;
|
|
196
196
|
c ? g = Mt({
|
|
197
197
|
containerElement: m.el,
|
|
198
198
|
isHorizontal: d.value,
|
|
199
199
|
selectedElement: u
|
|
200
|
-
}) : g =
|
|
200
|
+
}) : g = Gt({
|
|
201
201
|
containerElement: m.el,
|
|
202
202
|
isHorizontal: d.value,
|
|
203
203
|
isRtl: l.value,
|
|
@@ -206,8 +206,8 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
206
206
|
}
|
|
207
207
|
function T(u) {
|
|
208
208
|
if (!Se || !m.el) return;
|
|
209
|
-
const c = W(d.value, m.el), g =
|
|
210
|
-
if (!(
|
|
209
|
+
const c = W(d.value, m.el), g = Ne(d.value, l.value, m.el);
|
|
210
|
+
if (!(Ae(d.value, m.el) <= c || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
|
|
211
211
|
Math.abs(u - g) < 16)) {
|
|
212
212
|
if (d.value && l.value && m.el) {
|
|
213
213
|
const {
|
|
@@ -227,7 +227,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
227
227
|
i.value = d.value ? g : c;
|
|
228
228
|
}
|
|
229
229
|
function h(u) {
|
|
230
|
-
if (
|
|
230
|
+
if (P.value = !0, !(!f.value || !p.el)) {
|
|
231
231
|
for (const c of u.composedPath())
|
|
232
232
|
for (const g of p.el.children)
|
|
233
233
|
if (g === c) {
|
|
@@ -236,17 +236,17 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
|
|
239
|
+
function L(u) {
|
|
240
|
+
P.value = !1;
|
|
241
241
|
}
|
|
242
242
|
let z = !1;
|
|
243
243
|
function J(u) {
|
|
244
|
-
!z && !
|
|
244
|
+
!z && !P.value && !(u.relatedTarget && p.el?.contains(u.relatedTarget)) && $(), z = !1;
|
|
245
245
|
}
|
|
246
246
|
function R() {
|
|
247
247
|
z = !0;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function G(u) {
|
|
250
250
|
if (!p.el) return;
|
|
251
251
|
function c(g) {
|
|
252
252
|
u.preventDefault(), $(g);
|
|
@@ -315,7 +315,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
315
315
|
}
|
|
316
316
|
}), le = I(() => Math.abs(i.value) > 1), ae = I(() => {
|
|
317
317
|
if (!m.value || !M.value) return !1;
|
|
318
|
-
const u =
|
|
318
|
+
const u = Ae(d.value, m.el), c = jt(d.value, m.el);
|
|
319
319
|
return u - c - Math.abs(i.value) > 1;
|
|
320
320
|
});
|
|
321
321
|
return Re(() => b(e.tag, {
|
|
@@ -325,7 +325,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
325
325
|
"v-slide-group--is-overflowing": f.value
|
|
326
326
|
}, a.value, e.class]),
|
|
327
327
|
style: Xe(e.style),
|
|
328
|
-
tabindex:
|
|
328
|
+
tabindex: P.value || o.selected.value.length ? -1 : 0,
|
|
329
329
|
onFocus: J
|
|
330
330
|
}, {
|
|
331
331
|
default: () => [ne.value && k("div", {
|
|
@@ -348,8 +348,8 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
348
348
|
ref: p,
|
|
349
349
|
class: "v-slide-group__content",
|
|
350
350
|
onFocusin: h,
|
|
351
|
-
onFocusout:
|
|
352
|
-
onKeydown:
|
|
351
|
+
onFocusout: L,
|
|
352
|
+
onKeydown: G
|
|
353
353
|
}, [n.default?.(te.value)])]), ne.value && k("div", {
|
|
354
354
|
key: "next",
|
|
355
355
|
class: j(["v-slide-group__next", {
|
|
@@ -371,7 +371,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
371
371
|
hasNext: ae
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
}), Ue = Symbol.for("vuetify:v-chip-group"),
|
|
374
|
+
}), Ue = Symbol.for("vuetify:v-chip-group"), Nt = de({
|
|
375
375
|
baseColor: String,
|
|
376
376
|
column: Boolean,
|
|
377
377
|
filter: Boolean,
|
|
@@ -394,7 +394,7 @@ const qe = Symbol.for("vuetify:v-slide-group"), Ke = de({
|
|
|
394
394
|
}, "VChipGroup");
|
|
395
395
|
fe()({
|
|
396
396
|
name: "VChipGroup",
|
|
397
|
-
props:
|
|
397
|
+
props: Nt(),
|
|
398
398
|
emits: {
|
|
399
399
|
"update:modelValue": (e) => !0
|
|
400
400
|
},
|
|
@@ -420,8 +420,8 @@ fe()({
|
|
|
420
420
|
variant: _(() => e.variant)
|
|
421
421
|
}
|
|
422
422
|
}), Re(() => {
|
|
423
|
-
const r =
|
|
424
|
-
return b(
|
|
423
|
+
const r = Pe.filterProps(e);
|
|
424
|
+
return b(Pe, ue(r, {
|
|
425
425
|
class: ["v-chip-group", {
|
|
426
426
|
"v-chip-group--column": e.column
|
|
427
427
|
}, l.value, e.class],
|
|
@@ -438,7 +438,7 @@ fe()({
|
|
|
438
438
|
}), {};
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
|
-
const
|
|
441
|
+
const Ht = de({
|
|
442
442
|
activeClass: String,
|
|
443
443
|
appendAvatar: String,
|
|
444
444
|
appendIcon: D,
|
|
@@ -500,7 +500,7 @@ const Nt = de({
|
|
|
500
500
|
directives: {
|
|
501
501
|
vRipple: ke
|
|
502
502
|
},
|
|
503
|
-
props:
|
|
503
|
+
props: Ht(),
|
|
504
504
|
emits: {
|
|
505
505
|
"click:close": (e) => !0,
|
|
506
506
|
"update:modelValue": (e) => !0,
|
|
@@ -527,7 +527,7 @@ const Nt = de({
|
|
|
527
527
|
sizeClasses: y
|
|
528
528
|
} = vt(e), {
|
|
529
529
|
themeClasses: d
|
|
530
|
-
} = We(e), m = pt(e, "modelValue"), v = Ie(e, Ue, !1), p = Ie(e, qe, !1), S = mt(e, n), V = _(() => e.link !== !1 && S.isLink.value), C = I(() => !e.disabled && e.link !== !1 && (!!v || e.link || S.isClickable.value)),
|
|
530
|
+
} = We(e), m = pt(e, "modelValue"), v = Ie(e, Ue, !1), p = Ie(e, qe, !1), S = mt(e, n), V = _(() => e.link !== !1 && S.isLink.value), C = I(() => !e.disabled && e.link !== !1 && (!!v || e.link || S.isClickable.value)), A = _(() => ({
|
|
531
531
|
"aria-label": s(e.closeLabel),
|
|
532
532
|
disabled: e.disabled,
|
|
533
533
|
onClick(h) {
|
|
@@ -539,7 +539,7 @@ const Nt = de({
|
|
|
539
539
|
});
|
|
540
540
|
const {
|
|
541
541
|
colorClasses: Y,
|
|
542
|
-
colorStyles:
|
|
542
|
+
colorStyles: P,
|
|
543
543
|
variantClasses: B
|
|
544
544
|
} = gt(() => ({
|
|
545
545
|
color: !v || v.isSelected.value ? e.color ?? e.baseColor : e.baseColor,
|
|
@@ -552,7 +552,7 @@ const Nt = de({
|
|
|
552
552
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), T(h));
|
|
553
553
|
}
|
|
554
554
|
return () => {
|
|
555
|
-
const h = S.isLink.value ? "a" : e.tag,
|
|
555
|
+
const h = S.isLink.value ? "a" : e.tag, L = !!(e.appendIcon || e.appendAvatar), z = !!(L || a.append), J = !!(a.close || e.closable), R = !!(a.filter || e.filter) && v, G = !!(e.prependIcon || e.prependAvatar), E = !!(G || a.prepend);
|
|
556
556
|
return m.value && ye(b(h, ue(S.linkProps, {
|
|
557
557
|
class: ["v-chip", {
|
|
558
558
|
"v-chip--disabled": e.disabled,
|
|
@@ -562,7 +562,7 @@ const Nt = de({
|
|
|
562
562
|
"v-chip--pill": e.pill,
|
|
563
563
|
[`${e.activeClass}`]: e.activeClass && S.isActive?.value
|
|
564
564
|
}, d.value, o.value, Y.value, f.value, i.value, r.value, y.value, B.value, v?.selectedClass.value, e.class],
|
|
565
|
-
style: [
|
|
565
|
+
style: [P.value, e.style],
|
|
566
566
|
disabled: e.disabled || void 0,
|
|
567
567
|
draggable: e.draggable,
|
|
568
568
|
tabindex: C.value ? 0 : void 0,
|
|
@@ -574,7 +574,7 @@ const Nt = de({
|
|
|
574
574
|
}, {
|
|
575
575
|
default: () => [ye(k("div", {
|
|
576
576
|
class: "v-chip__filter"
|
|
577
|
-
}, [a.filter ? b(
|
|
577
|
+
}, [a.filter ? b(N, {
|
|
578
578
|
key: "filter-defaults",
|
|
579
579
|
disabled: !e.filterIcon,
|
|
580
580
|
defaults: {
|
|
@@ -589,9 +589,9 @@ const Nt = de({
|
|
|
589
589
|
}), E && k("div", {
|
|
590
590
|
key: "prepend",
|
|
591
591
|
class: "v-chip__prepend"
|
|
592
|
-
}, [a.prepend ? b(
|
|
592
|
+
}, [a.prepend ? b(N, {
|
|
593
593
|
key: "prepend-defaults",
|
|
594
|
-
disabled: !
|
|
594
|
+
disabled: !G,
|
|
595
595
|
defaults: {
|
|
596
596
|
VAvatar: {
|
|
597
597
|
image: e.prependAvatar,
|
|
@@ -623,9 +623,9 @@ const Nt = de({
|
|
|
623
623
|
}) ?? Ze(e.text)]), z && k("div", {
|
|
624
624
|
key: "append",
|
|
625
625
|
class: "v-chip__append"
|
|
626
|
-
}, [a.append ? b(
|
|
626
|
+
}, [a.append ? b(N, {
|
|
627
627
|
key: "append-defaults",
|
|
628
|
-
disabled: !
|
|
628
|
+
disabled: !L,
|
|
629
629
|
defaults: {
|
|
630
630
|
VAvatar: {
|
|
631
631
|
end: !0,
|
|
@@ -649,7 +649,7 @@ const Nt = de({
|
|
|
649
649
|
class: "v-chip__close",
|
|
650
650
|
type: "button",
|
|
651
651
|
"data-testid": "close-chip"
|
|
652
|
-
},
|
|
652
|
+
}, A.value), [a.close ? b(N, {
|
|
653
653
|
key: "close-defaults",
|
|
654
654
|
defaults: {
|
|
655
655
|
VIcon: {
|
|
@@ -673,14 +673,14 @@ function qt(e, t = Be("injectSelf")) {
|
|
|
673
673
|
}
|
|
674
674
|
const K = Symbol.for("vuetify:defaults");
|
|
675
675
|
function ge() {
|
|
676
|
-
const e =
|
|
676
|
+
const e = Le(K);
|
|
677
677
|
if (!e) throw new Error("[Vuetify] Could not find defaults instance");
|
|
678
678
|
return e;
|
|
679
679
|
}
|
|
680
680
|
function sn(e, t) {
|
|
681
681
|
const n = ge(), l = Et(e), a = q(() => {
|
|
682
|
-
if (
|
|
683
|
-
const o =
|
|
682
|
+
if (H(t?.disabled)) return n.value;
|
|
683
|
+
const o = H(t?.scoped), f = H(t?.reset), i = H(t?.root);
|
|
684
684
|
if (l.value == null && !(o || f || i))
|
|
685
685
|
return n.value;
|
|
686
686
|
let r = F(l.value, {
|
|
@@ -698,10 +698,10 @@ function sn(e, t) {
|
|
|
698
698
|
}
|
|
699
699
|
return r.prev ? F(r.prev, r) : r;
|
|
700
700
|
});
|
|
701
|
-
return
|
|
701
|
+
return Ge(K, a), a;
|
|
702
702
|
}
|
|
703
703
|
function Kt(e, t) {
|
|
704
|
-
return e.props && (typeof e.props[t] < "u" || typeof e.props[
|
|
704
|
+
return e.props && (typeof e.props[t] < "u" || typeof e.props[Pt(t)] < "u");
|
|
705
705
|
}
|
|
706
706
|
function Ut(e = {}, t, n = ge()) {
|
|
707
707
|
const l = Be("useDefaults");
|
|
@@ -725,7 +725,7 @@ function Ut(e = {}, t, n = ge()) {
|
|
|
725
725
|
return V !== void 0 ? V : p;
|
|
726
726
|
}
|
|
727
727
|
}), o = _t();
|
|
728
|
-
|
|
728
|
+
At(() => {
|
|
729
729
|
if (a.value) {
|
|
730
730
|
const i = Object.entries(a.value).filter(
|
|
731
731
|
([r]) => r.startsWith(r[0].toUpperCase())
|
|
@@ -736,7 +736,7 @@ function Ut(e = {}, t, n = ge()) {
|
|
|
736
736
|
});
|
|
737
737
|
function f() {
|
|
738
738
|
const i = qt(K, l);
|
|
739
|
-
|
|
739
|
+
Ge(
|
|
740
740
|
K,
|
|
741
741
|
q(() => o.value ? F(i?.value ?? {}, o.value) : i?.value)
|
|
742
742
|
);
|
|
@@ -824,7 +824,7 @@ const Xt = [String, Function, Object, Array], Yt = Symbol.for("vuetify:icons"),
|
|
|
824
824
|
X();
|
|
825
825
|
X();
|
|
826
826
|
const rn = (e) => {
|
|
827
|
-
const t =
|
|
827
|
+
const t = Le(Yt);
|
|
828
828
|
if (!t) throw new Error("Missing Vuetify Icons provide!");
|
|
829
829
|
return {
|
|
830
830
|
iconData: q(() => {
|
|
@@ -889,7 +889,7 @@ export {
|
|
|
889
889
|
an as V,
|
|
890
890
|
un as a,
|
|
891
891
|
dn as b,
|
|
892
|
-
|
|
892
|
+
Pe as c,
|
|
893
893
|
Ke as d,
|
|
894
894
|
rn as e,
|
|
895
895
|
on as f,
|
|
@@ -899,4 +899,4 @@ export {
|
|
|
899
899
|
sn as p,
|
|
900
900
|
cn as u
|
|
901
901
|
};
|
|
902
|
-
//# sourceMappingURL=elevation-
|
|
902
|
+
//# sourceMappingURL=elevation-DFBVIqom.mjs.map
|