aptechka 0.84.4 → 0.85.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 (54) hide show
  1. package/lib/{DerivedArray-BePrxcLC.js → DerivedArray-C1gHUvCT.js} +2 -2
  2. package/lib/{DerivedArray-xYBpcTp8.cjs → DerivedArray-CiMrwSDt.cjs} +1 -1
  3. package/lib/{DragControls-BgTBgiue.js → DragControls-BNaevZBQ.js} +23 -13
  4. package/lib/DragControls-XC4E7seK.cjs +1 -0
  5. package/lib/{LocalLinks-BdqYzt1b.js → LocalLinks-CI-vxMaR.js} +1 -1
  6. package/lib/{Tweened-DabaFaHX.js → Tweened-C1FsHjhN.js} +1 -1
  7. package/lib/animation/index.js +1 -1
  8. package/lib/controls/index.cjs +1 -1
  9. package/lib/controls/index.js +1 -1
  10. package/lib/{easings-BSGJFMAo.js → easings-DE1AUrbN.js} +14 -14
  11. package/lib/jsx/h.d.ts +0 -3
  12. package/lib/jsx/hooks/component/useShadow.d.ts +1 -1
  13. package/lib/jsx/index.cjs +1 -1
  14. package/lib/jsx/index.js +12 -9
  15. package/lib/jsx/render.d.ts +1 -1
  16. package/lib/{layout-C26zkY7D.js → layout-BL6AX9-r.js} +3 -3
  17. package/lib/layout-box/index.cjs +1 -1
  18. package/lib/layout-box/index.d.ts +2 -2
  19. package/lib/layout-box/index.js +11 -5
  20. package/lib/local-links/index.js +1 -1
  21. package/lib/morph/index.cjs +1 -1
  22. package/lib/morph/index.js +5 -2
  23. package/lib/{morph-BtgB1YQP.js → morph-BByLJAAh.js} +8 -8
  24. package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +1 -1
  25. package/lib/need_redo_tweaker/index.cjs +2 -2
  26. package/lib/need_redo_tweaker/index.js +4 -8
  27. package/lib/promises-BsIKOEDq.js +13 -0
  28. package/lib/promises-nDm8_iG6.cjs +1 -0
  29. package/lib/{render-LpimRXgl.js → render-DHKcgkoZ.js} +22 -11
  30. package/lib/render-R8P4qkHo.cjs +1 -0
  31. package/lib/router/index.cjs +1 -1
  32. package/lib/router/index.js +2 -2
  33. package/lib/scroll/ScrollElement.d.ts +1 -1
  34. package/lib/scroll/index.cjs +1 -1
  35. package/lib/scroll/index.js +9 -9
  36. package/lib/scroll-BtUpTUwr.cjs +1 -0
  37. package/lib/{scroll-DoNeuIgT.js → scroll-CHhF7Put.js} +10 -14
  38. package/lib/scroll-kit/index.cjs +1 -1
  39. package/lib/scroll-kit/index.js +23 -5
  40. package/lib/spa/index.js +2 -2
  41. package/lib/store/index.cjs +1 -1
  42. package/lib/store/index.js +1 -1
  43. package/lib/utils/color.d.ts +1 -0
  44. package/lib/utils/index.cjs +1 -1
  45. package/lib/utils/index.d.ts +4 -0
  46. package/lib/utils/index.js +142 -33
  47. package/lib/utils/lang.d.ts +6 -0
  48. package/lib/utils/loading.d.ts +1 -0
  49. package/lib/utils/progress.d.ts +2 -0
  50. package/lib/utils/scroll.d.ts +4 -2
  51. package/package.json +3 -3
  52. package/lib/DragControls-FmiuZDKq.cjs +0 -1
  53. package/lib/render-H9BjFLZ3.cjs +0 -1
  54. package/lib/scroll-D2tOpCnP.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const intersector_index=require("./index-DZ44osDT.cjs"),dom=require("./dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");require("./Store-DZnOrofs.cjs");const easings=require("./easings-BWq0pPLq.cjs"),Tweened=require("./Tweened-3UYSwrvs.cjs"),gestures=require("./gestures-DtYbQr49.cjs"),number=require("./number-Bu4sGvW7.cjs"),order_index=require("./order/index.cjs"),notifier_index=require("./notifier/index.cjs");var _changeEvent;const _Controls=class _Controls{constructor(){__privateAdd(this,_changeEvent,new notifier_index.Notifier)}get changeEvent(){return __privateGet(this,_changeEvent)}};_changeEvent=new WeakMap,__name(_Controls,"Controls");let Controls=_Controls;var _element,_dimensionElement,_dimension,_keydownListener;const _KeyboardControls=class _KeyboardControls extends Controls{constructor(options){super();__privateAdd(this,_element,null);__privateAdd(this,_dimensionElement,null);__privateAdd(this,_dimension,"offsetHeight");__privateAdd(this,_keydownListener,__name(e=>{const dir=e.shiftKey?-1:1;let value;e.code==="Space"?value=dir*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.4:e.code==="ArrowLeft"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowRight"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="PageUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="PageDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="Home"?value=0:e.code==="End"&&(value=__privateGet(this,_dimension)==="offsetWidth"?__privateGet(this,_dimensionElement).scrollWidth:__privateGet(this,_dimensionElement).scrollHeight),value&&(e.stopPropagation(),this.changeEvent.notify("keyboard",value,e))},"#keydownListener"));intersector_index.isBrowser&&(__privateSet(this,_element,options!=null&&options.element&&dom.getElement(options.element)||window),__privateSet(this,_dimensionElement,__privateGet(this,_element)instanceof HTMLElement?__privateGet(this,_element):document.documentElement),this.dimension=options==null?void 0:options.dimension)}set dimension(value){__privateSet(this,_dimension,value==="width"?"offsetWidth":"offsetHeight")}connect(){intersector_index.isBrowser&&__privateGet(this,_element).addEventListener("keydown",__privateGet(this,_keydownListener))}disconnect(){intersector_index.isBrowser&&__privateGet(this,_element).removeEventListener("keydown",__privateGet(this,_keydownListener))}};_element=new WeakMap,_dimensionElement=new WeakMap,_dimension=new WeakMap,_keydownListener=new WeakMap,__name(_KeyboardControls,"KeyboardControls");let KeyboardControls=_KeyboardControls;var _speed,_interval,_options,_intervalId,_paused,_pauseTimeoutId,_connected,_AutoplayControls_instances,setup_fn,clear_fn,_animationFrameCallback,_intervalCallback,_documentVisibilityChangeListener;const _AutoplayControls=class _AutoplayControls extends Controls{constructor(options){super();__privateAdd(this,_AutoplayControls_instances);__privateAdd(this,_speed);__privateAdd(this,_interval);__privateAdd(this,_options);__privateAdd(this,_intervalId);__privateAdd(this,_paused);__privateAdd(this,_pauseTimeoutId);__privateAdd(this,_connected);__privateAdd(this,_animationFrameCallback);__privateAdd(this,_intervalCallback);__privateAdd(this,_documentVisibilityChangeListener);this.direction=1,__privateSet(this,_paused,new Tweened.Tweened(0,{easing:easings.easeInQuad})),__privateSet(this,_connected,!1),__privateSet(this,_animationFrameCallback,e=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",e.timeBetweenFrames*__privateGet(this,_speed)*this.direction*(1-__privateGet(this,_paused).current),e)}),__privateSet(this,_intervalCallback,()=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",Math.sign(__privateGet(this,_speed))*this.direction*(1-__privateGet(this,_paused).current),null)}),__privateSet(this,_documentVisibilityChangeListener,()=>{__privateGet(this,_interval)&&(document.hidden?__privateGet(this,_paused).set(1,{equalize:!0}):__privateGet(this,_paused).set(0,{equalize:!0}))}),__privateSet(this,_speed,(options==null?void 0:options.speed)||1),__privateSet(this,_interval,(options==null?void 0:options.interval)||!1),__privateSet(this,_options,options)}set interval(value){__privateSet(this,_interval,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}set speed(value){__privateSet(this,_speed,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}connect(){__privateGet(this,_connected)||(__privateSet(this,_connected,!0),__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this))}disconnect(){__privateGet(this,_connected)&&(__privateSet(this,_connected,!1),__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this))}pauseAndContinue(duration,instant){__privateGet(this,_connected)&&duration&&(clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).set(1,{duration:Math.min(duration,1e3),equalize:instant}),__privateSet(this,_pauseTimeoutId,setTimeout(()=>{__privateGet(this,_paused).set(0,{duration:Math.min(duration,5e3),equalize:instant})},duration)))}};_speed=new WeakMap,_interval=new WeakMap,_options=new WeakMap,_intervalId=new WeakMap,_paused=new WeakMap,_pauseTimeoutId=new WeakMap,_connected=new WeakMap,_AutoplayControls_instances=new WeakSet,setup_fn=__name(function(){__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this),__privateGet(this,_interval)?__privateSet(this,_intervalId,setInterval(__privateGet(this,_intervalCallback),Math.abs(__privateGet(this,_speed)))):intersector_index.ticker.subscribe(__privateGet(this,_animationFrameCallback),__privateGet(this,_options)),document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#setup"),clear_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameCallback)),clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).close(),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#clear"),_animationFrameCallback=new WeakMap,_intervalCallback=new WeakMap,_documentVisibilityChangeListener=new WeakMap,__name(_AutoplayControls,"AutoplayControls");let AutoplayControls=_AutoplayControls;var _element2,_timeoutId,_prevEventDate,_wheelListener;const _WheelControls=class _WheelControls extends Controls{constructor(options){super();__privateAdd(this,_element2,null);__privateAdd(this,_timeoutId);__privateAdd(this,_prevEventDate);__privateAdd(this,_wheelListener,__name(event=>{let delta=0;const absY=Math.abs(event.deltaY),absX=Math.abs(event.deltaX);if(!(this.axis==="x"&&absY>absX||this.axis==="y"&&absX>absY)&&(event.preventDefault(),!(this.debounce&&this.axis==="x"&&absX<5||this.debounce&&this.axis==="y"&&absY<5)))if(delta=(this.axis==="max"?absX>absY?event.deltaX:event.deltaY:this.axis==="x"?event.deltaX:event.deltaY)*this.speed,event.stopPropagation(),this.debounce){const now=Date.now();if(now-__privateGet(this,_prevEventDate)>40&&(delta=100*Math.sign(delta)),__privateSet(this,_prevEventDate,now),Math.abs(delta)<100||__privateGet(this,_timeoutId))return;this.changeEvent.notify("wheel",delta,event),__privateSet(this,_timeoutId,setTimeout(()=>{__privateSet(this,_timeoutId,void 0)},80))}else this.changeEvent.notify("wheel",delta,event)},"#wheelListener"));this.axis=(options==null?void 0:options.axis)||"y",this.speed=(options==null?void 0:options.speed)||1,this.debounce=(options==null?void 0:options.debounce)||!1,__privateSet(this,_prevEventDate,Date.now()),intersector_index.isBrowser&&__privateSet(this,_element2,options!=null&&options.element&&dom.getElement(options.element)||window)}connect(){intersector_index.isBrowser&&__privateGet(this,_element2).addEventListener("wheel",__privateGet(this,_wheelListener),{passive:!1})}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_element2).removeEventListener("wheel",__privateGet(this,_wheelListener)),clearTimeout(__privateGet(this,_timeoutId)))}};_element2=new WeakMap,_timeoutId=new WeakMap,_prevEventDate=new WeakMap,_wheelListener=new WeakMap,__name(_WheelControls,"WheelControls");let WheelControls=_WheelControls;var _currentElement,_rootElement,_element3,_delta,_linkElements,_dragDelta,_linkClickListener,_pointerdownListener,_tickListener;const _DragControls=class _DragControls extends Controls{constructor(options){super();__privateAdd(this,_rootElement);__privateAdd(this,_element3);__privateAdd(this,_delta);__privateAdd(this,_linkElements);__privateAdd(this,_dragDelta);__privateAdd(this,_linkClickListener);__privateAdd(this,_pointerdownListener);__privateAdd(this,_tickListener);this.inertion=1,__privateSet(this,_rootElement,null),__privateSet(this,_element3,null),__privateSet(this,_delta,0),__privateSet(this,_linkElements,[]),__privateSet(this,_dragDelta,0),__privateSet(this,_linkClickListener,e=>{Math.abs(__privateGet(this,_dragDelta))>2&&e.preventDefault()}),__privateSet(this,_pointerdownListener,grabEvent=>{if(__privateSet(this,_dragDelta,0),__privateSet(this,_delta,0),grabEvent.button!==0||grabEvent.composedPath().find(p=>p instanceof HTMLElement&&p.hasAttribute("drag-dead-zone")))return;this.swipe||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener));let prev=grabEvent,okToNotify=!1;document.documentElement.classList.add("grabbing");let dx=0,dy=0,ddx=0,ddy=0;gestures.setupDrag(moveEvent=>{__privateGet(_DragControls,_currentElement)&&__privateGet(_DragControls,_currentElement)!==__privateGet(this,_element3)||(dx=prev.x-moveEvent.x,dy=prev.y-moveEvent.y,ddx=moveEvent.x-grabEvent.x,ddy=moveEvent.y-grabEvent.y,this.axis==="x"?(__privateSet(this,_dragDelta,ddx),__privateSet(this,_delta,dx)):(__privateSet(this,_dragDelta,ddy),__privateSet(this,_delta,dy)),prev=moveEvent,okToNotify=this.axis==="x"&&Math.abs(ddx)>Math.abs(ddy)||this.axis==="y"&&Math.abs(ddy)>Math.abs(ddx),okToNotify&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),__privateSet(_DragControls,_currentElement,__privateGet(this,_element3)),this.changeEvent.notify("drag",__privateGet(this,_delta),moveEvent)))},e=>{__privateSet(_DragControls,_currentElement,null),okToNotify&&(!this.swipe&&this.inertion?(__privateSet(this,_delta,__privateGet(this,_delta)*this.inertion),intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{order:order_index.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",__privateGet(this,_delta),e)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),__privateSet(this,_tickListener,()=>{Math.floor(Math.abs(__privateGet(this,_delta)))||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),__privateSet(this,_delta,__privateGet(this,_delta)*.95),__privateSet(this,_delta,number.preciseNumber(__privateGet(this,_delta),3)),this.changeEvent.notify("drag",__privateGet(this,_delta),null)}),this.axis=(options==null?void 0:options.axis)||"y",this.swipe=(options==null?void 0:options.swipe)||!1,intersector_index.isBrowser&&(__privateSet(this,_element3,options!=null&&options.element&&dom.getElement(options.element)||document.documentElement),__privateSet(this,_rootElement,(options==null?void 0:options.rootElement)||__privateGet(this,_element3)))}connect(){intersector_index.isBrowser&&(__privateSet(this,_linkElements,[...__privateGet(this,_rootElement).querySelectorAll("a")]),__privateGet(this,_linkElements).forEach(element=>{element.addEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).addEventListener("pointerdown",__privateGet(this,_pointerdownListener)))}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_linkElements).forEach(element=>{element.removeEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).removeEventListener("pointerdown",__privateGet(this,_pointerdownListener)),intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)))}};_currentElement=new WeakMap,_rootElement=new WeakMap,_element3=new WeakMap,_delta=new WeakMap,_linkElements=new WeakMap,_dragDelta=new WeakMap,_linkClickListener=new WeakMap,_pointerdownListener=new WeakMap,_tickListener=new WeakMap,__name(_DragControls,"DragControls"),__privateAdd(_DragControls,_currentElement,null);let DragControls=_DragControls;exports.AutoplayControls=AutoplayControls;exports.Controls=Controls;exports.DragControls=DragControls;exports.KeyboardControls=KeyboardControls;exports.WheelControls=WheelControls;
@@ -1 +0,0 @@
1
- "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const Store=require("./Store-DZnOrofs.cjs"),string=require("./string-CbRNzmd9.cjs"),morph=require("./morph-Buhxq-X0.cjs"),object=require("./object-DTY_W6xG.cjs");require("construct-style-sheets-polyfill");const intersector_index=require("./index-DZ44osDT.cjs"),connector_index=require("./connector/index.cjs"),DerivedArray=require("./DerivedArray-xYBpcTp8.cjs");require("./css-value-parser/index.cjs");require("./window-resizer/index.cjs");require("./element-resizer/index.cjs");const activeComponent={current:null},componentElementLoadingTypes=["idle","load","visible","constructor","connect"];var _loadCallback,_connectCallbacks,_disconnectCallbacks,_loadingType,_idleId,_windowLoadListener,_idleListener,_intersectionListener,_ComponentElement_instances,connect_fn;const _ComponentElement=class _ComponentElement extends HTMLElement{constructor(){super();__privateAdd(this,_ComponentElement_instances);__privateAdd(this,_loadCallback);__privateAdd(this,_connectCallbacks,[]);__privateAdd(this,_disconnectCallbacks,[]);__privateAdd(this,_loadingType,"constructor");__privateAdd(this,_idleId);__privateAdd(this,_windowLoadListener,__name(()=>{window.removeEventListener("load",__privateGet(this,_windowLoadListener)),__privateGet(this,_loadingType)==="load"&&__privateMethod(this,_ComponentElement_instances,connect_fn).call(this)},"#windowLoadListener"));__privateAdd(this,_idleListener,__name(()=>{__privateSet(this,_idleId,void 0),__privateGet(this,_loadingType)==="idle"&&__privateMethod(this,_ComponentElement_instances,connect_fn).call(this)},"#idleListener"));__privateAdd(this,_intersectionListener,__name(entry=>{entry.isIntersecting&&(intersector_index.intersector.unsubscribe(__privateGet(this,_intersectionListener)),__privateGet(this,_loadingType)==="visible"&&__privateMethod(this,_ComponentElement_instances,connect_fn).call(this))},"#intersectionListener"));activeComponent.current=this}addLoadCallback(callback){this.hasAttribute("loading")&&componentElementLoadingTypes.includes(this.getAttribute("loading"))?__privateSet(this,_loadingType,this.getAttribute("loading")):__privateSet(this,_loadingType,"constructor"),__privateSet(this,_loadCallback,callback),__privateGet(this,_loadingType)==="constructor"&&__privateGet(this,_loadCallback).call(this)}addConnectCallback(callback){__privateGet(this,_connectCallbacks).push(callback)}addDisconnectCallback(callback){__privateGet(this,_disconnectCallbacks).push(callback)}connectedCallback(){const windowLoadSetup=__name(()=>{document.readyState==="complete"?__privateGet(this,_windowLoadListener).call(this):window.addEventListener("load",__privateGet(this,_windowLoadListener))},"windowLoadSetup");__privateGet(this,_loadingType)==="connect"||__privateGet(this,_loadingType)==="constructor"?__privateMethod(this,_ComponentElement_instances,connect_fn).call(this):__privateGet(this,_loadingType)==="load"?windowLoadSetup():__privateGet(this,_loadingType)==="idle"?window.requestIdleCallback?__privateSet(this,_idleId,window.requestIdleCallback(__privateGet(this,_idleListener))):windowLoadSetup():__privateGet(this,_loadingType)==="visible"&&intersector_index.intersector.subscribe(this,__privateGet(this,_intersectionListener)),activeComponent.current===this&&(activeComponent.current=null)}disconnectedCallback(){__privateGet(this,_disconnectCallbacks).forEach(callback=>{callback(this)}),__privateSet(this,_connectCallbacks,[]),__privateSet(this,_disconnectCallbacks,[]),activeComponent.current===this&&(activeComponent.current=null),window.removeEventListener("load",__privateGet(this,_windowLoadListener)),window.cancelIdleCallback&&__privateGet(this,_idleId)&&window.cancelIdleCallback(__privateGet(this,_idleId)),intersector_index.intersector.unsubscribe(__privateGet(this,_intersectionListener))}};_loadCallback=new WeakMap,_connectCallbacks=new WeakMap,_disconnectCallbacks=new WeakMap,_loadingType=new WeakMap,_idleId=new WeakMap,_windowLoadListener=new WeakMap,_idleListener=new WeakMap,_intersectionListener=new WeakMap,_ComponentElement_instances=new WeakSet,connect_fn=__name(function(){var _a;activeComponent.current=this,this.querySelectorAll("[data-fallback]").forEach(el=>{el.remove()}),__privateGet(this,_loadingType)!=="constructor"&&((_a=__privateGet(this,_loadCallback))==null||_a.call(this)),__privateGet(this,_connectCallbacks).forEach(callback=>{const unsub=callback(this);unsub&&__privateGet(this,_disconnectCallbacks).push(unsub)}),activeComponent.current===this&&(activeComponent.current=null)},"#connect"),__name(_ComponentElement,"ComponentElement");let ComponentElement=_ComponentElement;function subscribeToStore(element,store,callback){const unsubscribe=store.subscribe(e=>{callback(e)});connector_index.connector.subscribe(element,{disconnectCallback:__name(()=>{unsubscribe()},"disconnectCallback"),maxWaitSec:20,unsubscribeAfterDisconnect:!0})}__name(subscribeToStore,"subscribeToStore");function setClassAttribute(element,classes){classes&&(classes instanceof Store.Store?subscribeToStore(element,classes,e=>{e.previous&&element.classList.remove(e.previous.toString()),e.current&&element.classList.add(e.current.toString())}):typeof classes=="object"&&!Array.isArray(classes)?Object.entries(classes).forEach(([key,value])=>{value instanceof Store.Store?subscribeToStore(element,value,e=>{element.classList.toggle(key,!!e.current)}):value&&element.classList.add(key)}):Array.isArray(classes)?classes.forEach(item=>{typeof item=="string"?element.classList.add(item):setClassAttribute(element,item)}):classes.toString().split(" ").map(v=>element.classList.add(v.trim())))}__name(setClassAttribute,"setClassAttribute");function setStyleAttribute(element,value){value&&(typeof value=="object"?Object.entries(value).forEach(([key,value2])=>{value2 instanceof Store.Store?subscribeToStore(element,value2,e=>{var _a;element.style[key]=(_a=e.current)==null?void 0:_a.toString()}):(typeof value2=="number"||typeof value2=="string"||typeof value2=="boolean")&&(element.style[key]=value2.toString())}):typeof value=="string"&&(element.style=value))}__name(setStyleAttribute,"setStyleAttribute");function setAttribute(element,key,value){key==="ref"&&value?Array.isArray(value)?value.forEach(v=>{typeof v=="object"&&"value"in v&&(v.value=element)}):typeof value=="object"&&"value"in value&&(value.value=element):key==="className"||key==="class"?setClassAttribute(element,value):key==="style"?setStyleAttribute(element,value):key==="setHtml"&&value!=null?element.innerHTML=value:typeof value=="number"?key==="tabIndex"?element.setAttribute("tabindex",value.toString()):setAttribute(element,key,value.toString()):typeof value=="string"?key==="htmlFor"?element.setAttribute("for",value):element.setAttribute(key,value):typeof value=="boolean"?value?element.setAttribute(key,""):element.removeAttribute(key):value instanceof Store.Store&&subscribeToStore(element,value,e=>{key in element?element[key]=e.current:setAttribute(element,key,e.current)})}__name(setAttribute,"setAttribute");function setAttributes(ele,attributes){for(const[key,value]of Object.entries(attributes!=null?attributes:{}))typeof value=="function"&&key.startsWith("on")?ele.addEventListener(string.uncapitalize(key.replace("on","")),value):setAttribute(ele,key,value)}__name(setAttributes,"setAttributes");function createElement(tag,isSVG){return tag==="svg"?document.createElementNS("http://www.w3.org/2000/svg","svg"):isSVG?document.createElementNS("http://www.w3.org/2000/svg",tag):document.createElement(tag)}__name(createElement,"createElement");function filterChildren(children){const filtered=[];return(Array.isArray(children)?children:[children]).forEach(child=>{child!=null&&(typeof child=="number"?filtered.push(child.toString()):Array.isArray(child)?child.forEach(c=>{filtered.push(...filterChildren(c))}):filtered.push(child))}),filtered}__name(filterChildren,"filterChildren");function hydrateTextNode(element,newChild,index){const existingChild=element.childNodes[index];existingChild&&existingChild.nodeType===Node.TEXT_NODE?existingChild.textContent!==String(newChild)&&(console.warn(`Hydration text mismatch: expected "${newChild}", got "${existingChild.textContent}"`),existingChild.textContent=String(newChild)):newChild!=null&&newChild!==""&&element.insertBefore(document.createTextNode(String(newChild)),element.childNodes[index]||null)}__name(hydrateTextNode,"hydrateTextNode");function storeChildren(element,store){const currentChildNodes=[...element.childNodes].filter(node=>node.__storeId===store.id),newChildren=store.current,newChildrenArray=Array.isArray(newChildren)?newChildren:[newChildren],newNodes=[];if(newChildrenArray.forEach(newChild=>{let newNode=null;typeof newChild=="boolean"||typeof newChild=="number"||typeof newChild=="string"?newNode=document.createTextNode(newChild.toString()):newChild instanceof Node&&(newNode=newChild),newNode&&(newNode.__storeId=store.id,newNodes.push(newNode))}),store instanceof DerivedArray.DerivedKeyedArray){const nodesToStay=[];newNodes.forEach((newNode,i)=>{const oldNode=currentChildNodes.find(oldNode2=>oldNode2.__key===newNode.__key);oldNode?oldNode.isEqualNode(newNode)?nodesToStay.push(oldNode):(oldNode.replaceWith(newNode),nodesToStay.push(newNode)):(nodesToStay.push(newNode),element.appendChild(newNode))}),currentChildNodes.forEach(currentNode=>{nodesToStay.includes(currentNode)||currentNode.remove()})}else newNodes.forEach((node,i)=>{var _a;const founded=currentChildNodes[i];if(founded)founded.isEqualNode(node)||(founded.replaceWith(node),currentChildNodes[i]=node);else{const lastChildNode=currentChildNodes[currentChildNodes.length-1];lastChildNode?(_a=lastChildNode.parentNode)==null||_a.insertBefore(node,lastChildNode.nextSibling):element.appendChild(node)}}),currentChildNodes.slice(newNodes.length).forEach(node=>{node.remove()})}__name(storeChildren,"storeChildren");const _Props=class _Props{constructor(tag,attributes,children){this.tag=tag,this.attributes=attributes,this.children=children}};__name(_Props,"Props");let Props=_Props;const _ComponentProps=class _ComponentProps extends Props{};__name(_ComponentProps,"ComponentProps");let ComponentProps=_ComponentProps;const _ElementProps=class _ElementProps extends Props{};__name(_ElementProps,"ElementProps");let ElementProps=_ElementProps;const _HeadProps=class _HeadProps extends Props{};__name(_HeadProps,"HeadProps");let HeadProps=_HeadProps;function appendChildren(element,attributes,children,isSVG=!1){const filteredChildren=filterChildren(children);setAttributes(element,attributes),filteredChildren.forEach((child,index)=>{handleChild(element,child,index,isSVG)})}__name(appendChildren,"appendChildren");function handleChild(element,child,index,isSVG){child instanceof Store.Store?handleStoreChild(element,child):child instanceof ComponentProps?handleComponentProps(element,child):child instanceof ElementProps?handleElementProps(element,child,index,isSVG):child instanceof HeadProps?handleHeadProps(child):handleTextNode(element,child,index)}__name(handleChild,"handleChild");function handleStoreChild(element,child){subscribeToStore(element,child,()=>{storeChildren(element,child)})}__name(handleStoreChild,"handleStoreChild");function handleComponentProps(element,child){child.tag==="shadow"&&element.shadowRoot?appendChildren(element.shadowRoot,child.attributes,child.children):appendChildren(element,child.attributes,child.children)}__name(handleComponentProps,"handleComponentProps");function handleElementProps(element,child,index,isSVG){let childElement=null;if(isHydrating.value){const existingChild=element.children[index];(existingChild==null?void 0:existingChild.nodeName.toLowerCase())===child.tag?(childElement=existingChild,appendChildren(childElement,child.attributes,child.children,isSVG)):(childElement=createElement(child.tag,isSVG),appendChildren(childElement,child.attributes,child.children,isSVG),element.append(childElement))}else childElement=createElement(child.tag,isSVG),appendChildren(childElement,child.attributes,child.children,isSVG),element.append(childElement)}__name(handleElementProps,"handleElementProps");function handleHeadProps(child){const headElement=document.createElement(child.tag);appendChildren(headElement,child.attributes,child.children);const patches=morph.diff(document.head,headElement);morph.patch(document.head,patches)}__name(handleHeadProps,"handleHeadProps");function handleTextNode(element,child,index){isHydrating.value?hydrateTextNode(element,child,index):element.append(child)}__name(handleTextNode,"handleTextNode");function processChildren(attributes,children){let result=children.filter(Boolean).length?children:attributes==null?void 0:attributes.children;return result?result.flat(2):[]}__name(processChildren,"processChildren");function handleStringTag(tag,attributes,children){switch(tag){case"component":case"shadow":return new ComponentProps(tag,attributes,children);case"head":return new HeadProps(tag,attributes,children);default:return new ElementProps(tag,attributes,children)}}__name(handleStringTag,"handleStringTag");function handleFunctionTag(jsxTag,attributes,children){return object.isESClass(jsxTag)?createClassElement(jsxTag,attributes,children):jsxTag===Fragment?Fragment(children):jsxTag.template?jsxTag(__spreadValues({},attributes)):createCustomElement(jsxTag,attributes,children)}__name(handleFunctionTag,"handleFunctionTag");function createClassElement(jsxTag,attributes,children){const element=new jsxTag;return appendChildren(element,attributes,children),element}__name(createClassElement,"createClassElement");function createCustomElement(jsxTag,attributes,children){const name=jsxTag.define||`e-${string.camelToKebab(jsxTag.name)}`,Constructor=getOrDefineCustomElement(name,jsxTag),id=generateElementId(jsxTag.name,attributes),element=getOrCreateElement(name,id,Constructor);return fillComponentElement(element,jsxTag,attributes,children),element}__name(createCustomElement,"createCustomElement");function getOrDefineCustomElement(name,jsxTag){var _a;let Constructor=customElements.get(name);return Constructor||(Constructor=(_a=class extends ComponentElement{constructor(){super()}},__name(_a,"Constructor"),_a.formAssociated=jsxTag.formAssociated,_a),customElements.define(name,Constructor)),Constructor}__name(getOrDefineCustomElement,"getOrDefineCustomElement");function generateElementId(tagName,attributes){if(attributes!=null&&attributes.__hydrationId)return attributes.__hydrationId;const index=(indexMap.get(tagName)||0)+1;return indexMap.set(tagName,index),`${tagName}-${index}`}__name(generateElementId,"generateElementId");function getOrCreateElement(name,id,Constructor){if(isHydrating.value){const selector=`${name}[data-id="${id}"]`,existingElement=document.querySelector(selector);if(existingElement&&existingElement instanceof Constructor)return existingElement}const element=new Constructor;return element.setAttribute("data-id",id),element}__name(getOrCreateElement,"getOrCreateElement");function fillComponentElement(element,jsxTag,attributes,children){const props=__spreadProps(__spreadValues({},attributes),{children}),setHtml=props.setHtml;delete props.setHtml;const result=jsxTag(props);result instanceof ElementProps?appendChildren(element,{setHtml},result):result instanceof ComponentProps&&appendChildren(element,__spreadProps(__spreadValues({},result.attributes),{setHtml}),result.children)}__name(fillComponentElement,"fillComponentElement");const isHydrating={value:!1},indexMap=new Map;function h(jsxTag,attributes,...children){const processedChildren=processChildren(attributes,children),processedAttributes=__spreadValues({},attributes);return delete processedAttributes.children,typeof jsxTag=="string"?handleStringTag(jsxTag,processedAttributes,processedChildren):handleFunctionTag(jsxTag,processedAttributes,processedChildren)}__name(h,"h");function Fragment(children){const fragment=document.createDocumentFragment();return appendChildren(fragment,void 0,children),fragment}__name(Fragment,"Fragment");function render(container,Component,params,children){const element=h(Component,__spreadValues({},params),children);return container.append(element),element}__name(render,"render");function hydrate(Component,params,children){isHydrating.value=!0;const element=h(Component,__spreadValues({},params),children);return isHydrating.value=!1,element}__name(hydrate,"hydrate");exports.Fragment=Fragment;exports.activeComponent=activeComponent;exports.h=h;exports.hydrate=hydrate;exports.indexMap=indexMap;exports.render=render;
@@ -1 +0,0 @@
1
- "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});const dom=require("./dom-B40i6NXw.cjs"),layout=require("./layout-CnGLl7oe.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");function wait(dur){return new Promise(res=>{setTimeout(()=>{res()},dur)})}__name(wait,"wait");function scrollToElement(elementOrSelectorOrNumber,{behavior="instant",offset=0,center=!1,scrollElement}={}){var _a;let start,centerElement=scrollElement,scrollContainerElement=scrollElement;if(typeof elementOrSelectorOrNumber=="number")start=elementOrSelectorOrNumber;else{const element=dom.getElement(elementOrSelectorOrNumber);element&&(centerElement=element,scrollContainerElement=scrollElement||dom.findScrollParentElement(element),start=layout.getCumulativeOffsetTop(element))}if(centerElement&&scrollContainerElement&&typeof start=="number"){const offsetValue=(typeof offset=="number"?offset:((_a=dom.getElement(offset))==null?void 0:_a.offsetHeight)||0)*-1,height=centerElement instanceof HTMLElement?centerElement.offsetHeight:innerHeight,centerValue=center?innerHeight/2*-1+height/2:0;scrollContainerElement.scroll({top:start+offsetValue+centerValue,behavior})}}__name(scrollToElement,"scrollToElement");exports.scrollToElement=scrollToElement;exports.wait=wait;