@getcortexlabs/mavis 0.1.0-alpha.1 → 0.1.0-alpha.3

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.
Files changed (175) hide show
  1. package/README.md +4 -4
  2. package/dist/native/appearance.android.d.ts +4 -0
  3. package/dist/native/appearance.android.d.ts.map +1 -0
  4. package/dist/native/appearance.android.js +55 -0
  5. package/dist/native/appearance.android.js.map +1 -0
  6. package/dist/native/appearance.d.ts +4 -0
  7. package/dist/native/appearance.d.ts.map +1 -0
  8. package/dist/native/appearance.js +31 -0
  9. package/dist/native/appearance.js.map +1 -0
  10. package/dist/native/box.android.d.ts +5 -0
  11. package/dist/native/box.android.d.ts.map +1 -0
  12. package/dist/native/box.android.js +7 -0
  13. package/dist/native/box.android.js.map +1 -0
  14. package/dist/native/box.d.ts +2 -0
  15. package/dist/native/box.d.ts.map +1 -0
  16. package/dist/native/box.ios.d.ts +10 -0
  17. package/dist/native/box.ios.d.ts.map +1 -0
  18. package/dist/native/box.ios.js +25 -0
  19. package/dist/native/box.ios.js.map +1 -0
  20. package/dist/native/box.js +3 -0
  21. package/dist/native/box.js.map +1 -0
  22. package/dist/native/button.android.d.ts +11 -0
  23. package/dist/native/button.android.d.ts.map +1 -0
  24. package/dist/native/button.android.js +31 -0
  25. package/dist/native/button.android.js.map +1 -0
  26. package/dist/native/button.ios.d.ts +4 -0
  27. package/dist/native/button.ios.d.ts.map +1 -1
  28. package/dist/native/button.ios.js +12 -0
  29. package/dist/native/button.ios.js.map +1 -1
  30. package/dist/native/flex-children.d.ts +4 -0
  31. package/dist/native/flex-children.d.ts.map +1 -0
  32. package/dist/native/flex-children.js +12 -0
  33. package/dist/native/flex-children.js.map +1 -0
  34. package/dist/native/flex-layout.android.d.ts +3 -1
  35. package/dist/native/flex-layout.android.d.ts.map +1 -1
  36. package/dist/native/flex-layout.android.js +9 -0
  37. package/dist/native/flex-layout.android.js.map +1 -1
  38. package/dist/native/flex-layout.ios.d.ts +9 -1
  39. package/dist/native/flex-layout.ios.d.ts.map +1 -1
  40. package/dist/native/flex-layout.ios.js +52 -0
  41. package/dist/native/flex-layout.ios.js.map +1 -1
  42. package/dist/native/keyboard-dismiss.android.d.ts +8 -0
  43. package/dist/native/keyboard-dismiss.android.d.ts.map +1 -0
  44. package/dist/native/keyboard-dismiss.android.js +9 -0
  45. package/dist/native/keyboard-dismiss.android.js.map +1 -0
  46. package/dist/native/keyboard-dismiss.d.ts +10 -0
  47. package/dist/native/keyboard-dismiss.d.ts.map +1 -0
  48. package/dist/native/keyboard-dismiss.ios.d.ts +8 -0
  49. package/dist/native/keyboard-dismiss.ios.d.ts.map +1 -0
  50. package/dist/native/keyboard-dismiss.ios.js +88 -0
  51. package/dist/native/keyboard-dismiss.ios.js.map +1 -0
  52. package/dist/native/keyboard-dismiss.js +6 -0
  53. package/dist/native/keyboard-dismiss.js.map +1 -0
  54. package/dist/native/label.ios.d.ts +4 -0
  55. package/dist/native/label.ios.d.ts.map +1 -1
  56. package/dist/native/label.ios.js +12 -0
  57. package/dist/native/label.ios.js.map +1 -1
  58. package/dist/native/measure-memo.d.ts +37 -0
  59. package/dist/native/measure-memo.d.ts.map +1 -0
  60. package/dist/native/measure-memo.js +82 -0
  61. package/dist/native/measure-memo.js.map +1 -0
  62. package/dist/native/screen.android.d.ts +6 -0
  63. package/dist/native/screen.android.d.ts.map +1 -0
  64. package/dist/native/screen.android.js +8 -0
  65. package/dist/native/screen.android.js.map +1 -0
  66. package/dist/native/screen.d.ts +2 -0
  67. package/dist/native/screen.d.ts.map +1 -0
  68. package/dist/native/screen.js +3 -0
  69. package/dist/native/screen.js.map +1 -0
  70. package/dist/native/sheet.android.d.ts +14 -0
  71. package/dist/native/sheet.android.d.ts.map +1 -0
  72. package/dist/native/sheet.android.js +16 -0
  73. package/dist/native/sheet.android.js.map +1 -0
  74. package/dist/native/sheet.d.ts +17 -0
  75. package/dist/native/sheet.d.ts.map +1 -0
  76. package/dist/native/sheet.ios.d.ts +15 -0
  77. package/dist/native/sheet.ios.d.ts.map +1 -0
  78. package/dist/native/sheet.ios.js +32 -0
  79. package/dist/native/sheet.ios.js.map +1 -0
  80. package/dist/native/sheet.js +17 -0
  81. package/dist/native/sheet.js.map +1 -0
  82. package/dist/vue/components/MButton.d.ts +26 -8
  83. package/dist/vue/components/MButton.d.ts.map +1 -1
  84. package/dist/vue/components/MButton.js +25 -6
  85. package/dist/vue/components/MButton.js.map +1 -1
  86. package/dist/vue/components/MCard.d.ts +3 -3
  87. package/dist/vue/components/MIcon.d.ts +55 -0
  88. package/dist/vue/components/MIcon.d.ts.map +1 -0
  89. package/dist/vue/components/MIcon.js +34 -0
  90. package/dist/vue/components/MIcon.js.map +1 -0
  91. package/dist/vue/components/MInput.d.ts +32 -14
  92. package/dist/vue/components/MInput.d.ts.map +1 -1
  93. package/dist/vue/components/MInput.js +26 -5
  94. package/dist/vue/components/MInput.js.map +1 -1
  95. package/dist/vue/components/MReveal.d.ts +4 -4
  96. package/dist/vue/components/MReveal.js +1 -1
  97. package/dist/vue/components/MReveal.js.map +1 -1
  98. package/dist/vue/components/MScreen.d.ts +10 -1
  99. package/dist/vue/components/MScreen.d.ts.map +1 -1
  100. package/dist/vue/components/MScreen.js +54 -6
  101. package/dist/vue/components/MScreen.js.map +1 -1
  102. package/dist/vue/components/MSheet.d.ts +95 -0
  103. package/dist/vue/components/MSheet.d.ts.map +1 -0
  104. package/dist/vue/components/MSheet.js +281 -0
  105. package/dist/vue/components/MSheet.js.map +1 -0
  106. package/dist/vue/components/MSlider.js +1 -1
  107. package/dist/vue/components/MSlider.js.map +1 -1
  108. package/dist/vue/components/MText.d.ts +2 -2
  109. package/dist/vue/components/MText.js +1 -1
  110. package/dist/vue/components/MText.js.map +1 -1
  111. package/dist/vue/components/layout.d.ts +11 -11
  112. package/dist/vue/components/layout.d.ts.map +1 -1
  113. package/dist/vue/components/layout.js +4 -2
  114. package/dist/vue/components/layout.js.map +1 -1
  115. package/dist/vue/index.d.ts +13 -7
  116. package/dist/vue/index.d.ts.map +1 -1
  117. package/dist/vue/index.js +14 -5
  118. package/dist/vue/index.js.map +1 -1
  119. package/dist/vue/layers.d.ts +17 -0
  120. package/dist/vue/layers.d.ts.map +1 -0
  121. package/dist/vue/layers.js +26 -0
  122. package/dist/vue/layers.js.map +1 -0
  123. package/dist/vue/native-view.d.ts +6 -0
  124. package/dist/vue/native-view.d.ts.map +1 -0
  125. package/dist/vue/native-view.js +5 -0
  126. package/dist/vue/native-view.js.map +1 -0
  127. package/dist/vue/props.d.ts +12 -11
  128. package/dist/vue/props.d.ts.map +1 -1
  129. package/dist/vue/props.js +25 -10
  130. package/dist/vue/props.js.map +1 -1
  131. package/dist/vue/system-back.d.ts +11 -0
  132. package/dist/vue/system-back.d.ts.map +1 -0
  133. package/dist/vue/system-back.js +2 -0
  134. package/dist/vue/system-back.js.map +1 -0
  135. package/fonts/LICENSE +45 -0
  136. package/fonts/lucide.ttf +0 -0
  137. package/package.json +3 -2
  138. package/platforms/android/java/com/mavis/ui/Box.java +63 -0
  139. package/platforms/android/java/com/mavis/ui/FlexLayout.java +97 -4
  140. package/platforms/android/java/com/mavis/ui/MeasureMemo.java +145 -0
  141. package/platforms/android/java/com/mavis/ui/Screen.java +108 -0
  142. package/src/native/appearance.android.ts +75 -0
  143. package/src/native/appearance.ts +33 -0
  144. package/src/native/box.android.ts +11 -0
  145. package/src/native/box.ios.ts +41 -0
  146. package/src/native/box.ts +2 -0
  147. package/src/native/button.android.ts +38 -0
  148. package/src/native/button.ios.ts +14 -0
  149. package/src/native/flex-children.ts +12 -0
  150. package/src/native/flex-layout.android.ts +12 -1
  151. package/src/native/flex-layout.ios.ts +76 -1
  152. package/src/native/keyboard-dismiss.android.ts +17 -0
  153. package/src/native/keyboard-dismiss.ios.ts +122 -0
  154. package/src/native/keyboard-dismiss.ts +14 -0
  155. package/src/native/label.ios.ts +14 -0
  156. package/src/native/measure-memo.ts +116 -0
  157. package/src/native/screen.android.ts +12 -0
  158. package/src/native/screen.ts +2 -0
  159. package/src/native/sheet.android.ts +24 -0
  160. package/src/native/sheet.ios.ts +43 -0
  161. package/src/native/sheet.ts +26 -0
  162. package/src/vue/components/MButton.ts +32 -5
  163. package/src/vue/components/MIcon.ts +41 -0
  164. package/src/vue/components/MInput.ts +27 -4
  165. package/src/vue/components/MReveal.ts +1 -1
  166. package/src/vue/components/MScreen.ts +79 -6
  167. package/src/vue/components/MSheet.ts +335 -0
  168. package/src/vue/components/MSlider.ts +1 -1
  169. package/src/vue/components/MText.ts +1 -1
  170. package/src/vue/components/layout.ts +4 -2
  171. package/src/vue/index.ts +45 -8
  172. package/src/vue/layers.ts +46 -0
  173. package/src/vue/native-view.ts +6 -0
  174. package/src/vue/props.ts +37 -12
  175. package/src/vue/system-back.ts +12 -0
