aptechka 0.1.19 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/lib/ElementConstructor-1bvPqYNa.js +313 -0
  2. package/lib/ElementConstructor-CdUaQS-S.cjs +1 -0
  3. package/lib/abstract-elements/index.cjs +1 -1
  4. package/lib/abstract-elements/index.js +1 -1
  5. package/lib/accordion/index.cjs +1 -1
  6. package/lib/accordion/index.js +9 -11
  7. package/lib/canvas/index.cjs +1 -1
  8. package/lib/canvas/index.js +2 -2
  9. package/lib/{createStylesheet-DTOK6fTn.cjs → createStylesheet-B5Nhxdpo.cjs} +1 -1
  10. package/lib/{createStylesheet-Zqf3lXhM.js → createStylesheet-DpGvTRP3.js} +1 -1
  11. package/lib/{createTheme-B_W5dUY9.cjs → createTheme-CLqJF9Pw.cjs} +1 -1
  12. package/lib/{createTheme-D0IoYkYN.js → createTheme-WJyOPh-q.js} +1 -1
  13. package/lib/element-constructor/index.cjs +1 -1
  14. package/lib/element-constructor/index.js +114 -113
  15. package/lib/getComponentElement-B0Qb2RbZ.js +145 -0
  16. package/lib/getComponentElement-BcreYwFe.cjs +1 -0
  17. package/lib/{index-B-ZmkQyB.cjs → index-BNZNGmrW.cjs} +1 -1
  18. package/lib/{index-Dizn7btU.js → index-DMIfOO2r.js} +2 -2
  19. package/lib/jsx/ComponentElement.d.ts +27 -0
  20. package/lib/jsx/getComponentElement.d.ts +2 -0
  21. package/lib/jsx/h.d.ts +3 -0
  22. package/lib/jsx/hooks/useConnect.d.ts +2 -0
  23. package/lib/jsx/hooks/useContext.d.ts +3 -0
  24. package/lib/jsx/hooks/useCreate.d.ts +2 -0
  25. package/lib/jsx/hooks/useDisconnect.d.ts +2 -0
  26. package/lib/jsx/hooks/useInternals.d.ts +1 -0
  27. package/lib/jsx/hooks/useShadow.d.ts +1 -0
  28. package/lib/jsx/hooks/useStore.d.ts +6 -0
  29. package/lib/jsx/hooks/useStylesheet.d.ts +2 -0
  30. package/lib/jsx/index.cjs +1 -0
  31. package/lib/jsx/index.d.ts +12 -0
  32. package/lib/jsx/index.js +99 -0
  33. package/lib/jsx/render.d.ts +1 -0
  34. package/lib/jsx/type.d.ts +184 -0
  35. package/lib/modal/index.cjs +1 -1
  36. package/lib/modal/index.js +2 -2
  37. package/lib/router/Route.d.ts +1 -1
  38. package/lib/router/index.cjs +1 -1
  39. package/lib/router/index.js +80 -78
  40. package/lib/scroll/index.cjs +1 -1
  41. package/lib/scroll/index.js +2 -2
  42. package/lib/select/index.cjs +1 -1
  43. package/lib/select/index.js +1 -1
  44. package/lib/store/index.cjs +1 -1
  45. package/lib/store/index.js +111 -48
  46. package/lib/string-Cgp_uJvP.cjs +1 -0
  47. package/lib/string-DCGBU6em.js +134 -0
  48. package/lib/studio/index.cjs +1 -1
  49. package/lib/studio/index.js +14 -14
  50. package/lib/tags-D0k7-iVY.js +485 -0
  51. package/lib/tags-DGIuh1Hi.cjs +1 -0
  52. package/lib/theme/index.cjs +1 -1
  53. package/lib/theme/index.js +2 -2
  54. package/lib/utils/dom.d.ts +1 -1
  55. package/lib/utils/index.cjs +1 -1
  56. package/lib/utils/index.js +27 -28
  57. package/package.json +15 -6
  58. package/lib/Composed-ClTo1f0b.js +0 -79
  59. package/lib/Composed-Mdr4ZFbI.cjs +0 -1
  60. package/lib/component/Component.d.ts +0 -26
  61. package/lib/component/hooks/animation.d.ts +0 -9
  62. package/lib/component/hooks/attributes.d.ts +0 -2
  63. package/lib/component/hooks/custom-element.d.ts +0 -2
  64. package/lib/component/hooks/intersection.d.ts +0 -4
  65. package/lib/component/hooks/resize.d.ts +0 -6
  66. package/lib/component/hooks/stores.d.ts +0 -6
  67. package/lib/component/hooks/style.d.ts +0 -2
  68. package/lib/component/index.cjs +0 -1
  69. package/lib/component/index.d.ts +0 -8
  70. package/lib/component/index.js +0 -219
  71. package/lib/object-BZELAoVj.cjs +0 -1
  72. package/lib/object-R34VLqhp.js +0 -85
  73. package/lib/string-3lAkpJJP.js +0 -51
  74. package/lib/string-vBu90jhV.cjs +0 -1
  75. package/lib/tags-75InVOh4.cjs +0 -1
  76. package/lib/tags-DgRVzazL.js +0 -795
