aptechka 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/lib/{Animation-BCA-DBje.cjs → Animation-BInSRYNr.cjs} +1 -1
  2. package/lib/{Animation-DrSYnbgb.js → Animation-uimN7sdT.js} +1 -1
  3. package/lib/{Composed-pnupzTOv.js → Composed-Fa7owymK.js} +1 -1
  4. package/lib/{Composed-7Fe7TW_T.cjs → Composed-Iihn8fT4.cjs} +1 -1
  5. package/lib/{Damped-CSEZ0qwp.cjs → Damped-Da3EnNN4.cjs} +1 -1
  6. package/lib/{Damped-C2FuK_3K.js → Damped-yrNXlkDE.js} +1 -1
  7. package/lib/{Derived-Dko3EP7m.cjs → Derived-D9VrDuf9.cjs} +1 -1
  8. package/lib/{Derived-CFnbeEgJ.js → Derived-DIWinC7Y.js} +1 -1
  9. package/lib/ElementConstructor-OK-6OPjh.cjs +1 -0
  10. package/lib/{ElementConstructor-CZKbNIQK.js → ElementConstructor-rValMo8f.js} +94 -88
  11. package/lib/{SourceManager-CmhlHGx7.js → SourceManager--L_rA28b.js} +1 -1
  12. package/lib/{SourceManager-DYnGpBi1.cjs → SourceManager-D6D2LVKf.cjs} +1 -1
  13. package/lib/{Store-kzJycezD.cjs → Store-Cr3VaD9G.cjs} +1 -1
  14. package/lib/{Store-Dsft7GtM.js → Store-Qr3SNOSf.js} +1 -1
  15. package/lib/{Tweened-BrD2cPSC.js → Tweened-CjgvoOwL.js} +1 -1
  16. package/lib/{Tweened-D6dAu8Zi.cjs → Tweened-DksN-Rz6.cjs} +1 -1
  17. package/lib/{Viewport-DRNfjjDY.cjs → Viewport-BBYt1Ivy.cjs} +1 -1
  18. package/lib/{Viewport-Ud7nellV.js → Viewport-Cgtq2I_K.js} +1 -1
  19. package/lib/{_createStore-Cf1MyeHa.cjs → _createStore-C75y9luu.cjs} +1 -1
  20. package/lib/_createStore-D3qHYaSz.js +12 -0
  21. package/lib/animation/index.cjs +1 -1
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.js +1 -1
  25. package/lib/canvas/index.cjs +1 -1
  26. package/lib/canvas/index.d.ts +3 -3
  27. package/lib/canvas/index.js +4 -4
  28. package/lib/checkbox/index.cjs +1 -1
  29. package/lib/checkbox/index.js +14 -13
  30. package/lib/class-linked-status/index.cjs +1 -1
  31. package/lib/class-linked-status/index.js +1 -1
  32. package/lib/connector/index.cjs +1 -1
  33. package/lib/connector/index.d.ts +2 -2
  34. package/lib/connector/index.js +39 -34
  35. package/lib/controls/index.cjs +1 -1
  36. package/lib/controls/index.js +2 -2
  37. package/lib/{createStylesheet-Di9WRypw.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
  38. package/lib/{createStylesheet-C2gpLy4r.js → createStylesheet-BrFGJ8Q7.js} +1 -1
  39. package/lib/css-property/index.cjs +1 -1
  40. package/lib/css-property/index.js +1 -1
  41. package/lib/dev/index.cjs +1 -1
  42. package/lib/dev/index.js +1 -1
  43. package/lib/device/index.cjs +1 -1
  44. package/lib/device/index.js +1 -1
  45. package/lib/element-constructor/ElementConstructor.d.ts +6 -5
  46. package/lib/element-constructor/index.cjs +1 -1
  47. package/lib/element-constructor/index.js +3 -3
  48. package/lib/en3/helpers/index.cjs +1 -1
  49. package/lib/en3/helpers/index.js +2 -2
  50. package/lib/en3/misc/index.cjs +1 -1
  51. package/lib/en3/misc/index.js +2 -2
  52. package/lib/image/index.cjs +1 -1
  53. package/lib/image/index.js +1 -1
  54. package/lib/{index-BtB-3MG7.js → index-3R8YL-P3.js} +22 -21
  55. package/lib/index-CyQAdqFu.cjs +9 -0
  56. package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
  57. package/lib/{instantiate-BPZZn8jK.js → instantiate-TYteKsII.js} +7 -7
  58. package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
  59. package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
  60. package/lib/jsx/hooks/animation/index.cjs +1 -0
  61. package/lib/jsx/hooks/animation/index.d.ts +2 -0
  62. package/lib/jsx/hooks/animation/index.js +15 -0
  63. package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
  64. package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
  65. package/lib/jsx/hooks/store/createCached.d.ts +3 -0
  66. package/lib/jsx/hooks/store/createDerived.d.ts +1 -1
  67. package/lib/jsx/hooks/store/index.cjs +1 -1
  68. package/lib/jsx/hooks/store/index.d.ts +1 -0
  69. package/lib/jsx/hooks/store/index.js +20 -16
  70. package/lib/jsx/index.cjs +1 -1
  71. package/lib/jsx/index.d.ts +5 -3
  72. package/lib/jsx/index.js +73 -58
  73. package/lib/jsx/type.d.ts +10 -4
  74. package/lib/ladder/index.cjs +1 -1
  75. package/lib/ladder/index.js +1 -1
  76. package/lib/media/index.cjs +1 -1
  77. package/lib/media/index.js +1 -1
  78. package/lib/modal/index.cjs +1 -1
  79. package/lib/modal/index.js +4 -3
  80. package/lib/order/index.cjs +1 -1
  81. package/lib/order/index.d.ts +5 -4
  82. package/lib/order/index.js +1 -1
  83. package/lib/pointer/index.cjs +1 -1
  84. package/lib/pointer/index.js +2 -2
  85. package/lib/popover/index.cjs +1 -1
  86. package/lib/popover/index.js +3 -2
  87. package/lib/router/index.cjs +1 -1
  88. package/lib/router/index.js +1 -1
  89. package/lib/scroll/index.cjs +1 -1
  90. package/lib/scroll/index.js +7 -7
  91. package/lib/select/index.cjs +1 -1
  92. package/lib/select/index.js +1 -1
  93. package/lib/sequence/index.cjs +1 -1
  94. package/lib/sequence/index.js +1 -1
  95. package/lib/source/index.cjs +1 -1
  96. package/lib/source/index.js +2 -2
  97. package/lib/store/Cached.d.ts +13 -0
  98. package/lib/store/index.cjs +1 -1
  99. package/lib/store/index.d.ts +1 -1
  100. package/lib/store/index.js +66 -32
  101. package/lib/{tags-BBOGIzDK.cjs → tags-BosXYPYv.cjs} +1 -1
  102. package/lib/{tags-CefGDQtF.js → tags-D0kLlFdQ.js} +1 -1
  103. package/lib/theme/index.cjs +1 -1
  104. package/lib/theme/index.js +3 -2
  105. package/lib/tweaker/index.cjs +2 -2
  106. package/lib/tweaker/index.js +6 -5
  107. package/lib/utils/bytes.d.ts +1 -0
  108. package/lib/utils/index.cjs +1 -1
  109. package/lib/utils/index.d.ts +1 -0
  110. package/lib/utils/index.js +122 -105
  111. package/lib/video/index.cjs +1 -1
  112. package/lib/video/index.js +1 -1
  113. package/package.json +9 -1
  114. package/lib/ElementConstructor-9S0f1yAH.cjs +0 -1
  115. package/lib/Resource-BhF6Tj1p.js +0 -49
  116. package/lib/Resource-WCQEgLpB.cjs +0 -1
  117. package/lib/_createStore-Ck9bHolX.js +0 -12
  118. package/lib/index-DQo2-dnB.cjs +0 -9
  119. package/lib/instantiate-BWM-ipPW.cjs +0 -1
  120. package/lib/store/Keyed.d.ts +0 -13
@@ -1,4 +1,4 @@
1
- "use strict";var me=(h,r,e)=>{if(!r.has(h))throw TypeError("Cannot "+e)};var t=(h,r,e)=>(me(h,r,"read from private field"),e?e.call(h):r.get(h)),a=(h,r,e)=>{if(r.has(h))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(h):r.set(h,e)},o=(h,r,e,s)=>(me(h,r,"write to private field"),s?s.call(h,e):r.set(h,e),e);var m=(h,r,e)=>(me(h,r,"access private method"),e);const He=require("../browser-CpzFX2xg.cjs"),p=require("../Store-kzJycezD.cjs"),Ke=require("../file-EevnUtRj.cjs"),Oe=require("../function-MthRj-GJ.cjs"),xe=require("../gestures-DHLrn6Q8.cjs"),n=require("../tags-BBOGIzDK.cjs"),E=require("../createStylesheet-Di9WRypw.cjs"),Ze=require("../Viewport-DRNfjjDY.cjs"),c=require("../theme/index.cjs"),je=require("../index-DQo2-dnB.cjs"),Je=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const We=require("../math-GDWEqu7y.cjs"),fe=require("../polyfills-CM4SCDTt.cjs"),Se=require("../element-resizer/index.cjs"),Ee='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',_e='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',Be='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,w,S;class Xe{constructor(){a(this,L,void 0);a(this,w,void 0);a(this,S,void 0);this.scrollValue=0,o(this,L,""),o(this,w,[]),o(this,S,{}),o(this,L,p.storeRegistry.projectName+"-studio")}openPanel(r){t(this,w).includes(r)||t(this,w).push(r)}closePanel(r){o(this,w,t(this,w).filter(e=>e!==r))}isPanelOpened(r){return t(this,w).includes(r)}changedSizes(r){return t(this,S)[r]}changeSize(r,e){e?t(this,S)[r]=e:delete t(this,S)[r]}save(){const r={openedPanels:t(this,w),changedSizes:t(this,S),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(r)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const r=localStorage.getItem(t(this,L));if(r)try{const e=JSON.parse(r);e.openedPanels&&o(this,w,e.openedPanels),e.changedSizes&&o(this,S,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,w=new WeakMap,S=new WeakMap;const f=new Xe;var T;class O extends HTMLElement{constructor(...e){super();a(this,T,void 0);o(this,T,e)}addStore(e){t(this,T).push(e)}get firstStore(){return t(this,T)[0]}get stores(){return t(this,T)}updateStores(e){t(this,T).forEach(s=>{s.current=e})}}T=new WeakMap;const Ye=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class ze extends O{constructor(...r){super(...r),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(i=>{s.checked=i.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",ze);const Ge=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Te extends O{constructor(...r){super(...r),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Te);const Qe=E.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Re extends O{constructor(...r){var s,i;super(...r),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(i=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Re);const Ue=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,x,R,j,J,y,I,W,_,F,V,B,we,X,be,$,le,Y;class Fe extends O{constructor(...e){var i,l,d,u,k,M,Z,ke;super(...e);a(this,F);a(this,B);a(this,X);a(this,$);a(this,P,[]);a(this,q,[]);a(this,N,void 0);a(this,x,void 0);a(this,R,void 0);a(this,j,void 0);a(this,J,void 0);a(this,y,void 0);a(this,I,!1);a(this,W,e=>{const s=m(this,F,V).call(this,e);return s.map((i,l)=>{const d=typeof i=="string"?parseFloat(i)||t(this,x):i,u=We.clamp(d,t(this,x),t(this,R)),k=fe.toStep(u,t(this,N));s[l]=k}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{m(this,F,V).call(this).map((e,s)=>{const i=t(this,P)[s];i&&(i.value=(e||0).toString())}),m(this,B,we).call(this)});a(this,Y,()=>{m(this,B,we).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),o(this,x,fe.nullishCoalescing((l=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:l.min,-1/0)),o(this,R,fe.nullishCoalescing((u=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:u.max,1/0)),o(this,N,((M=(k=this.firstStore.passport)==null?void 0:k.manager)==null?void 0:M.step)||.01),o(this,j,((ke=(Z=this.firstStore.passport)==null?void 0:Z.manager)==null?void 0:ke.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,y,isFinite(t(this,R))&&isFinite(t(this,x))),n.element(this,{class:t(this,y)?"":"infinite",children:m(this,F,V).call(this).map((Ie,oe)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,x),max:t(this,R),ref:C=>t(this,P).push(C),value:Ie,onChange:()=>{this.updateStores(t(this,P).map(C=>parseFloat(C.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:C=>t(this,q).push(C),onPointerdown:C=>{C.preventDefault(),o(this,I,!0);const ue=m(this,F,V).call(this),Ve=ue[oe],z=t(this,q)[oe],qe=t(this,P)[oe];if(z&&qe){const pe=z.parentElement,Ne=m(this,X,be).call(this);pe.classList.add("grabbing"),xe.setupDrag(ge=>{const ye=ge.x-C.x,$e=t(this,y)?pe.offsetWidth/(Ne||1):1,Ae=Ve+ye/$e*t(this,j);if(ue[oe]=Ae,!t(this,y)){const De=m(this,$,le).call(this,z,0);z.style.transform=`translateX(${De+ye}px)`}this.updateStores([...ue])},()=>{if(o(this,I,!1),!t(this,y)){const ge=m(this,$,le).call(this,z,0);z.style.transition="transform 0.1s",z.style.transform=`translateX(${ge}px)`,pe.classList.remove("grabbing"),setTimeout(()=>{z.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),Se.elementResizer.subscribe(this,t(this,Y))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),Se.elementResizer.unsubscribe(t(this,Y))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,x=new WeakMap,R=new WeakMap,j=new WeakMap,J=new WeakMap,y=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,F=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},B=new WeakSet,we=function(){m(this,F,V).call(this).map((e,s)=>{const i=t(this,q)[s];if(i&&(!t(this,I)||t(this,I)&&t(this,y))){const l=m(this,$,le).call(this,i,e);i.style.transform=`translateX(${l}px)`}})},X=new WeakSet,be=function(){return t(this,y)?t(this,R)-t(this,x):0},$=new WeakSet,le=function(e,s){const i=e.parentElement,l=m(this,X,be).call(this),d=l?s/l:.5;return(i.offsetWidth-e.offsetWidth)*d},Y=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Fe);const et=E.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Me extends O{constructor(...r){var i,l;super(...r),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(et);const s=((l=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,u)=>n.element("e-select-option",{lightChildren:d,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Me);const tt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Le extends O{constructor(...r){super(...r),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Le);const st={boolean:ze,color:Te,link:Re,number:Fe,select:Me,string:Le},it=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var b,A,D,H,K,G,Q;class ve extends HTMLElement{constructor(e){var l,d,u,k;super();a(this,b,[]);a(this,A,void 0);a(this,D,void 0);a(this,H,!1);a(this,K,void 0);a(this,G,()=>{p.activeStores.current.find(e=>t(this,b).includes(e))||this.remove()});a(this,Q,e=>{t(this,H)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,b)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,b).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,b,[e.store]),o(this,A,e.store.passport.name),o(this,D,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,K,new st[s](t(this,b)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(it),n.element(this,{class:{disabled:((k=(u=e.store.passport)==null?void 0:u.manager)==null?void 0:k.disabled)||!1},onPointerleave:()=>{o(this,H,!1)},onPointerenter:()=>{o(this,H,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,D)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:Ce,onClick:()=>{navigator.clipboard.writeText(t(this,b)[0].current)}}),n.button({class:"head-button",children:Ee,onClick:()=>{t(this,b).forEach(M=>{M.reset()})}})]})]}),t(this,K)]})}get key(){return t(this,A)}get name(){return t(this,D)}get stores(){return t(this,b)}addStore(e){t(this,K).addStore(e)}connectedCallback(){p.activeStores.subscribe(t(this,G)),addEventListener("keydown",t(this,Q)),Je.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(t(this,G)),removeEventListener("keydown",t(this,Q))}}b=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",ve);const rt=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var v,U,g,ee,te,se,ie,ce;const de=class de extends HTMLElement{constructor(e){super();a(this,v,void 0);a(this,U,new p.Store(null));a(this,g,new p.Store([]));a(this,ee,void 0);a(this,te,null);a(this,se,null);a(this,ie,null);a(this,ce,e=>{let s=[],i=[];e.forEach(l=>{s=[...s,...l.removedNodes],i=[...i,...l.addedNodes]}),t(this,g).current=t(this,g).current.filter(l=>!s.includes(l)),t(this,v)&&!t(this,g).current.length&&!i.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rt),o(this,v,e.key),o(this,ee,new MutationObserver(t(this,ce))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:i=>{this.classList.toggle("opened"),this.classList.contains("opened")?f.openPanel(t(this,v)):f.closePanel(t(this,v))},children:[t(this,v)?n.div({class:"name",children:[t(this,v).split(".").slice(-1).toString()]}):null,t(this,U),n.element(je.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:i=>{o(this,te,i)},children:n.div({class:"body-content",children:t(this,g),ref:i=>{o(this,se,i),o(this,ie,i.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,v)}get head(){return t(this,U)}get content(){return t(this,g)}get bodyElement(){return t(this,te)}get contentElement(){return t(this,se)}connectedCallback(){f.isPanelOpened(t(this,v))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,ee).observe(t(this,ie),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const i=e.store.passport.name.split("."),l=i.slice(0,i.length-e.remainingFolders.length).join("."),d=t(this,g).current.find(u=>u.key===l);d instanceof de?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,g).current=[...t(this,g).current,new de({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,g).current.find(i=>i.key===e.store.passport.name);s instanceof ve?s.addStore(e.store):t(this,g).current=[...t(this,g).current,new ve({store:e.store})]}}};v=new WeakMap,U=new WeakMap,g=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,ie=new WeakMap,ce=new WeakMap;let he=de;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",he);const nt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
1
+ "use strict";var me=(h,i,e)=>{if(!i.has(h))throw TypeError("Cannot "+e)};var t=(h,i,e)=>(me(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>{if(i.has(h))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(h):i.set(h,e)},o=(h,i,e,s)=>(me(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e);var m=(h,i,e)=>(me(h,i,"access private method"),e);const He=require("../browser-CpzFX2xg.cjs"),p=require("../Store-Cr3VaD9G.cjs"),Ke=require("../file-EevnUtRj.cjs"),Oe=require("../function-MthRj-GJ.cjs"),xe=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-BosXYPYv.cjs"),E=require("../createStylesheet-9nksoWW0.cjs"),Ze=require("../Viewport-BBYt1Ivy.cjs"),c=require("../theme/index.cjs"),je=require("../index-CyQAdqFu.cjs"),Je=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const We=require("../math-GDWEqu7y.cjs"),fe=require("../polyfills-CM4SCDTt.cjs"),Se=require("../element-resizer/index.cjs"),Ee='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',_e='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',Be='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,w,S;class Xe{constructor(){a(this,L,void 0);a(this,w,void 0);a(this,S,void 0);this.scrollValue=0,o(this,L,""),o(this,w,[]),o(this,S,{}),o(this,L,p.storeRegistry.projectName+"-studio")}openPanel(i){t(this,w).includes(i)||t(this,w).push(i)}closePanel(i){o(this,w,t(this,w).filter(e=>e!==i))}isPanelOpened(i){return t(this,w).includes(i)}changedSizes(i){return t(this,S)[i]}changeSize(i,e){e?t(this,S)[i]=e:delete t(this,S)[i]}save(){const i={openedPanels:t(this,w),changedSizes:t(this,S),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,w,e.openedPanels),e.changedSizes&&o(this,S,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,w=new WeakMap,S=new WeakMap;const f=new Xe;var T;class O extends HTMLElement{constructor(...e){super();a(this,T,void 0);o(this,T,e)}addStore(e){t(this,T).push(e)}get firstStore(){return t(this,T)[0]}get stores(){return t(this,T)}updateStores(e){t(this,T).forEach(s=>{s.current=e})}}T=new WeakMap;const Ye=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:c.aptechkaTheme.borderRadiusSmall.var}});class ze extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",ze);const Ge=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Te extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Te);const Qe=E.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Re extends O{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Re);const Ue=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,x,R,j,J,y,I,W,_,F,V,B,we,X,be,$,le,Y;class Fe extends O{constructor(...e){var r,l,d,u,k,M,Z,ke;super(...e);a(this,F);a(this,B);a(this,X);a(this,$);a(this,P,[]);a(this,q,[]);a(this,N,void 0);a(this,x,void 0);a(this,R,void 0);a(this,j,void 0);a(this,J,void 0);a(this,y,void 0);a(this,I,!1);a(this,W,e=>{const s=m(this,F,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,x):r,u=We.clamp(d,t(this,x),t(this,R)),k=fe.toStep(u,t(this,N));s[l]=k}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{m(this,F,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),m(this,B,we).call(this)});a(this,Y,()=>{m(this,B,we).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),o(this,x,fe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,R,fe.nullishCoalescing((u=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:u.max,1/0)),o(this,N,((M=(k=this.firstStore.passport)==null?void 0:k.manager)==null?void 0:M.step)||.01),o(this,j,((ke=(Z=this.firstStore.passport)==null?void 0:Z.manager)==null?void 0:ke.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,y,isFinite(t(this,R))&&isFinite(t(this,x))),n.element(this,{class:t(this,y)?"":"infinite",children:m(this,F,V).call(this).map((Ie,oe)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,x),max:t(this,R),ref:C=>t(this,P).push(C),value:Ie,onChange:()=>{this.updateStores(t(this,P).map(C=>parseFloat(C.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:C=>t(this,q).push(C),onPointerdown:C=>{C.preventDefault(),o(this,I,!0);const ue=m(this,F,V).call(this),Ve=ue[oe],z=t(this,q)[oe],qe=t(this,P)[oe];if(z&&qe){const pe=z.parentElement,Ne=m(this,X,be).call(this);pe.classList.add("grabbing"),xe.setupDrag(ge=>{const ye=ge.x-C.x,$e=t(this,y)?pe.offsetWidth/(Ne||1):1,Ae=Ve+ye/$e*t(this,j);if(ue[oe]=Ae,!t(this,y)){const De=m(this,$,le).call(this,z,0);z.style.transform=`translateX(${De+ye}px)`}this.updateStores([...ue])},()=>{if(o(this,I,!1),!t(this,y)){const ge=m(this,$,le).call(this,z,0);z.style.transition="transform 0.1s",z.style.transform=`translateX(${ge}px)`,pe.classList.remove("grabbing"),setTimeout(()=>{z.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),Se.elementResizer.subscribe(this,t(this,Y))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),Se.elementResizer.unsubscribe(t(this,Y))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,x=new WeakMap,R=new WeakMap,j=new WeakMap,J=new WeakMap,y=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,F=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},B=new WeakSet,we=function(){m(this,F,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,y))){const l=m(this,$,le).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},X=new WeakSet,be=function(){return t(this,y)?t(this,R)-t(this,x):0},$=new WeakSet,le=function(e,s){const r=e.parentElement,l=m(this,X,be).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},Y=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Fe);const et=E.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Me extends O{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(et);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,u)=>n.element("e-select-option",{lightChildren:d,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Me);const tt=E.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var}});class Le extends O{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Le);const st={boolean:ze,color:Te,link:Re,number:Fe,select:Me,string:Le},rt=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var b,A,D,H,K,G,Q;class ve extends HTMLElement{constructor(e){var l,d,u,k;super();a(this,b,[]);a(this,A,void 0);a(this,D,void 0);a(this,H,!1);a(this,K,void 0);a(this,G,()=>{p.activeStores.current.find(e=>t(this,b).includes(e))||this.remove()});a(this,Q,e=>{t(this,H)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,b)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,b).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,b,[e.store]),o(this,A,e.store.passport.name),o(this,D,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,K,new st[s](t(this,b)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rt),n.element(this,{class:{disabled:((k=(u=e.store.passport)==null?void 0:u.manager)==null?void 0:k.disabled)||!1},onPointerleave:()=>{o(this,H,!1)},onPointerenter:()=>{o(this,H,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,D)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:Ce,onClick:()=>{navigator.clipboard.writeText(t(this,b)[0].current)}}),n.button({class:"head-button",children:Ee,onClick:()=>{t(this,b).forEach(M=>{M.reset()})}})]})]}),t(this,K)]})}get key(){return t(this,A)}get name(){return t(this,D)}get stores(){return t(this,b)}addStore(e){t(this,K).addStore(e)}connectedCallback(){p.activeStores.subscribe(t(this,G)),addEventListener("keydown",t(this,Q)),Je.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(t(this,G)),removeEventListener("keydown",t(this,Q))}}b=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,K=new WeakMap,G=new WeakMap,Q=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",ve);const it=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var v,U,g,ee,te,se,re,ce;const de=class de extends HTMLElement{constructor(e){super();a(this,v,void 0);a(this,U,new p.Store(null));a(this,g,new p.Store([]));a(this,ee,void 0);a(this,te,null);a(this,se,null);a(this,re,null);a(this,ce,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,g).current=t(this,g).current.filter(l=>!s.includes(l)),t(this,v)&&!t(this,g).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(it),o(this,v,e.key),o(this,ee,new MutationObserver(t(this,ce))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?f.openPanel(t(this,v)):f.closePanel(t(this,v))},children:[t(this,v)?n.div({class:"name",children:[t(this,v).split(".").slice(-1).toString()]}):null,t(this,U),n.element(je.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,te,r)},children:n.div({class:"body-content",children:t(this,g),ref:r=>{o(this,se,r),o(this,re,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,v)}get head(){return t(this,U)}get content(){return t(this,g)}get bodyElement(){return t(this,te)}get contentElement(){return t(this,se)}connectedCallback(){f.isPanelOpened(t(this,v))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,ee).observe(t(this,re),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,g).current.find(u=>u.key===l);d instanceof de?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,g).current=[...t(this,g).current,new de({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,g).current.find(r=>r.key===e.store.passport.name);s instanceof ve?s.addStore(e.store):t(this,g).current=[...t(this,g).current,new ve({store:e.store})]}}};v=new WeakMap,U=new WeakMap,g=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,re=new WeakMap,ce=new WeakMap;let he=de;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",he);const nt=E.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
2
2
  100dvh -
3
3
  (
4
4
  var(--tweaker-offset) * 2 +
@@ -7,4 +7,4 @@
7
7
  )`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Ze.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
8
8
  100dvh -
9
9
  var(--tweaker-folder-height)
10
- )`}}});var re,ne,ae;class Pe extends he{constructor(){super({key:""});a(this,re,!1);a(this,ne,()=>{f.save()});a(this,ae,Oe.debounce(()=>{p.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const i=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),t(this,re)||(o(this,re,!0),this.contentElement.scroll({top:f.scrollValue}),this.contentElement.addEventListener("scroll",()=>{f.scrollValue=this.contentElement.scrollTop}))},10));f.load(),this.shadowRoot.adoptedStyleSheets.push(nt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Ee,onClick:()=>{p.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[Ce],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(p.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:_e,onClick:()=>{Ke.createJSONAndSave(p.storeRegistry.projectName,p.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[Be,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const i=(l=e.currentTarget.files)==null?void 0:l[0];if(i){const d=new FileReader;d.onload=u=>{var M,Z;const k=(Z=(M=u.target)==null?void 0:M.result)==null?void 0:Z.toString();k&&p.storeRegistry.loadState(k)},d.readAsText(i)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),i=this.contentElement.scrollTop;xe.setupDrag(l=>{const d=e.x-l.x,u=Math.max(400,s.width+d);this.style.width=u+"px",f.changeSize("tweaker",u)},()=>{setTimeout(()=>{this.contentElement.scroll({top:i})},10)})},onDblclick:()=>{this.style.width="",f.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,ne)),p.activeStores.subscribe(t(this,ae)),f.changedSizes("tweaker")&&(this.style.width=f.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,ne)),f.save(),p.activeStores.unsubscribe(t(this,ae))}}re=new WeakMap,ne=new WeakMap,ae=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Pe);He.isBrowser&&document.body.appendChild(new Pe);
10
+ )`}}});var ie,ne,ae;class Pe extends he{constructor(){super({key:""});a(this,ie,!1);a(this,ne,()=>{f.save()});a(this,ae,Oe.debounce(()=>{p.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const r=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),t(this,ie)||(o(this,ie,!0),this.contentElement.scroll({top:f.scrollValue}),this.contentElement.addEventListener("scroll",()=>{f.scrollValue=this.contentElement.scrollTop}))},10));f.load(),this.shadowRoot.adoptedStyleSheets.push(nt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Ee,onClick:()=>{p.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[Ce],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(p.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:_e,onClick:()=>{Ke.createJSONAndSave(p.storeRegistry.projectName,p.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[Be,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const r=(l=e.currentTarget.files)==null?void 0:l[0];if(r){const d=new FileReader;d.onload=u=>{var M,Z;const k=(Z=(M=u.target)==null?void 0:M.result)==null?void 0:Z.toString();k&&p.storeRegistry.loadState(k)},d.readAsText(r)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;xe.setupDrag(l=>{const d=e.x-l.x,u=Math.max(400,s.width+d);this.style.width=u+"px",f.changeSize("tweaker",u)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",f.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,ne)),p.activeStores.subscribe(t(this,ae)),f.changedSizes("tweaker")&&(this.style.width=f.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,ne)),f.save(),p.activeStores.unsubscribe(t(this,ae))}}ie=new WeakMap,ne=new WeakMap,ae=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Pe);He.isBrowser&&document.body.appendChild(new Pe);
@@ -9,15 +9,16 @@ var t = (l, r, e) => (ve(l, r, "read from private field"), e ? e.call(l) : r.get
9
9
  }, n = (l, r, e, s) => (ve(l, r, "write to private field"), s ? s.call(l, e) : r.set(l, e), e);
10
10
  var m = (l, r, e) => (ve(l, r, "access private method"), e);
11
11
  import { i as We } from "../browser-0zX67oeU.js";
12
- import { s as R, a as N, S as Ce } from "../Store-Dsft7GtM.js";
12
+ import { s as R, a as N, S as Ce } from "../Store-Qr3SNOSf.js";
13
13
  import { c as Be } from "../file-lxi_oXJf.js";
14
14
  import { d as Xe } from "../function-C10DGppn.js";
15
15
  import { s as Te } from "../gestures-D2Fdra_G.js";
16
- import { e as g, $ as me, a as Ye, D as u, aA as qe, p as B, a2 as Ge } from "../tags-CefGDQtF.js";
17
- import { c as E } from "../createStylesheet-C2gpLy4r.js";
18
- import { a as Qe } from "../Viewport-Ud7nellV.js";
16
+ import "../ticker/index.js";
17
+ import { e as g, $ as me, a as Ye, D as u, aA as qe, p as B, a2 as Ge } from "../tags-D0kLlFdQ.js";
18
+ import { c as E } from "../createStylesheet-BrFGJ8Q7.js";
19
+ import { a as Qe } from "../Viewport-Cgtq2I_K.js";
19
20
  import { aptechkaTheme as h } from "../theme/index.js";
20
- import { a as Ue } from "../index-BtB-3MG7.js";
21
+ import { a as Ue } from "../index-3R8YL-P3.js";
21
22
  import { a as _e } from "../events-CJTUMSLU.js";
22
23
  import "../checkbox/index.js";
23
24
  import { c as et } from "../math-BOBiC4TN.js";
@@ -0,0 +1 @@
1
+ export declare function formatBytes(bytes: number, decimals?: number): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),m=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),n=require("../easings-DsS5-Kqc.cjs"),h=require("../events-BGwqaxVW.cjs"),I=require("../file-EevnUtRj.cjs"),C=require("../function-MthRj-GJ.cjs"),v=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),i=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),o=require("../object-CCiXnER2.cjs"),r=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),g=require("../url-C3dWnJQg.cjs");function y(t,e,...a){return[...t.slice(0,e),...a,...t.slice(e)]}function P(t,e){const a=t.length;e=e%a;const s=new Array(a);for(let u=0;u<a;u++){const c=(u+e)%a;s[c]=t[u]}return s}function T(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const a=t.styleMap.get(e);if(a){const s=a.toString();return s.startsWith("var")?E(t,s.slice(4,-1)):s}}function x(...t){const e={};return Array.from(document.styleSheets).forEach(a=>{Array.from(a.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&t.forEach(u=>{const c=E(s,u);c&&(e[u]=c)})})}),t.forEach(a=>{e[a]||console.warn(`variable named ${a} not found`)}),e}function Q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function D(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=m.getPointerPosition;exports.normalize=m.normalize;exports.screenToCartesian=m.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=n.easeInCubic;exports.easeInExpo=n.easeInExpo;exports.easeInOutCubic=n.easeInOutCubic;exports.easeInOutExpo=n.easeInOutExpo;exports.easeInOutQuad=n.easeInOutQuad;exports.easeInOutQuart=n.easeInOutQuart;exports.easeInOutQuint=n.easeInOutQuint;exports.easeInQuad=n.easeInQuad;exports.easeInQuart=n.easeInQuart;exports.easeInQuint=n.easeInQuint;exports.easeOutCubic=n.easeOutCubic;exports.easeOutExpo=n.easeOutExpo;exports.easeOutQuad=n.easeOutQuad;exports.easeOutQuart=n.easeOutQuart;exports.easeOutQuint=n.easeOutQuint;exports.linear=n.linear;exports.dispatchBeforeSizeChangeEvent=h.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=h.dispatchSizeChangeEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=v.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.cloneDeep=o.cloneDeep;exports.compareObjects=o.compareObjects;exports.isESClass=o.isESClass;exports.isNullish=o.isNullish;exports.isObject=o.isObject;exports.mergeDeep=o.mergeDeep;exports.mixin=o.mixin;exports.omit=o.omit;exports.pick=o.pick;exports.camelToKebab=r.camelToKebab;exports.capitalize=r.capitalize;exports.generateId=r.generateId;exports.isUppercase=r.isUppercase;exports.kebabToCamel=r.kebabToCamel;exports.snakeToDotted=r.snakeToDotted;exports.toPascalCase=r.toPascalCase;exports.uncapitalize=r.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=D;exports.dotCircleCollision=q;exports.dotRectCollision=T;exports.encode=Q;exports.getRootVariables=x;exports.insert=y;exports.shiftArray=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),m=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),b=require("../events-BGwqaxVW.cjs"),I=require("../file-EevnUtRj.cjs"),C=require("../function-MthRj-GJ.cjs"),y=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),s=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),r=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),g=require("../url-C3dWnJQg.cjs");function v(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function P(t,e){const n=t.length;e=e%n;const i=new Array(n);for(let o=0;o<n;o++){const c=(o+e)%n;i[c]=t[o]}return i}function T(t,e=2){if(!+t)return"0 Bytes";const n=1024,i=e<0?0:e,o=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(i))} ${o[c]}`}function x(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const n=t.styleMap.get(e);if(n){const i=n.toString();return i.startsWith("var")?E(t,i.slice(4,-1)):i}}function B(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(o=>{const c=E(i,o);c&&(e[o]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function Q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function w(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=m.getPointerPosition;exports.normalize=m.normalize;exports.screenToCartesian=m.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.dispatchBeforeSizeChangeEvent=b.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=b.dispatchSizeChangeEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=y.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=s.calculateDistance;exports.calculateDistanceWithRadius=s.calculateDistanceWithRadius;exports.clamp=s.clamp;exports.damp=s.damp;exports.lerp=s.lerp;exports.mapRange=s.mapRange;exports.round=s.round;exports.smootherstep=s.smootherstep;exports.smoothstep=s.smoothstep;exports.step=s.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=w;exports.dotCircleCollision=q;exports.dotRectCollision=x;exports.encode=Q;exports.formatBytes=T;exports.getRootVariables=B;exports.insert=v;exports.shiftArray=P;
@@ -1,6 +1,7 @@
1
1
  export * from './array';
2
2
  export * from './attributes';
3
3
  export * from './browser';
4
+ export * from './bytes';
4
5
  export * from './canvas';
5
6
  export * from './collisions';
6
7
  export * from './coordinates';
@@ -1,148 +1,165 @@
1
- import { a as g, p as b } from "../attributes-69we3byR.js";
2
- import { i as C } from "../browser-0zX67oeU.js";
3
- import { a as S, c as O, f as y, m as w } from "../canvas-DeZ0SLUJ.js";
1
+ import { a as h, p as b } from "../attributes-69we3byR.js";
2
+ import { i as E } from "../browser-0zX67oeU.js";
3
+ import { a as y, c as O, f as w, m as B } from "../canvas-DeZ0SLUJ.js";
4
4
  import { g as v, n as P, s as T } from "../coordinates-CgdGoSYs.js";
5
- import { f as Q, b as D, g as R, a as z } from "../dom-P5QbAASX.js";
6
- import { c as j, n as N, f as V, p as B, b as M, i as U, m as W, e as q, g as H, j as J, d as K, o as L, a as $, h as F, k as G, l as X } from "../easings-BKi40vHz.js";
7
- import { d as Z, a as _ } from "../events-CJTUMSLU.js";
8
- import { c as ae } from "../file-lxi_oXJf.js";
9
- import { d as te, t as oe } from "../function-C10DGppn.js";
10
- import { s as re } from "../gestures-D2Fdra_G.js";
11
- import { g as ce, a as ue, b as le } from "../layout-HoBT_Da2.js";
12
- import { e as pe, f as me, c as de, d as xe, l as ge, m as be, r as he, b as Ce, a as Ee, s as Se } from "../math-BOBiC4TN.js";
13
- import { n as ye, p as we, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
14
- import { c as Te, d as Ae, i as Qe, b as De, a as Re, m as ze, e as ke, o as je, p as Ne } from "../object-D6MVWB4l.js";
15
- import { c as Be, a as Me, g as Ue, i as We, k as qe, s as He, t as Je, u as Ke } from "../string-f0Dnk0L1.js";
16
- import { g as $e, a as Fe } from "../style-j2TwriJ_.js";
17
- import { c as Xe, n as Ye, s as Ze } from "../url-DMNfW7uN.js";
18
- function i(a, e, ...s) {
19
- return [...a.slice(0, e), ...s, ...a.slice(e)];
5
+ import { f as Q, b as D, g as M, a as R } from "../dom-P5QbAASX.js";
6
+ import { c as k, n as j, f as N, p as V, b as U, i as $, m as F, e as K, g as W, j as q, d as G, o as H, a as J, h as L, k as Y, l as Z } from "../easings-BKi40vHz.js";
7
+ import { d as _, a as ee } from "../events-CJTUMSLU.js";
8
+ import { c as te } from "../file-lxi_oXJf.js";
9
+ import { d as oe, t as ne } from "../function-C10DGppn.js";
10
+ import { s as ie } from "../gestures-D2Fdra_G.js";
11
+ import { g as ue, a as le, b as fe } from "../layout-HoBT_Da2.js";
12
+ import { e as me, f as de, c as ge, d as xe, l as he, m as be, r as Ce, b as Ee, a as Se, s as ye } from "../math-BOBiC4TN.js";
13
+ import { n as we, p as Be, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
14
+ import { c as Te, d as Ae, i as Qe, b as De, a as Me, m as Re, e as ze, o as ke, p as je } from "../object-D6MVWB4l.js";
15
+ import { c as Ve, a as Ue, g as $e, i as Fe, k as Ke, s as We, t as qe, u as Ge } from "../string-f0Dnk0L1.js";
16
+ import { g as Je, a as Le } from "../style-j2TwriJ_.js";
17
+ import { c as Ze, n as Xe, s as _e } from "../url-DMNfW7uN.js";
18
+ function i(a, e, ...t) {
19
+ return [...a.slice(0, e), ...t, ...a.slice(e)];
20
20
  }
21
21
  function c(a, e) {
22
- const s = a.length;
23
- e = e % s;
24
- const t = new Array(s);
25
- for (let o = 0; o < s; o++) {
26
- const n = (o + e) % s;
27
- t[n] = a[o];
22
+ const t = a.length;
23
+ e = e % t;
24
+ const s = new Array(t);
25
+ for (let o = 0; o < t; o++) {
26
+ const n = (o + e) % t;
27
+ s[n] = a[o];
28
28
  }
29
- return t;
29
+ return s;
30
30
  }
31
- function u(a, e) {
32
- return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
31
+ function u(a, e = 2) {
32
+ if (!+a)
33
+ return "0 Bytes";
34
+ const t = 1024, s = e < 0 ? 0 : e, o = [
35
+ "Bytes",
36
+ "KiB",
37
+ "MiB",
38
+ "GiB",
39
+ "TiB",
40
+ "PiB",
41
+ "EiB",
42
+ "ZiB",
43
+ "YiB"
44
+ ], n = Math.floor(Math.log(a) / Math.log(t));
45
+ return `${parseFloat((a / Math.pow(t, n)).toFixed(s))} ${o[n]}`;
33
46
  }
34
47
  function l(a, e) {
48
+ return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
49
+ }
50
+ function f(a, e) {
35
51
  return Math.sqrt((a.x - e.x) ** 2 + (a.y - e.y) ** 2) < e.radius;
36
52
  }
37
53
  function r(a, e) {
38
- const s = a.styleMap.get(e);
39
- if (s) {
40
- const t = s.toString();
41
- return t.startsWith("var") ? r(a, t.slice(4, -1)) : t;
54
+ const t = a.styleMap.get(e);
55
+ if (t) {
56
+ const s = t.toString();
57
+ return s.startsWith("var") ? r(a, s.slice(4, -1)) : s;
42
58
  }
43
59
  }
44
- function f(...a) {
60
+ function p(...a) {
45
61
  const e = {};
46
- return Array.from(document.styleSheets).forEach((s) => {
47
- Array.from(s.cssRules).forEach((t) => {
48
- t instanceof CSSStyleRule && t.selectorText === ":root" && a.forEach((o) => {
49
- const n = r(t, o);
62
+ return Array.from(document.styleSheets).forEach((t) => {
63
+ Array.from(t.cssRules).forEach((s) => {
64
+ s instanceof CSSStyleRule && s.selectorText === ":root" && a.forEach((o) => {
65
+ const n = r(s, o);
50
66
  n && (e[o] = n);
51
67
  });
52
68
  });
53
- }), a.forEach((s) => {
54
- e[s] || console.warn(`variable named ${s} not found`);
69
+ }), a.forEach((t) => {
70
+ e[t] || console.warn(`variable named ${t} not found`);
55
71
  }), e;
56
72
  }
57
- function p(a) {
73
+ function m(a) {
58
74
  const e = window.atob(a);
59
75
  return decodeURIComponent(window.escape(e));
60
76
  }
61
- function m(a) {
77
+ function d(a) {
62
78
  const e = window.unescape(encodeURIComponent(a));
63
79
  return window.btoa(e);
64
80
  }
65
81
  export {
66
- pe as calculateDistance,
67
- me as calculateDistanceWithRadius,
68
- Be as camelToKebab,
69
- Me as capitalize,
70
- Xe as changeHistory,
71
- de as clamp,
82
+ me as calculateDistance,
83
+ de as calculateDistanceWithRadius,
84
+ Ve as camelToKebab,
85
+ Ue as capitalize,
86
+ Ze as changeHistory,
87
+ ge as clamp,
72
88
  Te as cloneDeep,
73
89
  Ae as compareObjects,
74
- S as contain,
90
+ y as contain,
75
91
  O as cover,
76
- ae as createJSONAndSave,
92
+ te as createJSONAndSave,
77
93
  xe as damp,
78
- te as debounce,
79
- m as decode,
80
- Z as dispatchBeforeSizeChangeEvent,
81
- _ as dispatchSizeChangeEvent,
82
- l as dotCircleCollision,
83
- u as dotRectCollision,
84
- j as easeInCubic,
85
- N as easeInExpo,
86
- V as easeInOutCubic,
87
- B as easeInOutExpo,
88
- M as easeInOutQuad,
89
- U as easeInOutQuart,
90
- W as easeInOutQuint,
91
- q as easeInQuad,
92
- H as easeInQuart,
93
- J as easeInQuint,
94
- K as easeOutCubic,
95
- L as easeOutExpo,
96
- $ as easeOutQuad,
97
- F as easeOutQuart,
98
- G as easeOutQuint,
99
- p as encode,
94
+ oe as debounce,
95
+ d as decode,
96
+ _ as dispatchBeforeSizeChangeEvent,
97
+ ee as dispatchSizeChangeEvent,
98
+ f as dotCircleCollision,
99
+ l as dotRectCollision,
100
+ k as easeInCubic,
101
+ j as easeInExpo,
102
+ N as easeInOutCubic,
103
+ V as easeInOutExpo,
104
+ U as easeInOutQuad,
105
+ $ as easeInOutQuart,
106
+ F as easeInOutQuint,
107
+ K as easeInQuad,
108
+ W as easeInQuart,
109
+ q as easeInQuint,
110
+ G as easeOutCubic,
111
+ H as easeOutExpo,
112
+ J as easeOutQuad,
113
+ L as easeOutQuart,
114
+ Y as easeOutQuint,
115
+ m as encode,
100
116
  Q as findParentElement,
101
117
  D as findScrollParentElement,
102
- y as fixPosition,
103
- Ue as generateId,
104
- R as getAllParentElements,
105
- ce as getCumulativeOffsetLeft,
106
- ue as getCumulativeOffsetTop,
107
- le as getCumulativePosition,
108
- z as getElement,
109
- $e as getElementTransitionDurationMS,
110
- Fe as getElementTransitionDurationS,
118
+ w as fixPosition,
119
+ u as formatBytes,
120
+ $e as generateId,
121
+ M as getAllParentElements,
122
+ ue as getCumulativeOffsetLeft,
123
+ le as getCumulativeOffsetTop,
124
+ fe as getCumulativePosition,
125
+ R as getElement,
126
+ Je as getElementTransitionDurationMS,
127
+ Le as getElementTransitionDurationS,
111
128
  v as getPointerPosition,
112
- f as getRootVariables,
129
+ p as getRootVariables,
113
130
  i as insert,
114
- C as isBrowser,
131
+ E as isBrowser,
115
132
  Qe as isESClass,
116
133
  De as isNullish,
117
- Re as isObject,
118
- We as isUppercase,
119
- qe as kebabToCamel,
120
- ge as lerp,
121
- X as linear,
134
+ Me as isObject,
135
+ Fe as isUppercase,
136
+ Ke as kebabToCamel,
137
+ he as lerp,
138
+ Z as linear,
122
139
  be as mapRange,
123
- w as measureText,
124
- ze as mergeDeep,
125
- ke as mixin,
140
+ B as measureText,
141
+ Re as mergeDeep,
142
+ ze as mixin,
126
143
  P as normalize,
127
- Ye as normalizeBase,
128
- ye as nullishCoalescing,
129
- je as omit,
130
- g as parseAttribute,
144
+ Xe as normalizeBase,
145
+ we as nullishCoalescing,
146
+ ke as omit,
147
+ h as parseAttribute,
131
148
  b as parseAttributeValue,
132
- Ne as pick,
133
- we as preciseNumber,
134
- he as round,
149
+ je as pick,
150
+ Be as preciseNumber,
151
+ Ce as round,
135
152
  Ie as roundNumberTo,
136
153
  T as screenToCartesian,
137
- re as setupDrag,
154
+ ie as setupDrag,
138
155
  c as shiftArray,
139
- Ce as smootherstep,
140
- Ee as smoothstep,
141
- He as snakeToDotted,
142
- Ze as splitPath,
143
- Se as step,
144
- oe as throttle,
145
- Je as toPascalCase,
156
+ Ee as smootherstep,
157
+ Se as smoothstep,
158
+ We as snakeToDotted,
159
+ _e as splitPath,
160
+ ye as step,
161
+ ne as throttle,
162
+ qe as toPascalCase,
146
163
  ve as toStep,
147
- Ke as uncapitalize
164
+ Ge as uncapitalize
148
165
  };
@@ -1 +1 @@
1
- "use strict";var l=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(l(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,o)=>(l(t,s,"write to private field"),o?o.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-kzJycezD.cjs");const h=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class d extends h.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>i(this,r)&&c(this,r,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",d);exports.VideoElement=d;
1
+ "use strict";var l=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(l(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,o)=>(l(t,s,"write to private field"),o?o.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-Cr3VaD9G.cjs");const h=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class d extends h.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>i(this,r)&&c(this,r,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",d);exports.VideoElement=d;
@@ -8,7 +8,7 @@ var i = (t, s, e) => (m(t, s, "read from private field"), e ? e.call(t) : s.get(
8
8
  s instanceof WeakSet ? s.add(t) : s.set(t, e);
9
9
  }, c = (t, s, e, u) => (m(t, s, "write to private field"), u ? u.call(t, e) : s.set(t, e), e);
10
10
  import "../window-resizer/index.js";
11
- import "../Store-Dsft7GtM.js";
11
+ import "../Store-Qr3SNOSf.js";
12
12
  import { SourceElement as h } from "../source/index.js";
13
13
  import { ticker as o } from "../ticker/index.js";
14
14
  var r, a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -138,6 +138,11 @@
138
138
  "default": "./lib/jsx/index.js",
139
139
  "types": "./lib/jsx/index.d.ts"
140
140
  },
141
+ "./jsx/hooks/animation": {
142
+ "require": "./lib/jsx/hooks/animation/index.cjs",
143
+ "default": "./lib/jsx/hooks/animation/index.js",
144
+ "types": "./lib/jsx/hooks/animation/index.d.ts"
145
+ },
141
146
  "./jsx/hooks/store": {
142
147
  "require": "./lib/jsx/hooks/store/index.cjs",
143
148
  "default": "./lib/jsx/hooks/store/index.js",
@@ -376,6 +381,9 @@
376
381
  "jsx": [
377
382
  "lib/jsx/index.d.ts"
378
383
  ],
384
+ "jsx/hooks/animation": [
385
+ "lib/jsx/hooks/animation/index.d.ts"
386
+ ],
379
387
  "jsx/hooks/store": [
380
388
  "lib/jsx/hooks/store/index.d.ts"
381
389
  ],
@@ -1 +0,0 @@
1
- "use strict";var Z=(f,e,t)=>{if(!e.has(f))throw TypeError("Cannot "+t)};var i=(f,e,t)=>(Z(f,e,"read from private field"),t?t.call(f):e.get(f)),c=(f,e,t)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,t)},E=(f,e,t,s)=>(Z(f,e,"write to private field"),s?s.call(f,t):e.set(f,t),t);var r=(f,e,t)=>(Z(f,e,"access private method"),t);const b=require("./Store-kzJycezD.cjs"),he=require("./browser-CpzFX2xg.cjs"),de=require("./object-CCiXnER2.cjs"),_=require("./string-DhgS_iFl.cjs"),we=require("./connector/index.cjs"),Le=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var o,S,l,w,d,u,P,ue,B,me,R,ge,L,j,T,ee,G,Se,W,Ee,$,be,z,Ce,v,te,A,se,I,ye,k,ie,M,ne,J,pe,D,oe,N,F,x,re,q,ce,H,ae,V,K;const U=class U{constructor(...e){c(this,P);c(this,B);c(this,R);c(this,L);c(this,T);c(this,G);c(this,W);c(this,$);c(this,z);c(this,v);c(this,A);c(this,I);c(this,k);c(this,M);c(this,J);c(this,D);c(this,N);c(this,x);c(this,q);c(this,H);c(this,o,null);c(this,S,new Set);c(this,l,new Set);c(this,w,void 0);c(this,d,void 0);c(this,u,void 0);c(this,V,()=>{i(this,S).forEach(e=>{e()}),i(this,S).clear()});c(this,K,e=>{i(this,l).forEach(t=>{t(e)}),i(this,l).clear(),r(this,M,ne).call(this)});if(he.isBrowser){const t=e[0],s=e[1];E(this,o,r(this,P,ue).call(this,t,s==null?void 0:s.forceSvg)),r(this,R,ge).call(this,s)}}get node(){return i(this,o)}set node(e){var t;r(this,M,ne).call(this),E(this,o,e),(t=i(this,w))==null||t.call(this),i(this,o)instanceof Element&&E(this,d,[...i(this,o).querySelectorAll("store-root")]),r(this,k,ie).call(this),r(this,L,j).call(this)}};o=new WeakMap,S=new WeakMap,l=new WeakMap,w=new WeakMap,d=new WeakMap,u=new WeakMap,P=new WeakSet,ue=function(e,t){let s=null;if(e instanceof Node)s=e;else if(typeof e=="string")if(!e.includes("<")&&e.includes("-"))s=new(customElements.get(e));else if(e.includes("<")){const n=document.createElement("div");n.innerHTML=e,s=n.firstElementChild}else Le.has(e)||t?s=document.createElementNS("http://www.w3.org/2000/svg",e):s=document.createElement(e);else s=document.createElement("div");return s},B=new WeakSet,me=function(e){return e instanceof HTMLElement||e instanceof SVGElement},R=new WeakSet,ge=function(e){if(!e)return;const t=r(this,B,me).call(this,i(this,o)),s=e.ref;delete e.ref,e!=null&&e.onConnect&&(i(this,S).add(e.onConnect),delete e.onConnect),e!=null&&e.onDisconnect&&(i(this,l).add(e.onDisconnect),delete e.onDisconnect);let n,a;for(const h in e){const m=e[h];h==="class"&&t?r(this,T,ee).call(this,m):h==="style"&&t?r(this,$,be).call(this,m):h==="lightChildren"?r(this,N,F).call(this,i(this,o),m):h==="children"?r(this,N,F).call(this,i(this,o)instanceof Element?i(this,o).shadowRoot||i(this,o):i(this,o),m):h.startsWith("on")?(a||(a={}),a[h]=m):(n||(n={}),n[h]=m)}r(this,J,pe).call(this,n),r(this,I,ye).call(this,a),s&&(typeof s=="function"?s(i(this,o)):s.current=i(this,o)),r(this,L,j).call(this)},L=new WeakSet,j=function(){if(he.isBrowser&&(i(this,l).size||i(this,S).size)){const e=i(this,o)instanceof DocumentFragment?i(this,o).firstChild:i(this,o);E(this,w,we.connector.subscribe(e,{connectCallback:i(this,V),disconnectCallback:i(this,K),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,ee=function(e){if(e){if(typeof e=="string")i(this,o).classList.add(e);else if(Array.isArray(e))e.forEach(t=>{r(this,T,ee).call(this,t)});else if(typeof e=="object")if(e instanceof b.Store)r(this,G,Se).call(this,e);else for(const t in e){const s=e[t];s instanceof b.Store?r(this,W,Ee).call(this,t,s):s?i(this,o).classList.add(t):i(this,o).classList.remove(t)}}else return},G=new WeakSet,Se=function(e){i(this,l).add(e.subscribe(({current:t,previous:s})=>{s&&[s].flat().forEach(n=>{n&&i(this,o).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&i(this,o).classList.add(n)})}))},W=new WeakSet,Ee=function(e,t){i(this,l).add(t.subscribe(({current:s})=>{s?i(this,o).classList.add(e):i(this,o).classList.remove(e)}))},$=new WeakSet,be=function(e){if(!e)return;i(this,o).tagName==="style"||i(this,o).tagName==="STYLE"?r(this,v,te).call(this,e):r(this,z,Ce).call(this,e)},z=new WeakSet,Ce=function(e){for(const t in e){const s=t,n=e[s];n instanceof b.Store?i(this,l).add(n.subscribe(({current:a})=>{r(this,A,se).call(this,s,a)})):r(this,A,se).call(this,s,n)}},v=new WeakSet,te=function(e){for(const t in e){const s=e[t];if(typeof s=="object"&&!(s instanceof b.Store))i(this,o).appendChild(document.createTextNode(`${t} {`)),r(this,v,te).call(this,s),i(this,o).appendChild(document.createTextNode("}"));else if(s instanceof b.Store){const n=document.createTextNode("");i(this,l).add(s.subscribe(a=>{a.current?n.nodeValue=`${_.camelToKebab(t)}: ${a.current};`:n.nodeValue=""})),i(this,o).appendChild(n)}else i(this,o).appendChild(document.createTextNode(`${_.camelToKebab(t)}: ${s};`))}},A=new WeakSet,se=function(e,t){e.includes("--")?t?i(this,o).style.setProperty(e,t.toString()):i(this,o).style.removeProperty(e):t?i(this,o).style[e]=t.toString():i(this,o).style[e]=""},I=new WeakSet,ye=function(e){if(e){i(this,u)||E(this,u,[]);for(const t in e){const s=t,n=_.uncapitalize(s.split("on").slice(1).join("on")),a=e[s];typeof a=="object"?i(this,u).push({name:n,callback:a.callback,options:a.options}):typeof a=="function"&&i(this,u).push({name:n,callback:a})}r(this,k,ie).call(this)}},k=new WeakSet,ie=function(){var e;(e=i(this,u))==null||e.forEach(t=>{i(this,o).addEventListener(t.name,t.callback,t.options)})},M=new WeakSet,ne=function(){var e;(e=i(this,u))==null||e.forEach(t=>{i(this,o).removeEventListener(t.name,t.callback,t.options)})},J=new WeakSet,pe=function(e){for(const t in e){const s=e[t];s instanceof b.Store?i(this,l).add(s.subscribe(({current:n})=>{r(this,D,oe).call(this,t,n)})):r(this,D,oe).call(this,t,s)}},D=new WeakSet,oe=function(e,t){var n,a;const s=i(this,o);e in s&&!((a=(n=s.constructor)==null?void 0:n.observedAttributes)!=null&&a.includes(e))?t!=null&&(s[e]=t.toString()):t!=null&&s.setAttribute(e,t.toString())},N=new WeakSet,F=function(e,t){t&&(t=[t].flat(),t.forEach(s=>{if(s instanceof b.Store){const n=document.createElement("div");n.style.display="contents",e.appendChild(n),i(this,d)||E(this,d,[]);const a=i(this,d).length;n.setAttribute("store-root",""),i(this,d).push(n),i(this,l).add(s.subscribe(({current:h,previous:m})=>{const C=i(this,d)[a];C.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Y=Array.from(C.childNodes),fe=[h].flat(),Ne=[m].flat(),le=[],Q=[];Ne.forEach((g,y)=>{!fe.includes(g)&&Y[y]?le.push(Y[y]):Q.push(g)}),fe.forEach((g,y)=>{if(Q[y]){if(g!==Q[y]){const p=r(this,q,ce).call(this,g),X=Y[y];p instanceof Node?X.isEqualNode(p)||C.replaceChild(p,X):C.removeChild(X)}}else{const p=r(this,q,ce).call(this,g);p instanceof Node&&n.appendChild(p)}}),le.forEach(g=>{C.removeChild(g)}),C.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(s instanceof U)r(this,x,re).call(this,e,s.node);else if(s instanceof Function)r(this,N,F).call(this,e,de.isESClass(s)?new s:s());else{const n=r(this,H,ae).call(this,s);n instanceof Node&&r(this,x,re).call(this,e,n)}}))},x=new WeakSet,re=function(e,t){!(e instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(i(this,S).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),i(this,l).add(()=>{t.remove()})):e.appendChild(t)},q=new WeakSet,ce=function(e){return e instanceof U?e.node:typeof e=="function"?de.isESClass(e)?new e:e():r(this,H,ae).call(this,e)},H=new WeakSet,ae=function(e){if(e instanceof Node)return e;if(e!=null){const t=String(e);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const s=document.createElement("div");return s.innerHTML=t,s.firstElementChild}else return document.createTextNode(t)}else return},V=new WeakMap,K=new WeakMap;let O=U;exports.ElementConstructor=O;
@@ -1,49 +0,0 @@
1
- var x = (r, s, e) => {
2
- if (!s.has(r))
3
- throw TypeError("Cannot " + e);
4
- };
5
- var t = (r, s, e) => (x(r, s, "read from private field"), e ? e.call(r) : s.get(r)), u = (r, s, e) => {
6
- if (s.has(r))
7
- throw TypeError("Cannot add the same private member more than once");
8
- s instanceof WeakSet ? s.add(r) : s.set(r, e);
9
- }, a = (r, s, e, c) => (x(r, s, "write to private field"), c ? c.call(r, e) : s.set(r, e), e);
10
- import { S as d } from "./Store-Dsft7GtM.js";
11
- var f;
12
- class P extends d {
13
- constructor(e, c, i) {
14
- super(null, i);
15
- u(this, f, void 0);
16
- a(this, f, e.subscribe((b) => {
17
- this.current = b.current.map((m, o, g) => c(m, o, g));
18
- }));
19
- }
20
- close() {
21
- super.close(), t(this, f).call(this);
22
- }
23
- }
24
- f = new WeakMap();
25
- var l, h, n;
26
- class R extends d {
27
- constructor(e, c, i) {
28
- super(e, i);
29
- u(this, l, void 0);
30
- u(this, h, void 0);
31
- u(this, n, 0);
32
- a(this, h, new d(!1)), a(this, l, c), i != null && i.manualControl || this.refetch();
33
- }
34
- get isPending() {
35
- return t(this, h);
36
- }
37
- refetch() {
38
- t(this, h).current = !0, a(this, n, t(this, n) + 1);
39
- const e = t(this, n);
40
- t(this, l).call(this).then((c) => {
41
- e === t(this, n) && (t(this, h).current = !1, this.current = c);
42
- });
43
- }
44
- }
45
- l = new WeakMap(), h = new WeakMap(), n = new WeakMap();
46
- export {
47
- P as D,
48
- R
49
- };
@@ -1 +0,0 @@
1
- "use strict";var o=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var s=(r,t,e)=>(o(r,t,"read from private field"),e?e.call(r):t.get(r)),n=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},l=(r,t,e,c)=>(o(r,t,"write to private field"),c?c.call(r,e):t.set(r,e),e);const d=require("./Store-kzJycezD.cjs");var a;class m extends d.Store{constructor(e,c,i){super(null,i);n(this,a,void 0);l(this,a,e.subscribe(b=>{this.current=b.current.map((x,S,g)=>c(x,S,g))}))}close(){super.close(),s(this,a).call(this)}}a=new WeakMap;var f,u,h;class v extends d.Store{constructor(e,c,i){super(e,i);n(this,f,void 0);n(this,u,void 0);n(this,h,0);l(this,u,new d.Store(!1)),l(this,f,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return s(this,u)}refetch(){s(this,u).current=!0,l(this,h,s(this,h)+1);const e=s(this,h);s(this,f).call(this).then(c=>{e===s(this,h)&&(s(this,u).current=!1,this.current=c)})}}f=new WeakMap,u=new WeakMap,h=new WeakMap;exports.DerivedArray=m;exports.Resource=v;
@@ -1,12 +0,0 @@
1
- import { c as o } from "./globals-DMjysUXI.js";
2
- function t(n) {
3
- o.value.addDisconnectCallback(n);
4
- }
5
- function r(n) {
6
- const e = typeof n == "function" ? n(o.value) : n;
7
- return o && t(() => e.close()), e;
8
- }
9
- export {
10
- r as _,
11
- t as o
12
- };