p)&&(Z=(U=U.replace(" ",":")).length),0<_&&void 0!==(w=s(1,U,r,e,k,R,$.length,c,f,c))&&0===(Z=(U=w.trim()).length)&&(U="\0\0"),p=U.charCodeAt(0),h=U.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){Q+=U+u.charAt(L);break}default:58!==U.charCodeAt(Z-1)&&($+=o(U,p,h,U.charCodeAt(2)))}N=j=I=p=0,U="",h=u.charCodeAt(++L)}}switch(h){case 13:case 10:47===S?S=0:0===1+p&&107!==c&&0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0<_){var o=s(-1,n,r,r,k,R,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var i=t(T,r,n,0,0);return 0<_&&(void 0!==(o=s(-2,i,r,r,k,R,i.length,0,0,0))&&(i=o)),"",D=0,R=k=1,i}var l=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,v=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,S=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,x=/stretch|:\s*\w+\-(?:conte|avail)/,P=/([^-])(image-set\()/,R=1,k=1,D=0,M=1,T=[],A=[],_=0,I=null,F=0;return c.use=function e(t){switch(t){case void 0:case null:_=A.length=0;break;default:if("function"==typeof t)A[_++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var R=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&P(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=M&&(M=t+1),k.set(e,t),D.set(t,e)},I="style["+S+'][data-styled-version="5.3.8"]',F=new RegExp("^"+S+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(S))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.3.8");var a=N();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},q=function(){function e(e){var t=this.element=Z(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),r+=""+s+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),K=/(a)(d)/gi,z=function(e){return String.fromCharCode(e+(e>25?39:97))};function V(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=z(t%52)+n;return(z(t%52)+n).replace(K,"$1-$2")}var H=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},X=function(e){return H(5381,e)};function Y(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=H(this.baseHash,n.hash),l="",d=0;d>>0);if(!t.hasNameForId(r,v)){var m=n(l,"."+v,void 0,r);t.insertRules(r,v,m)}o.push(v)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,i=void 0===e?b:e,a=i.options,s=void 0===a?b:a,c=i.plugins,l=void 0===c?g:c,d=new u(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,u,c,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,i){return 0===r&&-1!==te.indexOf(i[n.length])||i.match(o)?e:"."+t};function v(e,i,a,s){void 0===s&&(s="&");var u=e.replace(ee,""),c=i&&a?a+" "+i+" { "+u+" }":u;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(a||!i?"":i,c)}return d.use([].concat(l,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),v.hash=l.length?l.reduce((function(e,t){return t.name||P(15),H(e,t.name)}),5381).toString():"",v}var re=i().createContext(),oe=(re.Consumer,i().createContext()),ie=(oe.Consumer,new Q),ae=ne();function se(){return(0,o.useContext)(re)||ie}function ue(){return(0,o.useContext)(oe)||ae}function ce(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],a=se(),u=(0,o.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i().createElement(re.Provider,{value:u},i().createElement(oe.Provider,{value:c},e.children))}var le=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ae);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return P(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ae),this.name+e.hash},e}(),de=/([A-Z])/,fe=/([A-Z])/g,pe=/^ms-/,he=function(e){return"-"+e.toLowerCase()};function ve(e){return de.test(e)?e.replace(fe,he).replace(pe,"-ms-"):e}var me=function(e){return null==e||!1===e||""===e};function ye(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Ce=/(^-|-$)/g;function Se(e){return e.replace(Ee,"-").replace(Ce,"")}var Oe=function(e){return V(X(e)>>>0)};function xe(e){return"string"==typeof e&&!0}var Pe=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Re=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ke(e,t,n){var r=e[n];Pe(t)&&Pe(r)?De(r,t):e[n]=t}function De(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(xe(e)?e:Se(E(e)));return Ae(e,v({},o,{attrs:y,componentId:i}),n)},Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?De({},e.defaultProps,t):t}}),O.toString=function(){return"."+O.styledComponentId},a&&h()(O,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),O}var _e=function(e){return function e(t,n,o){if(void 0===o&&(o=b),!(0,r.isValidElementType)(n))return P(1,String(n));var i=function(){return t(n,o,be.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,v({},o,{},r))},i.attrs=function(r){return e(t,n,v({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(Ae,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){_e[e]=_e(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Y(e),Q.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(ye(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Q.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?P(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return P(2);var n=((t={})[S]="",t["data-styled-version"]="5.3.8",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=N();return r&&(n.nonce=r),[i().createElement("style",v({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Q({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?P(2):i().createElement(ce,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return P(3)}}();const Fe=_e},11:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},3974:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>o})},4406:()=>{"use strict";class e{constructor(e,t,{tabInsertsSuggestions:r,defaultFirstOption:o}={}){this.input=e,this.list=t,this.tabInsertsSuggestions=null==r||r,this.defaultFirstOption=null!=o&&o,this.isComposing=!1,t.id||(t.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=e=>function(e,t){if(e.shiftKey||e.metaKey||e.altKey)return;if(!t.ctrlBindings&&e.ctrlKey)return;if(t.isComposing)return;switch(e.key){case"Enter":n(t.input,t.list)&&e.preventDefault();break;case"Tab":t.tabInsertsSuggestions&&n(t.input,t.list)&&e.preventDefault();break;case"Escape":t.clearSelection();break;case"ArrowDown":t.navigate(1),e.preventDefault();break;case"ArrowUp":t.navigate(-1),e.preventDefault();break;case"n":t.ctrlBindings&&e.ctrlKey&&(t.navigate(1),e.preventDefault());break;case"p":t.ctrlBindings&&e.ctrlKey&&(t.navigate(-1),e.preventDefault());break;default:if(e.ctrlKey)break;t.clearSelection()}}(e,this),this.compositionEventHandler=e=>function(e,t){t.isComposing="compositionstart"===e.type;const n=document.getElementById(t.input.getAttribute("aria-controls")||"");if(!n)return;t.clearSelection()}(e,this),this.inputHandler=this.clearSelection.bind(this),e.setAttribute("role","combobox"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",t),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",t)}indicateDefaultOption(){var e;this.defaultFirstOption&&(null===(e=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(r)[0])||void 0===e||e.setAttribute("data-combobox-option-default","true"))}navigate(e=1){const t=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(r)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(r),i=n.indexOf(t);if(i===n.length-1&&1===e||0===i&&-1===e)return this.clearSelection(),void this.input.focus();let a=1===e?0:n.length-1;if(t&&i>=0){const t=i+e;t>=0&&t0||e.offsetHeight>0)}function o(e,t){(function(e,t){const n=e.scrollTop,r=n+e.clientHeight,o=t.offsetTop,i=o+t.clientHeight;return o>=n&&i<=r})(e,t)||(e.scrollTop=t.offsetTop)}const i=/\s|\(|\[/;function a(e,t,n,{multiWord:r,lookBackIndex:o,lastMatchPosition:a}={multiWord:!1,lookBackIndex:0,lastMatchPosition:null}){let s=e.lastIndexOf(t,n-1);if(-1===s)return;if(s=s+t.length+1)return;if(e.lastIndexOf("\n",n-1)>s)return;if(e.lastIndexOf(".",n-1)>s)return}else{if(e.lastIndexOf(" ",n-1)>s)return}const u=e[s-1];if(u&&!i.test(u))return;return{text:e.substring(s+t.length,n),position:s+t.length}}const s=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],u=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],c=new WeakMap;function l(e,t=e.selectionEnd){const{mirror:n,marker:r}=function(e,t){const n=e.nodeName.toLowerCase();if("textarea"!==n&&"input"!==n)throw new Error("expected textField to a textarea or input");let r=c.get(e);if(r&&r.parentElement===e.parentElement)r.innerHTML="";else{r=document.createElement("div"),c.set(e,r);const t=window.getComputedStyle(e),o=s.slice(0);"textarea"===n?o.push("white-space:pre-wrap;"):o.push("white-space:nowrap;");for(let e=0,n=u.length;e{n.remove()}),5e3),{top:i.top-o.top,left:i.left-o.left}}const d=new WeakMap;class f{constructor(e,t){this.expander=e,this.input=t,this.combobox=null,this.menu=null,this.match=null,this.justPasted=!1,this.lookBackIndex=0,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.interactingWithList=!1,t.addEventListener("paste",this.onpaste),t.addEventListener("input",this.oninput),t.addEventListener("keydown",this.onkeydown),t.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}dismissMenu(){this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex)}activate(t,n){var r,o;if(this.input!==document.activeElement&&this.input!==(null===(o=null===(r=document.activeElement)||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.activeElement))return;this.deactivate(),this.menu=n,n.id||(n.id=`text-expander-${Math.floor(1e5*Math.random()).toString()}`),this.expander.append(n),this.combobox=new e(this.input,n);const{top:i,left:a}=l(this.input,t.position);n.style.top=`${i}px`,n.style.left=`${a}px`,this.combobox.start(),n.addEventListener("combobox-commit",this.oncommit),n.addEventListener("mousedown",this.onmousedown),this.combobox.navigate(1)}deactivate(){const e=this.menu;return!(!e||!this.combobox)&&(this.menu=null,e.removeEventListener("combobox-commit",this.oncommit),e.removeEventListener("mousedown",this.onmousedown),this.combobox.destroy(),this.combobox=null,e.remove(),!0)}onCommit({target:e}){const t=e;if(!(t instanceof HTMLElement))return;if(!this.combobox)return;const n=this.match;if(!n)return;const r=this.input.value.substring(0,n.position-n.key.length),o=this.input.value.substring(n.position+n.text.length),i={item:t,key:n.key,value:null};if(!this.expander.dispatchEvent(new CustomEvent("text-expander-value",{cancelable:!0,detail:i})))return;if(!i.value)return;const a=`${i.value} `;this.input.value=r+a+o;const s=r.length+a.length;this.deactivate(),this.input.focus({preventScroll:!0}),this.input.selectionStart=s,this.input.selectionEnd=s,this.lookBackIndex=s,this.match=null,this.expander.dispatchEvent(new CustomEvent("text-expander-committed",{cancelable:!1,detail:{input:this.input}}))}onBlur(){this.interactingWithList?this.interactingWithList=!1:this.deactivate()}onPaste(){this.justPasted=!0}async onInput(){if(this.justPasted)return void(this.justPasted=!1);const e=this.findMatch();if(e){this.match=e;const t=await this.notifyProviders(e);if(!this.match)return;t?this.activate(e,t):this.deactivate()}else this.match=null,this.deactivate()}findMatch(){const e=this.input.selectionEnd||0,t=this.input.value;e<=this.lookBackIndex&&(this.lookBackIndex=e-1);for(const{key:n,multiWord:r}of this.expander.keys){const o=a(t,n,e,{multiWord:r,lookBackIndex:this.lookBackIndex,lastMatchPosition:this.match?this.match.position:null});if(o)return{text:o.text,key:n,position:o.position}}}async notifyProviders(e){const t=[];if(!this.expander.dispatchEvent(new CustomEvent("text-expander-change",{cancelable:!0,detail:{provide:e=>t.push(e),text:e.text,key:e.key}})))return;return(await Promise.all(t)).filter((e=>e.matched)).map((e=>e.fragment))[0]}onMousedown(){this.interactingWithList=!0}onKeydown(e){"Escape"===e.key&&(this.match=null,this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex,e.stopImmediatePropagation(),e.preventDefault()))}}class p extends HTMLElement{get keys(){const e=this.getAttribute("keys"),t=e?e.split(" "):[],n=this.getAttribute("multiword"),r=n?n.split(" "):[],o=0===r.length&&this.hasAttribute("multiword");return t.map((e=>({key:e,multiWord:o||r.includes(e)})))}connectedCallback(){const e=this.querySelector('input[type="text"], textarea');if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))return;const t=new f(this,e);d.set(this,t)}disconnectedCallback(){const e=d.get(this);e&&(e.destroy(),d.delete(this))}dismiss(){const e=d.get(this);e&&e.dismissMenu()}}window.customElements.get("text-expander")||(window.TextExpanderElement=p,window.customElements.define("text-expander",p))}}]);