@@ -0,0 +1,184 @@
1
+ import type { ElementConstructor, ElementConstructorClass, ElementConstructorEventMap, ElementConstructorStyle, ElementConstructorTagNames } from '../element-constructor';
2
+ import type { Store } from '../store';
3
+ import type { Split } from '../utils';
4
+ type StoreOr<T> = T | Store<T | null | undefined>;
5
+ declare global {
6
+ namespace JSX {
7
+ type ComponentChild = Node | string | number | boolean | undefined | null | void | Store<any, any, any> | ElementConstructor;
8
+ type ComponentChildren = Array<ComponentChild>;
9
+ interface BaseProps {
10
+ children?: Array<ComponentChild>;
11
+ }
12
+ type Component<TProps extends object = object> = {
13
+ formAssociated?: boolean;
14
+ (props: BaseProps & TProps): ComponentChild;
15
+ };
16
+ type HTMLOrSVGEvents = Partial<{
17
+ [K in `on${Capitalize<keyof ElementConstructorEventMap>}`]: (event: ElementConstructorEventMap[Extract<Uncapitalize<Split<K, 'on'>[1]>, keyof ElementConstructorEventMap>]) => void;
18
+ }>;
19
+ interface DOMAttributes {
20
+ ref?: {
21
+ current: any;
22
+ };
23
+ }
24
+ interface HTMLAttributes extends DOMAttributes {
25
+ accept?: StoreOr<string>;
26
+ acceptCharset?: StoreOr<string>;
27
+ accessKey?: StoreOr<string>;
28
+ action?: StoreOr<string>;
29
+ allowFullScreen?: StoreOr<boolean>;
30
+ allowTransparency?: StoreOr<boolean>;
31
+ alt?: StoreOr<string>;
32
+ as?: StoreOr<string>;
33
+ async?: StoreOr<boolean>;
34
+ autocomplete?: StoreOr<string>;
35
+ autoComplete?: StoreOr<string>;
36
+ autocorrect?: StoreOr<string>;
37
+ autoCorrect?: StoreOr<string>;
38
+ autofocus?: StoreOr<boolean>;
39
+ autoFocus?: StoreOr<boolean>;
40
+ autoPlay?: StoreOr<boolean>;
41
+ capture?: StoreOr<boolean | string>;
42
+ cellPadding?: StoreOr<number | string>;
43
+ cellSpacing?: StoreOr<number | string>;
44
+ charSet?: StoreOr<string>;
45
+ challenge?: StoreOr<string>;
46
+ checked?: StoreOr<boolean>;
47
+ class?: ElementConstructorClass;
48
+ cols?: StoreOr<number>;
49
+ colSpan?: StoreOr<number>;
50
+ content?: StoreOr<string>;
51
+ contentEditable?: StoreOr<boolean>;
52
+ contextMenu?: StoreOr<string>;
53
+ controls?: StoreOr<boolean>;
54
+ controlsList?: StoreOr<string>;
55
+ coords?: StoreOr<string>;
56
+ crossOrigin?: StoreOr<string>;
57
+ data?: StoreOr<string>;
58
+ dateTime?: StoreOr<string>;
59
+ default?: StoreOr<boolean>;
60
+ defer?: StoreOr<boolean>;
61
+ dir?: StoreOr<'auto' | 'rtl' | 'ltr'>;
62
+ disabled?: StoreOr<boolean>;
63
+ disableRemotePlayback?: StoreOr<boolean>;
64
+ download?: StoreOr<string>;
65
+ draggable?: StoreOr<boolean>;
66
+ encType?: StoreOr<string>;
67
+ form?: StoreOr<string>;
68
+ formAction?: StoreOr<string>;
69
+ formEncType?: StoreOr<string>;
70
+ formMethod?: StoreOr<string>;
71
+ formNoValidate?: StoreOr<boolean>;
72
+ formTarget?: StoreOr<string>;
73
+ frameBorder?: StoreOr<number | string>;
74
+ headers?: StoreOr<string>;
75
+ height?: StoreOr<number | string>;
76
+ hidden?: StoreOr<boolean>;
77
+ high?: StoreOr<number>;
78
+ href?: StoreOr<string>;
79
+ hrefLang?: StoreOr<string>;
80
+ for?: StoreOr<string>;
81
+ htmlFor?: StoreOr<string>;
82
+ httpEquiv?: StoreOr<string>;
83
+ icon?: StoreOr<string>;
84
+ id?: StoreOr<string>;
85
+ inputMode?: StoreOr<string>;
86
+ integrity?: StoreOr<string>;
87
+ is?: StoreOr<string>;
88
+ keyParams?: StoreOr<string>;
89
+ keyType?: StoreOr<string>;
90
+ kind?: StoreOr<string>;
91
+ label?: StoreOr<string>;
92
+ lang?: StoreOr<string>;
93
+ list?: StoreOr<string>;
94
+ loading?: StoreOr<'eager' | 'lazy'>;
95
+ loop?: StoreOr<boolean>;
96
+ low?: StoreOr<number>;
97
+ manifest?: StoreOr<string>;
98
+ marginHeight?: StoreOr<number>;
99
+ marginWidth?: StoreOr<number>;
100
+ max?: StoreOr<number | string>;
101
+ maxLength?: StoreOr<number>;
102
+ media?: StoreOr<string>;
103
+ mediaGroup?: StoreOr<string>;
104
+ method?: StoreOr<string>;
105
+ min?: StoreOr<number | string>;
106
+ minLength?: StoreOr<number>;
107
+ multiple?: StoreOr<boolean>;
108
+ muted?: StoreOr<boolean>;
109
+ name?: StoreOr<string>;
110
+ nonce?: StoreOr<string>;
111
+ noValidate?: StoreOr<boolean>;
112
+ open?: StoreOr<boolean>;
113
+ optimum?: StoreOr<number>;
114
+ pattern?: StoreOr<string>;
115
+ placeholder?: StoreOr<string>;
116
+ playsInline?: StoreOr<boolean>;
117
+ poster?: StoreOr<string>;
118
+ preload?: StoreOr<string>;
119
+ radioGroup?: StoreOr<string>;
120
+ readOnly?: StoreOr<boolean>;
121
+ rel?: StoreOr<string>;
122
+ required?: StoreOr<boolean>;
123
+ role?: StoreOr<string>;
124
+ rows?: StoreOr<number>;
125
+ rowSpan?: StoreOr<number>;
126
+ sandbox?: StoreOr<string>;
127
+ scope?: StoreOr<string>;
128
+ scoped?: StoreOr<boolean>;
129
+ scrolling?: StoreOr<string>;
130
+ seamless?: StoreOr<boolean>;
131
+ selected?: StoreOr<boolean>;
132
+ shape?: StoreOr<string>;
133
+ size?: StoreOr<number>;
134
+ sizes?: StoreOr<string>;
135
+ slot?: StoreOr<string>;
136
+ span?: StoreOr<number>;
137
+ spellcheck?: StoreOr<boolean>;
138
+ src?: StoreOr<string>;
139
+ srcset?: StoreOr<string>;
140
+ srcDoc?: StoreOr<string>;
141
+ srcLang?: StoreOr<string>;
142
+ srcSet?: StoreOr<string>;
143
+ start?: StoreOr<number>;
144
+ step?: StoreOr<number | string>;
145
+ style?: ElementConstructorStyle;
146
+ summary?: StoreOr<string>;
147
+ tabIndex?: StoreOr<number>;
148
+ target?: StoreOr<string>;
149
+ title?: StoreOr<string>;
150
+ type?: StoreOr<string>;
151
+ useMap?: StoreOr<string>;
152
+ value?: StoreOr<string | string[] | number>;
153
+ volume?: StoreOr<string | number>;
154
+ width?: StoreOr<number | string>;
155
+ wmode?: StoreOr<string>;
156
+ wrap?: StoreOr<string>;
157
+ about?: StoreOr<string>;
158
+ datatype?: StoreOr<string>;
159
+ inlist?: StoreOr<boolean>;
160
+ prefix?: StoreOr<string>;
161
+ property?: StoreOr<string>;
162
+ resource?: StoreOr<string>;
163
+ typeof?: StoreOr<string>;
164
+ vocab?: StoreOr<string>;
165
+ itemProp?: StoreOr<string>;
166
+ itemScope?: StoreOr<boolean>;
167
+ itemType?: StoreOr<string>;
168
+ itemID?: StoreOr<string>;
169
+ itemRef?: StoreOr<string>;
170
+ shadow?: boolean;
171
+ forceSvg?: boolean;
172
+ }
173
+ type UnknownAttributes = {
174
+ [key: string]: any;
175
+ };
176
+ type AllAttributes = UnknownAttributes & HTMLAttributes & HTMLOrSVGEvents;
177
+ type SpecialTagNames = 'component';
178
+ type IntrinsicElementsHTML = {
179
+ [TKey in ElementConstructorTagNames | SpecialTagNames]?: AllAttributes;
180
+ };
181
+ type IntrinsicElements = IntrinsicElementsHTML;
182
+ }
183
+ }
184
+ export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-75InVOh4.cjs"),m=require("../createStylesheet-DTOK6fTn.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",top:"var(---close-button-top, 0.5em)",right:"var(---close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(---close-button-size, 1.5em)",height:"var(---close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(---close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",children:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-DGIuh1Hi.cjs"),m=require("../createStylesheet-B5Nhxdpo.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",top:"var(---close-button-top, 0.5em)",right:"var(---close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(---close-button-size, 1.5em)",height:"var(---close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(---close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",children:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
@@ -1,8 +1,8 @@
1
1
  import { define as g } from "../custom-element/index.js";
2
2
  import "../Store-JOKrNVEr.js";
3
3
  import { i as w } from "../browser-0zX67oeU.js";
4
- import { e as d, D as f, ay as u, aB as _ } from "../tags-DgRVzazL.js";
5
- import { c as y } from "../createStylesheet-Zqf3lXhM.js";
4
+ import { e as d, D as f, ax as u, aA as _ } from "../tags-D0k7-iVY.js";
5
+ import { c as y } from "../createStylesheet-DpGvTRP3.js";
6
6
  import { PopoverElement as C } from "../popover/index.js";
7
7
  import { aptechkaTheme as h } from "../theme/index.js";
8
8
  var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
@@ -13,7 +13,7 @@ export declare class Route {
13
13
  get urlPattern(): URLPattern;
14
14
  get isActive(): boolean;
15
15
  get element(): HTMLElement | null;
16
- get outlet(): HTMLElement | ShadowRoot | null;
16
+ get nest(): HTMLElement | ShadowRoot | null;
17
17
  testPathname(pathname: string): boolean;
18
18
  render(containerElement: HTMLElement | ShadowRoot, pathname: string): Promise<void>;
19
19
  close(): void;
@@ -1 +1 @@
1
- "use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),o=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},r=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,f)=>{var h=u=>{try{d(s.next(u))}catch(T){f(T)}},a=u=>{try{d(s.throw(u))}catch(T){f(T)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,f)=>(f=n[i])&&(t[i]=h=>new Promise((a,d,u)=>(h=f.call(n,h),u=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:u}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=require("urlpattern-polyfill"),st=require("../notifier/index.cjs"),_=require("../browser-CpzFX2xg.cjs"),it=require("../function-MthRj-GJ.cjs"),Z=require("../object-BZELAoVj.cjs");var b,O,R,m,l,v,S,p,P,y,I,$;class nt{constructor(t,s){o(this,I);o(this,b,void 0);o(this,O,void 0);o(this,R,void 0);o(this,m,void 0);o(this,l,void 0);o(this,v,void 0);o(this,S,void 0);o(this,p,null);o(this,P,[]);o(this,y,[]);r(this,b,t),r(this,O,s),r(this,R,new URLPattern({pathname:e(this,b)})),r(this,m,null),r(this,l,null),r(this,v,!1),r(this,S,null),_.isBrowser&&r(this,p,new MutationObserver(i=>{i[0].addedNodes.forEach(h=>{e(this,m)?e(this,y).push(h):e(this,P).push(h)})}))}get pattern(){return e(this,b)}get urlPattern(){return e(this,R)}get isActive(){return e(this,v)}get element(){return e(this,l)}get outlet(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return B(this,null,function*(){var i,f;if(e(this,p).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,P).forEach(h=>{document.head.appendChild(h)});else{const h=yield e(this,O).call(this);if(r(this,y,[...e(this,P)]),typeof h.default=="function"&&(r(this,m,h.default),Z.isESClass(h.default))){const a="e-"+((i=e(this,m))==null?void 0:i.name.toLowerCase());customElements.get(a)||customElements.define(a,h.default)}}if(yield F(this,I,$).call(this),e(this,m)){const h=e(this,R).exec({pathname:s}),a=(h==null?void 0:h.pathname.groups)||{},d=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:a,searchParams:d};Z.isESClass(e(this,m))?r(this,l,new(e(this,m))(u)):r(this,l,e(this,m).call(this,u)),t.appendChild(e(this,l)),r(this,S,e(this,l).querySelector("[data-outlet]")||((f=e(this,l).shadowRoot)==null?void 0:f.querySelector("[data-outlet]"))||e(this,l).shadowRoot||e(this,l)),r(this,v,!0)}e(this,p).disconnect()})}close(){var t;e(this,p).disconnect(),(t=e(this,l))==null||t.remove(),r(this,v,!1),e(this,y).forEach(s=>document.head.removeChild(s)),r(this,y,[])}getAnchorElements(){var s;let t=[];return e(this,l)&&(t=[...e(this,l).querySelectorAll("a")]),(s=e(this,l))!=null&&s.shadowRoot&&(t=[...t,...e(this,l).shadowRoot.querySelectorAll("a")]),t}}b=new WeakMap,O=new WeakMap,R=new WeakMap,m=new WeakMap,l=new WeakMap,v=new WeakMap,S=new WeakMap,p=new WeakMap,P=new WeakMap,y=new WeakMap,I=new WeakSet,$=function(){return B(this,null,function*(){const t=e(this,P).filter(a=>a instanceof HTMLElement?a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK":!1);try{for(var s=G(t),i,f,h;i=!(f=yield s.next()).done;i=!1){const a=f.value;yield new Promise(d=>{a.onload=()=>{d()}})}}catch(f){h=[f]}finally{try{i&&(f=s.return)&&(yield f.call(s))}finally{if(h)throw h[0]}}})};var H,g,A,U,j;class rt{constructor(t,s){o(this,H,void 0);o(this,g,void 0);o(this,A,void 0);o(this,U,void 0);o(this,j,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});r(this,H,t),r(this,g,s),r(this,A,e(this,g).getAttribute("href")||"/"),r(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,j)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,j)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,j=new WeakMap;globalThis.URLPattern=et.URLPattern;var k,q,w,C,M,E,N,x,D,K,tt,W;const Y=class Y{constructor(t){o(this,K);o(this,k,null);o(this,q,void 0);o(this,w,[]);o(this,C,null);o(this,M,[]);o(this,E,void 0);o(this,N,null);o(this,x,new st.Notifier);o(this,D,it.debounce(()=>{const t=s=>s.split("/").length;r(this,w,e(this,w).sort((s,i)=>t(s.pattern)-t(i.pattern))),this.navigate(location.pathname.replace(e(this,q),""))},0));o(this,W,t=>{t.state&&this.navigate(t.state,"none")});r(this,q,(t==null?void 0:t.base)||""),Y.active=this,_.isBrowser&&(r(this,k,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,W)))}get currentPathname(){return e(this,N)}get candidatePathname(){return e(this,E)}get routes(){return e(this,w)}navigationEvent(t){return e(this,x).subscribe(t)}defineRoute(t,s){const i=new nt(t,s);e(this,w).push(i),e(this,D).call(this)}navigate(t,s="push"){return B(this,null,function*(){var u,Q;if(e(this,E)===t||e(this,N)===t)return;Y.active=this,r(this,E,t);const i=e(this,w).filter(c=>c.isActive),f=e(this,w).filter(c=>!i.includes(c)&&c.testPathname(t)),h=i.filter(c=>!c.testPathname(t)),a=i.filter(c=>c.testPathname(t));let d=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var V;(V=this.preprocessor)==null||V.call(this,{pathname:t,resolve:c,reject:L})})}catch(c){c?console.error(c):console.log("Route change canceled"),d=!1}if(d&&e(this,E)===t){r(this,C,a[a.length-1]),h.forEach(L=>{L.close()}),r(this,N,t);try{for(var T=G(f),at,ct,lt;at=!(ct=yield T.next()).done;at=!1){const L=ct.value;yield L.render(((u=e(this,C))==null?void 0:u.outlet)||e(this,k),t),r(this,C,L)}}catch(ct){lt=[ct]}finally{try{at&&(ct=T.return)&&(yield ct.call(T))}finally{if(lt)throw lt[0]}}const c=e(this,q)+t+location.search;s==="push"?history.pushState(c,"",c):s==="replace"&&history.replaceState(c,"",c),F(this,K,tt).call(this),(Q=this.postprocessor)==null||Q.call(this,{pathname:t}),e(this,x).notify({pathname:t})}})}};k=new WeakMap,q=new WeakMap,w=new WeakMap,C=new WeakMap,M=new WeakMap,E=new WeakMap,N=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakSet,tt=function(){const t=e(this,w).filter(i=>i.isActive),s=Array.from(new Set([...e(this,k).querySelectorAll("a"),...t.map(i=>i.getAnchorElements()).flat()].filter(i=>{var f;return(f=i.getAttribute("href"))==null?void 0:f.startsWith("/")})));e(this,M).forEach(i=>{i.destroy()}),r(this,M,s.map(i=>new rt(this,i)))},W=new WeakMap;let J=Y;exports.Router=J;
1
+ "use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),o=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},r=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,f)=>{var h=u=>{try{d(s.next(u))}catch(T){f(T)}},a=u=>{try{d(s.throw(u))}catch(T){f(T)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,f)=>(f=n[i])&&(t[i]=h=>new Promise((a,d,u)=>(h=f.call(n,h),u=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:u}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=require("urlpattern-polyfill"),st=require("../notifier/index.cjs"),_=require("../browser-CpzFX2xg.cjs"),it=require("../function-MthRj-GJ.cjs");require("../Store-D0_rDIsE.cjs");const Z=require("../string-Cgp_uJvP.cjs"),nt=require("../getComponentElement-BcreYwFe.cjs");var b,O,R,m,l,p,S,v,E,P,I,$;class rt{constructor(t,s){o(this,I);o(this,b,void 0);o(this,O,void 0);o(this,R,void 0);o(this,m,void 0);o(this,l,void 0);o(this,p,void 0);o(this,S,void 0);o(this,v,null);o(this,E,[]);o(this,P,[]);r(this,b,t),r(this,O,s),r(this,R,new URLPattern({pathname:e(this,b)})),r(this,m,null),r(this,l,null),r(this,p,!1),r(this,S,null),_.isBrowser&&r(this,v,new MutationObserver(i=>{i[0].addedNodes.forEach(h=>{e(this,m)?e(this,P).push(h):e(this,E).push(h)})}))}get pattern(){return e(this,b)}get urlPattern(){return e(this,R)}get isActive(){return e(this,p)}get element(){return e(this,l)}get nest(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return B(this,null,function*(){var i,f;if(e(this,v).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,E).forEach(h=>{document.head.appendChild(h)});else{const h=yield e(this,O).call(this);if(r(this,P,[...e(this,E)]),typeof h.default=="function"&&(r(this,m,h.default),Z.isESClass(h.default))){const a="e-"+((i=e(this,m))==null?void 0:i.name.toLowerCase());customElements.get(a)||customElements.define(a,h.default)}}if(yield F(this,I,$).call(this),e(this,m)){const h=e(this,R).exec({pathname:s}),a=(h==null?void 0:h.pathname.groups)||{},d=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:a,searchParams:d};Z.isESClass(e(this,m))?r(this,l,new(e(this,m))(u)):r(this,l,nt.getComponentElement(e(this,m),u)),t.appendChild(e(this,l)),r(this,S,e(this,l).querySelector("[data-nest]")||((f=e(this,l).shadowRoot)==null?void 0:f.querySelector("[data-nest]"))||e(this,l).shadowRoot||e(this,l)),r(this,p,!0)}e(this,v).disconnect()})}close(){var t;e(this,v).disconnect(),(t=e(this,l))==null||t.remove(),r(this,p,!1),e(this,P).forEach(s=>document.head.removeChild(s)),r(this,P,[])}getAnchorElements(){var s;let t=[];return e(this,l)&&(t=[...e(this,l).querySelectorAll("a")]),(s=e(this,l))!=null&&s.shadowRoot&&(t=[...t,...e(this,l).shadowRoot.querySelectorAll("a")]),t}}b=new WeakMap,O=new WeakMap,R=new WeakMap,m=new WeakMap,l=new WeakMap,p=new WeakMap,S=new WeakMap,v=new WeakMap,E=new WeakMap,P=new WeakMap,I=new WeakSet,$=function(){return B(this,null,function*(){const t=e(this,E).filter(a=>a instanceof HTMLElement?a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK":!1);try{for(var s=G(t),i,f,h;i=!(f=yield s.next()).done;i=!1){const a=f.value;yield new Promise(d=>{a.onload=()=>{d()}})}}catch(f){h=[f]}finally{try{i&&(f=s.return)&&(yield f.call(s))}finally{if(h)throw h[0]}}})};var H,g,A,U,M;class ot{constructor(t,s){o(this,H,void 0);o(this,g,void 0);o(this,A,void 0);o(this,U,void 0);o(this,M,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});r(this,H,t),r(this,g,s),r(this,A,e(this,g).getAttribute("href")||"/"),r(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,M)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,M)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,M=new WeakMap;globalThis.URLPattern=et.URLPattern;var q,k,w,C,j,y,N,x,D,K,tt,W;const Y=class Y{constructor(t){o(this,K);o(this,q,null);o(this,k,void 0);o(this,w,[]);o(this,C,null);o(this,j,[]);o(this,y,void 0);o(this,N,null);o(this,x,new st.Notifier);o(this,D,it.debounce(()=>{const t=s=>s.split("/").length;r(this,w,e(this,w).sort((s,i)=>t(s.pattern)-t(i.pattern))),this.navigate(location.pathname.replace(e(this,k),""))},0));o(this,W,t=>{t.state&&this.navigate(t.state,"none")});r(this,k,(t==null?void 0:t.base)||""),Y.active=this,_.isBrowser&&(r(this,q,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,W)))}get currentPathname(){return e(this,N)}get candidatePathname(){return e(this,y)}get routes(){return e(this,w)}navigationEvent(t){return e(this,x).subscribe(t)}defineRoute(t,s){const i=new rt(t,s);e(this,w).push(i),e(this,D).call(this)}navigate(t,s="push"){return B(this,null,function*(){var u,Q;if(e(this,y)===t||e(this,N)===t)return;Y.active=this,r(this,y,t);const i=e(this,w).filter(c=>c.isActive),f=e(this,w).filter(c=>!i.includes(c)&&c.testPathname(t)),h=i.filter(c=>!c.testPathname(t)),a=i.filter(c=>c.testPathname(t));let d=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var V;(V=this.preprocessor)==null||V.call(this,{pathname:t,resolve:c,reject:L})})}catch(c){c?console.error(c):console.log("Route change canceled"),d=!1}if(d&&e(this,y)===t){r(this,C,a[a.length-1]),h.forEach(L=>{L.close()}),r(this,N,t);try{for(var T=G(f),ct,lt,ut;ct=!(lt=yield T.next()).done;ct=!1){const L=lt.value;yield L.render(((u=e(this,C))==null?void 0:u.nest)||e(this,q),t),r(this,C,L)}}catch(lt){ut=[lt]}finally{try{ct&&(lt=T.return)&&(yield lt.call(T))}finally{if(ut)throw ut[0]}}const c=e(this,k)+t+location.search;s==="push"?history.pushState(c,"",c):s==="replace"&&history.replaceState(c,"",c),F(this,K,tt).call(this),(Q=this.postprocessor)==null||Q.call(this,{pathname:t}),e(this,x).notify({pathname:t})}})}};q=new WeakMap,k=new WeakMap,w=new WeakMap,C=new WeakMap,j=new WeakMap,y=new WeakMap,N=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakSet,tt=function(){const t=e(this,w).filter(i=>i.isActive),s=Array.from(new Set([...e(this,q).querySelectorAll("a"),...t.map(i=>i.getAnchorElements()).flat()].filter(i=>{var f;return(f=i.getAttribute("href"))==null?void 0:f.startsWith("/")})));e(this,j).forEach(i=>{i.destroy()}),r(this,j,s.map(i=>new ot(this,i)))},W=new WeakMap;let J=Y;exports.Router=J;
@@ -1,15 +1,15 @@
1
- var Q = (o, t) => (t = Symbol[o]) ? t : Symbol.for("Symbol." + o);
2
- var $ = (o, t, s) => {
3
- if (!t.has(o))
1
+ var Q = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
2
+ var $ = (n, t, s) => {
3
+ if (!t.has(n))
4
4
  throw TypeError("Cannot " + s);
5
5
  };
6
- var e = (o, t, s) => ($(o, t, "read from private field"), s ? s.call(o) : t.get(o)), n = (o, t, s) => {
7
- if (t.has(o))
6
+ var e = (n, t, s) => ($(n, t, "read from private field"), s ? s.call(n) : t.get(n)), o = (n, t, s) => {
7
+ if (t.has(n))
8
8
  throw TypeError("Cannot add the same private member more than once");
9
- t instanceof WeakSet ? t.add(o) : t.set(o, s);
10
- }, r = (o, t, s, i) => ($(o, t, "write to private field"), i ? i.call(o, s) : t.set(o, s), s);
11
- var z = (o, t, s) => ($(o, t, "access private method"), s);
12
- var j = (o, t, s) => new Promise((i, f) => {
9
+ t instanceof WeakSet ? t.add(n) : t.set(n, s);
10
+ }, r = (n, t, s, i) => ($(n, t, "write to private field"), i ? i.call(n, s) : t.set(n, s), s);
11
+ var z = (n, t, s) => ($(n, t, "access private method"), s);
12
+ var j = (n, t, s) => new Promise((i, f) => {
13
13
  var h = (u) => {
14
14
  try {
15
15
  d(s.next(u));
@@ -23,29 +23,31 @@ var j = (o, t, s) => new Promise((i, f) => {
23
23
  f(T);
24
24
  }
25
25
  }, d = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(h, a);
26
- d((s = s.apply(o, t)).next());
26
+ d((s = s.apply(n, t)).next());
27
27
  });
28
- var F = (o, t, s) => (t = o[Q("asyncIterator")]) ? t.call(o) : (o = o[Q("iterator")](), t = {}, s = (i, f) => (f = o[i]) && (t[i] = (h) => new Promise((a, d, u) => (h = f.call(o, h), u = h.done, Promise.resolve(h.value).then((T) => a({ value: T, done: u }), d)))), s("next"), s("return"), t);
28
+ var F = (n, t, s) => (t = n[Q("asyncIterator")]) ? t.call(n) : (n = n[Q("iterator")](), t = {}, s = (i, f) => (f = n[i]) && (t[i] = (h) => new Promise((a, d, u) => (h = f.call(n, h), u = h.done, Promise.resolve(h.value).then((T) => a({ value: T, done: u }), d)))), s("next"), s("return"), t);
29
29
  import { URLPattern as et } from "urlpattern-polyfill";
30
30
  import { Notifier as st } from "../notifier/index.js";
31
31
  import { i as Z } from "../browser-0zX67oeU.js";
32
32
  import { d as it } from "../function-C10DGppn.js";
33
- import { i as V } from "../object-R34VLqhp.js";
34
- var R, U, b, m, c, w, A, v, P, E, B, _;
35
- class ot {
33
+ import "../Store-JOKrNVEr.js";
34
+ import { i as V } from "../string-DCGBU6em.js";
35
+ import { g as nt } from "../getComponentElement-B0Qb2RbZ.js";
36
+ var R, U, b, m, l, w, A, v, P, E, B, _;
37
+ class rt {
36
38
  constructor(t, s) {
37
- n(this, B);
38
- n(this, R, void 0);
39
- n(this, U, void 0);
40
- n(this, b, void 0);
41
- n(this, m, void 0);
42
- n(this, c, void 0);
43
- n(this, w, void 0);
44
- n(this, A, void 0);
45
- n(this, v, null);
46
- n(this, P, []);
47
- n(this, E, []);
48
- r(this, R, t), r(this, U, s), r(this, b, new URLPattern({ pathname: e(this, R) })), r(this, m, null), r(this, c, null), r(this, w, !1), r(this, A, null), Z && r(this, v, new MutationObserver((i) => {
39
+ o(this, B);
40
+ o(this, R, void 0);
41
+ o(this, U, void 0);
42
+ o(this, b, void 0);
43
+ o(this, m, void 0);
44
+ o(this, l, void 0);
45
+ o(this, w, void 0);
46
+ o(this, A, void 0);
47
+ o(this, v, null);
48
+ o(this, P, []);
49
+ o(this, E, []);
50
+ r(this, R, t), r(this, U, s), r(this, b, new URLPattern({ pathname: e(this, R) })), r(this, m, null), r(this, l, null), r(this, w, !1), r(this, A, null), Z && r(this, v, new MutationObserver((i) => {
49
51
  i[0].addedNodes.forEach((h) => {
50
52
  e(this, m) ? e(this, E).push(h) : e(this, P).push(h);
51
53
  });
@@ -61,9 +63,9 @@ class ot {
61
63
  return e(this, w);
62
64
  }
63
65
  get element() {
64
- return e(this, c);
66
+ return e(this, l);
65
67
  }
66
- get outlet() {
68
+ get nest() {
67
69
  return e(this, A);
68
70
  }
69
71
  testPathname(t) {
@@ -93,27 +95,30 @@ class ot {
93
95
  pathnameParams: a,
94
96
  searchParams: d
95
97
  };
96
- V(e(this, m)) ? r(this, c, new (e(this, m))(
98
+ V(e(this, m)) ? r(this, l, new (e(this, m))(
99
+ u
100
+ )) : r(this, l, nt(
101
+ e(this, m),
97
102
  u
98
- )) : r(this, c, e(this, m).call(this, u)), t.appendChild(e(this, c)), r(this, A, e(this, c).querySelector("[data-outlet]") || ((f = e(this, c).shadowRoot) == null ? void 0 : f.querySelector("[data-outlet]")) || e(this, c).shadowRoot || e(this, c)), r(this, w, !0);
103
+ )), t.appendChild(e(this, l)), r(this, A, e(this, l).querySelector("[data-nest]") || ((f = e(this, l).shadowRoot) == null ? void 0 : f.querySelector("[data-nest]")) || e(this, l).shadowRoot || e(this, l)), r(this, w, !0);
99
104
  }
100
105
  e(this, v).disconnect();
101
106
  });
102
107
  }
103
108
  close() {
104
109
  var t;
105
- e(this, v).disconnect(), (t = e(this, c)) == null || t.remove(), r(this, w, !1), e(this, E).forEach((s) => document.head.removeChild(s)), r(this, E, []);
110
+ e(this, v).disconnect(), (t = e(this, l)) == null || t.remove(), r(this, w, !1), e(this, E).forEach((s) => document.head.removeChild(s)), r(this, E, []);
106
111
  }
107
112
  getAnchorElements() {
108
113
  var s;
109
114
  let t = [];
110
- return e(this, c) && (t = [...e(this, c).querySelectorAll("a")]), (s = e(this, c)) != null && s.shadowRoot && (t = [
115
+ return e(this, l) && (t = [...e(this, l).querySelectorAll("a")]), (s = e(this, l)) != null && s.shadowRoot && (t = [
111
116
  ...t,
112
- ...e(this, c).shadowRoot.querySelectorAll("a")
117
+ ...e(this, l).shadowRoot.querySelectorAll("a")
113
118
  ]), t;
114
119
  }
115
120
  }
116
- R = new WeakMap(), U = new WeakMap(), b = new WeakMap(), m = new WeakMap(), c = new WeakMap(), w = new WeakMap(), A = new WeakMap(), v = new WeakMap(), P = new WeakMap(), E = new WeakMap(), B = new WeakSet(), _ = function() {
121
+ R = new WeakMap(), U = new WeakMap(), b = new WeakMap(), m = new WeakMap(), l = new WeakMap(), w = new WeakMap(), A = new WeakMap(), v = new WeakMap(), P = new WeakMap(), E = new WeakMap(), B = new WeakSet(), _ = function() {
117
122
  return j(this, null, function* () {
118
123
  const t = e(this, P).filter((a) => a instanceof HTMLElement ? a.tagName === "STYLE" || a.tagName === "SCRIPT" || a.tagName === "LINK" : !1);
119
124
  try {
@@ -138,13 +143,13 @@ R = new WeakMap(), U = new WeakMap(), b = new WeakMap(), m = new WeakMap(), c =
138
143
  });
139
144
  };
140
145
  var H, g, S, O, x;
141
- class rt {
146
+ class ot {
142
147
  constructor(t, s) {
143
- n(this, H, void 0);
144
- n(this, g, void 0);
145
- n(this, S, void 0);
146
- n(this, O, void 0);
147
- n(this, x, (t) => {
148
+ o(this, H, void 0);
149
+ o(this, g, void 0);
150
+ o(this, S, void 0);
151
+ o(this, O, void 0);
152
+ o(this, x, (t) => {
148
153
  t.preventDefault(), e(this, H).navigate(e(this, S), e(this, O));
149
154
  });
150
155
  r(this, H, t), r(this, g, s), r(this, S, e(this, g).getAttribute("href") || "/"), r(this, O, e(this, g).getAttribute("data-history-action") || "push"), e(this, g).addEventListener("click", e(this, x)), location.pathname === e(this, S) && e(this, g).classList.add("current");
@@ -155,26 +160,26 @@ class rt {
155
160
  }
156
161
  H = new WeakMap(), g = new WeakMap(), S = new WeakMap(), O = new WeakMap(), x = new WeakMap();
157
162
  globalThis.URLPattern = et;
158
- var k, N, p, C, I, L, q, M, D, K, tt, W;
163
+ var k, C, p, N, I, L, q, M, D, K, tt, W;
159
164
  const Y = class Y {
160
165
  constructor(t) {
161
- n(this, K);
162
- n(this, k, null);
163
- n(this, N, void 0);
164
- n(this, p, []);
165
- n(this, C, null);
166
- n(this, I, []);
167
- n(this, L, void 0);
168
- n(this, q, null);
169
- n(this, M, new st());
170
- n(this, D, it(() => {
166
+ o(this, K);
167
+ o(this, k, null);
168
+ o(this, C, void 0);
169
+ o(this, p, []);
170
+ o(this, N, null);
171
+ o(this, I, []);
172
+ o(this, L, void 0);
173
+ o(this, q, null);
174
+ o(this, M, new st());
175
+ o(this, D, it(() => {
171
176
  const t = (s) => s.split("/").length;
172
- r(this, p, e(this, p).sort((s, i) => t(s.pattern) - t(i.pattern))), this.navigate(location.pathname.replace(e(this, N), ""));
177
+ r(this, p, e(this, p).sort((s, i) => t(s.pattern) - t(i.pattern))), this.navigate(location.pathname.replace(e(this, C), ""));
173
178
  }, 0));
174
- n(this, W, (t) => {
179
+ o(this, W, (t) => {
175
180
  t.state && this.navigate(t.state, "none");
176
181
  });
177
- r(this, N, (t == null ? void 0 : t.base) || ""), Y.active = this, Z && (r(this, k, (t == null ? void 0 : t.rootElement) || document.body), addEventListener("popstate", e(this, W)));
182
+ r(this, C, (t == null ? void 0 : t.base) || ""), Y.active = this, Z && (r(this, k, (t == null ? void 0 : t.rootElement) || document.body), addEventListener("popstate", e(this, W)));
178
183
  }
179
184
  get currentPathname() {
180
185
  return e(this, q);
@@ -189,7 +194,7 @@ const Y = class Y {
189
194
  return e(this, M).subscribe(t);
190
195
  }
191
196
  defineRoute(t, s) {
192
- const i = new ot(t, s);
197
+ const i = new rt(t, s);
193
198
  e(this, p).push(i), e(this, D).call(this);
194
199
  }
195
200
  navigate(t, s = "push") {
@@ -198,48 +203,45 @@ const Y = class Y {
198
203
  if (e(this, L) === t || e(this, q) === t)
199
204
  return;
200
205
  Y.active = this, r(this, L, t);
201
- const i = e(this, p).filter((l) => l.isActive), f = e(this, p).filter(
202
- (l) => !i.includes(l) && l.testPathname(t)
203
- ), h = i.filter((l) => !l.testPathname(t)), a = i.filter((l) => l.testPathname(t));
206
+ const i = e(this, p).filter((c) => c.isActive), f = e(this, p).filter(
207
+ (c) => !i.includes(c) && c.testPathname(t)
208
+ ), h = i.filter((c) => !c.testPathname(t)), a = i.filter((c) => c.testPathname(t));
204
209
  let d = !0;
205
210
  if (this.preprocessor)
206
211
  try {
207
- yield new Promise((l, y) => {
212
+ yield new Promise((c, y) => {
208
213
  var J;
209
- (J = this.preprocessor) == null || J.call(this, { pathname: t, resolve: l, reject: y });
214
+ (J = this.preprocessor) == null || J.call(this, { pathname: t, resolve: c, reject: y });
210
215
  });
211
- } catch (l) {
212
- l ? console.error(l) : console.log("Route change canceled"), d = !1;
216
+ } catch (c) {
217
+ c ? console.error(c) : console.log("Route change canceled"), d = !1;
213
218
  }
214
219
  if (d && e(this, L) === t) {
215
- r(this, C, a[a.length - 1]), h.forEach((y) => {
220
+ r(this, N, a[a.length - 1]), h.forEach((y) => {
216
221
  y.close();
217
222
  }), r(this, q, t);
218
223
  try {
219
- for (var T = F(f), mt, gt, pt; mt = !(gt = yield T.next()).done; mt = !1) {
220
- const y = gt.value;
221
- yield y.render(
222
- ((u = e(this, C)) == null ? void 0 : u.outlet) || e(this, k),
223
- t
224
- ), r(this, C, y);
224
+ for (var T = F(f), wt, vt, Pt; wt = !(vt = yield T.next()).done; wt = !1) {
225
+ const y = vt.value;
226
+ yield y.render(((u = e(this, N)) == null ? void 0 : u.nest) || e(this, k), t), r(this, N, y);
225
227
  }
226
- } catch (gt) {
227
- pt = [gt];
228
+ } catch (vt) {
229
+ Pt = [vt];
228
230
  } finally {
229
231
  try {
230
- mt && (gt = T.return) && (yield gt.call(T));
232
+ wt && (vt = T.return) && (yield vt.call(T));
231
233
  } finally {
232
- if (pt)
233
- throw pt[0];
234
+ if (Pt)
235
+ throw Pt[0];
234
236
  }
235
237
  }
236
- const l = e(this, N) + t + location.search;
237
- s === "push" ? history.pushState(l, "", l) : s === "replace" && history.replaceState(l, "", l), z(this, K, tt).call(this), (G = this.postprocessor) == null || G.call(this, { pathname: t }), e(this, M).notify({ pathname: t });
238
+ const c = e(this, C) + t + location.search;
239
+ s === "push" ? history.pushState(c, "", c) : s === "replace" && history.replaceState(c, "", c), z(this, K, tt).call(this), (G = this.postprocessor) == null || G.call(this, { pathname: t }), e(this, M).notify({ pathname: t });
238
240
  }
239
241
  });
240
242
  }
241
243
  };
242
- k = new WeakMap(), N = new WeakMap(), p = new WeakMap(), C = new WeakMap(), I = new WeakMap(), L = new WeakMap(), q = new WeakMap(), M = new WeakMap(), D = new WeakMap(), K = new WeakSet(), tt = function() {
244
+ k = new WeakMap(), C = new WeakMap(), p = new WeakMap(), N = new WeakMap(), I = new WeakMap(), L = new WeakMap(), q = new WeakMap(), M = new WeakMap(), D = new WeakMap(), K = new WeakSet(), tt = function() {
243
245
  const t = e(this, p).filter((i) => i.isActive), s = Array.from(
244
246
  new Set(
245
247
  [
@@ -253,7 +255,7 @@ k = new WeakMap(), N = new WeakMap(), p = new WeakMap(), C = new WeakMap(), I =
253
255
  );
254
256
  e(this, I).forEach((i) => {
255
257
  i.destroy();
256
- }), r(this, I, s.map((i) => new rt(this, i)));
258
+ }), r(this, I, s.map((i) => new ot(this, i)));
257
259
  }, W = new WeakMap();
258
260
  let X = Y;
259
261
  export {
@@ -1 +1 @@
1
- "use strict";var Ct=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var h=(s,e,i)=>(Ct(s,e,"read from private field"),i?i.call(s):e.get(s)),D=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},O=(s,e,i,n)=>(Ct(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),I=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Tt=require("../Damped-mdFs8WSd.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-Dc1xcVG6.cjs"),gt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),H=require("../scroll-entries/index.cjs"),P=require("../tags-75InVOh4.cjs"),Lt=require("../createStylesheet-DTOK6fTn.cjs"),Vt=require("../dom-qY2LdCVL.cjs");var It=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ft=(s,e,i,n)=>{for(var r=n>1?void 0:n?Ht(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&It(e,i,r),r},yt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},t=(s,e,i)=>(yt(s,e,"read from private field"),i?i.call(s):e.get(s)),l=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},m=(s,e,i,n)=>(yt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),f=(s,e,i)=>(yt(s,e,"access private method"),i),a,M,T,$,V,X,y,Y,j,tt,u,dt,c,et,it,_,p,k,F,b,G,R,N,ft,B,U,mt,kt,bt,Wt,st,vt,rt,_t,q,wt,St,Ot,nt,ht,Et,S,w,L,W;class Bt{constructor(e,i){D(this,S,void 0);D(this,w,void 0);D(this,L,0);D(this,W,0);O(this,S,e),O(this,w,i),H.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){H.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,w).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,w).vertical?I.getCumulativeOffsetTop(h(this,S)):I.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,w).contentPosition)}transform(){let e=0;h(this,w).infiniteAttribute.current&&h(this,w).overscroll&&h(this,W)+h(this,L)<h(this,w).currentScrollValue&&(e=h(this,w).distance*-1),H.scrollEntries.update(h(this,S),h(this,w).axisAttibute.current,e);const i=h(this,w).viewportSize-h(this,L),n=zt.clamp(h(this,w).currentScrollValue+e,h(this,W)-h(this,w).viewportSize-i,h(this,W)+h(this,L)+i);h(this,w).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,w=new WeakMap,L=new WeakMap,W=new WeakMap;const Gt=Lt.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends gt.CustomElement{constructor(e){if(super(),l(this,N),l(this,B),l(this,mt),l(this,bt),l(this,st),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:i=>Math.max(0,i-1)})),l(this,$,new x.Attribute(this,"split",!1)),l(this,V,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,it,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,F,null),l(this,b,new qt.Store(0)),l(this,G,0),l(this,R,0),l(this,q,()=>{const i=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?I.getCumulativeOffsetTop(this):I.getCumulativeOffsetLeft(this)),m(this,it,this.vertical?I.getCumulativeOffsetTop(t(this,u)):I.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,V).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(i*t(this,p),!0)}),l(this,wt,()=>{const i=this.currentScrollValue;if(m(this,G,Math.max(0,i-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${i*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${i*-1}px, 0px, 0px)`;H.scrollEntries.update(this,t(this,M).current,i)}),l(this,nt,i=>{if(typeof i=="number")if(t(this,V).current){const n=Math.sign(i);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(i);else i==="min"?t(this,a).set(t(this,a).min.current):i==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let i,n=e||this.getAttribute("name");n&&(i={name:n}),m(this,a,new Tt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:i})),this.openShadow(Gt),P.element(this,{tabIndex:0,children:[P.div({class:"static",children:[P.slot({name:"static"})]}),P.div({class:"content",children:[P.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,F,new Mt.KeyboardControls({element:this})),t(this,F).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,q).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,B,U).call(this))}),t(this,V).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,B,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,$).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,st,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,$)}get sectionalAttibute(){return t(this,V)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,it)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,i="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Ot).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let g=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?g=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?g=d.position-(t(this,p)+t(this,_)):g=d.position-r.position:g=d.position-r.position,t(this,a).shift(g,i==="instant")}}shiftSections(e,i="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,i)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,st,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;$=new WeakMap;V=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;it=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;F=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,B,U).call(this),t(this,dt).assignedElements().forEach(s=>{s instanceof HTMLElement&&t(this,c).push(new Bt(s,this))}),t(this,u).style.transform="",t(this,q).call(this)};B=new WeakSet;U=function(){t(this,c).forEach(s=>{s.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,F).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,wt)),t(this,k).connect(),t(this,F).connect()};st=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,q)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,$).current&&f(this,B,U).call(this),H.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,$).current&&f(this,N,ft).call(this),H.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,q),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};q=new WeakMap;wt=new WeakMap;St=new WeakSet;Ot=function(s){t(this,y).current?(t(this,b).current=s%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(s,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(s="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[s]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[s]};exports.ScrollElement=Ft([gt.define("e-scroll")],exports.ScrollElement);var J;class Kt extends gt.CustomElement{constructor(){super(...arguments);D(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const i=Vt.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,J,i):console.error(this,"e-scroll not found")}}J=new WeakMap;var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Ut=(s,e,i,n)=>{for(var r=n>1?void 0:n?Nt(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&Zt(e,i,r),r},Rt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>(Rt(s,e,"read from private field"),i?i.call(s):e.get(s)),E=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},C=(s,e,i,n)=>(Rt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),lt,v,A,z,K,Z,ot,at,ct,ut;const Jt=Lt.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Kt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const i=g=>{const Q=o(this,A)?g.x:g.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",i),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",i),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Jt),P.element(this,{children:[P.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Ut([gt.define("e-scrollbar")],exports.ScrollbarElement);
1
+ "use strict";var Ct=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var h=(s,e,i)=>(Ct(s,e,"read from private field"),i?i.call(s):e.get(s)),D=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},O=(s,e,i,n)=>(Ct(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../Store-D0_rDIsE.cjs"),Dt=require("../Derived-SjPdLJiZ.cjs"),At=require("../browser-CpzFX2xg.cjs"),I=require("../layout-8ryRAMGJ.cjs"),zt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Tt=require("../Damped-mdFs8WSd.cjs"),x=require("../attribute/index.cjs"),Mt=require("../WheelControls-Dc1xcVG6.cjs"),gt=require("../custom-element/index.cjs"),xt=require("../order/index.cjs"),pt=require("../window-resizer/index.cjs"),H=require("../scroll-entries/index.cjs"),P=require("../tags-DGIuh1Hi.cjs"),Lt=require("../createStylesheet-B5Nhxdpo.cjs"),Vt=require("../dom-qY2LdCVL.cjs");var It=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ft=(s,e,i,n)=>{for(var r=n>1?void 0:n?Ht(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&It(e,i,r),r},yt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},t=(s,e,i)=>(yt(s,e,"read from private field"),i?i.call(s):e.get(s)),l=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},m=(s,e,i,n)=>(yt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),f=(s,e,i)=>(yt(s,e,"access private method"),i),a,M,T,$,V,X,y,Y,j,tt,u,dt,c,et,it,_,p,k,F,b,G,R,N,ft,B,U,mt,kt,bt,Wt,st,vt,rt,_t,q,wt,St,Ot,nt,ht,Et,S,w,L,W;class Bt{constructor(e,i){D(this,S,void 0);D(this,w,void 0);D(this,L,0);D(this,W,0);O(this,S,e),O(this,w,i),H.scrollEntries.register(h(this,S))}get size(){return h(this,L)}get position(){return h(this,W)}destroy(){H.scrollEntries.unregister(h(this,S)),h(this,S).style.transform=""}resize(){O(this,L,h(this,w).vertical?h(this,S).offsetHeight:h(this,S).offsetWidth),O(this,W,h(this,w).vertical?I.getCumulativeOffsetTop(h(this,S)):I.getCumulativeOffsetLeft(h(this,S))),O(this,W,h(this,W)-h(this,w).contentPosition)}transform(){let e=0;h(this,w).infiniteAttribute.current&&h(this,w).overscroll&&h(this,W)+h(this,L)<h(this,w).currentScrollValue&&(e=h(this,w).distance*-1),H.scrollEntries.update(h(this,S),h(this,w).axisAttibute.current,e);const i=h(this,w).viewportSize-h(this,L),n=zt.clamp(h(this,w).currentScrollValue+e,h(this,W)-h(this,w).viewportSize-i,h(this,W)+h(this,L)+i);h(this,w).vertical?h(this,S).style.transform=`translate3d(0px, ${n*-1}px, 0px)`:h(this,S).style.transform=`translate3d(${n*-1}px, 0px, 0px)`}}S=new WeakMap,w=new WeakMap,L=new WeakMap,W=new WeakMap;const Gt=Lt.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends gt.CustomElement{constructor(e){if(super(),l(this,N),l(this,B),l(this,mt),l(this,bt),l(this,st),l(this,rt),l(this,St),l(this,ht),l(this,a,null),l(this,M,new x.Attribute(this,"axis","y")),l(this,T,new x.Attribute(this,"pages",0,{validate:i=>Math.max(0,i-1)})),l(this,$,new x.Attribute(this,"split",!1)),l(this,V,new x.Attribute(this,"sectional",!1)),l(this,X,new x.Attribute(this,"wheel-max-delta",!1)),l(this,y,new x.Attribute(this,"infinite",!1)),l(this,Y,new x.Attribute(this,"damping",.03)),l(this,j,new x.Attribute(this,"disabled",!1)),l(this,tt,new x.Attribute(this,"hibernated",!1)),l(this,u,null),l(this,dt,null),l(this,c,[]),l(this,et,0),l(this,it,0),l(this,_,0),l(this,p,0),l(this,k,null),l(this,F,null),l(this,b,new qt.Store(0)),l(this,G,0),l(this,R,0),l(this,q,()=>{const i=this.currentScrollValue/t(this,p);if(m(this,et,this.vertical?I.getCumulativeOffsetTop(this):I.getCumulativeOffsetLeft(this)),m(this,it,this.vertical?I.getCumulativeOffsetTop(t(this,u)):I.getCumulativeOffsetLeft(t(this,u))),m(this,_,this.vertical?this.offsetHeight:this.offsetWidth),t(this,T).current){m(this,p,t(this,_)*t(this,T).current);const n=t(this,p)+t(this,_);this.vertical?(t(this,u).style.width=n+"px",t(this,u).style.height="100%"):(t(this,u).style.height=n+"px",t(this,u).style.width="100%")}else this.vertical?(t(this,u).style.width="100%",t(this,u).style.height="max-content",m(this,p,t(this,u).offsetHeight-t(this,_))):(t(this,u).style.width="max-content",t(this,u).style.height="100%",m(this,p,t(this,u).offsetWidth-t(this,_)));if(!t(this,y).current){const n=getComputedStyle(this);m(this,p,t(this,p)+(this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd))),t(this,a).max.current=t(this,p)}if(t(this,c).forEach(n=>{n.resize(),n.transform()}),t(this,y).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],r=n.position+n.size-t(this,_),d=t(this,p)-r;m(this,R,n.position+n.size+d)}else m(this,R,t(this,p));if(t(this,V).current&&t(this,c).length){const n=t(this,c)[t(this,b).current];t(this,a).set(n.position,!0)}else t(this,a).set(i*t(this,p),!0)}),l(this,wt,()=>{const i=this.currentScrollValue;if(m(this,G,Math.max(0,i-t(this,p))),t(this,c).length){let n=0;for(let r=0;r<t(this,c).length;r++){const d=t(this,c)[r];d.transform(),this.targetScrollValue+this.viewportSize/2>=d.position&&(n=r)}t(this,b).current=n}else this.vertical?t(this,u).style.transform=`translate3d(0px, ${i*-1}px, 0px)`:t(this,u).style.transform=`translate3d(${i*-1}px, 0px, 0px)`;H.scrollEntries.update(this,t(this,M).current,i)}),l(this,nt,i=>{if(typeof i=="number")if(t(this,V).current){const n=Math.sign(i);t(this,c).length?this.shiftSections(n):t(this,a).shift(n*t(this,_))}else t(this,a).shift(i);else i==="min"?t(this,a).set(t(this,a).min.current):i==="max"&&t(this,a).set(t(this,a).delta)}),At.isBrowser){let i,n=e||this.getAttribute("name");n&&(i={name:n}),m(this,a,new Tt.Damped({damping:.01,min:0,order:xt.TICK_ORDER.SCROLL,passport:i})),this.openShadow(Gt),P.element(this,{tabIndex:0,children:[P.div({class:"static",children:[P.slot({name:"static"})]}),P.div({class:"content",children:[P.slot({ref:r=>m(this,dt,r)})],style:{flexDirection:new Dt.Derived(t(this,M),r=>r==="x"?"row":"column")},ref:r=>m(this,u,r)})]}),m(this,k,new Mt.WheelControls({element:this})),t(this,k).changeEvent.subscribe(t(this,nt)),m(this,F,new Mt.KeyboardControls({element:this})),t(this,F).changeEvent.subscribe(t(this,nt)),t(this,M).subscribe(({current:r})=>{t(this,u).style.flexDirection=r==="x"?"row":"column",t(this,k).axis=t(this,X).current?"max":r,this.isConnected&&t(this,q).call(this)}),t(this,X).subscribe(r=>{t(this,k).axis=r.current?"max":t(this,M).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:r})=>{this.isConnected&&(r?f(this,N,ft).call(this):f(this,B,U).call(this))}),t(this,V).subscribe(r=>{t(this,b).current=0,t(this,k).debounce=r.current,t(this,a).reset(),this.isConnected&&(r.current&&!r.previous?f(this,N,ft).call(this):!r.current&&r.previous&&f(this,B,U).call(this))}),t(this,y).subscribe(r=>{r.current?(this.isConnected&&(t(this,c).length||(t(this,$).current=!0)),t(this,c).length&&(t(this,a).max.current=1/0,t(this,a).min.current=-1/0)):(m(this,G,0),t(this,a).max.current=t(this,p),t(this,a).min.current=0)}),t(this,Y).subscribe(r=>{t(this,a).damping=r.current}),t(this,j).subscribe(r=>{r.current&&!r.previous?f(this,mt,kt).call(this):!r.current&&r.previous&&f(this,bt,Wt).call(this)}),t(this,tt).subscribe(r=>{r.current&&!r.previous?f(this,st,vt).call(this):!r.current&&r.previous&&f(this,rt,_t).call(this)})}}get currentScrollValue(){return f(this,ht,Et).call(this,"current")}get targetScrollValue(){return f(this,ht,Et).call(this,"target")}get damped(){return t(this,a)}get dampedAttibute(){return t(this,a)}get axisAttibute(){return t(this,M)}get pagesAttibute(){return t(this,T)}get splitAttibute(){return t(this,$)}get sectionalAttibute(){return t(this,V)}get infiniteAttribute(){return t(this,y)}get dampingAttibute(){return t(this,Y)}get disabledAttibute(){return t(this,j)}get hibernatedAttibute(){return t(this,tt)}get contentElement(){return t(this,u)}get position(){return t(this,et)}get contentPosition(){return t(this,it)}get viewportSize(){return t(this,_)}get scrollSize(){return t(this,p)}get counter(){return t(this,b)}get distance(){return t(this,R)}get overscroll(){return t(this,G)}get vertical(){return t(this,M).current==="y"}get currentProgress(){return this.currentScrollValue/t(this,R)}get targetProgress(){return this.targetScrollValue/t(this,R)}scrollToSection(e,i="smooth"){if(!t(this,c).length)return;const n=t(this,b).current;f(this,St,Ot).call(this,e);const r=t(this,c)[n],d=t(this,c)[t(this,b).current];if(r&&d){let g=0;const Q=t(this,c).length-1;t(this,y).current?t(this,b).current===0&&n===Q?g=t(this,p)+t(this,_)-r.position:t(this,b).current===Q&&n===0?g=d.position-(t(this,p)+t(this,_)):g=d.position-r.position:g=d.position-r.position,t(this,a).shift(g,i==="instant")}}shiftSections(e,i="smooth"){t(this,c).length&&this.scrollToSection(t(this,b).current+e,i)}connectedCallback(){f(this,rt,_t).call(this)}disconnectedCallback(){f(this,st,vt).call(this)}};a=new WeakMap;M=new WeakMap;T=new WeakMap;$=new WeakMap;V=new WeakMap;X=new WeakMap;y=new WeakMap;Y=new WeakMap;j=new WeakMap;tt=new WeakMap;u=new WeakMap;dt=new WeakMap;c=new WeakMap;et=new WeakMap;it=new WeakMap;_=new WeakMap;p=new WeakMap;k=new WeakMap;F=new WeakMap;b=new WeakMap;G=new WeakMap;R=new WeakMap;N=new WeakSet;ft=function(){f(this,B,U).call(this),t(this,dt).assignedElements().forEach(s=>{s instanceof HTMLElement&&t(this,c).push(new Bt(s,this))}),t(this,u).style.transform="",t(this,q).call(this)};B=new WeakSet;U=function(){t(this,c).forEach(s=>{s.destroy()}),m(this,c,[])};mt=new WeakSet;kt=function(){t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),t(this,k).disconnect(),t(this,F).disconnect()};bt=new WeakSet;Wt=function(){t(this,a).subscribe(t(this,wt)),t(this,k).connect(),t(this,F).connect()};st=new WeakSet;vt=function(){pt.windowResizer.unsubscribe(t(this,q)),t(this,a).reset(),f(this,mt,kt).call(this),t(this,u).style.transform="",t(this,$).current&&f(this,B,U).call(this),H.scrollEntries.unregister(this)};rt=new WeakSet;_t=function(){t(this,$).current&&f(this,N,ft).call(this),H.scrollEntries.register(this),pt.windowResizer.subscribe(t(this,q),xt.RESIZE_ORDER.SCROLL),f(this,bt,Wt).call(this)};q=new WeakMap;wt=new WeakMap;St=new WeakSet;Ot=function(s){t(this,y).current?(t(this,b).current=s%t(this,c).length,t(this,b).current=t(this,b).current<0?t(this,c).length+t(this,b).current:t(this,b).current):t(this,b).current=zt.clamp(s,0,t(this,c).length-1)};nt=new WeakMap;ht=new WeakSet;Et=function(s="current"){if(t(this,y).current&&t(this,c).length){const e=t(this,a)[s]%(t(this,p)+t(this,_));return e<0?t(this,p)+e+t(this,_):e}else return t(this,a)[s]};exports.ScrollElement=Ft([gt.define("e-scroll")],exports.ScrollElement);var J;class Kt extends gt.CustomElement{constructor(){super(...arguments);D(this,J,null)}get scrollElement(){return h(this,J)}connectedCallback(){const i=Vt.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,J,i):console.error(this,"e-scroll not found")}}J=new WeakMap;var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Ut=(s,e,i,n)=>{for(var r=n>1?void 0:n?Nt(e,i):e,d=s.length-1,g;d>=0;d--)(g=s[d])&&(r=(n?g(e,i,r):g(r))||r);return n&&r&&Zt(e,i,r),r},Rt=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>(Rt(s,e,"read from private field"),i?i.call(s):e.get(s)),E=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},C=(s,e,i,n)=>(Rt(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i),lt,v,A,z,K,Z,ot,at,ct,ut;const Jt=Lt.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#efefef"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"#181818",borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Kt{constructor(){super(),E(this,lt,null),E(this,v,null),E(this,A,!1),E(this,z,0),E(this,K,0),E(this,Z,0),E(this,ot,()=>{C(this,A,this.offsetWidth>this.offsetHeight);const e=o(this,A)?this.offsetWidth:this.offsetHeight;C(this,z,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),C(this,z,Math.max(o(this,z),30)),o(this,A)?(o(this,v).style.width=o(this,z)+"px",o(this,v).style.height="100%"):(o(this,v).style.width="100%",o(this,v).style.height=o(this,z)+"px"),C(this,K,e-o(this,z)),this.scrollElement.scrollSize||(this.style.display="none")}),E(this,at,()=>{C(this,Z,this.scrollElement.currentProgress*o(this,K)),o(this,A)?o(this,v).style.transform=`translate3d(${o(this,Z)}px, 0px, 0px)`:o(this,v).style.transform=`translate3d(0px, ${o(this,Z)}px, 0px)`}),E(this,ct,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),E(this,ut,e=>{const i=g=>{const Q=o(this,A)?g.x:g.y,Pt=this.scrollElement.distance/o(this,K),$t=(Q-d)*Pt;this.scrollElement.damped.set(r+$t)},n=()=>{removeEventListener("pointermove",i),removeEventListener("pointerup",n),removeEventListener("touchend",n)};addEventListener("pointermove",i),addEventListener("pointerup",n),addEventListener("touchend",n);const r=this.scrollElement.damped.target,d=o(this,A)?e.x:e.y}),At.isBrowser&&(this.openShadow(Jt),P.element(this,{children:[P.slot({ref:e=>C(this,lt,e)})]}))}get thumbElement(){return o(this,v)}connectedCallback(){super.connectedCallback();const e=o(this,lt).assignedElements()[0];e instanceof HTMLElement?C(this,v,e):(C(this,v,document.createElement("div")),o(this,v).classList.add("default-thumb"),this.shadowRoot.appendChild(o(this,v))),o(this,v).addEventListener("pointerdown",o(this,ut)),pt.windowResizer.subscribe(o(this,ot),xt.RESIZE_ORDER.SCROLL+1),this.scrollElement.damped.subscribe(o(this,at)),this.scrollElement.axisAttibute.subscribe(o(this,ct))}disconnectedCallback(){o(this,v).removeEventListener("pointerdown",o(this,ut)),pt.windowResizer.unsubscribe(o(this,ot)),this.scrollElement.damped.unsubscribe(o(this,at)),this.scrollElement.axisAttibute.unsubscribe(o(this,ct))}};lt=new WeakMap;v=new WeakMap;A=new WeakMap;z=new WeakMap;K=new WeakMap;Z=new WeakMap;ot=new WeakMap;at=new WeakMap;ct=new WeakMap;ut=new WeakMap;exports.ScrollbarElement=Ut([gt.define("e-scrollbar")],exports.ScrollbarElement);
@@ -20,8 +20,8 @@ import { CustomElement as Lt, define as $t } from "../custom-element/index.js";
20
20
  import { TICK_ORDER as Nt, RESIZE_ORDER as Pt } from "../order/index.js";
21
21
  import { windowResizer as ot } from "../window-resizer/index.js";
22
22
  import { scrollEntries as I } from "../scroll-entries/index.js";
23
- import { e as Ot, D as Mt, ay as bt } from "../tags-DgRVzazL.js";
24
- import { c as Dt } from "../createStylesheet-Zqf3lXhM.js";
23
+ import { e as Ot, D as Mt, ax as bt } from "../tags-D0k7-iVY.js";
24
+ import { c as Dt } from "../createStylesheet-DpGvTRP3.js";
25
25
  import { f as Ut } from "../dom-BY7JhTx5.js";
26
26
  var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s, e, n) => {
27
27
  for (var a = n > 1 ? void 0 : n ? qt(s, e) : s, g = i.length - 1, x; g >= 0; g--)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-B-ZmkQyB.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BNZNGmrW.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;