nam-rich-text-editor 9.0.2 → 9.0.4
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.
- package/dist/rich-text-editor.es.js +1512 -2667
- package/dist/rich-text-editor.umd.js +8 -20
- package/dist/test.d.ts +1 -0
- package/dist/toolbars/HyperlinkButton.d.ts +1 -0
- package/dist/toolbars/InsertVideoButton.d.ts +1 -0
- package/dist/toolbars/QuoteButton.d.ts +1 -0
- package/dist/toolbars/RemoveFormatButton.d.ts +1 -0
- package/package.json +8 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(he,ve){typeof exports=="object"&&typeof module<"u"?ve(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ve):(he=typeof globalThis<"u"?globalThis:he||self,ve(he.RichTextEditor={},he.React))})(this,(function(he,ve){"use strict";function Hn(){const d=document.createElement("select");return d.innerHTML=`
|
|
2
2
|
<option value="Arial">Arial</option>
|
|
3
3
|
<option value="Times New Roman">Times New Roman</option>
|
|
4
4
|
<option value="Courier New">Courier New</option>
|
|
5
5
|
<option value="Georgia">Georgia</option>
|
|
6
6
|
<option value="Verdana">Verdana</option>
|
|
7
|
-
`,
|
|
7
|
+
`,d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="4px",d.style.borderRadius="3px",d.style.color="#000000",d.onchange=()=>document.execCommand("fontName",!1,d.value),d}function Bn(){const d=document.createElement("select");return d.innerHTML=`
|
|
8
8
|
<option value="1">8pt</option>
|
|
9
9
|
<option value="2">10pt</option>
|
|
10
10
|
<option value="3" selected>12pt</option>
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
<option value="5">18pt</option>
|
|
13
13
|
<option value="6">24pt</option>
|
|
14
14
|
<option value="7">36pt</option>
|
|
15
|
-
`,
|
|
15
|
+
`,d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="4px",d.style.borderRadius="3px",d.style.color="#000000",d.onchange=()=>document.execCommand("fontSize",!1,d.value),d}function Yn(){const d=document.createElement("select");return d.title="Heading",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="4px",d.style.borderRadius="3px",d.style.color="#000000",d.innerHTML=`
|
|
16
16
|
<option value="p">Normal</option>
|
|
17
17
|
<option value="h1">Heading 1</option>
|
|
18
18
|
<option value="h2">Heading 2</option>
|
|
19
19
|
<option value="h3">Heading 3</option>
|
|
20
20
|
<option value="h4">Heading 4</option>
|
|
21
|
-
`,v.onchange=()=>{const y=v.value,E=y==="p"?"P":y.toUpperCase();document.execCommand("formatBlock",!1,`<${E}>`)},v}const Zn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const sn=([v,y,E])=>{const g=document.createElementNS("http://www.w3.org/2000/svg",v);return Object.keys(y).forEach(w=>{g.setAttribute(w,String(y[w]))}),E?.length&&E.forEach(w=>{const O=sn(w);g.appendChild(O)}),g},Ye=(v,y={})=>{const g={...Zn,...y};return sn(["svg",g,v])};const er=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]];const tr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];const nr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]];const rr=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m7 8-4 4 4 4"}]];const or=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m3 8 4 4-4 4"}]];const ir=[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]];const ar=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const sr=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"}]];const cr=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"}]];const ur=[["path",{d:"M21 7v6h-6"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"}]];const lr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]];const fr=[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]];const pr=[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]];const dr=[["path",{d:"M3 5h18"}],["path",{d:"M3 12h18"}],["path",{d:"M3 19h18"}]];const hr=[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]];const vr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]];const gr=[["path",{d:"M3 7v6h6"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"}]];function mr(){const v=document.createDocumentFragment();return[{command:"bold",icon:er,title:"Bold"},{command:"italic",icon:nr,title:"Italic"},{command:"underline",icon:vr,title:"Underline"},{command:"strikeThrough",icon:lr,title:"Strikethrough"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.fontWeight=E.command==="bold"?"bold":"normal",g.style.fontStyle=E.command==="italic"?"italic":"normal",g.style.textDecoration=E.command==="underline"?"underline":"none",g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}let ht=null;function st(v){if(v){ht=v.cloneRange();return}const y=window.getSelection();if(!y||y.rangeCount===0){ht=null;return}ht=y.getRangeAt(0).cloneRange()}function cn(){const v=window.getSelection();v&&(v.removeAllRanges(),ht&&v.addRange(ht.cloneRange()))}function un(v,y){const E=window.getSelection();if(!E||E.rangeCount===0)return;const g=E.getRangeAt(0);if(!g.collapsed){const J=document.createElement("span");J.style[v]=y;const L=g.extractContents();J.appendChild(L),g.insertNode(J),E.removeAllRanges();const de=document.createRange();de.selectNodeContents(J),E.addRange(de),st(de);return}const w=document.createElement("span");w.style[v]=y,w.appendChild(document.createTextNode("")),g.insertNode(w),E.removeAllRanges();const O=document.createRange();O.setStart(w.firstChild,0),O.setEnd(w.firstChild,0),E.addRange(O),st(O)}function yr(v){un("color",v)}function br(v){un("backgroundColor",v)}function xr(){const v=document.createDocumentFragment(),y=document.createElement("input");y.type="color",y.style.display="none",y.title="Text Color";const E=document.createElement("button");E.textContent="A",E.style.color="#000",E.style.fontSize="16px",E.style.fontWeight="bold",E.style.border="1px solid #ccc",E.style.borderRadius="4px",E.style.padding="4px 8px",E.style.cursor="pointer",E.style.backgroundColor="#fff",E.title="Text Color",E.onclick=()=>y.click(),y.onchange=()=>{cn(),yr(y.value),E.style.color=y.value},v.appendChild(E),v.appendChild(y);const g=document.createElement("input");g.type="color",g.style.display="none",g.title="Background Color";const w=document.createElement("button");return w.textContent="BA",w.style.color="#000",w.style.fontSize="14px",w.style.fontWeight="bold",w.style.border="1px solid #ccc",w.style.borderRadius="4px",w.style.padding="4px 6px",w.style.cursor="pointer",w.style.backgroundColor="#fff",w.title="Background Color",w.onclick=()=>g.click(),g.onchange=()=>{cn(),br(g.value),w.style.backgroundColor=g.value,w.style.color="#000"},v.appendChild(w),v.appendChild(g),v}function Er(){const v=document.createDocumentFragment();return[{command:"justifyLeft",icon:hr,title:"Align Left"},{command:"justifyCenter",icon:fr,title:"Align Center"},{command:"justifyRight",icon:pr,title:"Align Right"},{command:"justifyFull",icon:dr,title:"Justify"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function wr(){const v=document.createDocumentFragment();return[{command:"insertUnorderedList",icon:ar,title:"Bullet List"},{command:"insertOrderedList",icon:ir,title:"Numbered List"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function _r(){const v=document.createDocumentFragment();return[{command:"indent",icon:or,title:"Increase Indent"},{command:"outdent",icon:rr,title:"Decrease Indent"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function Tr(){const v=document.createDocumentFragment();return[{command:"undo",icon:gr,title:"Undo"},{command:"redo",icon:ur,title:"Redo"}].forEach(E=>{const g=document.createElement("button"),w=Ye(E.icon,{width:16,height:16});g.appendChild(w),g.title=E.title,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="6px 10px",g.style.borderRadius="3px",g.style.cursor="pointer",g.style.color="#000000",g.onmouseover=()=>g.style.backgroundColor="#f0f0f0",g.onmouseout=()=>g.style.backgroundColor="#ffffff",g.onclick=()=>document.execCommand(E.command),v.appendChild(g)}),v}function Sr(){const v=document.createElement("button"),y=Ye(tr,{width:16,height:16});return v.appendChild(y),v.title="Insert Image",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="6px 10px",v.style.borderRadius="3px",v.style.cursor="pointer",v.style.color="#000000",v.onmouseover=()=>v.style.backgroundColor="#f0f0f0",v.onmouseout=()=>v.style.backgroundColor="#ffffff",v}function kr(){const v=document.createElement("button"),y=Ye(sr,{width:16,height:16}),E=Ye(cr,{width:16,height:16});v.appendChild(y),v.title="Toggle Fullscreen",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.padding="6px 10px",v.style.borderRadius="3px",v.style.cursor="pointer",v.style.color="#000000",v.onmouseover=()=>v.style.backgroundColor="#f0f0f0",v.onmouseout=()=>v.style.backgroundColor="#ffffff";let g=!1;return v.onclick=()=>{const w=document.querySelector(".editor-container");if(!w)return;const O=w.querySelector(".editor");g?(w.style.position="",w.style.top="",w.style.left="",w.style.width="",w.style.height="",w.style.zIndex="",w.style.backgroundColor="",w.style.display="",w.style.flexDirection="",O&&(O.style.flexGrow="",O.style.overflowY="",O.style.border="",O.style.borderRadius="",O.style.boxShadow=""),v.replaceChild(y,E),g=!1):(w.style.position="fixed",w.style.top="0",w.style.left="0",w.style.width="100vw",w.style.height="100vh",w.style.zIndex="9999",w.style.backgroundColor="#ffffff",w.style.display="flex",w.style.flexDirection="column",O&&(O.style.flexGrow="1",O.style.overflowY="auto",O.style.border="none",O.style.borderRadius="0",O.style.boxShadow="none"),v.replaceChild(E,y),g=!0)},v}function Rr(){const v=document.createElement("div");v.style.display="flex",v.style.flexWrap="wrap",v.style.gap="8px",v.style.marginBottom="10px",v.style.padding="12px",v.style.border="1px solid #e1e1e1",v.style.backgroundColor="#ffffff",v.style.borderRadius="4px",v.style.boxShadow="0 1px 3px rgba(0,0,0,0.1)";const y=dt();y.innerHTML=`
|
|
21
|
+
`,d.onchange=()=>{const h=d.value,g=h==="p"?"P":h.toUpperCase();document.execCommand("formatBlock",!1,`<${g}>`)},d}const Vn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Ht=([d,h,g])=>{const f=document.createElementNS("http://www.w3.org/2000/svg",d);return Object.keys(h).forEach(y=>{f.setAttribute(y,String(h[y]))}),g?.length&&g.forEach(y=>{const T=Ht(y);f.appendChild(T)}),f},Q=(d,h={})=>{const f={...Vn,...h};return Ht(["svg",f,d])};const Wn=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]];const Un=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];const Xn=[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]];const qn=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];const Gn=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m7 8-4 4 4 4"}]];const $n=[["path",{d:"M21 5H11"}],["path",{d:"M21 12H11"}],["path",{d:"M21 19H11"}],["path",{d:"m3 8 4 4-4 4"}]];const Jn=[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]];const Kn=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const Qn=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"}]];const Zn=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"}]];const er=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}]];const tr=[["path",{d:"M21 7v6h-6"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"}]];const nr=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];const rr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]];const or=[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]];const ir=[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]];const ar=[["path",{d:"M3 5h18"}],["path",{d:"M3 12h18"}],["path",{d:"M3 19h18"}]];const sr=[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]];const cr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]];const lr=[["path",{d:"M3 7v6h6"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"}]];const ur=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]];function pr(){const d=document.createDocumentFragment();return[{command:"bold",icon:Wn,title:"Bold"},{command:"italic",icon:Xn,title:"Italic"},{command:"underline",icon:cr,title:"Underline"},{command:"strikeThrough",icon:rr,title:"Strikethrough"}].forEach(g=>{const f=document.createElement("button"),y=Q(g.icon,{width:16,height:16});f.appendChild(y),f.title=g.title,f.style.fontWeight=g.command==="bold"?"bold":"normal",f.style.fontStyle=g.command==="italic"?"italic":"normal",f.style.textDecoration=g.command==="underline"?"underline":"none",f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}let De=null;function _e(d){if(d){De=d.cloneRange();return}const h=window.getSelection();if(!h||h.rangeCount===0){De=null;return}De=h.getRangeAt(0).cloneRange()}function Bt(){const d=window.getSelection();d&&(d.removeAllRanges(),De&&d.addRange(De.cloneRange()))}function Yt(d,h){const g=window.getSelection();if(!g||g.rangeCount===0)return;const f=g.getRangeAt(0);if(!f.collapsed){const z=document.createElement("span");z.style[d]=h;const R=f.extractContents();z.appendChild(R),f.insertNode(z),g.removeAllRanges();const ne=document.createRange();ne.selectNodeContents(z),g.addRange(ne),_e(ne);return}const y=document.createElement("span");y.style[d]=h,y.appendChild(document.createTextNode("")),f.insertNode(y),g.removeAllRanges();const T=document.createRange();T.setStart(y.firstChild,0),T.setEnd(y.firstChild,0),g.addRange(T),_e(T)}function dr(d){Yt("color",d)}function fr(d){Yt("backgroundColor",d)}function hr(){const d=document.createDocumentFragment(),h=document.createElement("input");h.type="color",h.style.display="none",h.title="Text Color";const g=document.createElement("button");g.textContent="A",g.style.color="#000",g.style.fontSize="16px",g.style.fontWeight="bold",g.style.border="1px solid #ccc",g.style.borderRadius="4px",g.style.padding="4px 8px",g.style.cursor="pointer",g.style.backgroundColor="#fff",g.title="Text Color",g.onclick=()=>h.click(),h.onchange=()=>{Bt(),dr(h.value),g.style.color=h.value},d.appendChild(g),d.appendChild(h);const f=document.createElement("input");f.type="color",f.style.display="none",f.title="Background Color";const y=document.createElement("button");return y.textContent="BA",y.style.color="#000",y.style.fontSize="14px",y.style.fontWeight="bold",y.style.border="1px solid #ccc",y.style.borderRadius="4px",y.style.padding="4px 6px",y.style.cursor="pointer",y.style.backgroundColor="#fff",y.title="Background Color",y.onclick=()=>f.click(),f.onchange=()=>{Bt(),fr(f.value),y.style.backgroundColor=f.value,y.style.color="#000"},d.appendChild(y),d.appendChild(f),d}function vr(){const d=document.createDocumentFragment();return[{command:"justifyLeft",icon:sr,title:"Align Left"},{command:"justifyCenter",icon:or,title:"Align Center"},{command:"justifyRight",icon:ir,title:"Align Right"},{command:"justifyFull",icon:ar,title:"Justify"}].forEach(g=>{const f=document.createElement("button"),y=Q(g.icon,{width:16,height:16});f.appendChild(y),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function gr(){const d=document.createDocumentFragment();return[{command:"insertUnorderedList",icon:Kn,title:"Bullet List"},{command:"insertOrderedList",icon:Jn,title:"Numbered List"}].forEach(g=>{const f=document.createElement("button"),y=Q(g.icon,{width:16,height:16});f.appendChild(y),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function mr(){const d=document.createDocumentFragment();return[{command:"indent",icon:$n,title:"Increase Indent"},{command:"outdent",icon:Gn,title:"Decrease Indent"}].forEach(g=>{const f=document.createElement("button"),y=Q(g.icon,{width:16,height:16});f.appendChild(y),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function yr(){const d=document.createDocumentFragment();return[{command:"undo",icon:lr,title:"Undo"},{command:"redo",icon:tr,title:"Redo"}].forEach(g=>{const f=document.createElement("button"),y=Q(g.icon,{width:16,height:16});f.appendChild(y),f.title=g.title,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="6px 10px",f.style.borderRadius="3px",f.style.cursor="pointer",f.style.color="#000000",f.onmouseover=()=>f.style.backgroundColor="#f0f0f0",f.onmouseout=()=>f.style.backgroundColor="#ffffff",f.onclick=()=>document.execCommand(g.command),d.appendChild(f)}),d}function br(){const d=document.createElement("button"),h=Q(Un,{width:16,height:16});return d.appendChild(h),d.title="Insert Image",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="6px 10px",d.style.borderRadius="3px",d.style.cursor="pointer",d.style.color="#000000",d.onmouseover=()=>d.style.backgroundColor="#f0f0f0",d.onmouseout=()=>d.style.backgroundColor="#ffffff",d}function xr(){const d=document.createElement("button"),h=Q(Qn,{width:16,height:16}),g=Q(Zn,{width:16,height:16});d.appendChild(h),d.title="Toggle Fullscreen",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.padding="6px 10px",d.style.borderRadius="3px",d.style.cursor="pointer",d.style.color="#000000",d.onmouseover=()=>d.style.backgroundColor="#f0f0f0",d.onmouseout=()=>d.style.backgroundColor="#ffffff";let f=!1;return d.onclick=()=>{const y=document.querySelector(".editor-container");if(!y)return;const T=y.querySelector(".editor");f?(y.style.position="",y.style.top="",y.style.left="",y.style.width="",y.style.height="",y.style.zIndex="",y.style.backgroundColor="",y.style.display="",y.style.flexDirection="",T&&(T.style.flexGrow="",T.style.overflowY="",T.style.border="",T.style.borderRadius="",T.style.boxShadow=""),d.replaceChild(h,g),f=!1):(y.style.position="fixed",y.style.top="0",y.style.left="0",y.style.width="100vw",y.style.height="100vh",y.style.zIndex="9999",y.style.backgroundColor="#ffffff",y.style.display="flex",y.style.flexDirection="column",T&&(T.style.flexGrow="1",T.style.overflowY="auto",T.style.border="none",T.style.borderRadius="0",T.style.boxShadow="none"),d.replaceChild(g,h),f=!0)},d}function wr(){const d=document.createDocumentFragment(),h=document.createElement("button"),g=Q(qn,{width:16,height:16});return h.appendChild(g),h.title="Insert Hyperlink",h.style.border="1px solid #e1e1e1",h.style.backgroundColor="#ffffff",h.style.padding="6px 10px",h.style.borderRadius="3px",h.style.cursor="pointer",h.style.color="#000000",h.onmouseover=()=>h.style.backgroundColor="#f0f0f0",h.onmouseout=()=>h.style.backgroundColor="#ffffff",h.onclick=()=>{const f=prompt("Enter the URL:");f&&document.execCommand("createLink",!1,f)},d.appendChild(h),d}function Er(){const d=document.createDocumentFragment(),h=document.createElement("button"),g=Q(er,{width:16,height:16});return h.appendChild(g),h.title="Insert Quote",h.style.border="1px solid #e1e1e1",h.style.backgroundColor="#ffffff",h.style.padding="6px 10px",h.style.borderRadius="3px",h.style.cursor="pointer",h.style.color="#000000",h.onmouseover=()=>h.style.backgroundColor="#f0f0f0",h.onmouseout=()=>h.style.backgroundColor="#ffffff",h.onclick=()=>document.execCommand("formatBlock",!1,"blockquote"),d.appendChild(h),d}function kr(){const d=document.createDocumentFragment(),h=document.createElement("button"),g=Q(nr,{width:16,height:16});return h.appendChild(g),h.title="Remove Formatting",h.style.border="1px solid #e1e1e1",h.style.backgroundColor="#ffffff",h.style.padding="6px 10px",h.style.borderRadius="3px",h.style.cursor="pointer",h.style.color="#000000",h.onmouseover=()=>h.style.backgroundColor="#f0f0f0",h.onmouseout=()=>h.style.backgroundColor="#ffffff",h.onclick=()=>document.execCommand("removeFormat"),d.appendChild(h),d}function Tr(){const d=document.createDocumentFragment(),h=document.createElement("button"),g=Q(ur,{width:16,height:16});return h.appendChild(g),h.title="Insert Video",h.style.border="1px solid #e1e1e1",h.style.backgroundColor="#ffffff",h.style.padding="6px 10px",h.style.borderRadius="3px",h.style.cursor="pointer",h.style.color="#000000",h.onmouseover=()=>h.style.backgroundColor="#f0f0f0",h.onmouseout=()=>h.style.backgroundColor="#ffffff",h.onclick=()=>{const f=prompt("Enter the video URL:");if(f){const y=`<video controls src="${f}" style="max-width: 100%;"></video>`;document.execCommand("insertHTML",!1,y)}},d.appendChild(h),d}function Sr(){const d=document.createElement("div");d.style.display="flex",d.style.flexWrap="wrap",d.style.gap="8px",d.style.marginBottom="10px",d.style.padding="12px",d.style.border="1px solid #e1e1e1",d.style.backgroundColor="#ffffff",d.style.borderRadius="4px",d.style.boxShadow="0 1px 3px rgba(0,0,0,0.1)";const h=Hn();h.innerHTML=`
|
|
22
22
|
<option value="Arial">Arial</option>
|
|
23
23
|
<option value="Times New Roman">Times New Roman</option>
|
|
24
24
|
<option value="Courier New">Courier New</option>
|
|
25
25
|
<option value="Georgia">Georgia</option>
|
|
26
26
|
<option value="Verdana">Verdana</option>
|
|
27
|
-
`,
|
|
27
|
+
`,h.style.border="1px solid #e1e1e1",h.style.backgroundColor="#ffffff",h.style.padding="4px",h.style.borderRadius="3px",h.style.color="#000000",h.onchange=()=>document.execCommand("fontName",!1,h.value),d.appendChild(h);const g=Yn();g.title="Heading",g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="4px",g.style.borderRadius="3px",g.style.color="#000000",g.innerHTML=`
|
|
28
28
|
<option value="p">Normal</option>
|
|
29
29
|
<option value="h1">Heading 1</option>
|
|
30
30
|
<option value="h2">Heading 2</option>
|
|
31
31
|
<option value="h3">Heading 3</option>
|
|
32
32
|
<option value="h4">Heading 4</option>
|
|
33
|
-
`,
|
|
33
|
+
`,g.onchange=()=>{const G=g.value,J=G==="p"?"P":G.toUpperCase();document.execCommand("formatBlock",!1,`<${J}>`)},d.appendChild(g),document.addEventListener("selectionchange",()=>{try{const G=window.getSelection();if(!G||!G.anchorNode)return;let J=G.anchorNode;for(;J&&J.nodeType!==Node.ELEMENT_NODE;)J=J.parentNode;if(!J)return;let V=J;for(;V&&V!==document.body&&V!==d.parentElement;){const ee=V.tagName?.toUpperCase?.();if(ee==="H1"||ee==="H2"||ee==="H3"||ee==="H4"||ee==="P"){g.value=ee==="P"?"p":ee.toLowerCase();return}V=V.parentElement}g.value="p"}catch{}});const f=Bn();f.innerHTML=`
|
|
34
34
|
<option value="1">8pt</option>
|
|
35
35
|
<option value="2">10pt</option>
|
|
36
36
|
<option value="3" selected>12pt</option>
|
|
@@ -38,21 +38,9 @@
|
|
|
38
38
|
<option value="5">18pt</option>
|
|
39
39
|
<option value="6">24pt</option>
|
|
40
40
|
<option value="7">36pt</option>
|
|
41
|
-
`,g.style.border="1px solid #e1e1e1",g.style.backgroundColor="#ffffff",g.style.padding="4px",g.style.borderRadius="3px",g.style.color="#000000",g.onchange=()=>document.execCommand("fontSize",!1,g.value),v.appendChild(g);const w=mr();v.appendChild(w);const O=xr();v.appendChild(O);const J=Er();v.appendChild(J);const L=wr();v.appendChild(L);const de=_r();v.appendChild(de);const ie=Tr();v.appendChild(ie);const Q=Sr();v.appendChild(Q);const ye=kr();return v.appendChild(ye),v}function Or(v,y){const E=document.createElement("div");return E.classList.add("editor"),E.contentEditable="true",E.style.color="#000000",E.style.border="1px solid #e1e1e1",E.style.minHeight="400px",E.style.padding="15px",E.style.fontFamily="Arial, sans-serif",E.style.fontSize="14px",E.style.lineHeight="1.5",E.style.outline="none",E.style.backgroundColor="#ffffff",E.style.borderRadius="4px",E.style.boxShadow="inset 0 1px 3px rgba(0,0,0,0.1)",E.style.direction="ltr",E.style.textAlign="left",E.innerHTML="<p>Start typing here...</p>",E.addEventListener("dragover",g=>{g.preventDefault(),g.stopPropagation()}),E.addEventListener("drop",g=>{g.preventDefault(),g.stopPropagation();const w=g.dataTransfer?.files;if(w&&w.length>0)for(let O=0;O<w.length;O++){const J=w[O];if(J.type.startsWith("image/")){const L=new FileReader;L.onload=de=>{const ie=document.createElement("img");ie.src=de.target?.result,ie.style.maxWidth="100%",ie.style.width="100%",ie.style.height="auto",ie.style.cursor="pointer",ie.draggable=!1;const Q=document.createElement("div");Q.className="editor-image-wrapper",Q.style.display="inline-block",Q.style.position="relative",Q.style.maxWidth="100%",Q.style.width="auto",Q.style.height="auto",Q.contentEditable="false",Q.style.userSelect="none",Q.style.boxSizing="border-box",Q.style.touchAction="none",Q.appendChild(ie),E.appendChild(Q)},L.readAsDataURL(J)}}}),E.addEventListener("click",g=>{const w=g.target;let O=w;w.tagName==="IMG"&&(O=w.parentElement),O&&O.classList.contains("editor-image-wrapper")&&y(O)}),E.addEventListener("keyup",()=>st()),E.addEventListener("mouseup",()=>st()),E.addEventListener("focus",()=>st()),window.addEventListener("selectionchange",()=>{try{const g=window.getSelection();if(!g||!g.anchorNode)return;let w=g.anchorNode;for(;w&&w.nodeType!==Node.ELEMENT_NODE;)w=w.parentNode;if(!w)return;E.contains(w)&&st()}catch{}}),E}function Cr(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var vt={exports:{}},Pr=vt.exports,ln;function Ar(){return ln||(ln=1,(function(v,y){(function(E,g){v.exports=g()})(Pr,(function(){function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(r){de(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function w(t){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fe(r.key),r)}}function L(t,e,n){return e&&J(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function de(t,e,n){return(e=fe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(t)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ye(t,e)}function se(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ne(t){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var n,r=Q(t);if(e){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(function(i,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return se(i)})(this,n)}}function ce(){return ce=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=(function(i,a){for(;!Object.prototype.hasOwnProperty.call(i,a)&&(i=Q(i))!==null;);return i})(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ce.apply(this,arguments)}function fe(t){var e=(function(n,r){if(typeof n!="object"||n===null)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var i=o.call(n,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t,"string");return typeof e=="symbol"?e:e+""}var Re=function(t){return!(!t||!t.Window)&&t instanceof t.Window},_e=void 0,ve=void 0;function Me(t){_e=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),ve=t}function pe(t){return Re(t)?t:(t.ownerDocument||t).defaultView||ve.window}typeof window<"u"&&window&&Me(window);var ge=function(t){return!!t&&w(t)==="object"},Ie=function(t){return typeof t=="function"},m={window:function(t){return t===ve||Re(t)},docFrag:function(t){return ge(t)&&t.nodeType===11},object:ge,func:Ie,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||w(t)!=="object")return!1;var e=pe(t)||ve;return/object|function/.test(typeof Element>"u"?"undefined":w(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return ge(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return ge(t)&&t.length!==void 0&&Ie(t.splice)}};function De(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function he(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="drag"){var r=n.prepared.axis;if(r==="x"||r==="y"){var o=r==="x"?"y":"x";e.page[o]=n.coords.start.page[o],e.client[o]=n.coords.start.client[o],e.delta[o]=0}}}var Te={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=Te.draggable,e.map.drag=Te,e.methodDict.drag="draggable",r.actions.drag=Te.defaults},listeners:{"interactions:before-action-move":De,"interactions:action-resume":De,"interactions:action-move":he,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,o=n.options.drag;if(o&&o.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(r&n.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return m.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):m.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:De,move:he,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},je=Te,G={init:function(t){var e=t;G.document=e.document,G.DocumentFragment=e.DocumentFragment||be,G.SVGElement=e.SVGElement||be,G.SVGSVGElement=e.SVGSVGElement||be,G.SVGElementInstance=e.SVGElementInstance||be,G.Element=e.Element||be,G.HTMLElement=e.HTMLElement||G.Element,G.Event=e.Event,G.Touch=e.Touch||be,G.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function be(){}var ee=G,re={init:function(t){var e=ee.Element,n=t.navigator||{};re.supportsTouch="ontouchstart"in t||m.func(t.DocumentTouch)&&ee.document instanceof t.DocumentTouch,re.supportsPointerEvent=n.pointerEnabled!==!1&&!!ee.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(n.platform),re.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),re.isIe9=/MSIE 9/.test(n.userAgent),re.isOperaMobile=n.appName==="Opera"&&re.supportsTouch&&/Presto/.test(n.userAgent),re.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?ee.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,re.wheelEvent=ee.document&&"onmousewheel"in ee.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=re;function ue(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Oe(t,e){for(;m.element(t);){if(me(t,e))return t;t=le(t)}return null}function le(t){var e=t.parentNode;if(m.docFrag(e)){for(;(e=e.host)&&m.docFrag(e););return e}return e}function me(t,e){return ve!==_e&&(e=e.replace(/\/deep\//g," ")),t[te.prefixedMatchesSelector](e)}var u=function(t){return t.parentNode||t.host};function b(t,e){for(var n,r=[],o=t;(n=u(o))&&o!==e&&n!==o.ownerDocument;)r.unshift(o),o=n;return r}function P(t,e,n){for(;m.element(t);){if(me(t,e))return!0;if((t=le(t))===n)return me(t,e)}return!1}function M(t){return t.correspondingUseElement||t}function U(t){var e=t instanceof ee.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function V(t){var e,n=U(t);if(!te.isIOS7&&n){var r={x:(e=(e=pe(t))||ve).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n}function z(t){for(var e=[];t;)e.push(t),t=le(t);return e}function ae(t){return!!m.string(t)&&(ee.document.querySelector(t),!0)}function C(t,e){for(var n in e)t[n]=e[n];return t}function ke(t,e,n){return t==="parent"?le(n):t==="self"?e.getRect(n):Oe(n,t)}function Fe(t,e,n,r){var o=t;return m.string(o)?o=ke(o,e,n):m.func(o)&&(o=o.apply(void 0,r)),m.element(o)&&(o=V(o)),o}function Ze(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function ct(t){return!t||"x"in t&&"y"in t||((t=C({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function et(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function Ue(t,e,n){var r=n&&t.options[n];return Ze(Fe(r&&r.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function Ce(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(l){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},m.string(t)&&t.search(" ")!==-1&&(t=xe(t)),m.array(t))return t.forEach((function(l){return Ce(l,e,n,r)})),r;if(m.object(t)&&(e=t,t=""),m.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(m.array(e))for(var o=0,i=e;o<i.length;o++){var a=i[o];Ce(t,a,n,r)}else if(m.object(e))for(var c in e)Ce(xe(c).map((function(l){return"".concat(t).concat(l)})),e[c],n,r);return r}function xe(t){return t.trim().split(/ +/)}var Be=function(t,e){return Math.sqrt(t*t+e*e)},qt=["webkit","moz"];function B(t,e){t.__set||(t.__set={});var n=function(o){if(qt.some((function(i){return o.indexOf(i)===0})))return 1;typeof t[o]!="function"&&o!=="__set"&&Object.defineProperty(t,o,{get:function(){return o in t.__set?t.__set[o]:t.__set[o]=e[o]},set:function(i){t.__set[o]=i},configurable:!0})};for(var r in e)n(r);return t}function ze(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function bt(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function xt(t){return t instanceof ee.Event||t instanceof ee.Touch}function tt(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function Et(t,e){return e=e||{x:0,y:0},te.isOperaMobile&&xt(t)?(tt("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):tt("page",t,e),e}function nt(t){return m.number(t.pointerId)?t.pointerId:t.identifier}function Gt(t,e,n){var r=e.length>1?wt(e):e[0];Et(r,t.page),(function(o,i){i=i||{},te.isOperaMobile&&xt(o)?tt("screen",o,i):tt("client",o,i)})(r,t.client),t.timeStamp=n}function ut(t){var e=[];return m.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function wt(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var o in e)e[o]+=r[o]}for(var i in e)e[i]/=t.length;return e}function lt(t){if(!t.length)return null;var e=ut(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),o=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:o,bottom:i,width:o-n,height:i-r}}function ft(t,e){var n=e+"X",r=e+"Y",o=ut(t),i=o[0][n]-o[1][n],a=o[0][r]-o[1][r];return Be(i,a)}function We(t,e){var n=e+"X",r=e+"Y",o=ut(t),i=o[1][n]-o[0][n],a=o[1][r]-o[0][r];return 180*Math.atan2(a,i)/Math.PI}function rt(t){return m.string(t.pointerType)?t.pointerType:m.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof ee.Touch?"touch":"mouse"}function ot(t){var e=m.func(t.composedPath)?t.composedPath():t.path;return[M(e?e[0]:t.target),M(t.currentTarget)]}var qe=(function(){function t(e){O(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return L(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t})();Object.defineProperty(qe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _t=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t},Ge=function(t){return _t([],t)},s=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},d=function(t,e){return t[s(t,e)]},T=(function(t){ie(n,t);var e=ne(n);function n(r,o,i){var a;O(this,n),(a=e.call(this,o._interaction)).dropzone=void 0,a.dragEvent=void 0,a.relatedTarget=void 0,a.draggable=void 0,a.propagationStopped=!1,a.immediatePropagationStopped=!1;var c=i==="dragleave"?r.prev:r.cur,l=c.element,p=c.dropzone;return a.type=i,a.target=l,a.currentTarget=l,a.dropzone=p,a.dragEvent=o,a.relatedTarget=o.target,a.draggable=o.interactable,a.timeStamp=o.timeStamp,a}return L(n,[{key:"reject",value:function(){var r=this,o=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&o.cur.dropzone===this.dropzone&&o.cur.element===this.target)if(o.prev.dropzone=this.dropzone,o.prev.element=this.target,o.rejected=!0,o.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var i=o.activeDrops,a=s(i,(function(l){var p=l.dropzone,f=l.element;return p===r.dropzone&&f===r.target}));o.activeDrops.splice(a,1);var c=new n(o,this.dragEvent,"dropdeactivate");c.dropzone=this.dropzone,c.target=this.target,this.dropzone.fire(c)}else this.dropzone.fire(new n(o,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n})(qe);function R(t,e){for(var n=0,r=t.slice();n<r.length;n++){var o=r[n],i=o.dropzone,a=o.element;e.dropzone=i,e.target=a,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function D(t,e){for(var n=(function(i,a){for(var c=[],l=0,p=i.interactables.list;l<p.length;l++){var f=p[l];if(f.options.drop.enabled){var h=f.options.drop.accept;if(!(m.element(h)&&h!==a||m.string(h)&&!me(a,h)||m.func(h)&&!h({dropzone:f,draggableElement:a})))for(var x=0,S=f.getAllElements();x<S.length;x++){var _=S[x];_!==a&&c.push({dropzone:f,element:_,rect:f.getRect(_)})}}}return c})(t,e),r=0;r<n.length;r++){var o=n[r];o.rect=o.dropzone.getRect(o.element)}return n}function $(t,e,n){for(var r=t.dropState,o=t.interactable,i=t.element,a=[],c=0,l=r.activeDrops;c<l.length;c++){var p=l[c],f=p.dropzone,h=p.element,x=p.rect,S=f.dropCheck(e,n,o,i,h,x);a.push(S?h:null)}var _=(function(k){for(var I,A,j,W=[],K=0;K<k.length;K++){var N=k[K],q=k[I];if(N&&K!==I)if(q){var we=u(N),oe=u(q);if(we!==N.ownerDocument)if(oe!==N.ownerDocument)if(we!==oe){W=W.length?W:b(q);var Se=void 0;if(q instanceof ee.HTMLElement&&N instanceof ee.SVGElement&&!(N instanceof ee.SVGSVGElement)){if(N===oe)continue;Se=N.ownerSVGElement}else Se=N;for(var Ae=b(Se,q.ownerDocument),He=0;Ae[He]&&Ae[He]===W[He];)He++;var Ut=[Ae[He-1],Ae[He],W[He]];if(Ut[0])for(var At=Ut[0].lastChild;At;){if(At===Ut[1]){I=K,W=Ae;break}if(At===Ut[2])break;At=At.previousSibling}}else j=q,(parseInt(pe(A=N).getComputedStyle(A).zIndex,10)||0)>=(parseInt(pe(j).getComputedStyle(j).zIndex,10)||0)&&(I=K);else I=K}else I=K}return I})(a);return r.activeDrops[_]||null}function F(t,e,n){var r=t.dropState,o={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(o.activate=new T(r,n,"dropactivate"),o.activate.target=null,o.activate.dropzone=null),n.type==="dragend"&&(o.deactivate=new T(r,n,"dropdeactivate"),o.deactivate.target=null,o.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(o.leave=new T(r,n,"dragleave"),n.dragLeave=o.leave.target=r.prev.element,n.prevDropzone=o.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(o.enter=new T(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),n.type==="dragend"&&r.cur.dropzone&&(o.drop=new T(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),n.type==="dragmove"&&r.cur.dropzone&&(o.move=new T(r,n,"dropmove"),n.dropzone=r.cur.dropzone)),o}function Z(t,e){var n=t.dropState,r=n.activeDrops,o=n.cur,i=n.prev;e.leave&&i.dropzone.fire(e.leave),e.enter&&o.dropzone.fire(e.enter),e.move&&o.dropzone.fire(e.move),e.drop&&o.dropzone.fire(e.drop),e.deactivate&&R(r,e.deactivate),n.prev.dropzone=o.dropzone,n.prev.element=o.element}function X(t,e){var n=t.interaction,r=t.iEvent,o=t.event;if(r.type==="dragmove"||r.type==="dragend"){var i=n.dropState;e.dynamicDrop&&(i.activeDrops=D(e,n.element));var a=r,c=$(n,a,o);i.rejected=i.rejected&&!!c&&c.dropzone===i.cur.dropzone&&c.element===i.cur.element,i.cur.dropzone=c&&c.dropzone,i.cur.element=c&&c.element,i.events=F(n,0,a)}}var Pe={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,o=t.defaults;t.usePlugin(je),r.prototype.dropzone=function(i){return(function(a,c){if(m.object(c)){if(a.options.drop.enabled=c.enabled!==!1,c.listeners){var l=Ce(c.listeners),p=Object.keys(l).reduce((function(h,x){return h[/^(enter|leave)/.test(x)?"drag".concat(x):/^(activate|deactivate|move)/.test(x)?"drop".concat(x):x]=l[x],h}),{}),f=a.options.drop.listeners;f&&a.off(f),a.on(p),a.options.drop.listeners=p}return m.func(c.ondrop)&&a.on("drop",c.ondrop),m.func(c.ondropactivate)&&a.on("dropactivate",c.ondropactivate),m.func(c.ondropdeactivate)&&a.on("dropdeactivate",c.ondropdeactivate),m.func(c.ondragenter)&&a.on("dragenter",c.ondragenter),m.func(c.ondragleave)&&a.on("dragleave",c.ondragleave),m.func(c.ondropmove)&&a.on("dropmove",c.ondropmove),/^(pointer|center)$/.test(c.overlap)?a.options.drop.overlap=c.overlap:m.number(c.overlap)&&(a.options.drop.overlap=Math.max(Math.min(1,c.overlap),0)),"accept"in c&&(a.options.drop.accept=c.accept),"checker"in c&&(a.options.drop.checker=c.checker),a}return m.bool(c)?(a.options.drop.enabled=c,a):a.options.drop})(this,i)},r.prototype.dropCheck=function(i,a,c,l,p,f){return(function(h,x,S,_,k,I,A){var j=!1;if(!(A=A||h.getRect(I)))return!!h.options.drop.checker&&h.options.drop.checker(x,S,j,h,I,_,k);var W=h.options.drop.overlap;if(W==="pointer"){var K=Ue(_,k,"drag"),N=Et(x);N.x+=K.x,N.y+=K.y;var q=N.x>A.left&&N.x<A.right,we=N.y>A.top&&N.y<A.bottom;j=q&&we}var oe=_.getRect(k);if(oe&&W==="center"){var Se=oe.left+oe.width/2,Ae=oe.top+oe.height/2;j=Se>=A.left&&Se<=A.right&&Ae>=A.top&&Ae<=A.bottom}return oe&&m.number(W)&&(j=Math.max(0,Math.min(A.right,oe.right)-Math.max(A.left,oe.left))*Math.max(0,Math.min(A.bottom,oe.bottom)-Math.max(A.top,oe.top))/(oe.width*oe.height)>=W),h.options.drop.checker&&(j=h.options.drop.checker(x,S,j,h,I,_,k)),j})(this,i,a,c,l,p,f)},n.dynamicDrop=function(i){return m.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},C(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=Pe.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if(n.prepared.name==="drag"){var o=n.dropState;o.activeDrops=[],o.events={},o.activeDrops=D(e,n.element),o.events=F(n,0,r),o.events.activate&&(R(o.activeDrops,o.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":X,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;if(n.prepared.name==="drag"){var o=n.dropState;Z(n,o.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),o.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var n=t.interaction,r=t.iEvent;X(t,e),Z(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:D,getDrop:$,getDropEvents:F,fireDropEvents:Z,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$e=Pe;function Tt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if(e.prepared.name==="gesture"){var o=e.pointers.map((function(p){return p.pointer})),i=r==="start",a=r==="end",c=e.interactable.options.deltaSource;if(n.touches=[o[0],o[1]],i)n.distance=ft(o,c),n.box=lt(o),n.scale=1,n.ds=0,n.angle=We(o,c),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var l=e.prevEvent;n.distance=l.distance,n.box=l.box,n.scale=l.scale,n.ds=0,n.angle=l.angle,n.da=0}else n.distance=ft(o,c),n.box=lt(o),n.scale=n.distance/e.gesture.startDistance,n.angle=We(o,c),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,m.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var St={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(o){return m.object(o)?(this.options.gesture.enabled=o.enabled!==!1,this.setPerAction("gesture",o),this.setOnEvents("gesture",o),this):m.bool(o)?(this.options.gesture.enabled=o,this):this.options.gesture},e.map.gesture=St,e.methodDict.gesture="gesturable",r.actions.gesture=St.defaults},listeners:{"interactions:action-start":Tt,"interactions:action-move":Tt,"interactions:action-end":Tt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Fr=St;function Ur(t,e,n,r,o,i,a){if(!e)return!1;if(e===!0){var c=m.number(i.width)?i.width:i.right-i.left,l=m.number(i.height)?i.height:i.bottom-i.top;if(a=Math.min(a,Math.abs((t==="left"||t==="right"?c:l)/2)),c<0&&(t==="left"?t="right":t==="right"&&(t="left")),l<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var p=c>=0?i.left:i.right;return n.x<p+a}if(t==="top"){var f=l>=0?i.top:i.bottom;return n.y<f+a}if(t==="right")return n.x>(c>=0?i.right:i.left)-a;if(t==="bottom")return n.y>(l>=0?i.bottom:i.top)-a}return!!m.element(r)&&(m.element(e)?e===r:P(r,e,o))}function xn(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.resizeAxes){var r=e;n.interactable.options.resize.square?(n.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,n.resizeAxes==="x"?r.delta.y=0:n.resizeAxes==="y"&&(r.delta.x=0))}}var Ne,it,Le={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,o=t.defaults;Le.cursors=(function(i){return i.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(n),Le.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(i){return(function(a,c,l){return m.object(c)?(a.options.resize.enabled=c.enabled!==!1,a.setPerAction("resize",c),a.setOnEvents("resize",c),m.string(c.axis)&&/^x$|^y$|^xy$/.test(c.axis)?a.options.resize.axis=c.axis:c.axis===null&&(a.options.resize.axis=l.defaults.actions.resize.axis),m.bool(c.preserveAspectRatio)?a.options.resize.preserveAspectRatio=c.preserveAspectRatio:m.bool(c.square)&&(a.options.resize.square=c.square),a):m.bool(c)?(a.options.resize.enabled=c,a):a.options.resize})(this,i,t)},e.map.resize=Le,e.methodDict.resize="resizable",o.actions.resize=Le.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.rect;r._rects={start:C({},i),corrected:C({},i),previous:C({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},o.edges=r.prepared.edges,o.rect=r._rects.corrected,o.deltaRect=r._rects.delta}})(t),xn(t)},"interactions:action-move":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.interactable.options.resize.invert,a=i==="reposition"||i==="negate",c=r.rect,l=r._rects,p=l.start,f=l.corrected,h=l.delta,x=l.previous;if(C(x,f),a){if(C(f,c),i==="reposition"){if(f.top>f.bottom){var S=f.top;f.top=f.bottom,f.bottom=S}if(f.left>f.right){var _=f.left;f.left=f.right,f.right=_}}}else f.top=Math.min(c.top,p.bottom),f.bottom=Math.max(c.bottom,p.top),f.left=Math.min(c.left,p.right),f.right=Math.max(c.right,p.left);for(var k in f.width=f.right-f.left,f.height=f.bottom-f.top,f)h[k]=f[k]-x[k];o.edges=r.prepared.edges,o.rect=f,o.deltaRect=h}})(t),xn(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,o=t.rect,i=t.buttons;if(o){var a=C({},e.coords.cur.page),c=n.options.resize;if(c&&c.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(i&c.mouseButtons)!=0)){if(m.object(c.edges)){var l={left:!1,right:!1,top:!1,bottom:!1};for(var p in l)l[p]=Ur(p,c.edges[p],a,e._latestPointer.eventTarget,r,o,c.margin||Le.defaultMargin);l.left=l.left&&!l.right,l.top=l.top&&!l.bottom,(l.left||l.right||l.top||l.bottom)&&(t.action={name:"resize",edges:l})}else{var f=c.axis!=="y"&&a.x>o.right-Le.defaultMargin,h=c.axis!=="x"&&a.y>o.bottom-Le.defaultMargin;(f||h)&&(t.action={name:"resize",axes:(f?"x":"")+(h?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,o=Le.cursors,i=null;if(n)i=o[r+n];else if(e){for(var a="",c=0,l=["top","bottom","left","right"];c<l.length;c++){var p=l[c];e[p]&&(a+=p)}i=o[a]}return i},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Br=Le,Wr={id:"actions",install:function(t){t.usePlugin(Fr),t.usePlugin(Br),t.usePlugin(je),t.usePlugin($e)}},En=0,Xe={request:function(t){return Ne(t)},cancel:function(t){return it(t)},init:function(t){if(Ne=t.requestAnimationFrame,it=t.cancelAnimationFrame,!Ne)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];Ne=t["".concat(r,"RequestAnimationFrame")],it=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}Ne=Ne&&Ne.bind(t),it=it&&it.bind(t),Ne||(Ne=function(o){var i=Date.now(),a=Math.max(0,16-(i-En)),c=t.setTimeout((function(){o(i+a)}),a);return En=i+a,c},it=function(o){return clearTimeout(o)})}},H={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){H.isScrolling=!0,Xe.cancel(H.i),t.autoScroll=H,H.interaction=t,H.prevTime=H.now(),H.i=Xe.request(H.scroll)},stop:function(){H.isScrolling=!1,H.interaction&&(H.interaction.autoScroll=null),Xe.cancel(H.i)},scroll:function(){var t=H.interaction,e=t.interactable,n=t.element,r=t.prepared.name,o=e.options[r].autoScroll,i=wn(o.container,e,n),a=H.now(),c=(a-H.prevTime)/1e3,l=o.speed*c;if(l>=1){var p={x:H.x*l,y:H.y*l};if(p.x||p.y){var f=_n(i);m.window(i)?i.scrollBy(p.x,p.y):i&&(i.scrollLeft+=p.x,i.scrollTop+=p.y);var h=_n(i),x={x:h.x-f.x,y:h.y-f.y};(x.x||x.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:x,interaction:t,container:i})}H.prevTime=a}H.isScrolling&&(Xe.cancel(H.i),H.i=Xe.request(H.scroll))},check:function(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&H.check(e.interactable,e.prepared.name))if(e.simulation)H.x=H.y=0;else{var r,o,i,a,c=e.interactable,l=e.element,p=e.prepared.name,f=c.options[p].autoScroll,h=wn(f.container,c,l);if(m.window(h))a=n.clientX<H.margin,r=n.clientY<H.margin,o=n.clientX>h.innerWidth-H.margin,i=n.clientY>h.innerHeight-H.margin;else{var x=U(h);a=n.clientX<x.left+H.margin,r=n.clientY<x.top+H.margin,o=n.clientX>x.right-H.margin,i=n.clientY>x.bottom-H.margin}H.x=o?1:a?-1:0,H.y=i?1:r?-1:0,H.isScrolling||(H.margin=f.margin,H.speed=f.speed,H.start(e))}}};function wn(t,e,n){return(m.string(t)?ke(t,e,n):t)||pe(n)}function _n(t){return m.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var qr={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=H,H.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=H.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,H.stop(),H.interaction&&(H.interaction=null)},"interactions:stop":H.stop,"interactions:action-move":function(t){return H.onInteractionMove(t)}}},Gr=qr;function kt(t,e){var n=!1;return function(){return n||(ve.console.warn(e),n=!0),t.apply(this,arguments)}}function $t(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function $r(t){return m.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Xr(t){return m.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Vr={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(n,r,o,i){var a=(function(c,l,p,f,h){var x=c.getRect(f),S=l.buttons||{0:1,1:4,3:8,4:16}[l.button],_={action:null,interactable:c,interaction:p,element:f,rect:x,buttons:S};return h.fire("auto-start:check",_),_.action})(this,r,o,i,t);return this.options.actionChecker?this.options.actionChecker(n,r,a,this,i,o):a},e.prototype.ignoreFrom=kt((function(n){return this._backCompatOption("ignoreFrom",n)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=kt((function(n){return this._backCompatOption("allowFrom",n)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Xr,e.prototype.styleCursor=$r}};function Tn(t,e,n,r,o){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Dt(e,n,t,o)?t:null}function Kr(t,e,n,r,o,i,a){for(var c=0,l=r.length;c<l;c++){var p=r[c],f=o[c],h=p.getAction(e,n,t,f);if(h){var x=Tn(h,p,f,i,a);if(x)return{action:x,interactable:p,element:f}}}return{action:null,interactable:null,element:null}}function Sn(t,e,n,r,o){var i=[],a=[],c=r;function l(f){i.push(f),a.push(c)}for(;m.element(c);){i=[],a=[],o.interactables.forEachMatch(c,l);var p=Kr(t,e,n,i,a,r,o);if(p.action&&!p.interactable.options[p.action.name].manualStart)return p;c=le(c)}return{action:null,interactable:null,element:null}}function kn(t,e,n){var r=e.action,o=e.interactable,i=e.element;r=r||{name:null},t.interactable=o,t.element=i,$t(t.prepared,r),t.rect=o&&r.name?o.getRect(i):null,On(t,n),n.fire("autoStart:prepared",{interaction:t})}function Dt(t,e,n,r){var o=t.options,i=o[n.name].max,a=o[n.name].maxPerElement,c=r.autoStart.maxInteractions,l=0,p=0,f=0;if(!(i&&a&&c))return!1;for(var h=0,x=r.interactions.list;h<x.length;h++){var S=x[h],_=S.prepared.name;if(S.interacting()&&(++l>=c||S.interactable===t&&((p+=_===n.name?1:0)>=i||S.element===e&&(f++,_===n.name&&f>=a))))return!1}return c>0}function Rn(t,e){return m.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Xt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function On(t,e){var n=t.interactable,r=t.element,o=t.prepared;if(t.pointerType==="mouse"&&n&&n.options.styleCursor){var i="";if(o.name){var a=n.options[o.name].cursorChecker;i=m.func(a)?a(o,n,r,t._interacting):e.actions.map[o.name].getCursor(o)}Xt(t.element,i||"",e)}else e.autoStart.cursorElement&&Xt(e.autoStart.cursorElement,"",e)}var Qr={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Vr),n.base.actionChecker=null,n.base.styleCursor=!0,C(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(r){return Rn(r,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Dt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;n.interacting()||kn(n,Sn(n,r,o,i,e),e)},"interactions:move":function(t,e){(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget;o.pointerType!=="mouse"||o.pointerIsDown||o.interacting()||kn(o,Sn(o,i,a,c,r),r)})(t,e),(function(n,r){var o=n.interaction;if(o.pointerIsDown&&!o.interacting()&&o.pointerWasMoved&&o.prepared.name){r.fire("autoStart:before-start",n);var i=o.interactable,a=o.prepared.name;a&&i&&(i.options[a].manualStart||!Dt(i,o.element,o.prepared,r)?o.stop():(o.start(o.prepared,i,o.element),On(o,r)))}})(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Xt(n.element,"",e)}},maxInteractions:Rn,withinInteractionLimit:Dt,validateAction:Tn},Vt=Qr,Jr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,o=t.dx,i=t.dy;if(n.prepared.name==="drag"){var a=Math.abs(o),c=Math.abs(i),l=n.interactable.options.drag,p=l.startAxis,f=a>c?"x":a<c?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?f[0]:l.lockAxis,f!=="xy"&&p!=="xy"&&p!==f){n.prepared.name=null;for(var h=r,x=function(_){if(_!==n.interactable){var k=n.interactable.options.drag;if(!k.manualStart&&_.testIgnoreAllow(k,h,r)){var I=_.getAction(n.downPointer,n.downEvent,n,h);if(I&&I.name==="drag"&&(function(A,j){if(!j)return!1;var W=j.options.drag.startAxis;return A==="xy"||W==="xy"||W===A})(f,_)&&Vt.validateAction(I,_,h,r,e))return _}}};m.element(h);){var S=e.interactables.forEachMatch(h,x);if(S){n.prepared.name="drag",n.interactable=S,n.element=h;break}h=le(h)}}}}}};function Kt(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var Zr={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Vt),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=Kt(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;Kt(e)>0&&(e.prepared.name=null)}},getHoldDuration:Kt},eo=Zr,to={id:"auto-start",install:function(t){t.usePlugin(Vt),t.usePlugin(eo),t.usePlugin(Jr)}},no=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):m.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function ro(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var Cn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=no,e.prototype.checkAndPreventDefault=function(n){return(function(r,o,i){var a=r.options.preventDefault;if(a!=="never")if(a!=="always"){if(o.events.supportsPassive&&/^touch(start|move)$/.test(i.type)){var c=pe(i.target).document,l=o.getDocOptions(c);if(!l||!l.events||l.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(i.type)||m.element(i.target)&&me(i.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||i.preventDefault()}else i.preventDefault()})(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var r=0,o=t.interactions.list;r<o.length;r++){var i=o[r];if(i.element&&(i.element===n.target||ue(i.element,n.target)))return void i.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=ro,t}),{})};function jt(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function pt(t){var e={};for(var n in t){var r=t[n];m.plainObject(r)?e[n]=pt(r):m.array(r)?e[n]=Ge(r):e[n]=r}return e}var Qt=(function(){function t(e){O(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=zt(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return L(t,[{key:"start",value:function(e,n){var r,o,i=e.phase,a=this.interaction,c=(function(p){var f=p.interactable.options[p.prepared.name],h=f.modifiers;return h&&h.length?h:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(x){var S=f[x];return S&&S.enabled&&{options:S,methods:S._methods}})).filter((function(x){return!!x}))})(a);this.prepareStates(c),this.startEdges=C({},a.edges),this.edges=C({},this.startEdges),this.startOffset=(r=a.rect,o=n,r?{left:o.x-r.left,top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var l=this.fillArg({phase:i,pageCoords:n,preEnd:!1});return this.result=zt(),this.startAll(l),this.result=this.setAll(l)}},{key:"fillArg",value:function(e){var n=this.interaction;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var n=0,r=this.states;n<r.length;n++){var o=r[n];o.methods.start&&(e.state=o,o.methods.start(e))}}},{key:"setAll",value:function(e){var n=e.phase,r=e.preEnd,o=e.skipModifiers,i=e.rect,a=e.edges;e.coords=C({},e.pageCoords),e.rect=C({},i),e.edges=C({},a);for(var c=o?this.states.slice(o):this.states,l=zt(e.coords,e.rect),p=0;p<c.length;p++){var f,h=c[p],x=h.options,S=C({},e.coords),_=null;(f=h.methods)!=null&&f.set&&this.shouldDo(x,r,n)&&(e.state=h,_=h.methods.set(e),et(e.edges,e.rect,{x:e.coords.x-S.x,y:e.coords.y-S.y})),l.eventProps.push(_)}C(this.edges,e.edges),l.delta.x=e.coords.x-e.pageCoords.x,l.delta.y=e.coords.y-e.pageCoords.y,l.rectDelta.left=e.rect.left-i.left,l.rectDelta.right=e.rect.right-i.right,l.rectDelta.top=e.rect.top-i.top,l.rectDelta.bottom=e.rect.bottom-i.bottom;var k=this.result.coords,I=this.result.rect;if(k&&I){var A=l.rect.left!==I.left||l.rect.right!==I.right||l.rect.top!==I.top||l.rect.bottom!==I.bottom;l.changed=A||k.x!==l.coords.x||k.y!==l.coords.y}return l}},{key:"applyToInteraction",value:function(e){var n=this.interaction,r=e.phase,o=n.coords.cur,i=n.coords.start,a=this.result,c=this.startDelta,l=a.delta;r==="start"&&C(this.startDelta,a.delta);for(var p=0,f=[[i,c],[o,l]];p<f.length;p++){var h=f[p],x=h[0],S=h[1];x.page.x+=S.x,x.page.y+=S.y,x.client.x+=S.x,x.client.y+=S.y}var _=this.result.rectDelta,k=e.rect||n.rect;k.left+=_.left,k.right+=_.right,k.top+=_.top,k.bottom+=_.bottom,k.width=k.right-k.left,k.height=k.bottom-k.top}},{key:"setAndApply",value:function(e){var n=this.interaction,r=e.phase,o=e.preEnd,i=e.skipModifiers,a=this.setAll(this.fillArg({preEnd:o,phase:r,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=a,!a.changed&&(!i||i<this.states.length)&&n.interacting())return!1;if(e.modifiedCoords){var c=n.coords.cur.page,l={x:e.modifiedCoords.x-c.x,y:e.modifiedCoords.y-c.y};a.coords.x+=l.x,a.coords.y+=l.y,a.delta.x+=l.x,a.delta.y+=l.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var n=e.interaction,r=e.event,o=this.states;if(o&&o.length){for(var i=!1,a=0;a<o.length;a++){var c=o[a];e.state=c;var l=c.options,p=c.methods,f=p.beforeEnd&&p.beforeEnd(e);if(f)return this.endResult=f,!1;i=i||!i&&this.shouldDo(l,!0,e.phase,!0)}i&&n.move({event:r,preEnd:!0})}}},{key:"stop",value:function(e){var n=e.interaction;if(this.states&&this.states.length){var r=C({states:this.states,interactable:n.interactable,element:n.element,rect:null},e);this.fillArg(r);for(var o=0,i=this.states;o<i.length;o++){var a=i[o];r.state=a,a.methods.stop&&a.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var n=0;n<e.length;n++){var r=e[n],o=r.options,i=r.methods,a=r.name;this.states.push({options:o,methods:i,index:n,name:a})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var n=e.interaction,r=n.coords,o=n.rect,i=n.modification;if(i.result){for(var a=i.startDelta,c=i.result,l=c.delta,p=c.rectDelta,f=0,h=[[r.start,a],[r.cur,l]];f<h.length;f++){var x=h[f],S=x[0],_=x[1];S.page.x-=_.x,S.page.y-=_.y,S.client.x-=_.x,S.client.y-=_.y}o.left-=p.left,o.right-=p.right,o.top-=p.top,o.bottom-=p.bottom}}},{key:"shouldDo",value:function(e,n,r,o){return!(!e||e.enabled===!1||o&&!e.endOnly||e.endOnly&&!n||r==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map((function(n){return pt(n)})),this.result=zt(C({},e.result.coords),C({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t})();function zt(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Ve(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},o=function(i){var a=i||{};for(var c in a.enabled=a.enabled!==!1,n)c in a||(a[c]=n[c]);var l={options:a,methods:r,name:e,enable:function(){return a.enabled=!0,l},disable:function(){return a.enabled=!1,l}};return l};return e&&typeof e=="string"&&(o._defaults=n,o._methods=r),o}function Rt(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var oo={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new Qt(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":Rt,"interactions:action-move":Rt,"interactions:action-end":Rt,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Pn=oo,An={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Jt=(function(t){ie(n,t);var e=ne(n);function n(r,o,i,a,c,l,p){var f;O(this,n),(f=e.call(this,r)).relatedTarget=null,f.screenX=void 0,f.screenY=void 0,f.button=void 0,f.buttons=void 0,f.ctrlKey=void 0,f.shiftKey=void 0,f.altKey=void 0,f.metaKey=void 0,f.page=void 0,f.client=void 0,f.delta=void 0,f.rect=void 0,f.x0=void 0,f.y0=void 0,f.t0=void 0,f.dt=void 0,f.duration=void 0,f.clientX0=void 0,f.clientY0=void 0,f.velocity=void 0,f.speed=void 0,f.swipe=void 0,f.axes=void 0,f.preEnd=void 0,c=c||r.element;var h=r.interactable,x=(h&&h.options||An).deltaSource,S=Ue(h,c,i),_=a==="start",k=a==="end",I=_?se(f):r.prevEvent,A=_?r.coords.start:k?{page:I.page,client:I.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return f.page=C({},A.page),f.client=C({},A.client),f.rect=C({},r.rect),f.timeStamp=A.timeStamp,k||(f.page.x-=S.x,f.page.y-=S.y,f.client.x-=S.x,f.client.y-=S.y),f.ctrlKey=o.ctrlKey,f.altKey=o.altKey,f.shiftKey=o.shiftKey,f.metaKey=o.metaKey,f.button=o.button,f.buttons=o.buttons,f.target=c,f.currentTarget=c,f.preEnd=l,f.type=p||i+(a||""),f.interactable=h,f.t0=_?r.pointers[r.pointers.length-1].downTime:I.t0,f.x0=r.coords.start.page.x-S.x,f.y0=r.coords.start.page.y-S.y,f.clientX0=r.coords.start.client.x-S.x,f.clientY0=r.coords.start.client.y-S.y,f.delta=_||k?{x:0,y:0}:{x:f[x].x-I[x].x,y:f[x].y-I[x].y},f.dt=r.coords.delta.timeStamp,f.duration=f.timeStamp-f.t0,f.velocity=C({},r.coords.velocity[x]),f.speed=Be(f.velocity.x,f.velocity.y),f.swipe=k||a==="inertiastart"?f.getSwipe():null,f}return L(n,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var o=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;o<0&&(o+=360);var i=112.5<=o&&o<247.5,a=202.5<=o&&o<337.5;return{up:a,down:!a&&22.5<=o&&o<157.5,left:i,right:!i&&(292.5<=o||o<67.5),angle:o,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n})(qe);Object.defineProperties(Jt.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var io=L((function t(e,n,r,o,i){O(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=r,this.downTime=o,this.downTarget=i})),ao=(function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t})({}),Mn=(function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t})({}),so=0,co=(function(){function t(e){var n=this,r=e.pointerType,o=e.scopeFire;O(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=kt((function(f){this.move(f)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=so++,this._scopeFire=o,this.pointerType=r;var i=this;this._proxy={};var a=function(f){Object.defineProperty(n._proxy,f,{get:function(){return i[f]}})};for(var c in ao)a(c);var l=function(f){Object.defineProperty(n._proxy,f,{value:function(){return i[f].apply(i,arguments)}})};for(var p in Mn)l(p);this._scopeFire("interactions:new",{interaction:this})}return L(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,n,r){var o=this.updatePointer(e,n,r,!0),i=this.pointers[o];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:r,pointerIndex:o,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(e,n,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled)&&($t(this.prepared,e),this.interactable=n,this.element=r,this.rect=n.getRect(r),this.edges=this.prepared.edges?C({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,n,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,n,r,!1);var o,i,a=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(o=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Be(o,i)>this.pointerMoveTolerance);var c,l,p,f=this.getPointerIndex(e),h={pointer:e,pointerIndex:f,pointerInfo:this.pointers[f],event:n,type:"move",eventTarget:r,dx:o,dy:i,duplicate:a,interaction:this};a||(c=this.coords.velocity,l=this.coords.delta,p=Math.max(l.timeStamp/1e3,.001),c.page.x=l.page.x/p,c.page.y=l.page.y/p,c.client.x=l.client.x/p,c.client.y=l.client.y/p,c.timeStamp=p),this._scopeFire("interactions:move",h),a||this.simulation||(this.interacting()&&(h.type=null,this.move(h)),this.pointerWasMoved&&ze(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||bt(this.coords.delta),(e=C({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,n,r,o){var i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,r,!1));var a=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(a),{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:r,type:a,curEventTarget:o,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var n;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var n=nt(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:s(this.pointers,(function(r){return r.id===n}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,n,r,o){var i,a,c,l=nt(e),p=this.getPointerIndex(e),f=this.pointers[p];return o=o!==!1&&(o||/(down|start)$/i.test(n.type)),f?f.pointer=e:(f=new io(l,e,n,null,null),p=this.pointers.length,this.pointers.push(f)),Gt(this.coords.cur,this.pointers.map((function(h){return h.pointer})),this._now()),i=this.coords.delta,a=this.coords.prev,c=this.coords.cur,i.page.x=c.page.x-a.page.x,i.page.y=c.page.y-a.page.y,i.client.x=c.client.x-a.client.x,i.client.y=c.client.y-a.client.y,i.timeStamp=c.timeStamp-a.timeStamp,o&&(this.pointerIsDown=!0,f.downTime=this.coords.cur.timeStamp,f.downTarget=r,B(this.downPointer,e),this.interacting()||(ze(this.coords.start,this.coords.cur),ze(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,r),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:r,down:o,pointerInfo:f,pointerIndex:p,interaction:this}),p}},{key:"removePointer",value:function(e,n){var r=this.getPointerIndex(e);if(r!==-1){var o=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:r,pointerInfo:o,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,n,r){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,n,r,o){return new Jt(this,e,this.prepared.name,n,this.element,r,o)}},{key:"_fireEvent",value:function(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var n=e.event,r=e.phase,o=e.preEnd,i=e.type,a=this.rect;if(a&&r==="move"&&(et(this.edges,a,this.coords.delta[this.interactable.options.deltaSource]),a.width=a.right-a.left,a.height=a.bottom-a.top),this._scopeFire("interactions:before-action-".concat(r),e)===!1)return!1;var c=e.iEvent=this._createPreparedEvent(n,r,o,i);return this._scopeFire("interactions:action-".concat(r),e),r==="start"&&(this.prevEvent=c),this._fireEvent(c),this._scopeFire("interactions:after-action-".concat(r),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t})();function In(t){Dn(t.interaction)}function Dn(t){if(!(function(n){return!(!n.offset.pending.x&&!n.offset.pending.y)})(t))return!1;var e=t.offset.pending;return Zt(t.coords.cur,e),Zt(t.coords.delta,e),et(t.edges,t.rect,e),e.x=0,e.y=0,!0}function uo(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function Zt(t,e){var n=t.page,r=t.client,o=e.x,i=e.y;n.x+=o,n.y+=i,r.x+=o,r.y+=i}Mn.offsetBy="";var lo={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=uo},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return(function(e){e.pointerIsDown&&(Zt(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)})(t.interaction)},"interactions:before-action-start":In,"interactions:before-action-move":In,"interactions:before-action-end":function(t){var e=t.interaction;if(Dn(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},jn=lo,fo=(function(){function t(e){O(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return L(t,[{key:"start",value:function(e){var n=this.interaction,r=Nt(n);if(!r||!r.enabled)return!1;var o=n.coords.velocity.client,i=Be(o.x,o.y),a=this.modification||(this.modification=new Qt(n));if(a.copyFrom(n.modification),this.t0=n._now(),this.allowResume=r.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=a.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&i>r.minSpeed&&i>r.endSpeed)this.startInertia();else{if(a.result=a.setAll(this.modifierArg),!a.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,n=this.interaction.coords.velocity.client,r=Nt(this.interaction),o=r.resistance,i=-Math.log(r.endSpeed/this.v0)/o;this.targetOffset={x:(n.x-i)/o,y:(n.y-i)/o},this.te=i,this.lambda_v0=o/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var a=this.modification,c=this.modifierArg;c.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},a.result=a.setAll(c),a.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+a.result.delta.x,y:this.targetOffset.y+a.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var n=this;this.timeout=Xe.request((function(){n.active&&e()}))}},{key:"inertiaTick",value:function(){var e,n,r,o,i,a,c,l=this,p=this.interaction,f=Nt(p).resistance,h=(p._now()-this.t0)/1e3;if(h<this.te){var x,S=1-(Math.exp(-f*h)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,n=0,r=this.targetOffset.x,o=this.targetOffset.y,i=this.modifiedOffset.x,a=this.modifiedOffset.y,x={x:zn(c=S,e,r,i),y:zn(c,n,o,a)}):x={x:this.targetOffset.x*S,y:this.targetOffset.y*S};var _={x:x.x-this.currentOffset.x,y:x.y-this.currentOffset.y};this.currentOffset.x+=_.x,this.currentOffset.y+=_.y,p.offsetBy(_),p.move(),this.onNextFrame((function(){return l.inertiaTick()}))}else p.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,n=this.interaction,r=n._now()-this.t0,o=Nt(n).smoothEndDuration;if(r<o){var i={x:Nn(r,0,this.targetOffset.x,o),y:Nn(r,0,this.targetOffset.y,o)},a={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=a.x,this.currentOffset.y+=a.y,n.offsetBy(a),n.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return e.smoothEndTick()}))}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var n=e.pointer,r=e.event,o=e.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(n,r,o,!0),i._doPhase({interaction:i,event:r,phase:"resume"}),ze(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Xe.cancel(this.timeout)}}]),t})();function Nt(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var po={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(jn),t.usePlugin(Pn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new fo(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var o=n;m.element(o);){if(o===e.element){r.resume(t);break}o=le(o)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Rt,"interactions:action-inertiastart":Rt,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function zn(t,e,n,r){var o=1-t;return o*o*e+2*o*t*n+t*t*r}function Nn(t,e,n,r){return-n*(t/=r)*(t-2)+e}var ho=po;function Ln(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}var Hn=(function(){function t(e){O(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=C({},e||{})}return L(t,[{key:"fire",value:function(e){var n,r=this.global;(n=this.types[e.type])&&Ln(e,n),!e.propagationStopped&&r&&(n=r[e.type])&&Ln(e,n)}},{key:"on",value:function(e,n){var r=Ce(e,n);for(e in r)this.types[e]=_t(this.types[e]||[],r[e])}},{key:"off",value:function(e,n){var r=Ce(e,n);for(e in r){var o=this.types[e];if(o&&o.length)for(var i=0,a=r[e];i<a.length;i++){var c=a[i],l=o.indexOf(c);l!==-1&&o.splice(l,1)}}}},{key:"getRect",value:function(e){return null}}]),t})(),vo=(function(){function t(e){O(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,B(this,e)}return L(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t})();function Ot(t){return m.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function Lt(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var go={id:"events",install:function(t){var e,n=[],r={},o=[],i={add:a,remove:c,addDelegate:function(f,h,x,S,_){var k=Ot(_);if(!r[x]){r[x]=[];for(var I=0;I<o.length;I++){var A=o[I];a(A,x,l),a(A,x,p,!0)}}var j=r[x],W=d(j,(function(K){return K.selector===f&&K.context===h}));W||(W={selector:f,context:h,listeners:[]},j.push(W)),W.listeners.push({func:S,options:k})},removeDelegate:function(f,h,x,S,_){var k,I=Ot(_),A=r[x],j=!1;if(A)for(k=A.length-1;k>=0;k--){var W=A[k];if(W.selector===f&&W.context===h){for(var K=W.listeners,N=K.length-1;N>=0;N--){var q=K[N];if(q.func===S&&Lt(q.options,I)){K.splice(N,1),K.length||(A.splice(k,1),c(h,x,l),c(h,x,p,!0)),j=!0;break}}if(j)break}}},delegateListener:l,delegateUseCapture:p,delegatedEvents:r,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};function a(f,h,x,S){if(f.addEventListener){var _=Ot(S),k=d(n,(function(I){return I.eventTarget===f}));k||(k={eventTarget:f,events:{}},n.push(k)),k.events[h]||(k.events[h]=[]),d(k.events[h],(function(I){return I.func===x&&Lt(I.options,_)}))||(f.addEventListener(h,x,i.supportsOptions?_:_.capture),k.events[h].push({func:x,options:_}))}}function c(f,h,x,S){if(f.addEventListener&&f.removeEventListener){var _=s(n,(function(we){return we.eventTarget===f})),k=n[_];if(k&&k.events)if(h!=="all"){var I=!1,A=k.events[h];if(A){if(x==="all"){for(var j=A.length-1;j>=0;j--){var W=A[j];c(f,h,W.func,W.options)}return}for(var K=Ot(S),N=0;N<A.length;N++){var q=A[N];if(q.func===x&&Lt(q.options,K)){f.removeEventListener(h,x,i.supportsOptions?K:K.capture),A.splice(N,1),A.length===0&&(delete k.events[h],I=!0);break}}}I&&!Object.keys(k.events).length&&n.splice(_,1)}else for(h in k.events)k.events.hasOwnProperty(h)&&c(f,h,"all")}}function l(f,h){for(var x=Ot(h),S=new vo(f),_=r[f.type],k=ot(f)[0],I=k;m.element(I);){for(var A=0;A<_.length;A++){var j=_[A],W=j.selector,K=j.context;if(me(I,W)&&ue(K,k)&&ue(K,I)){var N=j.listeners;S.currentTarget=I;for(var q=0;q<N.length;q++){var we=N[q];Lt(we.options,x)&&we.func(S)}}}I=le(I)}}function p(f){return l(f,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i,i}},en={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=en.methodOrder;e<n.length;e++){var r=n[e],o=en[r](t);if(o)return o}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,o=t.scope;if(!/down|start/i.test(n))return null;for(var i=0,a=o.interactions.list;i<a.length;i++){var c=a[i],l=r;if(c.simulation&&c.simulation.allowResume&&c.pointerType===e)for(;l;){if(l===c.element)return c;l=le(l)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,o=t.eventType,i=t.scope;if(r!=="mouse"&&r!=="pen")return null;for(var a=0,c=i.interactions.list;a<c.length;a++){var l=c[a];if(l.pointerType===r){if(l.simulation&&!Yn(l,n))continue;if(l.interacting())return l;e||(e=l)}}if(e)return e;for(var p=0,f=i.interactions.list;p<f.length;p++){var h=f[p];if(!(h.pointerType!==r||/down/i.test(o)&&h.simulation))return h}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(Yn(o,e))return o}return null},idle:function(t){for(var e=t.pointerType,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(o.pointers.length===1){var i=o.interactable;if(i&&(!i.options.gesture||!i.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function Yn(t,e){return t.pointers.some((function(n){return n.id===e}))}var mo=en,tn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Fn(t,e){return function(n){var r=e.interactions.list,o=rt(n),i=ot(n),a=i[0],c=i[1],l=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var p=0,f=n.changedTouches;p<f.length;p++){var h=f[p],x={pointer:h,pointerId:nt(h),pointerType:o,eventType:n.type,eventTarget:a,curEventTarget:c,scope:e},S=Un(x);l.push([x.pointer,x.eventTarget,x.curEventTarget,S])}}else{var _=!1;if(!te.supportsPointerEvent&&/mouse/.test(n.type)){for(var k=0;k<r.length&&!_;k++)_=r[k].pointerType!=="mouse"&&r[k].pointerIsDown;_=_||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!_){var I={pointer:n,pointerId:nt(n),pointerType:o,eventType:n.type,curEventTarget:c,eventTarget:a,scope:e},A=Un(I);l.push([I.pointer,I.eventTarget,I.curEventTarget,A])}}for(var j=0;j<l.length;j++){var W=l[j],K=W[0],N=W[1],q=W[2];W[3][t](K,n,N,q)}}}function Un(t){var e=t.pointerType,n=t.scope,r={interaction:mo.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function nn(t,e){var n=t.doc,r=t.scope,o=t.options,i=r.interactions.docEvents,a=r.events,c=a[e];for(var l in r.browser.isIOS&&!o.events&&(o.events={passive:!1}),a.delegatedEvents)c(n,l,a.delegateListener),c(n,l,a.delegateUseCapture,!0);for(var p=o&&o.events,f=0;f<i.length;f++){var h=i[f];c(n,h.type,h.listener,p)}}var yo={id:"core/interactions",install:function(t){for(var e={},n=0;n<tn.length;n++){var r=tn[n];e[r]=Fn(r,t)}var o,i=te.pEventTypes;function a(){for(var c=0,l=t.interactions.list;c<l.length;c++){var p=l[c];if(p.pointerIsDown&&p.pointerType==="touch"&&!p._interacting)for(var f=function(){var S=x[h];t.documents.some((function(_){return ue(_.doc,S.downTarget)}))||p.removePointer(S.pointer,S.event)},h=0,x=p.pointers;h<x.length;h++)f()}}(o=ee.PointerEvent?[{type:i.down,listener:a},{type:i.down,listener:e.pointerDown},{type:i.move,listener:e.pointerMove},{type:i.up,listener:e.pointerUp},{type:i.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(c){for(var l=0,p=t.interactions.list;l<p.length;l++)p[l].documentBlur(c)}}),t.prevTouchTime=0,t.Interaction=(function(c){ie(p,c);var l=ne(p);function p(){return O(this,p),l.apply(this,arguments)}return L(p,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(f){t.interactions.pointerMoveTolerance=f}},{key:"_now",value:function(){return t.now()}}]),p})(co),t.interactions={list:[],new:function(c){c.scopeFire=function(p,f){return t.fire(p,f)};var l=new t.Interaction(c);return t.interactions.list.push(l),l},listeners:e,docEvents:o,pointerMoveTolerance:1},t.usePlugin(Cn)},listeners:{"scope:add-document":function(t){return nn(t,"add")},"scope:remove-document":function(t){return nn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var o=e.interactions.list[r];o.interactable===n&&(o.stop(),e.fire("interactions:destroy",{interaction:o}),o.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:nn,doOnInteractions:Fn,methodNames:tn},bo=yo,Ke=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(Ke||{}),xo=(function(){function t(e,n,r,o){O(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Hn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||r,this._win=pe(ae(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return L(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,n){return m.func(n.onstart)&&this.on("".concat(e,"start"),n.onstart),m.func(n.onmove)&&this.on("".concat(e,"move"),n.onmove),m.func(n.onend)&&this.on("".concat(e,"end"),n.onend),m.func(n.oninertiastart)&&this.on("".concat(e,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,n,r){var o,i=this,a=(o=this._actions.map[e])==null?void 0:o.filterEventType,c=function(l){return(a==null||a(l))&&jt(l,i._actions)};(m.array(n)||m.object(n))&&this._onOff(Ke.Off,e,n,void 0,c),(m.array(r)||m.object(r))&&this._onOff(Ke.On,e,r,void 0,c)}},{key:"setPerAction",value:function(e,n){var r=this._defaults;for(var o in n){var i=o,a=this.options[e],c=n[i];i==="listeners"&&this.updatePerActionListeners(e,a.listeners,c),m.array(c)?a[i]=Ge(c):m.plainObject(c)?(a[i]=C(a[i]||{},pt(c)),m.object(r.perAction[i])&&"enabled"in r.perAction[i]&&(a[i].enabled=c.enabled!==!1)):m.bool(c)&&m.object(r.perAction[i])?a[i].enabled=c:a[i]=c}}},{key:"getRect",value:function(e){return e=e||(m.element(this.target)?this.target:null),m.string(this.target)&&(e=e||this._context.querySelector(this.target)),V(e)}},{key:"rectChecker",value:function(e){var n=this;return m.func(e)?(this.getRect=function(r){var o=C({},e.apply(n,r));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,n){if(ae(n)||m.object(n)){for(var r in this.options[e]=n,this._actions.map)this.options[r][e]=n;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return m.string(e)?Array.from(this._context.querySelectorAll(e)):m.func(e)&&e.getAllElements?e.getAllElements():m.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||ue(this._context,e)}},{key:"testIgnoreAllow",value:function(e,n,r){return!this.testIgnore(e.ignoreFrom,n,r)&&this.testAllow(e.allowFrom,n,r)}},{key:"testAllow",value:function(e,n,r){return!e||!!m.element(r)&&(m.string(e)?P(r,e,n):!!m.element(e)&&ue(e,r))}},{key:"testIgnore",value:function(e,n,r){return!(!e||!m.element(r))&&(m.string(e)?P(r,e,n):!!m.element(e)&&ue(e,r))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,n,r,o,i){m.object(n)&&!m.array(n)&&(o=r,r=null);var a=Ce(n,r,i);for(var c in a){c==="wheel"&&(c=te.wheelEvent);for(var l=0,p=a[c];l<p.length;l++){var f=p[l];jt(c,this._actions)?this.events[e===Ke.On?"on":"off"](c,f):m.string(this.target)?this._scopeEvents[e===Ke.On?"addDelegate":"removeDelegate"](this.target,this._context,c,f,o):this._scopeEvents[e===Ke.On?"add":"remove"](this.target,c,f,o)}}return this}},{key:"on",value:function(e,n,r){return this._onOff(Ke.On,e,n,r)}},{key:"off",value:function(e,n,r){return this._onOff(Ke.Off,e,n,r)}},{key:"set",value:function(e){var n=this._defaults;for(var r in m.object(e)||(e={}),this.options=pt(n.base),this._actions.methodDict){var o=r,i=this._actions.methodDict[o];this.options[o]={},this.setPerAction(o,C(C({},n.perAction),n.actions[o])),this[i](e[o])}for(var a in e)a!=="getRect"?m.func(this[a])&&this[a](e[a]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(m.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[e],r=n.length-1;r>=0;r--){var o=n[r],i=o.selector,a=o.context,c=o.listeners;i===this.target&&a===this._context&&n.splice(r,1);for(var l=c.length-1;l>=0;l--)this._scopeEvents.removeDelegate(this.target,this._context,e,c[l][0],c[l][1])}else this._scopeEvents.remove(this.target,"all")}}]),t})(),Eo=(function(){function t(e){var n=this;O(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(r){var o=r.interactable,i=o.target,a=m.string(i)?n.selectorMap[i]:i[n.scope.id],c=s(a,(function(l){return l===o}));a.splice(c,1)}})}return L(t,[{key:"new",value:function(e,n){n=C(n||{},{actions:this.scope.actions});var r=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),m.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(r)):(r.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:e,options:n,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(e,n){var r=n&&n.context||this.scope.document,o=m.string(e),i=o?this.selectorMap[e]:e[this.scope.id];if(i)return d(i,(function(a){return a._context===r&&(o||a.inContext(e))}))}},{key:"forEachMatch",value:function(e,n){for(var r=0,o=this.list;r<o.length;r++){var i=o[r],a=void 0;if((m.string(i.target)?m.element(e)&&me(e,i.target):e===i.target)&&i.inContext(e)&&(a=n(i)),a!==void 0)return a}}}]),t})(),wo=(function(){function t(){var e=this;O(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=pt(An),this.Eventable=Hn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(r){var o=function i(a,c){var l=r.interactables.getExisting(a,c);return l||((l=r.interactables.new(a,c)).events.global=i.globalEvents),l};return o.getPointerAverage=wt,o.getTouchBBox=lt,o.getTouchDistance=ft,o.getTouchAngle=We,o.getElementRect=V,o.getElementClientRect=U,o.matchesSelector=me,o.closest=Oe,o.globalEvents={},o.version="1.10.27",o.scope=r,o.use=function(i,a){return this.scope.usePlugin(i,a),this},o.isSet=function(i,a){return!!this.scope.interactables.get(i,a&&a.context)},o.on=kt((function(i,a,c){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var l=0,p=i;l<p.length;l++){var f=p[l];this.on(f,a,c)}return this}if(m.object(i)){for(var h in i)this.on(h,i[h],a);return this}return jt(i,this.scope.actions)?this.globalEvents[i]?this.globalEvents[i].push(a):this.globalEvents[i]=[a]:this.scope.events.add(this.scope.document,i,a,{options:c}),this}),"The interact.on() method is being deprecated"),o.off=kt((function(i,a,c){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var l=0,p=i;l<p.length;l++){var f=p[l];this.off(f,a,c)}return this}if(m.object(i)){for(var h in i)this.off(h,i[h],a);return this}var x;return jt(i,this.scope.actions)?i in this.globalEvents&&(x=this.globalEvents[i].indexOf(a))!==-1&&this.globalEvents[i].splice(x,1):this.scope.events.remove(this.scope.document,i,a,c),this}),"The interact.off() method is being deprecated"),o.debug=function(){return this.scope},o.supportsTouch=function(){return te.supportsTouch},o.supportsPointerEvent=function(){return te.supportsPointerEvent},o.stop=function(){for(var i=0,a=this.scope.interactions.list;i<a.length;i++)a[i].stop();return this},o.pointerMoveTolerance=function(i){return m.number(i)?(this.scope.interactions.pointerMoveTolerance=i,this):this.scope.interactions.pointerMoveTolerance},o.addDocument=function(i,a){this.scope.addDocument(i,a)},o.removeDocument=function(i){this.scope.removeDocument(i)},o})(this),this.InteractEvent=Jt,this.Interactable=void 0,this.interactables=new Eo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return e.removeDocument(r.target)};var n=this;this.Interactable=(function(r){ie(i,r);var o=ne(i);function i(){return O(this,i),o.apply(this,arguments)}return L(i,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(a){return ce(Q(i.prototype),"set",this).call(this,a),n.fire("interactable:set",{options:a,interactable:this}),this}},{key:"unset",value:function(){ce(Q(i.prototype),"unset",this).call(this);var a=n.interactables.list.indexOf(this);a<0||(n.interactables.list.splice(a,1),n.fire("interactable:unset",{interactable:this}))}}]),i})(xo)}return L(t,[{key:"addListeners",value:function(e,n){this.listenerMaps.push({id:n,map:e})}},{key:"fire",value:function(e,n){for(var r=0,o=this.listenerMaps;r<o.length;r++){var i=o[r].map[e];if(i&&i(n,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:(function(n,r){return n.isInitialized=!0,m.window(r)&&Me(r),ee.init(r),te.init(r),Xe.init(r),n.window=r,n.document=r.document,n.usePlugin(bo),n.usePlugin(go),n})(this,e)}},{key:"pluginIsInstalled",value:function(e){var n=e.id;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){for(var r=0,o=this.listenerMaps.length,i=e.before.reduce((function(c,l){return c[l]=!0,c[Bn(l)]=!0,c}),{});r<o;r++){var a=this.listenerMaps[r].id;if(a&&(i[a]||i[Bn(a)]))break}this.listenerMaps.splice(r,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,n){if(this.getDocIndex(e)!==-1)return!1;var r=pe(e);n=n?C({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(e){var n=this.getDocIndex(e),r=pe(e),o=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:r,scope:this,options:o})}},{key:"getDocIndex",value:function(e){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}},{key:"getDocOptions",value:function(e){var n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t})();function Bn(t){return t&&t.replace(/\/.*$/,"")}var Wn=new wo,Ee=Wn.interactStatic,_o=typeof globalThis<"u"?globalThis:window;Wn.init(_o);var To=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(r){var o=r[0],i=r[1];return o in t||i in t})),n=function(r,o){for(var i=t.range,a=t.limits,c=a===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:a,l=t.offset,p=l===void 0?{x:0,y:0}:l,f={range:i,grid:t,x:null,y:null},h=0;h<e.length;h++){var x=e[h],S=x[0],_=x[1],k=Math.round((r-p.x)/t[S]),I=Math.round((o-p.y)/t[_]);f[S]=Math.max(c.left,Math.min(c.right,k*t[S]+p.x)),f[_]=Math.max(c.top,Math.min(c.bottom,I*t[_]+p.y))}return f};return n.grid=t,n.coordFields=e,n}}),So={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=C(e.snappers||{},To),e.createSnapGrid=e.snappers.grid}},ko=So,Ro={start:function(t){var e=t.state,n=t.rect,r=t.edges,o=t.pageCoords,i=e.options,a=i.ratio,c=i.enabled,l=e.options,p=l.equalDelta,f=l.modifiers;a==="preserve"&&(a=n.width/n.height),e.startCoords=C({},o),e.startRect=C({},n),e.ratio=a,e.equalDelta=p;var h=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var x=(h.left?1:-1)*(h.top?1:-1);e.edgeSign={x,y:x}}else e.edgeSign={x:h.left?-1:1,y:h.top?-1:1};if(c!==!1&&C(r,h),f!=null&&f.length){var S=new Qt(t.interaction);S.copyFrom(t.interaction.modification),S.prepareStates(f),e.subModification=S,S.startAll(g({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,o=e.linkedEdges,i=C({},r),a=e.equalDelta?Oo:Co;if(C(t.edges,o),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var c=C({},n);et(o,c,{x:r.x-i.x,y:r.y-i.y});var l=e.subModification.setAll(g(g({},t),{},{rect:c,edges:o,pageCoords:r,prevCoords:r,prevRect:c})),p=l.delta;return l.changed&&(a(e,Math.abs(p.x)>Math.abs(p.y),l.coords,l.rect),C(r,l.coords)),l.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Oo(t,e,n){var r=t.startCoords,o=t.edgeSign;e?n.y=r.y+(n.x-r.x)*o.y:n.x=r.x+(n.y-r.y)*o.x}function Co(t,e,n,r){var o=t.startRect,i=t.startCoords,a=t.ratio,c=t.edgeSign;if(e){var l=r.width/a;n.y=i.y+(l-o.height)*c.y}else{var p=r.height*a;n.x=i.x+(p-o.width)*c.x}}var Po=Ve(Ro,"aspectRatio"),qn=function(){};qn._defaults={};var Ht=qn;function at(t,e,n){return m.func(t)?Fe(t,e.interactable,e.element,[n.x,n.y,e]):Fe(t,e.interactable,e.element)}var Yt={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,o=t.interaction,i=t.pageCoords,a=r.options,c=a.elementRect,l=C({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&c){var p=at(a.restriction,o,i);if(p){var f=p.right-p.left-e.width,h=p.bottom-p.top-e.height;f<0&&(l.left+=f,l.right+=f),h<0&&(l.top+=h,l.bottom+=h)}l.left+=n.left-e.width*c.left,l.top+=n.top-e.height*c.top,l.right+=n.right-e.width*(1-c.right),l.bottom+=n.bottom-e.height*(1-c.bottom)}r.offset=l},set:function(t){var e=t.coords,n=t.interaction,r=t.state,o=r.options,i=r.offset,a=at(o.restriction,n,e);if(a){var c=(function(l){return!l||"left"in l&&"top"in l||((l=C({},l)).left=l.x||0,l.top=l.y||0,l.right=l.right||l.left+l.width,l.bottom=l.bottom||l.top+l.height),l})(a);e.x=Math.max(Math.min(c.right-i.right,e.x),c.left+i.left),e.y=Math.max(Math.min(c.bottom-i.bottom,e.y),c.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ao=Ve(Yt,"restrict"),Gn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},$n={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Xn(t,e){for(var n=0,r=["top","left","bottom","right"];n<r.length;n++){var o=r[n];o in t||(t[o]=e[o])}return t}var Ct={noInner:Gn,noOuter:$n,start:function(t){var e,n=t.interaction,r=t.startOffset,o=t.state,i=o.options;i&&(e=Ze(at(i.offset,n,n.coords.start.page))),e=e||{x:0,y:0},o.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,o=t.state,i=o.offset,a=o.options;if(n){var c=C({},e),l=at(a.inner,r,c)||{},p=at(a.outer,r,c)||{};Xn(l,Gn),Xn(p,$n),n.top?e.y=Math.min(Math.max(p.top+i.top,c.y),l.top+i.top):n.bottom&&(e.y=Math.max(Math.min(p.bottom+i.bottom,c.y),l.bottom+i.bottom)),n.left?e.x=Math.min(Math.max(p.left+i.left,c.x),l.left+i.left):n.right&&(e.x=Math.max(Math.min(p.right+i.right,c.x),l.right+i.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Mo=Ve(Ct,"restrictEdges"),Io=C({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Yt.defaults),Do=Ve({start:Yt.start,set:Yt.set,defaults:Io},"restrictRect"),jo={width:-1/0,height:-1/0},zo={width:1/0,height:1/0},No=Ve({start:function(t){return Ct.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,o=t.edges,i=n.options;if(o){var a=ct(at(i.min,e,t.coords))||jo,c=ct(at(i.max,e,t.coords))||zo;n.options={endOnly:i.endOnly,inner:C({},Ct.noInner),outer:C({},Ct.noOuter)},o.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-c.height):o.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+c.height),o.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-c.width):o.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+c.width),Ct.set(t),n.options=i}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),rn={start:function(t){var e,n=t.interaction,r=t.interactable,o=t.element,i=t.rect,a=t.state,c=t.startOffset,l=a.options,p=l.offsetWithOrigin?(function(x){var S=x.interaction.element,_=Ze(Fe(x.state.options.origin,null,null,[S])),k=_||Ue(x.interactable,S,x.interaction.prepared.name);return k})(t):{x:0,y:0};if(l.offset==="startCoords")e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var f=Fe(l.offset,r,o,[n]);(e=Ze(f)||{x:0,y:0}).x+=p.x,e.y+=p.y}var h=l.relativePoints;a.offsets=i&&h&&h.length?h.map((function(x,S){return{index:S,relativePoint:x,x:c.left-i.width*x.x+e.x,y:c.top-i.height*x.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,o=r.options,i=r.offsets,a=Ue(e.interactable,e.element,e.prepared.name),c=C({},n),l=[];o.offsetWithOrigin||(c.x-=a.x,c.y-=a.y);for(var p=0,f=i;p<f.length;p++)for(var h=f[p],x=c.x-h.x,S=c.y-h.y,_=0,k=o.targets.length;_<k;_++){var I=o.targets[_],A=void 0;(A=m.func(I)?I(x,S,e._proxy,h,_):I)&&l.push({x:(m.number(A.x)?A.x:x)+h.x,y:(m.number(A.y)?A.y:S)+h.y,range:m.number(A.range)?A.range:o.range,source:I,index:_,offset:h})}for(var j={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},W=0;W<l.length;W++){var K=l[W],N=K.range,q=K.x-c.x,we=K.y-c.y,oe=Be(q,we),Se=oe<=N;N===1/0&&j.inRange&&j.range!==1/0&&(Se=!1),j.target&&!(Se?j.inRange&&N!==1/0?oe/N<j.distance/j.range:N===1/0&&j.range!==1/0||oe<j.distance:!j.inRange&&oe<j.distance)||(j.target=K,j.distance=oe,j.range=N,j.inRange=Se,j.delta.x=q,j.delta.y=we)}return j.inRange&&(n.x=j.target.x,n.y=j.target.y),r.closest=j,j},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Lo=Ve(rn,"snap"),Ft={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],rn.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,o=n.options,i=n.offsets,a={x:r.x-i[0].x,y:r.y-i[0].y};n.options=C({},o),n.options.targets=[];for(var c=0,l=o.targets||[];c<l.length;c++){var p=l[c],f=void 0;if(f=m.func(p)?p(a.x,a.y,e):p){for(var h=0,x=n.targetFields;h<x.length;h++){var S=x[h],_=S[0],k=S[1];if(_ in f||k in f){f.x=f[_],f.y=f[k];break}}n.options.targets.push(f)}}var I=rn.set(t);return n.options=o,I},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ho=Ve(Ft,"snapSize"),on={aspectRatio:Po,restrictEdges:Mo,restrict:Ao,restrictRect:Do,restrictSize:No,snapEdges:Ve({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Ft.start(t)):null},set:Ft.set,defaults:C(pt(Ft.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Lo,snapSize:Ho,spring:Ht,avoid:Ht,transform:Ht,rubberband:Ht},Yo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(Pn),t.usePlugin(ko),e.modifiers=on,on){var r=on[n],o=r._defaults,i=r._methods;o._methods=i,t.defaults.perAction[n]=o}}},Fo=Yo,Vn=(function(t){ie(n,t);var e=ne(n);function n(r,o,i,a,c,l){var p;if(O(this,n),B(se(p=e.call(this,c)),i),i!==o&&B(se(p),o),p.timeStamp=l,p.originalEvent=i,p.type=r,p.pointerId=nt(o),p.pointerType=rt(o),p.target=a,p.currentTarget=null,r==="tap"){var f=c.getPointerIndex(o);p.dt=p.timeStamp-c.pointers[f].downTime;var h=p.timeStamp-c.tapTime;p.double=!!c.prevTap&&c.prevTap.type!=="doubletap"&&c.prevTap.target===p.target&&h<500}else r==="doubletap"&&(p.dt=o.timeStamp-c.tapTime,p.double=!0);return p}return L(n,[{key:"_subtractOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX-=o,this.pageY-=i,this.clientX-=o,this.clientY-=i,this}},{key:"_addOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX+=o,this.pageY+=i,this.clientX+=o,this.clientY+=i,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n})(qe),Pt={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Pt,t.defaults.actions.pointerEvents=Pt.defaults,C(t.actions.phaselessTypes,Pt.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&an(t),Qe({interaction:n,pointer:r,event:o,eventTarget:i,type:"move"},e))},"interactions:down":function(t,e){(function(n,r){for(var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget,l=n.pointerIndex,p=o.pointers[l].hold,f=z(c),h={interaction:o,pointer:i,event:a,eventTarget:c,type:"hold",targets:[],path:f,node:null},x=0;x<f.length;x++){var S=f[x];h.node=S,r.fire("pointerEvents:collect-targets",h)}if(h.targets.length){for(var _=1/0,k=0,I=h.targets;k<I.length;k++){var A=I[k].eventable.options.holdDuration;A<_&&(_=A)}p.duration=_,p.timeout=setTimeout((function(){Qe({interaction:o,eventTarget:c,pointer:i,event:a,type:"hold"},r)}),_)}})(t,e),Qe(t,e)},"interactions:up":function(t,e){an(t),Qe(t,e),(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,c=n.eventTarget;o.pointerWasMoved||Qe({interaction:o,eventTarget:c,pointer:i,event:a,type:"tap"},r)})(t,e)},"interactions:cancel":function(t,e){an(t),Qe(t,e)}},PointerEvent:Vn,fire:Qe,collectEventTargets:Kn,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Qe(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,c=t.targets,l=c===void 0?Kn(t,e):c,p=new Vn(a,r,o,i,n,e.now());e.fire("pointerEvents:new",{pointerEvent:p});for(var f={interaction:n,pointer:r,event:o,eventTarget:i,targets:l,type:a,pointerEvent:p},h=0;h<l.length;h++){var x=l[h];for(var S in x.props||{})p[S]=x.props[S];var _=Ue(x.eventable,x.node);if(p._subtractOrigin(_),p.eventable=x.eventable,p.currentTarget=x.node,x.eventable.fire(p),p._addOrigin(_),p.immediatePropagationStopped||p.propagationStopped&&h+1<l.length&&l[h+1].node!==p.currentTarget)break}if(e.fire("pointerEvents:fired",f),a==="tap"){var k=p.double?Qe({interaction:n,pointer:r,event:o,eventTarget:i,type:"doubletap"},e):p;n.prevTap=k,n.tapTime=k.timeStamp}return p}function Kn(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,c=n.getPointerIndex(r),l=n.pointers[c];if(a==="tap"&&(n.pointerWasMoved||!l||l.downTarget!==i))return[];for(var p=z(i),f={interaction:n,pointer:r,event:o,eventTarget:i,type:a,path:p,targets:[],node:null},h=0;h<p.length;h++){var x=p[h];f.node=x,e.fire("pointerEvents:collect-targets",f)}return a==="hold"&&(f.targets=f.targets.filter((function(S){var _,k;return S.eventable.options.holdDuration===((_=n.pointers[c])==null||(k=_.hold)==null?void 0:k.duration)}))),f.targets}function an(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Uo=Object.freeze({__proto__:null,default:Pt});function Bo(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Wo={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Pt);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=Bo,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,o=t.eventTarget,i=t.targets;if(r.type==="hold"&&i.length){var a=i[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:o,type:"hold",pointer:r,event:r},e)}),a))}}})},qo=Wo,Go={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(r){return C(this.events.options,r),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(r,o){var i=n.call(this,r,o);return i===this&&(this.events.options[r]=o),i}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,o=t.type,i=t.eventTarget;e.interactables.forEachMatch(r,(function(a){var c=a.events,l=c.options;c.types[o]&&c.types[o].length&&a.testIgnoreAllow(l,r,i)&&n.push({node:r,eventable:c,props:{interactable:a}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(n){return e.getRect(n)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;C(n.events.options,e.pointerEvents.defaults),C(n.events.options,r.pointerEvents||{})}}},$o=Go,Xo={id:"pointer-events",install:function(t){t.usePlugin(Uo),t.usePlugin(qo),t.usePlugin($o)}},Vo=Xo,Ko={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return(function(r,o,i){for(var a=r.getAllElements(),c=i.window.Promise,l=c?[]:null,p=function(){var h=a[f],x=r.getRect(h);if(!x)return 1;var S,_=d(i.interactions.list,(function(A){return A.interacting()&&A.interactable===r&&A.element===h&&A.prepared.name===o.name}));if(_)_.move(),l&&(S=_._reflowPromise||new c((function(A){_._reflowResolve=A})));else{var k=ct(x),I=(function(A){return{coords:A,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:k.x,y:k.y},client:{x:k.x,y:k.y},timeStamp:i.now()});S=(function(A,j,W,K,N){var q=A.interactions.new({pointerType:"reflow"}),we={interaction:q,event:N,pointer:N,eventTarget:W,phase:"reflow"};q.interactable=j,q.element=W,q.prevEvent=N,q.updatePointer(N,N,W,!0),bt(q.coords.delta),$t(q.prepared,K),q._doPhase(we);var oe=A.window,Se=oe.Promise,Ae=Se?new Se((function(He){q._reflowResolve=He})):void 0;return q._reflowPromise=Ae,q.start(K,j,W),q._interacting?(q.move(we),q.end(N)):(q.stop(),q._reflowResolve()),q.removePointer(N,N),Ae})(i,r,h,o,I)}l&&l.push(S)},f=0;f<a.length&&!p();f++);return l&&c.all(l).then((function(){return r}))})(this,n,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;n.pointerType==="reflow"&&(n._reflowResolve&&n._reflowResolve(),(function(r,o){r.splice(r.indexOf(o),1)})(e.interactions.list,n))}}},Qo=Ko;if(Ee.use(Cn),Ee.use(jn),Ee.use(Vo),Ee.use(ho),Ee.use(Fo),Ee.use(to),Ee.use(Wr),Ee.use(Gr),Ee.use(Qo),Ee.default=Ee,w(v)==="object"&&v)try{v.exports=Ee}catch{}return Ee.default=Ee,Ee}))})(vt,vt.exports)),vt.exports}var Mr=Ar();const Bt=Cr(Mr);function fn(v){const y=document.createElement("input");y.type="file",y.accept="image/*",y.onchange=E=>{const g=E.target.files?.[0];if(g){const w=new FileReader;w.onload=O=>{const J=document.createElement("img");J.src=O.target?.result,J.style.maxWidth="100%",J.style.width="100%",J.style.height="auto",J.style.cursor="pointer",J.draggable=!1;const L=document.createElement("div");L.className="editor-image-wrapper",L.style.display="inline-block",L.style.position="relative",L.style.maxWidth="100%",L.style.width="auto",L.style.height="auto",L.contentEditable="false",L.style.boxSizing="border-box",L.style.touchAction="none",L.style.userSelect="none",L.appendChild(J),v.appendChild(L),v.focus()},w.readAsDataURL(g)}},y.click()}function Ir(v){let y=null;if(v.tagName==="IMG"?y=v.parentElement:y=v,!y)return;const E=y.querySelector("img");if(E)if(y.classList.contains("resizable")){const g=y.getBoundingClientRect(),w=Math.round(g.width)+"px",O=Math.round(g.height)+"px";Bt(y).unset(),y.classList.remove("resizable"),y.style.border="none",y.style.transform="",y.dataset.x="",y.dataset.y="",y.style.width=w,y.style.height=O,y.contentEditable="false",E&&(E.style.width="100%",E.style.height="100%")}else{y.classList.add("resizable"),y.style.border="2px dashed #007bff",y.style.position="relative",y.style.userSelect="none";const g=y.getBoundingClientRect();y.style.width=g.width+"px",y.style.height=g.height+"px",E&&(E.style.width="100%",E.style.height="100%"),Bt(y).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{move:w=>{const O=w.target;Object.assign(O.style,{width:`${w.rect.width}px`,height:`${w.rect.height}px`})}},modifiers:[Bt.modifiers.restrictSize({min:{width:50,height:50}})],inertia:!0})}}class pn{container;toolbar;editor;constructor(){this.container=document.createElement("div"),this.container.classList.add("editor-container"),this.editor=Or(()=>fn(this.editor),E=>Ir(E)),this.toolbar=Rr();const y=this.toolbar.querySelector('button[title="Insert Image"]');y&&(y.onclick=()=>fn(this.editor)),this.container.appendChild(this.toolbar),this.container.appendChild(this.editor)}getElement(){return this.container}getHTML(){return this.editor.innerHTML}setHTML(y){this.editor.innerHTML=y}}var Mt={exports:{}},gt={};var dn;function Dr(){if(dn)return gt;dn=1;var v=Symbol.for("react.transitional.element"),y=Symbol.for("react.fragment");function E(g,w,O){var J=null;if(O!==void 0&&(J=""+O),w.key!==void 0&&(J=""+w.key),"key"in w){O={};for(var L in w)L!=="key"&&(O[L]=w[L])}else O=w;return w=O.ref,{$$typeof:v,type:g,key:J,ref:w!==void 0?w:null,props:O}}return gt.Fragment=y,gt.jsx=E,gt.jsxs=E,gt}var mt={},It={exports:{}},Y={};var hn;function jr(){if(hn)return Y;hn=1;var v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),J=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ie=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ye=Symbol.for("react.activity"),se=Symbol.iterator;function ne(u){return u===null||typeof u!="object"?null:(u=se&&u[se]||u["@@iterator"],typeof u=="function"?u:null)}var ce={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fe=Object.assign,Re={};function _e(u,b,P){this.props=u,this.context=b,this.refs=Re,this.updater=P||ce}_e.prototype.isReactComponent={},_e.prototype.setState=function(u,b){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,b,"setState")},_e.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function ve(){}ve.prototype=_e.prototype;function Me(u,b,P){this.props=u,this.context=b,this.refs=Re,this.updater=P||ce}var pe=Me.prototype=new ve;pe.constructor=Me,fe(pe,_e.prototype),pe.isPureReactComponent=!0;var ge=Array.isArray;function Ie(){}var m={H:null,A:null,T:null,S:null},De=Object.prototype.hasOwnProperty;function he(u,b,P){var M=P.ref;return{$$typeof:v,type:u,key:b,ref:M!==void 0?M:null,props:P}}function Te(u,b){return he(u.type,b,u.props)}function je(u){return typeof u=="object"&&u!==null&&u.$$typeof===v}function G(u){var b={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function(P){return b[P]})}var be=/\/+/g;function ee(u,b){return typeof u=="object"&&u!==null&&u.key!=null?G(""+u.key):b.toString(36)}function re(u){switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:switch(typeof u.status=="string"?u.then(Ie,Ie):(u.status="pending",u.then(function(b){u.status==="pending"&&(u.status="fulfilled",u.value=b)},function(b){u.status==="pending"&&(u.status="rejected",u.reason=b)})),u.status){case"fulfilled":return u.value;case"rejected":throw u.reason}}throw u}function te(u,b,P,M,U){var V=typeof u;(V==="undefined"||V==="boolean")&&(u=null);var z=!1;if(u===null)z=!0;else switch(V){case"bigint":case"string":case"number":z=!0;break;case"object":switch(u.$$typeof){case v:case y:z=!0;break;case Q:return z=u._init,te(z(u._payload),b,P,M,U)}}if(z)return U=U(u),z=M===""?"."+ee(u,0):M,ge(U)?(P="",z!=null&&(P=z.replace(be,"$&/")+"/"),te(U,b,P,"",function(ke){return ke})):U!=null&&(je(U)&&(U=Te(U,P+(U.key==null||u&&u.key===U.key?"":(""+U.key).replace(be,"$&/")+"/")+z)),b.push(U)),1;z=0;var ae=M===""?".":M+":";if(ge(u))for(var C=0;C<u.length;C++)M=u[C],V=ae+ee(M,C),z+=te(M,b,P,V,U);else if(C=ne(u),typeof C=="function")for(u=C.call(u),C=0;!(M=u.next()).done;)M=M.value,V=ae+ee(M,C++),z+=te(M,b,P,V,U);else if(V==="object"){if(typeof u.then=="function")return te(re(u),b,P,M,U);throw b=String(u),Error("Objects are not valid as a React child (found: "+(b==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.")}return z}function ue(u,b,P){if(u==null)return u;var M=[],U=0;return te(u,M,"","",function(V){return b.call(P,V,U++)}),M}function Oe(u){if(u._status===-1){var b=u._result;b=b(),b.then(function(P){(u._status===0||u._status===-1)&&(u._status=1,u._result=P)},function(P){(u._status===0||u._status===-1)&&(u._status=2,u._result=P)}),u._status===-1&&(u._status=0,u._result=b)}if(u._status===1)return u._result.default;throw u._result}var le=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(b))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},me={map:ue,forEach:function(u,b,P){ue(u,function(){b.apply(this,arguments)},P)},count:function(u){var b=0;return ue(u,function(){b++}),b},toArray:function(u){return ue(u,function(b){return b})||[]},only:function(u){if(!je(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};return Y.Activity=ye,Y.Children=me,Y.Component=_e,Y.Fragment=E,Y.Profiler=w,Y.PureComponent=Me,Y.StrictMode=g,Y.Suspense=de,Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,Y.__COMPILER_RUNTIME={__proto__:null,c:function(u){return m.H.useMemoCache(u)}},Y.cache=function(u){return function(){return u.apply(null,arguments)}},Y.cacheSignal=function(){return null},Y.cloneElement=function(u,b,P){if(u==null)throw Error("The argument must be a React element, but you passed "+u+".");var M=fe({},u.props),U=u.key;if(b!=null)for(V in b.key!==void 0&&(U=""+b.key),b)!De.call(b,V)||V==="key"||V==="__self"||V==="__source"||V==="ref"&&b.ref===void 0||(M[V]=b[V]);var V=arguments.length-2;if(V===1)M.children=P;else if(1<V){for(var z=Array(V),ae=0;ae<V;ae++)z[ae]=arguments[ae+2];M.children=z}return he(u.type,U,M)},Y.createContext=function(u){return u={$$typeof:J,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null},u.Provider=u,u.Consumer={$$typeof:O,_context:u},u},Y.createElement=function(u,b,P){var M,U={},V=null;if(b!=null)for(M in b.key!==void 0&&(V=""+b.key),b)De.call(b,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(U[M]=b[M]);var z=arguments.length-2;if(z===1)U.children=P;else if(1<z){for(var ae=Array(z),C=0;C<z;C++)ae[C]=arguments[C+2];U.children=ae}if(u&&u.defaultProps)for(M in z=u.defaultProps,z)U[M]===void 0&&(U[M]=z[M]);return he(u,V,U)},Y.createRef=function(){return{current:null}},Y.forwardRef=function(u){return{$$typeof:L,render:u}},Y.isValidElement=je,Y.lazy=function(u){return{$$typeof:Q,_payload:{_status:-1,_result:u},_init:Oe}},Y.memo=function(u,b){return{$$typeof:ie,type:u,compare:b===void 0?null:b}},Y.startTransition=function(u){var b=m.T,P={};m.T=P;try{var M=u(),U=m.S;U!==null&&U(P,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(Ie,le)}catch(V){le(V)}finally{b!==null&&P.types!==null&&(b.types=P.types),m.T=b}},Y.unstable_useCacheRefresh=function(){return m.H.useCacheRefresh()},Y.use=function(u){return m.H.use(u)},Y.useActionState=function(u,b,P){return m.H.useActionState(u,b,P)},Y.useCallback=function(u,b){return m.H.useCallback(u,b)},Y.useContext=function(u){return m.H.useContext(u)},Y.useDebugValue=function(){},Y.useDeferredValue=function(u,b){return m.H.useDeferredValue(u,b)},Y.useEffect=function(u,b){return m.H.useEffect(u,b)},Y.useEffectEvent=function(u){return m.H.useEffectEvent(u)},Y.useId=function(){return m.H.useId()},Y.useImperativeHandle=function(u,b,P){return m.H.useImperativeHandle(u,b,P)},Y.useInsertionEffect=function(u,b){return m.H.useInsertionEffect(u,b)},Y.useLayoutEffect=function(u,b){return m.H.useLayoutEffect(u,b)},Y.useMemo=function(u,b){return m.H.useMemo(u,b)},Y.useOptimistic=function(u,b){return m.H.useOptimistic(u,b)},Y.useReducer=function(u,b,P){return m.H.useReducer(u,b,P)},Y.useRef=function(u){return m.H.useRef(u)},Y.useState=function(u){return m.H.useState(u)},Y.useSyncExternalStore=function(u,b,P){return m.H.useSyncExternalStore(u,b,P)},Y.useTransition=function(){return m.H.useTransition()},Y.version="19.2.3",Y}var yt={exports:{}};yt.exports;var vn;function zr(){return vn||(vn=1,(function(v,y){process.env.NODE_ENV!=="production"&&(function(){function E(s,d){Object.defineProperty(O.prototype,s,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})}function g(s){return s===null||typeof s!="object"?null:(s=Ze&&s[Ze]||s["@@iterator"],typeof s=="function"?s:null)}function w(s,d){s=(s=s.constructor)&&(s.displayName||s.name)||"ReactClass";var T=s+"."+d;ct[T]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,s),ct[T]=!0)}function O(s,d,T){this.props=s,this.context=d,this.refs=Ce,this.updater=T||et}function J(){}function L(s,d,T){this.props=s,this.context=d,this.refs=Ce,this.updater=T||et}function de(){}function ie(s){return""+s}function Q(s){try{ie(s);var d=!1}catch{d=!0}if(d){d=console;var T=d.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return T.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),ie(s)}}function ye(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===qt?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case u:return"Fragment";case P:return"Profiler";case b:return"StrictMode";case z:return"Suspense";case ae:return"SuspenseList";case Fe:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case me:return"Portal";case U:return s.displayName||"Context";case M:return(s._context.displayName||"Context")+".Consumer";case V:var d=s.render;return s=s.displayName,s||(s=d.displayName||d.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case C:return d=s.displayName||null,d!==null?d:ye(s.type)||"Memo";case ke:d=s._payload,s=s._init;try{return ye(s(d))}catch{}}return null}function se(s){if(s===u)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===ke)return"<...>";try{var d=ye(s);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function ne(){var s=B.A;return s===null?null:s.getOwner()}function ce(){return Error("react-stack-top-frame")}function fe(s){if(ze.call(s,"key")){var d=Object.getOwnPropertyDescriptor(s,"key").get;if(d&&d.isReactWarning)return!1}return s.key!==void 0}function Re(s,d){function T(){xt||(xt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}T.isReactWarning=!0,Object.defineProperty(s,"key",{get:T,configurable:!0})}function _e(){var s=ye(this.type);return Et[s]||(Et[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function ve(s,d,T,R,D,$){var F=T.ref;return s={$$typeof:le,type:s,key:d,props:T,_owner:R},(F!==void 0?F:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:_e}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function Me(s,d){return d=ve(s.type,d,s.props,s._owner,s._debugStack,s._debugTask),s._store&&(d._store.validated=s._store.validated),d}function pe(s){ge(s)?s._store&&(s._store.validated=1):typeof s=="object"&&s!==null&&s.$$typeof===ke&&(s._payload.status==="fulfilled"?ge(s._payload.value)&&s._payload.value._store&&(s._payload.value._store.validated=1):s._store&&(s._store.validated=1))}function ge(s){return typeof s=="object"&&s!==null&&s.$$typeof===le}function Ie(s){var d={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(T){return d[T]})}function m(s,d){return typeof s=="object"&&s!==null&&s.key!=null?(Q(s.key),Ie(""+s.key)):d.toString(36)}function De(s){switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:switch(typeof s.status=="string"?s.then(de,de):(s.status="pending",s.then(function(d){s.status==="pending"&&(s.status="fulfilled",s.value=d)},function(d){s.status==="pending"&&(s.status="rejected",s.reason=d)})),s.status){case"fulfilled":return s.value;case"rejected":throw s.reason}}throw s}function he(s,d,T,R,D){var $=typeof s;($==="undefined"||$==="boolean")&&(s=null);var F=!1;if(s===null)F=!0;else switch($){case"bigint":case"string":case"number":F=!0;break;case"object":switch(s.$$typeof){case le:case me:F=!0;break;case ke:return F=s._init,he(F(s._payload),d,T,R,D)}}if(F){F=s,D=D(F);var Z=R===""?"."+m(F,0):R;return Be(D)?(T="",Z!=null&&(T=Z.replace(wt,"$&/")+"/"),he(D,d,T,"",function(Pe){return Pe})):D!=null&&(ge(D)&&(D.key!=null&&(F&&F.key===D.key||Q(D.key)),T=Me(D,T+(D.key==null||F&&F.key===D.key?"":(""+D.key).replace(wt,"$&/")+"/")+Z),R!==""&&F!=null&&ge(F)&&F.key==null&&F._store&&!F._store.validated&&(T._store.validated=2),D=T),d.push(D)),1}if(F=0,Z=R===""?".":R+":",Be(s))for(var X=0;X<s.length;X++)R=s[X],$=Z+m(R,X),F+=he(R,d,T,$,D);else if(X=g(s),typeof X=="function")for(X===s.entries&&(ut||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ut=!0),s=X.call(s),X=0;!(R=s.next()).done;)R=R.value,$=Z+m(R,X++),F+=he(R,d,T,$,D);else if($==="object"){if(typeof s.then=="function")return he(De(s),d,T,R,D);throw d=String(s),Error("Objects are not valid as a React child (found: "+(d==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":d)+"). If you meant to render a collection of children, use an array instead.")}return F}function Te(s,d,T){if(s==null)return s;var R=[],D=0;return he(s,R,"","",function($){return d.call(T,$,D++)}),R}function je(s){if(s._status===-1){var d=s._ioInfo;d!=null&&(d.start=d.end=performance.now()),d=s._result;var T=d();if(T.then(function(D){if(s._status===0||s._status===-1){s._status=1,s._result=D;var $=s._ioInfo;$!=null&&($.end=performance.now()),T.status===void 0&&(T.status="fulfilled",T.value=D)}},function(D){if(s._status===0||s._status===-1){s._status=2,s._result=D;var $=s._ioInfo;$!=null&&($.end=performance.now()),T.status===void 0&&(T.status="rejected",T.reason=D)}}),d=s._ioInfo,d!=null){d.value=T;var R=T.displayName;typeof R=="string"&&(d.name=R)}s._status===-1&&(s._status=0,s._result=T)}if(s._status===1)return d=s._result,d===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
42
|
-
|
|
43
|
-
Your code should look like:
|
|
44
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
45
|
-
|
|
46
|
-
Did you accidentally put curly braces around the import?`,d),"default"in d||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
47
|
-
|
|
48
|
-
Your code should look like:
|
|
49
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,d),d.default;throw s._result}function G(){var s=B.H;return s===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
50
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
51
|
-
2. You might be breaking the Rules of Hooks
|
|
52
|
-
3. You might have more than one copy of React in the same app
|
|
53
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),s}function be(){B.asyncTransitions--}function ee(s){if(We===null)try{var d=("require"+Math.random()).slice(0,7);We=(v&&v[d]).call(v,"timers").setImmediate}catch{We=function(R){ft===!1&&(ft=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var D=new MessageChannel;D.port1.onmessage=R,D.port2.postMessage(void 0)}}return We(s)}function re(s){return 1<s.length&&typeof AggregateError=="function"?new AggregateError(s):s[0]}function te(s,d){d!==rt-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),rt=d}function ue(s,d,T){var R=B.actQueue;if(R!==null)if(R.length!==0)try{Oe(R),ee(function(){return ue(s,d,T)});return}catch(D){B.thrownErrors.push(D)}else B.actQueue=null;0<B.thrownErrors.length?(R=re(B.thrownErrors),B.thrownErrors.length=0,T(R)):d(s)}function Oe(s){if(!qe){qe=!0;var d=0;try{for(;d<s.length;d++){var T=s[d];do{B.didUsePromise=!1;var R=T(!1);if(R!==null){if(B.didUsePromise){s[d]=T,s.splice(0,d);return}T=R}else break}while(!0)}s.length=0}catch(D){s.splice(0,d+1),B.thrownErrors.push(D)}finally{qe=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var le=Symbol.for("react.transitional.element"),me=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),U=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),Fe=Symbol.for("react.activity"),Ze=Symbol.iterator,ct={},et={isMounted:function(){return!1},enqueueForceUpdate:function(s){w(s,"forceUpdate")},enqueueReplaceState:function(s){w(s,"replaceState")},enqueueSetState:function(s){w(s,"setState")}},Ue=Object.assign,Ce={};Object.freeze(Ce),O.prototype.isReactComponent={},O.prototype.setState=function(s,d){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,d,"setState")},O.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};var xe={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Ge in xe)xe.hasOwnProperty(Ge)&&E(Ge,xe[Ge]);J.prototype=O.prototype,xe=L.prototype=new J,xe.constructor=L,Ue(xe,O.prototype),xe.isPureReactComponent=!0;var Be=Array.isArray,qt=Symbol.for("react.client.reference"),B={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},ze=Object.prototype.hasOwnProperty,bt=console.createTask?console.createTask:function(){return null};xe={react_stack_bottom_frame:function(s){return s()}};var xt,tt,Et={},nt=xe.react_stack_bottom_frame.bind(xe,ce)(),Gt=bt(se(ce)),ut=!1,wt=/\/+/g,lt=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ft=!1,We=null,rt=0,ot=!1,qe=!1,_t=typeof queueMicrotask=="function"?function(s){queueMicrotask(function(){return queueMicrotask(s)})}:ee;xe=Object.freeze({__proto__:null,c:function(s){return G().useMemoCache(s)}});var Ge={map:Te,forEach:function(s,d,T){Te(s,function(){d.apply(this,arguments)},T)},count:function(s){var d=0;return Te(s,function(){d++}),d},toArray:function(s){return Te(s,function(d){return d})||[]},only:function(s){if(!ge(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};y.Activity=Fe,y.Children=Ge,y.Component=O,y.Fragment=u,y.Profiler=P,y.PureComponent=L,y.StrictMode=b,y.Suspense=z,y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,y.__COMPILER_RUNTIME=xe,y.act=function(s){var d=B.actQueue,T=rt;rt++;var R=B.actQueue=d!==null?d:[],D=!1;try{var $=s()}catch(X){B.thrownErrors.push(X)}if(0<B.thrownErrors.length)throw te(d,T),s=re(B.thrownErrors),B.thrownErrors.length=0,s;if($!==null&&typeof $=="object"&&typeof $.then=="function"){var F=$;return _t(function(){D||ot||(ot=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(X,Pe){D=!0,F.then(function($e){if(te(d,T),T===0){try{Oe(R),ee(function(){return ue($e,X,Pe)})}catch(St){B.thrownErrors.push(St)}if(0<B.thrownErrors.length){var Tt=re(B.thrownErrors);B.thrownErrors.length=0,Pe(Tt)}}else X($e)},function($e){te(d,T),0<B.thrownErrors.length&&($e=re(B.thrownErrors),B.thrownErrors.length=0),Pe($e)})}}}var Z=$;if(te(d,T),T===0&&(Oe(R),R.length!==0&&_t(function(){D||ot||(ot=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),B.actQueue=null),0<B.thrownErrors.length)throw s=re(B.thrownErrors),B.thrownErrors.length=0,s;return{then:function(X,Pe){D=!0,T===0?(B.actQueue=R,ee(function(){return ue(Z,X,Pe)})):X(Z)}}},y.cache=function(s){return function(){return s.apply(null,arguments)}},y.cacheSignal=function(){return null},y.captureOwnerStack=function(){var s=B.getCurrentStack;return s===null?null:s()},y.cloneElement=function(s,d,T){if(s==null)throw Error("The argument must be a React element, but you passed "+s+".");var R=Ue({},s.props),D=s.key,$=s._owner;if(d!=null){var F;e:{if(ze.call(d,"ref")&&(F=Object.getOwnPropertyDescriptor(d,"ref").get)&&F.isReactWarning){F=!1;break e}F=d.ref!==void 0}F&&($=ne()),fe(d)&&(Q(d.key),D=""+d.key);for(Z in d)!ze.call(d,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&d.ref===void 0||(R[Z]=d[Z])}var Z=arguments.length-2;if(Z===1)R.children=T;else if(1<Z){F=Array(Z);for(var X=0;X<Z;X++)F[X]=arguments[X+2];R.children=F}for(R=ve(s.type,D,R,$,s._debugStack,s._debugTask),D=2;D<arguments.length;D++)pe(arguments[D]);return R},y.createContext=function(s){return s={$$typeof:U,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null},s.Provider=s,s.Consumer={$$typeof:M,_context:s},s._currentRenderer=null,s._currentRenderer2=null,s},y.createElement=function(s,d,T){for(var R=2;R<arguments.length;R++)pe(arguments[R]);R={};var D=null;if(d!=null)for(X in tt||!("__self"in d)||"key"in d||(tt=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),fe(d)&&(Q(d.key),D=""+d.key),d)ze.call(d,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(R[X]=d[X]);var $=arguments.length-2;if($===1)R.children=T;else if(1<$){for(var F=Array($),Z=0;Z<$;Z++)F[Z]=arguments[Z+2];Object.freeze&&Object.freeze(F),R.children=F}if(s&&s.defaultProps)for(X in $=s.defaultProps,$)R[X]===void 0&&(R[X]=$[X]);D&&Re(R,typeof s=="function"?s.displayName||s.name||"Unknown":s);var X=1e4>B.recentlyCreatedOwnerStacks++;return ve(s,D,R,ne(),X?Error("react-stack-top-frame"):nt,X?bt(se(s)):Gt)},y.createRef=function(){var s={current:null};return Object.seal(s),s},y.forwardRef=function(s){s!=null&&s.$$typeof===C?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof s!="function"?console.error("forwardRef requires a render function but was given %s.",s===null?"null":typeof s):s.length!==0&&s.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",s.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),s!=null&&s.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var d={$$typeof:V,render:s},T;return Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return T},set:function(R){T=R,s.name||s.displayName||(Object.defineProperty(s,"name",{value:R}),s.displayName=R)}}),d},y.isValidElement=ge,y.lazy=function(s){s={_status:-1,_result:s};var d={$$typeof:ke,_payload:s,_init:je},T={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return s._ioInfo=T,d._debugInfo=[{awaited:T}],d},y.memo=function(s,d){s==null&&console.error("memo: The first argument must be a component. Instead received: %s",s===null?"null":typeof s),d={$$typeof:C,type:s,compare:d===void 0?null:d};var T;return Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return T},set:function(R){T=R,s.name||s.displayName||(Object.defineProperty(s,"name",{value:R}),s.displayName=R)}}),d},y.startTransition=function(s){var d=B.T,T={};T._updatedFibers=new Set,B.T=T;try{var R=s(),D=B.S;D!==null&&D(T,R),typeof R=="object"&&R!==null&&typeof R.then=="function"&&(B.asyncTransitions++,R.then(be,be),R.then(de,lt))}catch($){lt($)}finally{d===null&&T._updatedFibers&&(s=T._updatedFibers.size,T._updatedFibers.clear(),10<s&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),d!==null&&T.types!==null&&(d.types!==null&&d.types!==T.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),d.types=T.types),B.T=d}},y.unstable_useCacheRefresh=function(){return G().useCacheRefresh()},y.use=function(s){return G().use(s)},y.useActionState=function(s,d,T){return G().useActionState(s,d,T)},y.useCallback=function(s,d){return G().useCallback(s,d)},y.useContext=function(s){var d=G();return s.$$typeof===M&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),d.useContext(s)},y.useDebugValue=function(s,d){return G().useDebugValue(s,d)},y.useDeferredValue=function(s,d){return G().useDeferredValue(s,d)},y.useEffect=function(s,d){return s==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useEffect(s,d)},y.useEffectEvent=function(s){return G().useEffectEvent(s)},y.useId=function(){return G().useId()},y.useImperativeHandle=function(s,d,T){return G().useImperativeHandle(s,d,T)},y.useInsertionEffect=function(s,d){return s==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useInsertionEffect(s,d)},y.useLayoutEffect=function(s,d){return s==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),G().useLayoutEffect(s,d)},y.useMemo=function(s,d){return G().useMemo(s,d)},y.useOptimistic=function(s,d){return G().useOptimistic(s,d)},y.useReducer=function(s,d,T){return G().useReducer(s,d,T)},y.useRef=function(s){return G().useRef(s)},y.useState=function(s){return G().useState(s)},y.useSyncExternalStore=function(s,d,T){return G().useSyncExternalStore(s,d,T)},y.useTransition=function(){return G().useTransition()},y.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(yt,yt.exports)),yt.exports}var gn;function mn(){return gn||(gn=1,process.env.NODE_ENV==="production"?It.exports=jr():It.exports=zr()),It.exports}var yn;function Nr(){return yn||(yn=1,process.env.NODE_ENV!=="production"&&(function(){function v(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===je?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case Re:return"Fragment";case ve:return"Profiler";case _e:return"StrictMode";case Ie:return"Suspense";case m:return"SuspenseList";case Te:return"Activity"}if(typeof u=="object")switch(typeof u.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),u.$$typeof){case fe:return"Portal";case pe:return u.displayName||"Context";case Me:return(u._context.displayName||"Context")+".Consumer";case ge:var b=u.render;return u=u.displayName,u||(u=b.displayName||b.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case De:return b=u.displayName||null,b!==null?b:v(u.type)||"Memo";case he:b=u._payload,u=u._init;try{return v(u(b))}catch{}}return null}function y(u){return""+u}function E(u){try{y(u);var b=!1}catch{b=!0}if(b){b=console;var P=b.error,M=typeof Symbol=="function"&&Symbol.toStringTag&&u[Symbol.toStringTag]||u.constructor.name||"Object";return P.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",M),y(u)}}function g(u){if(u===Re)return"<>";if(typeof u=="object"&&u!==null&&u.$$typeof===he)return"<...>";try{var b=v(u);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function w(){var u=G.A;return u===null?null:u.getOwner()}function O(){return Error("react-stack-top-frame")}function J(u){if(be.call(u,"key")){var b=Object.getOwnPropertyDescriptor(u,"key").get;if(b&&b.isReactWarning)return!1}return u.key!==void 0}function L(u,b){function P(){te||(te=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}P.isReactWarning=!0,Object.defineProperty(u,"key",{get:P,configurable:!0})}function de(){var u=v(this.type);return ue[u]||(ue[u]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),u=this.props.ref,u!==void 0?u:null}function ie(u,b,P,M,U,V){var z=P.ref;return u={$$typeof:ce,type:u,key:b,props:P,_owner:M},(z!==void 0?z:null)!==null?Object.defineProperty(u,"ref",{enumerable:!1,get:de}):Object.defineProperty(u,"ref",{enumerable:!1,value:null}),u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(u,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(u,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(u,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}function Q(u,b,P,M,U,V){var z=b.children;if(z!==void 0)if(M)if(ee(z)){for(M=0;M<z.length;M++)ye(z[M]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ye(z);if(be.call(b,"key")){z=v(u);var ae=Object.keys(b).filter(function(ke){return ke!=="key"});M=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",me[z+M]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
41
|
+
`,f.style.border="1px solid #e1e1e1",f.style.backgroundColor="#ffffff",f.style.padding="4px",f.style.borderRadius="3px",f.style.color="#000000",f.onchange=()=>document.execCommand("fontSize",!1,f.value),d.appendChild(f);const y=pr();d.appendChild(y);const T=hr();d.appendChild(T);const z=vr();d.appendChild(z);const R=gr();d.appendChild(R);const ne=mr();d.appendChild(ne);const Y=yr();d.appendChild(Y);const F=br();d.appendChild(F);const ge=wr();d.appendChild(ge);const se=Er();d.appendChild(se);const Z=kr();d.appendChild(Z);const ce=Tr();d.appendChild(ce);const Ce=xr();return d.appendChild(Ce),d}function _r(d,h){const g=document.createElement("div");return g.classList.add("editor"),g.contentEditable="true",g.style.color="#000000",g.style.border="1px solid #e1e1e1",g.style.minHeight="400px",g.style.padding="15px",g.style.fontFamily="Arial, sans-serif",g.style.fontSize="14px",g.style.lineHeight="1.5",g.style.outline="none",g.style.backgroundColor="#ffffff",g.style.borderRadius="4px",g.style.boxShadow="inset 0 1px 3px rgba(0,0,0,0.1)",g.style.direction="ltr",g.style.textAlign="left",g.innerHTML="",g.addEventListener("dragover",f=>{f.preventDefault(),f.stopPropagation()}),g.addEventListener("drop",f=>{f.preventDefault(),f.stopPropagation();const y=f.dataTransfer?.files;if(y&&y.length>0)for(let T=0;T<y.length;T++){const z=y[T];if(z.type.startsWith("image/")){const R=new FileReader;R.onload=ne=>{const Y=document.createElement("img");Y.src=ne.target?.result,Y.style.maxWidth="100%",Y.style.width="100%",Y.style.height="auto",Y.style.cursor="pointer",Y.draggable=!1;const F=document.createElement("div");F.className="editor-image-wrapper",F.style.display="inline-block",F.style.position="relative",F.style.maxWidth="100%",F.style.width="auto",F.style.height="auto",F.contentEditable="false",F.style.userSelect="none",F.style.boxSizing="border-box",F.style.touchAction="none",F.appendChild(Y),g.appendChild(F)},R.readAsDataURL(z)}}}),g.addEventListener("click",f=>{const y=f.target;let T=y;y.tagName==="IMG"&&(T=y.parentElement),T&&T.classList.contains("editor-image-wrapper")&&h(T)}),g.addEventListener("keyup",()=>_e()),g.addEventListener("mouseup",()=>_e()),g.addEventListener("focus",()=>_e()),window.addEventListener("selectionchange",()=>{try{const f=window.getSelection();if(!f||!f.anchorNode)return;let y=f.anchorNode;for(;y&&y.nodeType!==Node.ELEMENT_NODE;)y=y.parentNode;if(!y)return;g.contains(y)&&_e()}catch{}}),g}function Cr(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var Ae={exports:{}},Mr=Ae.exports,Vt;function Or(){return Vt||(Vt=1,(function(d,h){(function(g,f){d.exports=f()})(Mr,(function(){function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(r){ne(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function y(t){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(t)}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ce(r.key),r)}}function R(t,e,n){return e&&z(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ne(t,e,n){return(e=Ce(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ge(t,e)}function F(t){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(t)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ge(t,e)}function se(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z(t){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var n,r=F(t);if(e){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(function(i,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return se(i)})(this,n)}}function ce(){return ce=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=(function(i,a){for(;!Object.prototype.hasOwnProperty.call(i,a)&&(i=F(i))!==null;);return i})(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ce.apply(this,arguments)}function Ce(t){var e=(function(n,r){if(typeof n!="object"||n===null)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var i=o.call(n,r);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t,"string");return typeof e=="symbol"?e:e+""}var G=function(t){return!(!t||!t.Window)&&t instanceof t.Window},J=void 0,V=void 0;function ee(t){J=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),V=t}function re(t){return G(t)?t:(t.ownerDocument||t).defaultView||V.window}typeof window<"u"&&window&&ee(window);var Me=function(t){return!!t&&y(t)==="object"},Qe=function(t){return typeof t=="function"},m={window:function(t){return t===V||G(t)},docFrag:function(t){return Me(t)&&t.nodeType===11},object:Me,func:Qe,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||y(t)!=="object")return!1;var e=re(t)||V;return/object|function/.test(typeof Element>"u"?"undefined":y(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return Me(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return Me(t)&&t.length!==void 0&&Qe(t.splice)}};function Fe(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function Oe(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="drag"){var r=n.prepared.axis;if(r==="x"||r==="y"){var o=r==="x"?"y":"x";e.page[o]=n.coords.start.page[o],e.client[o]=n.coords.start.client[o],e.delta[o]=0}}}var Pe={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=Pe.draggable,e.map.drag=Pe,e.methodDict.drag="draggable",r.actions.drag=Pe.defaults},listeners:{"interactions:before-action-move":Fe,"interactions:action-resume":Fe,"interactions:action-move":Oe,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,o=n.options.drag;if(o&&o.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(r&n.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return m.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):m.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:Fe,move:Oe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Ze=Pe,W={init:function(t){var e=t;W.document=e.document,W.DocumentFragment=e.DocumentFragment||le,W.SVGElement=e.SVGElement||le,W.SVGSVGElement=e.SVGSVGElement||le,W.SVGElementInstance=e.SVGElementInstance||le,W.Element=e.Element||le,W.HTMLElement=e.HTMLElement||W.Element,W.Event=e.Event,W.Touch=e.Touch||le,W.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function le(){}var B=W,U={init:function(t){var e=B.Element,n=t.navigator||{};U.supportsTouch="ontouchstart"in t||m.func(t.DocumentTouch)&&B.document instanceof t.DocumentTouch,U.supportsPointerEvent=n.pointerEnabled!==!1&&!!B.PointerEvent,U.isIOS=/iP(hone|od|ad)/.test(n.platform),U.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),U.isIe9=/MSIE 9/.test(n.userAgent),U.isOperaMobile=n.appName==="Opera"&&U.supportsTouch&&/Presto/.test(n.userAgent),U.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",U.pEventTypes=U.supportsPointerEvent?B.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,U.wheelEvent=B.document&&"onmousewheel"in B.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},$=U;function ae(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Le(t,e){for(;m.element(t);){if(oe(t,e))return t;t=te(t)}return null}function te(t){var e=t.parentNode;if(m.docFrag(e)){for(;(e=e.host)&&m.docFrag(e););return e}return e}function oe(t,e){return V!==J&&(e=e.replace(/\/deep\//g," ")),t[$.prefixedMatchesSelector](e)}var b=function(t){return t.parentNode||t.host};function I(t,e){for(var n,r=[],o=t;(n=b(o))&&o!==e&&n!==o.ownerDocument;)r.unshift(o),o=n;return r}function j(t,e,n){for(;m.element(t);){if(oe(t,e))return!0;if((t=te(t))===n)return oe(t,e)}return!1}function N(t){return t.correspondingUseElement||t}function me(t){var e=t instanceof B.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function Ee(t){var e,n=me(t);if(!$.isIOS7&&n){var r={x:(e=(e=re(t))||V).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n}function H(t){for(var e=[];t;)e.push(t),t=te(t);return e}function ue(t){return!!m.string(t)&&(B.document.querySelector(t),!0)}function _(t,e){for(var n in e)t[n]=e[n];return t}function et(t,e,n){return t==="parent"?te(n):t==="self"?e.getRect(n):Le(n,t)}function Ne(t,e,n,r){var o=t;return m.string(o)?o=et(o,e,n):m.func(o)&&(o=o.apply(void 0,r)),m.element(o)&&(o=Ee(o)),o}function tt(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function mt(t){return!t||"x"in t&&"y"in t||((t=_({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function nt(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function He(t,e,n){var r=n&&t.options[n];return tt(Ne(r&&r.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function ke(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(c){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},m.string(t)&&t.search(" ")!==-1&&(t=$t(t)),m.array(t))return t.forEach((function(c){return ke(c,e,n,r)})),r;if(m.object(t)&&(e=t,t=""),m.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(m.array(e))for(var o=0,i=e;o<i.length;o++){var a=i[o];ke(t,a,n,r)}else if(m.object(e))for(var s in e)ke($t(s).map((function(c){return"".concat(t).concat(c)})),e[s],n,r);return r}function $t(t){return t.trim().split(/ +/)}var Be=function(t,e){return Math.sqrt(t*t+e*e)},Fr=["webkit","moz"];function rt(t,e){t.__set||(t.__set={});var n=function(o){if(Fr.some((function(i){return o.indexOf(i)===0})))return 1;typeof t[o]!="function"&&o!=="__set"&&Object.defineProperty(t,o,{get:function(){return o in t.__set?t.__set[o]:t.__set[o]=e[o]},set:function(i){t.__set[o]=i},configurable:!0})};for(var r in e)n(r);return t}function ot(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Jt(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function Kt(t){return t instanceof B.Event||t instanceof B.Touch}function it(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function Qt(t,e){return e=e||{x:0,y:0},$.isOperaMobile&&Kt(t)?(it("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):it("page",t,e),e}function Ye(t){return m.number(t.pointerId)?t.pointerId:t.identifier}function Lr(t,e,n){var r=e.length>1?Zt(e):e[0];Qt(r,t.page),(function(o,i){i=i||{},$.isOperaMobile&&Kt(o)?it("screen",o,i):it("client",o,i)})(r,t.client),t.timeStamp=n}function yt(t){var e=[];return m.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function Zt(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var o in e)e[o]+=r[o]}for(var i in e)e[i]/=t.length;return e}function bt(t){if(!t.length)return null;var e=yt(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),o=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:o,bottom:i,width:o-n,height:i-r}}function xt(t,e){var n=e+"X",r=e+"Y",o=yt(t),i=o[0][n]-o[1][n],a=o[0][r]-o[1][r];return Be(i,a)}function wt(t,e){var n=e+"X",r=e+"Y",o=yt(t),i=o[1][n]-o[0][n],a=o[1][r]-o[0][r];return 180*Math.atan2(a,i)/Math.PI}function en(t){return m.string(t.pointerType)?t.pointerType:m.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof B.Touch?"touch":"mouse"}function tn(t){var e=m.func(t.composedPath)?t.composedPath():t.path;return[N(e?e[0]:t.target),N(t.currentTarget)]}var at=(function(){function t(e){T(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return R(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t})();Object.defineProperty(at.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var nn=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t},rn=function(t){return nn([],t)},Ve=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},We=function(t,e){return t[Ve(t,e)]},Re=(function(t){Y(n,t);var e=Z(n);function n(r,o,i){var a;T(this,n),(a=e.call(this,o._interaction)).dropzone=void 0,a.dragEvent=void 0,a.relatedTarget=void 0,a.draggable=void 0,a.propagationStopped=!1,a.immediatePropagationStopped=!1;var s=i==="dragleave"?r.prev:r.cur,c=s.element,u=s.dropzone;return a.type=i,a.target=c,a.currentTarget=c,a.dropzone=u,a.dragEvent=o,a.relatedTarget=o.target,a.draggable=o.interactable,a.timeStamp=o.timeStamp,a}return R(n,[{key:"reject",value:function(){var r=this,o=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&o.cur.dropzone===this.dropzone&&o.cur.element===this.target)if(o.prev.dropzone=this.dropzone,o.prev.element=this.target,o.rejected=!0,o.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var i=o.activeDrops,a=Ve(i,(function(c){var u=c.dropzone,l=c.element;return u===r.dropzone&&l===r.target}));o.activeDrops.splice(a,1);var s=new n(o,this.dragEvent,"dropdeactivate");s.dropzone=this.dropzone,s.target=this.target,this.dropzone.fire(s)}else this.dropzone.fire(new n(o,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n})(at);function on(t,e){for(var n=0,r=t.slice();n<r.length;n++){var o=r[n],i=o.dropzone,a=o.element;e.dropzone=i,e.target=a,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function Et(t,e){for(var n=(function(i,a){for(var s=[],c=0,u=i.interactables.list;c<u.length;c++){var l=u[c];if(l.options.drop.enabled){var p=l.options.drop.accept;if(!(m.element(p)&&p!==a||m.string(p)&&!oe(a,p)||m.func(p)&&!p({dropzone:l,draggableElement:a})))for(var v=0,w=l.getAllElements();v<w.length;v++){var x=w[v];x!==a&&s.push({dropzone:l,element:x,rect:l.getRect(x)})}}}return s})(t,e),r=0;r<n.length;r++){var o=n[r];o.rect=o.dropzone.getRect(o.element)}return n}function an(t,e,n){for(var r=t.dropState,o=t.interactable,i=t.element,a=[],s=0,c=r.activeDrops;s<c.length;s++){var u=c[s],l=u.dropzone,p=u.element,v=u.rect,w=l.dropCheck(e,n,o,i,p,v);a.push(w?p:null)}var x=(function(E){for(var S,k,C,P=[],A=0;A<E.length;A++){var M=E[A],D=E[S];if(M&&A!==S)if(D){var q=b(M),L=b(D);if(q!==M.ownerDocument)if(L!==M.ownerDocument)if(q!==L){P=P.length?P:I(D);var K=void 0;if(D instanceof B.HTMLElement&&M instanceof B.SVGElement&&!(M instanceof B.SVGSVGElement)){if(M===L)continue;K=M.ownerSVGElement}else K=M;for(var ie=I(K,D.ownerDocument),fe=0;ie[fe]&&ie[fe]===P[fe];)fe++;var vt=[ie[fe-1],ie[fe],P[fe]];if(vt[0])for(var Je=vt[0].lastChild;Je;){if(Je===vt[1]){S=A,P=ie;break}if(Je===vt[2])break;Je=Je.previousSibling}}else C=D,(parseInt(re(k=M).getComputedStyle(k).zIndex,10)||0)>=(parseInt(re(C).getComputedStyle(C).zIndex,10)||0)&&(S=A);else S=A}else S=A}return S})(a);return r.activeDrops[x]||null}function kt(t,e,n){var r=t.dropState,o={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(o.activate=new Re(r,n,"dropactivate"),o.activate.target=null,o.activate.dropzone=null),n.type==="dragend"&&(o.deactivate=new Re(r,n,"dropdeactivate"),o.deactivate.target=null,o.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(o.leave=new Re(r,n,"dragleave"),n.dragLeave=o.leave.target=r.prev.element,n.prevDropzone=o.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(o.enter=new Re(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),n.type==="dragend"&&r.cur.dropzone&&(o.drop=new Re(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),n.type==="dragmove"&&r.cur.dropzone&&(o.move=new Re(r,n,"dropmove"),n.dropzone=r.cur.dropzone)),o}function Tt(t,e){var n=t.dropState,r=n.activeDrops,o=n.cur,i=n.prev;e.leave&&i.dropzone.fire(e.leave),e.enter&&o.dropzone.fire(e.enter),e.move&&o.dropzone.fire(e.move),e.drop&&o.dropzone.fire(e.drop),e.deactivate&&on(r,e.deactivate),n.prev.dropzone=o.dropzone,n.prev.element=o.element}function sn(t,e){var n=t.interaction,r=t.iEvent,o=t.event;if(r.type==="dragmove"||r.type==="dragend"){var i=n.dropState;e.dynamicDrop&&(i.activeDrops=Et(e,n.element));var a=r,s=an(n,a,o);i.rejected=i.rejected&&!!s&&s.dropzone===i.cur.dropzone&&s.element===i.cur.element,i.cur.dropzone=s&&s.dropzone,i.cur.element=s&&s.element,i.events=kt(n,0,a)}}var cn={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,o=t.defaults;t.usePlugin(Ze),r.prototype.dropzone=function(i){return(function(a,s){if(m.object(s)){if(a.options.drop.enabled=s.enabled!==!1,s.listeners){var c=ke(s.listeners),u=Object.keys(c).reduce((function(p,v){return p[/^(enter|leave)/.test(v)?"drag".concat(v):/^(activate|deactivate|move)/.test(v)?"drop".concat(v):v]=c[v],p}),{}),l=a.options.drop.listeners;l&&a.off(l),a.on(u),a.options.drop.listeners=u}return m.func(s.ondrop)&&a.on("drop",s.ondrop),m.func(s.ondropactivate)&&a.on("dropactivate",s.ondropactivate),m.func(s.ondropdeactivate)&&a.on("dropdeactivate",s.ondropdeactivate),m.func(s.ondragenter)&&a.on("dragenter",s.ondragenter),m.func(s.ondragleave)&&a.on("dragleave",s.ondragleave),m.func(s.ondropmove)&&a.on("dropmove",s.ondropmove),/^(pointer|center)$/.test(s.overlap)?a.options.drop.overlap=s.overlap:m.number(s.overlap)&&(a.options.drop.overlap=Math.max(Math.min(1,s.overlap),0)),"accept"in s&&(a.options.drop.accept=s.accept),"checker"in s&&(a.options.drop.checker=s.checker),a}return m.bool(s)?(a.options.drop.enabled=s,a):a.options.drop})(this,i)},r.prototype.dropCheck=function(i,a,s,c,u,l){return(function(p,v,w,x,E,S,k){var C=!1;if(!(k=k||p.getRect(S)))return!!p.options.drop.checker&&p.options.drop.checker(v,w,C,p,S,x,E);var P=p.options.drop.overlap;if(P==="pointer"){var A=He(x,E,"drag"),M=Qt(v);M.x+=A.x,M.y+=A.y;var D=M.x>k.left&&M.x<k.right,q=M.y>k.top&&M.y<k.bottom;C=D&&q}var L=x.getRect(E);if(L&&P==="center"){var K=L.left+L.width/2,ie=L.top+L.height/2;C=K>=k.left&&K<=k.right&&ie>=k.top&&ie<=k.bottom}return L&&m.number(P)&&(C=Math.max(0,Math.min(k.right,L.right)-Math.max(k.left,L.left))*Math.max(0,Math.min(k.bottom,L.bottom)-Math.max(k.top,L.top))/(L.width*L.height)>=P),p.options.drop.checker&&(C=p.options.drop.checker(v,w,C,p,S,x,E)),C})(this,i,a,s,c,u,l)},n.dynamicDrop=function(i){return m.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},_(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,o.actions.drop=cn.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if(n.prepared.name==="drag"){var o=n.dropState;o.activeDrops=[],o.events={},o.activeDrops=Et(e,n.element),o.events=kt(n,0,r),o.events.activate&&(on(o.activeDrops,o.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":sn,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;if(n.prepared.name==="drag"){var o=n.dropState;Tt(n,o.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),o.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var n=t.interaction,r=t.iEvent;sn(t,e),Tt(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:Et,getDrop:an,getDropEvents:kt,fireDropEvents:Tt,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Nr=cn;function St(t){var e=t.interaction,n=t.iEvent,r=t.phase;if(e.prepared.name==="gesture"){var o=e.pointers.map((function(u){return u.pointer})),i=r==="start",a=r==="end",s=e.interactable.options.deltaSource;if(n.touches=[o[0],o[1]],i)n.distance=xt(o,s),n.box=bt(o),n.scale=1,n.ds=0,n.angle=wt(o,s),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=xt(o,s),n.box=bt(o),n.scale=n.distance/e.gesture.startDistance,n.angle=wt(o,s),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,m.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var _t={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(o){return m.object(o)?(this.options.gesture.enabled=o.enabled!==!1,this.setPerAction("gesture",o),this.setOnEvents("gesture",o),this):m.bool(o)?(this.options.gesture.enabled=o,this):this.options.gesture},e.map.gesture=_t,e.methodDict.gesture="gesturable",r.actions.gesture=_t.defaults},listeners:{"interactions:action-start":St,"interactions:action-move":St,"interactions:action-end":St,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Hr=_t;function Br(t,e,n,r,o,i,a){if(!e)return!1;if(e===!0){var s=m.number(i.width)?i.width:i.right-i.left,c=m.number(i.height)?i.height:i.bottom-i.top;if(a=Math.min(a,Math.abs((t==="left"||t==="right"?s:c)/2)),s<0&&(t==="left"?t="right":t==="right"&&(t="left")),c<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var u=s>=0?i.left:i.right;return n.x<u+a}if(t==="top"){var l=c>=0?i.top:i.bottom;return n.y<l+a}if(t==="right")return n.x>(s>=0?i.right:i.left)-a;if(t==="bottom")return n.y>(c>=0?i.bottom:i.top)-a}return!!m.element(r)&&(m.element(e)?e===r:j(r,e,o))}function ln(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.resizeAxes){var r=e;n.interactable.options.resize.square?(n.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,n.resizeAxes==="x"?r.delta.y=0:n.resizeAxes==="y"&&(r.delta.x=0))}}var pe,Te,de={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,o=t.defaults;de.cursors=(function(i){return i.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(n),de.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(i){return(function(a,s,c){return m.object(s)?(a.options.resize.enabled=s.enabled!==!1,a.setPerAction("resize",s),a.setOnEvents("resize",s),m.string(s.axis)&&/^x$|^y$|^xy$/.test(s.axis)?a.options.resize.axis=s.axis:s.axis===null&&(a.options.resize.axis=c.defaults.actions.resize.axis),m.bool(s.preserveAspectRatio)?a.options.resize.preserveAspectRatio=s.preserveAspectRatio:m.bool(s.square)&&(a.options.resize.square=s.square),a):m.bool(s)?(a.options.resize.enabled=s,a):a.options.resize})(this,i,t)},e.map.resize=de,e.methodDict.resize="resizable",o.actions.resize=de.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.rect;r._rects={start:_({},i),corrected:_({},i),previous:_({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},o.edges=r.prepared.edges,o.rect=r._rects.corrected,o.deltaRect=r._rects.delta}})(t),ln(t)},"interactions:action-move":function(t){(function(e){var n=e.iEvent,r=e.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var o=n,i=r.interactable.options.resize.invert,a=i==="reposition"||i==="negate",s=r.rect,c=r._rects,u=c.start,l=c.corrected,p=c.delta,v=c.previous;if(_(v,l),a){if(_(l,s),i==="reposition"){if(l.top>l.bottom){var w=l.top;l.top=l.bottom,l.bottom=w}if(l.left>l.right){var x=l.left;l.left=l.right,l.right=x}}}else l.top=Math.min(s.top,u.bottom),l.bottom=Math.max(s.bottom,u.top),l.left=Math.min(s.left,u.right),l.right=Math.max(s.right,u.left);for(var E in l.width=l.right-l.left,l.height=l.bottom-l.top,l)p[E]=l[E]-v[E];o.edges=r.prepared.edges,o.rect=l,o.deltaRect=p}})(t),ln(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,o=t.rect,i=t.buttons;if(o){var a=_({},e.coords.cur.page),s=n.options.resize;if(s&&s.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(i&s.mouseButtons)!=0)){if(m.object(s.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var u in c)c[u]=Br(u,s.edges[u],a,e._latestPointer.eventTarget,r,o,s.margin||de.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var l=s.axis!=="y"&&a.x>o.right-de.defaultMargin,p=s.axis!=="x"&&a.y>o.bottom-de.defaultMargin;(l||p)&&(t.action={name:"resize",axes:(l?"x":"")+(p?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,o=de.cursors,i=null;if(n)i=o[r+n];else if(e){for(var a="",s=0,c=["top","bottom","left","right"];s<c.length;s++){var u=c[s];e[u]&&(a+=u)}i=o[a]}return i},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Yr=de,Vr={id:"actions",install:function(t){t.usePlugin(Hr),t.usePlugin(Yr),t.usePlugin(Ze),t.usePlugin(Nr)}},un=0,ye={request:function(t){return pe(t)},cancel:function(t){return Te(t)},init:function(t){if(pe=t.requestAnimationFrame,Te=t.cancelAnimationFrame,!pe)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];pe=t["".concat(r,"RequestAnimationFrame")],Te=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}pe=pe&&pe.bind(t),Te=Te&&Te.bind(t),pe||(pe=function(o){var i=Date.now(),a=Math.max(0,16-(i-un)),s=t.setTimeout((function(){o(i+a)}),a);return un=i+a,s},Te=function(o){return clearTimeout(o)})}},O={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){O.isScrolling=!0,ye.cancel(O.i),t.autoScroll=O,O.interaction=t,O.prevTime=O.now(),O.i=ye.request(O.scroll)},stop:function(){O.isScrolling=!1,O.interaction&&(O.interaction.autoScroll=null),ye.cancel(O.i)},scroll:function(){var t=O.interaction,e=t.interactable,n=t.element,r=t.prepared.name,o=e.options[r].autoScroll,i=pn(o.container,e,n),a=O.now(),s=(a-O.prevTime)/1e3,c=o.speed*s;if(c>=1){var u={x:O.x*c,y:O.y*c};if(u.x||u.y){var l=dn(i);m.window(i)?i.scrollBy(u.x,u.y):i&&(i.scrollLeft+=u.x,i.scrollTop+=u.y);var p=dn(i),v={x:p.x-l.x,y:p.y-l.y};(v.x||v.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:v,interaction:t,container:i})}O.prevTime=a}O.isScrolling&&(ye.cancel(O.i),O.i=ye.request(O.scroll))},check:function(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&O.check(e.interactable,e.prepared.name))if(e.simulation)O.x=O.y=0;else{var r,o,i,a,s=e.interactable,c=e.element,u=e.prepared.name,l=s.options[u].autoScroll,p=pn(l.container,s,c);if(m.window(p))a=n.clientX<O.margin,r=n.clientY<O.margin,o=n.clientX>p.innerWidth-O.margin,i=n.clientY>p.innerHeight-O.margin;else{var v=me(p);a=n.clientX<v.left+O.margin,r=n.clientY<v.top+O.margin,o=n.clientX>v.right-O.margin,i=n.clientY>v.bottom-O.margin}O.x=o?1:a?-1:0,O.y=i?1:r?-1:0,O.isScrolling||(O.margin=l.margin,O.speed=l.speed,O.start(e))}}};function pn(t,e,n){return(m.string(t)?et(t,e,n):t)||re(n)}function dn(t){return m.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Wr={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=O,O.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=O.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,O.stop(),O.interaction&&(O.interaction=null)},"interactions:stop":O.stop,"interactions:action-move":function(t){return O.onInteractionMove(t)}}},Ur=Wr;function Ue(t,e){var n=!1;return function(){return n||(V.console.warn(e),n=!0),t.apply(this,arguments)}}function Ct(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Xr(t){return m.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function qr(t){return m.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Gr={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(n,r,o,i){var a=(function(s,c,u,l,p){var v=s.getRect(l),w=c.buttons||{0:1,1:4,3:8,4:16}[c.button],x={action:null,interactable:s,interaction:u,element:l,rect:v,buttons:w};return p.fire("auto-start:check",x),x.action})(this,r,o,i,t);return this.options.actionChecker?this.options.actionChecker(n,r,a,this,i,o):a},e.prototype.ignoreFrom=Ue((function(n){return this._backCompatOption("ignoreFrom",n)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Ue((function(n){return this._backCompatOption("allowFrom",n)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=qr,e.prototype.styleCursor=Xr}};function fn(t,e,n,r,o){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&st(e,n,t,o)?t:null}function $r(t,e,n,r,o,i,a){for(var s=0,c=r.length;s<c;s++){var u=r[s],l=o[s],p=u.getAction(e,n,t,l);if(p){var v=fn(p,u,l,i,a);if(v)return{action:v,interactable:u,element:l}}}return{action:null,interactable:null,element:null}}function hn(t,e,n,r,o){var i=[],a=[],s=r;function c(l){i.push(l),a.push(s)}for(;m.element(s);){i=[],a=[],o.interactables.forEachMatch(s,c);var u=$r(t,e,n,i,a,r,o);if(u.action&&!u.interactable.options[u.action.name].manualStart)return u;s=te(s)}return{action:null,interactable:null,element:null}}function vn(t,e,n){var r=e.action,o=e.interactable,i=e.element;r=r||{name:null},t.interactable=o,t.element=i,Ct(t.prepared,r),t.rect=o&&r.name?o.getRect(i):null,mn(t,n),n.fire("autoStart:prepared",{interaction:t})}function st(t,e,n,r){var o=t.options,i=o[n.name].max,a=o[n.name].maxPerElement,s=r.autoStart.maxInteractions,c=0,u=0,l=0;if(!(i&&a&&s))return!1;for(var p=0,v=r.interactions.list;p<v.length;p++){var w=v[p],x=w.prepared.name;if(w.interacting()&&(++c>=s||w.interactable===t&&((u+=x===n.name?1:0)>=i||w.element===e&&(l++,x===n.name&&l>=a))))return!1}return s>0}function gn(t,e){return m.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Mt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function mn(t,e){var n=t.interactable,r=t.element,o=t.prepared;if(t.pointerType==="mouse"&&n&&n.options.styleCursor){var i="";if(o.name){var a=n.options[o.name].cursorChecker;i=m.func(a)?a(o,n,r,t._interacting):e.actions.map[o.name].getCursor(o)}Mt(t.element,i||"",e)}else e.autoStart.cursorElement&&Mt(e.autoStart.cursorElement,"",e)}var Jr={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Gr),n.base.actionChecker=null,n.base.styleCursor=!0,_(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(r){return gn(r,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:st,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;n.interacting()||vn(n,hn(n,r,o,i,e),e)},"interactions:move":function(t,e){(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget;o.pointerType!=="mouse"||o.pointerIsDown||o.interacting()||vn(o,hn(o,i,a,s,r),r)})(t,e),(function(n,r){var o=n.interaction;if(o.pointerIsDown&&!o.interacting()&&o.pointerWasMoved&&o.prepared.name){r.fire("autoStart:before-start",n);var i=o.interactable,a=o.prepared.name;a&&i&&(i.options[a].manualStart||!st(i,o.element,o.prepared,r)?o.stop():(o.start(o.prepared,i,o.element),mn(o,r)))}})(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Mt(n.element,"",e)}},maxInteractions:gn,withinInteractionLimit:st,validateAction:fn},Ot=Jr,Kr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,o=t.dx,i=t.dy;if(n.prepared.name==="drag"){var a=Math.abs(o),s=Math.abs(i),c=n.interactable.options.drag,u=c.startAxis,l=a>s?"x":a<s?"y":"xy";if(n.prepared.axis=c.lockAxis==="start"?l[0]:c.lockAxis,l!=="xy"&&u!=="xy"&&u!==l){n.prepared.name=null;for(var p=r,v=function(x){if(x!==n.interactable){var E=n.interactable.options.drag;if(!E.manualStart&&x.testIgnoreAllow(E,p,r)){var S=x.getAction(n.downPointer,n.downEvent,n,p);if(S&&S.name==="drag"&&(function(k,C){if(!C)return!1;var P=C.options.drag.startAxis;return k==="xy"||P==="xy"||P===k})(l,x)&&Ot.validateAction(S,x,p,r,e))return x}}};m.element(p);){var w=e.interactables.forEachMatch(p,v);if(w){n.prepared.name="drag",n.interactable=w,n.element=p;break}p=te(p)}}}}}};function Pt(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var Qr={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Ot),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=Pt(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;Pt(e)>0&&(e.prepared.name=null)}},getHoldDuration:Pt},Zr=Qr,eo={id:"auto-start",install:function(t){t.usePlugin(Ot),t.usePlugin(Zr),t.usePlugin(Kr)}},to=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):m.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function no(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var yn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=to,e.prototype.checkAndPreventDefault=function(n){return(function(r,o,i){var a=r.options.preventDefault;if(a!=="never")if(a!=="always"){if(o.events.supportsPassive&&/^touch(start|move)$/.test(i.type)){var s=re(i.target).document,c=o.getDocOptions(s);if(!c||!c.events||c.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(i.type)||m.element(i.target)&&oe(i.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||i.preventDefault()}else i.preventDefault()})(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(n){for(var r=0,o=t.interactions.list;r<o.length;r++){var i=o[r];if(i.element&&(i.element===n.target||ae(i.element,n.target)))return void i.interactable.checkAndPreventDefault(n)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=no,t}),{})};function ct(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function Ie(t){var e={};for(var n in t){var r=t[n];m.plainObject(r)?e[n]=Ie(r):m.array(r)?e[n]=rn(r):e[n]=r}return e}var Rt=(function(){function t(e){T(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=lt(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return R(t,[{key:"start",value:function(e,n){var r,o,i=e.phase,a=this.interaction,s=(function(u){var l=u.interactable.options[u.prepared.name],p=l.modifiers;return p&&p.length?p:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(v){var w=l[v];return w&&w.enabled&&{options:w,methods:w._methods}})).filter((function(v){return!!v}))})(a);this.prepareStates(s),this.startEdges=_({},a.edges),this.edges=_({},this.startEdges),this.startOffset=(r=a.rect,o=n,r?{left:o.x-r.left,top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var c=this.fillArg({phase:i,pageCoords:n,preEnd:!1});return this.result=lt(),this.startAll(c),this.result=this.setAll(c)}},{key:"fillArg",value:function(e){var n=this.interaction;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var n=0,r=this.states;n<r.length;n++){var o=r[n];o.methods.start&&(e.state=o,o.methods.start(e))}}},{key:"setAll",value:function(e){var n=e.phase,r=e.preEnd,o=e.skipModifiers,i=e.rect,a=e.edges;e.coords=_({},e.pageCoords),e.rect=_({},i),e.edges=_({},a);for(var s=o?this.states.slice(o):this.states,c=lt(e.coords,e.rect),u=0;u<s.length;u++){var l,p=s[u],v=p.options,w=_({},e.coords),x=null;(l=p.methods)!=null&&l.set&&this.shouldDo(v,r,n)&&(e.state=p,x=p.methods.set(e),nt(e.edges,e.rect,{x:e.coords.x-w.x,y:e.coords.y-w.y})),c.eventProps.push(x)}_(this.edges,e.edges),c.delta.x=e.coords.x-e.pageCoords.x,c.delta.y=e.coords.y-e.pageCoords.y,c.rectDelta.left=e.rect.left-i.left,c.rectDelta.right=e.rect.right-i.right,c.rectDelta.top=e.rect.top-i.top,c.rectDelta.bottom=e.rect.bottom-i.bottom;var E=this.result.coords,S=this.result.rect;if(E&&S){var k=c.rect.left!==S.left||c.rect.right!==S.right||c.rect.top!==S.top||c.rect.bottom!==S.bottom;c.changed=k||E.x!==c.coords.x||E.y!==c.coords.y}return c}},{key:"applyToInteraction",value:function(e){var n=this.interaction,r=e.phase,o=n.coords.cur,i=n.coords.start,a=this.result,s=this.startDelta,c=a.delta;r==="start"&&_(this.startDelta,a.delta);for(var u=0,l=[[i,s],[o,c]];u<l.length;u++){var p=l[u],v=p[0],w=p[1];v.page.x+=w.x,v.page.y+=w.y,v.client.x+=w.x,v.client.y+=w.y}var x=this.result.rectDelta,E=e.rect||n.rect;E.left+=x.left,E.right+=x.right,E.top+=x.top,E.bottom+=x.bottom,E.width=E.right-E.left,E.height=E.bottom-E.top}},{key:"setAndApply",value:function(e){var n=this.interaction,r=e.phase,o=e.preEnd,i=e.skipModifiers,a=this.setAll(this.fillArg({preEnd:o,phase:r,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=a,!a.changed&&(!i||i<this.states.length)&&n.interacting())return!1;if(e.modifiedCoords){var s=n.coords.cur.page,c={x:e.modifiedCoords.x-s.x,y:e.modifiedCoords.y-s.y};a.coords.x+=c.x,a.coords.y+=c.y,a.delta.x+=c.x,a.delta.y+=c.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var n=e.interaction,r=e.event,o=this.states;if(o&&o.length){for(var i=!1,a=0;a<o.length;a++){var s=o[a];e.state=s;var c=s.options,u=s.methods,l=u.beforeEnd&&u.beforeEnd(e);if(l)return this.endResult=l,!1;i=i||!i&&this.shouldDo(c,!0,e.phase,!0)}i&&n.move({event:r,preEnd:!0})}}},{key:"stop",value:function(e){var n=e.interaction;if(this.states&&this.states.length){var r=_({states:this.states,interactable:n.interactable,element:n.element,rect:null},e);this.fillArg(r);for(var o=0,i=this.states;o<i.length;o++){var a=i[o];r.state=a,a.methods.stop&&a.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var n=0;n<e.length;n++){var r=e[n],o=r.options,i=r.methods,a=r.name;this.states.push({options:o,methods:i,index:n,name:a})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var n=e.interaction,r=n.coords,o=n.rect,i=n.modification;if(i.result){for(var a=i.startDelta,s=i.result,c=s.delta,u=s.rectDelta,l=0,p=[[r.start,a],[r.cur,c]];l<p.length;l++){var v=p[l],w=v[0],x=v[1];w.page.x-=x.x,w.page.y-=x.y,w.client.x-=x.x,w.client.y-=x.y}o.left-=u.left,o.right-=u.right,o.top-=u.top,o.bottom-=u.bottom}}},{key:"shouldDo",value:function(e,n,r,o){return!(!e||e.enabled===!1||o&&!e.endOnly||e.endOnly&&!n||r==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map((function(n){return Ie(n)})),this.result=lt(_({},e.result.coords),_({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t})();function lt(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function be(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},o=function(i){var a=i||{};for(var s in a.enabled=a.enabled!==!1,n)s in a||(a[s]=n[s]);var c={options:a,methods:r,name:e,enable:function(){return a.enabled=!0,c},disable:function(){return a.enabled=!1,c}};return c};return e&&typeof e=="string"&&(o._defaults=n,o._methods=r),o}function Xe(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var ro={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new Rt(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":Xe,"interactions:action-move":Xe,"interactions:action-end":Xe,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},bn=ro,xn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},It=(function(t){Y(n,t);var e=Z(n);function n(r,o,i,a,s,c,u){var l;T(this,n),(l=e.call(this,r)).relatedTarget=null,l.screenX=void 0,l.screenY=void 0,l.button=void 0,l.buttons=void 0,l.ctrlKey=void 0,l.shiftKey=void 0,l.altKey=void 0,l.metaKey=void 0,l.page=void 0,l.client=void 0,l.delta=void 0,l.rect=void 0,l.x0=void 0,l.y0=void 0,l.t0=void 0,l.dt=void 0,l.duration=void 0,l.clientX0=void 0,l.clientY0=void 0,l.velocity=void 0,l.speed=void 0,l.swipe=void 0,l.axes=void 0,l.preEnd=void 0,s=s||r.element;var p=r.interactable,v=(p&&p.options||xn).deltaSource,w=He(p,s,i),x=a==="start",E=a==="end",S=x?se(l):r.prevEvent,k=x?r.coords.start:E?{page:S.page,client:S.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return l.page=_({},k.page),l.client=_({},k.client),l.rect=_({},r.rect),l.timeStamp=k.timeStamp,E||(l.page.x-=w.x,l.page.y-=w.y,l.client.x-=w.x,l.client.y-=w.y),l.ctrlKey=o.ctrlKey,l.altKey=o.altKey,l.shiftKey=o.shiftKey,l.metaKey=o.metaKey,l.button=o.button,l.buttons=o.buttons,l.target=s,l.currentTarget=s,l.preEnd=c,l.type=u||i+(a||""),l.interactable=p,l.t0=x?r.pointers[r.pointers.length-1].downTime:S.t0,l.x0=r.coords.start.page.x-w.x,l.y0=r.coords.start.page.y-w.y,l.clientX0=r.coords.start.client.x-w.x,l.clientY0=r.coords.start.client.y-w.y,l.delta=x||E?{x:0,y:0}:{x:l[v].x-S[v].x,y:l[v].y-S[v].y},l.dt=r.coords.delta.timeStamp,l.duration=l.timeStamp-l.t0,l.velocity=_({},r.coords.velocity[v]),l.speed=Be(l.velocity.x,l.velocity.y),l.swipe=E||a==="inertiastart"?l.getSwipe():null,l}return R(n,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var o=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;o<0&&(o+=360);var i=112.5<=o&&o<247.5,a=202.5<=o&&o<337.5;return{up:a,down:!a&&22.5<=o&&o<157.5,left:i,right:!i&&(292.5<=o||o<67.5),angle:o,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n})(at);Object.defineProperties(It.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var oo=R((function t(e,n,r,o,i){T(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=r,this.downTime=o,this.downTarget=i})),io=(function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t})({}),wn=(function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t})({}),ao=0,so=(function(){function t(e){var n=this,r=e.pointerType,o=e.scopeFire;T(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Ue((function(l){this.move(l)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=ao++,this._scopeFire=o,this.pointerType=r;var i=this;this._proxy={};var a=function(l){Object.defineProperty(n._proxy,l,{get:function(){return i[l]}})};for(var s in io)a(s);var c=function(l){Object.defineProperty(n._proxy,l,{value:function(){return i[l].apply(i,arguments)}})};for(var u in wn)c(u);this._scopeFire("interactions:new",{interaction:this})}return R(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,n,r){var o=this.updatePointer(e,n,r,!0),i=this.pointers[o];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:r,pointerIndex:o,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(e,n,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled)&&(Ct(this.prepared,e),this.interactable=n,this.element=r,this.rect=n.getRect(r),this.edges=this.prepared.edges?_({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,n,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,n,r,!1);var o,i,a=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(o=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Be(o,i)>this.pointerMoveTolerance);var s,c,u,l=this.getPointerIndex(e),p={pointer:e,pointerIndex:l,pointerInfo:this.pointers[l],event:n,type:"move",eventTarget:r,dx:o,dy:i,duplicate:a,interaction:this};a||(s=this.coords.velocity,c=this.coords.delta,u=Math.max(c.timeStamp/1e3,.001),s.page.x=c.page.x/u,s.page.y=c.page.y/u,s.client.x=c.client.x/u,s.client.y=c.client.y/u,s.timeStamp=u),this._scopeFire("interactions:move",p),a||this.simulation||(this.interacting()&&(p.type=null,this.move(p)),this.pointerWasMoved&&ot(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||Jt(this.coords.delta),(e=_({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,n,r,o){var i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,r,!1));var a=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire("interactions:".concat(a),{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:r,type:a,curEventTarget:o,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var n;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var n=Ye(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Ve(this.pointers,(function(r){return r.id===n}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,n,r,o){var i,a,s,c=Ye(e),u=this.getPointerIndex(e),l=this.pointers[u];return o=o!==!1&&(o||/(down|start)$/i.test(n.type)),l?l.pointer=e:(l=new oo(c,e,n,null,null),u=this.pointers.length,this.pointers.push(l)),Lr(this.coords.cur,this.pointers.map((function(p){return p.pointer})),this._now()),i=this.coords.delta,a=this.coords.prev,s=this.coords.cur,i.page.x=s.page.x-a.page.x,i.page.y=s.page.y-a.page.y,i.client.x=s.client.x-a.client.x,i.client.y=s.client.y-a.client.y,i.timeStamp=s.timeStamp-a.timeStamp,o&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=r,rt(this.downPointer,e),this.interacting()||(ot(this.coords.start,this.coords.cur),ot(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,r),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:r,down:o,pointerInfo:l,pointerIndex:u,interaction:this}),u}},{key:"removePointer",value:function(e,n){var r=this.getPointerIndex(e);if(r!==-1){var o=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:r,pointerInfo:o,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,n,r){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,n,r,o){return new It(this,e,this.prepared.name,n,this.element,r,o)}},{key:"_fireEvent",value:function(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var n=e.event,r=e.phase,o=e.preEnd,i=e.type,a=this.rect;if(a&&r==="move"&&(nt(this.edges,a,this.coords.delta[this.interactable.options.deltaSource]),a.width=a.right-a.left,a.height=a.bottom-a.top),this._scopeFire("interactions:before-action-".concat(r),e)===!1)return!1;var s=e.iEvent=this._createPreparedEvent(n,r,o,i);return this._scopeFire("interactions:action-".concat(r),e),r==="start"&&(this.prevEvent=s),this._fireEvent(s),this._scopeFire("interactions:after-action-".concat(r),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t})();function En(t){kn(t.interaction)}function kn(t){if(!(function(n){return!(!n.offset.pending.x&&!n.offset.pending.y)})(t))return!1;var e=t.offset.pending;return Dt(t.coords.cur,e),Dt(t.coords.delta,e),nt(t.edges,t.rect,e),e.x=0,e.y=0,!0}function co(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function Dt(t,e){var n=t.page,r=t.client,o=e.x,i=e.y;n.x+=o,n.y+=i,r.x+=o,r.y+=i}wn.offsetBy="";var lo={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=co},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return(function(e){e.pointerIsDown&&(Dt(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)})(t.interaction)},"interactions:before-action-start":En,"interactions:before-action-move":En,"interactions:before-action-end":function(t){var e=t.interaction;if(kn(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},Tn=lo,uo=(function(){function t(e){T(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return R(t,[{key:"start",value:function(e){var n=this.interaction,r=ut(n);if(!r||!r.enabled)return!1;var o=n.coords.velocity.client,i=Be(o.x,o.y),a=this.modification||(this.modification=new Rt(n));if(a.copyFrom(n.modification),this.t0=n._now(),this.allowResume=r.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=a.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&i>r.minSpeed&&i>r.endSpeed)this.startInertia();else{if(a.result=a.setAll(this.modifierArg),!a.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,n=this.interaction.coords.velocity.client,r=ut(this.interaction),o=r.resistance,i=-Math.log(r.endSpeed/this.v0)/o;this.targetOffset={x:(n.x-i)/o,y:(n.y-i)/o},this.te=i,this.lambda_v0=o/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var a=this.modification,s=this.modifierArg;s.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},a.result=a.setAll(s),a.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+a.result.delta.x,y:this.targetOffset.y+a.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var n=this;this.timeout=ye.request((function(){n.active&&e()}))}},{key:"inertiaTick",value:function(){var e,n,r,o,i,a,s,c=this,u=this.interaction,l=ut(u).resistance,p=(u._now()-this.t0)/1e3;if(p<this.te){var v,w=1-(Math.exp(-l*p)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,n=0,r=this.targetOffset.x,o=this.targetOffset.y,i=this.modifiedOffset.x,a=this.modifiedOffset.y,v={x:Sn(s=w,e,r,i),y:Sn(s,n,o,a)}):v={x:this.targetOffset.x*w,y:this.targetOffset.y*w};var x={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=x.x,this.currentOffset.y+=x.y,u.offsetBy(x),u.move(),this.onNextFrame((function(){return c.inertiaTick()}))}else u.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,n=this.interaction,r=n._now()-this.t0,o=ut(n).smoothEndDuration;if(r<o){var i={x:_n(r,0,this.targetOffset.x,o),y:_n(r,0,this.targetOffset.y,o)},a={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=a.x,this.currentOffset.y+=a.y,n.offsetBy(a),n.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return e.smoothEndTick()}))}else n.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var n=e.pointer,r=e.event,o=e.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(n,r,o,!0),i._doPhase({interaction:i,event:r,phase:"resume"}),ot(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,ye.cancel(this.timeout)}}]),t})();function ut(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var po={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(Tn),t.usePlugin(bn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new uo(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var o=n;m.element(o);){if(o===e.element){r.resume(t);break}o=te(o)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Xe,"interactions:action-inertiastart":Xe,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Sn(t,e,n,r){var o=1-t;return o*o*e+2*o*t*n+t*t*r}function _n(t,e,n,r){return-n*(t/=r)*(t-2)+e}var fo=po;function Cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}var Mn=(function(){function t(e){T(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=_({},e||{})}return R(t,[{key:"fire",value:function(e){var n,r=this.global;(n=this.types[e.type])&&Cn(e,n),!e.propagationStopped&&r&&(n=r[e.type])&&Cn(e,n)}},{key:"on",value:function(e,n){var r=ke(e,n);for(e in r)this.types[e]=nn(this.types[e]||[],r[e])}},{key:"off",value:function(e,n){var r=ke(e,n);for(e in r){var o=this.types[e];if(o&&o.length)for(var i=0,a=r[e];i<a.length;i++){var s=a[i],c=o.indexOf(s);c!==-1&&o.splice(c,1)}}}},{key:"getRect",value:function(e){return null}}]),t})(),ho=(function(){function t(e){T(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,rt(this,e)}return R(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t})();function qe(t){return m.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function pt(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var vo={id:"events",install:function(t){var e,n=[],r={},o=[],i={add:a,remove:s,addDelegate:function(l,p,v,w,x){var E=qe(x);if(!r[v]){r[v]=[];for(var S=0;S<o.length;S++){var k=o[S];a(k,v,c),a(k,v,u,!0)}}var C=r[v],P=We(C,(function(A){return A.selector===l&&A.context===p}));P||(P={selector:l,context:p,listeners:[]},C.push(P)),P.listeners.push({func:w,options:E})},removeDelegate:function(l,p,v,w,x){var E,S=qe(x),k=r[v],C=!1;if(k)for(E=k.length-1;E>=0;E--){var P=k[E];if(P.selector===l&&P.context===p){for(var A=P.listeners,M=A.length-1;M>=0;M--){var D=A[M];if(D.func===w&&pt(D.options,S)){A.splice(M,1),A.length||(k.splice(E,1),s(p,v,c),s(p,v,u,!0)),C=!0;break}}if(C)break}}},delegateListener:c,delegateUseCapture:u,delegatedEvents:r,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};function a(l,p,v,w){if(l.addEventListener){var x=qe(w),E=We(n,(function(S){return S.eventTarget===l}));E||(E={eventTarget:l,events:{}},n.push(E)),E.events[p]||(E.events[p]=[]),We(E.events[p],(function(S){return S.func===v&&pt(S.options,x)}))||(l.addEventListener(p,v,i.supportsOptions?x:x.capture),E.events[p].push({func:v,options:x}))}}function s(l,p,v,w){if(l.addEventListener&&l.removeEventListener){var x=Ve(n,(function(q){return q.eventTarget===l})),E=n[x];if(E&&E.events)if(p!=="all"){var S=!1,k=E.events[p];if(k){if(v==="all"){for(var C=k.length-1;C>=0;C--){var P=k[C];s(l,p,P.func,P.options)}return}for(var A=qe(w),M=0;M<k.length;M++){var D=k[M];if(D.func===v&&pt(D.options,A)){l.removeEventListener(p,v,i.supportsOptions?A:A.capture),k.splice(M,1),k.length===0&&(delete E.events[p],S=!0);break}}}S&&!Object.keys(E.events).length&&n.splice(x,1)}else for(p in E.events)E.events.hasOwnProperty(p)&&s(l,p,"all")}}function c(l,p){for(var v=qe(p),w=new ho(l),x=r[l.type],E=tn(l)[0],S=E;m.element(S);){for(var k=0;k<x.length;k++){var C=x[k],P=C.selector,A=C.context;if(oe(S,P)&&ae(A,E)&&ae(A,S)){var M=C.listeners;w.currentTarget=S;for(var D=0;D<M.length;D++){var q=M[D];pt(q.options,v)&&q.func(w)}}}S=te(S)}}function u(l){return c(l,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i,i}},At={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=At.methodOrder;e<n.length;e++){var r=n[e],o=At[r](t);if(o)return o}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,o=t.scope;if(!/down|start/i.test(n))return null;for(var i=0,a=o.interactions.list;i<a.length;i++){var s=a[i],c=r;if(s.simulation&&s.simulation.allowResume&&s.pointerType===e)for(;c;){if(c===s.element)return s;c=te(c)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,o=t.eventType,i=t.scope;if(r!=="mouse"&&r!=="pen")return null;for(var a=0,s=i.interactions.list;a<s.length;a++){var c=s[a];if(c.pointerType===r){if(c.simulation&&!On(c,n))continue;if(c.interacting())return c;e||(e=c)}}if(e)return e;for(var u=0,l=i.interactions.list;u<l.length;u++){var p=l[u];if(!(p.pointerType!==r||/down/i.test(o)&&p.simulation))return p}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(On(o,e))return o}return null},idle:function(t){for(var e=t.pointerType,n=0,r=t.scope.interactions.list;n<r.length;n++){var o=r[n];if(o.pointers.length===1){var i=o.interactable;if(i&&(!i.options.gesture||!i.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function On(t,e){return t.pointers.some((function(n){return n.id===e}))}var go=At,zt=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Pn(t,e){return function(n){var r=e.interactions.list,o=en(n),i=tn(n),a=i[0],s=i[1],c=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var u=0,l=n.changedTouches;u<l.length;u++){var p=l[u],v={pointer:p,pointerId:Ye(p),pointerType:o,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},w=Rn(v);c.push([v.pointer,v.eventTarget,v.curEventTarget,w])}}else{var x=!1;if(!$.supportsPointerEvent&&/mouse/.test(n.type)){for(var E=0;E<r.length&&!x;E++)x=r[E].pointerType!=="mouse"&&r[E].pointerIsDown;x=x||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!x){var S={pointer:n,pointerId:Ye(n),pointerType:o,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},k=Rn(S);c.push([S.pointer,S.eventTarget,S.curEventTarget,k])}}for(var C=0;C<c.length;C++){var P=c[C],A=P[0],M=P[1],D=P[2];P[3][t](A,n,M,D)}}}function Rn(t){var e=t.pointerType,n=t.scope,r={interaction:go.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function jt(t,e){var n=t.doc,r=t.scope,o=t.options,i=r.interactions.docEvents,a=r.events,s=a[e];for(var c in r.browser.isIOS&&!o.events&&(o.events={passive:!1}),a.delegatedEvents)s(n,c,a.delegateListener),s(n,c,a.delegateUseCapture,!0);for(var u=o&&o.events,l=0;l<i.length;l++){var p=i[l];s(n,p.type,p.listener,u)}}var mo={id:"core/interactions",install:function(t){for(var e={},n=0;n<zt.length;n++){var r=zt[n];e[r]=Pn(r,t)}var o,i=$.pEventTypes;function a(){for(var s=0,c=t.interactions.list;s<c.length;s++){var u=c[s];if(u.pointerIsDown&&u.pointerType==="touch"&&!u._interacting)for(var l=function(){var w=v[p];t.documents.some((function(x){return ae(x.doc,w.downTarget)}))||u.removePointer(w.pointer,w.event)},p=0,v=u.pointers;p<v.length;p++)l()}}(o=B.PointerEvent?[{type:i.down,listener:a},{type:i.down,listener:e.pointerDown},{type:i.move,listener:e.pointerMove},{type:i.up,listener:e.pointerUp},{type:i.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(s){for(var c=0,u=t.interactions.list;c<u.length;c++)u[c].documentBlur(s)}}),t.prevTouchTime=0,t.Interaction=(function(s){Y(u,s);var c=Z(u);function u(){return T(this,u),c.apply(this,arguments)}return R(u,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(l){t.interactions.pointerMoveTolerance=l}},{key:"_now",value:function(){return t.now()}}]),u})(so),t.interactions={list:[],new:function(s){s.scopeFire=function(u,l){return t.fire(u,l)};var c=new t.Interaction(s);return t.interactions.list.push(c),c},listeners:e,docEvents:o,pointerMoveTolerance:1},t.usePlugin(yn)},listeners:{"scope:add-document":function(t){return jt(t,"add")},"scope:remove-document":function(t){return jt(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var o=e.interactions.list[r];o.interactable===n&&(o.stop(),e.fire("interactions:destroy",{interaction:o}),o.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:jt,doOnInteractions:Pn,methodNames:zt},yo=mo,xe=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(xe||{}),bo=(function(){function t(e,n,r,o){T(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Mn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||r,this._win=re(ue(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return R(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,n){return m.func(n.onstart)&&this.on("".concat(e,"start"),n.onstart),m.func(n.onmove)&&this.on("".concat(e,"move"),n.onmove),m.func(n.onend)&&this.on("".concat(e,"end"),n.onend),m.func(n.oninertiastart)&&this.on("".concat(e,"inertiastart"),n.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,n,r){var o,i=this,a=(o=this._actions.map[e])==null?void 0:o.filterEventType,s=function(c){return(a==null||a(c))&&ct(c,i._actions)};(m.array(n)||m.object(n))&&this._onOff(xe.Off,e,n,void 0,s),(m.array(r)||m.object(r))&&this._onOff(xe.On,e,r,void 0,s)}},{key:"setPerAction",value:function(e,n){var r=this._defaults;for(var o in n){var i=o,a=this.options[e],s=n[i];i==="listeners"&&this.updatePerActionListeners(e,a.listeners,s),m.array(s)?a[i]=rn(s):m.plainObject(s)?(a[i]=_(a[i]||{},Ie(s)),m.object(r.perAction[i])&&"enabled"in r.perAction[i]&&(a[i].enabled=s.enabled!==!1)):m.bool(s)&&m.object(r.perAction[i])?a[i].enabled=s:a[i]=s}}},{key:"getRect",value:function(e){return e=e||(m.element(this.target)?this.target:null),m.string(this.target)&&(e=e||this._context.querySelector(this.target)),Ee(e)}},{key:"rectChecker",value:function(e){var n=this;return m.func(e)?(this.getRect=function(r){var o=_({},e.apply(n,r));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,n){if(ue(n)||m.object(n)){for(var r in this.options[e]=n,this._actions.map)this.options[r][e]=n;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return m.string(e)?Array.from(this._context.querySelectorAll(e)):m.func(e)&&e.getAllElements?e.getAllElements():m.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||ae(this._context,e)}},{key:"testIgnoreAllow",value:function(e,n,r){return!this.testIgnore(e.ignoreFrom,n,r)&&this.testAllow(e.allowFrom,n,r)}},{key:"testAllow",value:function(e,n,r){return!e||!!m.element(r)&&(m.string(e)?j(r,e,n):!!m.element(e)&&ae(e,r))}},{key:"testIgnore",value:function(e,n,r){return!(!e||!m.element(r))&&(m.string(e)?j(r,e,n):!!m.element(e)&&ae(e,r))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,n,r,o,i){m.object(n)&&!m.array(n)&&(o=r,r=null);var a=ke(n,r,i);for(var s in a){s==="wheel"&&(s=$.wheelEvent);for(var c=0,u=a[s];c<u.length;c++){var l=u[c];ct(s,this._actions)?this.events[e===xe.On?"on":"off"](s,l):m.string(this.target)?this._scopeEvents[e===xe.On?"addDelegate":"removeDelegate"](this.target,this._context,s,l,o):this._scopeEvents[e===xe.On?"add":"remove"](this.target,s,l,o)}}return this}},{key:"on",value:function(e,n,r){return this._onOff(xe.On,e,n,r)}},{key:"off",value:function(e,n,r){return this._onOff(xe.Off,e,n,r)}},{key:"set",value:function(e){var n=this._defaults;for(var r in m.object(e)||(e={}),this.options=Ie(n.base),this._actions.methodDict){var o=r,i=this._actions.methodDict[o];this.options[o]={},this.setPerAction(o,_(_({},n.perAction),n.actions[o])),this[i](e[o])}for(var a in e)a!=="getRect"?m.func(this[a])&&this[a](e[a]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(m.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var n=this._scopeEvents.delegatedEvents[e],r=n.length-1;r>=0;r--){var o=n[r],i=o.selector,a=o.context,s=o.listeners;i===this.target&&a===this._context&&n.splice(r,1);for(var c=s.length-1;c>=0;c--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[c][0],s[c][1])}else this._scopeEvents.remove(this.target,"all")}}]),t})(),xo=(function(){function t(e){var n=this;T(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(r){var o=r.interactable,i=o.target,a=m.string(i)?n.selectorMap[i]:i[n.scope.id],s=Ve(a,(function(c){return c===o}));a.splice(s,1)}})}return R(t,[{key:"new",value:function(e,n){n=_(n||{},{actions:this.scope.actions});var r=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),m.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(r)):(r.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:e,options:n,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(e,n){var r=n&&n.context||this.scope.document,o=m.string(e),i=o?this.selectorMap[e]:e[this.scope.id];if(i)return We(i,(function(a){return a._context===r&&(o||a.inContext(e))}))}},{key:"forEachMatch",value:function(e,n){for(var r=0,o=this.list;r<o.length;r++){var i=o[r],a=void 0;if((m.string(i.target)?m.element(e)&&oe(e,i.target):e===i.target)&&i.inContext(e)&&(a=n(i)),a!==void 0)return a}}}]),t})(),wo=(function(){function t(){var e=this;T(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=$,this.defaults=Ie(xn),this.Eventable=Mn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(r){var o=function i(a,s){var c=r.interactables.getExisting(a,s);return c||((c=r.interactables.new(a,s)).events.global=i.globalEvents),c};return o.getPointerAverage=Zt,o.getTouchBBox=bt,o.getTouchDistance=xt,o.getTouchAngle=wt,o.getElementRect=Ee,o.getElementClientRect=me,o.matchesSelector=oe,o.closest=Le,o.globalEvents={},o.version="1.10.27",o.scope=r,o.use=function(i,a){return this.scope.usePlugin(i,a),this},o.isSet=function(i,a){return!!this.scope.interactables.get(i,a&&a.context)},o.on=Ue((function(i,a,s){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var c=0,u=i;c<u.length;c++){var l=u[c];this.on(l,a,s)}return this}if(m.object(i)){for(var p in i)this.on(p,i[p],a);return this}return ct(i,this.scope.actions)?this.globalEvents[i]?this.globalEvents[i].push(a):this.globalEvents[i]=[a]:this.scope.events.add(this.scope.document,i,a,{options:s}),this}),"The interact.on() method is being deprecated"),o.off=Ue((function(i,a,s){if(m.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),m.array(i)){for(var c=0,u=i;c<u.length;c++){var l=u[c];this.off(l,a,s)}return this}if(m.object(i)){for(var p in i)this.off(p,i[p],a);return this}var v;return ct(i,this.scope.actions)?i in this.globalEvents&&(v=this.globalEvents[i].indexOf(a))!==-1&&this.globalEvents[i].splice(v,1):this.scope.events.remove(this.scope.document,i,a,s),this}),"The interact.off() method is being deprecated"),o.debug=function(){return this.scope},o.supportsTouch=function(){return $.supportsTouch},o.supportsPointerEvent=function(){return $.supportsPointerEvent},o.stop=function(){for(var i=0,a=this.scope.interactions.list;i<a.length;i++)a[i].stop();return this},o.pointerMoveTolerance=function(i){return m.number(i)?(this.scope.interactions.pointerMoveTolerance=i,this):this.scope.interactions.pointerMoveTolerance},o.addDocument=function(i,a){this.scope.addDocument(i,a)},o.removeDocument=function(i){this.scope.removeDocument(i)},o})(this),this.InteractEvent=It,this.Interactable=void 0,this.interactables=new xo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return e.removeDocument(r.target)};var n=this;this.Interactable=(function(r){Y(i,r);var o=Z(i);function i(){return T(this,i),o.apply(this,arguments)}return R(i,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(a){return ce(F(i.prototype),"set",this).call(this,a),n.fire("interactable:set",{options:a,interactable:this}),this}},{key:"unset",value:function(){ce(F(i.prototype),"unset",this).call(this);var a=n.interactables.list.indexOf(this);a<0||(n.interactables.list.splice(a,1),n.fire("interactable:unset",{interactable:this}))}}]),i})(bo)}return R(t,[{key:"addListeners",value:function(e,n){this.listenerMaps.push({id:n,map:e})}},{key:"fire",value:function(e,n){for(var r=0,o=this.listenerMaps;r<o.length;r++){var i=o[r].map[e];if(i&&i(n,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:(function(n,r){return n.isInitialized=!0,m.window(r)&&ee(r),B.init(r),$.init(r),ye.init(r),n.window=r,n.document=r.document,n.usePlugin(yo),n.usePlugin(vo),n})(this,e)}},{key:"pluginIsInstalled",value:function(e){var n=e.id;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){for(var r=0,o=this.listenerMaps.length,i=e.before.reduce((function(s,c){return s[c]=!0,s[In(c)]=!0,s}),{});r<o;r++){var a=this.listenerMaps[r].id;if(a&&(i[a]||i[In(a)]))break}this.listenerMaps.splice(r,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,n){if(this.getDocIndex(e)!==-1)return!1;var r=re(e);n=n?_({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(e){var n=this.getDocIndex(e),r=re(e),o=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:r,scope:this,options:o})}},{key:"getDocIndex",value:function(e){for(var n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}},{key:"getDocOptions",value:function(e){var n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t})();function In(t){return t&&t.replace(/\/.*$/,"")}var Dn=new wo,X=Dn.interactStatic,Eo=typeof globalThis<"u"?globalThis:window;Dn.init(Eo);var ko=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(r){var o=r[0],i=r[1];return o in t||i in t})),n=function(r,o){for(var i=t.range,a=t.limits,s=a===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:a,c=t.offset,u=c===void 0?{x:0,y:0}:c,l={range:i,grid:t,x:null,y:null},p=0;p<e.length;p++){var v=e[p],w=v[0],x=v[1],E=Math.round((r-u.x)/t[w]),S=Math.round((o-u.y)/t[x]);l[w]=Math.max(s.left,Math.min(s.right,E*t[w]+u.x)),l[x]=Math.max(s.top,Math.min(s.bottom,S*t[x]+u.y))}return l};return n.grid=t,n.coordFields=e,n}}),To={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=_(e.snappers||{},ko),e.createSnapGrid=e.snappers.grid}},So=To,_o={start:function(t){var e=t.state,n=t.rect,r=t.edges,o=t.pageCoords,i=e.options,a=i.ratio,s=i.enabled,c=e.options,u=c.equalDelta,l=c.modifiers;a==="preserve"&&(a=n.width/n.height),e.startCoords=_({},o),e.startRect=_({},n),e.ratio=a,e.equalDelta=u;var p=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var v=(p.left?1:-1)*(p.top?1:-1);e.edgeSign={x:v,y:v}}else e.edgeSign={x:p.left?-1:1,y:p.top?-1:1};if(s!==!1&&_(r,p),l!=null&&l.length){var w=new Rt(t.interaction);w.copyFrom(t.interaction.modification),w.prepareStates(l),e.subModification=w,w.startAll(f({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,o=e.linkedEdges,i=_({},r),a=e.equalDelta?Co:Mo;if(_(t.edges,o),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var s=_({},n);nt(o,s,{x:r.x-i.x,y:r.y-i.y});var c=e.subModification.setAll(f(f({},t),{},{rect:s,edges:o,pageCoords:r,prevCoords:r,prevRect:s})),u=c.delta;return c.changed&&(a(e,Math.abs(u.x)>Math.abs(u.y),c.coords,c.rect),_(r,c.coords)),c.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Co(t,e,n){var r=t.startCoords,o=t.edgeSign;e?n.y=r.y+(n.x-r.x)*o.y:n.x=r.x+(n.y-r.y)*o.x}function Mo(t,e,n,r){var o=t.startRect,i=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var c=r.width/a;n.y=i.y+(c-o.height)*s.y}else{var u=r.height*a;n.x=i.x+(u-o.width)*s.x}}var Oo=be(_o,"aspectRatio"),An=function(){};An._defaults={};var dt=An;function Se(t,e,n){return m.func(t)?Ne(t,e.interactable,e.element,[n.x,n.y,e]):Ne(t,e.interactable,e.element)}var ft={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,o=t.interaction,i=t.pageCoords,a=r.options,s=a.elementRect,c=_({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var u=Se(a.restriction,o,i);if(u){var l=u.right-u.left-e.width,p=u.bottom-u.top-e.height;l<0&&(c.left+=l,c.right+=l),p<0&&(c.top+=p,c.bottom+=p)}c.left+=n.left-e.width*s.left,c.top+=n.top-e.height*s.top,c.right+=n.right-e.width*(1-s.right),c.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=c},set:function(t){var e=t.coords,n=t.interaction,r=t.state,o=r.options,i=r.offset,a=Se(o.restriction,n,e);if(a){var s=(function(c){return!c||"left"in c&&"top"in c||((c=_({},c)).left=c.x||0,c.top=c.y||0,c.right=c.right||c.left+c.width,c.bottom=c.bottom||c.top+c.height),c})(a);e.x=Math.max(Math.min(s.right-i.right,e.x),s.left+i.left),e.y=Math.max(Math.min(s.bottom-i.bottom,e.y),s.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Po=be(ft,"restrict"),zn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},jn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fn(t,e){for(var n=0,r=["top","left","bottom","right"];n<r.length;n++){var o=r[n];o in t||(t[o]=e[o])}return t}var Ge={noInner:zn,noOuter:jn,start:function(t){var e,n=t.interaction,r=t.startOffset,o=t.state,i=o.options;i&&(e=tt(Se(i.offset,n,n.coords.start.page))),e=e||{x:0,y:0},o.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,o=t.state,i=o.offset,a=o.options;if(n){var s=_({},e),c=Se(a.inner,r,s)||{},u=Se(a.outer,r,s)||{};Fn(c,zn),Fn(u,jn),n.top?e.y=Math.min(Math.max(u.top+i.top,s.y),c.top+i.top):n.bottom&&(e.y=Math.max(Math.min(u.bottom+i.bottom,s.y),c.bottom+i.bottom)),n.left?e.x=Math.min(Math.max(u.left+i.left,s.x),c.left+i.left):n.right&&(e.x=Math.max(Math.min(u.right+i.right,s.x),c.right+i.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Ro=be(Ge,"restrictEdges"),Io=_({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},ft.defaults),Do=be({start:ft.start,set:ft.set,defaults:Io},"restrictRect"),Ao={width:-1/0,height:-1/0},zo={width:1/0,height:1/0},jo=be({start:function(t){return Ge.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,o=t.edges,i=n.options;if(o){var a=mt(Se(i.min,e,t.coords))||Ao,s=mt(Se(i.max,e,t.coords))||zo;n.options={endOnly:i.endOnly,inner:_({},Ge.noInner),outer:_({},Ge.noOuter)},o.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):o.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),o.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):o.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),Ge.set(t),n.options=i}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ft={start:function(t){var e,n=t.interaction,r=t.interactable,o=t.element,i=t.rect,a=t.state,s=t.startOffset,c=a.options,u=c.offsetWithOrigin?(function(v){var w=v.interaction.element,x=tt(Ne(v.state.options.origin,null,null,[w])),E=x||He(v.interactable,w,v.interaction.prepared.name);return E})(t):{x:0,y:0};if(c.offset==="startCoords")e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var l=Ne(c.offset,r,o,[n]);(e=tt(l)||{x:0,y:0}).x+=u.x,e.y+=u.y}var p=c.relativePoints;a.offsets=i&&p&&p.length?p.map((function(v,w){return{index:w,relativePoint:v,x:s.left-i.width*v.x+e.x,y:s.top-i.height*v.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,o=r.options,i=r.offsets,a=He(e.interactable,e.element,e.prepared.name),s=_({},n),c=[];o.offsetWithOrigin||(s.x-=a.x,s.y-=a.y);for(var u=0,l=i;u<l.length;u++)for(var p=l[u],v=s.x-p.x,w=s.y-p.y,x=0,E=o.targets.length;x<E;x++){var S=o.targets[x],k=void 0;(k=m.func(S)?S(v,w,e._proxy,p,x):S)&&c.push({x:(m.number(k.x)?k.x:v)+p.x,y:(m.number(k.y)?k.y:w)+p.y,range:m.number(k.range)?k.range:o.range,source:S,index:x,offset:p})}for(var C={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},P=0;P<c.length;P++){var A=c[P],M=A.range,D=A.x-s.x,q=A.y-s.y,L=Be(D,q),K=L<=M;M===1/0&&C.inRange&&C.range!==1/0&&(K=!1),C.target&&!(K?C.inRange&&M!==1/0?L/M<C.distance/C.range:M===1/0&&C.range!==1/0||L<C.distance:!C.inRange&&L<C.distance)||(C.target=A,C.distance=L,C.range=M,C.inRange=K,C.delta.x=D,C.delta.y=q)}return C.inRange&&(n.x=C.target.x,n.y=C.target.y),r.closest=C,C},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Fo=be(Ft,"snap"),ht={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],Ft.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,o=n.options,i=n.offsets,a={x:r.x-i[0].x,y:r.y-i[0].y};n.options=_({},o),n.options.targets=[];for(var s=0,c=o.targets||[];s<c.length;s++){var u=c[s],l=void 0;if(l=m.func(u)?u(a.x,a.y,e):u){for(var p=0,v=n.targetFields;p<v.length;p++){var w=v[p],x=w[0],E=w[1];if(x in l||E in l){l.x=l[x],l.y=l[E];break}}n.options.targets.push(l)}}var S=Ft.set(t);return n.options=o,S},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Lo=be(ht,"snapSize"),Lt={aspectRatio:Oo,restrictEdges:Ro,restrict:Po,restrictRect:Do,restrictSize:jo,snapEdges:be({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],ht.start(t)):null},set:ht.set,defaults:_(Ie(ht.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Fo,snapSize:Lo,spring:dt,avoid:dt,transform:dt,rubberband:dt},No={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(bn),t.usePlugin(So),e.modifiers=Lt,Lt){var r=Lt[n],o=r._defaults,i=r._methods;o._methods=i,t.defaults.perAction[n]=o}}},Ho=No,Ln=(function(t){Y(n,t);var e=Z(n);function n(r,o,i,a,s,c){var u;if(T(this,n),rt(se(u=e.call(this,s)),i),i!==o&&rt(se(u),o),u.timeStamp=c,u.originalEvent=i,u.type=r,u.pointerId=Ye(o),u.pointerType=en(o),u.target=a,u.currentTarget=null,r==="tap"){var l=s.getPointerIndex(o);u.dt=u.timeStamp-s.pointers[l].downTime;var p=u.timeStamp-s.tapTime;u.double=!!s.prevTap&&s.prevTap.type!=="doubletap"&&s.prevTap.target===u.target&&p<500}else r==="doubletap"&&(u.dt=o.timeStamp-s.tapTime,u.double=!0);return u}return R(n,[{key:"_subtractOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX-=o,this.pageY-=i,this.clientX-=o,this.clientY-=i,this}},{key:"_addOrigin",value:function(r){var o=r.x,i=r.y;return this.pageX+=o,this.pageY+=i,this.clientX+=o,this.clientY+=i,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n})(at),$e={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=$e,t.defaults.actions.pointerEvents=$e.defaults,_(t.actions.phaselessTypes,$e.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&Nt(t),we({interaction:n,pointer:r,event:o,eventTarget:i,type:"move"},e))},"interactions:down":function(t,e){(function(n,r){for(var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget,c=n.pointerIndex,u=o.pointers[c].hold,l=H(s),p={interaction:o,pointer:i,event:a,eventTarget:s,type:"hold",targets:[],path:l,node:null},v=0;v<l.length;v++){var w=l[v];p.node=w,r.fire("pointerEvents:collect-targets",p)}if(p.targets.length){for(var x=1/0,E=0,S=p.targets;E<S.length;E++){var k=S[E].eventable.options.holdDuration;k<x&&(x=k)}u.duration=x,u.timeout=setTimeout((function(){we({interaction:o,eventTarget:s,pointer:i,event:a,type:"hold"},r)}),x)}})(t,e),we(t,e)},"interactions:up":function(t,e){Nt(t),we(t,e),(function(n,r){var o=n.interaction,i=n.pointer,a=n.event,s=n.eventTarget;o.pointerWasMoved||we({interaction:o,eventTarget:s,pointer:i,event:a,type:"tap"},r)})(t,e)},"interactions:cancel":function(t,e){Nt(t),we(t,e)}},PointerEvent:Ln,fire:we,collectEventTargets:Nn,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function we(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,s=t.targets,c=s===void 0?Nn(t,e):s,u=new Ln(a,r,o,i,n,e.now());e.fire("pointerEvents:new",{pointerEvent:u});for(var l={interaction:n,pointer:r,event:o,eventTarget:i,targets:c,type:a,pointerEvent:u},p=0;p<c.length;p++){var v=c[p];for(var w in v.props||{})u[w]=v.props[w];var x=He(v.eventable,v.node);if(u._subtractOrigin(x),u.eventable=v.eventable,u.currentTarget=v.node,v.eventable.fire(u),u._addOrigin(x),u.immediatePropagationStopped||u.propagationStopped&&p+1<c.length&&c[p+1].node!==u.currentTarget)break}if(e.fire("pointerEvents:fired",l),a==="tap"){var E=u.double?we({interaction:n,pointer:r,event:o,eventTarget:i,type:"doubletap"},e):u;n.prevTap=E,n.tapTime=E.timeStamp}return u}function Nn(t,e){var n=t.interaction,r=t.pointer,o=t.event,i=t.eventTarget,a=t.type,s=n.getPointerIndex(r),c=n.pointers[s];if(a==="tap"&&(n.pointerWasMoved||!c||c.downTarget!==i))return[];for(var u=H(i),l={interaction:n,pointer:r,event:o,eventTarget:i,type:a,path:u,targets:[],node:null},p=0;p<u.length;p++){var v=u[p];l.node=v,e.fire("pointerEvents:collect-targets",l)}return a==="hold"&&(l.targets=l.targets.filter((function(w){var x,E;return w.eventable.options.holdDuration===((x=n.pointers[s])==null||(E=x.hold)==null?void 0:E.duration)}))),l.targets}function Nt(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Bo=Object.freeze({__proto__:null,default:$e});function Yo(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Vo={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin($e);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=Yo,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,o=t.eventTarget,i=t.targets;if(r.type==="hold"&&i.length){var a=i[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:o,type:"hold",pointer:r,event:r},e)}),a))}}})},Wo=Vo,Uo={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(r){return _(this.events.options,r),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(r,o){var i=n.call(this,r,o);return i===this&&(this.events.options[r]=o),i}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,o=t.type,i=t.eventTarget;e.interactables.forEachMatch(r,(function(a){var s=a.events,c=s.options;s.types[o]&&s.types[o].length&&a.testIgnoreAllow(c,r,i)&&n.push({node:r,eventable:s,props:{interactable:a}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(n){return e.getRect(n)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;_(n.events.options,e.pointerEvents.defaults),_(n.events.options,r.pointerEvents||{})}}},Xo=Uo,qo={id:"pointer-events",install:function(t){t.usePlugin(Bo),t.usePlugin(Wo),t.usePlugin(Xo)}},Go=qo,$o={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return(function(r,o,i){for(var a=r.getAllElements(),s=i.window.Promise,c=s?[]:null,u=function(){var p=a[l],v=r.getRect(p);if(!v)return 1;var w,x=We(i.interactions.list,(function(k){return k.interacting()&&k.interactable===r&&k.element===p&&k.prepared.name===o.name}));if(x)x.move(),c&&(w=x._reflowPromise||new s((function(k){x._reflowResolve=k})));else{var E=mt(v),S=(function(k){return{coords:k,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:E.x,y:E.y},client:{x:E.x,y:E.y},timeStamp:i.now()});w=(function(k,C,P,A,M){var D=k.interactions.new({pointerType:"reflow"}),q={interaction:D,event:M,pointer:M,eventTarget:P,phase:"reflow"};D.interactable=C,D.element=P,D.prevEvent=M,D.updatePointer(M,M,P,!0),Jt(D.coords.delta),Ct(D.prepared,A),D._doPhase(q);var L=k.window,K=L.Promise,ie=K?new K((function(fe){D._reflowResolve=fe})):void 0;return D._reflowPromise=ie,D.start(A,C,P),D._interacting?(D.move(q),D.end(M)):(D.stop(),D._reflowResolve()),D.removePointer(M,M),ie})(i,r,p,o,S)}c&&c.push(w)},l=0;l<a.length&&!u();l++);return c&&s.all(c).then((function(){return r}))})(this,n,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;n.pointerType==="reflow"&&(n._reflowResolve&&n._reflowResolve(),(function(r,o){r.splice(r.indexOf(o),1)})(e.interactions.list,n))}}},Jo=$o;if(X.use(yn),X.use(Tn),X.use(Go),X.use(fo),X.use(Ho),X.use(eo),X.use(Vr),X.use(Ur),X.use(Jo),X.default=X,y(d)==="object"&&d)try{d.exports=X}catch{}return X.default=X,X}))})(Ae,Ae.exports)),Ae.exports}var Pr=Or();const gt=Cr(Pr);function Wt(d){const h=document.createElement("input");h.type="file",h.accept="image/*",h.onchange=g=>{const f=g.target.files?.[0];if(f){const y=new FileReader;y.onload=T=>{const z=document.createElement("img");z.src=T.target?.result,z.style.maxWidth="100%",z.style.width="100%",z.style.height="auto",z.style.cursor="pointer",z.draggable=!1;const R=document.createElement("div");R.className="editor-image-wrapper",R.style.display="inline-block",R.style.position="relative",R.style.maxWidth="100%",R.style.width="auto",R.style.height="auto",R.contentEditable="false",R.style.boxSizing="border-box",R.style.touchAction="none",R.style.userSelect="none",R.appendChild(z),d.appendChild(R),d.focus()},y.readAsDataURL(f)}},h.click()}function Rr(d){let h=null;if(d.tagName==="IMG"?h=d.parentElement:h=d,!h)return;const g=h.querySelector("img");if(g)if(h.classList.contains("resizable")){const f=h.getBoundingClientRect(),y=Math.round(f.width)+"px",T=Math.round(f.height)+"px";gt(h).unset(),h.classList.remove("resizable"),h.style.border="none",h.style.transform="",h.dataset.x="",h.dataset.y="",h.style.width=y,h.style.height=T,h.contentEditable="false",g&&(g.style.width="100%",g.style.height="100%")}else{h.classList.add("resizable"),h.style.border="2px dashed #007bff",h.style.position="relative",h.style.userSelect="none";const f=h.getBoundingClientRect();h.style.width=f.width+"px",h.style.height=f.height+"px",g&&(g.style.width="100%",g.style.height="100%"),gt(h).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{move:y=>{const T=y.target;Object.assign(T.style,{width:`${y.rect.width}px`,height:`${y.rect.height}px`})}},modifiers:[gt.modifiers.restrictSize({min:{width:50,height:50}})],inertia:!0})}}class Ut{container;toolbar;editor;constructor(){this.container=document.createElement("div"),this.container.classList.add("editor-container"),this.editor=_r(()=>Wt(this.editor),g=>Rr(g)),this.toolbar=Sr();const h=this.toolbar.querySelector('button[title="Insert Image"]');h&&(h.onclick=()=>Wt(this.editor)),this.container.appendChild(this.toolbar),this.container.appendChild(this.editor)}getElement(){return this.container}getHTML(){return this.editor.innerHTML}setHTML(h){this.editor.innerHTML=h}}var Ke={exports:{}},ze={};var Xt;function Ir(){if(Xt)return ze;Xt=1;var d=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function g(f,y,T){var z=null;if(T!==void 0&&(z=""+T),y.key!==void 0&&(z=""+y.key),"key"in y){T={};for(var R in y)R!=="key"&&(T[R]=y[R])}else T=y;return y=T.ref,{$$typeof:d,type:f,key:z,ref:y!==void 0?y:null,props:T}}return ze.Fragment=h,ze.jsx=g,ze.jsxs=g,ze}var je={};var qt;function Dr(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function d(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===Ze?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case G:return"Fragment";case V:return"Profiler";case J:return"StrictMode";case Qe:return"Suspense";case m:return"SuspenseList";case Pe:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case Ce:return"Portal";case re:return b.displayName||"Context";case ee:return(b._context.displayName||"Context")+".Consumer";case Me:var I=b.render;return b=b.displayName,b||(b=I.displayName||I.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case Fe:return I=b.displayName||null,I!==null?I:d(b.type)||"Memo";case Oe:I=b._payload,b=b._init;try{return d(b(I))}catch{}}return null}function h(b){return""+b}function g(b){try{h(b);var I=!1}catch{I=!0}if(I){I=console;var j=I.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.constructor.name||"Object";return j.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),h(b)}}function f(b){if(b===G)return"<>";if(typeof b=="object"&&b!==null&&b.$$typeof===Oe)return"<...>";try{var I=d(b);return I?"<"+I+">":"<...>"}catch{return"<...>"}}function y(){var b=W.A;return b===null?null:b.getOwner()}function T(){return Error("react-stack-top-frame")}function z(b){if(le.call(b,"key")){var I=Object.getOwnPropertyDescriptor(b,"key").get;if(I&&I.isReactWarning)return!1}return b.key!==void 0}function R(b,I){function j(){$||($=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",I))}j.isReactWarning=!0,Object.defineProperty(b,"key",{get:j,configurable:!0})}function ne(){var b=d(this.type);return ae[b]||(ae[b]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),b=this.props.ref,b!==void 0?b:null}function Y(b,I,j,N,me,Ee){var H=j.ref;return b={$$typeof:ce,type:b,key:I,props:j,_owner:N},(H!==void 0?H:null)!==null?Object.defineProperty(b,"ref",{enumerable:!1,get:ne}):Object.defineProperty(b,"ref",{enumerable:!1,value:null}),b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(b,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(b,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:me}),Object.defineProperty(b,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ee}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b}function F(b,I,j,N,me,Ee){var H=I.children;if(H!==void 0)if(N)if(B(H)){for(N=0;N<H.length;N++)ge(H[N]);Object.freeze&&Object.freeze(H)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ge(H);if(le.call(I,"key")){H=d(b);var ue=Object.keys(I).filter(function(et){return et!=="key"});N=0<ue.length?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}",oe[H+N]||(ue=0<ue.length?"{"+ue.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
54
42
|
let props = %s;
|
|
55
43
|
<%s {...props} />
|
|
56
44
|
React keys must be passed directly to JSX without using spread:
|
|
57
45
|
let props = %s;
|
|
58
|
-
<%s key={someKey} {...props} />`,
|
|
46
|
+
<%s key={someKey} {...props} />`,N,H,ue,H),oe[H+N]=!0)}if(H=null,j!==void 0&&(g(j),H=""+j),z(I)&&(g(I.key),H=""+I.key),"key"in I){j={};for(var _ in I)_!=="key"&&(j[_]=I[_])}else j=I;return H&&R(j,typeof b=="function"?b.displayName||b.name||"Unknown":b),Y(b,H,j,y(),me,Ee)}function ge(b){se(b)?b._store&&(b._store.validated=1):typeof b=="object"&&b!==null&&b.$$typeof===Oe&&(b._payload.status==="fulfilled"?se(b._payload.value)&&b._payload.value._store&&(b._payload.value._store.validated=1):b._store&&(b._store.validated=1))}function se(b){return typeof b=="object"&&b!==null&&b.$$typeof===ce}var Z=ve,ce=Symbol.for("react.transitional.element"),Ce=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),re=Symbol.for("react.context"),Me=Symbol.for("react.forward_ref"),Qe=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),Fe=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),Pe=Symbol.for("react.activity"),Ze=Symbol.for("react.client.reference"),W=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,B=Array.isArray,U=console.createTask?console.createTask:function(){return null};Z={react_stack_bottom_frame:function(b){return b()}};var $,ae={},Le=Z.react_stack_bottom_frame.bind(Z,T)(),te=U(f(T)),oe={};je.Fragment=G,je.jsx=function(b,I,j){var N=1e4>W.recentlyCreatedOwnerStacks++;return F(b,I,j,!1,N?Error("react-stack-top-frame"):Le,N?U(f(b)):te)},je.jsxs=function(b,I,j){var N=1e4>W.recentlyCreatedOwnerStacks++;return F(b,I,j,!0,N?Error("react-stack-top-frame"):Le,N?U(f(b)):te)}})()),je}var Gt;function Ar(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Ke.exports=Ir():Ke.exports=Dr()),Ke.exports}var zr=Ar();const jr=({onChange:d,initialValue:h})=>{const g=ve.useRef(null),f=ve.useRef(null);return ve.useEffect(()=>{if(f.current&&!g.current){g.current=new Ut,f.current.appendChild(g.current.getElement()),h&&g.current.setHTML(h);const y=g.current.getElement(),T=()=>{const z=g.current?.getHTML()||"";d?.(z)};y.addEventListener("input",T),y.addEventListener("keyup",T),y.addEventListener("paste",T)}},[d,h]),zr.jsx("div",{ref:f})};he.RichTextEditor=Ut,he.RichTextEditorComponent=jr,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})}));
|