@ionic/core 8.8.18-nightly.20260811 → 8.8.18

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/hydrate/index.js CHANGED
@@ -12808,6 +12808,9 @@ class Content {
12808
12808
  */
12809
12809
  this.scrollEvents = false;
12810
12810
  }
12811
+ fullscreenChanged() {
12812
+ this.setupFullscreenResizeObserver();
12813
+ }
12811
12814
  componentWillLoad() {
12812
12815
  this.inheritedAttributes = inheritAriaAttributes(this.el);
12813
12816
  }
@@ -12847,6 +12850,12 @@ class Content {
12847
12850
  closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback);
12848
12851
  }
12849
12852
  }
12853
+ // Re-observe on reattach, since componentDidLoad only fires once.
12854
+ this.setupFullscreenResizeObserver();
12855
+ }
12856
+ componentDidLoad() {
12857
+ // The custom elements build assigns fullscreen after connectedCallback.
12858
+ this.setupFullscreenResizeObserver();
12850
12859
  }
12851
12860
  disconnectedCallback() {
12852
12861
  this.onScrollEnd();
@@ -12868,6 +12877,25 @@ class Content {
12868
12877
  clearTimeout(this.resizeTimeout);
12869
12878
  this.resizeTimeout = null;
12870
12879
  }
12880
+ this.destroyFullscreenResizeObserver();
12881
+ }
12882
+ /**
12883
+ * Header and footer sizes can change after load without a window resize
12884
+ * firing, so the `resize` listener alone misses those changes.
12885
+ *
12886
+ * Popover content is excluded because `contain: none` lets its offsets drive
12887
+ * the host's own height, which would feed back into the observer.
12888
+ */
12889
+ setupFullscreenResizeObserver() {
12890
+ {
12891
+ return;
12892
+ }
12893
+ }
12894
+ destroyFullscreenResizeObserver() {
12895
+ if (this.fullscreenResizeObserver !== undefined) {
12896
+ this.fullscreenResizeObserver.disconnect();
12897
+ this.fullscreenResizeObserver = undefined;
12898
+ }
12871
12899
  }
12872
12900
  /**
12873
12901
  * Rotating certain devices can update
@@ -13088,7 +13116,7 @@ class Content {
13088
13116
  const forceOverscroll = this.shouldForceOverscroll();
13089
13117
  const transitionShadow = mode === 'ios';
13090
13118
  this.resize();
13091
- return (hAsync(Host, Object.assign({ key: '8c1bc4a4df8698d3884741eb38512dc059210c50', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
13119
+ return (hAsync(Host, Object.assign({ key: '9551c759df407b10d809171641fc6e8f14d92219', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
13092
13120
  [mode]: true,
13093
13121
  'content-fullscreen': this.fullscreen,
13094
13122
  'content-sizing': hostContext('ion-popover', this.el),
@@ -13097,14 +13125,19 @@ class Content {
13097
13125
  }), style: {
13098
13126
  '--offset-top': `${this.cTop}px`,
13099
13127
  '--offset-bottom': `${this.cBottom}px`,
13100
- } }, inheritedAttributes), hAsync("div", { key: '5e7412549b51ef7543d9378ecab9aac6bc461588', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: '33f6fbf7e1e027c7cbd2dda95b487f18dc648cef', class: {
13128
+ } }, inheritedAttributes), hAsync("div", { key: 'c6de8fd226f0d10a534eb107fe032ac155fbe68e', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: '082fc2936061360060b48221ecb1c864a3711fa0', class: {
13101
13129
  'inner-scroll': true,
13102
13130
  'scroll-x': scrollX,
13103
13131
  'scroll-y': scrollY,
13104
13132
  overscroll: (scrollX || scrollY) && forceOverscroll,
13105
- }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '00c8fe7b9e73533c702273c9457d274195d54e98' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
13133
+ }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '0d2286206facb22696a9ca7e74a3f6b7d2397aab' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
13106
13134
  }
13107
13135
  get el() { return getElement(this); }
13136
+ static get watchers() { return {
13137
+ "fullscreen": [{
13138
+ "fullscreenChanged": 0
13139
+ }]
13140
+ }; }
13108
13141
  static get style() { return contentCss(); }
13109
13142
  static get cmpMeta() { return {
13110
13143
  "$flags$": 265,
@@ -25632,6 +25665,41 @@ const getRootSafeAreaTop = () => {
25632
25665
  }
25633
25666
  return value;
25634
25667
  };
25668
+ /**
25669
+ * Calls back when the resolved root `--ion-safe-area-top` changes, which no
25670
+ * event and no window resize covers. The probe's height tracks the variable, so
25671
+ * a change to it becomes a size change the observer can see.
25672
+ */
25673
+ const onRootSafeAreaTopChange = (callback) => {
25674
+ const doc = win$1 === null || win$1 === void 0 ? void 0 : win$1.document;
25675
+ if (!(doc === null || doc === void 0 ? void 0 : doc.body) || typeof ResizeObserver === 'undefined') {
25676
+ return () => undefined;
25677
+ }
25678
+ const probe = doc.createElement('div');
25679
+ probe.style.cssText =
25680
+ 'position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;' +
25681
+ 'height:var(--ion-safe-area-top,0px);';
25682
+ doc.body.appendChild(probe);
25683
+ /**
25684
+ * Seeded with the value the caller has already applied, so a change that
25685
+ * lands before the observer's first delivery still gets reported. Comparing
25686
+ * against an unset value instead would consume that first delivery and treat
25687
+ * the new inset as the baseline.
25688
+ */
25689
+ let lastHeight = getRootSafeAreaTop();
25690
+ const observer = new ResizeObserver((entries) => {
25691
+ const { height } = entries[0].contentRect;
25692
+ if (height !== lastHeight) {
25693
+ lastHeight = height;
25694
+ callback(height);
25695
+ }
25696
+ });
25697
+ observer.observe(probe);
25698
+ return () => {
25699
+ observer.disconnect();
25700
+ probe.remove();
25701
+ };
25702
+ };
25635
25703
  /**
25636
25704
  * True when the modal host declares BOTH a non-fullscreen `--width` AND a
25637
25705
  * non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
@@ -26794,16 +26862,18 @@ class Modal {
26794
26862
  // Set the internal offset property with the resolved root safe-area-top value
26795
26863
  if (context.isSheetModal) {
26796
26864
  this.updateSheetOffsetTop();
26865
+ this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => this.updateSheetOffsetTop(safeAreaTop));
26797
26866
  }
26798
26867
  }
26799
26868
  /**
26800
- * Resolves the current root --ion-safe-area-top value and sets the
26801
- * internal --ion-modal-offset-top property on the host element.
26802
- * Called on present and on resize (e.g., device rotation changes safe-area).
26869
+ * Sets the internal --ion-modal-offset-top property on the host element,
26870
+ * resolving the current root --ion-safe-area-top when no value is given.
26871
+ * Called on present, on resize (e.g., device rotation changes safe-area),
26872
+ * and whenever the root safe-area value itself changes.
26803
26873
  */
