aptechka 0.50.27 → 0.51.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 (58) hide show
  1. package/lib/{Animation-FtUeV8dp.js → Animation-eO5_LIJl.js} +1 -1
  2. package/lib/{Animation-ChZNIOTS.cjs → Animation-rTojHgyz.cjs} +1 -1
  3. package/lib/{Damped-B1lXa9nb.cjs → Damped-DgAIjXp3.cjs} +1 -1
  4. package/lib/{Damped-BXsGpI-B.js → Damped-GyAS-U-z.js} +1 -1
  5. package/lib/Store-GokLe_g-.cjs +1 -0
  6. package/lib/Store-swP_0ymB.js +134 -0
  7. package/lib/{Tweened-BhDWLNF0.js → Tweened-BSC-evuL.js} +1 -1
  8. package/lib/{Tweened-cJ36zq1A.cjs → Tweened-DpJDlbj9.cjs} +1 -1
  9. package/lib/animation/index.cjs +1 -1
  10. package/lib/animation/index.js +3 -3
  11. package/lib/attribute/index.cjs +1 -1
  12. package/lib/attribute/index.d.ts +1 -1
  13. package/lib/attribute/index.js +27 -27
  14. package/lib/class-linked-status/index.cjs +1 -1
  15. package/lib/class-linked-status/index.js +1 -1
  16. package/lib/controls/index.cjs +1 -1
  17. package/lib/controls/index.js +2 -2
  18. package/lib/css-property/index.cjs +1 -1
  19. package/lib/css-property/index.d.ts +1 -1
  20. package/lib/css-property/index.js +28 -28
  21. package/lib/dev/index.cjs +1 -1
  22. package/lib/dev/index.js +1 -1
  23. package/lib/device/index.cjs +1 -1
  24. package/lib/device/index.js +1 -1
  25. package/lib/iframe/index.cjs +1 -1
  26. package/lib/iframe/index.js +1 -1
  27. package/lib/image/index.cjs +1 -1
  28. package/lib/image/index.js +1 -1
  29. package/lib/ladder/index.cjs +1 -1
  30. package/lib/ladder/index.js +1 -1
  31. package/lib/media/index.cjs +1 -1
  32. package/lib/media/index.js +1 -1
  33. package/lib/need_redo_tweaker/index.cjs +1 -1
  34. package/lib/need_redo_tweaker/index.js +1 -1
  35. package/lib/notifier/index.cjs +1 -1
  36. package/lib/notifier/index.d.ts +6 -0
  37. package/lib/notifier/index.js +21 -15
  38. package/lib/pointer/index.cjs +1 -1
  39. package/lib/pointer/index.js +2 -2
  40. package/lib/scroll/ScrollElement.d.ts +1 -0
  41. package/lib/scroll/index.cjs +1 -1
  42. package/lib/scroll/index.js +285 -273
  43. package/lib/scroll-segment/index.cjs +1 -1
  44. package/lib/scroll-segment/index.js +3 -3
  45. package/lib/sequence/index.cjs +1 -1
  46. package/lib/sequence/index.js +1 -1
  47. package/lib/source/index.cjs +1 -1
  48. package/lib/source/index.js +1 -1
  49. package/lib/store/Store.d.ts +3 -2
  50. package/lib/store/index.cjs +1 -1
  51. package/lib/store/index.js +2 -2
  52. package/lib/video/index.cjs +1 -1
  53. package/lib/video/index.js +1 -1
  54. package/lib/youtube/index.cjs +1 -1
  55. package/lib/youtube/index.js +1 -1
  56. package/package.json +1 -1
  57. package/lib/Store-D2xCXENW.js +0 -134
  58. package/lib/Store-DRp_K37w.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var mt=l=>{throw TypeError(l)};var at=(l,c,r)=>c.has(l)||mt("Cannot "+r);var t=(l,c,r)=>(at(l,c,"read from private field"),r?r.call(l):c.get(l)),i=(l,c,r)=>c.has(l)?mt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(l):c.set(l,r),e=(l,c,r,s)=>(at(l,c,"write to private field"),s?s.call(l,r):c.set(l,r),r),o=(l,c,r)=>(at(l,c,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ot=require("../dom-JBOkFLTh.cjs"),qt=require("../index-Cqw2NKev.cjs"),bt=require("../element-resizer/index.cjs"),ct=require("../window-resizer/index.cjs"),u=require("../css-property/index.cjs"),Ct=require("../order/index.cjs"),st=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),kt=require("../math-GDWEqu7y.cjs"),et=require("../Store-DRp_K37w.cjs"),Dt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Mt=require("../Damped-B1lXa9nb.cjs");var w,ot,rt,j;class St{constructor(c){i(this,w,null);i(this,ot);i(this,rt,!1);i(this,j,()=>{e(this,rt,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ot,c),e(this,w,Ot.findScrollParentElement(t(this,ot))),bt.elementResizer.subscribe(t(this,w),t(this,j)),ct.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,rt)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,rt)}destroy(){bt.elementResizer.unsubscribe(t(this,j)),ct.windowResizer.unsubscribe(t(this,j))}onScroll(c){t(this,w).addEventListener("scroll",c)}offScroll(c){t(this,w).removeEventListener("scroll",c)}}w=new WeakMap,ot=new WeakMap,rt=new WeakMap,j=new WeakMap;var S,B,G,K,Z,_,A,I,$,m,g,v,y,H,p,O,q,L,X,x,k,D,f,P,V,R,z,F,it,n,W,J,ht,d,M,C,b,E,Y,N,a,Q,h,yt,ft,Pt,Vt,wt,Ft,Et,Lt,nt,tt,pt,U,Rt,zt,dt,gt;let vt=(gt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,_);i(this,A);i(this,I);i(this,$);i(this,m);i(this,g);i(this,v);i(this,y);i(this,H);i(this,p);i(this,O);i(this,q);i(this,L);i(this,X);i(this,x);i(this,k);i(this,D);i(this,f);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,it);i(this,n);i(this,W);i(this,J);i(this,ht);i(this,d);i(this,M);i(this,C);i(this,b);i(this,E);i(this,Y);i(this,N);i(this,a);i(this,Q);i(this,nt);i(this,tt);e(this,S,null),e(this,B,new u.CSSProperty(this,"--damping",20)),e(this,G,new u.CSSProperty(this,"--mass",0)),e(this,K,new u.CSSProperty(this,"--stiffness",0)),e(this,Z,new u.CSSProperty(this,"--target","")),e(this,_,new u.CSSProperty(this,"--disabled",!1)),e(this,A,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,I,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,$,new u.CSSProperty(this,"--capture-once",!1)),e(this,m,new u.CSSProperty(this,"--captured","")),e(this,g,new u.CSSProperty(this,"--released","")),e(this,v,new u.CSSProperty(this,"--captured-from-start","")),e(this,y,new u.CSSProperty(this,"--captured-from-finish","")),e(this,H,new u.CSSProperty(this,"--released-from-start","")),e(this,p,new u.CSSProperty(this,"--released-from-finish","")),e(this,O,new u.CSSProperty(this,"--passed-var","")),e(this,q,new u.CSSProperty(this,"--progress-var","")),e(this,L,new u.CSSProperty(this,"--progress-arc-var","")),e(this,X,new u.CSSProperty(this,"--animation-var-type","target")),e(this,x,new u.CSSProperty(this,"--distance-var","")),e(this,k,new u.CSSProperty(this,"--start-var","")),e(this,D,new u.CSSProperty(this,"--finish-var","")),e(this,f,new et.Store(!1)),e(this,P,new et.Store(!1)),e(this,V,new et.Store(!1)),e(this,R,new et.Store(!1)),e(this,z,new et.Store(!1)),e(this,F,new et.Store(!1)),e(this,it,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,ht,0),e(this,d,new Mt.Damped(0,{order:Ct.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.resize=()=>{e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const s=lt.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,I).current),e(this,b,t(this,b)+t(this,A).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,k).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,x).current,t(this,b)),t(this,d).max=t(this,b),e(this,Y,!0),t(this,tt).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=Dt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((T,ut)=>{T.element===t(this,S)&&(s=ut)}),e(this,it,r.slice(s+1))},0),e(this,nt,()=>{t(this,a)||this.resize()}),e(this,tt,()=>{!t(this,a)&&t(this,Y)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){o(this,h,ft).call(this),e(this,S,r),o(this,h,yt).call(this)}get distanceOffsetCSSProperty(){return t(this,A)}get startOffsetCSSProperty(){return t(this,I)}get captureOnceCSSProperty(){return t(this,$)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,H)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get animationVarTypeCSSProperty(){return t(this,X)}get distanceVarCSSProperty(){return t(this,x)}get startVarCSSProperty(){return t(this,k)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,_)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,M)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,it).forEach(ut=>{r+=ut.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const T=Math.round(r);t(this,f).current&&(T>=t(this,C)?t(this,V).current||o(this,h,wt).call(this):t(this,V).current&&!t(this,R).current&&o(this,h,Et).call(this),T<t(this,E)?t(this,F).current&&!t(this,z).current&&o(this,h,Ft).call(this):t(this,V).current&&!t(this,F).current&&o(this,h,Lt).call(this)),T>=t(this,C)&&T<t(this,E)?t(this,f).current||o(this,h,Pt).call(this):t(this,f).current&&(t(this,d).set(kt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),o(this,h,Vt).call(this)),t(this,N)&&t(this,$).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),o(this,h,dt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new St(this)}disconnectedCallback(){t(this,S)instanceof St&&t(this,S).destroy(),o(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,ht)}getStart(){return t(this,W)-t(this,ht)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,$=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,H=new WeakMap,p=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,X=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,it=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,ht=new WeakMap,d=new WeakMap,M=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,Y=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,yt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,$).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,H).observe(),t(this,p).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,X).observe(),t(this,x).observe(),t(this,k).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,_).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&o(this,h,dt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,_).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,I).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,v).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,y).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,g).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,H).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,p).subscribe(s=>{o(this,h,U).call(this,s)}),t(this,$).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,o(this,h,pt).call(this)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const T=t(this,d)[t(this,X).current];e(this,M,T/t(this,b)||0),this.setVar(t(this,O).current,T.toFixed(6)),this.setVar(t(this,q).current,t(this,M).toFixed(6)),t(this,L).current&&this.setVar(t(this,L).current,o(this,h,pt).call(this).toFixed(6))}),ct.windowResizer.subscribe(t(this,nt),Ct.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,tt)),r=!0},ft=function(){t(this,S)&&(ct.windowResizer.unsubscribe(t(this,nt)),this.scrollContainer.offScroll(t(this,tt)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,$).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,H).close(),t(this,p).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,x).close(),t(this,k).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable())},Pt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Vt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},wt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Ft=function(){t(this,f).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Lt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},nt=new WeakMap,tt=new WeakMap,pt=function(){return Math.abs(Math.cos(t(this,M)*Math.PI))},U=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Rt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},zt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},dt=function(){o(this,h,Rt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,H).current,t(this,p).current),o(this,h,zt).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,x).current,t(this,k).current,t(this,D).current)},gt);qt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=St;exports.ScrollSegmentElement=vt;
