@doubao-dev/kit 0.8.0-rc.0 → 0.8.0-rc.10

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 (23) hide show
  1. package/dist/277~0.js +50 -49
  2. package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
  3. package/dist/assets/web-sdk-debugger/assets/framework/doubao-apps-api.template.js +0 -0
  4. package/dist/assets/web-sdk-debugger/assets/framework/doubao-apps-framework.template.js +0 -0
  5. package/dist/assets/web-sdk-debugger/chrome-devtools/entrypoints/devtools_app/devtools_app.js +24 -23
  6. package/dist/assets/web-sdk-debugger/chrome-devtools/panels/wsd-debug/WsdDebug.js +50 -49
  7. package/dist/assets/web-sdk-debugger/chrome-devtools/panels/wsd-debug/WsdDebugMeta.js +60 -59
  8. package/dist/assets/web-sdk-debugger/index.html +1 -1
  9. package/dist/assets/web-sdk-debugger/static/css/index.97f4984ae7.css +1 -0
  10. package/dist/assets/web-sdk-debugger/static/js/{148.80681ca28e.js → 204.a1a7cafeaf.js} +31 -31
  11. package/dist/assets/web-sdk-debugger/static/js/async/{web-elements.98d43e1d95.js → web-elements.262cae995c.js} +1 -1
  12. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.ff739dc3dc.js +5 -0
  13. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.ff739dc3dc.js.LICENSE.txt +5 -0
  14. package/dist/assets/web-sdk-debugger/static/js/{index.3ccc2f978a.js → index.e839caafce.js} +8 -7
  15. package/dist/builder/loader/components-loader/index.js +2 -2
  16. package/dist/cli/index.js +1 -1
  17. package/dist/sdk.d.ts +98 -28
  18. package/dist/sdk.js +35 -34
  19. package/package.json +1 -1
  20. package/dist/assets/web-sdk-debugger/static/css/index.c3e710420d.css +0 -1
  21. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.6cec36ed6c.js +0 -5
  22. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.6cec36ed6c.js.LICENSE.txt +0 -3
  23. /package/dist/assets/web-sdk-debugger/static/js/{148.80681ca28e.js.LICENSE.txt → 204.a1a7cafeaf.js.LICENSE.txt} +0 -0
@@ -361,5 +361,5 @@
361
361
  border: none;
362
362
  }
363
363
  </style>