26804
- updateSheetOffsetTop() {
26805
- const safeAreaTop = getRootSafeAreaTop();
26806
- this.el.style.setProperty('--ion-modal-offset-top', `${safeAreaTop}px`);
26874
+ updateSheetOffsetTop(safeAreaTop) {
26875
+ const value = safeAreaTop !== null && safeAreaTop !== void 0 ? safeAreaTop : getRootSafeAreaTop();
26876
+ this.el.style.setProperty('--ion-modal-offset-top', `${value}px`);
26807
26877
  }
26808
26878
  /**
26809
26879
  * Updates safe-area overrides during dynamic state changes.
@@ -26902,7 +26972,10 @@ class Modal {
26902
26972
  * Clears all safe-area overrides and padding.
26903
26973
  */
26904
26974
  cleanupSafeAreaOverrides() {
26975
+ var _a;
26905
26976
  clearSafeAreaOverrides(this.el);
26977
+ (_a = this.unsubscribeRootSafeAreaTop) === null || _a === void 0 ? void 0 : _a.call(this);
26978
+ this.unsubscribeRootSafeAreaTop = undefined;
26906
26979
  // Remove internal sheet offset property
26907
26980
  this.el.style.removeProperty('--ion-modal-offset-top');
26908
26981
  const { contentEl } = this.findContentAndFooter();
@@ -26915,11 +26988,11 @@ class Modal {
26915
26988
  const isCardModal = presentingElement !== undefined && mode === 'ios';
26916
26989
  const isHandleCycle = handleBehavior === 'cycle';
26917
26990
  const isSheetModalWithHandle = isSheetModal && showHandle;
26918
- return (hAsync(Host, Object.assign({ key: '09f09a10d858e976bc2a989f30db925348a7784c', "no-router": true,
26991
+ return (hAsync(Host, Object.assign({ key: 'c4b2713ebc788ac8672e18fdd5069e4253c4da34', "no-router": true,
26919
26992
  // Allow the modal to be navigable when the handle is focusable
26920
26993
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
26921
26994
  zIndex: `${20000 + this.overlayIndex}`,
26922
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: 'b197319bdddf0b979ccacdb63dbceccfd9bf2560', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'c848ff6a10e9092cdb10a6f21c9a299a72b17ca9', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'e7c8e67807d49098aba63dce69a1bbf9647bbab6',
26995
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '2cc0afff8a815954492138afb0fca042243afddd', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '9844700b9436f9bfa1a69ba436e9ca46d70cf316', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'ab1cd56ca956c773c9242fb42ff320bac7627b4b',
26923
26996
  /*
26924
26997
  role and aria-modal must be used on the
26925
26998
  same element. They must also be set inside the
@@ -26932,9 +27005,9 @@ class Modal {
26932
27005
  without the tabindex focus() would be a no-op and screen readers
26933
27006
  may not properly announce the dialog and its content when it opens.
26934
27007
  */
26935
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '0851cc75ee7367e13d1993a9c4d8b1b4de1d3bf0', class: "modal-handle",
27008
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'c7706794e04a962178640e9a9a11c56288c45e08', class: "modal-handle",
26936
27009
  // Prevents the handle from receiving keyboard focus when it does not cycle
26937
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: 'b4d9bc13dc0867e858db8e1c7277bd09b7fce44c', onSlotchange: this.onSlotChange }))));
27010
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: 'c44fd9810cdd3286f096af98e5a4072f8f44c193', onSlotchange: this.onSlotChange }))));
26938
27011
  }
26939
27012
  get el() { return getElement(this); }
26940
27013
  static get watchers() { return {
package/hydrate/index.mjs CHANGED
@@ -12806,6 +12806,9 @@ class Content {
12806
12806
  */
12807
12807
  this.scrollEvents = false;
12808
12808
  }
12809
+ fullscreenChanged() {
12810
+ this.setupFullscreenResizeObserver();
12811
+ }
12809
12812
  componentWillLoad() {
12810
12813
  this.inheritedAttributes = inheritAriaAttributes(this.el);
12811
12814
  }
@@ -12845,6 +12848,12 @@ class Content {
12845
12848
  closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback);
12846
12849
  }
12847
12850
  }
12851
+ // Re-observe on reattach, since componentDidLoad only fires once.
12852
+ this.setupFullscreenResizeObserver();
12853
+ }
12854
+ componentDidLoad() {
12855
+ // The custom elements build assigns fullscreen after connectedCallback.
12856
+ this.setupFullscreenResizeObserver();
12848
12857
  }
12849
12858
  disconnectedCallback() {
12850
12859
  this.onScrollEnd();
@@ -12866,6 +12875,25 @@ class Content {
12866
12875
  clearTimeout(this.resizeTimeout);
12867
12876
  this.resizeTimeout = null;
12868
12877
  }
12878
+ this.destroyFullscreenResizeObserver();
12879
+ }
12880
+ /**
12881
+ * Header and footer sizes can change after load without a window resize
12882
+ * firing, so the `resize` listener alone misses those changes.
12883
+ *
12884
+ * Popover content is excluded because `contain: none` lets its offsets drive
12885
+ * the host's own height, which would feed back into the observer.
12886
+ */
12887
+ setupFullscreenResizeObserver() {
12888
+ {
12889
+ return;
12890
+ }
12891
+ }
12892
+ destroyFullscreenResizeObserver() {
12893
+ if (this.fullscreenResizeObserver !== undefined) {
12894
+ this.fullscreenResizeObserver.disconnect();
12895
+ this.fullscreenResizeObserver = undefined;
12896
+ }
12869
12897
  }