@@ -0,0 +1,88 @@
1
+ import { ScrollView } from '@nativescript/core';
2
+ const editor = (view) => {
3
+ for (let current = view; current; current = current.superview) {
4
+ if (current instanceof UITextField || current instanceof UITextView)
5
+ return true;
6
+ }
7
+ return false;
8
+ };
9
+ const firstResponder = (view) => {
10
+ if (view.isFirstResponder)
11
+ return view;
12
+ const subviews = view.subviews;
13
+ for (let index = 0; index < subviews.count; index++) {
14
+ const found = firstResponder(subviews.objectAtIndex(index));
15
+ if (found)
16
+ return found;
17
+ }
18
+ return null;
19
+ };
20
+ // The recognizer only observes: it never cancels or delays the touches of the controls below
21
+ // it, and it recognizes together with the gesture recognizers of Core and Jolt. It takes a
22
+ // touch only while an editor is active and the touch is not on an editor. UIKit runs the tap
23
+ // action after the control's own action, so a control that focused another editor meanwhile
24
+ // keeps that focus.
25
+ let editing = null;
26
+ let Delegate;
27
+ let Target;
28
+ function classes() {
29
+ Delegate ??= NSObject.extend({
30
+ gestureRecognizerShouldReceiveTouch(recognizer, touch) {
31
+ editing = editor(touch.view) ? null : firstResponder(recognizer.view);
32
+ return editing !== null;
33
+ },
34
+ gestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer() {
35
+ return true;
36
+ },
37
+ }, { protocols: [UIGestureRecognizerDelegate] });
38
+ Target ??= NSObject.extend({
39
+ dismiss(recognizer) {
40
+ const current = firstResponder(recognizer.view);
41
+ if (editing && current?.isEqual(editing))
42
+ recognizer.view.endEditing(true);
43
+ editing = null;
44
+ },
45
+ }, { exposedMethods: { dismiss: { returns: interop.types.void, params: [UIGestureRecognizer] } } });
46
+ return { Delegate, Target };
47
+ }
48
+ /** A tap recognizer on the page container; the scroll view follows the drag with the keyboard. */
49
+ export function dismissKeyboardOn(container, options) {
50
+ const native = container.ios;
51
+ if (!native)
52
+ return () => { };
53
+ let recognizer;
54
+ // The recognizer keeps neither object alive for the runtime: hold both until release.
55
+ let delegate;
56
+ let target;
57
+ if (options.tap) {
58
+ const { Delegate, Target } = classes();
59
+ delegate = new Delegate();
60
+ target = new Target();
61
+ recognizer = UITapGestureRecognizer.alloc().initWithTargetAction(target, 'dismiss');
62
+ recognizer.cancelsTouchesInView = false;
63
+ recognizer.delaysTouchesEnded = false;
64
+ recognizer.delegate = delegate;
65
+ native.addGestureRecognizer(recognizer);
66
+ }
67
+ let scroll;
68
+ container.eachChildView((child) => {
69
+ if (child instanceof ScrollView)
70
+ scroll = child;
71
+ return !scroll;
72
+ });
73
+ // UIScrollViewKeyboardDismissMode: none (0) or interactive (2).
74
+ if (scroll?.ios)
75
+ scroll.ios.keyboardDismissMode = options.drag ? 2 : 0;
76
+ return () => {
77
+ if (recognizer) {
78
+ native.removeGestureRecognizer(recognizer);
79
+ recognizer.delegate = null;
80
+ }
81
+ recognizer = undefined;
82
+ delegate = undefined;
83
+ target = undefined;
84
+ if (scroll?.ios)
85
+ scroll.ios.keyboardDismissMode = 0;
86
+ };
87
+ }
88
+ //# sourceMappingURL=keyboard-dismiss.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-dismiss.ios.js","sourceRoot":"","sources":["../../src/native/keyboard-dismiss.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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,UAAU,CAAC,kBAAkB,GAAG,KAAK,CAAA;QACrC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAC9B,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAA;IACzC,CAAC;IACD,IAAI,MAA8B,CAAA;IAClC,SAAS,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE;QAChC,IAAI,KAAK,YAAY,UAAU;YAAE,MAAM,GAAG,KAAK,CAAA;QAC/C,OAAO,CAAC,MAAM,CAAA;IAChB,CAAC,CAAC,CAAA;IACF,gEAAgE;IAChE,IAAI,MAAM,EAAE,GAAG;QAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACtE,OAAO,GAAG,EAAE;QACV,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAA;YAC1C,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAA;QAC5B,CAAC;QACD,UAAU,GAAG,SAAS,CAAA;QACtB,QAAQ,GAAG,SAAS,CAAA;QACpB,MAAM,GAAG,SAAS,CAAA;QAClB,IAAI,MAAM,EAAE,GAAG;YAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,GAAG,CAAC,CAAA;IACrD,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ // NativeScript resolves the platform implementation before loading this module.
2
+ /** Puts the software keyboard away for the given gestures until the returned function runs. */
3
+ export function dismissKeyboardOn(_container, _options) {
4
+ return () => { };
5
+ }
6
+ //# sourceMappingURL=keyboard-dismiss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-dismiss.js","sourceRoot":"","sources":["../../src/native/keyboard-dismiss.ts"],"names":[],"mappings":"AASA,gFAAgF;AAChF,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,UAAgB,EAAE,QAA2B;IAC7E,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;AACjB,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import { Label } from '@nativescript/core';
2
+ import { type MeasureRecord } from './measure-memo';
2
3
  export declare class MavisLabel extends Label {
4
+ measureRecord?: MeasureRecord;
5
+ measure(widthSpec: number, heightSpec: number): void;
6
+ requestLayout(): void;
3
7
  disposeNativeView(): void;
4
8
  _requestLayoutOnTextChanged(): void;
5
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"label.ios.d.ts","sourceRoot":"","sources":["../../src/native/label.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAS,MAAM,oBAAoB,CAAA;AAEjD,qBAAa,UAAW,SAAQ,KAAK;IACnC,iBAAiB;IAQjB,2BAA2B;CAI5B"}
1
+ {"version":3,"file":"label.ios.d.ts","sourceRoot":"","sources":["../../src/native/label.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAS,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAuC,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAExF,qBAAa,UAAW,SAAQ,KAAK;IACnC,aAAa,CAAC,EAAE,aAAa,CAAA;IAE7B,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAM7C,aAAa;IAKb,iBAAiB;IAQjB,2BAA2B;CAI5B"}
@@ -1,5 +1,17 @@
1
1
  import { Label, Utils } from '@nativescript/core';
2
+ import { recordMeasurement, reuseMeasurement } from './measure-memo';
2
3
  export class MavisLabel extends Label {
4
+ measureRecord;
5
+ measure(widthSpec, heightSpec) {
6
+ if (reuseMeasurement(this, widthSpec, heightSpec))
7
+ return;
8
+ super.measure(widthSpec, heightSpec);
9
+ recordMeasurement(this, widthSpec, heightSpec);
10
+ }
11
+ requestLayout() {
12
+ this.measureRecord = undefined;
13
+ super.requestLayout();
14
+ }
3
15
  disposeNativeView() {
4
16
  const native = this.nativeViewProtected;
5
17
  super.disposeNativeView();
@@ -1 +1 @@
1
- {"version":3,"file":"label.ios.js","sourceRoot":"","sources":["../../src/native/label.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,iBAAiB;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAA;QACvC,KAAK,CAAC,iBAAiB,EAAE,CAAA;QACzB,0EAA0E;QAC1E,4EAA4E;QAC5E,IAAI,MAAM;YAAE,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,2BAA2B;QACzB,+EAA+E;QAC/E,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;CACF"}
1
+ {"version":3,"file":"label.ios.js","sourceRoot":"","sources":["../../src/native/label.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAsB,MAAM,gBAAgB,CAAA;AAExF,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,aAAa,CAAgB;IAE7B,OAAO,CAAC,SAAiB,EAAE,UAAkB;QAC3C,IAAI,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC;YAAE,OAAM;QACzD,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QACpC,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;IAChD,CAAC;IAED,aAAa;QACX,IAAI,CAAC,aAAa,GAAG,SAAS,CAAA;QAC9B,KAAK,CAAC,aAAa,EAAE,CAAA;IACvB,CAAC;IAED,iBAAiB;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAA;QACvC,KAAK,CAAC,iBAAiB,EAAE,CAAA;QACzB,0EAA0E;QAC1E,4EAA4E;QAC5E,IAAI,MAAM;YAAE,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,2BAA2B;QACzB,+EAA+E;QAC/E,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ import { type View } from '@nativescript/core';
2
+ interface ChildRecord {
3
+ view: View;
4
+ widthSpec: number;
5
+ heightSpec: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface MeasureRecord {
10
+ widthSpec: number;
11
+ heightSpec: number;
12
+ width: number;
13
+ height: number;
14
+ percent: boolean;
15
+ /** The looser request clamped content that wanted more room; an exact size would shrink it. */
16
+ clamped: boolean;
17
+ children: ChildRecord[];
18
+ }
19
+ export interface Memoized extends View {
20
+ measureRecord?: MeasureRecord;
21
+ }
22
+ /** Whether a looser request on either axis returned its whole limit; for layouts that cannot tell. */
23
+ export declare function filledLimit(widthSpec: number, heightSpec: number, width: number, height: number): boolean;
24
+ /**
25
+ * Core measures a view again whenever its parent asks while a layout request is pending, and
26
+ * flex containers ask several times per pass, so nested containers measure their leaves an
27
+ * exponential number of times. While nothing in the subtree asked for layout, the recorded
28
+ * measurement answers a repeated request and the children are measured again from their records.
29
+ */
30
+ export declare function reuseMeasurement(view: Memoized, widthSpec: number, heightSpec: number): boolean;
31
+ /** Stores the measurement that just completed with the specs every child last received. */
32
+ export declare function recordMeasurement(view: Memoized, widthSpec: number, heightSpec: number, children?: readonly View[], clamped?: boolean): void;
33
+ export declare function layoutChildren(view: {
34
+ eachLayoutChild(callback: (child: View) => void): void;
35
+ }): View[];
36
+ export {};
37
+ //# sourceMappingURL=measure-memo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-memo.d.ts","sourceRoot":"","sources":["../../src/native/measure-memo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAIrD,UAAU,WAAW;IACnB,IAAI,EAAE,IAAI,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB;AASD,MAAM,WAAW,QAAS,SAAQ,IAAI;IACpC,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAkBD,sGAAsG;AACtG,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAK/F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAerF;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,SAAS,IAAI,EAAO,EAC9B,OAAO,UAAQ,QAqBhB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,eAAe,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI,CAAA;CAAE,UAM9F"}
@@ -0,0 +1,82 @@
1
+ import { Utils } from '@nativescript/core';
2
+ const { layout } = Utils;
3
+ const isPercent = (value) => typeof value === 'object' && value !== null && value.unit === '%';
4
+ // An exact request for the size a looser request produced is the same measurement, unless a
5
+ // child resolves a percentage against the request itself or the looser request clamped content
6
+ // that wanted more room: an exact size would then shrink the children instead. Core keeps the
7
+ // too-small state only for widths, so layouts report clamping themselves.
8
+ function matches(spec, record, recordedSpec, sizeAndState) {
9
+ if (spec === recordedSpec)
10
+ return true;
11
+ if (record.percent || record.clamped)
12
+ return false;
13
+ if (layout.getMeasureSpecMode(spec) !== layout.EXACTLY)
14
+ return false;
15
+ if (layout.getMeasureSpecMode(recordedSpec) === layout.EXACTLY)
16
+ return false;
17
+ if (sizeAndState & layout.MEASURED_STATE_TOO_SMALL)
18
+ return false;
19
+ return layout.getMeasureSpecSize(spec) === (sizeAndState & layout.MEASURED_SIZE_MASK);
20
+ }
21
+ /** Whether a looser request on either axis returned its whole limit; for layouts that cannot tell. */
22
+ export function filledLimit(widthSpec, heightSpec, width, height) {
23
+ const filled = (spec, size) => layout.getMeasureSpecMode(spec) === layout.AT_MOST &&
24
+ (size & layout.MEASURED_SIZE_MASK) >= layout.getMeasureSpecSize(spec);
25
+ return filled(widthSpec, width) || filled(heightSpec, height);
26
+ }
27
+ /**
28
+ * Core measures a view again whenever its parent asks while a layout request is pending, and
29
+ * flex containers ask several times per pass, so nested containers measure their leaves an
30
+ * exponential number of times. While nothing in the subtree asked for layout, the recorded
31
+ * measurement answers a repeated request and the children are measured again from their records.
32
+ */
33
+ export function reuseMeasurement(view, widthSpec, heightSpec) {
34
+ const record = view.measureRecord;
35
+ const internals = view;
36
+ if (!record || !internals.isLayoutRequested)
37
+ return false;
38
+ if (!matches(widthSpec, record, record.widthSpec, record.width))
39
+ return false;
40
+ if (!matches(heightSpec, record, record.heightSpec, record.height))
41
+ return false;
42
+ internals._setCurrentMeasureSpecs(widthSpec, heightSpec);
43
+ for (const child of record.children) {
44
+ const current = child.view;
45
+ // A child still holding the recorded result was measured by this record's pass.
46
+ if (current._measuredWidth === child.width && current._measuredHeight === child.height)
47
+ continue;
48
+ child.view.measure(child.widthSpec, child.heightSpec);
49
+ }
50
+ view.setMeasuredDimension(record.width, record.height);
51
+ return true;
52
+ }
53
+ /** Stores the measurement that just completed with the specs every child last received. */
54
+ export function recordMeasurement(view, widthSpec, heightSpec, children = [], clamped = false) {
55
+ const internals = view;
56
+ view.measureRecord = {
57
+ widthSpec,
58
+ heightSpec,
59
+ width: internals._measuredWidth,
60
+ height: internals._measuredHeight,
61
+ percent: children.some((child) => isPercent(child.width) || isPercent(child.height)),
62
+ clamped,
63
+ children: children.map((child) => {
64
+ const specs = child;
65
+ return {
66
+ view: child,
67
+ widthSpec: specs._currentWidthMeasureSpec,
68
+ heightSpec: specs._currentHeightMeasureSpec,
69
+ width: specs._measuredWidth,
70
+ height: specs._measuredHeight,
71
+ };
72
+ }),
73
+ };
74
+ }
75
+ export function layoutChildren(view) {
76
+ const children = [];
77
+ view.eachLayoutChild((child) => {
78
+ children.push(child);
79
+ });
80
+ return children;
81
+ }
82
+ //# sourceMappingURL=measure-memo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-memo.js","sourceRoot":"","sources":["../../src/native/measure-memo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAa,MAAM,oBAAoB,CAAA;AAErD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;AA+BxB,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CACnC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAA2B,CAAC,IAAI,KAAK,GAAG,CAAA;AAE1F,4FAA4F;AAC5F,+FAA+F;AAC/F,8FAA8F;AAC9F,0EAA0E;AAC1E,SAAS,OAAO,CAAC,IAAY,EAAE,MAAqB,EAAE,YAAoB,EAAE,YAAoB;IAC9F,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,IAAI,CAAA;IACtC,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAClD,IAAI,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,OAAO;QAAE,OAAO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AK,CAAC,cAAc;gBAC3B,MAAM,EAAE,KAAK,CAAC,eAAe;aAC9B,CAAA;QACH,CAAC,CAAC;KACH,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAgE;IAC7F,MAAM,QAAQ,GAAW,EAAE,CAAA;IAC3B,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,EAAE;QAC7B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { GridLayout } from '@nativescript/core';
2
+ /** The page container sees every touch of the page and can put the keyboard away. */
3
+ export declare class MavisScreen extends GridLayout {
4
+ createNativeView(): object;
5
+ }
6
+ //# sourceMappingURL=screen.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.android.d.ts","sourceRoot":"","sources":["../../src/native/screen.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAM/C,qFAAqF;AACrF,qBAAa,WAAY,SAAQ,UAAU;IACzC,gBAAgB;CAGjB"}
@@ -0,0 +1,8 @@
1
+ import { GridLayout } from '@nativescript/core';
2
+ /** The page container sees every touch of the page and can put the keyboard away. */
3
+ export class MavisScreen extends GridLayout {
4
+ createNativeView() {
5
+ return new com.mavis.ui.Screen(this._context);
6
+ }
7
+ }
8
+ //# sourceMappingURL=screen.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.android.js","sourceRoot":"","sources":["../../src/native/screen.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAM/C,qFAAqF;AACrF,MAAM,OAAO,WAAY,SAAQ,UAAU;IACzC,gBAAgB;QACd,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC/C,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { GridLayout as MavisScreen } from '@nativescript/core';
2
+ //# sourceMappingURL=screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/native/screen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // NativeScript resolves the platform implementation before loading this module.
2
+ export { GridLayout as MavisScreen } from '@nativescript/core';
3
+ //# sourceMappingURL=screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.js","sourceRoot":"","sources":["../../src/native/screen.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { type View } from '@nativescript/core';
2
+ export interface BackPress {
3
+ cancel: boolean;
4
+ }
5
+ export declare function watchBack(handler: (event: BackPress) => void): () => void;
6
+ export declare function setModal(_panel: View, _modal: boolean): void;
7
+ /** The Android window keeps the page inside the system bars, so the host needs no insets. */
8
+ export declare function safeAreaOf(_host: View): {
9
+ readonly top: number;
10
+ readonly bottom: number;
11
+ };
12
+ export declare function expandLayerHost(_host: View): void;
13
+ export declare function bottomInset(_host: View): number;
14
+ //# sourceMappingURL=sheet.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.android.d.ts","sourceRoot":"","sources":["../../src/native/sheet.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE3D,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAIzE;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,QAAI;AAE1D,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAEzF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,QAAI;AAE/C,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAE/C"}
@@ -0,0 +1,16 @@
1
+ import { Application } from '@nativescript/core';
2
+ export function watchBack(handler) {
3
+ const event = Application.android.activityBackPressedEvent;
4
+ Application.android.on(event, handler);
5
+ return () => Application.android.off(event, handler);
6
+ }
7
+ export function setModal(_panel, _modal) { }
8
+ /** The Android window keeps the page inside the system bars, so the host needs no insets. */
9
+ export function safeAreaOf(_host) {
10
+ return { top: 0, bottom: 0 };
11
+ }
12
+ export function expandLayerHost(_host) { }
13
+ export function bottomInset(_host) {
14
+ return 0;
15
+ }
16
+ //# sourceMappingURL=sheet.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.android.js","sourceRoot":"","sources":["../../src/native/sheet.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAa,MAAM,oBAAoB,CAAA;AAM3D,MAAM,UAAU,SAAS,CAAC,OAAmC;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAA;IAC1D,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IACtC,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,MAAY,EAAE,MAAe,IAAG,CAAC;AAE1D,6FAA6F;AAC7F,MAAM,UAAU,UAAU,CAAC,KAAW;IACpC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAW,IAAG,CAAC;AAE/C,MAAM,UAAU,WAAW,CAAC,KAAW;IACrC,OAAO,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { View } from '@nativescript/core';
2
+ export interface BackPress {
3
+ cancel: boolean;
4
+ }
5
+ /** Android reports the back press before the sheet handles it; other platforms have none. */
6
+ export declare function watchBack(_handler: (event: BackPress) => void): () => void;
7
+ /** iOS keeps VoiceOver inside a modal view; Android hides the covered content instead. */
8
+ export declare function setModal(_panel: View, _modal: boolean): void;
9
+ /** Safe-area insets around the sheet host, in DIPs; only iOS reports them. */
10
+ export declare function safeAreaOf(_host: View): {
11
+ readonly top: number;
12
+ readonly bottom: number;
13
+ };
14
+ /** Lets the layer host cover the whole window; only iOS insets it by default. */
15
+ export declare function expandLayerHost(_host: View): void;
16
+ export declare function bottomInset(_host: View): number;
17
+ //# sourceMappingURL=sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/native/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAA;CAChB;AAGD,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAE1E;AAED,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,QAAI;AAE1D,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAEzF;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,QAAI;AAE/C,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAE/C"}
@@ -0,0 +1,15 @@
1
+ import type { View } from '@nativescript/core';
2
+ export interface BackPress {
3
+ cancel: boolean;
4
+ }
5
+ export declare function watchBack(_handler: (event: BackPress) => void): () => void;
6
+ export declare function setModal(panel: View, modal: boolean): void;
7
+ /** The page lays its content inside the safe area; the host grows back over it with negative margins. */
8
+ export declare function expandLayerHost(host: View): void;
9
+ /** Keeps the panel below the status bar; the panel itself pads its content above the home indicator. */
10
+ export declare function safeAreaOf(host: View): {
11
+ readonly top: number;
12
+ readonly bottom: number;
13
+ };
14
+ export declare function bottomInset(host: View): number;
15
+ //# sourceMappingURL=sheet.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.ios.d.ts","sourceRoot":"","sources":["../../src/native/sheet.ios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAE1E;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,QAGnD;AASD,yGAAyG;AACzG,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,QAKzC;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAOxF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE9C"}
@@ -0,0 +1,32 @@
1
+ export function watchBack(_handler) {
2
+ return () => { };
3
+ }
4
+ export function setModal(panel, modal) {
5
+ const native = panel.ios;
6
+ if (native)
7
+ native.accessibilityViewIsModal = modal;
8
+ }
9
+ const windowInsets = (view) => view.page?.ios?.safeAreaInsets;
10
+ /** The page lays its content inside the safe area; the host grows back over it with negative margins. */
11
+ export function expandLayerHost(host) {
12
+ const insets = windowInsets(host);
13
+ if (!insets)
14
+ return;
15
+ if (host.marginTop !== -insets.top)
16
+ host.marginTop = -insets.top;
17
+ if (host.marginBottom !== -insets.bottom)
18
+ host.marginBottom = -insets.bottom;
19
+ }
20
+ /** Keeps the panel below the status bar; the panel itself pads its content above the home indicator. */
21
+ export function safeAreaOf(host) {
22
+ return {
23
+ get top() {
24
+ return windowInsets(host)?.top ?? 0;
25
+ },
26
+ bottom: 0,
27
+ };
28
+ }
29
+ export function bottomInset(host) {
30
+ return windowInsets(host)?.bottom ?? 0;
31
+ }
32
+ //# sourceMappingURL=sheet.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.ios.js","sourceRoot":"","sources":["../../src/native/sheet.ios.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,SAAS,CAAC,QAAoC;IAC5D,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAW,EAAE,KAAc;IAClD,MAAM,MAAM,GAAG,KAAK,CAAC,GAAwD,CAAA;IAC7E,IAAI,MAAM;QAAE,MAAM,CAAC,wBAAwB,GAAG,KAAK,CAAA;AACrD,CAAC;AAMD,MAAM,YAAY,GAAG,CAAC,IAAU,EAAsB,EAAE,CACrD,IAAI,CAAC,IAAI,EAAE,GAA+C,EAAE,cAAc,CAAA;AAE7E,yGAAyG;AACzG,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IACjC,IAAI,CAAC,MAAM;QAAE,OAAM;IACnB,IAAI,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,GAAG;QAAE,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,GAAG,CAAA;IAChE,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,MAAM,CAAC,MAAM;QAAE,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,MAAM,CAAA;AAC9E,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO;QACL,IAAI,GAAG;YACL,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAA;QACrC,CAAC;QACD,MAAM,EAAE,CAAC;KACV,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAU;IACpC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAA;AACxC,CAAC"}
@@ -0,0 +1,17 @@
1
+ // NativeScript resolves the platform implementation before loading this module.
2
+ /** Android reports the back press before the sheet handles it; other platforms have none. */
3
+ export function watchBack(_handler) {
4
+ return () => { };
5
+ }
6
+ /** iOS keeps VoiceOver inside a modal view; Android hides the covered content instead. */
7
+ export function setModal(_panel, _modal) { }
8
+ /** Safe-area insets around the sheet host, in DIPs; only iOS reports them. */
9
+ export function safeAreaOf(_host) {
10
+ return { top: 0, bottom: 0 };
11
+ }
12
+ /** Lets the layer host cover the whole window; only iOS insets it by default. */
13
+ export function expandLayerHost(_host) { }
14
+ export function bottomInset(_host) {
15
+ return 0;
16
+ }
17
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../src/native/sheet.ts"],"names":[],"mappings":"AAMA,gFAAgF;AAChF,6FAA6F;AAC7F,MAAM,UAAU,SAAS,CAAC,QAAoC;IAC5D,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;AACjB,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,QAAQ,CAAC,MAAY,EAAE,MAAe,IAAG,CAAC;AAE1D,8EAA8E;AAC9E,MAAM,UAAU,UAAU,CAAC,KAAW;IACpC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAA;AAC9B,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,eAAe,CAAC,KAAW,IAAG,CAAC;AAE/C,MAAM,UAAU,WAAW,CAAC,KAAW;IACrC,OAAO,CAAC,CAAA;AACV,CAAC"}