364
- <iframe id="webview" part="webview"></iframe>`,sf=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto")?void 0:class{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#n;constructor(e){this.#n=e,this.cssPropertyChangedHandler={"--lynx-display":this.#S,"--lynx-linear-orientation":this.#w}}#S=(0,a6.H$)(()=>this.#n,"lynx-computed-display");#w=(0,a6.H$)(()=>this.#n,"lynx-linear-orientation")};j=[(0,a6.uA)("scroll-view",[sf,a5.O,se,a7,si,sa],ss)],$=[],V=HTMLElement,a4=class extends V{static #e=G=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(V[Symbol.metadata]??null):void 0;(0,a9.G4)(null,D={value:G},j,{kind:"class",name:G.name,metadata:e},null,$),a4=G=D.value,e&&Object.defineProperty(G,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#_;scrollTo(){let e;for(var t=arguments.length,n=Array(t),l=0;l<t;l++)n[l]=arguments[l];if("string"==typeof n[0].offset){let t=parseFloat(n[0].offset);e={left:t,top:t}}else"number"==typeof n[0].offset&&(e={left:n[0].offset,top:n[0].offset});if("number"==typeof n[0].index){let t=n[0].index;if(0===t)this.scrollTop=0,this.scrollLeft=0;else if(t>0&&t<this.childElementCount){let n=this.children.item(t);n instanceof HTMLElement&&(e=e?{left:n.offsetLeft+e.left,top:n.offsetTop+e.top}:{left:n.offsetLeft,top:n.offsetTop})}}e?this.scrollTo({...e,behavior:n[0].smooth?"smooth":"auto"}):super.scrollTo(...n)}autoScroll(e){if(clearInterval(this.#_),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*a4.scrollInterval/1e3;this.#_=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},a4.scrollInterval,this)}}get[sl.l](){return this}static #C=(0,a9.zF)(G,$)},a4=G,n(21301),n(52205),n(40768),n(76235);let sy=Symbol("__src"),sE=Symbol("__src"),sS={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},sw={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};(a2=a8||(a8={}))[a2.SrcError=-1]="SrcError",a2[a2.SrcJsonError=-2]="SrcJsonError",a2[a2.DownloadError=-3]="DownloadError",a2[a2.PlayerFinishedError=-4]="PlayerFinishedError",a2[a2.PlayerLoadingError=-5]="PlayerLoadingError",a2[a2.PlayerPlaybackError=-6]="PlayerPlaybackError";let s_=(X=[],Z=[],q=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;W=[(0,a6._y)("src",!0)],U=[(0,a6._y)("loop",!0)],B=[(0,a6._y)("pause-on-hide",!0)],(0,a9.G4)(this,null,W,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,X),(0,a9.G4)(this,null,B,{kind:"method",name:"_handlePauseOnHide",static:!1,private:!1,access:{has:e=>"_handlePauseOnHide"in e,get:e=>e._handlePauseOnHide},metadata:e},null,X),(0,a9.G4)(null,null,U,{kind:"field",name:"_handleLoop",static:!1,private:!1,access:{has:e=>"_handleLoop"in e,get:e=>e._handleLoop,set:(e,t)=>{e._handleLoop=t}},metadata:e},Z,q),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","loop","pause-on-hide"];#n=(0,a9.zF)(this,X);#T=(0,a6.Ut)(()=>this.#n.shadowRoot,"#audio");_handleSrc(e){var t,n;let l;try{l=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),l={}}null===e?this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcError,msg:"",from:"res loader",currentSrcID:null==(t=this.#n[sy])?void 0:t.id}})):((null==l?void 0:l.id)===void 0||(null==l?void 0:l.play_url)===void 0)&&this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcJsonError,msg:"",from:"res loader",currentSrcID:null==(n=this.#n[sy])?void 0:n.id}})),this.#n[sy]=l,this.#n[sE]=void 0,this.#n.stop()}_handleLoop=(0,a9.zF)(this,Z,(0,a6.H$)(this.#T,"loop"));#x=((0,a9.zF)(this,q),()=>{"hidden"===document.visibilityState&&this.#n.pause()});_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#x,{passive:!0}):document.removeEventListener("visibilitychange",this.#x)}constructor(e){this.#n=e}});K=[(0,a6.uA)("x-audio-tt",[a5.O,s_,class e{static observedAttributes=[];#n;#k;#T=(0,a6.Ut)(()=>this.#n.shadowRoot,"#audio");#O=e=>{var t;let n=Number(this.#n.getAttribute("interval")),l=Number.isNaN(n)?0:n;this.#k=setInterval(()=>{var e;this.#n.dispatchEvent(new CustomEvent("timeupdate",{...st.$,detail:{currentTime:this.#T().currentTime,currentSrcID:null==(e=this.#n[sy])?void 0:e.id}}))},l);let i=sw[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==i?void 0:i.code,type:null==i?void 0:i.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#L=e=>{var t;clearInterval(this.#k);let n=sw[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#A=e=>{var t;let n=sS[e.type];this.#n.dispatchEvent(new CustomEvent("loadingstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#I=e=>{var t,n,l;this.#A(e);let i=null==(n=e.target)||null==(t=n.error)?void 0:t.code,a=i===MediaError.MEDIA_ERR_DECODE?a8.PlayerLoadingError:a8.PlayerPlaybackError;i===MediaError.MEDIA_ERR_DECODE&&(a=a8.PlayerLoadingError),this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a,msg:"",from:"player",currentSrcID:null==(l=this.#n[sy])?void 0:l.id}}))};#F=()=>{var e;let t=null!==this.#n.getAttribute("loop");this.#n.dispatchEvent(new CustomEvent("finished",{...st.$,detail:{loop:t,currentSrcID:null==(e=this.#n[sy])?void 0:e.id}}))};constructor(e){this.#n=e}connectedCallback(){let e=this.#T();e.addEventListener("play",this.#O,{passive:!0}),e.addEventListener("pause",this.#L,{passive:!0}),e.addEventListener("ended",this.#F,{passive:!0}),e.addEventListener("loadstart",this.#A,{passive:!0}),e.addEventListener("canplay",this.#A,{passive:!0}),e.addEventListener("stalled",this.#A,{passive:!0}),e.addEventListener("error",this.#I,{passive:!0})}}],'<audio id="audio"></audio>')],Q=[],ee=HTMLElement,class extends ee{static #e=J=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ee[Symbol.metadata]??null):void 0;(0,a9.G4)(null,Y={value:J},K,{kind:"class",name:J.name,metadata:e},null,Q),J=Y.value,e&&Object.defineProperty(J,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(J,Q)})();#R=(0,a6.Ut)(()=>this.shadowRoot,"#audio");#T=(0,a6.Ut)(()=>this.shadowRoot,"#audio");#M=(0,a6.H$)(this.#T,"src");[sy];[sE];#P(e,t){var n;this.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:e,msg:"",from:t,currentSrcID:null==(n=this[sy])?void 0:n.id}}))}#z=()=>{let e,t=this[sy];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[sE]=new Promise(async(n,l)=>{var i;this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let a=await fetch(t.play_url,{headers:e});if(!a.ok){this.#P(a8.DownloadError,"res loader"),l();return}if(this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:1,type:"success",currentSrcID:t.id}})),null==(i=a.headers.get("content-type"))?void 0:i.toLowerCase().startsWith("text/html")){this.#P(a8.PlayerPlaybackError,"player"),l();return}let s=await a.blob(),o=URL.createObjectURL(s);this.#M(o),n()}),this[sE].catch(()=>{})}};play(){var e,t;return this[sE]||this.#z(),null==(e=this[sE])||e.then(()=>{let e=this.#R();e.currentTime=0;try{e.play().catch(()=>{this.#P(a8.PlayerPlaybackError,"player")})}catch{this.#P(a8.PlayerPlaybackError,"player")}},()=>{}),{currentSrcID:null==(t=this[sy])?void 0:t.id,loadingSrcID:""}}stop(){var e,t;let n=this.#R(),l=sw.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==l?void 0:l.code,type:null==l?void 0:l.type,currentSrcID:null==(e=this[sy])?void 0:e.id}})),n.currentTime=0,n.pause(),{currentSrcID:null==(t=this[sy])?void 0:t.id}}pause(){var e;return this.#R().pause(),{currentSrcID:null==(e=this[sy])?void 0:e.id}}resume(){var e;return this.#R().play(),{currentSrcID:null==(e=this[sy])?void 0:e.id,loadingSrcID:""}}seek(e){var t,n;return this.#R().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...st.$,detail:{seekresult:1,currentSrcID:null==(t=this[sy])?void 0:t.id}})),{currentSrcID:null==(n=this[sy])?void 0:n.id}}mute(e){var t;return this.#R().muted=e.mute,{currentSrcID:null==(t=this[sy])?void 0:t.id}}playerInfo(){var e,t;let n=this.#R(),l=n.buffered,i=l.end(l.length-1);return{currentSrcID:null==(e=this[sy])?void 0:e.id,duration:1e3*n.duration,playbackState:(t=n)?t.paused?2*!t.ended:t.currentTime>0?1:3:-1,currentTime:n.currentTime,cacheTime:i}}prepare(){this[sE]||this.#z()}setVolume(e){return this.#R().volume=e.volume,{code:1}}};let sC=(ei=[],ea=[],es=[],eo=[],er=[],ed=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;et=[(0,a6._y)("name",!0)],en=[(0,a6._y)("height",!0)],el=[(0,a6._y)("width",!0)],(0,a9.G4)(null,null,et,{kind:"field",name:"handleName",static:!1,private:!1,access:{has:e=>"handleName"in e,get:e=>e.handleName,set:(e,t)=>{e.handleName=t}},metadata:e},ei,ea),(0,a9.G4)(null,null,en,{kind:"field",name:"handleHeight",static:!1,private:!1,access:{has:e=>"handleHeight"in e,get:e=>e.handleHeight,set:(e,t)=>{e.handleHeight=t}},metadata:e},es,eo),(0,a9.G4)(null,null,el,{kind:"field",name:"handleWidth",static:!1,private:!1,access:{has:e=>"handleWidth"in e,get:e=>e.handleWidth,set:(e,t)=>{e.handleWidth=t}},metadata:e},er,ed),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["name","height","width"];#n;#N;#H=(0,a6.Ut)(()=>this.#n.shadowRoot,"#canvas");constructor(e){this.#n=e}handleName=(0,a9.zF)(this,ei,(0,a6.H$)(this.#H,"name"));handleHeight=((0,a9.zF)(this,ea),(0,a9.zF)(this,es,(0,a6.H$)(this.#H,"height")));handleWidth=((0,a9.zF)(this,eo),(0,a9.zF)(this,er,(0,a6.H$)(this.#H,"width")));#D=((0,a9.zF)(this,ed),e=>{let{contentRect:t}=e[0],n=this.#n.shadowRoot.firstElementChild;if(n){let{height:e,width:l}=t;e*=window.devicePixelRatio,l*=window.devicePixelRatio;let i=new CustomEvent("resize",{...st.$,detail:{height:e,width:l}});i.height=e,i.width=l,n.dispatchEvent(i)}});#G(){this.#N||(this.#N=new ResizeObserver(this.#D),this.#N.observe(this.#n))}#j(){var e;null==(e=this.#N)||e.disconnect(),this.#N=void 0}connectedCallback(){this.#G()}dispose(){this.#j()}});eu=[(0,a6.uA)("x-canvas",[a5.O,sC],(0,a6.qy)`<canvas id="canvas" part="canvas"></canvas>`)],em=[],ep=HTMLElement,class extends ep{static #e=ec=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ep[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eh={value:ec},eu,{kind:"class",name:ec.name,metadata:e},null,em),ec=eh.value,e&&Object.defineProperty(ec,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ec,em)})()};let sT=(eg=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ev=[(0,a6._y)("granularity",!0)],eb=[(0,a6.ZR)("offset")],(0,a9.G4)(this,null,ev,{kind:"method",name:"_handleGranularity",static:!1,private:!1,access:{has:e=>"_handleGranularity"in e,get:e=>e._handleGranularity},metadata:e},null,eg),(0,a9.G4)(this,null,eb,{kind:"method",name:"_enableOffsetEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetEvent"in e,get:e=>e._enableOffsetEvent},metadata:e},null,eg),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,eg);#$=.01;#V=0;constructor(e){this.#n=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#$=parseFloat(e):this.#$=.01}_enableOffsetEvent(e){e?this.#n.addEventListener("scroll",this.#v,{passive:!0}):this.#n.removeEventListener("scroll",this.#v)}#v=()=>{let e=this.#n.scrollTop;(Math.abs(this.#V-e)>this.#$||0===this.#n.scrollTop||1>=Math.abs(this.#n.scrollHeight-this.#n.clientHeight-this.#n.scrollTop))&&(this.#V=e,this.#n.dispatchEvent(new CustomEvent("offset",{...st.$,detail:{offset:e,height:this.#n[sx]}})))}}),sx=Symbol("scrollableLength"),sk=Symbol("isHeaderShowing"),sO=Symbol("resizeObserver"),sL=Symbol("slotKid");eE=[(0,a6.uA)("x-foldview-ng",[sf,a5.O,sT])],eS=[],ew=HTMLElement,class extends ew{static #e=ey=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ew[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ef={value:ey},eE,{kind:"class",name:ey.name,metadata:e},null,eS),ey=ef.value,e&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["scroll-enable"]);[sL];[sO]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#W=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#U=t.contentRect.height);this[sL]&&(this[sL].style.top=`${this.#W-this.#U}px`)});#W=0;#U=0;get[sx](){return this.#W-this.#U}get[sk](){return this[sx]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[sx]?e=this[sx]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:n=!0}=e,l=parseFloat(t);this.scrollTo({top:Math.min(Math.max(l,0),this[sx]),behavior:n?"smooth":"instant"})}get[sl.l](){return this}disconnectedCallback(){var e;null==(e=this[sO])||e.disconnect(),this[sO]=void 0}static #C=(0,a9.zF)(ey,eS)};let sA=(e,t)=>{let n=e.parentElement;if((null==n?void 0:n.tagName)==="LYNX-WRAPPER"&&(n=n.parentElement),(null==n?void 0:n.tagName)===t)return n};eT=[(0,a6.uA)("x-foldview-header-ng",[sf,a5.O])],ex=[],ek=HTMLElement,(class extends ek{static #e=eC=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ek[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e_={value:eC},eT,{kind:"class",name:eC.name,metadata:e},null,ex),eC=e_.value,e&&Object.defineProperty(eC,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eC,ex)})();#B=void 0;connectedCallback(){var e;let t=sA(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sO],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}}),eA=[(0,a6.uA)("x-foldview-slot-drag-ng",[sf,a5.O])],eI=[],eF=HTMLElement,(class extends eF{static #e=eL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eO={value:eL},eA,{kind:"class",name:eL.name,metadata:e},null,eI),eL=eO.value,e&&Object.defineProperty(eL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eL,eI)})()}),n(74678),n(55910),n(76691),n(72919),n(37891),n(49678);eP=[(0,a6.uA)("x-foldview-slot-ng",[sf,a5.O,class e{#X=0;#Z=new WeakMap;#q;#Y=0;#J=0;#K=null;#Q;#ee=0;#n;static observedAttributes=[];constructor(e){this.#n=e,this.#n.addEventListener("touchmove",this.#et,{passive:!1}),this.#n.addEventListener("touchstart",this.#en,{passive:!0}),this.#n.addEventListener("touchend",this.#el,{passive:!0}),this.#n.addEventListener("wheel",this.#ei,{passive:!1})}#ea(e){let t=e[sl.l];return t instanceof Element?t:e}#es(e){return[...new Set(e.map(e=>this.#ea(e)))]}#eo(e){let t;if("function"==typeof e.computedStyleMap)try{var n;t=(null==(n=e.computedStyleMap().get("overflow-y"))?void 0:n.toString())??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#er(e){var t;return null==(t=this.#q)?void 0:t.find(t=>{if(this.#eo(t)&&t.scrollHeight>t.clientHeight){let n=e<0&&0!==t.scrollTop,l=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return n||l}return!1})}#ed(e,t){let n=this.#Z.get(e)??0;n+=t,this.#Z.set(e,n),e.scrollTop=n}#et=e=>{let t=this.#eh();if(!t)return;let{pageY:n,pageX:l}=e.touches.item(0),i=this.#Y-n;if(null===this.#K){let e=this.#J-l;this.#K=Math.abs(i)>Math.abs(e)}!1!==this.#K&&(e.cancelable&&e.preventDefault(),this.#ec(i,t),this.#Y=n,this.#J=l)};#ei=e=>{let t=this.#eh();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let n=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),{clientX:l,clientY:i}=e,a=document.elementsFromPoint(l,i).filter(e=>this.#n.contains(e));if(this.#q=this.#es([...n,...a]),this.#X=t.scrollTop,this.#q)for(let e of this.#q)this.#Z.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#ec(e.deltaY,t)};#eh(){let e=this.#n.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#en=e=>{var t;let{pageX:n,pageY:l,clientX:i,clientY:a}=e.touches.item(0),s=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),o=document.elementsFromPoint(i,a).filter(e=>this.#n.contains(e)&&e!==this.#n);for(let e of(this.#q=this.#es([...s,...o]),this.#Y=l,this.#J=n,this.#X=(null==(t=this.#eh())?void 0:t.scrollTop)??0,this.#q))this.#Z.set(e,e.scrollTop);this.#K=null,this.#Q=void 0};#el=()=>{if(this.#K=null,this.#Q){let e=this.#eh();(this.#Q!==e||e[sk])&&this.#Q.scrollBy({top:4*this.#ee,behavior:"smooth"})}};#ec(e,t){let n=this.#er(e);t[sk]&&e>0||e<0&&!n||!t[sk]&&!n?(t.scrollBy({top:e,behavior:"smooth"}),this.#X+=e,t.scrollTop=this.#X,this.#Q=t):n&&(this.#Q=n,this.#ed(n,e)),this.#ee=e}}])],ez=[],eN=HTMLElement,(class extends eN{static #e=eM=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eN[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eR={value:eM},eP,{kind:"class",name:eM.name,metadata:e},null,ez),eM=eR.value,e&&Object.defineProperty(eM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eM,ez)})();connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[sL]=this)}}),eG=[(0,a6.uA)("x-foldview-toolbar-ng",[sf,a5.O])],ej=[],e$=HTMLElement,class extends e${static #e=eD=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e$[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eH={value:eD},eG,{kind:"class",name:eD.name,metadata:e},null,ej),eD=eH.value,e&&Object.defineProperty(eD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eD,ej)})();#B=void 0;connectedCallback(){var e;let t=sA(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sO],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}};let sI=(eW=[],eU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eV=[(0,a6._y)("drop-shadow",!0)],(0,a9.G4)(null,null,eV,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eW,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["drop-shadow"];#n;#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleBlurRadius=(0,a9.zF)(this,eW,(0,a6._8)(this.#eu,"--drop-shadow",void 0,!0));constructor(e){(0,a9.zF)(this,eU),this.#n=e}}),sF=(eJ=[],eK=[],eQ=[],e0=[],e1=[],e4=[],e2=[],e3=[],e8=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eB=[(0,a6._y)("src",!0)],eX=[(0,a6._y)("placeholder",!0)],eZ=[(0,a6._y)("blur-radius",!0)],eq=[(0,a6._y)("crossorigin",!0)],eY=[(0,a6._y)("referrerpolicy",!0)],(0,a9.G4)(this,null,eX,{kind:"method",name:"_preloadPlaceholder",static:!1,private:!1,access:{has:e=>"_preloadPlaceholder"in e,get:e=>e._preloadPlaceholder},metadata:e},null,eJ),(0,a9.G4)(null,null,eB,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},eK,eQ),(0,a9.G4)(null,null,eZ,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},e0,e1),(0,a9.G4)(null,null,eq,{kind:"field",name:"_handleCrossorigin",static:!1,private:!1,access:{has:e=>"_handleCrossorigin"in e,get:e=>e._handleCrossorigin,set:(e,t)=>{e._handleCrossorigin=t}},metadata:e},e4,e2),(0,a9.G4)(null,null,eY,{kind:"field",name:"_handleReferrerpolicy",static:!1,private:!1,access:{has:e=>"_handleReferrerpolicy"in e,get:e=>e._handleReferrerpolicy,set:(e,t)=>{e._handleReferrerpolicy=t}},metadata:e},e3,e8),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#n=(0,a9.zF)(this,eJ);#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc=(0,a9.zF)(this,eK,(0,a6.H$)(this.#eu,"src",e=>{var t,n,l;let i=e||this.#n.getAttribute("placeholder");return i?(null==(l=this.#n.getRootNode())||null==(n=l.host)||null==(t=n.resolveResource)?void 0:t.call(n,i))??i:i}));_preloadPlaceholder(e){if(e){var t,n,l;new Image().src=(null==(l=this.#n.getRootNode())||null==(n=l.host)||null==(t=n.resolveResource)?void 0:t.call(n,e))??e}}_handleBlurRadius=((0,a9.zF)(this,eQ),(0,a9.zF)(this,e0,(0,a6._8)(this.#eu,"--blur-radius",void 0,!0)));_handleCrossorigin=((0,a9.zF)(this,e1),(0,a9.zF)(this,e4,(0,a6.H$)(this.#eu,"crossorigin")));_handleReferrerpolicy=((0,a9.zF)(this,e2),(0,a9.zF)(this,e3,(0,a6.H$)(this.#eu,"referrerpolicy")));#em=((0,a9.zF)(this,e8),()=>{var e,t,n;let l=this.#eu().src,i=this.#n.getAttribute("placeholder"),a=i?(null==(n=this.#n.getRootNode())||null==(t=n.host)||null==(e=t.resolveResource)?void 0:e.call(t,i))??i:i;a&&l!==a&&(this.#eu().src=a)});constructor(e){this.#n=e,this.#eu().addEventListener("error",this.#em)}connectedCallback(){this._handleSrc(this.#n.getAttribute("src")),this._preloadPlaceholder(this.#n.getAttribute("placeholder"))}}),sR=(e5=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e9=[(0,a6.ZR)("load")],e6=[(0,a6.ZR)("error")],(0,a9.G4)(this,null,e9,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,e5),(0,a9.G4)(this,null,e6,{kind:"method",name:"_enableErrorEvent",static:!1,private:!1,access:{has:e=>"_enableErrorEvent"in e,get:e=>e._enableErrorEvent},metadata:e},null,e5),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,e5);#ep=[];#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):(this.#eu().removeEventListener("load",this.#ev),this.#ep=[])}_enableErrorEvent(e){e?this.#eu().addEventListener("error",this.#eb,{passive:!0}):this.#eu().removeEventListener("error",this.#eb)}#ev=()=>{let e=new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}});this.#n.isConnected?this.#n.dispatchEvent(e):this.#ep.push(e)};connectedCallback(){for(;this.#n.isConnected&&this.#ep.length;)this.#n.dispatchEvent(this.#ep.shift())}#eb=()=>{this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{}}))};constructor(e){this.#n=e}});tt=[(0,a6.uA)("filter-image",[a5.O,sF,sI,sR],sr({}))],tn=[],tl=HTMLElement,(class extends tl{static #e=te=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e7={value:te},tt,{kind:"class",name:te.name,metadata:e},null,tn),te=e7.value,e&&Object.defineProperty(te,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(te,tn)})()}),ts=[(0,a6.uA)("x-image",[a5.O,sF,sR],sr({}))],to=[],tr=HTMLElement,class extends tr{static #e=ta=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ti={value:ta},ts,{kind:"class",name:ta.name,metadata:e},null,to),ta=ti.value,e&&Object.defineProperty(ta,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ta,to)})()};let sM=(tp=[],tv=[],tb=[],tg=[],tf=[],ty=[],tE=[],tS=[],tw=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;td=[(0,a6._y)("confirm-type",!0)],th=[(0,a6._y)("maxlength",!0)],tc=[(0,a6._y)("readonly",!0)],tu=[(0,a6._y)("type",!0)],tm=[(0,a6._y)("ios-spell-check",!0),(0,a6._y)("spell-check",!0)],(0,a9.G4)(this,null,tu,{kind:"method",name:"_handleType",static:!1,private:!1,access:{has:e=>"_handleType"in e,get:e=>e._handleType},metadata:e},null,tp),(0,a9.G4)(null,null,td,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},tv,tb),(0,a9.G4)(null,null,th,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},tg,tf),(0,a9.G4)(null,null,tc,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},ty,tE),(0,a9.G4)(null,null,tm,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},tS,tw),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#n=(0,a9.zF)(this,tp);#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handlerConfirmType=(0,a9.zF)(this,tv,(0,a6.H$)(this.#eg,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,tb),(0,a9.zF)(this,tg,(0,a6.H$)(this.#eg,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,tf),(0,a9.zF)(this,ty,(0,a6.H$)(this.#eg,"readonly",e=>null!==e?"":null)));#ef=((0,a9.zF)(this,tE),(0,a6.H$)(this.#eg,"type"));#ey=(0,a6.H$)(this.#eg,"inputmode");_handleType(e){let t="text",n="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":n=e,this.#ey(t),this.#ef(n)}_handleSpellCheck=(0,a9.zF)(this,tS,(0,a6.H$)(this.#eg,"spellcheck",e=>null===e?"false":"true"));constructor(e){(0,a9.zF)(this,tw),this.#n=e}}),sP=(tO=[],tL=[],tA=[],tI=[],tF=[],tR=[],tM=[],tP=[],tz=[],tN=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t_=[(0,a6._y)("placeholder",!0)],tC=[(0,a6._y)("placeholder-color",!0)],tT=[(0,a6._y)("placeholder-font-family",!0)],tx=[(0,a6._y)("placeholder-font-size",!0)],tk=[(0,a6._y)("placeholder-font-weight",!0)],(0,a9.G4)(null,null,t_,{kind:"field",name:"_handlerPlaceholder",static:!1,private:!1,access:{has:e=>"_handlerPlaceholder"in e,get:e=>e._handlerPlaceholder,set:(e,t)=>{e._handlerPlaceholder=t}},metadata:e},tO,tL),(0,a9.G4)(null,null,tC,{kind:"field",name:"_handlerPlaceholderColor",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderColor"in e,get:e=>e._handlerPlaceholderColor,set:(e,t)=>{e._handlerPlaceholderColor=t}},metadata:e},tA,tI),(0,a9.G4)(null,null,tT,{kind:"field",name:"_handlerPlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontFamily"in e,get:e=>e._handlerPlaceholderFontFamily,set:(e,t)=>{e._handlerPlaceholderFontFamily=t}},metadata:e},tF,tR),(0,a9.G4)(null,null,tx,{kind:"field",name:"_handlerPlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontSize"in e,get:e=>e._handlerPlaceholderFontSize,set:(e,t)=>{e._handlerPlaceholderFontSize=t}},metadata:e},tM,tP),(0,a9.G4)(null,null,tk,{kind:"field",name:"_handlerPlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontWeight"in e,get:e=>e._handlerPlaceholderFontWeight,set:(e,t)=>{e._handlerPlaceholderFontWeight=t}},metadata:e},tz,tN),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#n;#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handlerPlaceholder=(0,a9.zF)(this,tO,(0,a6.H$)(this.#eg,"placeholder"));_handlerPlaceholderColor=((0,a9.zF)(this,tL),(0,a9.zF)(this,tA,(0,a6._8)(this.#eg,"--placeholder-color",void 0,!0)));_handlerPlaceholderFontFamily=((0,a9.zF)(this,tI),(0,a9.zF)(this,tF,(0,a6._8)(this.#eg,"--placeholder-font-family",void 0,!0)));_handlerPlaceholderFontSize=((0,a9.zF)(this,tR),(0,a9.zF)(this,tM,(0,a6._8)(this.#eg,"--placeholder-font-size",void 0,!0)));_handlerPlaceholderFontWeight=((0,a9.zF)(this,tP),(0,a9.zF)(this,tz,(0,a6._8)(this.#eg,"--placeholder-font-weight",void 0,!0)));constructor(e){(0,a9.zF)(this,tN),this.#n=e}}),sz=(tj=[],t$=[],tV=[],tW=[],tU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tH=[(0,a6._y)("value",!1)],tD=[(0,a6._y)("disabled",!0)],tG=[(0,a6._y)("autocomplete",!0)],(0,a9.G4)(this,null,tH,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,tj),(0,a9.G4)(null,null,tD,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},t$,tV),(0,a9.G4)(null,null,tG,{kind:"field",name:"_handleAutocomplete",static:!1,private:!1,access:{has:e=>"_handleAutocomplete"in e,get:e=>e._handleAutocomplete,set:(e,t)=>{e._handleAutocomplete=t}},metadata:e},tW,tU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["value","disabled","autocomplete"];#n=(0,a9.zF)(this,tj);#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#eg();t.value!==e&&(t.value=e)}_handleDisabled=(0,a9.zF)(this,t$,(0,a6.H$)(this.#eg,"disabled",e=>null!==e?"":null));_handleAutocomplete=((0,a9.zF)(this,tV),(0,a9.zF)(this,tW,(0,a6.H$)(this.#eg,"autocomplete")));constructor(e){(0,a9.zF)(this,tU),this.#n=e}}),sN={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"},sH=(tq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tB=[(0,a6._y)("input-filter",!0),(0,a6.ZR)("lynxinput")],tX=[(0,a6._y)("send-composing-input",!0)],tZ=[(0,a6.ZR)("selection")],(0,a9.G4)(this,null,tB,{kind:"method",name:"_handleEnableInputEvent",static:!1,private:!1,access:{has:e=>"_handleEnableInputEvent"in e,get:e=>e._handleEnableInputEvent},metadata:e},null,tq),(0,a9.G4)(this,null,tX,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,tq),(0,a9.G4)(this,null,tZ,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,tq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,tq);#eE=!1;#eS=/[^0-9.]|\.(?=.*\.)/g;#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#eg();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sN[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#eg().value}}))};#e_=e=>{let t=this.#eg(),n=this.#ex(t.value),l=e.isComposing;t.value=n,(!l||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:t.selectionStart,isComposing:l,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#eg(),t=this.#ex(e.value);e.value=t,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ex(e){let t=e;"number"===this.#n.getAttribute("type")&&(t=t.replace(this.#eS,""));let n=this.#n.getAttribute("input-filter");return n&&(t=t.replace(RegExp(n,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#eg().addEventListener("select",this.#ek,{passive:!0}):this.#eg().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#eg();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#eg()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#eg(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});tK=[(0,a6.uA)("x-input",[a5.O,sP,sz,sM,sH],sd)],tQ=[],t0=HTMLElement,class extends t0{static #e=tJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,tY={value:tJ},tK,{kind:"class",name:tJ.name,metadata:e},null,tQ),tJ=tY.value,e&&Object.defineProperty(tJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(tJ,tQ)})();#eL=(0,a6.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,n=this.#eL(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,n=this.#eL();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#eL();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#eL();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}setInputFilter(e){this.#eL().setAttribute("pattern",e.pattern)}select(){let e=this.#eL();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#eL().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#eL().focus(e)}blur(){this.#eL().blur()}connectedCallback(){let e=this.#eL();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}};let sD=(t2=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t1=[(0,a6._y)("events-pass-through",!0)],t4=[(0,a6._y)("visible",!1)],(0,a9.G4)(this,null,t1,{kind:"method",name:"_handleEventsPassThrough",static:!1,private:!1,access:{has:e=>"_handleEventsPassThrough"in e,get:e=>e._handleEventsPassThrough},metadata:e},null,t2),(0,a9.G4)(this,null,t4,{kind:"method",name:"_handleVisible",static:!1,private:!1,access:{has:e=>"_handleVisible"in e,get:e=>e._handleVisible},metadata:e},null,t2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["visible","events-pass-through"];#n=(0,a9.zF)(this,t2);#eA=!!window.HTMLDialogElement;#eI=!1;constructor(e){this.#n=e}#eF=(0,a6.Ut)(()=>this.#n.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eF().addEventListener("click",this.#eR,{passive:!1}),this.#n.addEventListener("click",this.#eR,{passive:!1})):(this.#eF().removeEventListener("click",this.#eR),this.#n.removeEventListener("click",this.#eR))}_handleVisible(e){this.#eI=null!==e,this.#eA&&(this.#eI?(this.#eF().showModal(),this.#n.dispatchEvent(new CustomEvent("showoverlay",st.$))):(this.#eF().close(),this.#n.dispatchEvent(new CustomEvent("dismissoverlay",st.$))))}#eR=e=>{e.stopPropagation();let t=this.#eF();if(e.target===this.#n||e.target===t){t.close();let{clientX:n,clientY:l}=e,i=document.elementFromPoint(n,l);(null==i?void 0:i.tagName)==="LYNX-VIEW"&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(n,l)??i),null==i||i.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eI&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eA||(this.#eF().style.display="none")}});t9=[(0,a6.uA)("x-overlay-ng",[a5.O,sD],sc)],t6=[],t5=HTMLElement,(class extends t5{static #e=t8=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t5[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t3={value:t8},t9,{kind:"class",name:t8.name,metadata:e},null,t6),t8=t3.value,e&&Object.defineProperty(t8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(t8,t6)})();get[a5.v](){return this.shadowRoot.firstElementChild}}),n(84086);class sG extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(sG.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class sj{#n;static observedAttributes=[];#eM;constructor(e){this.#n=e}connectedCallback(){if(IntersectionObserver&&!this.#eM){let e=this.#n.parentElement;e&&(this.#eM=new IntersectionObserver(e=>{let t=!1,n=!1;e.forEach(e=>{t=e.intersectionRatio>0,n=e.intersectionRatio>.9}),this.#n.dispatchEvent(new sG(t,n)),n&&this.#n.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eM.observe(this.#n))}}dispose(){this.#eM&&(this.#eM.disconnect(),this.#eM=void 0)}}nt=[(0,a6.uA)("x-refresh-footer",[sf,a5.O,sj])],nn=[],nl=HTMLElement,(class extends nl{static #e=ne=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t7={value:ne},nt,{kind:"class",name:ne.name,metadata:e},null,nn),ne=t7.value,e&&Object.defineProperty(ne,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ne,nn)})();connectedCallback(){this.setAttribute("slot","footer")}}),ns=[(0,a6.uA)("x-refresh-header",[sf,a5.O,sj])],no=[],nr=HTMLElement,class extends nr{static #e=na=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ni={value:na},ns,{kind:"class",name:na.name,metadata:e},null,no),na=ni.value,e&&Object.defineProperty(na,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(na,no)})();connectedCallback(){this.setAttribute("slot","header")}};let s$=(nc=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nd=[(0,a6.ZR)("headeroffset"),(0,a6.ZR)("headershow"),(0,a6.ZR)("footeroffset")],nh=[(0,a6.ZR)("startrefresh"),(0,a6.ZR)("headerreleased"),(0,a6.ZR)("startloadmore"),(0,a6.ZR)("footerreleased")],(0,a9.G4)(this,null,nd,{kind:"method",name:"_handleComplexEventEnableAttributes",static:!1,private:!1,access:{has:e=>"_handleComplexEventEnableAttributes"in e,get:e=>e._handleComplexEventEnableAttributes},metadata:e},null,nc),(0,a9.G4)(this,null,nh,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,nc),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,nc);static observedAttributes=[];#eP=(0,a6.Ut)(()=>this.#n,"x-refresh-view > x-refresh-header:first-of-type");#ez=(0,a6.Ut)(()=>this.#n,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#n=e,this.#n.addEventListener(sG.EventName,this.#eN)}#eH={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eH[t]=e;let{headeroffset:n,headershow:l,footeroffset:i}=this.#eH;n||l||i?this.#eD():this.#eG()}_handleXEnableHeaderOffsetEvent(e,t){this.#eH[t]=e;let{startrefresh:n,headerreleased:l,startloadmore:i,footerreleased:a}=this.#eH;l||a||i||n?this.#ej():this.#e$()}#eV=!1;#eW=!1;#eU=!1;#eB=!1;#eN=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eV=e.startShowing,this.#eW=e.fullyShowing):(this.#eU=e.startShowing,this.#eB=e.fullyShowing)};#eX=!1;#ej(){this.#eX||(this.#n.addEventListener("touchend",this.#eZ),this.#eX=!0)}#eZ=()=>{this.#eW?(this.#n.dispatchEvent(new CustomEvent("headerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startrefresh",{...st.$,detail:{isManual:this.#n._nextRefreshIsManual}})),this.#n._nextRefreshIsManual=!0):("true"===this.#n.getAttribute("enable-auto-loadmore")&&this.#eU||this.#eB)&&(this.#n.dispatchEvent(new CustomEvent("footerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startloadmore",st.$)))};#e$(){this.#eX&&this.#n.removeEventListener("touchend",this.#eZ)}#eq=!1;#eY=!1;#eD(){this.#eY||(this.#n.addEventListener("touchstart",this.#eJ),this.#n.addEventListener("touchend",this.#eK),this.#n.addEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").addEventListener("scroll",this.#v))}#eK=()=>{this.#eq=!1};#eJ=()=>{this.#eq=!0};#v=()=>{if(this.#eV&&(this.#eH.headershow||this.#eH.headeroffset)){let e=this.#eP();if(e){let t=parseFloat(getComputedStyle(e).height),n=this.#n.shadowRoot.querySelector("#container").scrollTop;this.#n.dispatchEvent(new CustomEvent("headershow",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}})),this.#n.dispatchEvent(new CustomEvent("headeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}}))}}else if(this.#eU&&this.#eH.footeroffset){let e=this.#ez();if(e){let t=this.#n.shadowRoot.querySelector("#container").scrollTop,n=parseFloat(getComputedStyle(e).height);this.#n.dispatchEvent(new CustomEvent("footeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-t/n}}))}}};#eG(){this.#eY&&(this.#n.removeEventListener("touchstart",this.#eJ),this.#n.removeEventListener("touchend",this.#eK),this.#n.removeEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#v))}dispose(){this.#e$(),this.#eG()}});np=[(0,a6.uA)("x-refresh-view",[sf,a5.O,s$],su)],nv=[],nb=HTMLElement,class extends nb{static #e=nm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nu={value:nm},np,{kind:"class",name:nm.name,metadata:e},null,nv),nm=nu.value,e&&Object.defineProperty(nm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.removeAttribute("x-magnet-enable")}finishLoadMore(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-footer:first-of-type"))||e.removeAttribute("x-magnet-enable")}autoStartRefresh(){var e;let t=this.shadowRoot.querySelector("#container");null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,t.scroll({top:0,behavior:"smooth"})}#eQ=(0,a6.Ut)(()=>this.shadowRoot,"#container");#e0=(0,a6.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eQ(),t=this.#e0();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eQ(),n=this.#e0();e>0?n.scrollTop=e:t.scrollTop=n.offsetTop+e}get scrollHeight(){return this.#e0().scrollHeight}get[sl.l](){return this}static #C=(0,a9.zF)(nm,nv)};let sV=(nE=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ng=[(0,a6._y)("src",!0)],nf=[(0,a6._y)("content",!0)],ny=[(0,a6.ZR)("load")],(0,a9.G4)(this,null,ng,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,nE),(0,a9.G4)(this,null,nf,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,nE),(0,a9.G4)(this,null,ny,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,nE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","content"];#n=(0,a9.zF)(this,nE);#e1=null;#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#eu().src=e:this.#eu().src=""}_handleContent(e){if(this.#e1&&URL.revokeObjectURL(this.#e1),!e){this.#e1="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),n=URL.createObjectURL(t);this.#e1=n,this.#eu().src=n}_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):this.#eu().removeEventListener("load",this.#ev)}#ev=()=>{this.#n.dispatchEvent(new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}}))};constructor(e){this.#n=e}});n_=[(0,a6.uA)("x-svg",[a5.O,sV],'<img part="img" alt="" loading="lazy" id="img" /> ')],nC=[],nT=HTMLElement,(class extends nT{static #e=nw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nS={value:nw},n_,{kind:"class",name:nw.name,metadata:e},null,nC),nw=nS.value,e&&Object.defineProperty(nw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nw,nC)})()}),nO=[(0,a6.uA)("x-swiper-item",[sf,a5.O])],nL=[],nA=HTMLElement,class extends nA{static #e=nk=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nA[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nx={value:nk},nO,{kind:"class",name:nk.name,metadata:e},null,nL),nk=nx.value,e&&Object.defineProperty(nk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nk,nL)})()};let sW=(nR=[],nM=[],nP=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nI=[(0,a6.ZR)("transition")],nF=[(0,a6.ZR)("scrollstart"),(0,a6.ZR)("lynxscrollend"),(0,a6.ZR)("change"),(0,a6.ZR)("change-event-for-indicator")],(0,a9.G4)(this,null,nF,{kind:"method",name:"_enableScrollEventProcessor",static:!1,private:!1,access:{has:e=>"_enableScrollEventProcessor"in e,get:e=>e._enableScrollEventProcessor},metadata:e},null,nR),(0,a9.G4)(null,null,nI,{kind:"field",name:"_handleEnableTransitionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableTransitionEvent"in e,get:e=>e._handleEnableTransitionEvent,set:(e,t)=>{e._handleEnableTransitionEvent=t}},metadata:e},nM,nP),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,nR);#e4=0;#e2=0;#eq=!1;#a;#e3=!1;constructor(e){this.#n=e}#e0=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=(0,a9.zF)(this,nM,(0,a6.LB)(this.#e0,"scroll",this.#e8,{passive:!0}));#v(){sl.k||(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#e3||(this.#n.dispatchEvent(new CustomEvent("scrollstart",{...st.$,detail:{current:this.#e4,isDragged:this.#eq}})),this.#e3=!0);let e=this.#e0(),t=this.#n.isVertical,n=t?e.scrollTop:e.scrollLeft,l=t?e.clientHeight:e.clientWidth,i=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#e2-n)>l/4||n<10||Math.abs(n-i)<=l){let e=this.#n.currentIndex;e!==this.#e4&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{current:e,isDragged:this.#eq}})),this.#e4=e),this.#e2=n}}#g(){this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$,detail:{current:this.#e4}})),this.#e3=!1}#e9(){this.#eq=!0}#e6(){this.#eq=!1}#e8(){this.#n.dispatchEvent(new CustomEvent("transition",{...st.$,detail:{dx:this.#e0().scrollLeft,dy:this.#e0().scrollTop}}))}#e5=((0,a9.zF)(this,nP),[(0,a6.LB)(this.#e0,"scroll",this.#v.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchstart",this.#e9.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchend",this.#e6.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchcancel",this.#e6.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"scrollend",this.#g.bind(this),{passive:!0})]);#eH={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eH[t]=e;let{lynxscrollend:n,scrollstart:l,change:i}=this.#eH,a=i||n||l||this.#eH["change-event-for-indicator"];this.#e5.forEach(e=>e(a))}connectedCallback(){this.#e4=parseFloat(this.#n.getAttribute("current")??"0");let e=this.#n.isVertical;this.#e2=e?this.#e0().scrollTop:this.#e0().scrollLeft}}),sU=(nH=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nz=[(0,a6._y)("current",!1)],nN=[(0,a6._y)("interval",!1),(0,a6._y)("autoplay",!1)],(0,a9.G4)(this,null,nz,{kind:"method",name:"_handleCurrentChange",static:!1,private:!1,access:{has:e=>"_handleCurrentChange"in e,get:e=>e._handleCurrentChange},metadata:e},null,nH),(0,a9.G4)(this,null,nN,{kind:"method",name:"_handleAutoplay",static:!1,private:!1,access:{has:e=>"_handleAutoplay"in e,get:e=>e._handleAutoplay},metadata:e},null,nH),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["current","interval","autoplay"];#n=(0,a9.zF)(this,nH);constructor(e){this.#n=e}#e7(){this.#n.currentIndex===this.#n.childElementCount-1?this.#n.circularPlay&&(this.#n.currentIndex=0):this.#n.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#n.currentIndex=t)}#te;#tt=(()=>{this.#e7()}).bind(this);#tn(e){this.#tl(),this.#te=setInterval(this.#tt,e)}#tl(){this.#te&&clearInterval(this.#te)}_handleAutoplay(){if(null!==this.#n.getAttribute("autoplay")){let e=this.#n.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#tn(t)}}dispose(){this.#tl()}}),sB=(nj=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nD=[(0,a6._y)("circular",!1)],nG=[(0,a6._y)("vertical",!0)],(0,a9.G4)(this,null,nD,{kind:"method",name:"_handleCircular",static:!1,private:!1,access:{has:e=>"_handleCircular"in e,get:e=>e._handleCircular},metadata:e},null,nj),(0,a9.G4)(this,null,nG,{kind:"method",name:"_handleVerticalChange",static:!1,private:!1,access:{has:e=>"_handleVerticalChange"in e,get:e=>e._handleVerticalChange},metadata:e},null,nj),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["circular","vertical"];#n=(0,a9.zF)(this,nj);#ti=!1;#ta;#ts=0;#e0=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);constructor(e){this.#n=e}#to=(0,a6.Ut)(()=>this.#n.shadowRoot,"#circular-start").bind(this);#tr=(0,a6.Ut)(()=>this.#n.shadowRoot,"#circular-end").bind(this);#td(e){let t=this.#n.childElementCount;if(t>2){let{current:n,isDragged:l,__isFirstLayout:i}=e.detail;if(0===n||n===t-1||2===n||n===t-2){let e,a=this.#e0(),s=this.#to().assignedElements(),o=this.#tr().assignedElements(),r=this.#n.firstElementChild,d=this.#n.lastElementChild,h=this.#n.snapDistance;if(0===n?(o.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=r):n===t-1?(s.forEach(e=>e.removeAttribute("slot")),r.setAttribute("slot","circular-end"),e=d):(s.forEach(e=>e.removeAttribute("slot")),o.forEach(e=>e.removeAttribute("slot")),e=this.#n.children[n]),this.#ti){let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientHeight/2:a.clientHeight/2;this.#ts=e.offsetTop+e.offsetHeight/2-h-t,a.scrollTop=this.#ts}else{let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientWidth/2:a.clientWidth/2;this.#ts=e.offsetLeft+e.offsetWidth/2-h-t,a.scrollLeft=this.#ts}if(!l){let e=this.#n.getAttribute("mode");if(i&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#th(i?"instant":"smooth")}}}}#th(e){let t=this.#e0(),n=this.#n.snapDistance;t.scrollBy({top:this.#ti?n:0,left:this.#ti?0:n,behavior:e??"smooth"})}#e5=[(0,a6.LB)(()=>this.#n,"change",this.#td.bind(this),{passive:!0}),(0,a6.LB)(()=>this.#n,"touchmove",this.#tc.bind(this),{passive:!1}),(0,a6.LB)(()=>this.#n,"touchend",this.#tu.bind(this),{passive:!1}),(0,a6.LB)(()=>this.#n,"touchcancel",this.#tu.bind(this),{passive:!1})];_handleCircular(e){this.#e5.forEach(t=>t(null!=e)),null!==e&&this.#td({detail:{current:this.#n.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tc(e){let t=e.touches.item(0);if(t){let e=this.#ti?t.pageY:t.pageX;if(void 0!==this.#ta){this.#tm();let t=this.#ta-e;this.#ts+=t}this.#ta=e}}#tu(e){this.#tp(),this.#th(),this.#ta=void 0}_handleVerticalChange(e){this.#ti=null!==e}#tv;#tm(){if(!this.#tv){let e=this.#e0();this.#ts=this.#ti?e.scrollTop:e.scrollLeft,this.#tv=setInterval(()=>{this.#ti?e.scrollTop=this.#ts:e.scrollLeft=this.#ts},10)}}#tp(){this.#tv&&(clearInterval(this.#tv),this.#tv=void 0)}dispose(){this.#tp()}}),sX=(nX=[],nZ=[],nq=[],nY=[],nJ=[],nK=[],nQ=[],n0=[],n1=[],n4=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n$=[(0,a6._y)("indicator-color",!0)],nV=[(0,a6._y)("indicator-active-color",!0)],nW=[(0,a6._y)("page-margin",!0)],nU=[(0,a6._y)("previous-margin",!0)],nB=[(0,a6._y)("next-margin",!0)],(0,a9.G4)(null,null,n$,{kind:"field",name:"_handleIndicatorColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorColor"in e,get:e=>e._handleIndicatorColor,set:(e,t)=>{e._handleIndicatorColor=t}},metadata:e},nX,nZ),(0,a9.G4)(null,null,nV,{kind:"field",name:"_handleIndicatorActiveColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorActiveColor"in e,get:e=>e._handleIndicatorActiveColor,set:(e,t)=>{e._handleIndicatorActiveColor=t}},metadata:e},nq,nY),(0,a9.G4)(null,null,nW,{kind:"field",name:"_handlePageMargin",static:!1,private:!1,access:{has:e=>"_handlePageMargin"in e,get:e=>e._handlePageMargin,set:(e,t)=>{e._handlePageMargin=t}},metadata:e},nJ,nK),(0,a9.G4)(null,null,nU,{kind:"field",name:"_handlePreviousMargin",static:!1,private:!1,access:{has:e=>"_handlePreviousMargin"in e,get:e=>e._handlePreviousMargin,set:(e,t)=>{e._handlePreviousMargin=t}},metadata:e},nQ,n0),(0,a9.G4)(null,null,nB,{kind:"field",name:"_handleNextMargin",static:!1,private:!1,access:{has:e=>"_handleNextMargin"in e,get:e=>e._handleNextMargin,set:(e,t)=>{e._handleNextMargin=t}},metadata:e},n1,n4),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#n;#tb=0;#tg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#indicator-container");#tf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#indicator-style");#ty;constructor(e){(0,a9.zF)(this,n4),this.#n=e}_handleIndicatorColor=(0,a9.zF)(this,nX,(0,a6._8)(this.#tg,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=((0,a9.zF)(this,nZ),(0,a9.zF)(this,nq,(0,a6._8)(this.#tg,"--indicator-active-color",void 0,!0)));_handlePageMargin=((0,a9.zF)(this,nY),(0,a9.zF)(this,nJ,(0,a6._8)(this.#tg,"--page-margin",void 0,!0)));_handlePreviousMargin=((0,a9.zF)(this,nK),(0,a9.zF)(this,nQ,(0,a6._8)(this.#tg,"--previous-margin",void 0,!0)));_handleNextMargin=((0,a9.zF)(this,n0),(0,a9.zF)(this,n1,(0,a6._8)(this.#tg,"--next-margin",void 0,!0)));#tE(){let e=this.#n.childElementCount;if(e!==this.#tb){let n="";for(let t=0;t<e;t++)n+=`<div style="animation-timeline:--x-swiper-item-${t};" part="indicator-item"></div>`;if(this.#tg().innerHTML=n,e>5){for(let n=0;n<e;n++){var t;null==(t=this.#n.children.item(n))||t.style.setProperty("view-timeline-name",`--x-swiper-item-${n}`)}this.#tf().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tb=e}connectedCallback(){if(this.#tE(),this.#ty=new MutationObserver(this.#tE.bind(this)),this.#ty.observe(this.#n,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){var e;this.#n.addEventListener("change",(e=>{let{detail:t}=e,n=t.current,l=this.#n.childElementCount,i=this.#tg();for(let e=0;e<l;e++){let t=i.children[e];t&&(e===n?t.style.setProperty("background-color","var(--indicator-active-color)","important"):t.style.removeProperty("background-color"))}}).bind(this));let t=parseFloat(this.#n.getAttribute("current")??"0");null==(e=this.#tg().children[t])||e.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){var e;null==(e=this.#ty)||e.disconnect(),this.#ty=void 0}});n8=[(0,a6.uA)("x-swiper",[a5.O,sX,sW,sB,sU],sm)],n9=[],n6=HTMLElement,class extends n6{static #e=n3=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(n6[Symbol.metadata]??null):void 0;(0,a9.G4)(null,n2={value:n3},n8,{kind:"class",name:n3.name,metadata:e},null,n9),n3=n2.value,e&&Object.defineProperty(n3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#e0=(0,a6.Ut)(()=>this.shadowRoot,"#content").bind(this);#tS(){let e=0,t=Number.MAX_SAFE_INTEGER,n=0;if(this.childElementCount>0){let l=this.#e0(),i=this.isVertical,a=this.childElementCount,s=i?l.scrollTop:l.scrollLeft,o=i?l.clientHeight:l.clientWidth,r=i?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=s+("carousel"===this.getAttribute("mode")?.8*o/2:o/2);for(let l=0;l<a;l++){let a=this.children[l];if(a){let s=(i?a.offsetTop:a.offsetLeft)+r/2-d,o=Math.abs(s);o<t&&(e=l,t=o,n=s)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:n}}get currentIndex(){return this.#tS().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tw(e,t?"smooth":"instant")}#tw(e,t){let n=this.children.item(e);if(n){let e=this.isVertical,l=0;l="flat-coverflow"===this.getAttribute("mode")?e?n.offsetTop-n.offsetHeight/3:n.offsetLeft-n.offsetWidth/3:e?n.offsetTop:n.offsetLeft,this.#e0().scrollTo({left:e?0:l,top:e?l:0,behavior:t})}}get snapDistance(){return this.#tS().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"index"in t[0]){let{index:e,smooth:n=!0}=t[0];if("number"==typeof e)return void this.#tw(e,n?"smooth":"instant")}super.scrollTo(...t)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tw(Number(e),"instant")}get[sl.l](){return this}static #C=(0,a9.zF)(n3,n9)};let sZ=(n7=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n5=[(0,a6._y)("src",!0)],(0,a9.G4)(this,null,n5,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,n7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src"];#n=(0,a9.zF)(this,n7);constructor(e){this.#n=e}#t_=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#t_().setAttribute("src",e):this.#t_().removeAttribute("src")}});ln=[(0,a6.uA)("inline-image",[sZ,sR],sr({}))],ll=[],li=HTMLElement,class extends li{static #e=lt=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(li[Symbol.metadata]??null):void 0;(0,a9.G4)(null,le={value:lt},ln,{kind:"class",name:lt.name,metadata:e},null,ll),lt=le.value,e&&Object.defineProperty(lt,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lt,ll)})()};let sq=()=>({start:-1,end:-1,direction:"forward"}),sY=(e,t,n)=>{if(!t||!e.contains(t))return null;let l=e.ownerDocument.createRange();l.selectNodeContents(e);try{l.setEnd(t,n)}catch{return null}return l.toString().length},sJ=(ls=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;la=[(0,a6.ZR)("selectionchange")],(0,a9.G4)(this,null,la,{kind:"method",name:"_handleEnableSelectionChangeEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionChangeEvent"in e,get:e=>e._handleEnableSelectionChangeEvent},metadata:e},null,ls),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,ls);#tC=!1;#tT=!1;#tx;#tk;constructor(e){this.#n=e}connectedCallback(){this.#tT=!0,this.#tO()}dispose(){this.#tT=!1,this.#tO()}_handleEnableSelectionChangeEvent(e){this.#tC=e,e||(this.#tk=void 0),this.#tO()}#tO(){var e;let t=this.#n.ownerDocument,n=this.#tC&&this.#tT;n&&this.#tx===t||(n||this.#tx)&&(null==(e=this.#tx)||e.removeEventListener("selectionchange",this.#tL),n&&t.addEventListener("selectionchange",this.#tL),this.#tx=n?t:void 0)}#tL=()=>{let e=(e=>{var t;let n=e.ownerDocument.getSelection();if(!n||0===n.rangeCount)return sq();let l=sY(e,n.anchorNode,n.anchorOffset),i=sY(e,n.focusNode,n.focusOffset);if(null!==l&&null!==i&&l!==i)return{start:Math.min(l,i),end:Math.max(l,i),direction:l<i?"forward":"backward"};let a=[],s=e.getRootNode();for(;s instanceof ShadowRoot;)a.push(s),s=s.host.getRootNode();let[o]=(null==(t=n.getComposedRanges)?void 0:t.call(n,{shadowRoots:a}))??[],r=o?sY(e,o.startContainer,o.startOffset):null,d=o?sY(e,o.endContainer,o.endOffset):null;return null===r||null===d||r===d?sq():{start:r,end:d,direction:"backward"===n.direction?"backward":"forward"}})(this.#n),t=`${e.start}:${e.end}:${e.direction}`;t!==this.#tk&&(-1!==e.start||void 0!==this.#tk)&&(this.#tk=t,this.#n.dispatchEvent(new CustomEvent("selectionchange",{...st.$,detail:e})))}});ld=[(0,a6.uA)("inline-text",[sJ])],lh=[],lc=HTMLElement,(class extends lc{static #e=lr=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lc[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lo={value:lr},ld,{kind:"class",name:lr.name,metadata:e},null,lh),lr=lo.value,e&&Object.defineProperty(lr,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lr,lh)})()}),lp=[(0,a6.uA)("inline-truncation",[])],lv=[],lb=HTMLElement,a3=class extends lb{static #e=lm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lu={value:lm},lp,{kind:"class",name:lm.name,metadata:e},null,lv),a3=lm=lu.value,e&&Object.defineProperty(lm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){if(!CSS.supports("selector(:has(>inline-truncation))")){var e;(null==(e=this.parentElement)?void 0:e.tagName)!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(a3.XEnableCustomTruncation,"")}this.setAttribute("slot","inline-truncation")}disconnectedCallback(){var e;null==(e=this.parentElement)||e.removeAttribute(a3.XEnableCustomTruncation)}static #C=(0,a9.zF)(lm,lv)},a3=lm;let sK=(lf=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lg=[(0,a6._y)("text",!0)],(0,a9.G4)(this,null,lg,{kind:"method",name:"_handleText",static:!1,private:!1,access:{has:e=>"_handleText"in e,get:e=>e._handleText},metadata:e},null,lf),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["text"];#n=(0,a9.zF)(this,lf);#tA;constructor(e){this.#n=e}_handleText(e){var t;null==(t=this.#tA)||t.remove(),e&&(this.#tA=new Text(e),this.#n.append(this.#tA))}});lS=[(0,a6.uA)("raw-text",[sK])],lw=[],l_=HTMLElement,(class extends l_{static #e=lE=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(l_[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ly={value:lE},lS,{kind:"class",name:lE.name,metadata:e},null,lw),lE=ly.value,e&&Object.defineProperty(lE,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lE,lw)})()}),n(99811),n(40009),n(13035),n(13412),n(17973),n(64955),n(91016),n(23306),n(76619),n(57857),n(9975),n(93885),n(812),n(74180),n(994),n(4267),n(20789),n(62839),n(66876);let sQ=(e,t,n)=>Math.min(Math.max(e,t),n),s0=(e,t)=>{let{node:n}=e;if(n.nodeType===Node.TEXT_NODE)return{container:n,offset:sQ(t,0,n.data.length)};let l=+(t>0),i=n.parentNode;return i?{container:i,offset:(e=>{let t=0,n=e.previousSibling;for(;n;)t++,n=n.previousSibling;return t})(n)+l}:{container:n,offset:sQ(l,0,n.childNodes.length)}},s1=(lx=[],class e{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lC=[(0,a6._y)("text-maxlength",!0),(0,a6._y)("text-maxline",!0),(0,a6._y)("tail-color-convert",!0)],lT=[(0,a6.ZR)("layout")],(0,a9.G4)(this,null,lC,{kind:"method",name:"_handleAttributeChange",static:!1,private:!1,access:{has:e=>"_handleAttributeChange"in e,get:e=>e._handleAttributeChange},metadata:e},null,lx),(0,a9.G4)(this,null,lT,{kind:"method",name:"_handleEnableLayoutEvent",static:!1,private:!1,access:{has:e=>"_handleEnableLayoutEvent"in e,get:e=>e._handleEnableLayoutEvent},metadata:e},null,lx),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tI=((0,a9.zF)(this,lx),!1);#tF=!1;#tR=new Map;#tM;#N;#tP;#tz;#tN=!1;#tH=0/0;#tD=0/0;#tG=!0;#tj=!1;get #t$(){return!this.#tV&&!this.#tG}get #tV(){return!!this.#tW()}#tW(){return this.#n.querySelector(":scope > inline-truncation")}get #tU(){return!isNaN(this.#tD)&&(this.#tV||!this.#tG)}#n;constructor(e){this.#n=e}#tB=(0,a6.Ut)(()=>this.#n.shadowRoot,"#inner-box");#tX(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tR.delete(e)}),"characterData"===e.type&&void 0!==this.#tR.get(e.target)&&this.#tR.set(e.target,e.target.data)})}#tZ(){for(let[t,n]of this.#tR)t.nodeType===Node.TEXT_NODE?void 0!==n&&(t.data=n):t.removeAttribute(e.exceedMathLengthAttribute);this.#n.removeAttribute(e.exceedMathLengthAttribute),this.#n.removeAttribute(e.showInlineTruncation)}#tq(e){let t=[],n=e;for(;n=n.nextSibling;)(n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE)&&t.push(n);return t}#tY(){!this.#tF||this.#n.matches("x-text>x-text")||this.#tI||(this.#tI=!0,(0,a6.JS)(async()=>{await this.#tJ(),this.#tK(),this.#tI=!1}))}async #tJ(){var t,n,l;if(null==(n=this.#tP)||null==(t=n.parentElement)||t.removeChild(this.#tP),this.#tZ(),!this.#tU&&isNaN(this.#tH))return;await document.fonts.ready;let i=this.#tB().getBoundingClientRect();this.#tz=new s4(this.#n,i);let a=this.#tz,s=(isNaN(this.#tH)?void 0:a.getNodeInfoByCharIndex(this.#tH))?this.#tH:1/0,o=this.#tU&&a.getLineInfo(this.#tD)?a.getLineInfo(this.#tD-1):void 0,r=1/0,d=3;if(o){let{start:t,end:n}=o,l=n-t;if(this.#tV){this.#n.setAttribute(e.showInlineTruncation,"");let l=this.#tW().getBoundingClientRect(),s=i.width,o=l.width;if(s>o){r=n-1;let e=document.createRange(),t=a.getNodeInfoByCharIndex(r),l=n-t.start,i=s0(t,l);for(e.setEnd(i.container,i.offset),e.setStart(i.container,i.offset);e.getBoundingClientRect().width<o&&(r-=1)&&(t=a.getNodeInfoByCharIndex(r));){let n=s0(t,r-t.start);e.setStart(n.container,n.offset)}}else r=t,this.#n.removeAttribute(e.showInlineTruncation)}else l<3?(d=l,r=t):r=n-3}let h=Math.min(s,r);if(h<1/0){let t=a.getNodeInfoByCharIndex(h);if(t){let n=h-t.start,i=t.node,s=[];i.nodeType===Node.TEXT_NODE?(this.#tR.set(i,i.data),i.data=i.data.substring(0,n)):s.push(i),s=s.concat(this.#tq(i));let o=i.parentElement;for(;o!==this.#n;)s=s.concat(this.#tq(o)),o=o.parentElement;if(s.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#tR.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#tR.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#t$){let e=(0===n?null==(l=a.nodelist.at(t.nodeIndex-1))?void 0:l.parentElement:i.parentElement)??i.parentElement;this.#tP=new Text(Array(d).fill(".").join("")),e.append(this.#tP)}this.#n.setAttribute(e.exceedMathLengthAttribute,"")}this.#tQ(h)}}#t0=e=>{this.#tX(e),this.#tY()};#t1=()=>{if(this.#tN){this.#tN=!1;return}this.#tY()};#tK(){this.#tF&&((this.#tH||this.#tD)&&!this.#tM&&(this.#tM=new MutationObserver(this.#t0),this.#tM.observe(this.#n,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tD&&!this.#N&&(this.#N=new ResizeObserver(this.#t1),this.#tN=!0,this.#N.observe(this.#tB(),{box:"content-box"})))}#t4(){var e,t;null==(e=this.#tM)||e.disconnect(),this.#tM=void 0,null==(t=this.#N)||t.disconnect(),this.#N=void 0}_handleAttributeChange(){this.#tH=parseFloat(this.#n.getAttribute("text-maxlength")??""),this.#tD=parseFloat(this.#n.getAttribute("text-maxline")??""),this.#tG="false"!==this.#n.getAttribute("tail-color-convert"),this.#tH<0&&(this.#tH=0/0),this.#tD<1&&(this.#tD=0/0),isNaN(this.#tD)?this.#tB().style.removeProperty("-webkit-line-clamp"):this.#tB().style.webkitLineClamp=this.#tD.toString(),this.#tY()}_handleEnableLayoutEvent(e){this.#tj=e}#tQ(e){if(!this.#tj)return;let t=new Proxy(this,{get:(t,n)=>"lineCount"===n?(t.#tz||(t.#tz=new s4(t.#n,t.#n.getBoundingClientRect())),t.#tz.getLineCount()):"lines"===n?new Proxy(t,{get(t,n){let l=parseFloat(n.toString());if(!isNaN(l)){t.#tz||(t.#tz=new s4(t.#n,t.#n.getBoundingClientRect()));let n=t.#tz.getLineInfo(l);if(n)return new Proxy(n,{get(t,n){switch(n){case"start":case"end":return t[n];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#n.dispatchEvent(new CustomEvent("layout",{...st.$,detail:t}))}dispose(){this.#t4()}connectedCallback(){this.#tF=!0,this._handleEnableLayoutEvent(this.#tj),this._handleAttributeChange(),(0,a6.JS)(()=>{this.#tQ()})}});class s4{#t2=[{start:0}];#t3=[];#t8=[];#n;#t9;nodelist;constructor(e,t){this.#n=e,this.nodelist=new s2(this.#n),this.#t9=t}#t6(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:n}=e,l=e.node,i=document.createRange();i.selectNode(l);for(let e=0;e<l.data.length;e++){i.setEnd(l,e);let a=i.getClientRects().item(n);if(a&&a.right===t.right)return e}return l.data.length}}#t5(e){if(this.#t3[e])return;let{left:t}=this.#t9,n=this.#t3[this.#t3.length-1],l=null==n?void 0:n[n.length-1],i=(null==l?void 0:l.nodeIndex)?(null==l?void 0:l.nodeIndex)+1:0;for(let n=i,l;(l=this.#t7(n))&&e>=this.#t3.length;n++){let e,{node:n}=l;if(n.nodeType===Node.ELEMENT_NODE)e=n.getClientRects();else{let t=document.createRange();t.selectNode(n),e=t.getClientRects()}if(e.length>0){let n=this.#t3[this.#t3.length-1],i=e[0];if(.2>Math.abs(i.left-t)||!n?this.#t3.push([{...l,rect:i,rectIndex:0}]):n.push({...l,rect:i,rectIndex:0}),e.length>1)for(let n=1;n<e.length;n++){let a=e[n];(a.left!==i.left||a.bottom!==i.bottom)&&(.2>Math.abs(a.left-t)?this.#t3.push([{...l,rect:a,rectIndex:n}]):this.#t3[this.#t3.length-1].push({...l,rect:a,rectIndex:n}))}}}}getLineCount(){return this.#t5(1/0),this.#t3.length}getLineInfo(e){if(this.#t5(e+1),e<this.#t3.length){let t=e>0?this.#t2[e-1]??{}:void 0,n=this.#t2[e]??{},l=e<this.#t3.length-1?this.#t2[e+1]??{}:void 0;if(void 0===n.start){let l=this.#t3[e-1],i=l[l.length-1],a=this.#t6(i),s=i.start+a;t&&(t.end=s),n.start=s+1}if(void 0===n.end){let t=this.#t3[e],i=t[t.length-1];if(e===this.#t3.length-1){let e=i.node.nodeType===Node.TEXT_NODE?i.node.data.length:1;n.end=i.start+e}else{let e=this.#t6(i);n.end=i.start+e,l.start=n.end+1}}return n}}#t7(e){let t=this.#t8.length-1,n=this.#t8[t],l=n?n.start+n.length:0;for(let t=this.#t8.length,n;(n=this.nodelist.at(t))&&e>=this.#t8.length;t++){let e=n.nodeType===Node.ELEMENT_NODE?1:n.data.length,i={node:n,length:e,start:l,nodeIndex:t};this.#t8.push(i)}return this.#t8[e]}getNodeInfoByCharIndex(e){let t,n=0,l=this.#t8.length-1;for(;n<=l;){let i=Math.floor((n+l)/2),a=this.#t8[i],s=a.node,o=s.nodeType===Node.TEXT_NODE?s.data.length:1,r=a.start;if(e>=r&&e<r+o){t=a;break}e<r?l=i-1:n=i+1}if(t)return t;for(let t=this.#t8.length,n;n=this.#t7(t);t++)if(e<n.start+n.length)return n}}class s2{#ne=[];#nt;constructor(e){this.#nt=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,t=>{for(let n=t.parentElement;n&&n!==e;n=n.parentElement)if("X-VIEW"===n.tagName)return NodeFilter.FILTER_REJECT;if(t.nodeType===Node.ELEMENT_NODE){let e=t.tagName;if("X-TEXT"===e||"INLINE-TEXT"===e||"RAW-TEXT"===e||"LYNX-WRAPPER"===e)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#ne[e]||this.#nn(e),this.#ne[e]}#nn(e){let t=null;for(;e>=this.#ne.length&&(t=this.#nt.nextNode());){this.#ne.push(t);break}}}lL=[(0,a6.uA)("x-text",[a5.O,sJ,s1,sK],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>')],lA=[],lI=HTMLElement,class extends lI{static #e=lO=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lI[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lk={value:lO},lL,{kind:"class",name:lO.name,metadata:e},null,lA),lO=lk.value,e&&Object.defineProperty(lO,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a5.v]=this;static #C=(0,a9.zF)(lO,lA)};let s3=(lN=[],lH=[],lD=[],lG=[],lj=[],l$=[],lV=[],lW=[],lU=[],lB=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lF=[(0,a6._y)("placeholder-color",!0)],lR=[(0,a6._y)("placeholder-font-size",!0)],lM=[(0,a6._y)("placeholder-font-weight",!0)],lP=[(0,a6._y)("placeholder-font-family",!0)],lz=[(0,a6._y)("placeholder",!0)],(0,a9.G4)(null,null,lF,{kind:"field",name:"_updatePlaceholderColor",static:!1,private:!1,access:{has:e=>"_updatePlaceholderColor"in e,get:e=>e._updatePlaceholderColor,set:(e,t)=>{e._updatePlaceholderColor=t}},metadata:e},lN,lH),(0,a9.G4)(null,null,lR,{kind:"field",name:"_updatePlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontSize"in e,get:e=>e._updatePlaceholderFontSize,set:(e,t)=>{e._updatePlaceholderFontSize=t}},metadata:e},lD,lG),(0,a9.G4)(null,null,lM,{kind:"field",name:"_updatePlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontWeight"in e,get:e=>e._updatePlaceholderFontWeight,set:(e,t)=>{e._updatePlaceholderFontWeight=t}},metadata:e},lj,l$),(0,a9.G4)(null,null,lP,{kind:"field",name:"_updatePlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontFamily"in e,get:e=>e._updatePlaceholderFontFamily,set:(e,t)=>{e._updatePlaceholderFontFamily=t}},metadata:e},lV,lW),(0,a9.G4)(null,null,lz,{kind:"field",name:"_handlePlaceholder",static:!1,private:!1,access:{has:e=>"_handlePlaceholder"in e,get:e=>e._handlePlaceholder,set:(e,t)=>{e._handlePlaceholder=t}},metadata:e},lU,lB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#nl=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");_updatePlaceholderColor=(0,a9.zF)(this,lN,(0,a6._8)(this.#nl,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=((0,a9.zF)(this,lH),(0,a9.zF)(this,lD,(0,a6._8)(this.#nl,"--placeholder-font-size",void 0,!0)));_updatePlaceholderFontWeight=((0,a9.zF)(this,lG),(0,a9.zF)(this,lj,(0,a6._8)(this.#nl,"--placeholder-font-weight",void 0,!0)));_updatePlaceholderFontFamily=((0,a9.zF)(this,l$),(0,a9.zF)(this,lV,(0,a6._8)(this.#nl,"--placeholder-font-family",void 0,!0)));_handlePlaceholder=((0,a9.zF)(this,lW),(0,a9.zF)(this,lU,(0,a6.H$)(this.#nl,"placeholder")));#n=(0,a9.zF)(this,lB);constructor(e){this.#n=e}}),s8=(lK=[],lQ=[],l0=[],l1=[],l4=[],l2=[],l3=[],l8=[],l9=[],l6=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lX=[(0,a6._y)("confirm-type",!0)],lZ=[(0,a6._y)("maxlength",!0)],lq=[(0,a6._y)("readonly",!0)],lY=[(0,a6._y)("ios-spell-check",!0)],lJ=[(0,a6._y)("show-soft-input-onfocus",!0)],(0,a9.G4)(null,null,lX,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},lK,lQ),(0,a9.G4)(null,null,lZ,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},l0,l1),(0,a9.G4)(null,null,lq,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},l4,l2),(0,a9.G4)(null,null,lY,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},l3,l8),(0,a9.G4)(null,null,lJ,{kind:"field",name:"_handleShowSoftInputOnfocus",static:!1,private:!1,access:{has:e=>"_handleShowSoftInputOnfocus"in e,get:e=>e._handleShowSoftInputOnfocus,set:(e,t)=>{e._handleShowSoftInputOnfocus=t}},metadata:e},l9,l6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#n;#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");_handlerConfirmType=(0,a9.zF)(this,lK,(0,a6.H$)(this.#ni,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,lQ),(0,a9.zF)(this,l0,(0,a6.H$)(this.#ni,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,l1),(0,a9.zF)(this,l4,(0,a6.H$)(this.#ni,"readonly",e=>null!==e?"":null)));_handleSpellCheck=((0,a9.zF)(this,l2),(0,a9.zF)(this,l3,(0,a6.H$)(this.#ni,"spellcheck",e=>null===e?"false":"true")));_handleShowSoftInputOnfocus=((0,a9.zF)(this,l8),(0,a9.zF)(this,l9,(0,a6.H$)(this.#ni,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){(0,a9.zF)(this,l6),this.#n=e}}),s9=(ii=[],ia=[],is=[],io=[],ir=[],id=[],ih=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l5=[(0,a6._y)("confirm-enter",!0)],l7=[(0,a6._y)("disabled",!0)],ie=[(0,a6._y)("max-height",!0)],it=[(0,a6._y)("min-height",!0)],il=[(0,a6._y)("value",!1)],(0,a9.G4)(this,null,l5,{kind:"method",name:"_handleConfirmEnter",static:!1,private:!1,access:{has:e=>"_handleConfirmEnter"in e,get:e=>e._handleConfirmEnter},metadata:e},null,ii),(0,a9.G4)(this,null,il,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,ii),(0,a9.G4)(null,null,l7,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},ia,is),(0,a9.G4)(null,null,ie,{kind:"field",name:"_handleMaxHeight",static:!1,private:!1,access:{has:e=>"_handleMaxHeight"in e,get:e=>e._handleMaxHeight,set:(e,t)=>{e._handleMaxHeight=t}},metadata:e},io,ir),(0,a9.G4)(null,null,it,{kind:"field",name:"_handleMinHeight",static:!1,private:!1,access:{has:e=>"_handleMinHeight"in e,get:e=>e._handleMinHeight,set:(e,t)=>{e._handleMinHeight=t}},metadata:e},id,ih),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#n=(0,a9.zF)(this,ii);#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");#na=!1;_handleConfirmEnter(e){this.#na=null!==e}_handleDisabled=(0,a9.zF)(this,ia,(0,a6.H$)(this.#ni,"disabled",e=>null!==e?"":null));_handleMaxHeight=((0,a9.zF)(this,is),(0,a9.zF)(this,io,(0,a6._8)(this.#ni,"max-height")));_handleMinHeight=((0,a9.zF)(this,ir),(0,a9.zF)(this,id,(0,a6._8)(this.#ni,"min-height")));_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#ni();t.value!==e&&(t.value=e)}#ns=((0,a9.zF)(this,ih),e=>{this.#na&&"Enter"===e.key&&this.#ew().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#n=e,this.#ni().addEventListener("keyup",this.#ns)}}),s6=(ip=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ic=[(0,a6._y)("input-filter",!0),(0,a6.ZR)("lynxinput")],iu=[(0,a6._y)("send-composing-input",!0)],im=[(0,a6.ZR)("selection")],(0,a9.G4)(this,null,ic,{kind:"method",name:"_handleEnableConfirmEvent",static:!1,private:!1,access:{has:e=>"_handleEnableConfirmEvent"in e,get:e=>e._handleEnableConfirmEvent},metadata:e},null,ip),(0,a9.G4)(this,null,iu,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,ip),(0,a9.G4)(this,null,im,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,ip),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,ip);#eE=!1;#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#ni();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sN[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#ni().value}}))};#e_=e=>{let t=this.#ni(),n=this.#n.getAttribute("input-filter"),l=n?t.value.replace(RegExp(n,"g"),""):t.value,i=e.isComposing;t.value=l,(!i||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:l,textLength:l.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#ni(),t=this.#n.getAttribute("input-filter"),n=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=n,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#ni().addEventListener("select",this.#ek,{passive:!0}):this.#ni().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#ni();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#ni()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#ni(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});ig=[(0,a6.uA)("x-textarea",[a5.O,s3,s8,s9,s6],sv)],iy=[],iE=HTMLElement,(class extends iE{static #e=ib=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iE[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iv={value:ib},ig,{kind:"class",name:ib.name,metadata:e},null,iy),ib=iv.value,e&&Object.defineProperty(ib,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ib,iy)})();#nl=(0,a6.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#nl().value}set value(e){this.#nl().value=e}addText(e){let{text:t}=e,n=this.#nl(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}setValue(e){let t,n=this.#nl();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#nl();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#nl();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}select(){let e=this.#nl();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#nl().setSelectionRange(e.selectionStart,e.selectionEnd)}}),i_=[(0,a6.uA)("x-view",[sf,a5.O])],iC=[],iT=HTMLElement,class extends iT{static #e=iw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iS={value:iw},i_,{kind:"class",name:iw.name,metadata:e},null,iC),iw=iS.value,e&&Object.defineProperty(iw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iw,iC)})();superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a5.v]=this};let s5=(ik=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ix=[(0,a6._y)("blur-radius",!0)],(0,a9.G4)(this,null,ix,{kind:"method",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius},metadata:e},null,ik),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["blur-radius"];#n=(0,a9.zF)(this,ik);#no=(0,a6.Ut)(()=>this.#n.shadowRoot,"#dynamic-style");_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#no().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#no().innerHTML=""}constructor(e){this.#n=e}});iA=[(0,a6.uA)("x-blur-view",[a5.O,s5],'<style id="dynamic-style"></style><slot></slot>')],iI=[],iF=HTMLElement,class extends iF{static #e=iL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iO={value:iL},iA,{kind:"class",name:iL.name,metadata:e},null,iI),iL=iO.value,e&&Object.defineProperty(iL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iL,iI)})()};let s7=(iz=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iR=[(0,a6.ZR)("change")],iM=[(0,a6.ZR)("willchange")],iP=[(0,a6.ZR)("offsetchange")],(0,a9.G4)(this,null,iR,{kind:"method",name:"_enableChangeEvent",static:!1,private:!1,access:{has:e=>"_enableChangeEvent"in e,get:e=>e._enableChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iM,{kind:"method",name:"_enableWillChangeEvent",static:!1,private:!1,access:{has:e=>"_enableWillChangeEvent"in e,get:e=>e._enableWillChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iP,{kind:"method",name:"_enableOffsetChangeEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetChangeEvent"in e,get:e=>e._enableOffsetChangeEvent},metadata:e},null,iz),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,iz);#nr=!1;#tT=!1;#nd=0;#a;constructor(e){this.#n=e}#r=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#nh=()=>{if(!this.#tT)return;let e=this.#r(),t=this.#n.clientWidth,n=e.scrollLeft;this.#nc&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#nu()},100)),this.#n.dispatchEvent(new CustomEvent("offsetchange",{...st.$,detail:{offset:n/t}}))};#nu=()=>{if(this.#tT){let e=this.#r(),t=this.#n.clientWidth,n=Math.floor(e.scrollLeft/t);n!==this.#nd&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{index:n,isDragged:this.#nr}})),this.#nd=n)}};#nm=()=>{this.#nr=!0};#np=()=>{if(this.#nr=!1,this.#nv){let e=this.#r(),t=this.#n.clientWidth;if(t>0){let n=Math.round(e.scrollLeft/t);n=Math.max(0,Math.min(n,this.#n.children.length-1)),this.#n.dispatchEvent(new CustomEvent("willchange",{...st.$,detail:{index:n}}))}}};#nc=!1;_enableChangeEvent(e){this.#nc=e,this.#nb()}#nv=!1;_enableWillChangeEvent(e){this.#nv=e}#ng=!1;_enableOffsetChangeEvent(e){this.#ng=e,this.#nb()}#nb(){let e=this.#r();this.#ng||this.#nc?e.addEventListener("scroll",this.#nh,{passive:!0}):e.removeEventListener("scroll",this.#nh),sl.k&&this.#nc?e.addEventListener("scrollend",this.#nu,{passive:!0}):e.removeEventListener("scrollend",this.#nu)}connectedCallback(){this.#tT=!0;let e=this.#r();this.#n.addEventListener("touchstart",this.#nm,{passive:!0}),e.addEventListener("touchend",this.#np,{passive:!0}),e.addEventListener("touchcancel",this.#np,{passive:!0})}dispose(){let e=this.#r();e.removeEventListener("scroll",this.#nh),e.removeEventListener("scrollend",this.#nu)}});iD=[(0,a6.uA)("x-viewpager-ng",[sf,a5.O,s7],sb)],iG=[],ij=HTMLElement,(class extends ij{static #e=iH=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ij[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iN={value:iH},iD,{kind:"class",name:iH.name,metadata:e},null,iG),iH=iN.value,e&&Object.defineProperty(iH,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:n}=e;void 0===n&&(n=!0);let l=this.shadowRoot.children.item(2),i=l.clientWidth*t;l.scrollTo({left:i,behavior:n?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),n=this.shadowRoot.children.item(2),l=()=>{0===n.clientWidth?requestAnimationFrame(l):this.selectTab({index:t,smooth:!1})};(0,a6.JS)(l)}}get[sl.l](){return this}static #C=(0,a9.zF)(iH,iG)}),iW=[(0,a6.uA)("x-viewpager-item-ng",[sf,a5.O])],iU=[],iB=HTMLElement,class extends iB{static #e=iV=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iB[Symbol.metadata]??null):void 0;(0,a9.G4)(null,i$={value:iV},iW,{kind:"class",name:iV.name,metadata:e},null,iU),iV=i$.value,e&&Object.defineProperty(iV,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iV,iU)})()};let oe=(iZ=[],iq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iX=[(0,a6._y)("estimated-main-axis-size-px",!0)],(0,a9.G4)(null,null,iX,{kind:"field",name:"_handlerEstimatedMainAxisSizePx",static:!1,private:!1,access:{has:e=>"_handlerEstimatedMainAxisSizePx"in e,get:e=>e._handlerEstimatedMainAxisSizePx,set:(e,t)=>{e._handlerEstimatedMainAxisSizePx=t}},metadata:e},iZ,iq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["estimated-main-axis-size-px"];#n;_handlerEstimatedMainAxisSizePx=(0,a9.zF)(this,iZ,(0,a6._8)(()=>this.#n,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){(0,a9.zF)(this,iq),this.#n=e}});iK=[(0,a6.uA)("list-item",[a5.O,oe])],iQ=[],i0=HTMLElement,class extends i0{static #e=iJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iY={value:iJ},iK,{kind:"class",name:iJ.name,metadata:e},null,iQ),iJ=iY.value,e&&Object.defineProperty(iJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["recyclable"]);static #C=(0,a9.zF)(iJ,iQ)};let ot=(i2=[],i3=[],i8=[],i9=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i1=[(0,a6._y)("sticky-offset",!0)],i4=[(0,a6._y)("span-count",!0),(0,a6._y)("column-count",!0)],(0,a9.G4)(null,null,i1,{kind:"field",name:"_handlerStickyOffset",static:!1,private:!1,access:{has:e=>"_handlerStickyOffset"in e,get:e=>e._handlerStickyOffset,set:(e,t)=>{e._handlerStickyOffset=t}},metadata:e},i2,i3),(0,a9.G4)(null,null,i4,{kind:"field",name:"_handlerCount",static:!1,private:!1,access:{has:e=>"_handlerCount"in e,get:e=>e._handlerCount,set:(e,t)=>{e._handlerCount=t}},metadata:e},i8,i9),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#n;_handlerStickyOffset=(0,a9.zF)(this,i2,(0,a6._8)(()=>this.#n,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=((0,a9.zF)(this,i3),(0,a9.zF)(this,i8,(0,a6._8)(()=>this.#n,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){(0,a9.zF)(this,i9),this.#n=e}connectedCallback(){let e=this.#n.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),n=()=>{0===this.#n.clientHeight?requestAnimationFrame(n):this.#n.scrollToPosition({position:t})};(0,a6.JS)(n)}}}),on=function(e,t,n){let l,i,a,s,o=0;var r=function(){o=(null==n?void 0:n.leading)===!1?0:new Date().getTime(),l=null,s=e.apply(i,a),l||(i=a=null)};return function(){var d=new Date().getTime();o||(null==n?void 0:n.leading)!==!1||(o=d);var h=t-(d-o);return i=this,a=arguments,h<=0||h>t?(l&&(clearTimeout(l),l=null),o=d,s=e.apply(i,a),l||(i=a=null)):l||(null==n?void 0:n.trailing)===!1||(l=setTimeout(r,h)),s}},ol=(ai=[],aa=[],as=[],ao=[],ar=[],ad=[],ah=[],ac=[],au=[],am=[],ap=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i6=[(0,a6.ZR)("scrolltoupper")],i5=[(0,a6._y)("upper-threshold-item-count",!0)],i7=[(0,a6.ZR)("scrolltolower")],ae=[(0,a6._y)("lower-threshold-item-count",!0)],at=[(0,a6.ZR)("lynxscroll"),(0,a6.ZR)("lynxscrollend"),(0,a6.ZR)("snap")],an=[(0,a6.ZR)("scrolltoupperedge")],al=[(0,a6.ZR)("scrolltoloweredge")],(0,a9.G4)(this,null,i5,{kind:"method",name:"_handleUpperThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleUpperThresholdItemCountChange"in e,get:e=>e._handleUpperThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(this,null,ae,{kind:"method",name:"_handleLowerThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleLowerThresholdItemCountChange"in e,get:e=>e._handleLowerThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(null,null,i6,{kind:"field",name:"_updateEventSwitches",static:!1,private:!1,access:{has:e=>"_updateEventSwitches"in e,get:e=>e._updateEventSwitches,set:(e,t)=>{e._updateEventSwitches=t}},metadata:e},aa,as),(0,a9.G4)(null,null,i7,{kind:"field",name:"_updateScrollToLowerEventSwitches",static:!1,private:!1,access:{has:e=>"_updateScrollToLowerEventSwitches"in e,get:e=>e._updateScrollToLowerEventSwitches,set:(e,t)=>{e._updateScrollToLowerEventSwitches=t}},metadata:e},ao,ar),(0,a9.G4)(null,null,at,{kind:"field",name:"_handleScrollEventsSwitches",static:!1,private:!1,access:{has:e=>"_handleScrollEventsSwitches"in e,get:e=>e._handleScrollEventsSwitches,set:(e,t)=>{e._handleScrollEventsSwitches=t}},metadata:e},ad,ah),(0,a9.G4)(null,null,an,{kind:"field",name:"_handleScrollToUpperEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToUpperEdgeEventEnable"in e,get:e=>e._handleScrollToUpperEdgeEventEnable,set:(e,t)=>{e._handleScrollToUpperEdgeEventEnable=t}},metadata:e},ac,au),(0,a9.G4)(null,null,al,{kind:"field",name:"_handleScrollToLowerEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToLowerEdgeEventEnable"in e,get:e=>e._handleScrollToLowerEdgeEventEnable,set:(e,t)=>{e._handleScrollToLowerEdgeEventEnable=t}},metadata:e},am,ap),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#n=(0,a9.zF)(this,ai);#nf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#ny;#nE;#nS;#s=0;#o=0;#nw=!1;#a;#d=(0,a6.Ut)(()=>this.#n.shadowRoot,"#upper-threshold-observer");#h=(0,a6.Ut)(()=>this.#n.shadowRoot,"#lower-threshold-observer");#u(){let e=null!==this.#n.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i}=this.#nf(),a={scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i,deltaX:n-this.#s,deltaY:t-this.#o,attachedCells:e?this.#n.getVisibleCells():void 0};return this.#s=n,this.#o=t,a}#n_=e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltoupper",{...st.$,detail:this.#u()}))};_updateEventSwitches=(0,a9.zF)(this,aa,e=>{if(e?this.#n.setAttribute("x-enable-scrolltoupper-event",""):this.#n.removeAttribute("x-enable-scrolltoupper-event"),this.#eH.scrolltoupper=e,e){this.#ny||(this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleUpperThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#d():this.#n.children[i-1];a&&(null==(n=this.#ny)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#d():this.#n.children[s-1];o&&(null==(l=this.#ny)||l.observe(o))}#nT=((0,a9.zF)(this,as),e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltolower",{...st.$,detail:this.#u()}))});#eH={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=(0,a9.zF)(this,ao,e=>{if(this.#eH.scrolltolower=e,e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){this.#nE||(this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleLowerThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#h():this.#n.children[this.#n.children.length-i];a&&(null==(n=this.#nE)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#h():this.#n.children[this.#n.children.length-s];o&&(null==(l=this.#nE)||l.observe(o))}#nC=((0,a9.zF)(this,ar),e=>{let t=null==e?void 0:e[0];if((null==t?void 0:t.type)==="childList"){if(this.#eH.scrolltolower){this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()});let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n)}if(null!==this.#n.getAttribute("x-enable-scrolltoupper-event")){this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()});let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n)}}});#nx=null;#v=()=>{this.#nw&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#n.dispatchEvent(new CustomEvent("lynxscroll",{...st.$,detail:this.#u()}))};_handleScrollEventsSwitches=(0,a9.zF)(this,ad,(e,t)=>{this.#eH[t]=e;let{lynxscroll:n,lynxscrollend:l,snap:i}=this.#eH,a=this.#n.getAttribute("scroll-event-throttle");this.#nw=null!==l||null!==i;let s=this.#nf();if(this.#nx&&s.removeEventListener("scroll",this.#nx),null!==n||this.#nw){let e=null!==a?parseFloat(a):0,t=on(this.#v,e,{leading:!0,trailing:!1});this.#nx=t,s.addEventListener("scroll",this.#nx),this.#s=0,this.#o=0}sl.k&&this.#nw?s.addEventListener("scrollend",this.#g):s.removeEventListener("scrollend",this.#g)});#c=((0,a9.zF)(this,ah),e=>{let{isIntersecting:t,target:n}=e[0],l=n.id;t&&("upper-threshold-observer"===l?this.#n.dispatchEvent(new CustomEvent("scrolltoupperedge",{...st.$,detail:this.#u()})):"lower-threshold-observer"===l&&this.#n.dispatchEvent(new CustomEvent("scrolltoloweredge",{...st.$,detail:this.#u()})))});_handleScrollToUpperEdgeEventEnable=(0,a9.zF)(this,ac,e=>{e?this.#n.setAttribute("x-enable-scrolltoupperedge-event",""):this.#n.removeAttribute("x-enable-scrolltoupperedge-event"),this.#nk(e)});#nk=((0,a9.zF)(this,au),sn(this.#nf,this.#d,this.#c));_handleScrollToLowerEdgeEventEnable=(0,a9.zF)(this,am,e=>{e?this.#n.setAttribute("x-enable-scrolltoloweredge-event",""):this.#n.removeAttribute("x-enable-scrolltoloweredge-event"),this.#nO(e)});#nO=((0,a9.zF)(this,ap),sn(this.#nf,this.#h,this.#c));#g=()=>{let e=this.#n.getAttribute("item-snap");if(this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$})),null!==e){let e=Array.from(this.#n.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#nf().scrollTop,n=this.#nf().scrollLeft,l=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#n.dispatchEvent(new CustomEvent("snap",{...st.$,detail:{position:l&&e.indexOf(l),scrollTop:t,scrollLeft:n}}))}};constructor(e){this.#n=e}}),oi="waterfall-slot",oa="waterfall-style",os=(ag=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;av=[(0,a6.ZR)("scrolltolower")],ab=[(0,a6._y)("list-type",!0)],(0,a9.G4)(this,null,av,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ag),(0,a9.G4)(this,null,ab,{kind:"method",name:"_handlerListType",static:!1,private:!1,access:{has:e=>"_handlerListType"in e,get:e=>e._handlerListType},metadata:e},null,ag),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["list-type"];#n=(0,a9.zF)(this,ag);#nf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#nL=(0,a6.Ut)(()=>this.#n.shadowRoot,'div[part="lower-threshold-observer"]');#N;#nS;_handleXEnableHeaderOffsetEvent(e){if(e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#nL(),t=this.#n.getAttribute("scroll-orientation")||"vertical",n=this.#nf();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(n.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(n.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#nA=()=>{var e,t;let n=document.createElement("slot");n.setAttribute("name",`${oi}`),null==(t=this.#n.shadowRoot)||null==(e=t.querySelector("[part=upper-threshold-observer]"))||e.insertAdjacentElement("afterend",n)};#nI=()=>{let e=parseFloat(this.#n.getAttribute("span-count")||this.#n.getAttribute("column-count")||"")||1,t="vertical"===(this.#n.getAttribute("scroll-orientation")||"vertical"),n=Array(e).fill(0);for(let l=0;l<this.#n.children.length;l++){let i=this.#n.children[l],a=getComputedStyle(i).getPropertyValue("--list-main-axis-gap"),s=getComputedStyle(i).getPropertyValue("--list-cross-axis-gap"),o=t?i.getBoundingClientRect().height+parseFloat(a):i.getBoundingClientRect().width+parseFloat(a);if(null!==i.getAttribute("full-span")){let l=n[0];for(let t=1;t<e;t++)n[t]>l&&(l=n[t]);for(let t=0;t<e;t++)n[t]=l+o;t?(i.setAttribute(`${oa}-left`,"0"),i.setAttribute(`${oa}-top`,`${l}px`)):(i.setAttribute(`${oa}-left`,`${l}px`),i.setAttribute(`${oa}-top`,"0"))}else{let l=0,a=n[0];for(let t=1;t<e;t++)n[t]<a&&(l=t,a=n[t]);let r=`calc(${l} * (100% - ${s} * (${e} - 1))/ ${e} + ${Math.max(0,l)} * ${s})`;t?(i.setAttribute(`${oa}-left`,r),i.setAttribute(`${oa}-top`,`${a}px`)):(i.setAttribute(`${oa}-left`,`${a}px`),i.setAttribute(`${oa}-top`,r)),n[l]+=o}}for(let e=0;e<this.#n.children.length;e++){let t=this.#n.children[e];t.style.setProperty("left",t.getAttribute(`${oa}-left`)),t.style.setProperty("top",t.getAttribute(`${oa}-top`)),t.setAttribute("slot",oi)}};constructor(e){this.#n=e}#nF=()=>{var e;null==(e=this.#N)||e.disconnect(),this.#N=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#nI()})}),Array.from(this.#n.children).forEach(e=>{var t;null==(t=this.#N)||t.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#nA(),this.#N||this.#nF(),this.#nS||(this.#nS=new MutationObserver(e=>{let t=null==e?void 0:e[0];(null==t?void 0:t.type)==="childList"&&this.#nF()}),this.#nS.observe(this.#n,{childList:!0}));else{var t,n,l,i;null==(t=this.#N)||t.disconnect(),this.#N=void 0,null==(n=this.#nS)||n.disconnect(),this.#nS=void 0;for(let e=0;e<this.#n.children.length;e++)this.#n.children[e].removeAttribute("slot");null==(i=this.#n.shadowRoot)||null==(l=i.querySelector(`slot[name=${oi}]`))||l.remove()}}});aE=[(0,a6.uA)("x-list",[a5.O,ot,ol,os],sh)],aS=[],aw=HTMLElement,class extends aw{static #e=ay=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aw[Symbol.metadata]??null):void 0;(0,a9.G4)(null,af={value:ay},aE,{kind:"class",name:ay.name,metadata:e},null,aS),ay=af.value,e&&Object.defineProperty(ay,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);#nf=(0,a6.Ut)(()=>this.shadowRoot,"#content");#nR={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#nM={};get scrollTop(){return this.#nf().scrollTop}set scrollTop(e){this.#nf().scrollTop=e}get scrollLeft(){return this.#nf().scrollLeft}set scrollLeft(e){this.#nf().scrollLeft=e}get scrollHeight(){return this.#nf().scrollHeight}get scrollWidth(){return this.#nf().scrollWidth}get[sl.l](){return this.#nf()}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollLeft}scrollToPosition(e){let t;if("string"==typeof e.offset){let n=parseFloat(e.offset);t={left:n,top:n}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#nf().scrollTop=0,this.#nf().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let n=this.children.item(e.position);n instanceof HTMLElement&&(t=t?{left:n.offsetLeft+t.left,top:n.offsetTop+t.top}:{left:n.offsetLeft,top:n.offsetTop})}}t&&this.#nf().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#nP=e=>{if(!this.#nR.isScrolling)return;if(!this.#nR.lastTimestamp){this.#nR.lastTimestamp=e,requestAnimationFrame(this.#nP);return}let t=this.#nf(),n=(e-this.#nR.lastTimestamp)/1e3*this.#nR.rate,l="vertical"===(this.getAttribute("scroll-orientation")||"vertical");t.scrollBy({left:l?0:n,top:l?n:0,behavior:"auto"}),this.#nR.lastTimestamp=e,(l?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#nR.autoStop?(l?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#nR.isScrolling=!1):requestAnimationFrame(this.#nP)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#nR={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let n=this.#nf(),l="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?n.clientHeight<=n.scrollHeight:n.clientWidth<=n.scrollWidth;this.#nR.lastTimestamp=0,l?setTimeout(()=>requestAnimationFrame(this.#nP),0):requestAnimationFrame(this.#nP)}else this.#nR.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#nM),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let n=this.#nf().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=n.top&&t.top<=n.bottom&&t.right>=n.left&&t.left<=n.right})}return e.map(e=>{let n=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:n.bottom,top:n.top,left:n.left,right:n.right,index:t.indexOf(e)}})};#nz=()=>Object.values(this.#nM).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#nN=e=>{var t,n,l;if(!e.target||!(e.target instanceof HTMLElement))return;let i=e.skipped,a=(null==(t=e.target)?void 0:t.getAttribute("id"))==="content"&&(null==(n=e.target)?void 0:n.getAttribute("part"))==="content",s="LIST-ITEM"===e.target.tagName;if(a&&!i){let e=this.#nz();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...st.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#nz()}}))},100);return}if(s){let t=null==(l=e.target)?void 0:l.getAttribute("item-key");if(!t)return;i?this.#nM[t]&&delete this.#nM[t]:this.#nM[t]=e.target;return}};connectedCallback(){this.#nf().addEventListener("contentvisibilityautostatechange",this.#nN,{passive:!0})}static #C=(0,a9.zF)(ay,aS)};let oo=(aT=[],ax=[],ak=[],aO=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;a_=[(0,a6._y)("src",!0)],aC=[(0,a6._y)("html",!0)],(0,a9.G4)(null,null,a_,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},aT,ax),(0,a9.G4)(null,null,aC,{kind:"field",name:"_handleHtml",static:!1,private:!1,access:{has:e=>"_handleHtml"in e,get:e=>e._handleHtml,set:(e,t)=>{e._handleHtml=t}},metadata:e},ak,aO),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","html"];#n;#nH=(0,a6.Ut)(()=>this.#n.shadowRoot,"#webview");constructor(e){(0,a9.zF)(this,aO),this.#n=e}_handleSrc=(0,a9.zF)(this,aT,(0,a6.H$)(this.#nH,"src"));_handleHtml=((0,a9.zF)(this,ax),(0,a9.zF)(this,ak,(0,a6.H$)(this.#nH,"srcdoc")))});aI=[(0,a6.uA)("x-webview",[a5.O,oo],sg)],aF=[],aR=HTMLElement,class extends aR{static #e=aA=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aR[Symbol.metadata]??null):void 0;(0,a9.G4)(null,aL={value:aA},aI,{kind:"class",name:aA.name,metadata:e},null,aF),aA=aL.value,e&&Object.defineProperty(aA,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(aA,aF)})();#nH=(0,a6.Ut)(()=>this.shadowRoot,"#webview");#nD=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}}))};#nG=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#nj=e=>{e.source===this.#nH().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#nH().addEventListener("load",this.#nD),this.#nH().addEventListener("error",this.#nG),window.addEventListener("message",this.#nj)}disconnectedCallback(){this.#nH().removeEventListener("load",this.#nD),this.#nH().removeEventListener("error",this.#nG),window.removeEventListener("message",this.#nj)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#nH().src=this.#nH().src}};var or=n(33553);n(46455),n(61203);let od=!1,oh=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),oc=e=>{if(!e)return e;if(e.includes("\x3c!--")||e.includes("<!")||e.includes("<?")||e.includes("<%"))return oh(e);let t=/<\s*\/?\s*([A-Za-z][\w-]*)\b[^>]*>/g,n=null,l=!1;for(;n=t.exec(e);){l=!0;let t=(n[1]??"").toLowerCase();if("span"!==t&&"p"!==t)return oh(e)}return l?e.replace(/<(span|p)\b([^>]*?)(\/?)>/gi,(e,t,n,l)=>{let i=String(t).toLowerCase(),a=String(n??"").replaceAll("&quot;",'"').replaceAll("&#34;",'"').replaceAll("&apos;","'").replaceAll("&#39;","'").replaceAll("&amp;","&").replaceAll("&lt;","<").replaceAll("&gt;",">"),s=/\bclass\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(a),o=((null==s?void 0:s[1])??(null==s?void 0:s[2])??(null==s?void 0:s[3])??"").trim().split(/\s+/).filter(Boolean).filter(e=>/^[A-Za-z0-9_-]+$/.test(e)).join(" "),r=o?` class="${o.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}"`:"";return"/"===String(l??"")?`<${i}${r}></${i}>`:`<${i}${r}>`}):e.includes("<")?oh(e):e},ou=e=>{for(let t of e)((null==t?void 0:t.type)==="html_inline"||(null==t?void 0:t.type)==="html_block")&&(t.content=oc(String(t.content??""))),Array.isArray(null==t?void 0:t.children)&&ou(t.children)},om=(e,t)=>{let n={},l=e.parse(t,n);return ou(l),e.renderer.render(l,e.options,n)},op=null,ov=null,ob=()=>{if(op||o)return op;if(!l)return null;try{(op=new l({html:!0,linkify:!0})).enable(["table","strikethrough"])}catch(e){o=e}return op},og=e=>{let t=ov||(i?ov=i(window):null);return t?t.sanitize(e,{USE_PROFILES:{html:!0}}):e},of=()=>({start:-1,end:-1,direction:"forward"}),oy=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!(null==t?void 0:t.contains(n))),oE=(e,t,n,l,i)=>{if(!i)return null;let a=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(i,l)??(i.rangeCount>0?i.getRangeAt(0):null);if(!a)return null;if(!n.contains(a.startContainer)||!n.contains(a.endContainer)){var s;if(!oy(t,l,a.startContainer)||!oy(t,l,a.endContainer)||!oy(t,l,i.anchorNode)||!oy(t,l,i.focusNode))return null;let o=i.toString();if(!o)return null;let r=(null==(s=n.textContent)?void 0:s.indexOf(o))??-1;return r<0?null:((e,t,n,l)=>{let i=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=i.nextNode();for(;h;){var c;let e=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=l){r=h,d=l-a;break}a+=e,h=i.nextNode()}if(!s)return null;r||(r=s,d=o);let u=e.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(e,n,r,r+o.length)}let o=e.createRange();return o.setStart(a.startContainer,a.startOffset),o.setEnd(a.endContainer,a.endOffset),o},oS=(e,t,n,l)=>{if(!n||!t.contains(n))return null;let i=e.createRange();i.selectNodeContents(t);try{i.setEnd(n,l)}catch{return null}return i.toString().length},ow=e=>e.replace(/src\s*=\s*"inlineview:\/\/([^"]+)"/g,(e,t)=>`data-inlineview="${t}"`),o_=new Set(["font-weight","opacity","z-index","flex","flex-grow","flex-shrink","order"]),oC={normalText:".markdown-body",link:".markdown-body a",inlineCode:".markdown-body code:not(pre code)",codeBlock:[".markdown-body pre",".markdown-body pre code"],h1:".markdown-body h1",h2:".markdown-body h2",h3:".markdown-body h3",h4:".markdown-body h4",h5:".markdown-body h5",h6:".markdown-body h6",quote:".markdown-body blockquote",orderedList:".markdown-body ol",unorderedList:".markdown-body ul",listItem:".markdown-body li",image:".markdown-body img",span:".markdown-body span",p:".markdown-body p",table:".markdown-body table",thead:".markdown-body thead",tbody:".markdown-body tbody",tr:".markdown-body tr",th:".markdown-body th",td:".markdown-body td",imageCaption:".markdown-body .md-image-caption"},oT=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),ox=(e,t)=>{if(null==t)return null;if("number"==typeof t)return o_.has(e)?`${t}`:`${t}px`;if("string"==typeof t){if(e.includes("color")){let e;return e=t.trim(),/^[0-9a-fA-F]{6,8}$/.test(e)?`#${e}`:t}return t}return null},ok=e=>{if(!e)return{};try{let t=JSON.parse(e);if(t&&"object"==typeof t)return t}catch{}return{}},oO=(aZ=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aM=[(0,a6._y)("content",!0)],aP=[(0,a6._y)("markdown-effect",!0)],az=[(0,a6._y)("markdown-style",!0)],aN=[(0,a6._y)("content-id",!0)],aH=[(0,a6._y)("text-selection",!0)],aD=[(0,a6._y)("animation-type",!0)],aG=[(0,a6._y)("animation-velocity",!0)],aj=[(0,a6._y)("animation-paused",!0)],a$=[(0,a6._y)("initial-animation-step",!0)],aV=[(0,a6._y)("content-complete",!0)],aW=[(0,a6._y)("typewriter-dynamic-height",!0)],aU=[(0,a6._y)("typewriter-height-transition-duration",!0)],aB=[(0,a6._y)("text-maxline",!0)],aX=[(0,a6._y)("content-range",!0)],(0,a9.G4)(this,null,aM,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,aZ),(0,a9.G4)(this,null,aP,{kind:"method",name:"_handleMarkdownEffect",static:!1,private:!1,access:{has:e=>"_handleMarkdownEffect"in e,get:e=>e._handleMarkdownEffect},metadata:e},null,aZ),(0,a9.G4)(this,null,az,{kind:"method",name:"_handleMarkdownStyle",static:!1,private:!1,access:{has:e=>"_handleMarkdownStyle"in e,get:e=>e._handleMarkdownStyle},metadata:e},null,aZ),(0,a9.G4)(this,null,aN,{kind:"method",name:"_handleContentId",static:!1,private:!1,access:{has:e=>"_handleContentId"in e,get:e=>e._handleContentId},metadata:e},null,aZ),(0,a9.G4)(this,null,aH,{kind:"method",name:"_handleTextSelection",static:!1,private:!1,access:{has:e=>"_handleTextSelection"in e,get:e=>e._handleTextSelection},metadata:e},null,aZ),(0,a9.G4)(this,null,aD,{kind:"method",name:"_handleAnimationType",static:!1,private:!1,access:{has:e=>"_handleAnimationType"in e,get:e=>e._handleAnimationType},metadata:e},null,aZ),(0,a9.G4)(this,null,aG,{kind:"method",name:"_handleAnimationVelocity",static:!1,private:!1,access:{has:e=>"_handleAnimationVelocity"in e,get:e=>e._handleAnimationVelocity},metadata:e},null,aZ),(0,a9.G4)(this,null,aj,{kind:"method",name:"_handleAnimationPaused",static:!1,private:!1,access:{has:e=>"_handleAnimationPaused"in e,get:e=>e._handleAnimationPaused},metadata:e},null,aZ),(0,a9.G4)(this,null,a$,{kind:"method",name:"_handleInitialAnimationStep",static:!1,private:!1,access:{has:e=>"_handleInitialAnimationStep"in e,get:e=>e._handleInitialAnimationStep},metadata:e},null,aZ),(0,a9.G4)(this,null,aV,{kind:"method",name:"_handleContentComplete",static:!1,private:!1,access:{has:e=>"_handleContentComplete"in e,get:e=>e._handleContentComplete},metadata:e},null,aZ),(0,a9.G4)(this,null,aW,{kind:"method",name:"_handleTypewriterDynamicHeight",static:!1,private:!1,access:{has:e=>"_handleTypewriterDynamicHeight"in e,get:e=>e._handleTypewriterDynamicHeight},metadata:e},null,aZ),(0,a9.G4)(this,null,aU,{kind:"method",name:"_handleTypewriterHeightTransition",static:!1,private:!1,access:{has:e=>"_handleTypewriterHeightTransition"in e,get:e=>e._handleTypewriterHeightTransition},metadata:e},null,aZ),(0,a9.G4)(this,null,aB,{kind:"method",name:"_handleTextMaxline",static:!1,private:!1,access:{has:e=>"_handleTextMaxline"in e,get:e=>e._handleTextMaxline},metadata:e},null,aZ),(0,a9.G4)(this,null,aX,{kind:"method",name:"_handleContentRange",static:!1,private:!1,access:{has:e=>"_handleContentRange"in e,get:e=>e._handleContentRange},metadata:e},null,aZ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["content","markdown-style","content-id","text-selection","animation-type","animation-velocity","animation-paused","initial-animation-step","content-complete","typewriter-dynamic-height","typewriter-height-transition-duration","text-maxline","content-range","markdown-effect"];#n=(0,a9.zF)(this,aZ);#n$=(0,a6.Ut)(()=>this.#n.shadowRoot,"#markdown-root");#nV=(0,a6.Ut)(()=>this.#n.shadowRoot,"#markdown-style");#nW=!1;#nU="";#nB="";#nX;#nZ=!1;#nq=!1;#nY="";#nJ;#nK=60;#nQ="";#n0=!1;#n1;#tk;#n4=null;#n2;#n3="none";#n8=40;#n9;#n6=0;#n5=!1;#n7=!1;#le=!0;#lt=0;#ln=!1;#ll=0;#li=null;#la;#ls=0;#lo=!1;#lr;#ld=null;constructor(e){this.#n=e}connectedCallback(){this.#lh()}dispose(){this.#lc(),this.#lu(),clearTimeout(this.#n1),this.#n1=void 0,this.#nZ&&(this.#n$().removeEventListener("click",this.#lm),this.#nZ=!1),this.#nq&&(document.removeEventListener("selectionchange",this.#tL),document.removeEventListener("mouseup",this.#lp),document.removeEventListener("touchend",this.#lp),document.removeEventListener("keyup",this.#lp),this.#nq=!1)}#lh(){this.#nZ||(this.#n$().addEventListener("click",this.#lm),this.#nZ=!0,this.#nq||(document.addEventListener("selectionchange",this.#tL),document.addEventListener("mouseup",this.#lp),document.addEventListener("touchend",this.#lp),document.addEventListener("keyup",this.#lp),this.#nq=!0))}#lm=e=>{let t=e.target;if(!t)return;let n=this.#n$(),l=t.closest("a");if(l&&n.contains(l)){e.preventDefault(),this.#n.dispatchEvent(new CustomEvent("bindlink",{detail:{url:l.getAttribute("href")??"",content:l.textContent??"",contentId:this.#nX},bubbles:!0,composed:!0}));return}let i=t.closest("img");i&&n.contains(i)&&this.#n.dispatchEvent(new CustomEvent("bindimageTap",{detail:{url:i.getAttribute("src")??"",contentId:this.#nX},bubbles:!0,composed:!0}))};#lv(){if(this.#n0)try{let e=this.#n$(),t=((e,t)=>{var n;let l=e.ownerDocument,i=e.shadowRoot,a=[(null==i||null==(n=i.getSelection)?void 0:n.call(i))??null,l.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t),s=null,o=null;for(let n of a){let a=oE(l,e,t,i,n);if(a&&!a.collapsed){s=a,o=n;break}}if(!s||!o)return of();let r=oS(l,t,s.startContainer,s.startOffset),d=oS(l,t,s.endContainer,s.endOffset);if(null===r||null===d||r===d)return of();let h=oS(l,t,o.anchorNode,o.anchorOffset),c=oS(l,t,o.focusNode,o.focusOffset);return{start:Math.min(r,d),end:Math.max(r,d),direction:null!==h&&null!==c&&h>c?"backward":"forward"}})(this.#n,e),n=`${t.start}:${t.end}:${t.direction}`;if(n===this.#tk)return;this.#tk=n,this.#n.dispatchEvent(new CustomEvent("bindselectionchange",{detail:t,bubbles:!0,composed:!0}))}catch{}}#lb=()=>{clearTimeout(this.#n1),this.#n1=setTimeout(()=>{this.#n1=void 0,this.#lv()},0)};#tL=()=>{this.#lv(),this.#lb()};#lp=()=>{this.#lv(),this.#lb()};#lg(){if(!this.#nW){if(this.#nW=!0,!od&&!s)return void(od?Promise.resolve():a||(a=n.e(166).then(n.bind(n,22311)).then(e=>{l=e.MarkdownIt,i=e.createDOMPurify,od=!0}).catch(e=>{s=e}))).then(()=>{this.#nW=!1,this.#lf()});(0,a6.JS)(()=>{this.#nW=!1,this.#lf()})}}#lf(){let e=this.#n$();if(!this.#nU){this.#ly(),e.innerHTML="",this.#nB="",this.#nY="",this.#lc();return}if("typewriter"===this.#n3)return void this.#lE(e);let t=ob();if(!t){let t=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.textContent=t,this.#nB=t,this.#nY="",this.#lc();return}if(this.#lS())return void this.#lw(e);let n=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.innerHTML=og(ow(om(t,n))),this.#l_(e),this.#nB=n,this.#nY="",this.#lc(),this.#lC(),this.#lT(e)}#lS(){return!!this.#nB&&!!this.#nU.startsWith(this.#nB)&&this.#nU.length!==this.#nB.length}#lw(e){let t=this.#nU.slice(this.#nB.length);if(!t)return;let n=t.lastIndexOf("\n");if(-1===n){this.#nY=t,this.#lx();return}let l=t.slice(0,n+1);if(l){let t=ob();if(!t)return;let n=om(t,l);this.#lk(e,n),this.#nB+=l}this.#nY=t.slice(n+1),this.#nY?this.#lx():this.#lc()}#lx(){this.#lc(),this.#nJ=setTimeout(()=>{this.#nJ=void 0,this.#lO()},this.#nK)}#lc(){this.#nJ&&(clearTimeout(this.#nJ),this.#nJ=void 0)}#ly(){this.#lu(),this.#n5=!1,this.#n6=0,this.#lt=0,this.#lL()}#lO(){if(!this.#nY||!this.#nU.startsWith(this.#nB))return;let e=this.#nB.length+this.#nY.length;if(this.#nU.length!==e)return;let t=this.#n$(),n=ob();if(!n)return;let l=om(n,this.#nY);this.#lk(t,l),this.#nB+=this.#nY,this.#nY="",this.#lC(),this.#lT(this.#n$())}#lk(e,t){let n=document.createElement("template");n.innerHTML=og(ow(t)),e.append(n.content),this.#lT(e),this.#l_(e)}#lA(e){var t,n;if(!this.#ld||"text-mask"!==this.#ld.type||!1!==this.#le&&this.#n6>=this.#lt)return;let{color:l,rangeStart:i,rangeEnd:a}=this.#ld;if(!l||"number"!=typeof i)return;e.querySelectorAll(".md-text-mask-effect").forEach(e=>{let t=e.querySelector(".md-text-mask-effect-content"),n=e.parentNode;if(t&&n){for(;t.firstChild;)n.insertBefore(t.firstChild,e);n.removeChild(e)}});let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=[];for(;s.nextNode();){let n=s.currentNode,l=n.parentElement;l===e&&((null==(t=n.nodeValue)?void 0:t.trim())??"")===""||l&&(l.closest(".md-typewriter-cursor")||l.closest(".md-truncation")||l.closest(".md-text-mask-effect-overlay"))||o.push(n)}let r=o.reduce((e,t)=>{var n;return e+((null==(n=t.nodeValue)?void 0:n.length)??0)},0),d=i<0?r+i:i,h=Math.max(0,Math.min(r,d)),c=Math.max(h,Math.min(r,("number"==typeof a?a<0?r+a:a:d)+1));if(c<=h)return;let u=0,m=[];if(o.forEach(e=>{var t;let n=(null==(t=e.nodeValue)?void 0:t.length)??0,l=u,i=u+n,a=Math.max(h,l)-l,s=Math.min(c,i)-l;a<s&&m.push({node:e,startOffset:a,endOffset:s}),u=i}),0===m.length)return;let p=[];for(let{node:e,startOffset:t,endOffset:i}of m.reverse()){let a=e;t>0&&(a=e.splitText(t));let s=i-t;s<((null==(n=a.nodeValue)?void 0:n.length)??0)&&a.splitText(s);let o=a.nodeValue??"",r=document.createElement("span");r.className="md-text-mask-effect";let d=document.createElement("span");d.className="md-text-mask-effect-content";let h=document.createElement("span");h.className="md-text-mask-effect-overlay",h.setAttribute("aria-hidden","true"),h.textContent=o,h.style.background=l;let c=a.parentNode;c&&(c.insertBefore(r,a),d.appendChild(a),r.append(d,h),p.unshift({content:d,overlay:h}))}if(0===p.length)return;let v=p.map(e=>{let{content:t}=e;return t.getBoundingClientRect().width}),b=v.reduce((e,t)=>e+t,0);if(b<=0)return;let g=0;p.forEach((e,t)=>{let{overlay:n}=e;n.style.backgroundRepeat="no-repeat",n.style.backgroundSize=`${b}px 100%`,n.style.backgroundPosition=`${-g}px 0`,g+=v[t]??0})}#lC(){this.#n.dispatchEvent(new CustomEvent("bindparseEnd",{detail:{id:this.#nX},bubbles:!0,composed:!0}))}#lT(e){if(this.#lA(e),this.#ls>0?queueMicrotask(()=>{try{e.scrollHeight>e.clientHeight+1&&!this.#lo&&(this.#lo=!0,this.#n.dispatchEvent(new CustomEvent("bindoverflow",{detail:{type:"ellipsis"},bubbles:!0,composed:!0})))}catch{}}):this.#lo=!1,"typewriter"===this.#n3&&this.#ln){let t=this.#ll;t>0&&(e.style.transition=`height ${t}s ease`)}else e.style.transition="";this.#ls>0&&this.#lI(e)||this.#lF()}#lE(e){let[t,n]=this.#lr?this.#lr:[0,this.#nU.length];this.#lt=Math.max(0,n-t),!this.#n5&&(this.#n5=!0,this.#n.dispatchEvent(new CustomEvent("binddrawStart",{bubbles:!0,composed:!0})),this.#n7||this.#lR());let l=this.#nU.slice(t,t+this.#n6),i=ob();i?(e.innerHTML=og(ow(om(i,l))),this.#l_(e)):e.textContent=l,this.#lM(e),this.#lT(e),this.#n6>=this.#lt&&(this.#lu(),!1!==this.#le&&this.#n.dispatchEvent(new CustomEvent("binddrawEnd",{bubbles:!0,composed:!0})))}#lR(){this.#lu();let e=Math.max(10,Math.floor(1e3/Math.max(1,this.#n8)));this.#n9=setInterval(()=>{if(this.#n6<this.#lt){this.#n6+=1,this.#n.dispatchEvent(new CustomEvent("bindanimationStep",{detail:{animationStep:this.#n6,maxAnimationStep:this.#lt},bubbles:!0,composed:!0}));let e=this.#n$();this.#lE(e)}else this.#lu()},e)}#lu(){this.#n9&&(clearInterval(this.#n9),this.#n9=void 0)}#lP(e){let t=ok(e);this.#n4=t.truncation??null,this.#li=t.typewriterCursor??null;let{truncation:n,typewriterCursor:l,...i}=t;this.#nQ=(e=>{let t=[];for(let[n,l]of Object.entries(e)){if(!l||"object"!=typeof l)continue;let e=[];if(n.startsWith(".")||n.startsWith("#"))e=[`.markdown-body ${n}`];else{if(!oC[n])continue;e=Array.isArray(oC[n])?oC[n]:[oC[n]]}let i=Object.entries(l).map(e=>{let[t,n]=e,l=oT(t),i=ox(l,n);return i?`${l}: ${i};`:null}).filter(Boolean).join("");if(i)for(let n of e)t.push(`${n} {${i}}`)}return t.join("\n")})(i),this.#lz()}#lz(){let e=this.#nV(),t=this.#nQ||"";this.#n0&&(t+="\n.markdown-body { user-select: text; }"),this.#ls>0&&(t+=`
364
+ <iframe id="webview" part="webview"></iframe>`,sf=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto")?void 0:class{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#n;constructor(e){this.#n=e,this.cssPropertyChangedHandler={"--lynx-display":this.#S,"--lynx-linear-orientation":this.#w}}#S=(0,a6.H$)(()=>this.#n,"lynx-computed-display");#w=(0,a6.H$)(()=>this.#n,"lynx-linear-orientation")};j=[(0,a6.uA)("scroll-view",[sf,a5.O,se,a7,si,sa],ss)],$=[],V=HTMLElement,a4=class extends V{static #e=G=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(V[Symbol.metadata]??null):void 0;(0,a9.G4)(null,D={value:G},j,{kind:"class",name:G.name,metadata:e},null,$),a4=G=D.value,e&&Object.defineProperty(G,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#_;scrollTo(){let e;for(var t=arguments.length,n=Array(t),l=0;l<t;l++)n[l]=arguments[l];if("string"==typeof n[0].offset){let t=parseFloat(n[0].offset);e={left:t,top:t}}else"number"==typeof n[0].offset&&(e={left:n[0].offset,top:n[0].offset});if("number"==typeof n[0].index){let t=n[0].index;if(0===t)this.scrollTop=0,this.scrollLeft=0;else if(t>0&&t<this.childElementCount){let n=this.children.item(t);n instanceof HTMLElement&&(e=e?{left:n.offsetLeft+e.left,top:n.offsetTop+e.top}:{left:n.offsetLeft,top:n.offsetTop})}}e?this.scrollTo({...e,behavior:n[0].smooth?"smooth":"auto"}):super.scrollTo(...n)}autoScroll(e){if(clearInterval(this.#_),e.start){let t=("number"==typeof e.rate?e.rate:parseFloat(e.rate))*a4.scrollInterval/1e3;this.#_=setInterval(e=>{e.scrollBy({left:t,top:t,behavior:"smooth"})},a4.scrollInterval,this)}}get[sl.l](){return this}static #C=(0,a9.zF)(G,$)},a4=G,n(21301),n(52205),n(40768),n(76235);let sy=Symbol("__src"),sE=Symbol("__src"),sS={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},sw={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};(a2=a8||(a8={}))[a2.SrcError=-1]="SrcError",a2[a2.SrcJsonError=-2]="SrcJsonError",a2[a2.DownloadError=-3]="DownloadError",a2[a2.PlayerFinishedError=-4]="PlayerFinishedError",a2[a2.PlayerLoadingError=-5]="PlayerLoadingError",a2[a2.PlayerPlaybackError=-6]="PlayerPlaybackError";let s_=(X=[],Z=[],q=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;W=[(0,a6._y)("src",!0)],U=[(0,a6._y)("loop",!0)],B=[(0,a6._y)("pause-on-hide",!0)],(0,a9.G4)(this,null,W,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,X),(0,a9.G4)(this,null,B,{kind:"method",name:"_handlePauseOnHide",static:!1,private:!1,access:{has:e=>"_handlePauseOnHide"in e,get:e=>e._handlePauseOnHide},metadata:e},null,X),(0,a9.G4)(null,null,U,{kind:"field",name:"_handleLoop",static:!1,private:!1,access:{has:e=>"_handleLoop"in e,get:e=>e._handleLoop,set:(e,t)=>{e._handleLoop=t}},metadata:e},Z,q),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","loop","pause-on-hide"];#n=(0,a9.zF)(this,X);#T=(0,a6.Ut)(()=>this.#n.shadowRoot,"#audio");_handleSrc(e){var t,n;let l;try{l=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),l={}}null===e?this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcError,msg:"",from:"res loader",currentSrcID:null==(t=this.#n[sy])?void 0:t.id}})):((null==l?void 0:l.id)===void 0||(null==l?void 0:l.play_url)===void 0)&&this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a8.SrcJsonError,msg:"",from:"res loader",currentSrcID:null==(n=this.#n[sy])?void 0:n.id}})),this.#n[sy]=l,this.#n[sE]=void 0,this.#n.stop()}_handleLoop=(0,a9.zF)(this,Z,(0,a6.H$)(this.#T,"loop"));#x=((0,a9.zF)(this,q),()=>{"hidden"===document.visibilityState&&this.#n.pause()});_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#x,{passive:!0}):document.removeEventListener("visibilitychange",this.#x)}constructor(e){this.#n=e}});K=[(0,a6.uA)("x-audio-tt",[a5.O,s_,class e{static observedAttributes=[];#n;#k;#T=(0,a6.Ut)(()=>this.#n.shadowRoot,"#audio");#O=e=>{var t;let n=Number(this.#n.getAttribute("interval")),l=Number.isNaN(n)?0:n;this.#k=setInterval(()=>{var e;this.#n.dispatchEvent(new CustomEvent("timeupdate",{...st.$,detail:{currentTime:this.#T().currentTime,currentSrcID:null==(e=this.#n[sy])?void 0:e.id}}))},l);let i=sw[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==i?void 0:i.code,type:null==i?void 0:i.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#L=e=>{var t;clearInterval(this.#k);let n=sw[e.type];this.#n.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#A=e=>{var t;let n=sS[e.type];this.#n.dispatchEvent(new CustomEvent("loadingstatechanged",{...st.$,detail:{code:null==n?void 0:n.code,type:null==n?void 0:n.type,currentSrcID:null==(t=this.#n[sy])?void 0:t.id}}))};#I=e=>{var t,n,l;this.#A(e);let i=null==(n=e.target)||null==(t=n.error)?void 0:t.code,a=i===MediaError.MEDIA_ERR_DECODE?a8.PlayerLoadingError:a8.PlayerPlaybackError;i===MediaError.MEDIA_ERR_DECODE&&(a=a8.PlayerLoadingError),this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:a,msg:"",from:"player",currentSrcID:null==(l=this.#n[sy])?void 0:l.id}}))};#F=()=>{var e;let t=null!==this.#n.getAttribute("loop");this.#n.dispatchEvent(new CustomEvent("finished",{...st.$,detail:{loop:t,currentSrcID:null==(e=this.#n[sy])?void 0:e.id}}))};constructor(e){this.#n=e}connectedCallback(){let e=this.#T();e.addEventListener("play",this.#O,{passive:!0}),e.addEventListener("pause",this.#L,{passive:!0}),e.addEventListener("ended",this.#F,{passive:!0}),e.addEventListener("loadstart",this.#A,{passive:!0}),e.addEventListener("canplay",this.#A,{passive:!0}),e.addEventListener("stalled",this.#A,{passive:!0}),e.addEventListener("error",this.#I,{passive:!0})}}],'<audio id="audio"></audio>')],Q=[],ee=HTMLElement,class extends ee{static #e=J=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ee[Symbol.metadata]??null):void 0;(0,a9.G4)(null,Y={value:J},K,{kind:"class",name:J.name,metadata:e},null,Q),J=Y.value,e&&Object.defineProperty(J,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(J,Q)})();#R=(0,a6.Ut)(()=>this.shadowRoot,"#audio");#T=(0,a6.Ut)(()=>this.shadowRoot,"#audio");#M=(0,a6.H$)(this.#T,"src");[sy];[sE];#P(e,t){var n;this.dispatchEvent(new CustomEvent("error",{...st.$,detail:{code:e,msg:"",from:t,currentSrcID:null==(n=this[sy])?void 0:n.id}}))}#z=()=>{let e,t=this[sy];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[sE]=new Promise(async(n,l)=>{var i;this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let a=await fetch(t.play_url,{headers:e});if(!a.ok){this.#P(a8.DownloadError,"res loader"),l();return}if(this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...st.$,detail:{code:1,type:"success",currentSrcID:t.id}})),null==(i=a.headers.get("content-type"))?void 0:i.toLowerCase().startsWith("text/html")){this.#P(a8.PlayerPlaybackError,"player"),l();return}let s=await a.blob(),o=URL.createObjectURL(s);this.#M(o),n()}),this[sE].catch(()=>{})}};play(){var e,t;return this[sE]||this.#z(),null==(e=this[sE])||e.then(()=>{let e=this.#R();e.currentTime=0;try{e.play().catch(()=>{this.#P(a8.PlayerPlaybackError,"player")})}catch{this.#P(a8.PlayerPlaybackError,"player")}},()=>{}),{currentSrcID:null==(t=this[sy])?void 0:t.id,loadingSrcID:""}}stop(){var e,t;let n=this.#R(),l=sw.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...st.$,detail:{code:null==l?void 0:l.code,type:null==l?void 0:l.type,currentSrcID:null==(e=this[sy])?void 0:e.id}})),n.currentTime=0,n.pause(),{currentSrcID:null==(t=this[sy])?void 0:t.id}}pause(){var e;return this.#R().pause(),{currentSrcID:null==(e=this[sy])?void 0:e.id}}resume(){var e;return this.#R().play(),{currentSrcID:null==(e=this[sy])?void 0:e.id,loadingSrcID:""}}seek(e){var t,n;return this.#R().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...st.$,detail:{seekresult:1,currentSrcID:null==(t=this[sy])?void 0:t.id}})),{currentSrcID:null==(n=this[sy])?void 0:n.id}}mute(e){var t;return this.#R().muted=e.mute,{currentSrcID:null==(t=this[sy])?void 0:t.id}}playerInfo(){var e,t;let n=this.#R(),l=n.buffered,i=l.end(l.length-1);return{currentSrcID:null==(e=this[sy])?void 0:e.id,duration:1e3*n.duration,playbackState:(t=n)?t.paused?2*!t.ended:t.currentTime>0?1:3:-1,currentTime:n.currentTime,cacheTime:i}}prepare(){this[sE]||this.#z()}setVolume(e){return this.#R().volume=e.volume,{code:1}}};let sC=(ei=[],ea=[],es=[],eo=[],er=[],ed=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;et=[(0,a6._y)("name",!0)],en=[(0,a6._y)("height",!0)],el=[(0,a6._y)("width",!0)],(0,a9.G4)(null,null,et,{kind:"field",name:"handleName",static:!1,private:!1,access:{has:e=>"handleName"in e,get:e=>e.handleName,set:(e,t)=>{e.handleName=t}},metadata:e},ei,ea),(0,a9.G4)(null,null,en,{kind:"field",name:"handleHeight",static:!1,private:!1,access:{has:e=>"handleHeight"in e,get:e=>e.handleHeight,set:(e,t)=>{e.handleHeight=t}},metadata:e},es,eo),(0,a9.G4)(null,null,el,{kind:"field",name:"handleWidth",static:!1,private:!1,access:{has:e=>"handleWidth"in e,get:e=>e.handleWidth,set:(e,t)=>{e.handleWidth=t}},metadata:e},er,ed),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["name","height","width"];#n;#N;#H=(0,a6.Ut)(()=>this.#n.shadowRoot,"#canvas");constructor(e){this.#n=e}handleName=(0,a9.zF)(this,ei,(0,a6.H$)(this.#H,"name"));handleHeight=((0,a9.zF)(this,ea),(0,a9.zF)(this,es,(0,a6.H$)(this.#H,"height")));handleWidth=((0,a9.zF)(this,eo),(0,a9.zF)(this,er,(0,a6.H$)(this.#H,"width")));#D=((0,a9.zF)(this,ed),e=>{let{contentRect:t}=e[0],n=this.#n.shadowRoot.firstElementChild;if(n){let{height:e,width:l}=t;e*=window.devicePixelRatio,l*=window.devicePixelRatio;let i=new CustomEvent("resize",{...st.$,detail:{height:e,width:l}});i.height=e,i.width=l,n.dispatchEvent(i)}});#G(){this.#N||(this.#N=new ResizeObserver(this.#D),this.#N.observe(this.#n))}#j(){var e;null==(e=this.#N)||e.disconnect(),this.#N=void 0}connectedCallback(){this.#G()}dispose(){this.#j()}});eu=[(0,a6.uA)("x-canvas",[a5.O,sC],(0,a6.qy)`<canvas id="canvas" part="canvas"></canvas>`)],em=[],ep=HTMLElement,class extends ep{static #e=ec=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ep[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eh={value:ec},eu,{kind:"class",name:ec.name,metadata:e},null,em),ec=eh.value,e&&Object.defineProperty(ec,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ec,em)})()};let sT=(eg=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ev=[(0,a6._y)("granularity",!0)],eb=[(0,a6.ZR)("offset")],(0,a9.G4)(this,null,ev,{kind:"method",name:"_handleGranularity",static:!1,private:!1,access:{has:e=>"_handleGranularity"in e,get:e=>e._handleGranularity},metadata:e},null,eg),(0,a9.G4)(this,null,eb,{kind:"method",name:"_enableOffsetEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetEvent"in e,get:e=>e._enableOffsetEvent},metadata:e},null,eg),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,eg);#$=.01;#V=0;constructor(e){this.#n=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#$=parseFloat(e):this.#$=.01}_enableOffsetEvent(e){e?this.#n.addEventListener("scroll",this.#v,{passive:!0}):this.#n.removeEventListener("scroll",this.#v)}#v=()=>{let e=this.#n.scrollTop;(Math.abs(this.#V-e)>this.#$||0===this.#n.scrollTop||1>=Math.abs(this.#n.scrollHeight-this.#n.clientHeight-this.#n.scrollTop))&&(this.#V=e,this.#n.dispatchEvent(new CustomEvent("offset",{...st.$,detail:{offset:e,height:this.#n[sx]}})))}}),sx=Symbol("scrollableLength"),sk=Symbol("isHeaderShowing"),sO=Symbol("resizeObserver"),sL=Symbol("slotKid");eE=[(0,a6.uA)("x-foldview-ng",[sf,a5.O,sT])],eS=[],ew=HTMLElement,class extends ew{static #e=ey=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ew[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ef={value:ey},eE,{kind:"class",name:ey.name,metadata:e},null,eS),ey=ef.value,e&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["scroll-enable"]);[sL];[sO]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#W=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#U=t.contentRect.height);this[sL]&&(this[sL].style.top=`${this.#W-this.#U}px`)});#W=0;#U=0;get[sx](){return this.#W-this.#U}get[sk](){return this[sx]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[sx]?e=this[sx]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:n=!0}=e,l=parseFloat(t);this.scrollTo({top:Math.min(Math.max(l,0),this[sx]),behavior:n?"smooth":"instant"})}get[sl.l](){return this}disconnectedCallback(){var e;null==(e=this[sO])||e.disconnect(),this[sO]=void 0}static #C=(0,a9.zF)(ey,eS)};let sA=(e,t)=>{let n=e.parentElement;if((null==n?void 0:n.tagName)==="LYNX-WRAPPER"&&(n=n.parentElement),(null==n?void 0:n.tagName)===t)return n};eT=[(0,a6.uA)("x-foldview-header-ng",[sf,a5.O])],ex=[],ek=HTMLElement,(class extends ek{static #e=eC=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ek[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e_={value:eC},eT,{kind:"class",name:eC.name,metadata:e},null,ex),eC=e_.value,e&&Object.defineProperty(eC,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eC,ex)})();#B=void 0;connectedCallback(){var e;let t=sA(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sO],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}}),eA=[(0,a6.uA)("x-foldview-slot-drag-ng",[sf,a5.O])],eI=[],eF=HTMLElement,(class extends eF{static #e=eL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eO={value:eL},eA,{kind:"class",name:eL.name,metadata:e},null,eI),eL=eO.value,e&&Object.defineProperty(eL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eL,eI)})()}),n(74678),n(55910),n(76691),n(72919),n(37891),n(49678);eP=[(0,a6.uA)("x-foldview-slot-ng",[sf,a5.O,class e{#X=0;#Z=new WeakMap;#q;#Y=0;#J=0;#K=null;#Q;#ee=0;#n;static observedAttributes=[];constructor(e){this.#n=e,this.#n.addEventListener("touchmove",this.#et,{passive:!1}),this.#n.addEventListener("touchstart",this.#en,{passive:!0}),this.#n.addEventListener("touchend",this.#el,{passive:!0}),this.#n.addEventListener("wheel",this.#ei,{passive:!1})}#ea(e){let t=e[sl.l];return t instanceof Element?t:e}#es(e){return[...new Set(e.map(e=>this.#ea(e)))]}#eo(e){let t;if("function"==typeof e.computedStyleMap)try{var n;t=(null==(n=e.computedStyleMap().get("overflow-y"))?void 0:n.toString())??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#er(e){var t;return null==(t=this.#q)?void 0:t.find(t=>{if(this.#eo(t)&&t.scrollHeight>t.clientHeight){let n=e<0&&0!==t.scrollTop,l=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return n||l}return!1})}#ed(e,t){let n=this.#Z.get(e)??0;n+=t,this.#Z.set(e,n),e.scrollTop=n}#et=e=>{let t=this.#eh();if(!t)return;let{pageY:n,pageX:l}=e.touches.item(0),i=this.#Y-n;if(null===this.#K){let e=this.#J-l;this.#K=Math.abs(i)>Math.abs(e)}!1!==this.#K&&(e.cancelable&&e.preventDefault(),this.#ec(i,t),this.#Y=n,this.#J=l)};#ei=e=>{let t=this.#eh();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let n=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),{clientX:l,clientY:i}=e,a=document.elementsFromPoint(l,i).filter(e=>this.#n.contains(e));if(this.#q=this.#es([...n,...a]),this.#X=t.scrollTop,this.#q)for(let e of this.#q)this.#Z.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#ec(e.deltaY,t)};#eh(){let e=this.#n.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#en=e=>{var t;let{pageX:n,pageY:l,clientX:i,clientY:a}=e.touches.item(0),s=e.composedPath().filter(e=>e instanceof Element&&this.#n.contains(e)&&e!==this.#n),o=document.elementsFromPoint(i,a).filter(e=>this.#n.contains(e)&&e!==this.#n);for(let e of(this.#q=this.#es([...s,...o]),this.#Y=l,this.#J=n,this.#X=(null==(t=this.#eh())?void 0:t.scrollTop)??0,this.#q))this.#Z.set(e,e.scrollTop);this.#K=null,this.#Q=void 0};#el=()=>{if(this.#K=null,this.#Q){let e=this.#eh();(this.#Q!==e||e[sk])&&this.#Q.scrollBy({top:4*this.#ee,behavior:"smooth"})}};#ec(e,t){let n=this.#er(e);t[sk]&&e>0||e<0&&!n||!t[sk]&&!n?(t.scrollBy({top:e,behavior:"smooth"}),this.#X+=e,t.scrollTop=this.#X,this.#Q=t):n&&(this.#Q=n,this.#ed(n,e)),this.#ee=e}}])],ez=[],eN=HTMLElement,(class extends eN{static #e=eM=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(eN[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eR={value:eM},eP,{kind:"class",name:eM.name,metadata:e},null,ez),eM=eR.value,e&&Object.defineProperty(eM,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eM,ez)})();connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[sL]=this)}}),eG=[(0,a6.uA)("x-foldview-toolbar-ng",[sf,a5.O])],ej=[],e$=HTMLElement,class extends e${static #e=eD=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(e$[Symbol.metadata]??null):void 0;(0,a9.G4)(null,eH={value:eD},eG,{kind:"class",name:eD.name,metadata:e},null,ej),eD=eH.value,e&&Object.defineProperty(eD,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(eD,ej)})();#B=void 0;connectedCallback(){var e;let t=sA(this,"X-FOLDVIEW-NG");this.#B=null==t?void 0:t[sO],null==(e=this.#B)||e.observe(this)}dispose(){var e;null==(e=this.#B)||e.unobserve(this)}};let sI=(eW=[],eU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eV=[(0,a6._y)("drop-shadow",!0)],(0,a9.G4)(null,null,eV,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},eW,eU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["drop-shadow"];#n;#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleBlurRadius=(0,a9.zF)(this,eW,(0,a6._8)(this.#eu,"--drop-shadow",void 0,!0));constructor(e){(0,a9.zF)(this,eU),this.#n=e}}),sF=(eJ=[],eK=[],eQ=[],e0=[],e1=[],e4=[],e2=[],e3=[],e8=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;eB=[(0,a6._y)("src",!0)],eX=[(0,a6._y)("placeholder",!0)],eZ=[(0,a6._y)("blur-radius",!0)],eq=[(0,a6._y)("crossorigin",!0)],eY=[(0,a6._y)("referrerpolicy",!0)],(0,a9.G4)(this,null,eX,{kind:"method",name:"_preloadPlaceholder",static:!1,private:!1,access:{has:e=>"_preloadPlaceholder"in e,get:e=>e._preloadPlaceholder},metadata:e},null,eJ),(0,a9.G4)(null,null,eB,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},eK,eQ),(0,a9.G4)(null,null,eZ,{kind:"field",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius,set:(e,t)=>{e._handleBlurRadius=t}},metadata:e},e0,e1),(0,a9.G4)(null,null,eq,{kind:"field",name:"_handleCrossorigin",static:!1,private:!1,access:{has:e=>"_handleCrossorigin"in e,get:e=>e._handleCrossorigin,set:(e,t)=>{e._handleCrossorigin=t}},metadata:e},e4,e2),(0,a9.G4)(null,null,eY,{kind:"field",name:"_handleReferrerpolicy",static:!1,private:!1,access:{has:e=>"_handleReferrerpolicy"in e,get:e=>e._handleReferrerpolicy,set:(e,t)=>{e._handleReferrerpolicy=t}},metadata:e},e3,e8),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#n=(0,a9.zF)(this,eJ);#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc=(0,a9.zF)(this,eK,(0,a6.H$)(this.#eu,"src",e=>{var t,n,l;let i=e||this.#n.getAttribute("placeholder");return i?(null==(l=this.#n.getRootNode())||null==(n=l.host)||null==(t=n.resolveResource)?void 0:t.call(n,i))??i:i}));_preloadPlaceholder(e){if(e){var t,n,l;new Image().src=(null==(l=this.#n.getRootNode())||null==(n=l.host)||null==(t=n.resolveResource)?void 0:t.call(n,e))??e}}_handleBlurRadius=((0,a9.zF)(this,eQ),(0,a9.zF)(this,e0,(0,a6._8)(this.#eu,"--blur-radius",void 0,!0)));_handleCrossorigin=((0,a9.zF)(this,e1),(0,a9.zF)(this,e4,(0,a6.H$)(this.#eu,"crossorigin")));_handleReferrerpolicy=((0,a9.zF)(this,e2),(0,a9.zF)(this,e3,(0,a6.H$)(this.#eu,"referrerpolicy")));#em=((0,a9.zF)(this,e8),()=>{var e,t,n;let l=this.#eu().src,i=this.#n.getAttribute("placeholder"),a=i?(null==(n=this.#n.getRootNode())||null==(t=n.host)||null==(e=t.resolveResource)?void 0:e.call(t,i))??i:i;a&&l!==a&&(this.#eu().src=a)});constructor(e){this.#n=e,this.#eu().addEventListener("error",this.#em)}connectedCallback(){this._handleSrc(this.#n.getAttribute("src")),this._preloadPlaceholder(this.#n.getAttribute("placeholder"))}}),sR=(e5=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e9=[(0,a6.ZR)("load")],e6=[(0,a6.ZR)("error")],(0,a9.G4)(this,null,e9,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,e5),(0,a9.G4)(this,null,e6,{kind:"method",name:"_enableErrorEvent",static:!1,private:!1,access:{has:e=>"_enableErrorEvent"in e,get:e=>e._enableErrorEvent},metadata:e},null,e5),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,e5);#ep=[];#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):(this.#eu().removeEventListener("load",this.#ev),this.#ep=[])}_enableErrorEvent(e){e?this.#eu().addEventListener("error",this.#eb,{passive:!0}):this.#eu().removeEventListener("error",this.#eb)}#ev=()=>{let e=new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}});this.#n.isConnected?this.#n.dispatchEvent(e):this.#ep.push(e)};connectedCallback(){for(;this.#n.isConnected&&this.#ep.length;)this.#n.dispatchEvent(this.#ep.shift())}#eb=()=>{this.#n.dispatchEvent(new CustomEvent("error",{...st.$,detail:{}}))};constructor(e){this.#n=e}});tt=[(0,a6.uA)("filter-image",[a5.O,sF,sI,sR],sr({}))],tn=[],tl=HTMLElement,(class extends tl{static #e=te=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,e7={value:te},tt,{kind:"class",name:te.name,metadata:e},null,tn),te=e7.value,e&&Object.defineProperty(te,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(te,tn)})()}),ts=[(0,a6.uA)("x-image",[a5.O,sF,sR],sr({}))],to=[],tr=HTMLElement,class extends tr{static #e=ta=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(tr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ti={value:ta},ts,{kind:"class",name:ta.name,metadata:e},null,to),ta=ti.value,e&&Object.defineProperty(ta,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ta,to)})()};let sM=(tp=[],tv=[],tb=[],tg=[],tf=[],ty=[],tE=[],tS=[],tw=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;td=[(0,a6._y)("confirm-type",!0)],th=[(0,a6._y)("maxlength",!0)],tc=[(0,a6._y)("readonly",!0)],tu=[(0,a6._y)("type",!0)],tm=[(0,a6._y)("ios-spell-check",!0),(0,a6._y)("spell-check",!0)],(0,a9.G4)(this,null,tu,{kind:"method",name:"_handleType",static:!1,private:!1,access:{has:e=>"_handleType"in e,get:e=>e._handleType},metadata:e},null,tp),(0,a9.G4)(null,null,td,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},tv,tb),(0,a9.G4)(null,null,th,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},tg,tf),(0,a9.G4)(null,null,tc,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},ty,tE),(0,a9.G4)(null,null,tm,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},tS,tw),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#n=(0,a9.zF)(this,tp);#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handlerConfirmType=(0,a9.zF)(this,tv,(0,a6.H$)(this.#eg,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,tb),(0,a9.zF)(this,tg,(0,a6.H$)(this.#eg,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,tf),(0,a9.zF)(this,ty,(0,a6.H$)(this.#eg,"readonly",e=>null!==e?"":null)));#ef=((0,a9.zF)(this,tE),(0,a6.H$)(this.#eg,"type"));#ey=(0,a6.H$)(this.#eg,"inputmode");_handleType(e){let t="text",n="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":n=e,this.#ey(t),this.#ef(n)}_handleSpellCheck=(0,a9.zF)(this,tS,(0,a6.H$)(this.#eg,"spellcheck",e=>null===e?"false":"true"));constructor(e){(0,a9.zF)(this,tw),this.#n=e}}),sP=(tO=[],tL=[],tA=[],tI=[],tF=[],tR=[],tM=[],tP=[],tz=[],tN=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t_=[(0,a6._y)("placeholder",!0)],tC=[(0,a6._y)("placeholder-color",!0)],tT=[(0,a6._y)("placeholder-font-family",!0)],tx=[(0,a6._y)("placeholder-font-size",!0)],tk=[(0,a6._y)("placeholder-font-weight",!0)],(0,a9.G4)(null,null,t_,{kind:"field",name:"_handlerPlaceholder",static:!1,private:!1,access:{has:e=>"_handlerPlaceholder"in e,get:e=>e._handlerPlaceholder,set:(e,t)=>{e._handlerPlaceholder=t}},metadata:e},tO,tL),(0,a9.G4)(null,null,tC,{kind:"field",name:"_handlerPlaceholderColor",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderColor"in e,get:e=>e._handlerPlaceholderColor,set:(e,t)=>{e._handlerPlaceholderColor=t}},metadata:e},tA,tI),(0,a9.G4)(null,null,tT,{kind:"field",name:"_handlerPlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontFamily"in e,get:e=>e._handlerPlaceholderFontFamily,set:(e,t)=>{e._handlerPlaceholderFontFamily=t}},metadata:e},tF,tR),(0,a9.G4)(null,null,tx,{kind:"field",name:"_handlerPlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontSize"in e,get:e=>e._handlerPlaceholderFontSize,set:(e,t)=>{e._handlerPlaceholderFontSize=t}},metadata:e},tM,tP),(0,a9.G4)(null,null,tk,{kind:"field",name:"_handlerPlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_handlerPlaceholderFontWeight"in e,get:e=>e._handlerPlaceholderFontWeight,set:(e,t)=>{e._handlerPlaceholderFontWeight=t}},metadata:e},tz,tN),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#n;#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handlerPlaceholder=(0,a9.zF)(this,tO,(0,a6.H$)(this.#eg,"placeholder"));_handlerPlaceholderColor=((0,a9.zF)(this,tL),(0,a9.zF)(this,tA,(0,a6._8)(this.#eg,"--placeholder-color",void 0,!0)));_handlerPlaceholderFontFamily=((0,a9.zF)(this,tI),(0,a9.zF)(this,tF,(0,a6._8)(this.#eg,"--placeholder-font-family",void 0,!0)));_handlerPlaceholderFontSize=((0,a9.zF)(this,tR),(0,a9.zF)(this,tM,(0,a6._8)(this.#eg,"--placeholder-font-size",void 0,!0)));_handlerPlaceholderFontWeight=((0,a9.zF)(this,tP),(0,a9.zF)(this,tz,(0,a6._8)(this.#eg,"--placeholder-font-weight",void 0,!0)));constructor(e){(0,a9.zF)(this,tN),this.#n=e}}),sz=(tj=[],t$=[],tV=[],tW=[],tU=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tH=[(0,a6._y)("value",!1)],tD=[(0,a6._y)("disabled",!0)],tG=[(0,a6._y)("autocomplete",!0)],(0,a9.G4)(this,null,tH,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,tj),(0,a9.G4)(null,null,tD,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},t$,tV),(0,a9.G4)(null,null,tG,{kind:"field",name:"_handleAutocomplete",static:!1,private:!1,access:{has:e=>"_handleAutocomplete"in e,get:e=>e._handleAutocomplete,set:(e,t)=>{e._handleAutocomplete=t}},metadata:e},tW,tU),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["value","disabled","autocomplete"];#n=(0,a9.zF)(this,tj);#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#eg();t.value!==e&&(t.value=e)}_handleDisabled=(0,a9.zF)(this,t$,(0,a6.H$)(this.#eg,"disabled",e=>null!==e?"":null));_handleAutocomplete=((0,a9.zF)(this,tV),(0,a9.zF)(this,tW,(0,a6.H$)(this.#eg,"autocomplete")));constructor(e){(0,a9.zF)(this,tU),this.#n=e}}),sN={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"},sH=(tq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;tB=[(0,a6._y)("input-filter",!0),(0,a6.ZR)("lynxinput")],tX=[(0,a6._y)("send-composing-input",!0)],tZ=[(0,a6.ZR)("selection")],(0,a9.G4)(this,null,tB,{kind:"method",name:"_handleEnableInputEvent",static:!1,private:!1,access:{has:e=>"_handleEnableInputEvent"in e,get:e=>e._handleEnableInputEvent},metadata:e},null,tq),(0,a9.G4)(this,null,tX,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,tq),(0,a9.G4)(this,null,tZ,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,tq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,tq);#eE=!1;#eS=/[^0-9.]|\.(?=.*\.)/g;#eg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#input");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#eg();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sN[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#eg().value}}))};#e_=e=>{let t=this.#eg(),n=this.#ex(t.value),l=e.isComposing;t.value=n,(!l||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:t.selectionStart,isComposing:l,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#eg(),t=this.#ex(e.value);e.value=t,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ex(e){let t=e;"number"===this.#n.getAttribute("type")&&(t=t.replace(this.#eS,""));let n=this.#n.getAttribute("input-filter");return n&&(t=t.replace(RegExp(n,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#eg().addEventListener("select",this.#ek,{passive:!0}):this.#eg().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#eg();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#eg()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#eg(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});tK=[(0,a6.uA)("x-input",[a5.O,sP,sz,sM,sH],sd)],tQ=[],t0=HTMLElement,class extends t0{static #e=tJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,tY={value:tJ},tK,{kind:"class",name:tJ.name,metadata:e},null,tQ),tJ=tY.value,e&&Object.defineProperty(tJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(tJ,tQ)})();#eL=(0,a6.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,n=this.#eL(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,n=this.#eL();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#eL();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#eL();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}setInputFilter(e){this.#eL().setAttribute("pattern",e.pattern)}select(){let e=this.#eL();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#eL().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#eL().focus(e)}blur(){this.#eL().blur()}connectedCallback(){let e=this.#eL();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}};let sD=(t2=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t1=[(0,a6._y)("events-pass-through",!0)],t4=[(0,a6._y)("visible",!1)],(0,a9.G4)(this,null,t1,{kind:"method",name:"_handleEventsPassThrough",static:!1,private:!1,access:{has:e=>"_handleEventsPassThrough"in e,get:e=>e._handleEventsPassThrough},metadata:e},null,t2),(0,a9.G4)(this,null,t4,{kind:"method",name:"_handleVisible",static:!1,private:!1,access:{has:e=>"_handleVisible"in e,get:e=>e._handleVisible},metadata:e},null,t2),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["visible","events-pass-through"];#n=(0,a9.zF)(this,t2);#eA=!!window.HTMLDialogElement;#eI=!1;constructor(e){this.#n=e}#eF=(0,a6.Ut)(()=>this.#n.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eF().addEventListener("click",this.#eR,{passive:!1}),this.#n.addEventListener("click",this.#eR,{passive:!1})):(this.#eF().removeEventListener("click",this.#eR),this.#n.removeEventListener("click",this.#eR))}_handleVisible(e){this.#eI=null!==e,this.#eA&&(this.#eI?(this.#eF().showModal(),this.#n.dispatchEvent(new CustomEvent("showoverlay",st.$))):(this.#eF().close(),this.#n.dispatchEvent(new CustomEvent("dismissoverlay",st.$))))}#eR=e=>{e.stopPropagation();let t=this.#eF();if(e.target===this.#n||e.target===t){t.close();let{clientX:n,clientY:l}=e,i=document.elementFromPoint(n,l);(null==i?void 0:i.tagName)==="LYNX-VIEW"&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(n,l)??i),null==i||i.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eI&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eA||(this.#eF().style.display="none")}});t9=[(0,a6.uA)("x-overlay-ng",[a5.O,sD],sc)],t6=[],t5=HTMLElement,(class extends t5{static #e=t8=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(t5[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t3={value:t8},t9,{kind:"class",name:t8.name,metadata:e},null,t6),t8=t3.value,e&&Object.defineProperty(t8,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(t8,t6)})();get[a5.v](){return this.shadowRoot.firstElementChild}}),n(84086);class sG extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(sG.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class sj{#n;static observedAttributes=[];#eM;constructor(e){this.#n=e}connectedCallback(){if(IntersectionObserver&&!this.#eM){let e=this.#n.parentElement;e&&(this.#eM=new IntersectionObserver(e=>{let t=!1,n=!1;e.forEach(e=>{t=e.intersectionRatio>0,n=e.intersectionRatio>.9}),this.#n.dispatchEvent(new sG(t,n)),n&&this.#n.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eM.observe(this.#n))}}dispose(){this.#eM&&(this.#eM.disconnect(),this.#eM=void 0)}}nt=[(0,a6.uA)("x-refresh-footer",[sf,a5.O,sj])],nn=[],nl=HTMLElement,(class extends nl{static #e=ne=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nl[Symbol.metadata]??null):void 0;(0,a9.G4)(null,t7={value:ne},nt,{kind:"class",name:ne.name,metadata:e},null,nn),ne=t7.value,e&&Object.defineProperty(ne,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ne,nn)})();connectedCallback(){this.setAttribute("slot","footer")}}),ns=[(0,a6.uA)("x-refresh-header",[sf,a5.O,sj])],no=[],nr=HTMLElement,class extends nr{static #e=na=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nr[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ni={value:na},ns,{kind:"class",name:na.name,metadata:e},null,no),na=ni.value,e&&Object.defineProperty(na,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(na,no)})();connectedCallback(){this.setAttribute("slot","header")}};let s$=(nc=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nd=[(0,a6.ZR)("headeroffset"),(0,a6.ZR)("headershow"),(0,a6.ZR)("footeroffset")],nh=[(0,a6.ZR)("startrefresh"),(0,a6.ZR)("headerreleased"),(0,a6.ZR)("startloadmore"),(0,a6.ZR)("footerreleased")],(0,a9.G4)(this,null,nd,{kind:"method",name:"_handleComplexEventEnableAttributes",static:!1,private:!1,access:{has:e=>"_handleComplexEventEnableAttributes"in e,get:e=>e._handleComplexEventEnableAttributes},metadata:e},null,nc),(0,a9.G4)(this,null,nh,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,nc),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();#n=(0,a9.zF)(this,nc);static observedAttributes=[];#eP=(0,a6.Ut)(()=>this.#n,"x-refresh-view > x-refresh-header:first-of-type");#ez=(0,a6.Ut)(()=>this.#n,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#n=e,this.#n.addEventListener(sG.EventName,this.#eN)}#eH={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eH[t]=e;let{headeroffset:n,headershow:l,footeroffset:i}=this.#eH;n||l||i?this.#eD():this.#eG()}_handleXEnableHeaderOffsetEvent(e,t){this.#eH[t]=e;let{startrefresh:n,headerreleased:l,startloadmore:i,footerreleased:a}=this.#eH;l||a||i||n?this.#ej():this.#e$()}#eV=!1;#eW=!1;#eU=!1;#eB=!1;#eN=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eV=e.startShowing,this.#eW=e.fullyShowing):(this.#eU=e.startShowing,this.#eB=e.fullyShowing)};#eX=!1;#ej(){this.#eX||(this.#n.addEventListener("touchend",this.#eZ),this.#eX=!0)}#eZ=()=>{this.#eW?(this.#n.dispatchEvent(new CustomEvent("headerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startrefresh",{...st.$,detail:{isManual:this.#n._nextRefreshIsManual}})),this.#n._nextRefreshIsManual=!0):("true"===this.#n.getAttribute("enable-auto-loadmore")&&this.#eU||this.#eB)&&(this.#n.dispatchEvent(new CustomEvent("footerreleased",st.$)),this.#n.dispatchEvent(new CustomEvent("startloadmore",st.$)))};#e$(){this.#eX&&this.#n.removeEventListener("touchend",this.#eZ)}#eq=!1;#eY=!1;#eD(){this.#eY||(this.#n.addEventListener("touchstart",this.#eJ),this.#n.addEventListener("touchend",this.#eK),this.#n.addEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").addEventListener("scroll",this.#v))}#eK=()=>{this.#eq=!1};#eJ=()=>{this.#eq=!0};#v=()=>{if(this.#eV&&(this.#eH.headershow||this.#eH.headeroffset)){let e=this.#eP();if(e){let t=parseFloat(getComputedStyle(e).height),n=this.#n.shadowRoot.querySelector("#container").scrollTop;this.#n.dispatchEvent(new CustomEvent("headershow",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}})),this.#n.dispatchEvent(new CustomEvent("headeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-n/t}}))}}else if(this.#eU&&this.#eH.footeroffset){let e=this.#ez();if(e){let t=this.#n.shadowRoot.querySelector("#container").scrollTop,n=parseFloat(getComputedStyle(e).height);this.#n.dispatchEvent(new CustomEvent("footeroffset",{...st.$,detail:{isDragging:this.#eq,offsetPercent:1-t/n}}))}}};#eG(){this.#eY&&(this.#n.removeEventListener("touchstart",this.#eJ),this.#n.removeEventListener("touchend",this.#eK),this.#n.removeEventListener("touchcancel",this.#eK),this.#n.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#v))}dispose(){this.#e$(),this.#eG()}});np=[(0,a6.uA)("x-refresh-view",[sf,a5.O,s$],su)],nv=[],nb=HTMLElement,class extends nb{static #e=nm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nu={value:nm},np,{kind:"class",name:nm.name,metadata:e},null,nv),nm=nu.value,e&&Object.defineProperty(nm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.removeAttribute("x-magnet-enable")}finishLoadMore(){var e;null==(e=this.querySelector("x-refresh-view > x-refresh-footer:first-of-type"))||e.removeAttribute("x-magnet-enable")}autoStartRefresh(){var e;let t=this.shadowRoot.querySelector("#container");null==(e=this.querySelector("x-refresh-view > x-refresh-header:first-of-type"))||e.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,t.scroll({top:0,behavior:"smooth"})}#eQ=(0,a6.Ut)(()=>this.shadowRoot,"#container");#e0=(0,a6.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eQ(),t=this.#e0();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eQ(),n=this.#e0();e>0?n.scrollTop=e:t.scrollTop=n.offsetTop+e}get scrollHeight(){return this.#e0().scrollHeight}get[sl.l](){return this}static #C=(0,a9.zF)(nm,nv)};let sV=(nE=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ng=[(0,a6._y)("src",!0)],nf=[(0,a6._y)("content",!0)],ny=[(0,a6.ZR)("load")],(0,a9.G4)(this,null,ng,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,nE),(0,a9.G4)(this,null,nf,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,nE),(0,a9.G4)(this,null,ny,{kind:"method",name:"_enableLoadEvent",static:!1,private:!1,access:{has:e=>"_enableLoadEvent"in e,get:e=>e._enableLoadEvent},metadata:e},null,nE),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","content"];#n=(0,a9.zF)(this,nE);#e1=null;#eu=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#eu().src=e:this.#eu().src=""}_handleContent(e){if(this.#e1&&URL.revokeObjectURL(this.#e1),!e){this.#e1="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),n=URL.createObjectURL(t);this.#e1=n,this.#eu().src=n}_enableLoadEvent(e){e?this.#eu().addEventListener("load",this.#ev,{passive:!0}):this.#eu().removeEventListener("load",this.#ev)}#ev=()=>{this.#n.dispatchEvent(new CustomEvent("load",{...st.$,detail:{width:this.#eu().naturalWidth,height:this.#eu().naturalHeight}}))};constructor(e){this.#n=e}});n_=[(0,a6.uA)("x-svg",[a5.O,sV],'<img part="img" alt="" loading="lazy" id="img" /> ')],nC=[],nT=HTMLElement,(class extends nT{static #e=nw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nS={value:nw},n_,{kind:"class",name:nw.name,metadata:e},null,nC),nw=nS.value,e&&Object.defineProperty(nw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nw,nC)})()}),nO=[(0,a6.uA)("x-swiper-item",[sf,a5.O])],nL=[],nA=HTMLElement,class extends nA{static #e=nk=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(nA[Symbol.metadata]??null):void 0;(0,a9.G4)(null,nx={value:nk},nO,{kind:"class",name:nk.name,metadata:e},null,nL),nk=nx.value,e&&Object.defineProperty(nk,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(nk,nL)})()};let sW=(nR=[],nM=[],nP=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nI=[(0,a6.ZR)("transition")],nF=[(0,a6.ZR)("scrollstart"),(0,a6.ZR)("lynxscrollend"),(0,a6.ZR)("change"),(0,a6.ZR)("change-event-for-indicator")],(0,a9.G4)(this,null,nF,{kind:"method",name:"_enableScrollEventProcessor",static:!1,private:!1,access:{has:e=>"_enableScrollEventProcessor"in e,get:e=>e._enableScrollEventProcessor},metadata:e},null,nR),(0,a9.G4)(null,null,nI,{kind:"field",name:"_handleEnableTransitionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableTransitionEvent"in e,get:e=>e._handleEnableTransitionEvent,set:(e,t)=>{e._handleEnableTransitionEvent=t}},metadata:e},nM,nP),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,nR);#e4=0;#e2=0;#eq=!1;#a;#e3=!1;constructor(e){this.#n=e}#e0=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=(0,a9.zF)(this,nM,(0,a6.LB)(this.#e0,"scroll",this.#e8,{passive:!0}));#v(){sl.k||(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#e3||(this.#n.dispatchEvent(new CustomEvent("scrollstart",{...st.$,detail:{current:this.#e4,isDragged:this.#eq}})),this.#e3=!0);let e=this.#e0(),t=this.#n.isVertical,n=t?e.scrollTop:e.scrollLeft,l=t?e.clientHeight:e.clientWidth,i=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#e2-n)>l/4||n<10||Math.abs(n-i)<=l){let e=this.#n.currentIndex;e!==this.#e4&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{current:e,isDragged:this.#eq}})),this.#e4=e),this.#e2=n}}#g(){this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$,detail:{current:this.#e4}})),this.#e3=!1}#e9(){this.#eq=!0}#e6(){this.#eq=!1}#e8(){this.#n.dispatchEvent(new CustomEvent("transition",{...st.$,detail:{dx:this.#e0().scrollLeft,dy:this.#e0().scrollTop}}))}#e5=((0,a9.zF)(this,nP),[(0,a6.LB)(this.#e0,"scroll",this.#v.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchstart",this.#e9.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchend",this.#e6.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"touchcancel",this.#e6.bind(this),{passive:!0}),(0,a6.LB)(this.#e0,"scrollend",this.#g.bind(this),{passive:!0})]);#eH={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eH[t]=e;let{lynxscrollend:n,scrollstart:l,change:i}=this.#eH,a=i||n||l||this.#eH["change-event-for-indicator"];this.#e5.forEach(e=>e(a))}connectedCallback(){this.#e4=parseFloat(this.#n.getAttribute("current")??"0");let e=this.#n.isVertical;this.#e2=e?this.#e0().scrollTop:this.#e0().scrollLeft}}),sU=(nH=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nz=[(0,a6._y)("current",!1)],nN=[(0,a6._y)("interval",!1),(0,a6._y)("autoplay",!1)],(0,a9.G4)(this,null,nz,{kind:"method",name:"_handleCurrentChange",static:!1,private:!1,access:{has:e=>"_handleCurrentChange"in e,get:e=>e._handleCurrentChange},metadata:e},null,nH),(0,a9.G4)(this,null,nN,{kind:"method",name:"_handleAutoplay",static:!1,private:!1,access:{has:e=>"_handleAutoplay"in e,get:e=>e._handleAutoplay},metadata:e},null,nH),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["current","interval","autoplay"];#n=(0,a9.zF)(this,nH);constructor(e){this.#n=e}#e7(){this.#n.currentIndex===this.#n.childElementCount-1?this.#n.circularPlay&&(this.#n.currentIndex=0):this.#n.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#n.currentIndex=t)}#te;#tt=(()=>{this.#e7()}).bind(this);#tn(e){this.#tl(),this.#te=setInterval(this.#tt,e)}#tl(){this.#te&&clearInterval(this.#te)}_handleAutoplay(){if(null!==this.#n.getAttribute("autoplay")){let e=this.#n.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#tn(t)}}dispose(){this.#tl()}}),sB=(nj=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;nD=[(0,a6._y)("circular",!1)],nG=[(0,a6._y)("vertical",!0)],(0,a9.G4)(this,null,nD,{kind:"method",name:"_handleCircular",static:!1,private:!1,access:{has:e=>"_handleCircular"in e,get:e=>e._handleCircular},metadata:e},null,nj),(0,a9.G4)(this,null,nG,{kind:"method",name:"_handleVerticalChange",static:!1,private:!1,access:{has:e=>"_handleVerticalChange"in e,get:e=>e._handleVerticalChange},metadata:e},null,nj),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["circular","vertical"];#n=(0,a9.zF)(this,nj);#ti=!1;#ta;#ts=0;#e0=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content").bind(this);constructor(e){this.#n=e}#to=(0,a6.Ut)(()=>this.#n.shadowRoot,"#circular-start").bind(this);#tr=(0,a6.Ut)(()=>this.#n.shadowRoot,"#circular-end").bind(this);#td(e){let t=this.#n.childElementCount;if(t>2){let{current:n,isDragged:l,__isFirstLayout:i}=e.detail;if(0===n||n===t-1||2===n||n===t-2){let e,a=this.#e0(),s=this.#to().assignedElements(),o=this.#tr().assignedElements(),r=this.#n.firstElementChild,d=this.#n.lastElementChild,h=this.#n.snapDistance;if(0===n?(o.forEach(e=>e.removeAttribute("slot")),d.setAttribute("slot","circular-start"),e=r):n===t-1?(s.forEach(e=>e.removeAttribute("slot")),r.setAttribute("slot","circular-end"),e=d):(s.forEach(e=>e.removeAttribute("slot")),o.forEach(e=>e.removeAttribute("slot")),e=this.#n.children[n]),this.#ti){let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientHeight/2:a.clientHeight/2;this.#ts=e.offsetTop+e.offsetHeight/2-h-t,a.scrollTop=this.#ts}else{let t="carousel"===this.#n.getAttribute("mode")?.8*a.clientWidth/2:a.clientWidth/2;this.#ts=e.offsetLeft+e.offsetWidth/2-h-t,a.scrollLeft=this.#ts}if(!l){let e=this.#n.getAttribute("mode");if(i&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#th(i?"instant":"smooth")}}}}#th(e){let t=this.#e0(),n=this.#n.snapDistance;t.scrollBy({top:this.#ti?n:0,left:this.#ti?0:n,behavior:e??"smooth"})}#e5=[(0,a6.LB)(()=>this.#n,"change",this.#td.bind(this),{passive:!0}),(0,a6.LB)(()=>this.#n,"touchmove",this.#tc.bind(this),{passive:!1}),(0,a6.LB)(()=>this.#n,"touchend",this.#tu.bind(this),{passive:!1}),(0,a6.LB)(()=>this.#n,"touchcancel",this.#tu.bind(this),{passive:!1})];_handleCircular(e){this.#e5.forEach(t=>t(null!=e)),null!==e&&this.#td({detail:{current:this.#n.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tc(e){let t=e.touches.item(0);if(t){let e=this.#ti?t.pageY:t.pageX;if(void 0!==this.#ta){this.#tm();let t=this.#ta-e;this.#ts+=t}this.#ta=e}}#tu(e){this.#tp(),this.#th(),this.#ta=void 0}_handleVerticalChange(e){this.#ti=null!==e}#tv;#tm(){if(!this.#tv){let e=this.#e0();this.#ts=this.#ti?e.scrollTop:e.scrollLeft,this.#tv=setInterval(()=>{this.#ti?e.scrollTop=this.#ts:e.scrollLeft=this.#ts},10)}}#tp(){this.#tv&&(clearInterval(this.#tv),this.#tv=void 0)}dispose(){this.#tp()}}),sX=(nX=[],nZ=[],nq=[],nY=[],nJ=[],nK=[],nQ=[],n0=[],n1=[],n4=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n$=[(0,a6._y)("indicator-color",!0)],nV=[(0,a6._y)("indicator-active-color",!0)],nW=[(0,a6._y)("page-margin",!0)],nU=[(0,a6._y)("previous-margin",!0)],nB=[(0,a6._y)("next-margin",!0)],(0,a9.G4)(null,null,n$,{kind:"field",name:"_handleIndicatorColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorColor"in e,get:e=>e._handleIndicatorColor,set:(e,t)=>{e._handleIndicatorColor=t}},metadata:e},nX,nZ),(0,a9.G4)(null,null,nV,{kind:"field",name:"_handleIndicatorActiveColor",static:!1,private:!1,access:{has:e=>"_handleIndicatorActiveColor"in e,get:e=>e._handleIndicatorActiveColor,set:(e,t)=>{e._handleIndicatorActiveColor=t}},metadata:e},nq,nY),(0,a9.G4)(null,null,nW,{kind:"field",name:"_handlePageMargin",static:!1,private:!1,access:{has:e=>"_handlePageMargin"in e,get:e=>e._handlePageMargin,set:(e,t)=>{e._handlePageMargin=t}},metadata:e},nJ,nK),(0,a9.G4)(null,null,nU,{kind:"field",name:"_handlePreviousMargin",static:!1,private:!1,access:{has:e=>"_handlePreviousMargin"in e,get:e=>e._handlePreviousMargin,set:(e,t)=>{e._handlePreviousMargin=t}},metadata:e},nQ,n0),(0,a9.G4)(null,null,nB,{kind:"field",name:"_handleNextMargin",static:!1,private:!1,access:{has:e=>"_handleNextMargin"in e,get:e=>e._handleNextMargin,set:(e,t)=>{e._handleNextMargin=t}},metadata:e},n1,n4),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#n;#tb=0;#tg=(0,a6.Ut)(()=>this.#n.shadowRoot,"#indicator-container");#tf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#indicator-style");#ty;constructor(e){(0,a9.zF)(this,n4),this.#n=e}_handleIndicatorColor=(0,a9.zF)(this,nX,(0,a6._8)(this.#tg,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=((0,a9.zF)(this,nZ),(0,a9.zF)(this,nq,(0,a6._8)(this.#tg,"--indicator-active-color",void 0,!0)));_handlePageMargin=((0,a9.zF)(this,nY),(0,a9.zF)(this,nJ,(0,a6._8)(this.#tg,"--page-margin",void 0,!0)));_handlePreviousMargin=((0,a9.zF)(this,nK),(0,a9.zF)(this,nQ,(0,a6._8)(this.#tg,"--previous-margin",void 0,!0)));_handleNextMargin=((0,a9.zF)(this,n0),(0,a9.zF)(this,n1,(0,a6._8)(this.#tg,"--next-margin",void 0,!0)));#tE(){let e=this.#n.childElementCount;if(e!==this.#tb){let n="";for(let t=0;t<e;t++)n+=`<div style="animation-timeline:--x-swiper-item-${t};" part="indicator-item"></div>`;if(this.#tg().innerHTML=n,e>5){for(let n=0;n<e;n++){var t;null==(t=this.#n.children.item(n))||t.style.setProperty("view-timeline-name",`--x-swiper-item-${n}`)}this.#tf().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tb=e}connectedCallback(){if(this.#tE(),this.#ty=new MutationObserver(this.#tE.bind(this)),this.#ty.observe(this.#n,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){var e;this.#n.addEventListener("change",(e=>{let{detail:t}=e,n=t.current,l=this.#n.childElementCount,i=this.#tg();for(let e=0;e<l;e++){let t=i.children[e];t&&(e===n?t.style.setProperty("background-color","var(--indicator-active-color)","important"):t.style.removeProperty("background-color"))}}).bind(this));let t=parseFloat(this.#n.getAttribute("current")??"0");null==(e=this.#tg().children[t])||e.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){var e;null==(e=this.#ty)||e.disconnect(),this.#ty=void 0}});n8=[(0,a6.uA)("x-swiper",[a5.O,sX,sW,sB,sU],sm)],n9=[],n6=HTMLElement,class extends n6{static #e=n3=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(n6[Symbol.metadata]??null):void 0;(0,a9.G4)(null,n2={value:n3},n8,{kind:"class",name:n3.name,metadata:e},null,n9),n3=n2.value,e&&Object.defineProperty(n3,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#e0=(0,a6.Ut)(()=>this.shadowRoot,"#content").bind(this);#tS(){let e=0,t=Number.MAX_SAFE_INTEGER,n=0;if(this.childElementCount>0){let l=this.#e0(),i=this.isVertical,a=this.childElementCount,s=i?l.scrollTop:l.scrollLeft,o=i?l.clientHeight:l.clientWidth,r=i?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,d=s+("carousel"===this.getAttribute("mode")?.8*o/2:o/2);for(let l=0;l<a;l++){let a=this.children[l];if(a){let s=(i?a.offsetTop:a.offsetLeft)+r/2-d,o=Math.abs(s);o<t&&(e=l,t=o,n=s)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:n}}get currentIndex(){return this.#tS().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tw(e,t?"smooth":"instant")}#tw(e,t){let n=this.children.item(e);if(n){let e=this.isVertical,l=0;l="flat-coverflow"===this.getAttribute("mode")?e?n.offsetTop-n.offsetHeight/3:n.offsetLeft-n.offsetWidth/3:e?n.offsetTop:n.offsetLeft,this.#e0().scrollTo({left:e?0:l,top:e?l:0,behavior:t})}}get snapDistance(){return this.#tS().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"index"in t[0]){let{index:e,smooth:n=!0}=t[0];if("number"==typeof e)return void this.#tw(e,n?"smooth":"instant")}super.scrollTo(...t)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tw(Number(e),"instant")}get[sl.l](){return this}static #C=(0,a9.zF)(n3,n9)};let sZ=(n7=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n5=[(0,a6._y)("src",!0)],(0,a9.G4)(this,null,n5,{kind:"method",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc},metadata:e},null,n7),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src"];#n=(0,a9.zF)(this,n7);constructor(e){this.#n=e}#t_=(0,a6.Ut)(()=>this.#n.shadowRoot,"#img");_handleSrc(e){e?this.#t_().setAttribute("src",e):this.#t_().removeAttribute("src")}});ln=[(0,a6.uA)("inline-image",[sZ,sR],sr({}))],ll=[],li=HTMLElement,class extends li{static #e=lt=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(li[Symbol.metadata]??null):void 0;(0,a9.G4)(null,le={value:lt},ln,{kind:"class",name:lt.name,metadata:e},null,ll),lt=le.value,e&&Object.defineProperty(lt,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lt,ll)})()};let sq=()=>({start:-1,end:-1,direction:"forward"}),sY=(e,t,n)=>{if(!t||!e.contains(t))return null;let l=e.ownerDocument.createRange();l.selectNodeContents(e);try{l.setEnd(t,n)}catch{return null}return l.toString().length},sJ=(ls=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;la=[(0,a6.ZR)("selectionchange")],(0,a9.G4)(this,null,la,{kind:"method",name:"_handleEnableSelectionChangeEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionChangeEvent"in e,get:e=>e._handleEnableSelectionChangeEvent},metadata:e},null,ls),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,ls);#tC=!1;#tT=!1;#tx;#tk;constructor(e){this.#n=e}connectedCallback(){this.#tT=!0,this.#tO()}dispose(){this.#tT=!1,this.#tO()}_handleEnableSelectionChangeEvent(e){this.#tC=e,e||(this.#tk=void 0),this.#tO()}#tO(){var e;let t=this.#n.ownerDocument,n=this.#tC&&this.#tT;n&&this.#tx===t||(n||this.#tx)&&(null==(e=this.#tx)||e.removeEventListener("selectionchange",this.#tL),n&&t.addEventListener("selectionchange",this.#tL),this.#tx=n?t:void 0)}#tL=()=>{let e=(e=>{var t;let n=e.ownerDocument.getSelection();if(!n||0===n.rangeCount)return sq();let l=sY(e,n.anchorNode,n.anchorOffset),i=sY(e,n.focusNode,n.focusOffset);if(null!==l&&null!==i&&l!==i)return{start:Math.min(l,i),end:Math.max(l,i),direction:l<i?"forward":"backward"};let a=[],s=e.getRootNode();for(;s instanceof ShadowRoot;)a.push(s),s=s.host.getRootNode();let[o]=(null==(t=n.getComposedRanges)?void 0:t.call(n,{shadowRoots:a}))??[],r=o?sY(e,o.startContainer,o.startOffset):null,d=o?sY(e,o.endContainer,o.endOffset):null;return null===r||null===d||r===d?sq():{start:r,end:d,direction:"backward"===n.direction?"backward":"forward"}})(this.#n),t=`${e.start}:${e.end}:${e.direction}`;t!==this.#tk&&(-1!==e.start||void 0!==this.#tk)&&(this.#tk=t,this.#n.dispatchEvent(new CustomEvent("selectionchange",{...st.$,detail:e})))}});ld=[(0,a6.uA)("inline-text",[sJ])],lh=[],lc=HTMLElement,(class extends lc{static #e=lr=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lc[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lo={value:lr},ld,{kind:"class",name:lr.name,metadata:e},null,lh),lr=lo.value,e&&Object.defineProperty(lr,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lr,lh)})()}),lp=[(0,a6.uA)("inline-truncation",[])],lv=[],lb=HTMLElement,a3=class extends lb{static #e=lm=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lb[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lu={value:lm},lp,{kind:"class",name:lm.name,metadata:e},null,lv),a3=lm=lu.value,e&&Object.defineProperty(lm,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){if(!CSS.supports("selector(:has(>inline-truncation))")){var e;(null==(e=this.parentElement)?void 0:e.tagName)!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(a3.XEnableCustomTruncation,"")}this.setAttribute("slot","inline-truncation")}disconnectedCallback(){var e;null==(e=this.parentElement)||e.removeAttribute(a3.XEnableCustomTruncation)}static #C=(0,a9.zF)(lm,lv)},a3=lm;let sK=(lf=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lg=[(0,a6._y)("text",!0)],(0,a9.G4)(this,null,lg,{kind:"method",name:"_handleText",static:!1,private:!1,access:{has:e=>"_handleText"in e,get:e=>e._handleText},metadata:e},null,lf),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["text"];#n=(0,a9.zF)(this,lf);#tA;constructor(e){this.#n=e}_handleText(e){var t;null==(t=this.#tA)||t.remove(),e&&(this.#tA=new Text(e),this.#n.append(this.#tA))}});lS=[(0,a6.uA)("raw-text",[sK])],lw=[],l_=HTMLElement,(class extends l_{static #e=lE=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(l_[Symbol.metadata]??null):void 0;(0,a9.G4)(null,ly={value:lE},lS,{kind:"class",name:lE.name,metadata:e},null,lw),lE=ly.value,e&&Object.defineProperty(lE,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(lE,lw)})()}),n(99811),n(40009),n(13035),n(13412),n(17973),n(64955),n(91016),n(23306),n(76619),n(57857),n(9975),n(93885),n(812),n(74180),n(994),n(4267),n(20789),n(62839),n(66876);let sQ=(e,t,n)=>Math.min(Math.max(e,t),n),s0=(e,t)=>{let{node:n}=e;if(n.nodeType===Node.TEXT_NODE)return{container:n,offset:sQ(t,0,n.data.length)};let l=+(t>0),i=n.parentNode;return i?{container:i,offset:(e=>{let t=0,n=e.previousSibling;for(;n;)t++,n=n.previousSibling;return t})(n)+l}:{container:n,offset:sQ(l,0,n.childNodes.length)}},s1=(lx=[],class e{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lC=[(0,a6._y)("text-maxlength",!0),(0,a6._y)("text-maxline",!0),(0,a6._y)("tail-color-convert",!0)],lT=[(0,a6.ZR)("layout")],(0,a9.G4)(this,null,lC,{kind:"method",name:"_handleAttributeChange",static:!1,private:!1,access:{has:e=>"_handleAttributeChange"in e,get:e=>e._handleAttributeChange},metadata:e},null,lx),(0,a9.G4)(this,null,lT,{kind:"method",name:"_handleEnableLayoutEvent",static:!1,private:!1,access:{has:e=>"_handleEnableLayoutEvent"in e,get:e=>e._handleEnableLayoutEvent},metadata:e},null,lx),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tI=((0,a9.zF)(this,lx),!1);#tF=!1;#tR=new Map;#tM;#N;#tP;#tz;#tN=!1;#tH=0/0;#tD=0/0;#tG=!0;#tj=!1;get #t$(){return!this.#tV&&!this.#tG}get #tV(){return!!this.#tW()}#tW(){return this.#n.querySelector(":scope > inline-truncation")}get #tU(){return!isNaN(this.#tD)&&(this.#tV||!this.#tG)}#n;constructor(e){this.#n=e}#tB=(0,a6.Ut)(()=>this.#n.shadowRoot,"#inner-box");#tX(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tR.delete(e)}),"characterData"===e.type&&void 0!==this.#tR.get(e.target)&&this.#tR.set(e.target,e.target.data)})}#tZ(){for(let[t,n]of this.#tR)t.nodeType===Node.TEXT_NODE?void 0!==n&&(t.data=n):t.removeAttribute(e.exceedMathLengthAttribute);this.#n.removeAttribute(e.exceedMathLengthAttribute),this.#n.removeAttribute(e.showInlineTruncation)}#tq(e){let t=[],n=e;for(;n=n.nextSibling;)(n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE)&&t.push(n);return t}#tY(){!this.#tF||this.#n.matches("x-text>x-text")||this.#tI||(this.#tI=!0,(0,a6.JS)(async()=>{await this.#tJ(),this.#tK(),this.#tI=!1}))}async #tJ(){var t,n,l;if(null==(n=this.#tP)||null==(t=n.parentElement)||t.removeChild(this.#tP),this.#tZ(),!this.#tU&&isNaN(this.#tH))return;await document.fonts.ready;let i=this.#tB().getBoundingClientRect();this.#tz=new s4(this.#n,i);let a=this.#tz,s=(isNaN(this.#tH)?void 0:a.getNodeInfoByCharIndex(this.#tH))?this.#tH:1/0,o=this.#tU&&a.getLineInfo(this.#tD)?a.getLineInfo(this.#tD-1):void 0,r=1/0,d=3;if(o){let{start:t,end:n}=o,l=n-t;if(this.#tV){this.#n.setAttribute(e.showInlineTruncation,"");let l=this.#tW().getBoundingClientRect(),s=i.width,o=l.width;if(s>o){r=n-1;let e=document.createRange(),t=a.getNodeInfoByCharIndex(r),l=n-t.start,i=s0(t,l);for(e.setEnd(i.container,i.offset),e.setStart(i.container,i.offset);e.getBoundingClientRect().width<o&&(r-=1)&&(t=a.getNodeInfoByCharIndex(r));){let n=s0(t,r-t.start);e.setStart(n.container,n.offset)}}else r=t,this.#n.removeAttribute(e.showInlineTruncation)}else l<3?(d=l,r=t):r=n-3}let h=Math.min(s,r);if(h<1/0){let t=a.getNodeInfoByCharIndex(h);if(t){let n=h-t.start,i=t.node,s=[];i.nodeType===Node.TEXT_NODE?(this.#tR.set(i,i.data),i.data=i.data.substring(0,n)):s.push(i),s=s.concat(this.#tq(i));let o=i.parentElement;for(;o!==this.#n;)s=s.concat(this.#tq(o)),o=o.parentElement;if(s.forEach(t=>{t.nodeType===Node.TEXT_NODE&&0!==t.data.length?(this.#tR.set(t,t.data),t.data=""):t.nodeType===Node.ELEMENT_NODE&&(this.#tR.set(t,""),t.setAttribute(e.exceedMathLengthAttribute,""))}),this.#t$){let e=(0===n?null==(l=a.nodelist.at(t.nodeIndex-1))?void 0:l.parentElement:i.parentElement)??i.parentElement;this.#tP=new Text(Array(d).fill(".").join("")),e.append(this.#tP)}this.#n.setAttribute(e.exceedMathLengthAttribute,"")}this.#tQ(h)}}#t0=e=>{this.#tX(e),this.#tY()};#t1=()=>{if(this.#tN){this.#tN=!1;return}this.#tY()};#tK(){this.#tF&&((this.#tH||this.#tD)&&!this.#tM&&(this.#tM=new MutationObserver(this.#t0),this.#tM.observe(this.#n,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tD&&!this.#N&&(this.#N=new ResizeObserver(this.#t1),this.#tN=!0,this.#N.observe(this.#tB(),{box:"content-box"})))}#t4(){var e,t;null==(e=this.#tM)||e.disconnect(),this.#tM=void 0,null==(t=this.#N)||t.disconnect(),this.#N=void 0}_handleAttributeChange(){this.#tH=parseFloat(this.#n.getAttribute("text-maxlength")??""),this.#tD=parseFloat(this.#n.getAttribute("text-maxline")??""),this.#tG="false"!==this.#n.getAttribute("tail-color-convert"),this.#tH<0&&(this.#tH=0/0),this.#tD<1&&(this.#tD=0/0),isNaN(this.#tD)?this.#tB().style.removeProperty("-webkit-line-clamp"):this.#tB().style.webkitLineClamp=this.#tD.toString(),this.#tY()}_handleEnableLayoutEvent(e){this.#tj=e}#tQ(e){if(!this.#tj)return;let t=new Proxy(this,{get:(t,n)=>"lineCount"===n?(t.#tz||(t.#tz=new s4(t.#n,t.#n.getBoundingClientRect())),t.#tz.getLineCount()):"lines"===n?new Proxy(t,{get(t,n){let l=parseFloat(n.toString());if(!isNaN(l)){t.#tz||(t.#tz=new s4(t.#n,t.#n.getBoundingClientRect()));let n=t.#tz.getLineInfo(l);if(n)return new Proxy(n,{get(t,n){switch(n){case"start":case"end":return t[n];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#n.dispatchEvent(new CustomEvent("layout",{...st.$,detail:t}))}dispose(){this.#t4()}connectedCallback(){this.#tF=!0,this._handleEnableLayoutEvent(this.#tj),this._handleAttributeChange(),(0,a6.JS)(()=>{this.#tQ()})}});class s4{#t2=[{start:0}];#t3=[];#t8=[];#n;#t9;nodelist;constructor(e,t){this.#n=e,this.nodelist=new s2(this.#n),this.#t9=t}#t6(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:n}=e,l=e.node,i=document.createRange();i.selectNode(l);for(let e=0;e<l.data.length;e++){i.setEnd(l,e);let a=i.getClientRects().item(n);if(a&&a.right===t.right)return e}return l.data.length}}#t5(e){if(this.#t3[e])return;let{left:t}=this.#t9,n=this.#t3[this.#t3.length-1],l=null==n?void 0:n[n.length-1],i=(null==l?void 0:l.nodeIndex)?(null==l?void 0:l.nodeIndex)+1:0;for(let n=i,l;(l=this.#t7(n))&&e>=this.#t3.length;n++){let e,{node:n}=l;if(n.nodeType===Node.ELEMENT_NODE)e=n.getClientRects();else{let t=document.createRange();t.selectNode(n),e=t.getClientRects()}if(e.length>0){let n=this.#t3[this.#t3.length-1],i=e[0];if(.2>Math.abs(i.left-t)||!n?this.#t3.push([{...l,rect:i,rectIndex:0}]):n.push({...l,rect:i,rectIndex:0}),e.length>1)for(let n=1;n<e.length;n++){let a=e[n];(a.left!==i.left||a.bottom!==i.bottom)&&(.2>Math.abs(a.left-t)?this.#t3.push([{...l,rect:a,rectIndex:n}]):this.#t3[this.#t3.length-1].push({...l,rect:a,rectIndex:n}))}}}}getLineCount(){return this.#t5(1/0),this.#t3.length}getLineInfo(e){if(this.#t5(e+1),e<this.#t3.length){let t=e>0?this.#t2[e-1]??{}:void 0,n=this.#t2[e]??{},l=e<this.#t3.length-1?this.#t2[e+1]??{}:void 0;if(void 0===n.start){let l=this.#t3[e-1],i=l[l.length-1],a=this.#t6(i),s=i.start+a;t&&(t.end=s),n.start=s+1}if(void 0===n.end){let t=this.#t3[e],i=t[t.length-1];if(e===this.#t3.length-1){let e=i.node.nodeType===Node.TEXT_NODE?i.node.data.length:1;n.end=i.start+e}else{let e=this.#t6(i);n.end=i.start+e,l.start=n.end+1}}return n}}#t7(e){let t=this.#t8.length-1,n=this.#t8[t],l=n?n.start+n.length:0;for(let t=this.#t8.length,n;(n=this.nodelist.at(t))&&e>=this.#t8.length;t++){let e=n.nodeType===Node.ELEMENT_NODE?1:n.data.length,i={node:n,length:e,start:l,nodeIndex:t};this.#t8.push(i)}return this.#t8[e]}getNodeInfoByCharIndex(e){let t,n=0,l=this.#t8.length-1;for(;n<=l;){let i=Math.floor((n+l)/2),a=this.#t8[i],s=a.node,o=s.nodeType===Node.TEXT_NODE?s.data.length:1,r=a.start;if(e>=r&&e<r+o){t=a;break}e<r?l=i-1:n=i+1}if(t)return t;for(let t=this.#t8.length,n;n=this.#t7(t);t++)if(e<n.start+n.length)return n}}class s2{#ne=[];#nt;constructor(e){this.#nt=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,t=>{for(let n=t.parentElement;n&&n!==e;n=n.parentElement)if("X-VIEW"===n.tagName)return NodeFilter.FILTER_REJECT;if(t.nodeType===Node.ELEMENT_NODE){let e=t.tagName;if("X-TEXT"===e||"INLINE-TEXT"===e||"RAW-TEXT"===e||"LYNX-WRAPPER"===e)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#ne[e]||this.#nn(e),this.#ne[e]}#nn(e){let t=null;for(;e>=this.#ne.length&&(t=this.#nt.nextNode());){this.#ne.push(t);break}}}lL=[(0,a6.uA)("x-text",[a5.O,sJ,s1,sK],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>')],lA=[],lI=HTMLElement,class extends lI{static #e=lO=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(lI[Symbol.metadata]??null):void 0;(0,a9.G4)(null,lk={value:lO},lL,{kind:"class",name:lO.name,metadata:e},null,lA),lO=lk.value,e&&Object.defineProperty(lO,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a5.v]=this;static #C=(0,a9.zF)(lO,lA)};let s3=(lN=[],lH=[],lD=[],lG=[],lj=[],l$=[],lV=[],lW=[],lU=[],lB=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lF=[(0,a6._y)("placeholder-color",!0)],lR=[(0,a6._y)("placeholder-font-size",!0)],lM=[(0,a6._y)("placeholder-font-weight",!0)],lP=[(0,a6._y)("placeholder-font-family",!0)],lz=[(0,a6._y)("placeholder",!0)],(0,a9.G4)(null,null,lF,{kind:"field",name:"_updatePlaceholderColor",static:!1,private:!1,access:{has:e=>"_updatePlaceholderColor"in e,get:e=>e._updatePlaceholderColor,set:(e,t)=>{e._updatePlaceholderColor=t}},metadata:e},lN,lH),(0,a9.G4)(null,null,lR,{kind:"field",name:"_updatePlaceholderFontSize",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontSize"in e,get:e=>e._updatePlaceholderFontSize,set:(e,t)=>{e._updatePlaceholderFontSize=t}},metadata:e},lD,lG),(0,a9.G4)(null,null,lM,{kind:"field",name:"_updatePlaceholderFontWeight",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontWeight"in e,get:e=>e._updatePlaceholderFontWeight,set:(e,t)=>{e._updatePlaceholderFontWeight=t}},metadata:e},lj,l$),(0,a9.G4)(null,null,lP,{kind:"field",name:"_updatePlaceholderFontFamily",static:!1,private:!1,access:{has:e=>"_updatePlaceholderFontFamily"in e,get:e=>e._updatePlaceholderFontFamily,set:(e,t)=>{e._updatePlaceholderFontFamily=t}},metadata:e},lV,lW),(0,a9.G4)(null,null,lz,{kind:"field",name:"_handlePlaceholder",static:!1,private:!1,access:{has:e=>"_handlePlaceholder"in e,get:e=>e._handlePlaceholder,set:(e,t)=>{e._handlePlaceholder=t}},metadata:e},lU,lB),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#nl=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");_updatePlaceholderColor=(0,a9.zF)(this,lN,(0,a6._8)(this.#nl,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=((0,a9.zF)(this,lH),(0,a9.zF)(this,lD,(0,a6._8)(this.#nl,"--placeholder-font-size",void 0,!0)));_updatePlaceholderFontWeight=((0,a9.zF)(this,lG),(0,a9.zF)(this,lj,(0,a6._8)(this.#nl,"--placeholder-font-weight",void 0,!0)));_updatePlaceholderFontFamily=((0,a9.zF)(this,l$),(0,a9.zF)(this,lV,(0,a6._8)(this.#nl,"--placeholder-font-family",void 0,!0)));_handlePlaceholder=((0,a9.zF)(this,lW),(0,a9.zF)(this,lU,(0,a6.H$)(this.#nl,"placeholder")));#n=(0,a9.zF)(this,lB);constructor(e){this.#n=e}}),s8=(lK=[],lQ=[],l0=[],l1=[],l4=[],l2=[],l3=[],l8=[],l9=[],l6=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;lX=[(0,a6._y)("confirm-type",!0)],lZ=[(0,a6._y)("maxlength",!0)],lq=[(0,a6._y)("readonly",!0)],lY=[(0,a6._y)("ios-spell-check",!0)],lJ=[(0,a6._y)("show-soft-input-onfocus",!0)],(0,a9.G4)(null,null,lX,{kind:"field",name:"_handlerConfirmType",static:!1,private:!1,access:{has:e=>"_handlerConfirmType"in e,get:e=>e._handlerConfirmType,set:(e,t)=>{e._handlerConfirmType=t}},metadata:e},lK,lQ),(0,a9.G4)(null,null,lZ,{kind:"field",name:"_handlerMaxlength",static:!1,private:!1,access:{has:e=>"_handlerMaxlength"in e,get:e=>e._handlerMaxlength,set:(e,t)=>{e._handlerMaxlength=t}},metadata:e},l0,l1),(0,a9.G4)(null,null,lq,{kind:"field",name:"_handleReadonly",static:!1,private:!1,access:{has:e=>"_handleReadonly"in e,get:e=>e._handleReadonly,set:(e,t)=>{e._handleReadonly=t}},metadata:e},l4,l2),(0,a9.G4)(null,null,lY,{kind:"field",name:"_handleSpellCheck",static:!1,private:!1,access:{has:e=>"_handleSpellCheck"in e,get:e=>e._handleSpellCheck,set:(e,t)=>{e._handleSpellCheck=t}},metadata:e},l3,l8),(0,a9.G4)(null,null,lJ,{kind:"field",name:"_handleShowSoftInputOnfocus",static:!1,private:!1,access:{has:e=>"_handleShowSoftInputOnfocus"in e,get:e=>e._handleShowSoftInputOnfocus,set:(e,t)=>{e._handleShowSoftInputOnfocus=t}},metadata:e},l9,l6),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#n;#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");_handlerConfirmType=(0,a9.zF)(this,lK,(0,a6.H$)(this.#ni,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=((0,a9.zF)(this,lQ),(0,a9.zF)(this,l0,(0,a6.H$)(this.#ni,"maxlength",e=>null===e?"140":e)));_handleReadonly=((0,a9.zF)(this,l1),(0,a9.zF)(this,l4,(0,a6.H$)(this.#ni,"readonly",e=>null!==e?"":null)));_handleSpellCheck=((0,a9.zF)(this,l2),(0,a9.zF)(this,l3,(0,a6.H$)(this.#ni,"spellcheck",e=>null===e?"false":"true")));_handleShowSoftInputOnfocus=((0,a9.zF)(this,l8),(0,a9.zF)(this,l9,(0,a6.H$)(this.#ni,"virtualkeyboardpolicy",e=>null===e?"manual":"auto")));constructor(e){(0,a9.zF)(this,l6),this.#n=e}}),s9=(ii=[],ia=[],is=[],io=[],ir=[],id=[],ih=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l5=[(0,a6._y)("confirm-enter",!0)],l7=[(0,a6._y)("disabled",!0)],ie=[(0,a6._y)("max-height",!0)],it=[(0,a6._y)("min-height",!0)],il=[(0,a6._y)("value",!1)],(0,a9.G4)(this,null,l5,{kind:"method",name:"_handleConfirmEnter",static:!1,private:!1,access:{has:e=>"_handleConfirmEnter"in e,get:e=>e._handleConfirmEnter},metadata:e},null,ii),(0,a9.G4)(this,null,il,{kind:"method",name:"_handleValue",static:!1,private:!1,access:{has:e=>"_handleValue"in e,get:e=>e._handleValue},metadata:e},null,ii),(0,a9.G4)(null,null,l7,{kind:"field",name:"_handleDisabled",static:!1,private:!1,access:{has:e=>"_handleDisabled"in e,get:e=>e._handleDisabled,set:(e,t)=>{e._handleDisabled=t}},metadata:e},ia,is),(0,a9.G4)(null,null,ie,{kind:"field",name:"_handleMaxHeight",static:!1,private:!1,access:{has:e=>"_handleMaxHeight"in e,get:e=>e._handleMaxHeight,set:(e,t)=>{e._handleMaxHeight=t}},metadata:e},io,ir),(0,a9.G4)(null,null,it,{kind:"field",name:"_handleMinHeight",static:!1,private:!1,access:{has:e=>"_handleMinHeight"in e,get:e=>e._handleMinHeight,set:(e,t)=>{e._handleMinHeight=t}},metadata:e},id,ih),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#n=(0,a9.zF)(this,ii);#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");#na=!1;_handleConfirmEnter(e){this.#na=null!==e}_handleDisabled=(0,a9.zF)(this,ia,(0,a6.H$)(this.#ni,"disabled",e=>null!==e?"":null));_handleMaxHeight=((0,a9.zF)(this,is),(0,a9.zF)(this,io,(0,a6._8)(this.#ni,"max-height")));_handleMinHeight=((0,a9.zF)(this,ir),(0,a9.zF)(this,id,(0,a6._8)(this.#ni,"min-height")));_handleValue(e){if(e){let t=parseFloat(this.#n.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#ni();t.value!==e&&(t.value=e)}#ns=((0,a9.zF)(this,ih),e=>{this.#na&&"Enter"===e.key&&this.#ew().dispatchEvent(new SubmitEvent("submit"))});constructor(e){this.#n=e,this.#ni().addEventListener("keyup",this.#ns)}}),s6=(ip=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ic=[(0,a6._y)("input-filter",!0),(0,a6.ZR)("lynxinput")],iu=[(0,a6._y)("send-composing-input",!0)],im=[(0,a6.ZR)("selection")],(0,a9.G4)(this,null,ic,{kind:"method",name:"_handleEnableConfirmEvent",static:!1,private:!1,access:{has:e=>"_handleEnableConfirmEvent"in e,get:e=>e._handleEnableConfirmEvent},metadata:e},null,ip),(0,a9.G4)(this,null,iu,{kind:"method",name:"_handleSendComposingInput",static:!1,private:!1,access:{has:e=>"_handleSendComposingInput"in e,get:e=>e._handleSendComposingInput},metadata:e},null,ip),(0,a9.G4)(this,null,im,{kind:"method",name:"_handleEnableSelectionEvent",static:!1,private:!1,access:{has:e=>"_handleEnableSelectionEvent"in e,get:e=>e._handleEnableSelectionEvent},metadata:e},null,ip),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["send-composing-input","input-filter"];#n=(0,a9.zF)(this,ip);#eE=!1;#ni=(0,a6.Ut)(()=>this.#n.shadowRoot,"#textarea");#ew=(0,a6.Ut)(()=>this.#n.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#ni();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eC,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eC))}_handleSendComposingInput(e){this.#eE=null!==e}#eT=e=>{let t=sN[e.type]??e.type;this.#n.dispatchEvent(new CustomEvent(t,{...st.$,detail:{value:this.#ni().value}}))};#e_=e=>{let t=this.#ni(),n=this.#n.getAttribute("input-filter"),l=n?t.value.replace(RegExp(n,"g"),""):t.value,i=e.isComposing;t.value=l,(!i||this.#eE)&&this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:l,textLength:l.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eC=()=>{let e=this.#ni(),t=this.#n.getAttribute("input-filter"),n=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=n,this.#eE||this.#n.dispatchEvent(new CustomEvent("lynxinput",{...st.$,detail:{value:n,textLength:n.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#ni().addEventListener("select",this.#ek,{passive:!0}):this.#ni().removeEventListener("select",this.#ek)}#ek=()=>{let e=this.#ni();this.#n.dispatchEvent(new CustomEvent("selection",{...st.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO=e=>{e.target===this.#ni()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#n=e;let t=this.#ni(),n=this.#ew();t.addEventListener("blur",this.#eT,{passive:!0}),t.addEventListener("focus",this.#eT,{passive:!0}),n.addEventListener("submit",this.#eT,{passive:!0}),n.addEventListener("input",this.#eO,{passive:!0})}});ig=[(0,a6.uA)("x-textarea",[a5.O,s3,s8,s9,s6],sv)],iy=[],iE=HTMLElement,(class extends iE{static #e=ib=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iE[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iv={value:ib},ig,{kind:"class",name:ib.name,metadata:e},null,iy),ib=iv.value,e&&Object.defineProperty(ib,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(ib,iy)})();#nl=(0,a6.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#nl().value}set value(e){this.#nl().value=e}addText(e){let{text:t}=e,n=this.#nl(),l=n.selectionStart;if(null===l)n.value=t;else{let e=n.value;n.value=e.slice(0,l)+t+e.slice(l)}}setValue(e){let t,n=this.#nl();n.value=e.value,(t=e.index)&&n.setSelectionRange(t,t)}getValue(){let e=this.#nl();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:n}=e,l=this.#nl();1===t&&(n=1);let i=l.selectionStart;if(null===i){let e=l.value;l.value=l.value.substring(0,e.length-n)}else{let e=l.value;l.value=e.slice(0,i-n)+e.slice(i)}}select(){let e=this.#nl();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#nl().setSelectionRange(e.selectionStart,e.selectionEnd)}}),i_=[(0,a6.uA)("x-view",[sf,a5.O])],iC=[],iT=HTMLElement,class extends iT{static #e=iw=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iT[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iS={value:iw},i_,{kind:"class",name:iw.name,metadata:e},null,iC),iw=iS.value,e&&Object.defineProperty(iw,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iw,iC)})();superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(sa.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[a5.v]=this};let s5=(ik=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;ix=[(0,a6._y)("blur-radius",!0)],(0,a9.G4)(this,null,ix,{kind:"method",name:"_handleBlurRadius",static:!1,private:!1,access:{has:e=>"_handleBlurRadius"in e,get:e=>e._handleBlurRadius},metadata:e},null,ik),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["blur-radius"];#n=(0,a9.zF)(this,ik);#no=(0,a6.Ut)(()=>this.#n.shadowRoot,"#dynamic-style");_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#no().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#no().innerHTML=""}constructor(e){this.#n=e}});iA=[(0,a6.uA)("x-blur-view",[a5.O,s5],'<style id="dynamic-style"></style><slot></slot>')],iI=[],iF=HTMLElement,class extends iF{static #e=iL=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iF[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iO={value:iL},iA,{kind:"class",name:iL.name,metadata:e},null,iI),iL=iO.value,e&&Object.defineProperty(iL,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iL,iI)})()};let s7=(iz=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iR=[(0,a6.ZR)("change")],iM=[(0,a6.ZR)("willchange")],iP=[(0,a6.ZR)("offsetchange")],(0,a9.G4)(this,null,iR,{kind:"method",name:"_enableChangeEvent",static:!1,private:!1,access:{has:e=>"_enableChangeEvent"in e,get:e=>e._enableChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iM,{kind:"method",name:"_enableWillChangeEvent",static:!1,private:!1,access:{has:e=>"_enableWillChangeEvent"in e,get:e=>e._enableWillChangeEvent},metadata:e},null,iz),(0,a9.G4)(this,null,iP,{kind:"method",name:"_enableOffsetChangeEvent",static:!1,private:!1,access:{has:e=>"_enableOffsetChangeEvent"in e,get:e=>e._enableOffsetChangeEvent},metadata:e},null,iz),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=[];#n=(0,a9.zF)(this,iz);#nr=!1;#tT=!1;#nd=0;#a;constructor(e){this.#n=e}#r=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#nh=()=>{if(!this.#tT)return;let e=this.#r(),t=this.#n.clientWidth,n=e.scrollLeft;this.#nc&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#nu()},100)),this.#n.dispatchEvent(new CustomEvent("offsetchange",{...st.$,detail:{offset:n/t}}))};#nu=()=>{if(this.#tT){let e=this.#r(),t=this.#n.clientWidth,n=Math.floor(e.scrollLeft/t);n!==this.#nd&&(this.#n.dispatchEvent(new CustomEvent("change",{...st.$,detail:{index:n,isDragged:this.#nr}})),this.#nd=n)}};#nm=()=>{this.#nr=!0};#np=()=>{if(this.#nr=!1,this.#nv){let e=this.#r(),t=this.#n.clientWidth;if(t>0){let n=Math.round(e.scrollLeft/t);n=Math.max(0,Math.min(n,this.#n.children.length-1)),this.#n.dispatchEvent(new CustomEvent("willchange",{...st.$,detail:{index:n}}))}}};#nc=!1;_enableChangeEvent(e){this.#nc=e,this.#nb()}#nv=!1;_enableWillChangeEvent(e){this.#nv=e}#ng=!1;_enableOffsetChangeEvent(e){this.#ng=e,this.#nb()}#nb(){let e=this.#r();this.#ng||this.#nc?e.addEventListener("scroll",this.#nh,{passive:!0}):e.removeEventListener("scroll",this.#nh),sl.k&&this.#nc?e.addEventListener("scrollend",this.#nu,{passive:!0}):e.removeEventListener("scrollend",this.#nu)}connectedCallback(){this.#tT=!0;let e=this.#r();this.#n.addEventListener("touchstart",this.#nm,{passive:!0}),e.addEventListener("touchend",this.#np,{passive:!0}),e.addEventListener("touchcancel",this.#np,{passive:!0})}dispose(){let e=this.#r();e.removeEventListener("scroll",this.#nh),e.removeEventListener("scrollend",this.#nu)}});iD=[(0,a6.uA)("x-viewpager-ng",[sf,a5.O,s7],sb)],iG=[],ij=HTMLElement,(class extends ij{static #e=iH=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ij[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iN={value:iH},iD,{kind:"class",name:iH.name,metadata:e},null,iG),iH=iN.value,e&&Object.defineProperty(iH,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:n}=e;void 0===n&&(n=!0);let l=this.shadowRoot.children.item(2),i=l.clientWidth*t;l.scrollTo({left:i,behavior:n?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),n=this.shadowRoot.children.item(2),l=()=>{0===n.clientWidth?requestAnimationFrame(l):this.selectTab({index:t,smooth:!1})};(0,a6.JS)(l)}}get[sl.l](){return this}static #C=(0,a9.zF)(iH,iG)}),iW=[(0,a6.uA)("x-viewpager-item-ng",[sf,a5.O])],iU=[],iB=HTMLElement,class extends iB{static #e=iV=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(iB[Symbol.metadata]??null):void 0;(0,a9.G4)(null,i$={value:iV},iW,{kind:"class",name:iV.name,metadata:e},null,iU),iV=i$.value,e&&Object.defineProperty(iV,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(iV,iU)})()};let oe=(iZ=[],iq=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;iX=[(0,a6._y)("estimated-main-axis-size-px",!0)],(0,a9.G4)(null,null,iX,{kind:"field",name:"_handlerEstimatedMainAxisSizePx",static:!1,private:!1,access:{has:e=>"_handlerEstimatedMainAxisSizePx"in e,get:e=>e._handlerEstimatedMainAxisSizePx,set:(e,t)=>{e._handlerEstimatedMainAxisSizePx=t}},metadata:e},iZ,iq),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["estimated-main-axis-size-px"];#n;_handlerEstimatedMainAxisSizePx=(0,a9.zF)(this,iZ,(0,a6._8)(()=>this.#n,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){(0,a9.zF)(this,iq),this.#n=e}});iK=[(0,a6.uA)("list-item",[a5.O,oe])],iQ=[],i0=HTMLElement,class extends i0{static #e=iJ=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(i0[Symbol.metadata]??null):void 0;(0,a9.G4)(null,iY={value:iJ},iK,{kind:"class",name:iJ.name,metadata:e},null,iQ),iJ=iY.value,e&&Object.defineProperty(iJ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["recyclable"]);static #C=(0,a9.zF)(iJ,iQ)};let ot=(i2=[],i3=[],i8=[],i9=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i1=[(0,a6._y)("sticky-offset",!0)],i4=[(0,a6._y)("span-count",!0),(0,a6._y)("column-count",!0)],(0,a9.G4)(null,null,i1,{kind:"field",name:"_handlerStickyOffset",static:!1,private:!1,access:{has:e=>"_handlerStickyOffset"in e,get:e=>e._handlerStickyOffset,set:(e,t)=>{e._handlerStickyOffset=t}},metadata:e},i2,i3),(0,a9.G4)(null,null,i4,{kind:"field",name:"_handlerCount",static:!1,private:!1,access:{has:e=>"_handlerCount"in e,get:e=>e._handlerCount,set:(e,t)=>{e._handlerCount=t}},metadata:e},i8,i9),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#n;_handlerStickyOffset=(0,a9.zF)(this,i2,(0,a6._8)(()=>this.#n,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=((0,a9.zF)(this,i3),(0,a9.zF)(this,i8,(0,a6._8)(()=>this.#n,"--list-item-span-count",e=>`${parseFloat(e)}`)));constructor(e){(0,a9.zF)(this,i9),this.#n=e}connectedCallback(){let e=this.#n.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),n=()=>{0===this.#n.clientHeight?requestAnimationFrame(n):this.#n.scrollToPosition({position:t})};(0,a6.JS)(n)}}}),on=function(e,t,n){let l,i,a,s,o=0;var r=function(){o=(null==n?void 0:n.leading)===!1?0:new Date().getTime(),l=null,s=e.apply(i,a),l||(i=a=null)};return function(){var d=new Date().getTime();o||(null==n?void 0:n.leading)!==!1||(o=d);var h=t-(d-o);return i=this,a=arguments,h<=0||h>t?(l&&(clearTimeout(l),l=null),o=d,s=e.apply(i,a),l||(i=a=null)):l||(null==n?void 0:n.trailing)===!1||(l=setTimeout(r,h)),s}},ol=(ai=[],aa=[],as=[],ao=[],ar=[],ad=[],ah=[],ac=[],au=[],am=[],ap=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i6=[(0,a6.ZR)("scrolltoupper")],i5=[(0,a6._y)("upper-threshold-item-count",!0)],i7=[(0,a6.ZR)("scrolltolower")],ae=[(0,a6._y)("lower-threshold-item-count",!0)],at=[(0,a6.ZR)("lynxscroll"),(0,a6.ZR)("lynxscrollend"),(0,a6.ZR)("snap")],an=[(0,a6.ZR)("scrolltoupperedge")],al=[(0,a6.ZR)("scrolltoloweredge")],(0,a9.G4)(this,null,i5,{kind:"method",name:"_handleUpperThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleUpperThresholdItemCountChange"in e,get:e=>e._handleUpperThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(this,null,ae,{kind:"method",name:"_handleLowerThresholdItemCountChange",static:!1,private:!1,access:{has:e=>"_handleLowerThresholdItemCountChange"in e,get:e=>e._handleLowerThresholdItemCountChange},metadata:e},null,ai),(0,a9.G4)(null,null,i6,{kind:"field",name:"_updateEventSwitches",static:!1,private:!1,access:{has:e=>"_updateEventSwitches"in e,get:e=>e._updateEventSwitches,set:(e,t)=>{e._updateEventSwitches=t}},metadata:e},aa,as),(0,a9.G4)(null,null,i7,{kind:"field",name:"_updateScrollToLowerEventSwitches",static:!1,private:!1,access:{has:e=>"_updateScrollToLowerEventSwitches"in e,get:e=>e._updateScrollToLowerEventSwitches,set:(e,t)=>{e._updateScrollToLowerEventSwitches=t}},metadata:e},ao,ar),(0,a9.G4)(null,null,at,{kind:"field",name:"_handleScrollEventsSwitches",static:!1,private:!1,access:{has:e=>"_handleScrollEventsSwitches"in e,get:e=>e._handleScrollEventsSwitches,set:(e,t)=>{e._handleScrollEventsSwitches=t}},metadata:e},ad,ah),(0,a9.G4)(null,null,an,{kind:"field",name:"_handleScrollToUpperEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToUpperEdgeEventEnable"in e,get:e=>e._handleScrollToUpperEdgeEventEnable,set:(e,t)=>{e._handleScrollToUpperEdgeEventEnable=t}},metadata:e},ac,au),(0,a9.G4)(null,null,al,{kind:"field",name:"_handleScrollToLowerEdgeEventEnable",static:!1,private:!1,access:{has:e=>"_handleScrollToLowerEdgeEventEnable"in e,get:e=>e._handleScrollToLowerEdgeEventEnable,set:(e,t)=>{e._handleScrollToLowerEdgeEventEnable=t}},metadata:e},am,ap),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#n=(0,a9.zF)(this,ai);#nf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#ny;#nE;#nS;#s=0;#o=0;#nw=!1;#a;#d=(0,a6.Ut)(()=>this.#n.shadowRoot,"#upper-threshold-observer");#h=(0,a6.Ut)(()=>this.#n.shadowRoot,"#lower-threshold-observer");#u(){let e=null!==this.#n.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i}=this.#nf(),a={scrollTop:t,scrollLeft:n,scrollHeight:l,scrollWidth:i,deltaX:n-this.#s,deltaY:t-this.#o,attachedCells:e?this.#n.getVisibleCells():void 0};return this.#s=n,this.#o=t,a}#n_=e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltoupper",{...st.$,detail:this.#u()}))};_updateEventSwitches=(0,a9.zF)(this,aa,e=>{if(e?this.#n.setAttribute("x-enable-scrolltoupper-event",""):this.#n.removeAttribute("x-enable-scrolltoupper-event"),this.#eH.scrolltoupper=e,e){this.#ny||(this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleUpperThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#d():this.#n.children[i-1];a&&(null==(n=this.#ny)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#d():this.#n.children[s-1];o&&(null==(l=this.#ny)||l.observe(o))}#nT=((0,a9.zF)(this,as),e=>{let{isIntersecting:t}=e[0];t&&this.#n.dispatchEvent(new CustomEvent("scrolltolower",{...st.$,detail:this.#u()}))});#eH={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=(0,a9.zF)(this,ao,e=>{if(this.#eH.scrolltolower=e,e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){this.#nE||(this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()})),this.#nS||(this.#nS=new MutationObserver(this.#nC));let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n),this.#nS.observe(this.#n,{childList:!0})}else this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nS&&(this.#nS.disconnect(),this.#nS=void 0)});_handleLowerThresholdItemCountChange(e,t){var n,l;let i=null!==t?parseFloat(t):0,a=0===i?this.#h():this.#n.children[this.#n.children.length-i];a&&(null==(n=this.#nE)||n.unobserve(a));let s=null!==e?parseFloat(e):0,o=0===s?this.#h():this.#n.children[this.#n.children.length-s];o&&(null==(l=this.#nE)||l.observe(o))}#nC=((0,a9.zF)(this,ar),e=>{let t=null==e?void 0:e[0];if((null==t?void 0:t.type)==="childList"){if(this.#eH.scrolltolower){this.#nE&&(this.#nE.disconnect(),this.#nE=void 0),this.#nE=new IntersectionObserver(this.#nT,{root:this.#nf()});let e=this.#n.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#h():this.#n.children[this.#n.children.length-t];n&&this.#nE.observe(n)}if(null!==this.#n.getAttribute("x-enable-scrolltoupper-event")){this.#ny&&(this.#ny.disconnect(),this.#ny=void 0),this.#ny=new IntersectionObserver(this.#n_,{root:this.#nf()});let e=this.#n.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,n=0===t?this.#d():this.#n.children[t-1];n&&this.#ny.observe(n)}}});#nx=null;#v=()=>{this.#nw&&!sl.k&&(clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#g()},100)),this.#n.dispatchEvent(new CustomEvent("lynxscroll",{...st.$,detail:this.#u()}))};_handleScrollEventsSwitches=(0,a9.zF)(this,ad,(e,t)=>{this.#eH[t]=e;let{lynxscroll:n,lynxscrollend:l,snap:i}=this.#eH,a=this.#n.getAttribute("scroll-event-throttle");this.#nw=null!==l||null!==i;let s=this.#nf();if(this.#nx&&s.removeEventListener("scroll",this.#nx),null!==n||this.#nw){let e=null!==a?parseFloat(a):0,t=on(this.#v,e,{leading:!0,trailing:!1});this.#nx=t,s.addEventListener("scroll",this.#nx),this.#s=0,this.#o=0}sl.k&&this.#nw?s.addEventListener("scrollend",this.#g):s.removeEventListener("scrollend",this.#g)});#c=((0,a9.zF)(this,ah),e=>{let{isIntersecting:t,target:n}=e[0],l=n.id;t&&("upper-threshold-observer"===l?this.#n.dispatchEvent(new CustomEvent("scrolltoupperedge",{...st.$,detail:this.#u()})):"lower-threshold-observer"===l&&this.#n.dispatchEvent(new CustomEvent("scrolltoloweredge",{...st.$,detail:this.#u()})))});_handleScrollToUpperEdgeEventEnable=(0,a9.zF)(this,ac,e=>{e?this.#n.setAttribute("x-enable-scrolltoupperedge-event",""):this.#n.removeAttribute("x-enable-scrolltoupperedge-event"),this.#nk(e)});#nk=((0,a9.zF)(this,au),sn(this.#nf,this.#d,this.#c));_handleScrollToLowerEdgeEventEnable=(0,a9.zF)(this,am,e=>{e?this.#n.setAttribute("x-enable-scrolltoloweredge-event",""):this.#n.removeAttribute("x-enable-scrolltoloweredge-event"),this.#nO(e)});#nO=((0,a9.zF)(this,ap),sn(this.#nf,this.#h,this.#c));#g=()=>{let e=this.#n.getAttribute("item-snap");if(this.#n.dispatchEvent(new CustomEvent("lynxscrollend",{...st.$})),null!==e){let e=Array.from(this.#n.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#nf().scrollTop,n=this.#nf().scrollLeft,l=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#n.dispatchEvent(new CustomEvent("snap",{...st.$,detail:{position:l&&e.indexOf(l),scrollTop:t,scrollLeft:n}}))}};constructor(e){this.#n=e}}),oi="waterfall-slot",oa="waterfall-style",os=(ag=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;av=[(0,a6.ZR)("scrolltolower")],ab=[(0,a6._y)("list-type",!0)],(0,a9.G4)(this,null,av,{kind:"method",name:"_handleXEnableHeaderOffsetEvent",static:!1,private:!1,access:{has:e=>"_handleXEnableHeaderOffsetEvent"in e,get:e=>e._handleXEnableHeaderOffsetEvent},metadata:e},null,ag),(0,a9.G4)(this,null,ab,{kind:"method",name:"_handlerListType",static:!1,private:!1,access:{has:e=>"_handlerListType"in e,get:e=>e._handlerListType},metadata:e},null,ag),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["list-type"];#n=(0,a9.zF)(this,ag);#nf=(0,a6.Ut)(()=>this.#n.shadowRoot,"#content");#nL=(0,a6.Ut)(()=>this.#n.shadowRoot,'div[part="lower-threshold-observer"]');#N;#nS;_handleXEnableHeaderOffsetEvent(e){if(e?this.#n.setAttribute("x-enable-scrolltolower-event",""):this.#n.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#nL(),t=this.#n.getAttribute("scroll-orientation")||"vertical",n=this.#nf();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(n.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(n.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#nA=()=>{var e,t;let n=document.createElement("slot");n.setAttribute("name",`${oi}`),null==(t=this.#n.shadowRoot)||null==(e=t.querySelector("[part=upper-threshold-observer]"))||e.insertAdjacentElement("afterend",n)};#nI=()=>{let e=parseFloat(this.#n.getAttribute("span-count")||this.#n.getAttribute("column-count")||"")||1,t="vertical"===(this.#n.getAttribute("scroll-orientation")||"vertical"),n=Array(e).fill(0);for(let l=0;l<this.#n.children.length;l++){let i=this.#n.children[l],a=getComputedStyle(i).getPropertyValue("--list-main-axis-gap"),s=getComputedStyle(i).getPropertyValue("--list-cross-axis-gap"),o=t?i.getBoundingClientRect().height+parseFloat(a):i.getBoundingClientRect().width+parseFloat(a);if(null!==i.getAttribute("full-span")){let l=n[0];for(let t=1;t<e;t++)n[t]>l&&(l=n[t]);for(let t=0;t<e;t++)n[t]=l+o;t?(i.setAttribute(`${oa}-left`,"0"),i.setAttribute(`${oa}-top`,`${l}px`)):(i.setAttribute(`${oa}-left`,`${l}px`),i.setAttribute(`${oa}-top`,"0"))}else{let l=0,a=n[0];for(let t=1;t<e;t++)n[t]<a&&(l=t,a=n[t]);let r=`calc(${l} * (100% - ${s} * (${e} - 1))/ ${e} + ${Math.max(0,l)} * ${s})`;t?(i.setAttribute(`${oa}-left`,r),i.setAttribute(`${oa}-top`,`${a}px`)):(i.setAttribute(`${oa}-left`,`${a}px`),i.setAttribute(`${oa}-top`,r)),n[l]+=o}}for(let e=0;e<this.#n.children.length;e++){let t=this.#n.children[e];t.style.setProperty("left",t.getAttribute(`${oa}-left`)),t.style.setProperty("top",t.getAttribute(`${oa}-top`)),t.setAttribute("slot",oi)}};constructor(e){this.#n=e}#nF=()=>{var e;null==(e=this.#N)||e.disconnect(),this.#N=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#nI()})}),Array.from(this.#n.children).forEach(e=>{var t;null==(t=this.#N)||t.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#nA(),this.#N||this.#nF(),this.#nS||(this.#nS=new MutationObserver(e=>{let t=null==e?void 0:e[0];(null==t?void 0:t.type)==="childList"&&this.#nF()}),this.#nS.observe(this.#n,{childList:!0}));else{var t,n,l,i;null==(t=this.#N)||t.disconnect(),this.#N=void 0,null==(n=this.#nS)||n.disconnect(),this.#nS=void 0;for(let e=0;e<this.#n.children.length;e++)this.#n.children[e].removeAttribute("slot");null==(i=this.#n.shadowRoot)||null==(l=i.querySelector(`slot[name=${oi}]`))||l.remove()}}});aE=[(0,a6.uA)("x-list",[a5.O,ot,ol,os],sh)],aS=[],aw=HTMLElement,class extends aw{static #e=ay=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aw[Symbol.metadata]??null):void 0;(0,a9.G4)(null,af={value:ay},aE,{kind:"class",name:ay.name,metadata:e},null,aS),ay=af.value,e&&Object.defineProperty(ay,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["enable-scroll"]);#nf=(0,a6.Ut)(()=>this.shadowRoot,"#content");#nR={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#nM={};get scrollTop(){return this.#nf().scrollTop}set scrollTop(e){this.#nf().scrollTop=e}get scrollLeft(){return this.#nf().scrollLeft}set scrollLeft(e){this.#nf().scrollLeft=e}get scrollHeight(){return this.#nf().scrollHeight}get scrollWidth(){return this.#nf().scrollWidth}get[sl.l](){return this.#nf()}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollLeft}scrollToPosition(e){let t;if("string"==typeof e.offset){let n=parseFloat(e.offset);t={left:n,top:n}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#nf().scrollTop=0,this.#nf().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let n=this.children.item(e.position);n instanceof HTMLElement&&(t=t?{left:n.offsetLeft+t.left,top:n.offsetTop+t.top}:{left:n.offsetLeft,top:n.offsetTop})}}t&&this.#nf().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#nP=e=>{if(!this.#nR.isScrolling)return;if(!this.#nR.lastTimestamp){this.#nR.lastTimestamp=e,requestAnimationFrame(this.#nP);return}let t=this.#nf(),n=(e-this.#nR.lastTimestamp)/1e3*this.#nR.rate,l="vertical"===(this.getAttribute("scroll-orientation")||"vertical");t.scrollBy({left:l?0:n,top:l?n:0,behavior:"auto"}),this.#nR.lastTimestamp=e,(l?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#nR.autoStop?(l?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#nR.isScrolling=!1):requestAnimationFrame(this.#nP)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#nR={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let n=this.#nf(),l="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?n.clientHeight<=n.scrollHeight:n.clientWidth<=n.scrollWidth;this.#nR.lastTimestamp=0,l?setTimeout(()=>requestAnimationFrame(this.#nP),0):requestAnimationFrame(this.#nP)}else this.#nR.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#nM),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let n=this.#nf().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=n.top&&t.top<=n.bottom&&t.right>=n.left&&t.left<=n.right})}return e.map(e=>{let n=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:n.bottom,top:n.top,left:n.left,right:n.right,index:t.indexOf(e)}})};#nz=()=>Object.values(this.#nM).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#nN=e=>{var t,n,l;if(!e.target||!(e.target instanceof HTMLElement))return;let i=e.skipped,a=(null==(t=e.target)?void 0:t.getAttribute("id"))==="content"&&(null==(n=e.target)?void 0:n.getAttribute("part"))==="content",s="LIST-ITEM"===e.target.tagName;if(a&&!i){let e=this.#nz();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...st.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#nz()}}))},100);return}if(s){let t=null==(l=e.target)?void 0:l.getAttribute("item-key");if(!t)return;i?this.#nM[t]&&delete this.#nM[t]:this.#nM[t]=e.target;return}};connectedCallback(){this.#nf().addEventListener("contentvisibilityautostatechange",this.#nN,{passive:!0})}static #C=(0,a9.zF)(ay,aS)};let oo=(aT=[],ax=[],ak=[],aO=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;a_=[(0,a6._y)("src",!0)],aC=[(0,a6._y)("html",!0)],(0,a9.G4)(null,null,a_,{kind:"field",name:"_handleSrc",static:!1,private:!1,access:{has:e=>"_handleSrc"in e,get:e=>e._handleSrc,set:(e,t)=>{e._handleSrc=t}},metadata:e},aT,ax),(0,a9.G4)(null,null,aC,{kind:"field",name:"_handleHtml",static:!1,private:!1,access:{has:e=>"_handleHtml"in e,get:e=>e._handleHtml,set:(e,t)=>{e._handleHtml=t}},metadata:e},ak,aO),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["src","html"];#n;#nH=(0,a6.Ut)(()=>this.#n.shadowRoot,"#webview");constructor(e){(0,a9.zF)(this,aO),this.#n=e}_handleSrc=(0,a9.zF)(this,aT,(0,a6.H$)(this.#nH,"src"));_handleHtml=((0,a9.zF)(this,ax),(0,a9.zF)(this,ak,(0,a6.H$)(this.#nH,"srcdoc")))});aI=[(0,a6.uA)("x-webview",[a5.O,oo],sg)],aF=[],aR=HTMLElement,class extends aR{static #e=aA=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(aR[Symbol.metadata]??null):void 0;(0,a9.G4)(null,aL={value:aA},aI,{kind:"class",name:aA.name,metadata:e},null,aF),aA=aL.value,e&&Object.defineProperty(aA,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),(0,a9.zF)(aA,aF)})();#nH=(0,a6.Ut)(()=>this.shadowRoot,"#webview");#nD=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#nH().src}}))};#nG=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#nj=e=>{e.source===this.#nH().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#nH().addEventListener("load",this.#nD),this.#nH().addEventListener("error",this.#nG),window.addEventListener("message",this.#nj)}disconnectedCallback(){this.#nH().removeEventListener("load",this.#nD),this.#nH().removeEventListener("error",this.#nG),window.removeEventListener("message",this.#nj)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#nH().src=this.#nH().src}};var or=n(33553);n(46455),n(61203);let od=!1,oh=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),oc=e=>{if(!e)return e;if(e.includes("\x3c!--")||e.includes("<!")||e.includes("<?")||e.includes("<%"))return oh(e);let t=/<\s*\/?\s*([A-Za-z][\w-]*)\b[^>]*>/g,n=null,l=!1;for(;n=t.exec(e);){l=!0;let t=(n[1]??"").toLowerCase();if("span"!==t&&"p"!==t)return oh(e)}return l?e.replace(/<(span|p)\b([^>]*?)(\/?)>/gi,(e,t,n,l)=>{let i=String(t).toLowerCase(),a=String(n??"").replaceAll("&quot;",'"').replaceAll("&#34;",'"').replaceAll("&apos;","'").replaceAll("&#39;","'").replaceAll("&amp;","&").replaceAll("&lt;","<").replaceAll("&gt;",">"),s=/\bclass\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(a),o=((null==s?void 0:s[1])??(null==s?void 0:s[2])??(null==s?void 0:s[3])??"").trim().split(/\s+/).filter(Boolean).filter(e=>/^[A-Za-z0-9_-]+$/.test(e)).join(" "),r=o?` class="${o.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}"`:"";return"/"===String(l??"")?`<${i}${r}></${i}>`:`<${i}${r}>`}):e.includes("<")?oh(e):e},ou=e=>{for(let t of e)((null==t?void 0:t.type)==="html_inline"||(null==t?void 0:t.type)==="html_block")&&(t.content=oc(String(t.content??""))),Array.isArray(null==t?void 0:t.children)&&ou(t.children)},om=(e,t)=>{let n={},l=e.parse(t,n);return ou(l),e.renderer.render(l,e.options,n)},op=null,ov=null,ob=()=>{if(op||o)return op;if(!l)return null;try{(op=new l({html:!0,linkify:!0})).enable(["table","strikethrough"])}catch(e){o=e}return op},og=e=>{let t=ov||(i?ov=i(window):null);return t?t.sanitize(e,{USE_PROFILES:{html:!0}}):e},of=()=>({start:-1,end:-1,direction:"forward"}),oy=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!(null==t?void 0:t.contains(n))),oE=(e,t,n,l,i)=>{if(!i)return null;let a=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(i,l)??(i.rangeCount>0?i.getRangeAt(0):null);if(!a)return null;if(!n.contains(a.startContainer)||!n.contains(a.endContainer)){var s;if(!oy(t,l,a.startContainer)||!oy(t,l,a.endContainer)||!oy(t,l,i.anchorNode)||!oy(t,l,i.focusNode))return null;let o=i.toString();if(!o)return null;let r=(null==(s=n.textContent)?void 0:s.indexOf(o))??-1;return r<0?null:((e,t,n,l)=>{let i=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=i.nextNode();for(;h;){var c;let e=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=l){r=h,d=l-a;break}a+=e,h=i.nextNode()}if(!s)return null;r||(r=s,d=o);let u=e.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(e,n,r,r+o.length)}let o=e.createRange();return o.setStart(a.startContainer,a.startOffset),o.setEnd(a.endContainer,a.endOffset),o},oS=(e,t,n,l)=>{if(!n||!t.contains(n))return null;let i=e.createRange();i.selectNodeContents(t);try{i.setEnd(n,l)}catch{return null}return i.toString().length},ow=e=>e.replace(/src\s*=\s*"inlineview:\/\/([^"]+)"/g,(e,t)=>`data-inlineview="${t}"`),o_=new Set(["font-weight","opacity","z-index","flex","flex-grow","flex-shrink","order"]),oC={normalText:".markdown-body",link:".markdown-body a",inlineCode:".markdown-body code:not(pre code)",codeBlock:[".markdown-body pre",".markdown-body pre code"],h1:".markdown-body h1",h2:".markdown-body h2",h3:".markdown-body h3",h4:".markdown-body h4",h5:".markdown-body h5",h6:".markdown-body h6",quote:".markdown-body blockquote",orderedList:".markdown-body ol",unorderedList:".markdown-body ul",listItem:".markdown-body li",image:".markdown-body img",span:".markdown-body span",p:".markdown-body p",table:".markdown-body table",thead:".markdown-body thead",tbody:".markdown-body tbody",tr:".markdown-body tr",th:".markdown-body th",td:".markdown-body td",imageCaption:".markdown-body .md-image-caption"},oT=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),ox=(e,t)=>{if(null==t)return null;if("number"==typeof t)return o_.has(e)?`${t}`:`${t}px`;if("string"==typeof t){if(e.includes("color")){let e;return e=t.trim(),/^[0-9a-fA-F]{6,8}$/.test(e)?`#${e}`:t}return t}return null},ok=e=>{if(!e)return{};try{let t=JSON.parse(e);if(t&&"object"==typeof t)return t}catch{}return{}},oO=(aZ=[],class{static #e=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;aM=[(0,a6._y)("content",!0)],aP=[(0,a6._y)("markdown-effect",!0)],az=[(0,a6._y)("markdown-style",!0)],aN=[(0,a6._y)("content-id",!0)],aH=[(0,a6._y)("text-selection",!0)],aD=[(0,a6._y)("animation-type",!0)],aG=[(0,a6._y)("animation-velocity",!0)],aj=[(0,a6._y)("animation-paused",!0)],a$=[(0,a6._y)("initial-animation-step",!0)],aV=[(0,a6._y)("content-complete",!0)],aW=[(0,a6._y)("typewriter-dynamic-height",!0)],aU=[(0,a6._y)("typewriter-height-transition-duration",!0)],aB=[(0,a6._y)("text-maxline",!0)],aX=[(0,a6._y)("content-range",!0)],(0,a9.G4)(this,null,aM,{kind:"method",name:"_handleContent",static:!1,private:!1,access:{has:e=>"_handleContent"in e,get:e=>e._handleContent},metadata:e},null,aZ),(0,a9.G4)(this,null,aP,{kind:"method",name:"_handleMarkdownEffect",static:!1,private:!1,access:{has:e=>"_handleMarkdownEffect"in e,get:e=>e._handleMarkdownEffect},metadata:e},null,aZ),(0,a9.G4)(this,null,az,{kind:"method",name:"_handleMarkdownStyle",static:!1,private:!1,access:{has:e=>"_handleMarkdownStyle"in e,get:e=>e._handleMarkdownStyle},metadata:e},null,aZ),(0,a9.G4)(this,null,aN,{kind:"method",name:"_handleContentId",static:!1,private:!1,access:{has:e=>"_handleContentId"in e,get:e=>e._handleContentId},metadata:e},null,aZ),(0,a9.G4)(this,null,aH,{kind:"method",name:"_handleTextSelection",static:!1,private:!1,access:{has:e=>"_handleTextSelection"in e,get:e=>e._handleTextSelection},metadata:e},null,aZ),(0,a9.G4)(this,null,aD,{kind:"method",name:"_handleAnimationType",static:!1,private:!1,access:{has:e=>"_handleAnimationType"in e,get:e=>e._handleAnimationType},metadata:e},null,aZ),(0,a9.G4)(this,null,aG,{kind:"method",name:"_handleAnimationVelocity",static:!1,private:!1,access:{has:e=>"_handleAnimationVelocity"in e,get:e=>e._handleAnimationVelocity},metadata:e},null,aZ),(0,a9.G4)(this,null,aj,{kind:"method",name:"_handleAnimationPaused",static:!1,private:!1,access:{has:e=>"_handleAnimationPaused"in e,get:e=>e._handleAnimationPaused},metadata:e},null,aZ),(0,a9.G4)(this,null,a$,{kind:"method",name:"_handleInitialAnimationStep",static:!1,private:!1,access:{has:e=>"_handleInitialAnimationStep"in e,get:e=>e._handleInitialAnimationStep},metadata:e},null,aZ),(0,a9.G4)(this,null,aV,{kind:"method",name:"_handleContentComplete",static:!1,private:!1,access:{has:e=>"_handleContentComplete"in e,get:e=>e._handleContentComplete},metadata:e},null,aZ),(0,a9.G4)(this,null,aW,{kind:"method",name:"_handleTypewriterDynamicHeight",static:!1,private:!1,access:{has:e=>"_handleTypewriterDynamicHeight"in e,get:e=>e._handleTypewriterDynamicHeight},metadata:e},null,aZ),(0,a9.G4)(this,null,aU,{kind:"method",name:"_handleTypewriterHeightTransition",static:!1,private:!1,access:{has:e=>"_handleTypewriterHeightTransition"in e,get:e=>e._handleTypewriterHeightTransition},metadata:e},null,aZ),(0,a9.G4)(this,null,aB,{kind:"method",name:"_handleTextMaxline",static:!1,private:!1,access:{has:e=>"_handleTextMaxline"in e,get:e=>e._handleTextMaxline},metadata:e},null,aZ),(0,a9.G4)(this,null,aX,{kind:"method",name:"_handleContentRange",static:!1,private:!1,access:{has:e=>"_handleContentRange"in e,get:e=>e._handleContentRange},metadata:e},null,aZ),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static observedAttributes=["content","markdown-style","content-id","text-selection","animation-type","animation-velocity","animation-paused","initial-animation-step","content-complete","typewriter-dynamic-height","typewriter-height-transition-duration","text-maxline","content-range","markdown-effect"];#n=(0,a9.zF)(this,aZ);#n$=(0,a6.Ut)(()=>this.#n.shadowRoot,"#markdown-root");#nV=(0,a6.Ut)(()=>this.#n.shadowRoot,"#markdown-style");#nW=!1;#nU="";#nB="";#nX;#nZ=!1;#nq=!1;#nY="";#nJ;#nK=60;#nQ="";#n0=!1;#n1;#tk;#n4=null;#n2;#n3="none";#n8=40;#n9;#n6=0;#n5=!1;#n7=!1;#le=!0;#lt=0;#ln=!1;#ll=0;#li=null;#la;#ls=0;#lo=!1;#lr;#ld=null;constructor(e){this.#n=e}connectedCallback(){this.#lh()}dispose(){this.#lc(),this.#lu(),clearTimeout(this.#n1),this.#n1=void 0,this.#nZ&&(this.#n$().removeEventListener("click",this.#lm),this.#nZ=!1),this.#nq&&(document.removeEventListener("selectionchange",this.#tL),document.removeEventListener("mouseup",this.#lp),document.removeEventListener("touchend",this.#lp),document.removeEventListener("keyup",this.#lp),this.#nq=!1)}#lh(){this.#nZ||(this.#n$().addEventListener("click",this.#lm),this.#nZ=!0,this.#nq||(document.addEventListener("selectionchange",this.#tL),document.addEventListener("mouseup",this.#lp),document.addEventListener("touchend",this.#lp),document.addEventListener("keyup",this.#lp),this.#nq=!0))}#lm=e=>{let t=e.target;if(!t)return;let n=this.#n$(),l=t.closest("a");if(l&&n.contains(l)){e.preventDefault(),this.#n.dispatchEvent(new CustomEvent("bindlink",{detail:{url:l.getAttribute("href")??"",content:l.textContent??"",contentId:this.#nX},bubbles:!0,composed:!0}));return}let i=t.closest("img");i&&n.contains(i)&&this.#n.dispatchEvent(new CustomEvent("bindimageTap",{detail:{url:i.getAttribute("src")??"",contentId:this.#nX},bubbles:!0,composed:!0}))};#lv(){if(this.#n0)try{let e=this.#n$(),t=((e,t)=>{var n;let l=e.ownerDocument,i=e.shadowRoot,a=[(null==i||null==(n=i.getSelection)?void 0:n.call(i))??null,l.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t),s=null,o=null;for(let n of a){let a=oE(l,e,t,i,n);if(a&&!a.collapsed){s=a,o=n;break}}if(!s||!o)return of();let r=oS(l,t,s.startContainer,s.startOffset),d=oS(l,t,s.endContainer,s.endOffset);if(null===r||null===d||r===d)return of();let h=oS(l,t,o.anchorNode,o.anchorOffset),c=oS(l,t,o.focusNode,o.focusOffset);return{start:Math.min(r,d),end:Math.max(r,d),direction:null!==h&&null!==c&&h>c?"backward":"forward"}})(this.#n,e),n=`${t.start}:${t.end}:${t.direction}`;if(n===this.#tk)return;this.#tk=n,this.#n.dispatchEvent(new CustomEvent("bindselectionchange",{detail:t,bubbles:!0,composed:!0}))}catch{}}#lb=()=>{clearTimeout(this.#n1),this.#n1=setTimeout(()=>{this.#n1=void 0,this.#lv()},0)};#tL=()=>{this.#lv(),this.#lb()};#lp=()=>{this.#lv(),this.#lb()};#lg(){if(!this.#nW){if(this.#nW=!0,!od&&!s)return void(od?Promise.resolve():a||(a=n.e(166).then(n.bind(n,91827)).then(e=>{l=e.MarkdownIt,i=e.createDOMPurify,od=!0}).catch(e=>{s=e}))).then(()=>{this.#nW=!1,this.#lf()});(0,a6.JS)(()=>{this.#nW=!1,this.#lf()})}}#lf(){let e=this.#n$();if(!this.#nU){this.#ly(),e.innerHTML="",this.#nB="",this.#nY="",this.#lc();return}if("typewriter"===this.#n3)return void this.#lE(e);let t=ob();if(!t){let t=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.textContent=t,this.#nB=t,this.#nY="",this.#lc();return}if(this.#lS())return void this.#lw(e);let n=this.#lr?this.#nU.slice(this.#lr[0],this.#lr[1]):this.#nU;e.innerHTML=og(ow(om(t,n))),this.#l_(e),this.#nB=n,this.#nY="",this.#lc(),this.#lC(),this.#lT(e)}#lS(){return!!this.#nB&&!!this.#nU.startsWith(this.#nB)&&this.#nU.length!==this.#nB.length}#lw(e){let t=this.#nU.slice(this.#nB.length);if(!t)return;let n=t.lastIndexOf("\n");if(-1===n){this.#nY=t,this.#lx();return}let l=t.slice(0,n+1);if(l){let t=ob();if(!t)return;let n=om(t,l);this.#lk(e,n),this.#nB+=l}this.#nY=t.slice(n+1),this.#nY?this.#lx():this.#lc()}#lx(){this.#lc(),this.#nJ=setTimeout(()=>{this.#nJ=void 0,this.#lO()},this.#nK)}#lc(){this.#nJ&&(clearTimeout(this.#nJ),this.#nJ=void 0)}#ly(){this.#lu(),this.#n5=!1,this.#n6=0,this.#lt=0,this.#lL()}#lO(){if(!this.#nY||!this.#nU.startsWith(this.#nB))return;let e=this.#nB.length+this.#nY.length;if(this.#nU.length!==e)return;let t=this.#n$(),n=ob();if(!n)return;let l=om(n,this.#nY);this.#lk(t,l),this.#nB+=this.#nY,this.#nY="",this.#lC(),this.#lT(this.#n$())}#lk(e,t){let n=document.createElement("template");n.innerHTML=og(ow(t)),e.append(n.content),this.#lT(e),this.#l_(e)}#lA(e){var t,n;if(!this.#ld||"text-mask"!==this.#ld.type||!1!==this.#le&&this.#n6>=this.#lt)return;let{color:l,rangeStart:i,rangeEnd:a}=this.#ld;if(!l||"number"!=typeof i)return;e.querySelectorAll(".md-text-mask-effect").forEach(e=>{let t=e.querySelector(".md-text-mask-effect-content"),n=e.parentNode;if(t&&n){for(;t.firstChild;)n.insertBefore(t.firstChild,e);n.removeChild(e)}});let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=[];for(;s.nextNode();){let n=s.currentNode,l=n.parentElement;l===e&&((null==(t=n.nodeValue)?void 0:t.trim())??"")===""||l&&(l.closest(".md-typewriter-cursor")||l.closest(".md-truncation")||l.closest(".md-text-mask-effect-overlay"))||o.push(n)}let r=o.reduce((e,t)=>{var n;return e+((null==(n=t.nodeValue)?void 0:n.length)??0)},0),d=i<0?r+i:i,h=Math.max(0,Math.min(r,d)),c=Math.max(h,Math.min(r,("number"==typeof a?a<0?r+a:a:d)+1));if(c<=h)return;let u=0,m=[];if(o.forEach(e=>{var t;let n=(null==(t=e.nodeValue)?void 0:t.length)??0,l=u,i=u+n,a=Math.max(h,l)-l,s=Math.min(c,i)-l;a<s&&m.push({node:e,startOffset:a,endOffset:s}),u=i}),0===m.length)return;let p=[];for(let{node:e,startOffset:t,endOffset:i}of m.reverse()){let a=e;t>0&&(a=e.splitText(t));let s=i-t;s<((null==(n=a.nodeValue)?void 0:n.length)??0)&&a.splitText(s);let o=a.nodeValue??"",r=document.createElement("span");r.className="md-text-mask-effect";let d=document.createElement("span");d.className="md-text-mask-effect-content";let h=document.createElement("span");h.className="md-text-mask-effect-overlay",h.setAttribute("aria-hidden","true"),h.textContent=o,h.style.background=l;let c=a.parentNode;c&&(c.insertBefore(r,a),d.appendChild(a),r.append(d,h),p.unshift({content:d,overlay:h}))}if(0===p.length)return;let v=p.map(e=>{let{content:t}=e;return t.getBoundingClientRect().width}),b=v.reduce((e,t)=>e+t,0);if(b<=0)return;let g=0;p.forEach((e,t)=>{let{overlay:n}=e;n.style.backgroundRepeat="no-repeat",n.style.backgroundSize=`${b}px 100%`,n.style.backgroundPosition=`${-g}px 0`,g+=v[t]??0})}#lC(){this.#n.dispatchEvent(new CustomEvent("bindparseEnd",{detail:{id:this.#nX},bubbles:!0,composed:!0}))}#lT(e){if(this.#lA(e),this.#ls>0?queueMicrotask(()=>{try{e.scrollHeight>e.clientHeight+1&&!this.#lo&&(this.#lo=!0,this.#n.dispatchEvent(new CustomEvent("bindoverflow",{detail:{type:"ellipsis"},bubbles:!0,composed:!0})))}catch{}}):this.#lo=!1,"typewriter"===this.#n3&&this.#ln){let t=this.#ll;t>0&&(e.style.transition=`height ${t}s ease`)}else e.style.transition="";this.#ls>0&&this.#lI(e)||this.#lF()}#lE(e){let[t,n]=this.#lr?this.#lr:[0,this.#nU.length];this.#lt=Math.max(0,n-t),!this.#n5&&(this.#n5=!0,this.#n.dispatchEvent(new CustomEvent("binddrawStart",{bubbles:!0,composed:!0})),this.#n7||this.#lR());let l=this.#nU.slice(t,t+this.#n6),i=ob();i?(e.innerHTML=og(ow(om(i,l))),this.#l_(e)):e.textContent=l,this.#lM(e),this.#lT(e),this.#n6>=this.#lt&&(this.#lu(),!1!==this.#le&&this.#n.dispatchEvent(new CustomEvent("binddrawEnd",{bubbles:!0,composed:!0})))}#lR(){this.#lu();let e=Math.max(10,Math.floor(1e3/Math.max(1,this.#n8)));this.#n9=setInterval(()=>{if(this.#n6<this.#lt){this.#n6+=1,this.#n.dispatchEvent(new CustomEvent("bindanimationStep",{detail:{animationStep:this.#n6,maxAnimationStep:this.#lt},bubbles:!0,composed:!0}));let e=this.#n$();this.#lE(e)}else this.#lu()},e)}#lu(){this.#n9&&(clearInterval(this.#n9),this.#n9=void 0)}#lP(e){let t=ok(e);this.#n4=t.truncation??null,this.#li=t.typewriterCursor??null;let{truncation:n,typewriterCursor:l,...i}=t;this.#nQ=(e=>{let t=[];for(let[n,l]of Object.entries(e)){if(!l||"object"!=typeof l)continue;let e=[];if(n.startsWith(".")||n.startsWith("#"))e=[`.markdown-body ${n}`];else{if(!oC[n])continue;e=Array.isArray(oC[n])?oC[n]:[oC[n]]}let i=Object.entries(l).map(e=>{let[t,n]=e,l=oT(t),i=ox(l,n);return i?`${l}: ${i};`:null}).filter(Boolean).join("");if(i)for(let n of e)t.push(`${n} {${i}}`)}return t.join("\n")})(i),this.#lz()}#lz(){let e=this.#nV(),t=this.#nQ||"";this.#n0&&(t+="\n.markdown-body { user-select: text; }"),this.#ls>0&&(t+=`
365
365
  .markdown-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${this.#ls}; overflow: hidden; }`),e.textContent=t}_handleContent(e){let t=e??"",n=t!==this.#nU;this.#nU=t,n&&"typewriter"===this.#n3&&this.#ly(),this.#lg()}_handleMarkdownEffect(e){try{this.#ld=e?JSON.parse(e):null}catch{this.#ld=null}this.#lg()}_handleMarkdownStyle(e){this.#lP(e)}_handleContentId(e){this.#nX=e??void 0}_handleTextSelection(e){this.#n0=!!(e&&"false"!==e),this.#n0||(clearTimeout(this.#n1),this.#n1=void 0,this.#tk=void 0),this.#lz()}_handleAnimationType(e){let t=(e??"none").toLowerCase();this.#n3="typewriter"===t?"typewriter":"none",this.#n5=!1,this.#lu(),this.#lg()}_handleAnimationVelocity(e){let t=Number(e);!Number.isNaN(t)&&t>0&&(this.#n8=t),"typewriter"===this.#n3&&!this.#n7&&this.#n9&&this.#lR()}_handleAnimationPaused(e){(this.#n7=!!(e&&"false"!==e),this.#n7)?this.#lu():"typewriter"===this.#n3&&this.#n5&&this.#n6<this.#lt&&this.#lR()}_handleInitialAnimationStep(e){let t=Number(e);this.#n6=Number.isNaN(t)?0:Math.max(0,Math.floor(t))}_handleContentComplete(e){this.#le="false"!==e}_handleTypewriterDynamicHeight(e){this.#ln=!!(e&&"false"!==e)}_handleTypewriterHeightTransition(e){let t=Number(e);this.#ll=Number.isNaN(t)?0:Math.max(0,t)}_handleTextMaxline(e){let t=Number(e);this.#ls=Number.isNaN(t)?0:Math.max(0,Math.floor(t)),this.#lz()}_handleContentRange(e){if(e)try{let t=JSON.parse(e);if(Array.isArray(t)&&2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#lr=[Math.max(0,e),Math.max(0,n)])}}catch{let t=e.split(",");if(2===t.length){let e=Number(t[0]),n=Number(t[1]);Number.isNaN(e)||Number.isNaN(n)||!(n>=e)||(this.#lr=[Math.max(0,e),Math.max(0,n)])}}else this.#lr=void 0;this.#lg()}#l_(e){try{for(let t of Array.from(e.querySelectorAll("img"))){let e=t.getAttribute("data-inlineview");if(e){let n=document.createElement("span");n.className="md-inline-view";let l=document.createElement("slot");l.name=e,n.appendChild(l),t.replaceWith(n)}}}catch{}}#lI(e){if(!(e.scrollHeight>e.clientHeight+1))return!1;if(!this.#n2){let t=document.createElement("span");t.className="md-truncation",this.#n2=t,e.appendChild(t)}let t=this.#n4||{},n=this.#n2;if(n.textContent="",n.innerHTML="","view"===t.truncationType&&t.content){let e=this.#n.querySelector(`#${CSS.escape(String(t.content))}`);e?n.appendChild(e):n.textContent="…"}else t.content?n.textContent=String(t.content):n.textContent="…";return!0}#lF(){this.#n2&&this.#n2.parentNode&&this.#n2.parentNode.removeChild(this.#n2),this.#n2=void 0}#lM(e){if(!1!==this.#le&&this.#n6>=this.#lt)return void this.#lL();let t=this.#li||{},n=t.customCursor;if("none"===n)return void this.#lL();if(!this.#la){let l=document.createElement("span");if(l.className="md-typewriter-cursor",this.#la=l,t.verticalAlign&&(l.style.verticalAlign=t.verticalAlign),n){let t=this.#n.querySelector(`#${CSS.escape(n)}`)||e.querySelector(`#${CSS.escape(n)}`);t?l.appendChild(t):l.textContent="…"}else l.textContent="…"}let l=e;for(;;){let e=l.lastChild;for(;e;)if(e.nodeType!==Node.TEXT_NODE||e.textContent&&""!==e.textContent.trim())break;else e=e.previousSibling;if(e&&e.nodeType===Node.ELEMENT_NODE&&!["IMG","BR","HR","INPUT","TABLE","PRE","CODE"].includes(e.tagName))l=e;else break}l.appendChild(this.#la)}#lL(){this.#la&&this.#la.parentNode&&this.#la.parentNode.removeChild(this.#la),this.#la=void 0}}),oL=(e,t,n)=>{let l=0,i=Math.max(0,Math.min(n,e.length));for(let n=0;n<i&&!(l>=t.length);n+=1)e[n]===t[l]&&(l+=1);return l},oA=(e,t,n)=>!!n&&(n===e||n===t||e.contains(n)||!!(null==t?void 0:t.contains(n))),oI=(e,t,n)=>{if(!n)return null;let l=e.shadowRoot,i=((e,t)=>{let n=e.getComposedRanges;if(!t||"function"!=typeof n)return null;try{return n.call(e,{shadowRoots:[t]})[0]??null}catch{try{return n.call(e,t)[0]??null}catch{return null}}})(n,l)??(n.rangeCount>0?n.getRangeAt(0):null);if(!i)return null;if(!t.contains(i.startContainer)||!t.contains(i.endContainer)){var a;if(!oA(e,l,i.startContainer)||!oA(e,l,i.endContainer)||!oA(e,l,n.anchorNode)||!oA(e,l,n.focusNode))return null;let s=n.toString();if(!s)return null;let o=(null==(a=t.textContent)?void 0:a.indexOf(s))??-1;return o<0?null:((e,t,n,l)=>{let i=e.createTreeWalker(t,NodeFilter.SHOW_TEXT),a=0,s=null,o=0,r=null,d=0,h=i.nextNode();for(;h;){var c;let e=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&a+e>=n&&(s=h,o=n-a),a+e>=l){r=h,d=l-a;break}a+=e,h=i.nextNode()}if(!s)return null;r||(r=s,d=o);let u=e.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(e.ownerDocument,t,o,o+s.length)}let s=e.ownerDocument.createRange();return s.setStart(i.startContainer,i.startOffset),s.setEnd(i.endContainer,i.endOffset),s},oF=e=>{let t=e.shadowRoot;return[t&&"function"==typeof t.getSelection?t.getSelection():null,e.ownerDocument.getSelection()].filter((e,t,n)=>!!e&&n.indexOf(e)===t)},oR=(e,t)=>{for(let n of oF(e)){let l=oI(e,t,n);if(l)return{selection:n,range:l}}return null};aQ=[(0,a6.uA)("x-markdown",[a5.O,oO],sp)],a0=[],a1=HTMLElement,aq=(0,or._)("markdown-style"),aY=(0,or._)("markdown-style"),class extends a1{static #e=aK=this;static #t=(()=>{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(a1[Symbol.metadata]??null):void 0;(0,a9.G4)(null,aJ={value:aK},aQ,{kind:"class",name:aK.name,metadata:e},null,a0),aK=aJ.value,e&&Object.defineProperty(aK,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})();static notToFilterFalseAttributes=new Set(["content-complete"]);#lN(){return ok(this.getAttribute("markdown-style"))}#lH(e){let t=null==e?null:"string"==typeof e?e:JSON.stringify(e);null===t?this.removeAttribute("markdown-style"):this.setAttribute("markdown-style",t)}get markdownStyle(){return this.#lN()}set markdownStyle(e){this.#lH(e)}get[aq](){return this.#lN()}set[aY](e){this.#lH(e)}getImages(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("#markdown-root");return t?Array.from(t.querySelectorAll("img")).map(e=>e.getAttribute("src")||"").filter(e=>!!e):[]}getContent(e){let t=this.getAttribute("content")??"",n=Math.max(0,(null==e?void 0:e.start)??0),l=(null==e?void 0:e.end)??t.length-1,i=Math.min(t.length,l+1);return{content:i>=n?t.slice(n,i):""}}pauseAnimation(){this.setAttribute("animation-paused","true")}resumeAnimation(e){(null==e?void 0:e.animationStep)!==void 0&&this.setAttribute("initial-animation-step",String(e.animationStep)),"typewriter"!==this.getAttribute("animation-type")&&this.setAttribute("animation-type","typewriter");let t=this.getAttribute("animation-velocity");(!t||0>=Number(t))&&this.setAttribute("animation-velocity","40"),this.removeAttribute("animation-paused")}getSelectedText(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("#markdown-root");if(!t)return"";let n=oR(this,t);return(null==n?void 0:n.range.toString())??""}getTextBoundingRect(e){var t,n,l;let i=null==(t=this.shadowRoot)?void 0:t.querySelector("#markdown-root");if(!i)return null;let a=this.ownerDocument;if((null==e?void 0:e.start)!==void 0||(null==e?void 0:e.end)!==void 0){let t,s=Math.max(0,(null==e?void 0:e.start)??0),o=Math.max(s,(null==e?void 0:e.end)??s),r=(null==e?void 0:e.indexType)==="source"?(n=this.getAttribute("content")??"",l=i.textContent??"",{start:t=oL(n,l,s),end:Math.max(t,oL(n,l,o))}):{start:s,end:o};if(!r)return null;let d=((e,t)=>{let n=a.createTreeWalker(i,NodeFilter.SHOW_TEXT),l=0,s=null,o=0,r=null,d=0,h=n.nextNode();for(;h;){var c;let i=(null==(c=h.nodeValue)?void 0:c.length)??0;if(!s&&l+i>=e&&(s=h,o=e-l),l+i>=t){r=h,d=t-l;break}l+=i,h=n.nextNode()}if(!s)return null;r||(r=s,d=o);let u=a.createRange();return u.setStart(s,Math.max(0,Math.min(o,s.length))),u.setEnd(r,Math.max(0,Math.min(d,r.length))),u})(r.start,r.end);return d?{boundingRect:d.getBoundingClientRect()}:null}let s=oR(this,i);return s?{boundingRect:s.range.getBoundingClientRect()}:null}setTextSelection(e){let t=this.ownerDocument,n=(e,n)=>{if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,n);if(t.caretPositionFromPoint){let l=t.caretPositionFromPoint(e,n);if(!l)return null;let i=this.ownerDocument.createRange();return i.setStart(l.offsetNode,l.offset),i.collapse(!0),i}return null},l=n(e.startX,e.startY),i=n(e.endX,e.endY);if(l&&i){let e=oF(this)[0]??null;if(!e)return;e.removeAllRanges();let t=this.ownerDocument.createRange();t.setStart(l.startContainer,l.startOffset),t.setEnd(i.startContainer,i.startOffset),e.addRange(t)}}getParseResult(e){var t;let n=null==(t=this.shadowRoot)?void 0:t.querySelector("#markdown-root");if(!n)return{};let l=n.textContent||"",i={},a=this.ownerDocument,s=e=>{let t=a.createTreeWalker(n,NodeFilter.SHOW_TEXT),i=0,s=-1,o=-1,r=t.nextNode();for(;r;){let n=(r.nodeValue||"").length;(r===e||e.contains(r))&&(s<0&&(s=i),o=i+n),i+=n,r=t.nextNode()}return{start:Math.max(0,Math.min(s,l.length)),end:Math.max(0,Math.min(o,l.length))}};for(let t of e.tags){let e=Array.from(n.querySelectorAll(t));i[t]=e.map(e=>s(e))}return i}static #C=(0,a9.zF)(aK,a0)}}}]);