12870
12898
  /**
12871
12899
  * Rotating certain devices can update
@@ -13086,7 +13114,7 @@ class Content {
13086
13114
  const forceOverscroll = this.shouldForceOverscroll();
13087
13115
  const transitionShadow = mode === 'ios';
13088
13116
  this.resize();
13089
- return (hAsync(Host, Object.assign({ key: '8c1bc4a4df8698d3884741eb38512dc059210c50', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
13117
+ return (hAsync(Host, Object.assign({ key: '9551c759df407b10d809171641fc6e8f14d92219', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
13090
13118
  [mode]: true,
13091
13119
  'content-fullscreen': this.fullscreen,
13092
13120
  'content-sizing': hostContext('ion-popover', this.el),
@@ -13095,14 +13123,19 @@ class Content {
13095
13123
  }), style: {
13096
13124
  '--offset-top': `${this.cTop}px`,
13097
13125
  '--offset-bottom': `${this.cBottom}px`,
13098
- } }, inheritedAttributes), hAsync("div", { key: '5e7412549b51ef7543d9378ecab9aac6bc461588', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: '33f6fbf7e1e027c7cbd2dda95b487f18dc648cef', class: {
13126
+ } }, inheritedAttributes), hAsync("div", { key: 'c6de8fd226f0d10a534eb107fe032ac155fbe68e', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: '082fc2936061360060b48221ecb1c864a3711fa0', class: {
13099
13127
  'inner-scroll': true,
13100
13128
  'scroll-x': scrollX,
13101
13129
  'scroll-y': scrollY,
13102
13130
  overscroll: (scrollX || scrollY) && forceOverscroll,
13103
- }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '00c8fe7b9e73533c702273c9457d274195d54e98' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
13131
+ }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '0d2286206facb22696a9ca7e74a3f6b7d2397aab' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
13104
13132
  }
13105
13133
  get el() { return getElement(this); }
13134
+ static get watchers() { return {
13135
+ "fullscreen": [{
13136
+ "fullscreenChanged": 0
13137
+ }]
13138
+ }; }
13106
13139
  static get style() { return contentCss(); }
13107
13140
  static get cmpMeta() { return {
13108
13141
  "$flags$": 265,
@@ -25630,6 +25663,41 @@ const getRootSafeAreaTop = () => {
25630
25663
  }
25631
25664
  return value;
25632
25665
  };
25666
+ /**
25667
+ * Calls back when the resolved root `--ion-safe-area-top` changes, which no
25668
+ * event and no window resize covers. The probe's height tracks the variable, so
25669
+ * a change to it becomes a size change the observer can see.
25670
+ */
25671
+ const onRootSafeAreaTopChange = (callback) => {
25672
+ const doc = win$1 === null || win$1 === void 0 ? void 0 : win$1.document;
25673
+ if (!(doc === null || doc === void 0 ? void 0 : doc.body) || typeof ResizeObserver === 'undefined') {
25674
+ return () => undefined;
25675
+ }
25676
+ const probe = doc.createElement('div');
25677
+ probe.style.cssText =
25678
+ 'position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;' +
25679
+ 'height:var(--ion-safe-area-top,0px);';
25680
+ doc.body.appendChild(probe);
25681
+ /**
25682
+ * Seeded with the value the caller has already applied, so a change that
25683
+ * lands before the observer's first delivery still gets reported. Comparing
25684
+ * against an unset value instead would consume that first delivery and treat
25685
+ * the new inset as the baseline.
25686
+ */
25687
+ let lastHeight = getRootSafeAreaTop();
25688
+ const observer = new ResizeObserver((entries) => {
25689
+ const { height } = entries[0].contentRect;
25690
+ if (height !== lastHeight) {
25691
+ lastHeight = height;
25692
+ callback(height);
25693
+ }
25694
+ });
25695
+ observer.observe(probe);
25696
+ return () => {
25697
+ observer.disconnect();
25698
+ probe.remove();
25699
+ };
25700
+ };
25633
25701
  /**
25634
25702
  * True when the modal host declares BOTH a non-fullscreen `--width` AND a
25635
25703
  * non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
@@ -26792,16 +26860,18 @@ class Modal {
26792
26860
  // Set the internal offset property with the resolved root safe-area-top value
26793
26861
  if (context.isSheetModal) {
26794
26862
  this.updateSheetOffsetTop();
26863
+ this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => this.updateSheetOffsetTop(safeAreaTop));
26795
26864
  }
26796
26865
  }
26797
26866
  /**
26798
- * Resolves the current root --ion-safe-area-top value and sets the
26799
- * internal --ion-modal-offset-top property on the host element.
26800
- * Called on present and on resize (e.g., device rotation changes safe-area).
26867
+ * Sets the internal --ion-modal-offset-top property on the host element,
26868
+ * resolving the current root --ion-safe-area-top when no value is given.
26869
+ * Called on present, on resize (e.g., device rotation changes safe-area),
26870
+ * and whenever the root safe-area value itself changes.
26801
26871
  */
26802
- updateSheetOffsetTop() {
26803
- const safeAreaTop = getRootSafeAreaTop();
26804
- this.el.style.setProperty('--ion-modal-offset-top', `${safeAreaTop}px`);
26872
+ updateSheetOffsetTop(safeAreaTop) {
26873
+ const value = safeAreaTop !== null && safeAreaTop !== void 0 ? safeAreaTop : getRootSafeAreaTop();
26874
+ this.el.style.setProperty('--ion-modal-offset-top', `${value}px`);
26805
26875
  }
26806
26876
  /**
26807
26877
  * Updates safe-area overrides during dynamic state changes.
@@ -26900,7 +26970,10 @@ class Modal {
26900
26970
  * Clears all safe-area overrides and padding.
26901
26971
  */
26902
26972
  cleanupSafeAreaOverrides() {
26973
+ var _a;
26903
26974
  clearSafeAreaOverrides(this.el);
26975
+ (_a = this.unsubscribeRootSafeAreaTop) === null || _a === void 0 ? void 0 : _a.call(this);
26976
+ this.unsubscribeRootSafeAreaTop = undefined;
26904
26977
  // Remove internal sheet offset property
26905
26978
  this.el.style.removeProperty('--ion-modal-offset-top');
26906
26979
  const { contentEl } = this.findContentAndFooter();
@@ -26913,11 +26986,11 @@ class Modal {
26913
26986
  const isCardModal = presentingElement !== undefined && mode === 'ios';
26914
26987
  const isHandleCycle = handleBehavior === 'cycle';
26915
26988
  const isSheetModalWithHandle = isSheetModal && showHandle;
26916
- return (hAsync(Host, Object.assign({ key: '09f09a10d858e976bc2a989f30db925348a7784c', "no-router": true,
26989
+ return (hAsync(Host, Object.assign({ key: 'c4b2713ebc788ac8672e18fdd5069e4253c4da34', "no-router": true,
26917
26990
  // Allow the modal to be navigable when the handle is focusable
26918
26991
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
26919
26992
  zIndex: `${20000 + this.overlayIndex}`,
26920
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: 'b197319bdddf0b979ccacdb63dbceccfd9bf2560', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'c848ff6a10e9092cdb10a6f21c9a299a72b17ca9', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'e7c8e67807d49098aba63dce69a1bbf9647bbab6',
26993
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '2cc0afff8a815954492138afb0fca042243afddd', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '9844700b9436f9bfa1a69ba436e9ca46d70cf316', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'ab1cd56ca956c773c9242fb42ff320bac7627b4b',
26921
26994
  /*
26922
26995
  role and aria-modal must be used on the
26923
26996
  same element. They must also be set inside the
@@ -26930,9 +27003,9 @@ class Modal {
26930
27003
  without the tabindex focus() would be a no-op and screen readers
26931
27004
  may not properly announce the dialog and its content when it opens.
26932
27005
  */
26933
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '0851cc75ee7367e13d1993a9c4d8b1b4de1d3bf0', class: "modal-handle",
27006
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'c7706794e04a962178640e9a9a11c56288c45e08', class: "modal-handle",
26934
27007
  // Prevents the handle from receiving keyboard focus when it does not cycle
26935
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: 'b4d9bc13dc0867e858db8e1c7277bd09b7fce44c', onSlotchange: this.onSlotChange }))));
27008
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: 'c44fd9810cdd3286f096af98e5a4072f8f44c193', onSlotchange: this.onSlotChange }))));
26936
27009
  }