1
+ "use strict";var mt=l=>{throw TypeError(l)};var at=(l,o,r)=>o.has(l)||mt("Cannot "+r);var t=(l,o,r)=>(at(l,o,"read from private field"),r?r.call(l):o.get(l)),i=(l,o,r)=>o.has(l)?mt("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(l):o.set(l,r),e=(l,o,r,s)=>(at(l,o,"write to private field"),s?s.call(l,r):o.set(l,r),r),c=(l,o,r)=>(at(l,o,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ot=require("../dom-JBOkFLTh.cjs"),qt=require("../index-Cqw2NKev.cjs"),bt=require("../element-resizer/index.cjs"),ot=require("../window-resizer/index.cjs"),u=require("../css-property/index.cjs"),Ct=require("../order/index.cjs"),st=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),kt=require("../math-GDWEqu7y.cjs"),et=require("../Store-GokLe_g-.cjs"),Dt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Mt=require("../Damped-DgAIjXp3.cjs");var w,ct,rt,j;class St{constructor(o){i(this,w,null);i(this,ct);i(this,rt,!1);i(this,j,()=>{e(this,rt,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,o),e(this,w,Ot.findScrollParentElement(t(this,ct))),bt.elementResizer.subscribe(t(this,w),t(this,j)),ot.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,rt)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,rt)}destroy(){bt.elementResizer.unsubscribe(t(this,j)),ot.windowResizer.unsubscribe(t(this,j))}onScroll(o){t(this,w).addEventListener("scroll",o)}offScroll(o){t(this,w).removeEventListener("scroll",o)}}w=new WeakMap,ct=new WeakMap,rt=new WeakMap,j=new WeakMap;var S,B,G,K,Z,_,A,I,$,m,g,v,y,H,p,O,q,L,X,x,k,D,f,P,V,R,z,F,it,n,W,J,ht,d,M,C,b,E,Y,N,a,Q,h,yt,ft,Pt,Vt,wt,Ft,Et,Lt,nt,tt,pt,U,Rt,zt,dt,gt;let vt=(gt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,_);i(this,A);i(this,I);i(this,$);i(this,m);i(this,g);i(this,v);i(this,y);i(this,H);i(this,p);i(this,O);i(this,q);i(this,L);i(this,X);i(this,x);i(this,k);i(this,D);i(this,f);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,it);i(this,n);i(this,W);i(this,J);i(this,ht);i(this,d);i(this,M);i(this,C);i(this,b);i(this,E);i(this,Y);i(this,N);i(this,a);i(this,Q);i(this,nt);i(this,tt);e(this,S,null),e(this,B,new u.CSSProperty(this,"--damping",20)),e(this,G,new u.CSSProperty(this,"--mass",0)),e(this,K,new u.CSSProperty(this,"--stiffness",0)),e(this,Z,new u.CSSProperty(this,"--target","")),e(this,_,new u.CSSProperty(this,"--disabled",!1)),e(this,A,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,I,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,$,new u.CSSProperty(this,"--capture-once",!1)),e(this,m,new u.CSSProperty(this,"--captured","")),e(this,g,new u.CSSProperty(this,"--released","")),e(this,v,new u.CSSProperty(this,"--captured-from-start","")),e(this,y,new u.CSSProperty(this,"--captured-from-finish","")),e(this,H,new u.CSSProperty(this,"--released-from-start","")),e(this,p,new u.CSSProperty(this,"--released-from-finish","")),e(this,O,new u.CSSProperty(this,"--passed-var","")),e(this,q,new u.CSSProperty(this,"--progress-var","")),e(this,L,new u.CSSProperty(this,"--progress-arc-var","")),e(this,X,new u.CSSProperty(this,"--animation-var-type","target")),e(this,x,new u.CSSProperty(this,"--distance-var","")),e(this,k,new u.CSSProperty(this,"--start-var","")),e(this,D,new u.CSSProperty(this,"--finish-var","")),e(this,f,new et.Store(!1)),e(this,P,new et.Store(!1)),e(this,V,new et.Store(!1)),e(this,R,new et.Store(!1)),e(this,z,new et.Store(!1)),e(this,F,new et.Store(!1)),e(this,it,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,ht,0),e(this,d,new Mt.Damped(0,{order:Ct.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.resize=()=>{e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const s=lt.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,I).current),e(this,b,t(this,b)+t(this,A).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,k).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,x).current,t(this,b)),t(this,d).max=t(this,b),e(this,Y,!0),t(this,tt).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=Dt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((T,ut)=>{T.element===t(this,S)&&(s=ut)}),e(this,it,r.slice(s+1)),this.tick()},0),e(this,nt,()=>{t(this,a)||this.resize()}),e(this,tt,()=>{!t(this,a)&&t(this,Y)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ft).call(this),e(this,S,r),c(this,h,yt).call(this)}get distanceOffsetCSSProperty(){return t(this,A)}get startOffsetCSSProperty(){return t(this,I)}get captureOnceCSSProperty(){return t(this,$)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,H)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get animationVarTypeCSSProperty(){return t(this,X)}get distanceVarCSSProperty(){return t(this,x)}get startVarCSSProperty(){return t(this,k)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,_)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,M)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,it).forEach(ut=>{r+=ut.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const T=Math.round(r);t(this,f).current&&(T>=t(this,C)?t(this,V).current||c(this,h,wt).call(this):t(this,V).current&&!t(this,R).current&&c(this,h,Et).call(this),T<t(this,E)?t(this,F).current&&!t(this,z).current&&c(this,h,Ft).call(this):t(this,V).current&&!t(this,F).current&&c(this,h,Lt).call(this)),T>=t(this,C)&&T<t(this,E)?t(this,f).current||c(this,h,Pt).call(this):t(this,f).current&&(t(this,d).set(kt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),c(this,h,Vt).call(this)),t(this,N)&&t(this,$).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),c(this,h,dt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new St(this)}disconnectedCallback(){t(this,S)instanceof St&&t(this,S).destroy(),c(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,ht)}getStart(){return t(this,W)-t(this,ht)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,$=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,H=new WeakMap,p=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,X=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,it=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,ht=new WeakMap,d=new WeakMap,M=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,Y=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,yt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,$).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,H).observe(),t(this,p).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,X).observe(),t(this,x).observe(),t(this,k).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,_).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&c(this,h,dt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,_).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,I).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,H).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,$).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,c(this,h,pt).call(this)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const T=t(this,d)[t(this,X).current];e(this,M,T/t(this,b)||0),this.setVar(t(this,O).current,T.toFixed(6)),this.setVar(t(this,q).current,t(this,M).toFixed(6)),t(this,L).current&&this.setVar(t(this,L).current,c(this,h,pt).call(this).toFixed(6))}),ot.windowResizer.subscribe(t(this,nt),Ct.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,tt)),r=!0},ft=function(){t(this,S)&&(ot.windowResizer.unsubscribe(t(this,nt)),this.scrollContainer.offScroll(t(this,tt)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,$).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,H).close(),t(this,p).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,x).close(),t(this,k).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable())},Pt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Vt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},wt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Ft=function(){t(this,f).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Lt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},nt=new WeakMap,tt=new WeakMap,pt=function(){return Math.abs(Math.cos(t(this,M)*Math.PI))},U=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Rt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},zt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},dt=function(){c(this,h,Rt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,H).current,t(this,p).current),c(this,h,zt).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,x).current,t(this,k).current,t(this,D).current)},gt);qt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=St;exports.ScrollSegmentElement=vt;
@@ -13,10 +13,10 @@ import { d as st } from "../events-CsVF98U6.js";
13
13
  import { d as kt } from "../function-C10DGppn.js";
14
14
  import { a as Dt, g as xt, c as Mt } from "../layout-DpZo-I0y.js";
15
15
  import { s as Tt } from "../math-BOBiC4TN.js";
16
- import { S as et } from "../Store-D2xCXENW.js";
16
+ import { S as et } from "../Store-swP_0ymB.js";
17
17
  import { scrollEntries as At } from "../scroll-entries/index.js";
18
18
  import "../ticker/index.js";
19
- import { D as It } from "../Damped-BXsGpI-B.js";
19
+ import { D as It } from "../Damped-GyAS-U-z.js";
20
20
  var F, ct, rt, B;
21
21
  class dt {
22
22
  constructor(o) {
@@ -146,7 +146,7 @@ let $t = (bt = class extends HTMLElement {
146
146
  let s = 0;
147
147
  r.forEach((A, ut) => {
148
148
  A.element === t(this, f) && (s = ut);
149
- }), e(this, it, r.slice(s + 1));
149
+ }), e(this, it, r.slice(s + 1)), this.tick();
150
150
  }, 0), e(this, nt, () => {
151
151
  t(this, a) || this.resize();
152
152
  }), e(this, tt, () => {
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),_=require("../index-Cqw2NKev.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,d,m,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,d,new P.CSSProperty(this,"--offset-x",.5));c(this,m,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});_.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,d).observe(),t(this,m).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,d).unobserve(),t(this,m).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,B)=>{r.onload=()=>{C()},r.onerror=j=>{B(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,d=new WeakMap,m=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;_.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",k);exports.SequenceElement=k;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),_=require("../index-Cqw2NKev.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-GokLe_g-.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,d,m,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,d,new P.CSSProperty(this,"--offset-x",.5));c(this,m,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});_.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,d).observe(),t(this,m).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,d).unobserve(),t(this,m).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,B)=>{r.onload=()=>{C()},r.onerror=j=>{B(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,d=new WeakMap,m=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;_.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",k);exports.SequenceElement=k;
@@ -25,7 +25,7 @@ import { i as q } from "../index-euf5anj6.js";
25
25
  import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
26
  import { SourceElement as W } from "../source/index.js";
27
27
  import "../window-resizer/index.js";
28
- import "../Store-D2xCXENW.js";
28
+ import "../Store-swP_0ymB.js";
29
29
  import { CanvasElement as A } from "../canvas/index.js";
30
30
  function D(s) {
31
31
  const n = s.match(/\{([\d-]+)\}/);
@@ -1,4 +1,4 @@
1
- "use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-DUXXtU8v.cjs"),K=require("../loading/index.cjs"),st=require("../order/index.cjs"),J=require("../window-resizer/index.cjs"),it=require("../Store-DRp_K37w.cjs");var $,w,O,S,u,f,M;class Q{constructor(r){i(this,$);i(this,w);i(this,O);i(this,S);i(this,u);i(this,f);i(this,M);s(this,$,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(p=>p.match(o)&&parseInt(p));s(this,O,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,_=/\d+mir/g,H=e.find(p=>p.match(l)),n=e.find(p=>p.match(x)),b=e.find(p=>p.match(B)),W=e.find(p=>p.match(_));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,S,`(max-aspect-ratio: ${t(this,u)})`)):W?(s(this,u,parseInt(W)),s(this,f,"max"),s(this,S,`(min-aspect-ratio: ${t(this,u)})`)):H?(s(this,u,parseInt(H)),s(this,f,"max"),s(this,S,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,M,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,$)}get name(){return t(this,w)}get density(){return t(this,O)}get query(){return t(this,S)}get extension(){return t(this,M)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}$=new WeakMap,w=new WeakMap,O=new WeakMap,S=new WeakMap,u=new WeakMap,f=new WeakMap,M=new WeakMap;let rt=0;var m,a,y,q,g,z,R,c,v,A,E,C,I,j,D,V,F;class nt extends HTMLElement{constructor(e){super();i(this,I);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,q,!1);i(this,g,!1);i(this,z,"");i(this,R,"");i(this,c,new Y.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,v,null);i(this,A);i(this,E,null);i(this,C);i(this,D,e=>{const o=e[0];t(this,g)&&(!t(this,q)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(P(this,I,j).call(this,void 0),s(this,q,!1)),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,V,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.complete(t(this,R)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,A,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,F,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.error(t(this,R)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,v,new IntersectionObserver(t(this,D)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,E)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,q)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,q,!0),P(this,I,j).call(this,t(this,m).current))}connectedCallback(){s(this,z,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
1
+ "use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../class-linked-status/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),et=require("../string-DUXXtU8v.cjs"),K=require("../loading/index.cjs"),st=require("../order/index.cjs"),J=require("../window-resizer/index.cjs"),it=require("../Store-GokLe_g-.cjs");var $,w,O,S,u,f,M;class Q{constructor(r){i(this,$);i(this,w);i(this,O);i(this,S);i(this,u);i(this,f);i(this,M);s(this,$,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(p=>p.match(o)&&parseInt(p));s(this,O,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,_=/\d+mir/g,H=e.find(p=>p.match(l)),n=e.find(p=>p.match(x)),b=e.find(p=>p.match(B)),W=e.find(p=>p.match(_));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,S,`(max-aspect-ratio: ${t(this,u)})`)):W?(s(this,u,parseInt(W)),s(this,f,"max"),s(this,S,`(min-aspect-ratio: ${t(this,u)})`)):H?(s(this,u,parseInt(H)),s(this,f,"max"),s(this,S,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,S,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,M,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,$)}get name(){return t(this,w)}get density(){return t(this,O)}get query(){return t(this,S)}get extension(){return t(this,M)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}$=new WeakMap,w=new WeakMap,O=new WeakMap,S=new WeakMap,u=new WeakMap,f=new WeakMap,M=new WeakMap;let rt=0;var m,a,y,q,g,z,R,c,v,A,E,C,I,j,D,V,F;class nt extends HTMLElement{constructor(e){super();i(this,I);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,q,!1);i(this,g,!1);i(this,z,"");i(this,R,"");i(this,c,new Y.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,v,null);i(this,A);i(this,E,null);i(this,C);i(this,D,e=>{const o=e[0];t(this,g)&&(!t(this,q)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(P(this,I,j).call(this,void 0),s(this,q,!1)),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,V,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.complete(t(this,R)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,A,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,F,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,y)&&K.loading.error(t(this,R)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,v,new IntersectionObserver(t(this,D)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,E)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,q)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,q,!0),P(this,I,j).call(this,t(this,m).current))}connectedCallback(){s(this,z,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -10,7 +10,7 @@ import { k as Y } from "../string-BlMQbe8b.js";
10
10
  import { loading as K } from "../loading/index.js";
11
11
  import { RESIZE_ORDER as tt } from "../order/index.js";
12
12
  import { windowResizer as Z } from "../window-resizer/index.js";
13
- import { S as et } from "../Store-D2xCXENW.js";
13
+ import { S as et } from "../Store-swP_0ymB.js";
14
14
  var C, E, O, L, u, f, k;
15
15
  class st {
16
16
  constructor(r) {
@@ -24,10 +24,11 @@ export declare class Store<StoreType = unknown> {
24
24
  get previous(): StoreType | undefined;
25
25
  get current(): StoreType;
26
26
  set current(value: StoreType);
27
- get subscribers(): Set<StoreSubscribeCallback<StoreType>>;
27
+ get subscribers(): import('../notifier').NotifierSubscriber[];
28
+ notify(): void;
28
29
  addMiddleware(middleware: StoreMiddleware<StoreType>): void;
29
30
  removeMiddleware(middleware: StoreMiddleware<StoreType>): void;
30
- subscribe(callback: StoreSubscribeCallback<StoreType>): () => void;
31
+ subscribe(callback: StoreSubscribeCallback<StoreType>, order?: number): () => void;
31
32
  unsubscribe(callback: StoreSubscribeCallback<StoreType>): void;
32
33
  reset(): void;
33
34
  close(): void;
@@ -1 +1 @@
1
- "use strict";var g=r=>{throw TypeError(r)};var v=(r,s,e)=>s.has(r)||g("Cannot "+e);var c=(r,s,e)=>(v(r,s,"read from private field"),e?e.call(r):s.get(r)),n=(r,s,e)=>s.has(r)?g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),h=(r,s,e,t)=>(v(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../Store-DRp_K37w.cjs"),m=require("../function-MthRj-GJ.cjs");require("../index-Cqw2NKev.cjs");var d;class D extends i.Store{constructor(e,t,u){super(null,u);n(this,d);h(this,d,e.subscribe(a=>{this.current=t(a.current)}))}close(){super.close(),c(this,d).call(this)}}d=new WeakMap;var b;class R extends i.Store{constructor(e,t,u){super(null,u);n(this,b);h(this,b,e.subscribe(a=>{this.current=a.current.map((p,x,y)=>t(p,x,y))}))}close(){super.close(),c(this,b).call(this)}}b=new WeakMap;var f,o,l;class q extends i.Store{constructor(e,t,u){super(e,u);n(this,f);n(this,o);n(this,l,0);h(this,o,new i.Store(!1)),h(this,f,t),u!=null&&u.manualControl||this.refetch()}get isPending(){return c(this,o)}refetch(){c(this,o).current=!0,h(this,l,c(this,l)+1);const e=c(this,l);c(this,f).call(this).then(t=>{e===c(this,l)&&(c(this,o).current=!1,this.current=t)})}}f=new WeakMap,o=new WeakMap,l=new WeakMap;var S;class C extends i.Store{constructor(e,t,u){super(null,u);n(this,S,[]);const a=m.debounce(()=>{this.current=t()},0);e.forEach(p=>{c(this,S).push(p.subscribe(()=>{a()}))})}close(){super.close(),c(this,S).forEach(e=>e())}}S=new WeakMap;exports.Store=i.Store;exports.activeStores=i.activeStores;exports.storeRegistry=i.storeRegistry;exports.Composed=C;exports.Derived=D;exports.DerivedArray=R;exports.Resource=q;
1
+ "use strict";var g=r=>{throw TypeError(r)};var v=(r,s,e)=>s.has(r)||g("Cannot "+e);var c=(r,s,e)=>(v(r,s,"read from private field"),e?e.call(r):s.get(r)),n=(r,s,e)=>s.has(r)?g("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),h=(r,s,e,t)=>(v(r,s,"write to private field"),t?t.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../Store-GokLe_g-.cjs"),m=require("../function-MthRj-GJ.cjs");require("../index-Cqw2NKev.cjs");var d;class D extends i.Store{constructor(e,t,u){super(null,u);n(this,d);h(this,d,e.subscribe(a=>{this.current=t(a.current)}))}close(){super.close(),c(this,d).call(this)}}d=new WeakMap;var b;class R extends i.Store{constructor(e,t,u){super(null,u);n(this,b);h(this,b,e.subscribe(a=>{this.current=a.current.map((p,x,y)=>t(p,x,y))}))}close(){super.close(),c(this,b).call(this)}}b=new WeakMap;var f,o,l;class q extends i.Store{constructor(e,t,u){super(e,u);n(this,f);n(this,o);n(this,l,0);h(this,o,new i.Store(!1)),h(this,f,t),u!=null&&u.manualControl||this.refetch()}get isPending(){return c(this,o)}refetch(){c(this,o).current=!0,h(this,l,c(this,l)+1);const e=c(this,l);c(this,f).call(this).then(t=>{e===c(this,l)&&(c(this,o).current=!1,this.current=t)})}}f=new WeakMap,o=new WeakMap,l=new WeakMap;var S;class C extends i.Store{constructor(e,t,u){super(null,u);n(this,S,[]);const a=m.debounce(()=>{this.current=t()},0);e.forEach(p=>{c(this,S).push(p.subscribe(()=>{a()}))})}close(){super.close(),c(this,S).forEach(e=>e())}}S=new WeakMap;exports.Store=i.Store;exports.activeStores=i.activeStores;exports.storeRegistry=i.storeRegistry;exports.Composed=C;exports.Derived=D;exports.DerivedArray=R;exports.Resource=q;
@@ -3,8 +3,8 @@ var x = (e) => {
3
3
  };
4
4
  var g = (e, r, s) => r.has(e) || x("Cannot " + s);
5
5
  var c = (e, r, s) => (g(e, r, "read from private field"), s ? s.call(e) : r.get(e)), i = (e, r, s) => r.has(e) ? x("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, s), h = (e, r, s, t) => (g(e, r, "write to private field"), t ? t.call(e, s) : r.set(e, s), s);
6
- import { S as a } from "../Store-D2xCXENW.js";
7
- import { a as q, s as z } from "../Store-D2xCXENW.js";
6
+ import { S as a } from "../Store-swP_0ymB.js";
7
+ import { a as q, s as z } from "../Store-swP_0ymB.js";
8
8
  import { d as y } from "../function-C10DGppn.js";
9
9
  import "../index-euf5anj6.js";
10
10
  var d;
@@ -1 +1 @@
1
- "use strict";var d=e=>{throw TypeError(e)};var h=(e,s,t)=>s.has(e)||d("Cannot "+t);var r=(e,s,t)=>(h(e,s,"read from private field"),t?t.call(e):s.get(e)),u=(e,s,t)=>s.has(e)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,l)=>(h(e,s,"write to private field"),l?l.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const b=require("../index-Cqw2NKev.cjs"),p=require("../events-KVanG9sR.cjs"),o=require("../ticker/index.cjs");var i,n,a;class m extends E.SourceElement{constructor(){super(...arguments);u(this,i,0);u(this,n,!1);u(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>r(this,i)&&c(this,i,t),p.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:r(this,i)}}),this.consumerElement.readyState===4&&(o.ticker.unsubscribe(r(this,a)),r(this,n)&&this.sourceManager.current&&this.consumerElement.play())})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{c(this,n,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():c(this,n,!0)),o.ticker.subscribe(r(this,a))}),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(),o.ticker.unsubscribe(r(this,a)),c(this,i,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}}i=new WeakMap,n=new WeakMap,a=new WeakMap;b.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",m);exports.VideoElement=m;
1
+ "use strict";var d=e=>{throw TypeError(e)};var h=(e,s,t)=>s.has(e)||d("Cannot "+t);var r=(e,s,t)=>(h(e,s,"read from private field"),t?t.call(e):s.get(e)),u=(e,s,t)=>s.has(e)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,l)=>(h(e,s,"write to private field"),l?l.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-GokLe_g-.cjs");const b=require("../index-Cqw2NKev.cjs"),p=require("../events-KVanG9sR.cjs"),o=require("../ticker/index.cjs");var i,n,a;class m extends E.SourceElement{constructor(){super(...arguments);u(this,i,0);u(this,n,!1);u(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>r(this,i)&&c(this,i,t),p.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:r(this,i)}}),this.consumerElement.readyState===4&&(o.ticker.unsubscribe(r(this,a)),r(this,n)&&this.sourceManager.current&&this.consumerElement.play())})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{c(this,n,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():c(this,n,!0)),o.ticker.subscribe(r(this,a))}),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(),o.ticker.unsubscribe(r(this,a)),c(this,i,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}}i=new WeakMap,n=new WeakMap,a=new WeakMap;b.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",m);exports.VideoElement=m;
@@ -5,7 +5,7 @@ var l = (e, s, t) => s.has(e) || h("Cannot " + t);
5
5
  var r = (e, s, t) => (l(e, s, "read from private field"), t ? t.call(e) : s.get(e)), o = (e, s, t) => s.has(e) ? h("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, m) => (l(e, s, "write to private field"), m ? m.call(e, t) : s.set(e, t), t);
6
6
  import { SourceElement as d } from "../source/index.js";
7
7
  import "../window-resizer/index.js";
8
- import "../Store-D2xCXENW.js";
8
+ import "../Store-swP_0ymB.js";
9
9
  import { i as p } from "../index-euf5anj6.js";
10
10
  import { d as E } from "../events-CsVF98U6.js";
11
11
  import { ticker as u } from "../ticker/index.js";
@@ -1 +1 @@
1
- "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-DRp_K37w.cjs");const L=require("../index-Cqw2NKev.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
1
+ "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-GokLe_g-.cjs");const L=require("../index-Cqw2NKev.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
@@ -5,7 +5,7 @@ var b = (s, r, t) => r.has(s) || L("Cannot " + t);
5
5
  var e = (s, r, t) => (b(s, r, "read from private field"), t ? t.call(s) : r.get(s)), o = (s, r, t) => r.has(s) ? L("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), u = (s, r, t, a) => (b(s, r, "write to private field"), a ? a.call(s, t) : r.set(s, t), t), E = (s, r, t) => (b(s, r, "access private method"), t);
6
6
  import { SourceElement as g } from "../source/index.js";
7
7
  import "../window-resizer/index.js";
8
- import "../Store-D2xCXENW.js";
8
+ import "../Store-swP_0ymB.js";
9
9
  import { i as v } from "../index-euf5anj6.js";
10
10
  import { d as T } from "../events-CsVF98U6.js";
11
11
  import { g as V } from "../string-BlMQbe8b.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.27",
3
+ "version": "0.51.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,134 +0,0 @@
1
- var A = (r) => {
2
- throw TypeError(r);
3
- };
4
- var w = (r, e, t) => e.has(r) || A("Cannot " + t);
5
- var i = (r, e, t) => (w(r, e, "read from private field"), t ? t.call(r) : e.get(r)), n = (r, e, t) => e.has(r) ? A("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), h = (r, e, t, a) => (w(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, t), t), k = (r, e, t) => (w(r, e, "access private method"), t);
6
- import { i as z } from "./index-euf5anj6.js";
7
- var l;
8
- class E {
9
- constructor() {
10
- n(this, l);
11
- this.storage = null, this.name = "store-registry", h(this, l, null), z && (this.storage = localStorage);
12
- }
13
- get loadedState() {
14
- return i(this, l);
15
- }
16
- saveState() {
17
- const e = this.getState(), t = JSON.stringify(e);
18
- localStorage.setItem(this.name, t);
19
- }
20
- loadState(e = localStorage.getItem(this.name)) {
21
- e && (typeof e == "string" ? h(this, l, JSON.parse(e)) : h(this, l, e), f.current.forEach((t) => {
22
- t.name && this.updateStore(t);
23
- }));
24
- }
25
- resetState() {
26
- f.current.forEach((e) => {
27
- e.name && e.reset();
28
- }), this.saveState();
29
- }
30
- updateStore(e) {
31
- var t, a;
32
- if (!Array.isArray((t = i(this, l)) == null ? void 0 : t.stores))
33
- return e;
34
- if (e.name) {
35
- const v = (a = i(this, l)) == null ? void 0 : a.stores.find((_) => _.name === e.name);
36
- v && (e.current = v.value);
37
- }
38
- return e;
39
- }
40
- getState() {
41
- const e = {
42
- stores: []
43
- };
44
- return f.current.forEach((t) => {
45
- t.name && (e.stores.find((a) => a.name === t.name) || e.stores.push({
46
- value: t.current,
47
- name: t.name
48
- }));
49
- }), e;
50
- }
51
- }
52
- l = new WeakMap();
53
- const M = new E();
54
- var d, s, S, u, m, c, g, b, y, N;
55
- class q {
56
- constructor(e, t) {
57
- n(this, y);
58
- n(this, d);
59
- n(this, s);
60
- n(this, S);
61
- n(this, u, /* @__PURE__ */ new Set());
62
- n(this, m);
63
- n(this, c);
64
- n(this, g);
65
- n(this, b);
66
- h(this, d, t == null ? void 0 : t.name), this.__manager = t == null ? void 0 : t.__manager, h(this, s, {
67
- initial: e,
68
- previous: void 0,
69
- current: e
70
- }), h(this, S, (t == null ? void 0 : t.equalityCheck) || ((a, v) => a === v)), t != null && t.validate && this.addMiddleware(t.validate), h(this, g, (t == null ? void 0 : t.notifyAndClose) || !1), h(this, b, (t == null ? void 0 : t.invisible) || !1), h(this, m, (t == null ? void 0 : t.skipSubscribeNotification) || !1), i(this, d) && M.updateStore(this);
71
- }
72
- get name() {
73
- return i(this, d);
74
- }
75
- get initial() {
76
- return i(this, s).initial;
77
- }
78
- get previous() {
79
- return i(this, s).previous;
80
- }
81
- get current() {
82
- return i(this, s).current;
83
- }
84
- set current(e) {
85
- if (!i(this, S).call(this, i(this, s).current, e)) {
86
- if (i(this, s).previous = i(this, s).current, i(this, c))
87
- for (const t of i(this, c))
88
- e = t(e);
89
- i(this, s).current = e, k(this, y, N).call(this), i(this, g) && this.close();
90
- }
91
- }
92
- get subscribers() {
93
- return i(this, u);
94
- }
95
- addMiddleware(e) {
96
- i(this, c) || h(this, c, /* @__PURE__ */ new Set()), i(this, c).add(e);
97
- }
98
- removeMiddleware(e) {
99
- var t, a;
100
- (t = i(this, c)) == null || t.delete(e), (a = i(this, c)) != null && a.size || h(this, c, void 0);
101
- }
102
- subscribe(e) {
103
- return !i(this, b) && !i(this, u).size && I(this), i(this, u).add(e), i(this, m) || e(i(this, s)), () => {
104
- this.unsubscribe(e);
105
- };
106
- }
107
- unsubscribe(e) {
108
- i(this, u).delete(e), i(this, u).size || C(this);
109
- }
110
- reset() {
111
- this.current = Array.isArray(this.initial) ? [...this.initial] : this.initial;
112
- }
113
- close() {
114
- i(this, u).clear(), i(this, s).previous = void 0, i(this, s).current = i(this, s).initial, C(this);
115
- }
116
- }
117
- d = new WeakMap(), s = new WeakMap(), S = new WeakMap(), u = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), b = new WeakMap(), y = new WeakSet(), N = function() {
118
- for (const e of i(this, u))
119
- e(i(this, s));
120
- };
121
- const f = new q([], {
122
- invisible: !0
123
- });
124
- function I(r) {
125
- f.current.includes(r) || (f.current = [...f.current, r]);
126
- }
127
- function C(r) {
128
- f.current.includes(r) && (f.current = f.current.filter((e) => e !== r));
129
- }
130
- export {
131
- q as S,
132
- f as a,
133
- M as s
134
- };
@@ -1 +0,0 @@
1
- "use strict";var A=r=>{throw TypeError(r)};var w=(r,e,t)=>e.has(r)||A("Cannot "+t);var i=(r,e,t)=>(w(r,e,"read from private field"),t?t.call(r):e.get(r)),c=(r,e,t)=>e.has(r)?A("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),h=(r,e,t,a)=>(w(r,e,"write to private field"),a?a.call(r,t):e.set(r,t),t),_=(r,e,t)=>(w(r,e,"access private method"),t);const E=require("./index-Cqw2NKev.cjs");var f;class M{constructor(){c(this,f);this.storage=null,this.name="store-registry",h(this,f,null),E.isBrowser&&(this.storage=localStorage)}get loadedState(){return i(this,f)}saveState(){const e=this.getState(),t=JSON.stringify(e);localStorage.setItem(this.name,t)}loadState(e=localStorage.getItem(this.name)){e&&(typeof e=="string"?h(this,f,JSON.parse(e)):h(this,f,e),l.current.forEach(t=>{t.name&&this.updateStore(t)}))}resetState(){l.current.forEach(e=>{e.name&&e.reset()}),this.saveState()}updateStore(e){var t,a;if(!Array.isArray((t=i(this,f))==null?void 0:t.stores))return e;if(e.name){const b=(a=i(this,f))==null?void 0:a.stores.find(z=>z.name===e.name);b&&(e.current=b.value)}return e}getState(){const e={stores:[]};return l.current.forEach(t=>{t.name&&(e.stores.find(a=>a.name===t.name)||e.stores.push({value:t.current,name:t.name}))}),e}}f=new WeakMap;const C=new M;var d,s,S,u,m,n,g,v,y,q;class N{constructor(e,t){c(this,y);c(this,d);c(this,s);c(this,S);c(this,u,new Set);c(this,m);c(this,n);c(this,g);c(this,v);h(this,d,t==null?void 0:t.name),this.__manager=t==null?void 0:t.__manager,h(this,s,{initial:e,previous:void 0,current:e}),h(this,S,(t==null?void 0:t.equalityCheck)||((a,b)=>a===b)),t!=null&&t.validate&&this.addMiddleware(t.validate),h(this,g,(t==null?void 0:t.notifyAndClose)||!1),h(this,v,(t==null?void 0:t.invisible)||!1),h(this,m,(t==null?void 0:t.skipSubscribeNotification)||!1),i(this,d)&&C.updateStore(this)}get name(){return i(this,d)}get initial(){return i(this,s).initial}get previous(){return i(this,s).previous}get current(){return i(this,s).current}set current(e){if(!i(this,S).call(this,i(this,s).current,e)){if(i(this,s).previous=i(this,s).current,i(this,n))for(const t of i(this,n))e=t(e);i(this,s).current=e,_(this,y,q).call(this),i(this,g)&&this.close()}}get subscribers(){return i(this,u)}addMiddleware(e){i(this,n)||h(this,n,new Set),i(this,n).add(e)}removeMiddleware(e){var t,a;(t=i(this,n))==null||t.delete(e),(a=i(this,n))!=null&&a.size||h(this,n,void 0)}subscribe(e){return!i(this,v)&&!i(this,u).size&&R(this),i(this,u).add(e),i(this,m)||e(i(this,s)),()=>{this.unsubscribe(e)}}unsubscribe(e){i(this,u).delete(e),i(this,u).size||k(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){i(this,u).clear(),i(this,s).previous=void 0,i(this,s).current=i(this,s).initial,k(this)}}d=new WeakMap,s=new WeakMap,S=new WeakMap,u=new WeakMap,m=new WeakMap,n=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakSet,q=function(){for(const e of i(this,u))e(i(this,s))};const l=new N([],{invisible:!0});function R(r){l.current.includes(r)||(l.current=[...l.current,r])}function k(r){l.current.includes(r)&&(l.current=l.current.filter(e=>e!==r))}exports.Store=N;exports.activeStores=l;exports.storeRegistry=C;