26937
27010
  get el() { return getElement(this); }
26938
27011
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.8.18-nightly.20260811",
3
+ "version": "8.8.18",
4
4
  "description": "Base components for Ionic",
5
5
  "engines": {
6
6
  "node": ">= 16"
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{p as t,H as o,e as i,f as e,w as a,c as n,h as s,d as r,t as d}from"./p-CHqRYvYm.js";import{i as h,b as l,a as p,d as c,r as m,f,p as u}from"./p-D7uN07a3.js";import{C as b,a as v,d as x}from"./p-oD4kcBRX.js";import{g as w,f as g,r as k,d as y,k as A}from"./p-D3xo7hqU.js";import{c as Y}from"./p-B-hirT0v.js";import{g as O}from"./p-CIGNaXM1.js";import{G as C,O as D,F as S,e as E,B as M,j as T,k as B,f as P,g as j,h as I}from"./p-BlIAuGv2.js";import{g as R}from"./p-DiVJyqlX.js";import{e as N,w as $}from"./p-A3O24YmY.js";import{b as L}from"./p-DOFCbuQR.js";import{KEYBOARD_DID_OPEN as z}from"./p-D6Ynv7Xh.js";import{c as F}from"./p-CmR5uXej.js";import{g as W}from"./p-hHmYLOfE.js";import{createGesture as H}from"./p-Cl0B-RWe.js";import{w as V}from"./p-ZjP4CjeZ.js";import{d as Z}from"./p--JUspHvy.js";var G;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(G||(G={}));const K={getEngine(){const t=O();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return G.Default;const{style:o}=await t.getInfo();return o}},U=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},X=()=>{!V||V.innerWidth>=768||K.setStyle({style:G.Dark})},q=(t=G.Default)=>{!V||V.innerWidth>=768||K.setStyle({style:t})},_=t=>{const o=h(t)?w(t).querySelector(".inner-scroll"):t;return!l(t)&&0===o.scrollTop},J=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,C)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},Q=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,tt=.915,ot=(t,o)=>g(400,t/Math.abs(1.1*o),500),it=(t,o)=>{const i=window.innerHeight,e=t.getBoundingClientRect().top,a=Math.round(1e3*(1-o/(i-e)))/1e3;return Math.max(0,Math.min(1,a))},et=t=>{const{currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:e}=t,a=void 0===i||i<o,n=a?`calc(var(--backdrop-opacity) * ${o})`:"0",s=F("backdropAnimation").fromTo("opacity",0,n);return a&&s.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:F("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:s,contentAnimation:e?void 0:F("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-o)+"%"},{offset:1,opacity:1,maxHeight:100*o+"%"}])}},at=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,e=`calc(var(--backdrop-opacity) * ${U(o,i)})`,a=[{offset:0,opacity:e},{offset:1,opacity:0}],n=[{offset:0,opacity:e},{offset:i,opacity:0},{offset:1,opacity:0}],s=F("backdropAnimation").keyframes(0!==i?n:a);return{wrapperAnimation:F("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},nt=(t,o)=>{const{presentingEl:i,currentBreakpoint:e,expandToScroll:a}=o,n=w(t),{wrapperAnimation:s,backdropAnimation:r,contentAnimation:d}=void 0!==e?et(o):{backdropAnimation:F().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:F().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};r.addElement(n.querySelector("ion-backdrop")),s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!a&&(null==d||d.addElement(t.querySelector(".ion-page")));const h=F("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([s]);if(d&&h.addAnimation(d),i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,e=w(i),a=F().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),n=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",e=`translateY(${o?"-10px":t}) scale(0.915)`;a.afterStyles({transform:e}).beforeAddWrite((()=>n.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:e,borderRadius:"10px 10px 0 0"}]),h.addAnimation(a)}else if(h.addAnimation(r),o){const t=`translateY(-10px) scale(${o?tt:1})`;a.afterStyles({transform:t}).addElement(e.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=F().afterStyles({transform:t}).addElement(e.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([a,i])}else s.fromTo("opacity","0","1")}else h.addAnimation(r);return h},st=(t,o,i=500)=>{const{presentingEl:e,currentBreakpoint:a}=o,n=w(t),{wrapperAnimation:s,backdropAnimation:r}=void 0!==a?at(o):{backdropAnimation:F().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:F().fromTo("transform","translateY(0vh)","translateY(100vh)")};r.addElement(n.querySelector("ion-backdrop")),s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=F("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(e){const t=window.innerWidth<768,o="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,i=w(e),a=F().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(e.style.setProperty("overflow",""),Array.from(n.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&n.style.setProperty("background-color",""))})),n=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.915)`;a.addElement(e).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(a)}else if(d.addAnimation(r),o){const t=`translateY(-10px) scale(${o?tt:1})`;a.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const e=F().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([a,e])}else s.fromTo("opacity","1","0")}else d.addAnimation(r);return d},rt=(t,o)=>{const{currentBreakpoint:i,expandToScroll:e}=o,a=w(t),{wrapperAnimation:n,backdropAnimation:s,contentAnimation:r}=void 0!==i?et(o):{backdropAnimation:F().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:F().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};s.addElement(a.querySelector("ion-backdrop")),n.addElement(a.querySelector(".modal-wrapper")),!e&&(null==r||r.addElement(t.querySelector(".ion-page")));const d=F().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,n]);return r&&d.addAnimation(r),d},dt=(t,o)=>{const{currentBreakpoint:i}=o,e=w(t),{wrapperAnimation:a,backdropAnimation:n}=void 0!==i?at(o):{backdropAnimation:F().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:F().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return n.addElement(e.querySelector("ion-backdrop")),a.addElement(e.querySelector(".modal-wrapper")),F().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([n,a])},ht=new Set(["","100%","100vw","100vh","100dvw","100dvh","100svw","100svh"]);let lt=null,pt=!1;const ct=t=>{const o=getComputedStyle(t),i=o.getPropertyValue("--width").trim(),e=o.getPropertyValue("--height").trim();return!ht.has(i)&&!ht.has(e)},mt=(t,o)=>{t.style.setProperty("--ion-safe-area-top",o.top),t.style.setProperty("--ion-safe-area-bottom",o.bottom),t.style.setProperty("--ion-safe-area-left",o.left),t.style.setProperty("--ion-safe-area-right",o.right)},ft=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.didPresent=i(this,"ionModalDidPresent",7),this.willPresent=i(this,"ionModalWillPresent",7),this.willDismiss=i(this,"ionModalWillDismiss",7),this.didDismiss=i(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=i(this,"ionBreakpointDidChange",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.ionMount=i(this,"ionMount",7),this.ionDragStart=i(this,"ionDragStart",7),this.ionDragMove=i(this,"ionDragMove",7),this.ionDragEnd=i(this,"ionDragEnd",7),this.lockController=Y(),this.triggerController=E(),this.coreDelegate=b(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,M)},this.onLifecycle=t=>{const o=this.usersElement,i=ut[t.type];if(o&&i){const e=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(e)}},this.onModalFocus=t=>{var o;const{dragHandleEl:i,el:e}=this;t.target===e&&null==(null===(o=e.shadowRoot)||void 0===o?void 0:o.activeElement)&&i&&-1!==i.tabIndex&&i.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:o}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,o)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;T(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides()}componentWillLoad(){var t;const{breakpoints:o,initialBreakpoint:i,el:a,htmlAttributes:n}=this,s=this.isSheetModal=void 0!==o&&void 0!==i,r=["aria-label","role"];this.inheritedAttributes=y(a,r),a.parentNode&&(this.cachedOriginalParent=a.parentNode),void 0!==n&&r.forEach((t=>{n[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:n[t]}),delete n[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===o||void 0===i||o.includes(i)||e("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||B(this.el)}componentDidLoad(){!0===this.isOpen&&k((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:i}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:n}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await v(n,i,this.component,["ion-page"],this.componentProps,e),A(i)?await N(this.usersElement):this.keepContentsMounted||await $(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.setInitialSafeAreaOverrides();const s=void 0!==o;s&&"ios"===L(this)&&(this.statusBarStyle=await K.getStyle(),X()),await P(this,"modalEnter",nt,rt,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),k((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(z,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){var t;if("ios"!==L(this))return;const{el:o}=this,i=this.leaveAnimation||n.get("modalLeave",st),e=this.animation=i(o,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!f(o))return void u(o);const a=null!==(t=this.statusBarStyle)&&void 0!==t?t:G.Default;this.gesture=((t,o,i,e,a,n,s)=>{const r=.5,d=t.offsetHeight;let l=!1,f=!1,u=null,b=!0,v=0;const x=H({el:t,gestureName:"modalSwipeToClose",gesturePriority:D,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;return null===o||!o.closest||(u=p(o),u?_(u):null===o.closest("ion-footer"))},onStart:i=>{var e;const{deltaY:n}=i;null===(e=window.getSelection())||void 0===e||e.removeAllRanges(),b=!u||!h(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,n>0&&u&&c(u),o.progressStart(!0,l?1:0),a()},onMove:e=>{const{deltaY:a}=e;a>0&&u&&c(u);const s=e.deltaY/d,h=s>=0&&f,l=h?.2:.9999,p=h?Q(s/l):s,m=g(1e-4,p,l);o.progressStep(m),m>=r&&v<r?q(i):m<r&&v>=r&&X(),v=m;const b={currentY:e.currentY,deltaY:e.deltaY,velocityY:e.velocityY,progress:it(t,e.deltaY)};n(b)},onEnd:i=>{const a=i.velocityY,n=i.deltaY/d,h=n>=0&&f,p=h?.2:.9999,c=h?Q(n/p):n,v=g(1e-4,c,p),w=!h&&(i.deltaY+1e3*a)/d>=r;let k=w?-.001:.001;w?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),k+=W([0,0],[.32,.72],[0,1],[1,1],v)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),k+=W([0,0],[1,0],[.68,.28],[1,1],v)[0]);const y=ot(w?n*d:(1-v)*d,a);l=w,x.enable(!1),u&&m(u,b),o.onFinish((()=>{w||x.enable(!0)})).progressEnd(w?1:0,k,y),h&&v>p/4?J(t,o):w&&e();const A={currentY:i.currentY,deltaY:i.deltaY,velocityY:i.velocityY,progress:it(t,i.deltaY)};s(A)}});return x})(o,e,a,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const e=this.enterAnimation||n.get("modalEnter",nt),a=this.animation=e(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:this.expandToScroll});a.progressStart(!0,1);const{gesture:s,moveSheetToBreakpoint:r,resetContentScroll:d}=((t,o,i,e,a,n,s=[],r,d,l,c,m,f,u)=>{var b;const v={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==a?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-a,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},x=t.querySelector("ion-content"),y=null===(b=null==x?void 0:x.scrollY)||void 0===b||b,A=i.clientHeight;let Y=e,O=0,C=!1,D=null,E=null,M=null,T=null;const B=s[s.length-1],P=s[0],j=n.childAnimations.find((t=>"wrapperAnimation"===t.id)),I=n.childAnimations.find((t=>"backdropAnimation"===t.id)),R=n.childAnimations.find((t=>"contentAnimation"===t.id)),N=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove(S))},$=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add(S)},L=o=>{if(!E&&(E=Array.from(t.querySelectorAll("ion-footer")),!E.length))return;const i=t.querySelector(".ion-page");if(T=o,"stationary"===o)E.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),null==i||i.style.removeProperty("padding-bottom"),null==i||i.appendChild(t)}));else{let o=0;E.forEach(((i,e)=>{const a=i.getBoundingClientRect(),n=document.body.getBoundingClientRect();o+=i.clientHeight;const s=a.top-n.top,r=a.left-n.left;if(i.style.setProperty("--pinned-width",`${i.clientWidth}px`),i.style.setProperty("--pinned-height",`${i.clientHeight}px`),i.style.setProperty("--pinned-top",`${s}px`),i.style.setProperty("--pinned-left",`${r}px`),0===e){M=s;const o=t.querySelector("ion-header");o&&(M-=o.clientHeight)}})),E.forEach((t=>{null==i||i.style.setProperty("padding-bottom",`${o}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};j&&I&&(j.keyframes([...v.WRAPPER_KEYFRAMES]),I.keyframes([...v.BACKDROP_KEYFRAMES]),null==R||R.keyframes([...v.CONTENT_KEYFRAMES]),n.progressStart(!0,1-Y),Y>a&&!1!==t.focusTrap&&!1!==t.showBackdrop?N():$()),x&&Y!==B&&r&&(x.scrollY=!1);const z=o=>{const{breakpoint:i,canDismiss:e,breakpointOffset:d,animated:h}=o,p=e&&0===i,m=p?Y:i,f=0!==m;return Y=0,j&&I&&(j.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),I.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${U(1-d,a)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${U(m,a)})`}]),R&&R.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),n.progressStep(0)),Z.enable(!1),p?J(t,n):f||l(),!x||m!==s[s.length-1]&&r||(x.scrollY=y),r||0!==m||L("stationary"),new Promise((o=>{n.onFinish((()=>{f?(r||L("stationary"),j&&I?k((()=>{j.keyframes([...v.WRAPPER_KEYFRAMES]),I.keyframes([...v.BACKDROP_KEYFRAMES]),null==R||R.keyframes([...v.CONTENT_KEYFRAMES]),n.progressStart(!0,1-m),Y=m,c(Y),Y>a&&!1!==t.focusTrap&&!1!==t.showBackdrop?N():$(),Z.enable(!0),o()})):(Z.enable(!0),o())):o()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},F=t=>{const o=i.getBoundingClientRect().top+t,e=W(o);return s.reduce(((t,o)=>Math.abs(o-e)<Math.abs(t-e)?o:t))},W=t=>{const o=s[s.length-1],i=V(s[0]),e=V(o),a=Math.round((i-t)/(i-e)*1e3)/1e3;return Math.max(0,Math.min(1,a))},V=o=>{const i=t.getBoundingClientRect();return window.innerHeight-i.height*o},Z=H({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=p(t.event.target);return Y=d(),!(o&&(!r||1===Y))||_(o)},onStart:o=>{var i;if(null===(i=window.getSelection())||void 0===i||i.removeAllRanges(),C=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===P,!r){const t=p(o.event.target);D=t&&h(t)?w(t).querySelector(".inner-scroll"):t}r||L("moving"),o.deltaY>0&&x&&(x.scrollY=!1),k((()=>{t.focus()})),n.progressStart(!0,1-Y),m()},onMove:t=>{if(r||null===M||null===T||(t.currentY>=M&&"moving"===T?L("stationary"):t.currentY<M&&"stationary"===T&&L("moving")),!r&&t.deltaY<=0&&D)return;t.deltaY>0&&x&&(x.scrollY=!1);const o=s.length>1?1-s[1]:void 0,i=1-Y+t.deltaY/A,e=void 0!==o&&i>=o&&C,a=e?.95:.9999,d=e&&void 0!==o?o+Q((i-o)/(a-o)):i;O=g(1e-4,d,a),n.progressStep(O);const h=F(t.deltaY),l={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:W(t.currentY),snapBreakpoint:h};f(l)},onEnd:t=>{const o=F(t.deltaY),i={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:W(t.currentY),snapBreakpoint:o};if(!r&&t.deltaY<=0&&D&&D.scrollTop>0)return L("stationary"),void u(i);z({breakpoint:o,breakpointOffset:O,canDismiss:C,animated:!0}),u(i)}});return{gesture:Z,moveSheetToBreakpoint:z,resetContentScroll:()=>{x&&(x.scrollY=y)}}})(this.el,this.backdropEl,t,o,i,a,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=s,this.moveSheetToBreakpoint=r,this.resetSheetContentScroll=d,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||i>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){var t;this.cachedPageParent=this.getOriginalPageParent();const i=this.cachedPageParent;if(!i||"ION-APP"===i.tagName)return;const e=Array.from(i.children).some((t=>{var i;return!(t===this.el||t instanceof o&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!(null===(i=t.textContent)||void 0===i?void 0:i.trim()))}));if(e)return;i.classList.add("ion-page-overlay-passthrough");const a=i.parentElement;"ION-ROUTER-OUTLET"===(null==a?void 0:a.tagName)&&"ION-APP"!==(null===(t=a.parentElement)||void 0===t?void 0:t.tagName)&&(a.style.setProperty("pointer-events","none"),a.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const o=t.parentElement;(null==o?void 0:o.hasAttribute("data-overlay-passthrough"))&&(o.style.removeProperty("pointer-events"),o.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,C),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,q(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,C),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var i,e;if(this.gestureAnimationDismissing&&o!==C)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const n=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==o&&!await this.checkCanDismiss(t,o))return n(),!1;const{presentingElement:s}=this;void 0!==s&&"ios"===L(this)&&q(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(z,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const r=await j(this,t,o,"modalLeave",st,dt,{presentingEl:s,currentBreakpoint:null!==(i=this.currentBreakpoint)&&void 0!==i?i:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(r){const{delegate:t}=this.getDelegate();await x(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),null===(e=this.resetSheetContentScroll)||void 0===e||e.call(this),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,n(),r}onDidDismiss(){return I(this.el,"ionModalDidDismiss")}onWillDismiss(){return I(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void e("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void e(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:i,canDismiss:a,breakpoints:n,animated:s}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===n[0],animated:s}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),e=i.indexOf(o),a=i[(e+1)%i.length];return await this.setCurrentBreakpoint(a),!0}initViewTransitionListener(){"ios"!==L(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:o}=this;if(!o)return;let i;i=this.currentViewIsPortrait&&!t?((t,o,i=300)=>{const{presentingEl:e}=o;if(!e)return F("portrait-to-landscape-transition");const a="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,n=w(e),s=document.body,r=F("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=F().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(a){const t="translateY(-10px) scale(0.915)",o="translateY(0px) scale(1)";d.addElement(e).afterStyles({transform:o}).fromTo("transform",t,o).fromTo("filter","contrast(0.85)","contrast(1)");const i=F().addElement(n.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);r.addAnimation([d,i])}else{const o=w(t),i=F().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),a=F().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),n=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(e).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>s.style.setProperty("background-color",""))).fromTo("transform",n,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),r.addAnimation([d,i,a])}return r})(this.el,{presentingEl:o}):((t,o,i=300)=>{const{presentingEl:e}=o;if(!e)return F("landscape-to-portrait-transition");const a="ION-MODAL"===e.tagName&&void 0!==e.presentingElement,n=w(e),s=document.body,r=F("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=F().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(a){const t="translateY(-10px) scale(0.915)",o="translateY(0) scale(1)";d.addElement(e).afterStyles({transform:o}).fromTo("transform",t,o);const i=F().addElement(n.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);r.addAnimation([d,i])}else{const o=w(t),i=F().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),a=F().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),n=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(e).afterStyles({transform:n}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:n,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),r.addAnimation([d,i,a])}return r})(this.el,{presentingEl:o}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=i,i.play().then((()=>{this.viewTransitionAnimation=void 0,k((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===L(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),k((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:o}=this,i=w(t).querySelector(".modal-wrapper");if(i&&(i.style.transform="translateY(0vh)",i.style.opacity="1"),"ION-MODAL"===(null==o?void 0:o.tagName))if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";o.style.transform=`translateY(${t}) scale(0.915)`}else o.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);null==t||t.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{var o,i;const e=t===this.cachedOriginalParent,a=!!this.cachedOriginalParent&&(null===(i=(o=t).contains)||void 0===i?void 0:i.call(o,this.cachedOriginalParent));return e||a}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){var t;null===(t=this.parentRemovalObserver)||void 0===t||t.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===L(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}setInitialSafeAreaOverrides(){const t=Object.assign(Object.assign({},this.getSafeAreaContext()),{hasCustomDimensions:ct(this.el)}),o=(t=>{const{isSheetModal:o,isCardModal:i}=t;return o?{top:"0px",bottom:"inherit",left:"0px",right:"0px"}:i?{top:"inherit",bottom:"inherit",left:"0px",right:"0px"}:V&&V.matchMedia("(min-width: 768px) and (min-height: 600px)").matches||t.hasCustomDimensions?{top:"0px",bottom:"0px",left:"0px",right:"0px"}:{top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"}})(t);mt(this.el,o),t.isSheetModal&&this.updateSheetOffsetTop()}updateSheetOffsetTop(){const t=(()=>{if(null!==lt)return lt;const t=null==V?void 0:V.document;if(!(null==t?void 0:t.body))return 0;const o=t.createElement("div");o.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(o);const i=parseFloat(getComputedStyle(o).paddingTop)||0;return o.remove(),lt=i,pt||(pt=!0,k((()=>{lt=null,pt=!1}))),i})();this.el.style.setProperty("--ion-modal-offset-top",`${t}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:o}=this,i=this.getSafeAreaContext();if(i.isSheetModal)return;if(i.isCardModal)return;if(!t)return;const e=(t=>{var o,i;const e=t.getBoundingClientRect(),a=null!==(o=null==V?void 0:V.innerHeight)&&void 0!==o?o:0,n=null!==(i=null==V?void 0:V.innerWidth)&&void 0!==i?i:0;return{top:e.top<=5?"inherit":"0px",bottom:e.bottom>=a-5?"inherit":"0px",left:e.left<=5?"inherit":"0px",right:e.right>=n-5?"inherit":"0px"}})(t);mt(o,e)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:o,hasFooter:i}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(o,i)}applyFullscreenSafeAreaTo(t,o){t&&!o&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,o=!1;for(const i of Array.from(this.el.children)){"ION-CONTENT"===i.tagName&&(t=i),"ION-FOOTER"===i.tagName&&(o=!0);for(const e of Array.from(i.children))"ION-CONTENT"!==e.tagName||t||(t=e),"ION-FOOTER"===e.tagName&&(o=!0)}return{contentEl:t,hasFooter:o}}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:o}=this.findContentAndFooter();this.clearContentSafeAreaPadding(o)}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:e,handleBehavior:a,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&o,p=L(this),c=void 0!==i&&"ios"===p,m="cycle"===a;return s(r,Object.assign({key:"09f09a10d858e976bc2a989f30db925348a7784c","no-router":!0,tabIndex:m&&o&&l?0:-1},e,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!c&&!o,"modal-card":c,"modal-sheet":o,"modal-no-expand-scroll":o&&!h,"overlay-hidden":!0,[S]:!1===d},R(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus}),s("ion-backdrop",{key:"b197319bdddf0b979ccacdb63dbceccfd9bf2560",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&s("div",{key:"c848ff6a10e9092cdb10a6f21c9a299a72b17ca9",class:"modal-shadow"}),s("div",Object.assign({key:"e7c8e67807d49098aba63dce69a1bbf9647bbab6",role:"dialog"},n,{"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),l&&s("button",{key:"0851cc75ee7367e13d1993a9c4d8b1b4de1d3bf0",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),s("slot",{key:"b4d9bc13dc0867e858db8e1c7277bd09b7fce44c",onSlotchange:this.onSlotChange})))}get el(){return this}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}static get style(){return{ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'}}},[289,"ion-modal",{hasController:[4,"has-controller"],overlayIndex:[2,"overlay-index"],delegate:[16],keyboardClose:[4,"keyboard-close"],enterAnimation:[16],leaveAnimation:[16],breakpoints:[16],expandToScroll:[4,"expand-to-scroll"],initialBreakpoint:[2,"initial-breakpoint"],backdropBreakpoint:[2,"backdrop-breakpoint"],handle:[4],handleBehavior:[1,"handle-behavior"],component:[1],componentProps:[16],cssClass:[1,"css-class"],backdropDismiss:[4,"backdrop-dismiss"],showBackdrop:[4,"show-backdrop"],animated:[4],presentingElement:[16],htmlAttributes:[16],isOpen:[4,"is-open"],trigger:[1],keepContentsMounted:[4,"keep-contents-mounted"],focusTrap:[4,"focus-trap"],canDismiss:[4,"can-dismiss"],isSheetModal:[32],presented:[32],present:[64],dismiss:[64],onDidDismiss:[64],onWillDismiss:[64],setCurrentBreakpoint:[64],getCurrentBreakpoint:[64]},[[9,"resize","onWindowResize"]],{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}]),ut={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};function bt(){"undefined"!=typeof customElements&&["ion-modal","ion-backdrop"].forEach((t=>{switch(t){case"ion-modal":customElements.get(d(t))||customElements.define(d(t),ft);break;case"ion-backdrop":customElements.get(d(t))||Z()}}))}export{ft as M,bt as d}
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{p as t,H as o,e as i,k as s,i as e,h as n,d as r,t as l}from"./p-CHqRYvYm.js";import{i as a,k as c,c as h}from"./p-D3xo7hqU.js";import{b as d,a as p}from"./p-DOFCbuQR.js";import{i as f}from"./p-C53feagD.js";import{c as m,h as b}from"./p-DiVJyqlX.js";const v=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionScrollStart=i(this,"ionScrollStart",7),this.ionScroll=i(this,"ionScroll",7),this.ionScrollEnd=i(this,"ionScrollEnd",7),this.watchDog=null,this.isScrolling=!1,this.lastScroll=0,this.queued=!1,this.cTop=-1,this.cBottom=-1,this.isMainContent=!0,this.resizeTimeout=null,this.inheritedAttributes={},this.tabsElement=null,this.detail={scrollTop:0,scrollLeft:0,type:"scroll",event:void 0,startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,data:void 0,isScrolling:!0},this.fullscreen=!1,this.fixedSlotPlacement="after",this.scrollX=!1,this.scrollY=!0,this.scrollEvents=!1}componentWillLoad(){this.inheritedAttributes=a(this.el)}connectedCallback(){if(this.isMainContent=null===this.el.closest("ion-menu, ion-popover, ion-modal"),c(this.el)){const t=this.tabsElement=this.el.closest("ion-tabs");null!==t&&(this.tabsLoadCallback=()=>this.resize(),t.addEventListener("ionTabBarLoaded",this.tabsLoadCallback))}}disconnectedCallback(){if(this.onScrollEnd(),c(this.el)){const{tabsElement:t,tabsLoadCallback:o}=this;null!==t&&void 0!==o&&t.removeEventListener("ionTabBarLoaded",o),this.tabsElement=null,this.tabsLoadCallback=void 0}this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null)}onResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeTimeout=setTimeout((()=>{null!==this.el.offsetParent&&this.resize()}),100)}shouldForceOverscroll(){const{forceOverscroll:t}=this,o=d(this);return void 0===t?"ios"===o&&p("ios"):t}resize(){this.fullscreen?s((()=>this.readDimensions())):0===this.cTop&&0===this.cBottom||(this.cTop=this.cBottom=0,e(this))}async recalculateDimensions(){s((()=>this.readDimensions()))}readDimensions(){const t=u(this.el),o=Math.max(this.el.offsetTop,0),i=Math.max(t.offsetHeight-o-this.el.offsetHeight,0);(o!==this.cTop||i!==this.cBottom)&&(this.cTop=o,this.cBottom=i,e(this))}onScroll(t){const o=Date.now(),i=!this.isScrolling;this.lastScroll=o,i&&this.onScrollStart(),!this.queued&&this.scrollEvents&&(this.queued=!0,s((o=>{this.queued=!1,this.detail.event=t,g(this.detail,this.scrollEl,o,i),this.ionScroll.emit(this.detail)})))}async getScrollElement(){return this.scrollEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.scrollEl)}async getBackgroundElement(){return this.backgroundContentEl||await new Promise((t=>h(this.el,t))),Promise.resolve(this.backgroundContentEl)}scrollToTop(t=0){return this.scrollToPoint(void 0,0,t)}async scrollToBottom(t=0){const o=await this.getScrollElement();return this.scrollToPoint(void 0,o.scrollHeight-o.clientHeight,t)}async scrollByPoint(t,o,i){const s=await this.getScrollElement();return this.scrollToPoint(t+s.scrollLeft,o+s.scrollTop,i)}async scrollToPoint(t,o,i=0){const s=await this.getScrollElement();if(i<32)return null!=o&&(s.scrollTop=o),void(null!=t&&(s.scrollLeft=t));let e,n=0;const r=new Promise((t=>e=t)),l=s.scrollTop,a=s.scrollLeft,c=null!=o?o-l:0,h=null!=t?t-a:0,d=t=>{const o=Math.min(1,(t-n)/i)-1,r=Math.pow(o,3)+1;0!==c&&(s.scrollTop=Math.floor(r*c+l)),0!==h&&(s.scrollLeft=Math.floor(r*h+a)),r<1?requestAnimationFrame(d):e()};return requestAnimationFrame((t=>{n=t,d(t)})),r}onScrollStart(){this.isScrolling=!0,this.ionScrollStart.emit({isScrolling:!0}),this.watchDog&&clearInterval(this.watchDog),this.watchDog=setInterval((()=>{this.lastScroll<Date.now()-120&&this.onScrollEnd()}),100)}onScrollEnd(){this.watchDog&&clearInterval(this.watchDog),this.watchDog=null,this.isScrolling&&(this.isScrolling=!1,this.ionScrollEnd.emit({isScrolling:!1}))}render(){const{fixedSlotPlacement:t,inheritedAttributes:o,isMainContent:i,scrollX:s,scrollY:e,el:l}=this,a=f(l)?"rtl":"ltr",c=d(this),h=this.shouldForceOverscroll(),p="ios"===c;return this.resize(),n(r,Object.assign({key:"8c1bc4a4df8698d3884741eb38512dc059210c50",role:i?"main":void 0,class:m(this.color,{[c]:!0,"content-fullscreen":this.fullscreen,"content-sizing":b("ion-popover",this.el),overscroll:h,[`content-${a}`]:!0}),style:{"--offset-top":`${this.cTop}px`,"--offset-bottom":`${this.cBottom}px`}},o),n("div",{key:"5e7412549b51ef7543d9378ecab9aac6bc461588",ref:t=>this.backgroundContentEl=t,id:"background-content",part:"background"}),"before"===t?n("slot",{name:"fixed"}):null,n("div",{key:"33f6fbf7e1e027c7cbd2dda95b487f18dc648cef",class:{"inner-scroll":!0,"scroll-x":s,"scroll-y":e,overscroll:(s||e)&&h},ref:t=>this.scrollEl=t,onScroll:this.scrollEvents?t=>this.onScroll(t):void 0,part:"scroll"},n("slot",{key:"00c8fe7b9e73533c702273c9457d274195d54e98"})),p?n("div",{class:"transition-effect"},n("div",{class:"transition-cover"}),n("div",{class:"transition-shadow"})):null,"after"===t?n("slot",{name:"fixed"}):null)}get el(){return this}static get style(){return':host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}'}},[257,"ion-content",{color:[513],fullscreen:[4],fixedSlotPlacement:[1,"fixed-slot-placement"],forceOverscroll:[1028,"force-overscroll"],scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],scrollEvents:[4,"scroll-events"],recalculateDimensions:[64],getScrollElement:[64],getBackgroundElement:[64],scrollToTop:[64],scrollToBottom:[64],scrollByPoint:[64],scrollToPoint:[64]},[[9,"resize","onResize"]]]),u=t=>{const o=t.closest("ion-tabs");if(o)return o;return t.closest("ion-app, ion-page, .ion-page, page-inner, .popover-content")||(t=>{var o;return t.parentElement?t.parentElement:(null===(o=t.parentNode)||void 0===o?void 0:o.host)?t.parentNode.host:null})(t)},g=(t,o,i,s)=>{const e=t.currentX,n=t.currentY,r=o.scrollLeft,l=o.scrollTop,a=i-t.currentTime;if(s&&(t.startTime=i,t.startX=r,t.startY=l,t.velocityX=t.velocityY=0),t.currentTime=i,t.currentX=t.scrollLeft=r,t.currentY=t.scrollTop=l,t.deltaX=r-t.startX,t.deltaY=l-t.startY,a>0&&a<100){const o=(l-n)/a;t.velocityX=(r-e)/a*.7+.3*t.velocityX,t.velocityY=.7*o+.3*t.velocityY}};function x(){"undefined"!=typeof customElements&&["ion-content"].forEach((t=>{"ion-content"===t&&(customElements.get(l(t))||customElements.define(l(t),v))}))}export{v as C,x as d}