@primer/view-components 0.11.0-rc.e3faa6d9 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/components/primer/alpha/action_bar_element.js +2 -2
- package/app/components/primer/focus_group.js +28 -3
- package/package.json +1 -1
- package/static/arguments.json +12 -1
- package/static/info_arch.json +12 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(){"use strict";var t,e,n,i,o,s,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const u=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver((e=>{for(const o of e)if(o.isIntersecting){const{target:e}=o;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",s).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",s).call(this)}fetch(t){return fetch(t)}refetch(){u.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",o).call(this);if(n instanceof Error)throw n;const i=n,s=document.createElement("template");s.innerHTML=i;const r=document.importNode(s.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},o=async function(){const e=this.src,n=u.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),u.set(this,{src:e,data:n}),n}},s=async function(){const e=await l(this,t,"m",o).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t){await new Promise((t=>setTimeout(t,0)));for(const e of t)this.dispatchEvent(new Event(e))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request());if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);const o=await n.text();let s=o;if(d){s=(await d).createHTML(o,n)}return l(this,t,"m",r).call(this,["load","loadend"]),s}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"]),e}var e};const h="undefined"!=typeof globalThis?globalThis:window;try{h.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(h.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var f=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},m=new WeakMap;function p(t,e,n){m.set(t,setTimeout((()=>{m.has(t)&&t.dispatchEvent(new f("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var g=globalThis.ShadowRoot||function(){},b=globalThis.HTMLDialogElement||function(){},v=new WeakMap,w=new WeakMap,y=new WeakMap;function E(t){return y.get(t)||"hidden"}var A=new WeakMap;function k(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===E(t))&&(!(!e&&"hidden"!==E(t))&&(!(t instanceof b&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function L(t){return t?Array.from(w.get(t.ownerDocument)||[]).indexOf(t)+1:0}function T(t){const e=S(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e)return e;if((t=t.parentElement||x(t))instanceof g&&(t=t.host),t instanceof Document)return}}(t);return L(e)>L(n)?e:n}function M(t){const e=w.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function x(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?x(t.parentNode):t}function S(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===y.get(t))return t;if((t=t.parentElement||x(t))instanceof g&&(t=t.host),t instanceof Document)return}}function C(t){return!t.hidden&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&-1!==t.tabIndex)))}function D(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);const n=e.querySelector("[autofocus]");if(n)return n;const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let o=i.currentNode;for(;o;){if(C(o))return o;o=i.nextNode()}})(t)?.focus()}var I=new WeakMap;function O(t){if(!k(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new f("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!k(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(R(function(t){const e=new Map;let n=0;const i=t.ownerDocument;for(const t of w.get(i)||[])e.set(t,n),n+=1;e.set(t,n),n+=1;let o=null;return function(t){const n=S(t);if(null===n)return null;const i=e.get(n);(null===o||e.get(o)<i)&&(o=n)}(t?.parentElement),o}(t)||e,!1,!0),n!==t.getAttribute("popover")||!k(t,!1))return}M(e)||(n=!0),I.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),y.set(t,"showing"),v.has(e)||v.set(e,new Set),v.get(e).add(t),D(t),"auto"===t.popover&&(w.has(e)||w.set(e,new Set),w.get(e).add(t),N(A.get(t),!0)),n&&i&&"auto"===t.popover&&I.set(t,i),p(t,"closed","open")}function H(t,e=!1,n=!1){if(!k(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(R(t,e,n),!k(t,!0)))return;if(N(A.get(t),!1),A.delete(t),n&&(t.dispatchEvent(new f("beforetoggle",{oldState:"open",newState:"closed"})),!k(t,!0)))return;v.get(i)?.delete(t),w.get(i)?.delete(t),t.classList.remove(":popover-open"),y.set(t,"hidden"),n&&p(t,"open","closed");const o=I.get(t);o&&(I.delete(t),e&&o.focus())}function P(t,e=!1,n=!1){let i=M(t);for(;i;)H(i,e,n),i=M(t)}function R(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return P(i,e,n);let o=null,s=!1;for(const e of w.get(i)||[])if(e===t)s=!0;else if(s){o=e;break}if(!s)return P(i,e,n);for(;o&&"showing"===E(o)&&w.get(i)?.size;)H(o,e,n)}var W=new WeakMap;function q(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!M(n))return;const i=T(e);if(i&&"pointerdown"===t.type)W.set(n,i);else if("pointerup"===t.type){const t=W.get(n)===i;W.delete(n),t&&R(i||n,!1,!0)}}var F=new WeakMap;function N(t,e=!1){if(!t)return;F.has(t)||F.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=F.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var $=globalThis.ShadowRoot||function(){};function B(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var j=/(^|[^\\]):popover-open\b/g;function K(t,e,n,i){var o,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,n,r):o(e,n))||r);return s>3&&r&&Object.defineProperty(e,n,r),r}function z(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function U(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){function t(t){return t?.includes(":popover-open")&&(t=t.replace(j,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||f,B(Document.prototype,"querySelector",t),B(Document.prototype,"querySelectorAll",t),B(Element.prototype,"querySelector",t),B(Element.prototype,"querySelectorAll",t),B(Element.prototype,"matches",t),B(Element.prototype,"closest",t),B(DocumentFragment.prototype,"querySelectorAll",t),B(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){O(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){H(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===y.get(this)&&void 0===t||!1===t?H(this,!0,!0):void 0!==t&&!0!==t||O(this)}}});const e=new WeakMap;function n(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),e.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),e.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;const n=x(this),i=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof $)&&i&&n.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}n(HTMLButtonElement),n(HTMLInputElement);const i=t=>{if(!t.isTrusted)return;const e=t.composedPath()[0];if(!(e instanceof Element)||e?.shadowRoot)return;const n=x(e);if(!(n instanceof $||n instanceof Document))return;const i=e.closest("[popovertargetaction],[popovertarget]");i&&function(t){const e=t.popoverTargetElement;if(!e)return;const n=E(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?H(e,!0,!0):k(e,!1)&&(A.set(e,t),O(e)))}(i)},o=t=>{const e=t.key,n=t.target;!n||"Escape"!==e&&"Esc"!==e||R(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",o),t.addEventListener("pointerdown",q),t.addEventListener("pointerup",q)})(document)}();const Y=new WeakSet;function X(t){_(t),G(t)}const V=new WeakMap;function G(t=document){if(V.has(t))return V.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)Q(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&_(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,V.delete(t),n.disconnect()}};return V.set(t,i),i}function _(t){for(const e of t.querySelectorAll("[data-action]"))Q(e);t instanceof Element&&t.hasAttribute("data-action")&&Q(t)}function J(t){const e=t.currentTarget;for(const n of Z(e))if(t.type===n.type){const i=e.closest(n.tag);Y.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const o=e.getRootNode();if(o instanceof ShadowRoot&&Y.has(o.host)&&o.host.matches(n.tag)){const e=o.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*Z(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function Q(t){for(const e of Z(t))t.addEventListener(e.type,J)}const tt=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),et=(t,e="property")=>{const n=tt(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const nt="attr",it=new WeakSet;function ot(t,e){if(it.has(t))return;it.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=at(n,nt));for(const n of e){const e=t[n],o=et(`${i}${n}`);let s={configurable:!0,get(){return this.getAttribute(o)||""},set(t){this.setAttribute(o,t||"")}};"number"==typeof e?s={configurable:!0,get(){return Number(this.getAttribute(o)||0)},set(t){this.setAttribute(o,t)}}:"boolean"==typeof e&&(s={configurable:!0,get(){return this.hasAttribute(o)},set(t){this.toggleAttribute(o,t)}}),Object.defineProperty(t,n,s),n in t&&!t.hasAttribute(o)&&s.set.call(t,e)}}const st=Symbol.for("catalyst");class rt{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,o)};let s=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,s)},set(t){s=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>et(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...at(t.prototype,nt)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=tt(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),ot(t),function(t){Y.add(t),t.shadowRoot&&X(t.shadowRoot),_(t),G(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&X(t.shadowRoot)}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,o){ot(t),"data-catalyst"!==e&&o&&o.call(t,e,n,i)}}function at(t,e){if(!Object.prototype.hasOwnProperty.call(t,st)){const e=t[st],n=t[st]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[st];return n.has(e)||n.set(e,new Set),n.get(e)}function lt(t,e){at(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function ct(t,e){at(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const o of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))o.closest(n)||i.push(o);for(const o of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))o.closest(n)===t&&i.push(o);return i}(this,e)}})}function ut(t){new rt(t)}new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}));const dt={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},ht={start:["end","center"],end:["start","center"],center:["end","start"]};function ft(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),o=function(t){let e=t;for(;null!==e&&e!==document.body;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),o=getComputedStyle(n),[s,r,a,l]=[o.borderTopWidth,o.borderLeftWidth,o.borderRightWidth,o.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+s,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-s-l,n===document.body?window.innerHeight:-1/0)}}(i),s=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[s.borderTopWidth,s.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:o,align:s,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=pt(n,i,o,s,a,l),d=o,h=s;if(u.top-=e.top,u.left-=e.left,!r){const r=dt[o];let f=0;if(r){let t=o;for(;f<r.length&>(t,u,c,n);){const o=r[f++];t=o,u=pt(n,i,o,s,a,l),u.top-=e.top,u.left-=e.left,d=o}}const m=ht[s];let p=0;if(m){let t=s;for(;p<m.length&&bt(t,u,c,n);){const o=m[p++];t=o,u=pt(n,i,d,o,a,l),u.top-=e.top,u.left-=e.left,h=o}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=t.height+c.top-n.height)}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(o,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,o,s;const r=null!==(e=t.side)&&void 0!==e?e:mt.side,a=null!==(n=t.align)&&void 0!==n?n:mt.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:mt.anchorOffset,alignmentOffset:null!==(o=t.alignmentOffset)&&void 0!==o?o:"center"!==a&&r.startsWith("inside")?mt.alignmentOffset:0,allowOutOfBounds:null!==(s=t.allowOutOfBounds)&&void 0!==s?s:mt.allowOutOfBounds}}(n))}const mt={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function pt(t,e,n,i,o,s){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-o-t.height:"outside-bottom"===n?l=a+o:"outside-left"===n?c=e.left-o-t.width:"outside-right"===n&&(c=r+o),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+s:"center"===i?e.left-(t.width-e.width)/2+s:r-t.width-s),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+s:"center"===i?e.top-(t.height-e.height)/2+s:a-t.height-s),"inside-top"===n?l=e.top+o:"inside-bottom"===n?l=a-o-t.height:"inside-left"===n?c=e.left+o:"inside-right"===n?c=r-o-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+o),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+s:"center"===i?e.left-(t.width-e.width)/2+s:r-t.width-s:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+s:"center"===i?e.top-(t.height-e.height)/2+s:a-t.height-s),{top:l,left:c}}function gt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function bt(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*vt(t,e={}){var n,i;const o=null!==(n=e.strict)&&void 0!==n&&n,s=null!==(i=e.onlyTabbable)&&void 0!==i&&i?Et:yt,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&s(t,o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&s(t,o)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&s(t,o)&&(yield t)}function wt(t,e=!1){return vt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function yt(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,o=t instanceof HTMLInputElement&&"hidden"===t.type,s=t.classList.contains("sentinel");if(n||i||o||s)return!1;if(e){const e=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(getComputedStyle(t).visibility),i=0===t.getClientRects().length;if(e||n||i)return!1}return null!=t.getAttribute("tabindex")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex}function Et(t,e=!1){return yt(t,e)&&"-1"!==t.getAttribute("tabindex")}let At=!1;function kt(){}try{const t=Object.create({},{signal:{get(){At=!0}}});window.addEventListener("test",kt,t),window.removeEventListener("test",kt,t)}catch(t){}function Lt(){At||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),At=!0)}Lt();const Tt=[];let Mt,xt;function St(t,e,n){const i=new AbortController,o=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const s=document.createElement("span");s.setAttribute("class","sentinel"),s.setAttribute("tabindex","0"),s.setAttribute("aria-hidden","true"),s.onfocus=()=>{const e=wt(t,!0);null==e||e.focus()};const r=document.createElement("span");let a;function l(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(a=n);if(a&&Et(a)&&t.contains(a))return void a.focus();if(e&&t.contains(e))return void e.focus();{const e=wt(t);return void(null==e||e.focus())}}}r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=wt(t);null==e||e.focus()},t.prepend(s),t.append(r);const c=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(o);if(Mt){const t=Mt;Mt.container.setAttribute("data-focus-trap","suspended"),Mt.controller.abort(),Tt.push(t)}c.signal.addEventListener("abort",(()=>{Mt=void 0})),o.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=Tt.findIndex((e=>e.container===t));n>=0&&Tt.splice(n,1),function(){const t=Tt.pop();t&&St(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{l(t.target)}),{signal:c.signal,capture:!0}),l(document.activeElement),Mt={container:t,controller:c,initialFocus:e,originalSignal:o};const u=Tt.findIndex((e=>e.container===t));if(u>=0&&Tt.splice(u,1),!n)return i}function Ct(){return void 0===xt&&(xt=/^mac/i.test(window.navigator.platform)),xt}let Dt=1e4;var It;Lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(It||(It={}));const Ot={ArrowLeft:It.ArrowHorizontal,ArrowDown:It.ArrowVertical,ArrowUp:It.ArrowVertical,ArrowRight:It.ArrowHorizontal,h:It.HL,j:It.JK,k:It.JK,l:It.HL,a:It.AD,s:It.WS,w:It.WS,d:It.AD,Tab:It.Tab,Home:It.HomeAndEnd,End:It.HomeAndEnd,PageUp:It.PageUpDown,PageDown:It.PageUpDown,Backspace:It.Backspace},Ht={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function Pt(t){const e=Ht[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=Ct();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}const Rt="data-is-active-descendant",Wt="data-has-active-descendant";function qt(t,e){var n,i,o,s,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?It.ArrowAll:It.ArrowVertical)|It.HomeAndEnd,u=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",d=null!==(o=null==e?void 0:e.focusInStrategy)&&void 0!==o?o:"previous",h=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(s=null==e?void 0:e.preventScroll)&&void 0!==s&&s;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,h?t&&document.activeElement===h?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+Dt++),e&&e!==n&&e.removeAttribute(Rt),h&&(i||h.getAttribute("aria-activedescendant")!==n.id)&&(h.setAttribute("aria-activedescendant",n.id),t.setAttribute(Wt,n.id),n.setAttribute(Rt,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===d&&(m=void 0),null==h||h.removeAttribute("aria-activedescendant"),t.removeAttribute(Wt),null==e||e.removeAttribute(Rt),null==f||f(void 0,e,!1)}function y(...t){const n=t.filter((t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i}));if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}y(...vt(t));b("function"==typeof d?d(document.body):g());new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)t instanceof HTMLElement&&A(...vt(t));for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&y(...vt(t))})).observe(t,{subtree:!0,childList:!0});const k=new AbortController,L=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:k.signal;let T;L.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(T=a.indexOf(t.target))}),{signal:L}),h?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(h.focus({preventScroll:p}),b(t.target))})),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:L,capture:!0}),h.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())})),h.addEventListener("focusout",(()=>{w()}))):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==T)T>=0&&a[T]!==m&&b(a[T]),T=void 0;else if("previous"===d)b(e.target);else if("closest"===d||"first"===d){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof d)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=d(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0}),{signal:L});const M=null!=h?h:t;let x;return"closest"===d&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(x=Pt(t))}),{signal:L,capture:!0}),M.addEventListener("keydown",(n=>{var i;if(n.key in Ht){const o=Ot[n.key];if(!n.defaultPrevented&&(o&c)>0&&!function(t,e){const n=t.key,i=[...n].length,o=e instanceof HTMLInputElement&&"text"===e.type||e instanceof HTMLTextAreaElement;if(o&&(1===i||"Home"===n||"End"===n))return!0;if(e instanceof HTMLSelectElement){if(1===i)return!0;if("ArrowDown"===n&&Ct()&&!t.metaKey)return!0;if("ArrowDown"===n&&!Ct()&&t.altKey)return!0}if(e instanceof HTMLTextAreaElement&&("PageUp"===n||"PageDown"===n))return!0;if(o){const t=e,i=0===t.selectionStart&&0===t.selectionEnd,o=t.selectionStart===t.value.length&&t.selectionEnd===t.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!o)return!0;if(t instanceof HTMLTextAreaElement){if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!o)return!0}}return!1}(n,document.activeElement)){const o=Pt(n);let s;if((null==e?void 0:e.getNextFocusable)&&(s=e.getNextFocusable(o,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!s){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===o?i-=1:"start"===o?i=0:"next"===o?i+=1:i=a.length-1,i<0&&(i="wrap"===u&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===u&&"Tab"!==n.key?0:a.length-1),e!==i&&(s=a[i])}h?b(s||m,!0):s&&(x=o,s.focus({preventScroll:p})),("Tab"!==n.key||s)&&n.preventDefault()}}}),{signal:L}),k}var Ft,Nt,$t,Bt,jt,Kt,zt,Ut,Yt,Xt,Vt,Gt;const _t=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Zt&&t.update()}})),Jt=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Zt&&t.update(e.contentRect)}}));let Zt=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Ft.add(this),Nt.set(this,void 0),$t.set(this,void 0),Bt.set(this,null)}connectedCallback(){var t,e,n,i;U(this,$t,null!==(t=this.offsetWidth)&&void 0!==t?t:1/0,"f"),U(this,Nt,null!==(e=this.itemContainer.offsetWidth)&&void 0!==e?e:1/0,"f");for(const t of this.items){const e=t.getBoundingClientRect().width,o=parseInt(null===(n=window.getComputedStyle(t))||void 0===n?void 0:n.marginLeft,10),s=parseInt(null===(i=window.getComputedStyle(t))||void 0===i?void 0:i.marginRight,10);t.setAttribute("data-offset-width",`${e+o+s}`)}Jt.observe(this),_t.observe(this),setTimeout((()=>{this.style.overflow="visible",this.update()}),20)}disconnectedCallback(){Jt.unobserve(this),_t.unobserve(this)}menuItemClick(t){var e;const n=t.currentTarget,i=null==n?void 0:n.getAttribute("data-for");i&&(null===(e=document.getElementById(i))||void 0===e||e.click())}update(t=this.getBoundingClientRect()){t.width<=z(this,$t,"f")||0===z(this,$t,"f")?z(this,Ft,"m",Ut).call(this):t.width>z(this,$t,"f")&&z(this,Ft,"m",Yt).call(this),U(this,$t,t.width,"f"),t.width<=z(this,Nt,"f")?this.style.justifyContent="space-between":this.style.justifyContent="flex-end",z(this,Bt,"f")&&z(this,Bt,"f").abort(),U(this,Bt,qt(this.itemContainer,{bindKeys:It.ArrowHorizontal|It.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>!t.closest(".ActionBar-item[hidden]")}),"f")}};Nt=new WeakMap,$t=new WeakMap,Bt=new WeakMap,Ft=new WeakSet,jt=function(){var t;return parseInt(null===(t=window.getComputedStyle(this.itemContainer))||void 0===t?void 0:t.columnGap,10)||0},Kt=function(){return this.offsetWidth-this.itemContainer.offsetWidth},zt=function(){return this.moreMenu.hidden?0:this.moreMenu.offsetWidth+z(this,Ft,"m",jt).call(this)},Ut=function(){if(this.items[0].hidden)return;let t=this.items.length-1;for(const e of this.items.reverse()){if(!e.hidden&&z(this,Ft,"m",Kt).call(this)<z(this,Ft,"m",zt).call(this))z(this,Ft,"m",Vt).call(this,t);else if(z(this,Ft,"m",Kt).call(this)>=z(this,Ft,"m",zt).call(this))return;t--}},Yt=function(){if(!this.items[this.items.length-1].hidden)return;let t=0;for(const e of this.items){if(e.hidden){const n=Number(e.getAttribute("data-offset-width"));if(!(z(this,Ft,"m",Kt).call(this)>=z(this,Ft,"m",zt).call(this)+n||t===this.items.length-1))return;z(this,Ft,"m",Xt).call(this,t)}t++}this.items[this.items.length-1].hidden||(this.moreMenu.hidden=!0)},Xt=function(t){this.items[t].hidden=!1,z(this,Ft,"a",Gt)[t].hidden=!0},Vt=function(t){this.items[t].hidden=!0,z(this,Ft,"a",Gt)[t].hidden=!1,this.moreMenu.hidden&&(this.moreMenu.hidden=!1)},Gt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},K([ct],Zt.prototype,"items",void 0),K([lt],Zt.prototype,"itemContainer",void 0),K([lt],Zt.prototype,"moreMenu",void 0),Zt=K([ut],Zt),window.ActionBarElement=Zt;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const n=[ee(t,"compositionstart",(t=>de(this,t))),ee(t,"compositionend",(t=>de(this,t))),ee(t,"click",(e=>ae(t,e))),ee(t,"change",(e=>ae(t,e))),ee(t,"keydown",(e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Qt.get(e);if(!i||i.isComposing)return;const o=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(ue(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{o&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=se(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{o&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=se(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if(re&&n.ctrlKey){const e=se(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if(re&&n.ctrlKey){const e=se(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&ce(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e))),ee(t,"toggle",(()=>ne(t,this)),{once:!0}),ee(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t))),this.preload?ee(t,"mouseover",(()=>ne(t,this)),{once:!0}):te,...ie(t)];Qt.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Qt.get(this);if(t){Qt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Qt=new WeakMap,te={unsubscribe(){}};function ee(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function ne(t,e){const n=e.getAttribute("src");if(!n)return;const i=Qt.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const o=e.querySelector("include-fragment");o&&!o.hasAttribute("src")&&(o.addEventListener("loadend",(()=>oe(t))),o.setAttribute("src",n))}function ie(t){let e=!1;return[ee(t,"mousedown",(()=>e=!0)),ee(t,"keydown",(()=>e=!1)),ee(t,"toggle",(()=>{t.hasAttribute("open")&&(oe(t)||e||function(t){const e=document.activeElement;if(e&&ce(e)&&t.contains(e))return;const n=se(t,!0);n&&n.focus()}(t))}))]}function oe(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function se(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,o=i instanceof HTMLElement?n.indexOf(i):-1,s=e?n[o+1]:n[o-1],r=e?n[0]:n[n.length-1];return s||r}const re=navigator.userAgent.match(/Macintosh/);function ae(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||le(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&le(e,t)}}function le(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&ue(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function ce(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function ue(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function de(t,e){const n=Qt.get(t);n&&(n.isComposing="compositionstart"===e.type)}var he,fe;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const me=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return o=>{window.addEventListener("resize",i),e||(e=new IntersectionObserver((e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),n||(n=new ResizeObserver((()=>{for(const e of t)e.update()}))),n.observe(o.ownerDocument.documentElement),e.observe(o)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),he.set(this,null),fe.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(z(this,he,"f"))return z(this,he,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){U(this,he,t,"f"),z(this,he,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),me(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(z(this,fe,"f")),U(this,fe,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=ft(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var pe,ge,be;he=new WeakMap,fe=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));const ve=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),we=t=>{var e;return null===(e=t.textContent)||void 0===e?void 0:e.trim()[0].toLowerCase()},ye=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),pe.add(this),ge.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){U(this,ge,new AbortController,"f");const{signal:t}=z(this,ge,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){var t;null===(t=z(this,ge,"f"))||void 0===t||t.abort()}handleEvent(t){const{direction:e,nowrap:n}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(ve))for(const e of z(this,pe,"a",be))e.setAttribute("tabindex",e===t.target?"0":"-1")}else if(t instanceof KeyboardEvent){const i=Array.from(z(this,pe,"a",be));let o=i.indexOf(t.target);const s=t.key;if("Up"===s||"ArrowUp"===s)"vertical"!==e&&"both"!==e||(o-=o<0?0:1,t.preventDefault());else if("Down"===s||"ArrowDown"===s)"vertical"!==e&&"both"!==e||(o+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(o-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(o+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)o=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)o=i.length-1,t.preventDefault();else{if(!this.mnemonics||!ye.test(s))return;{const e=s.toLowerCase(),r=o>0&&we(t.target)===e?o:0;o=i.findIndex(((t,n)=>n>r&&we(t)===e)),o<0&&!n&&(o=i.findIndex((t=>we(t)===e)))}}n&&o<0&&(o=0),!n&&o>=i.length&&(o=0);const r=i.at(Math.min(o,i.length-1));{let t=r;do{t=t.closest("[popover]:not(:popover-open)"),"auto"===(null==t?void 0:t.popover)&&t.showPopover(),t=(null==t?void 0:t.parentElement)||null}while(t)}null==r||r.focus()}}}ge=new WeakMap,pe=new WeakSet,be=function(){return this.querySelectorAll(ve)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));const Ee=new WeakMap,Ae=new WeakMap,ke=new WeakMap;function Le(t){const e=t.currentTarget;if(!(e instanceof ImageCropElement))return;const{box:n,image:i}=ke.get(e)||{};if(!n||!i)return;let o=0,s=0;if(t instanceof KeyboardEvent)"ArrowUp"===t.key?s=-1:"ArrowDown"===t.key?s=1:"ArrowLeft"===t.key?o=-1:"ArrowRight"===t.key&&(o=1);else if(Ae.has(e)&&t instanceof MouseEvent){const n=Ae.get(e);o=t.pageX-n.dragStartX,s=t.pageY-n.dragStartY}else if(Ae.has(e)&&t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0],{dragStartX:r,dragStartY:a}=Ae.get(e);o=n-r,s=i-a}if(0!==o||0!==s){const t=Math.min(Math.max(0,n.offsetLeft+o),i.width-n.offsetWidth),r=Math.min(Math.max(0,n.offsetTop+s),i.height-n.offsetHeight);n.style.left=`${t}px`,n.style.top=`${r}px`,Ie(e,{x:t,y:r,width:n.offsetWidth,height:n.offsetHeight})}if(t instanceof MouseEvent)Ae.set(e,{dragStartX:t.pageX,dragStartY:t.pageY});else if(t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0];Ae.set(e,{dragStartX:n,dragStartY:i})}}function Te(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=Me(e);if(!(n instanceof ImageCropElement))return;const{box:i}=ke.get(n)||{};if(!i)return;const o=n.getBoundingClientRect();let s,r,a;if(t instanceof KeyboardEvent){if("Escape"===t.key)return Ce(n);if("-"===t.key&&(a=-10),"="===t.key&&(a=10),!a)return;s=i.offsetWidth+a,r=i.offsetHeight+a,Ee.set(n,{startX:i.offsetLeft,startY:i.offsetTop})}else if(t instanceof MouseEvent){const e=Ee.get(n);if(!e)return;s=t.pageX-e.startX-o.left-window.pageXOffset,r=t.pageY-e.startY-o.top-window.pageYOffset}else if(t instanceof TouchEvent){const e=Ee.get(n);if(!e)return;s=t.changedTouches[0].pageX-e.startX-o.left-window.pageXOffset,r=t.changedTouches[0].pageY-e.startY-o.top-window.pageYOffset}s&&r&&Se(n,s,r,!(t instanceof KeyboardEvent))}function Me(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.host:t}function xe(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const n=Me(e);if(!(n instanceof ImageCropElement))return;const{box:i}=ke.get(n)||{};if(!i)return;const o=t.target;if(o instanceof HTMLElement)if(o.hasAttribute("data-direction")){const e=o.getAttribute("data-direction")||"";n.addEventListener("mousemove",Te),n.addEventListener("touchmove",Te,{passive:!0}),["nw","se"].indexOf(e)>=0&&n.classList.add("nwse"),["ne","sw"].indexOf(e)>=0&&n.classList.add("nesw"),Ee.set(n,{startX:i.offsetLeft+(["se","ne"].indexOf(e)>=0?0:i.offsetWidth),startY:i.offsetTop+(["se","sw"].indexOf(e)>=0?0:i.offsetHeight)}),Te(t)}else n.addEventListener("mousemove",Le),n.addEventListener("touchmove",Le,{passive:!0})}function Se(t,e,n,i=!0){let o=Math.max(Math.abs(e),Math.abs(n),10);const s=Ee.get(t);if(!s)return;const{box:r,image:a}=ke.get(t)||{};if(!r||!a)return;o=Math.min(o,n>0?a.height-s.startY:s.startY,e>0?a.width-s.startX:s.startX);const l=i?Math.round(Math.max(0,e>0?s.startX:s.startX-o)):r.offsetLeft,c=i?Math.round(Math.max(0,n>0?s.startY:s.startY-o)):r.offsetTop;r.style.left=`${l}px`,r.style.top=`${c}px`,r.style.width=`${o}px`,r.style.height=`${o}px`,Ie(t,{x:l,y:c,width:o,height:o})}function Ce(t){const{image:e}=ke.get(t)||{};if(!e)return;const n=Math.round(e.clientWidth>e.clientHeight?e.clientHeight:e.clientWidth);Ee.set(t,{startX:(e.clientWidth-n)/2,startY:(e.clientHeight-n)/2}),Se(t,n,n)}function De(t){const e=t.currentTarget;e instanceof ImageCropElement&&(Ae.delete(e),e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",Te),e.removeEventListener("mousemove",Le),e.removeEventListener("touchmove",Te),e.removeEventListener("touchmove",Le))}function Ie(t,e){const{image:n}=ke.get(t)||{};if(!n)return;const i=n.naturalWidth/n.width;for(const n in e){const o=Math.round(e[n]*i);e[n]=o;const s=t.querySelector(`[data-image-crop-input='${n}']`);s instanceof HTMLInputElement&&(s.value=o.toString())}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}class ImageCropElement extends HTMLElement{connectedCallback(){if(ke.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML='\n<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: \' \';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class="crop-wrapper">\n <img width="100%" class="crop-image" alt="">\n <div class="crop-container">\n <div data-crop-box class="crop-box">\n <div class="crop-outline"></div>\n <div data-direction="nw" class="handle nw"></div>\n <div data-direction="ne" class="handle ne"></div>\n <div data-direction="sw" class="handle sw"></div>\n <div data-direction="se" class="handle se"></div>\n </div>\n </div>\n</div>\n';const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const n=t.querySelector("img");n instanceof HTMLImageElement&&(ke.set(this,{box:e,image:n}),n.addEventListener("load",(()=>{this.loaded=!0,Ce(this)})),this.addEventListener("mouseleave",De),this.addEventListener("touchend",De),this.addEventListener("mouseup",De),e.addEventListener("mousedown",xe),e.addEventListener("touchstart",xe,{passive:!0}),this.addEventListener("keydown",Le),this.addEventListener("keydown",Te),this.src&&(n.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,n){const{image:i}=ke.get(this)||{};"src"===t&&(this.loaded=!1,i&&(i.src=n))}}var Oe,He,Pe,Re;function We(t){document.activeElement!==t&&(null==t||t.focus())}window.customElements.get("image-crop")||(window.ImageCropElement=ImageCropElement,window.customElements.define("image-crop",ImageCropElement));const qe=[];function Fe(t){const e=t.target,n=null==e?void 0:e.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=null==n?void 0:n.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}const o=qe[qe.length-1];o&&(i=n.getAttribute("data-close-dialog-id"),i===o.id&&(qe.pop(),o.close()),i=n.getAttribute("data-submit-dialog-id"),i===o.id&&(qe.pop(),o.close(!0)))}function Ne(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Fe(t)}function $e(t){const e=t.target;if(null==e?void 0:e.closest("button"))return;const n=qe[qe.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(qe.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),Oe.add(this),He.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){var e,n,i,o;if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",null===(e=z(this,Oe,"a",Pe))||void 0===e||e.classList.remove("Overlay--hidden"),z(this,He,"f").signal.aborted&&U(this,He,new AbortController,"f"),St(this,void 0,z(this,He,"f").signal),qe.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),null===(n=z(this,Oe,"a",Pe))||void 0===n||n.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",z(this,He,"f").abort();const t=(null===(i=this.openButton)||void 0===i?void 0:i.closest("details"))||(null===(o=this.openButton)||void 0===o?void 0:o.closest("action-menu"));We(t?wt(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Fe),document.addEventListener("keydown",Ne),document.addEventListener("mousedown",$e),this.addEventListener("keydown",(t=>z(this,Oe,"m",Re).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var Be,je,Ke,ze,Ue,Ye,Xe,Ve;He=new WeakMap,Oe=new WeakSet,Pe=function(){var t;return(null===(t=this.parentElement)||void 0===t?void 0:t.hasAttribute("data-modal-dialog-overlay"))?this.parentElement:null},Re=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let Ge=class NavListElement extends HTMLElement{constructor(){super(...arguments),Be.add(this)}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}selectItemById(t){if(!t)return!1;const e=z(this,Be,"m",Ke).call(this,t);return!!e&&(z(this,Be,"m",Ye).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=z(this,Be,"m",ze).call(this,t);return!!e&&(z(this,Be,"m",Ye).call(this,e),!0)}selectItemByCurrentLocation(){const t=z(this,Be,"m",Ue).call(this);return!!t&&(z(this,Be,"m",Ye).call(this,t),!0)}expandItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===(null==t?void 0:t.tagName)||"true"===(null==t?void 0:t.getAttribute("aria-expanded"))}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}async showMore(t){var e,n;if(t.preventDefault(),this.showMoreDisabled)return;let i;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const e=await fetch(t);if(!e.ok)return;i=await e.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const o=z(this,Be,"m",je).call(this,document,i);null===(e=null==o?void 0:o.querySelector("li > a"))||void 0===e||e.setAttribute("data-targets","nav-list.focusMarkers");const s=t.target.closest("button").getAttribute("data-list-id");document.getElementById(s).append(o),null===(n=this.focusMarkers.pop())||void 0===n||n.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var _e,Je;Be=new WeakSet,je=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},Ke=function(t){var e;for(const n of this.items){if(n.classList.contains("ActionListItem--hasSubItem"))continue;if(((null===(e=n.getAttribute("data-item-id"))||void 0===e?void 0:e.split(" "))||[]).includes(t))return n}return null},ze=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},Ue=function(){return z(this,Be,"m",ze).call(this,window.location.pathname)},Ye=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&z(this,Be,"m",Xe).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=z(this,Be,"m",Ve).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},Xe=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=z(this,Be,"m",Ve).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},Ve=function(t){var e;if(!t.classList.contains("ActionListItem--subItem"))return null;const n=null===(e=t.closest("li.ActionListItem--hasSubItem"))||void 0===e?void 0:e.querySelector("button.ActionListContent");return n||null},K([ct],Ge.prototype,"items",void 0),K([lt],Ge.prototype,"showMoreItem",void 0),K([ct],Ge.prototype,"focusMarkers",void 0),Ge=K([ut],Ge);let Ze=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),_e.add(this)}connectedCallback(){z(this,_e,"m",Je).call(this)}select(t){var e,n;const i=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),null===(e=t.querySelector("[aria-current]"))||void 0===e||e.setAttribute("aria-current","false");null===(n=i.closest("li.SegmentedControl-item"))||void 0===n||n.classList.add("SegmentedControl-item--selected"),i.setAttribute("aria-current","true")}};_e=new WeakSet,Je=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},K([ct],Ze.prototype,"items",void 0),Ze=K([ut],Ze),window.customElements.get("segmented-control")||(window.SegmentedControlElement=Ze,window.customElements.define("segmented-control",Ze));let Qe=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:{"Requested-With":"XMLHttpRequest"},body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text())}};var tn,en,nn,on,sn,rn,an,ln,cn;K([lt],Qe.prototype,"switch",void 0),K([lt],Qe.prototype,"loadingSpinner",void 0),K([lt],Qe.prototype,"errorIcon",void 0),Qe=K([ut],Qe),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=Qe,window.customElements.define("toggle-switch",Qe));const un=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch(n){try{return t=":open",e.matches(":open")}catch(n){return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),dn="sr-only",hn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function fn(t){for(const e of gn)e!==t&&(un(e)?e.hidePopover():gn.delete(e))}function mn(){fn()}const pn=new Set,gn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),tn.add(this),en.set(this,void 0),nn.set(this,"center"),on.set(this,"outside-bottom"),sn.set(this,!1)}styles(){return'\n :host {\n padding: .5em .75em !important;\n font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--color-fg-on-emphasis) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--color-neutral-emphasis-plus) !important;\n border-radius: 6px;\n border: 0 !important;\n opacity: 0;\n max-width: 250px;\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tool-tip-position-top, 0) auto auto var(--tool-tip-position-left, 0) !important;\n overflow: visible !important;\n }\n\n :host:before{\n position: absolute;\n z-index: 1000001;\n color: var(--color-neutral-emphasis-plus);\n content: "";\n border: 6px solid transparent;\n opacity: 0\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1\n }\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: 12px;\n content: ""\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n\n :host(.\\:popover-open),\n :host(.\\:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-n):before {\n right: 50%;\n margin-right: -6px;\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-se):before,\n :host(.tooltip-sw):before {\n bottom: 100%;\n border-bottom-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):before,\n :host(.tooltip-ne):before,\n :host(.tooltip-nw):before {\n top: 100%;\n border-top-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%\n }\n\n :host(.tooltip-se):before,\n :host(.tooltip-ne):before {\n left: 0;\n margin-left: 6px;\n }\n\n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: 6px;\n }\n\n :host(.tooltip-w):before {\n top: 50%;\n bottom: 50%;\n left: 100%;\n margin-top: -6px;\n border-left-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-e):before {\n top: 50%;\n right: 100%;\n bottom: 50%;\n margin-top: -6px;\n border-right-color: var(--color-neutral-emphasis-plus)\n }\n '}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&un(this)?this.hidePopover():t||un(this)||this.showPopover()}get hiddenFromView(){return!un(this)}connectedCallback(){var t,e;if(pn.add(this),z(this,tn,"m",an).call(this),z(this,tn,"m",ln).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(z(this,tn,"m",rn).call(this,!1),U(this,sn,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),null===(t=z(this,en,"f"))||void 0===t||t.abort(),U(this,en,new AbortController,"f");const{signal:n}=z(this,en,"f");this.addEventListener("mouseleave",this,{signal:n}),this.addEventListener("toggle",this,{signal:n}),this.control.addEventListener("mouseenter",this,{signal:n}),this.control.addEventListener("mouseleave",this,{signal:n}),this.control.addEventListener("focus",this,{signal:n}),this.control.addEventListener("mousedown",this,{signal:n}),null===(e=this.control.popoverTargetElement)||void 0===e||e.addEventListener("beforetoggle",this,{signal:n}),this.ownerDocument.addEventListener("focusout",mn),this.ownerDocument.addEventListener("keydown",this,{signal:n})}disconnectedCallback(){var t;pn.delete(this),gn.delete(this),null===(t=z(this,en,"f"))||void 0===t||t.abort()}async handleEvent(t){if(!this.control)return;const e=un(this),n="mouseenter"===t.type||"focus"===t.type,i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,o="keydown"===t.type&&"Escape"===t.key,s="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||o||s||r;await Promise.resolve(),e||!n||un(this)?e&&a&&un(this)&&this.hidePopover():this.showPopover(),"toggle"===t.type&&z(this,tn,"m",rn).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?z(this,tn,"m",an).call(this):"data-direction"===t&&z(this,tn,"m",ln).call(this))}}var bn,vn;en=new WeakMap,nn=new WeakMap,on=new WeakMap,sn=new WeakMap,tn=new WeakSet,rn=function(t){t?(gn.add(this),this.classList.remove(dn),fn(this),z(this,tn,"m",cn).call(this)):(gn.delete(this),this.classList.remove(...hn),this.classList.add(dn))},an=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},ln=function(){this.classList.remove(...hn);const t=this.direction;"n"===t?(U(this,nn,"center","f"),U(this,on,"outside-top","f")):"ne"===t?(U(this,nn,"start","f"),U(this,on,"outside-top","f")):"e"===t?(U(this,nn,"center","f"),U(this,on,"outside-right","f")):"se"===t?(U(this,nn,"start","f"),U(this,on,"outside-bottom","f")):"s"===t?(U(this,nn,"center","f"),U(this,on,"outside-bottom","f")):"sw"===t?(U(this,nn,"end","f"),U(this,on,"outside-bottom","f")):"w"===t?(U(this,nn,"center","f"),U(this,on,"outside-left","f")):"nw"===t&&(U(this,nn,"end","f"),U(this,on,"outside-top","f"))},cn=function(){if(!this.control)return;if(!z(this,sn,"f")||!un(this))return;const t=ft(this,this.control,{side:z(this,on,"f"),align:z(this,nn,"f"),anchorOffset:10}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let wn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),bn.add(this)}dismiss(){const t=this.parentElement;t&&("remove"===z(this,bn,"a",vn)?t.removeChild(this):this.hide())}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};bn=new WeakSet,vn=function(){return this.getAttribute("data-dismiss-scheme")},K([lt],wn.prototype,"titleText",void 0),wn=K([ut],wn),window.customElements.get("x-banner")||(window.XBannerElement=wn,window.customElements.define("x-banner",wn));class yn{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":An(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&An(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.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",En),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",En)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(kn)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(kn)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(kn),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let o=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(o=e)}const s=n[o];if(s)for(const t of n)t.removeAttribute("data-combobox-option-default"),s===t?(this.input.setAttribute("aria-activedescendant",s.id),s.setAttribute("aria-selected","true"),Ln(this.list,s)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function En(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function An(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function kn(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Ln(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,o=e.offsetTop,s=o+e.clientHeight;return o>=n&&s<=i})(t,e)||(t.scrollTop=e.offsetTop)}const Tn=window.testScreenReaderDelay||100;class Mn{constructor(t,e,n,i=!1){var o;if(this.container=t,this.input=e,this.results=n,this.combobox=new yn(e,n,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(o=this.clearButton)||void 0===o||o.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.container.open=!1}onKeydown(t){if("Escape"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.container.open=!0,t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.fetchResults()}onInputBlur(){this.interactingWithList?this.interactingWithList=!1:this.container.open=!1}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.container.open=!1,e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),Tn)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void(this.container.open=!1);const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[o]=e,s=null==o?void 0:o.textContent;this.autoselectEnabled&&s?this.updateFeedbackForScreenReaders(`${i} results. ${s} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),this.container.open=n,this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){this.results.hidden&&(this.combobox.start(),this.results.hidden=!1)}close(){this.results.hidden||(this.combobox.stop(),this.results.hidden=!0)}}var xn,Sn,Cn,Dn,In,On=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Hn=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Pn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};const Rn=globalThis.HTMLElement||null;class Wn extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Pn(e,["relatedTarget"])),this.relatedTarget=n}}const qn=new WeakMap;let Fn=null;class AutoCompleteElement extends Rn{constructor(){super(...arguments),xn.add(this),Sn.set(this,null),Cn.set(this,null),In.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Fn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=On(this,Sn,"f"))||void 0===t?void 0:t.isConnected)return On(this,Sn,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){Hn(this,Sn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=On(this,Cn,"f"))||void 0===t?void 0:t.isConnected)?On(this,Cn,"f"):this.querySelector("input")}set inputElement(t){Hn(this,Cn,t,"f"),On(this,xn,"m",Dn).call(this)}connectedCallback(){this.isConnected&&On(this,xn,"m",Dn).call(this)}disconnectedCallback(){const t=qn.get(this);t&&(t.destroy(),qn.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=On(this,In,"f"))||void 0===e||e.abort();const{signal:n}=Hn(this,In,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(Fn){return(await Fn).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,o;if(e===n)return;const s=qn.get(this);if(s)switch(this.forElement===(null===(i=qn.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(o=qn.get(this))||void 0===o?void 0:o.input)||On(this,xn,"m",Dn).call(this),t){case"open":null===n?s.close():s.open();break;case"value":null!==n&&(s.input.value=n),this.dispatchEvent(new Wn("auto-complete-change",{bubbles:!0,relatedTarget:s.input}))}}}Sn=new WeakMap,Cn=new WeakMap,In=new WeakMap,xn=new WeakSet,Dn=function(){var t;null===(t=qn.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");qn.set(this,new Mn(this,n,e,i)),e.setAttribute("role","listbox")};const Nn="undefined"!=typeof globalThis?globalThis:window;try{Nn.AutocompleteElement=Nn.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(Nn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function $n(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function Bn(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),$n(n),e.removeChild(n),Promise.resolve()}async function jn(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var o;if("true"!==t.getAttribute("aria-disabled"))if(n)await Bn(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const s=n.getElementById(e);s&&(await(o=s,o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement?Bn(o.value):o instanceof HTMLAnchorElement&&o.hasAttribute("href")?Bn(o.href):$n(o)),i())}}function Kn(t){const e=t.currentTarget;e instanceof HTMLElement&&jn(e)}function zn(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),jn(e))}}function Un(t){t.currentTarget.addEventListener("keydown",zn)}function Yn(t){t.currentTarget.removeEventListener("keydown",zn)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",Kn),this.addEventListener("focus",Un),this.addEventListener("blur",Yn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const Xn="undefined"!=typeof globalThis?globalThis:window;try{Xn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(Xn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Vn(t){t.style.display="inline-block"}function Gn(t){t.style.display="none"}const _n=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=_n.get(t);e?(clearTimeout(e),_n.delete(t)):function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(Gn(e),Vn(n))}(t),_n.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(Vn(e),Gn(n))}(t),_n.delete(t)}),2e3))}));var Jn,Zn=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Qn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const ti="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ei=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],ni={minimumIntegerDigits:2};class ii{constructor(t,e={}){Jn.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const o=e.hours||i;i="2-digit"===o?"numeric":o;const s=e.minutes||i;i="2-digit"===s?"numeric":s;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;Zn(this,Jn,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:o,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:s,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return Qn(this,Jn,"f")}formatToParts(t){const e=[],n=Qn(this,Jn,"f"),i=n.style,o=n.locale;for(const[i,s]of ei){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?ni:"numeric"===a?{}:{style:"unit",unit:s,unitDisplay:a};e.push(new Intl.NumberFormat(o,l).format(r))}return new ti(o,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}Jn=new WeakMap;const oi=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,si=["year","month","week","day","hour","minute","second","millisecond"];class ri{constructor(t=0,e=0,n=0,i=0,o=0,s=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=o,this.minutes=s,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new ri(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,o=null===(e=n.match(oi))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return o?new ri(...o):new ri}if("object"==typeof t){const{years:e,months:n,weeks:i,days:o,hours:s,minutes:r,seconds:a,milliseconds:l}=t;return new ri(e,n,i,o,s,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(ai(n,ri.from(t)).getTime()-n),o=Math.abs(ai(n,ri.from(e)).getTime()-n);return i>o?-1:i<o?1:0}toLocaleString(t,e){return new ii(t,e).format(this)}}function ai(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}function li(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),o=Math.abs(t.months),s=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),u=Math.abs(t.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||r||s||o||i)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||s||o||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||s||o||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||s||o||i)&&(a=0);const d=e.getFullYear();let h=e.getMonth();const f=e.getDate();return(r>=27||i+o&&r)&&(e.setDate(f+r*n),o+=Math.abs(e.getFullYear()>=d?e.getMonth()-h:e.getMonth()-h-12),o&&(r=0),h=e.getMonth()),r>=6&&(s+=Math.round(r/7)),(s||o||i)&&(r=0),s>=4&&(o+=Math.round(s/4)),(o||i)&&(s=0),(o>=11||i&&o)&&(e.setMonth(e.getMonth()+o*n),i+=Math.abs(d-e.getFullYear())),i&&(o=0),new ri(i*n,o*n,s*n,r*n,a*n,l*n,c*n,u*n)}var ci,ui,di,hi,fi,mi,pi,gi,bi,vi,wi,yi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ei=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const Ai=globalThis.HTMLElement||null,ki=new ri,Li=new ri(0,0,0,0,0,1);class Ti extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function Mi(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const xi=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Mi(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Mi(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Ai{constructor(){super(...arguments),ci.add(this),ui.set(this,!1),di.set(this,!1),fi.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),wi.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","datetime","lang","title"]}get onRelativeTimeUpdated(){return yi(this,wi,"f")}set onRelativeTimeUpdated(t){yi(this,wi,"f")&&this.removeEventListener("relative-time-updated",yi(this,wi,"f")),Ei(this,wi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,oi.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return si.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){xi.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&Ei(this,ui,null!==n&&(this.date&&yi(this,ci,"m",mi).call(this,this.date))!==n,"f"),yi(this,di,"f")||"title"===t&&yi(this,ui,"f")||Ei(this,di,(async()=>{await Promise.resolve(),this.update()})(),"f"))}update(){const t=yi(this,fi,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(yi(this,fi,"f").textContent=t);const o=Date.now();yi(this,ui,"f")||(n=yi(this,ci,"m",mi).call(this,i)||"",n&&this.setAttribute("title",n));const s=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new ri;const o=Math.sign(i),s=Math.abs(i),r=Math.floor(s/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=si.indexOf(e)||si.length;return new ri(h>=0?d*o:0,h>=1?(u-12*d)*o:0,0,h>=3?(c-30*u)*o:0,h>=4?(l-24*c)*o:0,h>=5?(a-60*l)*o:0,h>=6?(r-60*a)*o:0,h>=7?(s-1e3*r)*o:0)}(i,this.precision,o),r=yi(this,ci,"m",pi).call(this,s);let a=t;a="duration"===r?yi(this,ci,"m",gi).call(this,s):"relative"===r?yi(this,ci,"m",bi).call(this,s):yi(this,ci,"m",vi).call(this,i),a?yi(this,fi,"f").textContent=a:this.shadowRoot===yi(this,fi,"f")&&this.textContent&&(yi(this,fi,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new Ti(t,a,e,n)),"relative"===r||"duration"===r?xi.observe(this):xi.unobserve(this),Ei(this,di,!1,"f")}}ui=new WeakMap,di=new WeakMap,fi=new WeakMap,wi=new WeakMap,ci=new WeakSet,hi=function(){var t;return(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},mi=function(t){return new Intl.DateTimeFormat(yi(this,ci,"a",hi),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},pi=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===ri.compare(t,this.threshold))return"relative"}return"datetime"},gi=function(t){const e=yi(this,ci,"a",hi),n=this.format,i=this.formatStyle,o=this.tense;let s=ki;"micro"===n?(t=li(t),s=Li,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Li)):("past"===o&&-1!==t.sign||"future"===o&&1!==t.sign)&&(t=s);const r=`${this.precision}sDisplay`;return t.blank?s.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},bi=function(t){const e=new Intl.RelativeTimeFormat(yi(this,ci,"a",hi),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=ki),"past"===n&&-1!==t.sign&&(t=ki);const[i,o]=function(t,e){const n=li(t,e);if(n.blank)return[0,"second"];for(const t of si){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===o&&i<10?e.format(0,"second"):e.format(i,o)},vi=function(t){const e=new Intl.DateTimeFormat(yi(this,ci,"a",hi),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const Si="undefined"!=typeof globalThis?globalThis:window;try{Si.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Si.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Ci(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const n=t.target;if(!(n instanceof HTMLElement))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=Ci(this),o=i.indexOf(i.find((t=>t.matches('[aria-selected="true"]')))),[s,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(s.some((e=>t.code===e))){let t=o+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=o-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Ci(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}));for(const t of Ci(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Ci(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],o=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:o}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),o.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:o}}))}}}const Di="undefined"!=typeof globalThis?globalThis:window;try{Di.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Di.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let Ii=class PrimerMultiInputElement extends HTMLElement{activateField(t){var e,n;const i=this.findField(t);if(i){for(const t of this.fields)t!==i&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),null===(e=t.parentElement)||void 0===e||e.setAttribute("hidden","hidden"));i.removeAttribute("disabled"),i.removeAttribute("hidden"),null===(n=i.parentElement)||void 0===n||n.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Oi(t,e=0,{start:n=!1,middle:i=!1,once:o=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:o=!1}={}){let s,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),o&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(s),s=setTimeout((()=>{r=Date.now(),t.apply(this,c),o&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(s),a=!0},l}(t,e,{start:n,middle:i,once:o})}K([ct],Ii.prototype,"fields",void 0),Ii=K([ut],Ii),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:Ii}),window.customElements.define("primer-multi-input",Ii));var Hi,Pi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ri=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const Wi=new WeakMap;class qi extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class Fi extends qi{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class Ni extends qi{constructor(){super("complete")}}class $i extends qi{constructor(t){super("success"),this.response=t}}class Bi extends Fi{constructor(){super("start","Verifying…")}}class ji extends Fi{constructor(t){super("error","Validation failed"),this.response=t}}class Ki extends qi{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),Hi.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Pi(this,Hi,"f")}set onloadend(t){Pi(this,Hi,"f")&&this.removeEventListener("loadend",Pi(this,Hi,"f")),Ri(this,Hi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Oi(Ui.bind(null,this),300),n={check:e,controller:null};Wi.set(this,n),t.addEventListener("input",zi),t.addEventListener("input",e),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=Wi.get(this);e&&(Wi.delete(this),t.removeEventListener("input",zi),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}}function zi(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,o=n.csrf,s=Wi.get(n);if(!i||!o||!s)return;const r=new Bi;e.dispatchEvent(r),n.required&&e.setCustomValidity(r.message)}async function Ui(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,o=t.csrf,s=Wi.get(t);if(!i||!o||!s)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const r=new FormData;r.append(n,o),r.append("value",e.value),e.dispatchEvent(new Ki(r)),s.controller?s.controller.abort():t.dispatchEvent(new Event("loadstart")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};try{const n=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,i,{credentials:"same-origin",signal:s.controller.signal,method:"POST",body:r});if(n.ok)t.required&&e.setCustomValidity(""),e.dispatchEvent(new $i(n.clone()));else{const i=new ji(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}s.controller=null,e.dispatchEvent(new Ni)}catch(t){"AbortError"!==t.name&&(s.controller=null,e.dispatchEvent(new Ni))}}Hi=new WeakMap;const Yi="undefined"!=typeof globalThis?globalThis:window;try{Yi.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(Yi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var Xi;let Vi=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),Xi.set(this,void 0)}connectedCallback(){var t;null===(t=z(this,Xi,"f"))||void 0===t||t.abort();const{signal:e}=U(this,Xi,new AbortController,"f");this.inputElement.addEventListener("auto-check-success",(()=>{this.clearError()}),{signal:e}),this.inputElement.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:e})}disconnectedCallback(){var t;null===(t=z(this,Xi,"f"))||void 0===t||t.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus()}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.textContent=""}setError(t){this.validationMessageElement.textContent=t,this.validationElement.hidden=!1,this.inputElement.setAttribute("invalid","true")}};Xi=new WeakMap,K([lt],Vi.prototype,"inputElement",void 0),K([lt],Vi.prototype,"validationElement",void 0),K([lt],Vi.prototype,"validationMessageElement",void 0),Vi=K([ut],Vi);let Gi=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var _i,Ji,Zi,Qi,to,eo,no,io,oo,so,ro,ao,lo,co,uo,ho,fo,mo,po,go,bo,vo,wo;K([lt],Gi.prototype,"validationElement",void 0),K([lt],Gi.prototype,"validationMessageElement",void 0),Gi=K([ut],Gi);const yo=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'].map((t=>`:not([hidden]) > ${t}`));let Eo=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),_i.add(this),Ji.set(this,void 0),Zi.set(this,""),Qi.set(this,""),to.set(this,!1)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){var t;return(null===(t=this.invokerElement)||void 0===t?void 0:t.popoverTargetElement)||null}get invokerElement(){var t;const e=null===(t=this.querySelector("[role=menu]"))||void 0===t?void 0:t.id;if(!e)return null;for(const t of this.querySelectorAll("[aria-controls]"))if(t.getAttribute("aria-controls")===e)return t;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:null==t?void 0:t.textContent,value:null==n?void 0:n.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=U(this,Ji,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),z(this,_i,"m",go).call(this),z(this,_i,"m",bo).call(this),z(this,_i,"m",eo).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t})}disconnectedCallback(){z(this,Ji,"f").abort()}handleEvent(t){var e,n,i;const o=null===(e=this.invokerElement)||void 0===e?void 0:e.contains(t.target),s=z(this,_i,"m",so).call(this,t);if(o&&"mousedown"===t.type)return void U(this,to,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(o&&s)return z(this,_i,"m",ro).call(this,t),void U(this,to,!1,"f");if((null===(n=t.target)||void 0===n?void 0:n.closest("dialog"))||(null===(i=t.target)||void 0===i?void 0:i.closest("modal-dialog")))return;if("focusout"===t.type){if(z(this,to,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||z(this,_i,"m",ho).call(this)}))}const r=t.target.closest(yo.join(","));if(null!==r&&s){const e=r.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void z(this,_i,"m",ao).call(this,t,n)}return z(this,_i,"m",co).call(this,t,r),void z(this,_i,"m",lo).call(this,t,r)}"include-fragment-replaced"===t.type&&z(this,_i,"m",uo).call(this)}};Ji=new WeakMap,Zi=new WeakMap,Qi=new WeakMap,to=new WeakMap,_i=new WeakSet,eo=function(){const{signal:t}=z(this,Ji,"f");for(const e of z(this,_i,"a",wo))e.addEventListener("click",z(this,_i,"m",no).bind(this),{signal:t}),e.addEventListener("keydown",z(this,_i,"m",no).bind(this),{signal:t})},no=function(t){if(!z(this,_i,"m",so).call(this,t))return;const e=t.target.closest(yo.join(","));e&&e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())},io=function(t){return t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&("Enter"===t.key||" "===t.key)},oo=function(t){return t instanceof MouseEvent&&"click"===t.type},so=function(t){return z(this,_i,"m",oo).call(this,t)||z(this,_i,"m",io).call(this,t)},ro=function(t){var e;t.preventDefault(),t.stopPropagation(),z(this,_i,"m",po).call(this)?z(this,_i,"m",mo).call(this):(z(this,_i,"m",fo).call(this),null===(e=z(this,_i,"a",vo))||void 0===e||e.focus())},ao=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,o=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",z(this,_i,"m",po).call(this)&&z(this,_i,"m",mo).call(this)};e.addEventListener("close",o,{signal:i}),e.addEventListener("cancel",o,{signal:i})},lo=function(t,e){if("multiple"!==this.selectVariant&&setTimeout((()=>{z(this,_i,"m",po).call(this)&&z(this,_i,"m",mo).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const n="true"!==e.getAttribute("aria-checked");if("single"===this.selectVariant){n&&e.setAttribute("aria-checked","true");for(const t of this.querySelectorAll("[aria-checked]"))t!==e&&t.setAttribute("aria-checked","false");z(this,_i,"m",go).call(this)}else e.setAttribute("aria-checked",`${n}`);z(this,_i,"m",bo).call(this),t instanceof KeyboardEvent&&t.target instanceof HTMLButtonElement&&t.preventDefault()},co=function(t,e){if(t instanceof MouseEvent&&"click"===t.type||t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&"Enter"===t.key)return;t.stopPropagation();e.click()},uo=function(){z(this,_i,"a",vo)&&z(this,_i,"a",vo).focus(),z(this,_i,"m",eo).call(this)},ho=function(){z(this,_i,"m",mo).call(this)},fo=function(){var t;null===(t=this.popoverElement)||void 0===t||t.showPopover()},mo=function(){var t;null===(t=this.popoverElement)||void 0===t||t.hidePopover()},po=function(){var t;return null===(t=this.popoverElement)||void 0===t?void 0:t.matches(":popover-open")},go=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;U(this,Zi,z(this,Zi,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=z(this,Zi,"f")},bo=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&U(this,Qi,z(this,Qi,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=z(this,Qi,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},vo=function(){return this.querySelector(yo.join(","))},wo=function(){return Array.from(this.querySelectorAll(yo.join(",")))},K([lt],Eo.prototype,"includeFragment",void 0),Eo=K([ut],Eo),window.customElements.get("action-menu")||(window.ActionMenuElement=Eo,window.customElements.define("action-menu",Eo))}();
|
1
|
+
!function(){"use strict";var t,e,n,i,o,s,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const u=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver((e=>{for(const o of e)if(o.isIntersecting){const{target:e}=o;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",s).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",s).call(this)}fetch(t){return fetch(t)}refetch(){u.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",o).call(this);if(n instanceof Error)throw n;const i=n,s=document.createElement("template");s.innerHTML=i;const r=document.importNode(s.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},o=async function(){const e=this.src,n=u.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),u.set(this,{src:e,data:n}),n}},s=async function(){const e=await l(this,t,"m",o).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t){await new Promise((t=>setTimeout(t,0)));for(const e of t)this.dispatchEvent(new Event(e))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request());if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);const o=await n.text();let s=o;if(d){s=(await d).createHTML(o,n)}return l(this,t,"m",r).call(this,["load","loadend"]),s}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"]),e}var e};const h="undefined"!=typeof globalThis?globalThis:window;try{h.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(h.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var f=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},m=new WeakMap;function p(t,e,n){m.set(t,setTimeout((()=>{m.has(t)&&t.dispatchEvent(new f("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var g=globalThis.ShadowRoot||function(){},b=globalThis.HTMLDialogElement||function(){},v=new WeakMap,w=new WeakMap,y=new WeakMap;function E(t){return y.get(t)||"hidden"}var A=new WeakMap;function k(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===E(t))&&(!(!e&&"hidden"!==E(t))&&(!(t instanceof b&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function L(t){return t?Array.from(w.get(t.ownerDocument)||[]).indexOf(t)+1:0}function T(t){const e=S(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e)return e;if((t=t.parentElement||x(t))instanceof g&&(t=t.host),t instanceof Document)return}}(t);return L(e)>L(n)?e:n}function M(t){const e=w.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function x(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?x(t.parentNode):t}function S(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===y.get(t))return t;if((t=t.parentElement||x(t))instanceof g&&(t=t.host),t instanceof Document)return}}function C(t){return!t.hidden&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&-1!==t.tabIndex)))}function D(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);const n=e.querySelector("[autofocus]");if(n)return n;const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let o=i.currentNode;for(;o;){if(C(o))return o;o=i.nextNode()}})(t)?.focus()}var I=new WeakMap;function O(t){if(!k(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new f("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!k(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(R(function(t){const e=new Map;let n=0;const i=t.ownerDocument;for(const t of w.get(i)||[])e.set(t,n),n+=1;e.set(t,n),n+=1;let o=null;return function(t){const n=S(t);if(null===n)return null;const i=e.get(n);(null===o||e.get(o)<i)&&(o=n)}(t?.parentElement),o}(t)||e,!1,!0),n!==t.getAttribute("popover")||!k(t,!1))return}M(e)||(n=!0),I.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),y.set(t,"showing"),v.has(e)||v.set(e,new Set),v.get(e).add(t),D(t),"auto"===t.popover&&(w.has(e)||w.set(e,new Set),w.get(e).add(t),N(A.get(t),!0)),n&&i&&"auto"===t.popover&&I.set(t,i),p(t,"closed","open")}function H(t,e=!1,n=!1){if(!k(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(R(t,e,n),!k(t,!0)))return;if(N(A.get(t),!1),A.delete(t),n&&(t.dispatchEvent(new f("beforetoggle",{oldState:"open",newState:"closed"})),!k(t,!0)))return;v.get(i)?.delete(t),w.get(i)?.delete(t),t.classList.remove(":popover-open"),y.set(t,"hidden"),n&&p(t,"open","closed");const o=I.get(t);o&&(I.delete(t),e&&o.focus())}function P(t,e=!1,n=!1){let i=M(t);for(;i;)H(i,e,n),i=M(t)}function R(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return P(i,e,n);let o=null,s=!1;for(const e of w.get(i)||[])if(e===t)s=!0;else if(s){o=e;break}if(!s)return P(i,e,n);for(;o&&"showing"===E(o)&&w.get(i)?.size;)H(o,e,n)}var W=new WeakMap;function q(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!M(n))return;const i=T(e);if(i&&"pointerdown"===t.type)W.set(n,i);else if("pointerup"===t.type){const t=W.get(n)===i;W.delete(n),t&&R(i||n,!1,!0)}}var F=new WeakMap;function N(t,e=!1){if(!t)return;F.has(t)||F.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=F.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var $=globalThis.ShadowRoot||function(){};function B(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var j=/(^|[^\\]):popover-open\b/g;function K(t,e,n,i){var o,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,n,r):o(e,n))||r);return s>3&&r&&Object.defineProperty(e,n,r),r}function z(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function U(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){function t(t){return t?.includes(":popover-open")&&(t=t.replace(j,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||f,B(Document.prototype,"querySelector",t),B(Document.prototype,"querySelectorAll",t),B(Element.prototype,"querySelector",t),B(Element.prototype,"querySelectorAll",t),B(Element.prototype,"matches",t),B(Element.prototype,"closest",t),B(DocumentFragment.prototype,"querySelectorAll",t),B(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){O(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){H(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===y.get(this)&&void 0===t||!1===t?H(this,!0,!0):void 0!==t&&!0!==t||O(this)}}});const e=new WeakMap;function n(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),e.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),e.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=e.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return e.delete(this),null;const n=x(this),i=this.getAttribute("popovertarget");return(n instanceof Document||n instanceof $)&&i&&n.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}n(HTMLButtonElement),n(HTMLInputElement);const i=t=>{if(!t.isTrusted)return;const e=t.composedPath()[0];if(!(e instanceof Element)||e?.shadowRoot)return;const n=x(e);if(!(n instanceof $||n instanceof Document))return;const i=e.closest("[popovertargetaction],[popovertarget]");i&&function(t){const e=t.popoverTargetElement;if(!e)return;const n=E(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?H(e,!0,!0):k(e,!1)&&(A.set(e,t),O(e)))}(i)},o=t=>{const e=t.key,n=t.target;!n||"Escape"!==e&&"Esc"!==e||R(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",i),t.addEventListener("keydown",o),t.addEventListener("pointerdown",q),t.addEventListener("pointerup",q)})(document)}();const Y=new WeakSet;function X(t){_(t),G(t)}const V=new WeakMap;function G(t=document){if(V.has(t))return V.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)Q(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&_(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,V.delete(t),n.disconnect()}};return V.set(t,i),i}function _(t){for(const e of t.querySelectorAll("[data-action]"))Q(e);t instanceof Element&&t.hasAttribute("data-action")&&Q(t)}function J(t){const e=t.currentTarget;for(const n of Z(e))if(t.type===n.type){const i=e.closest(n.tag);Y.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const o=e.getRootNode();if(o instanceof ShadowRoot&&Y.has(o.host)&&o.host.matches(n.tag)){const e=o.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*Z(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function Q(t){for(const e of Z(t))t.addEventListener(e.type,J)}const tt=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),et=(t,e="property")=>{const n=tt(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const nt="attr",it=new WeakSet;function ot(t,e){if(it.has(t))return;it.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=at(n,nt));for(const n of e){const e=t[n],o=et(`${i}${n}`);let s={configurable:!0,get(){return this.getAttribute(o)||""},set(t){this.setAttribute(o,t||"")}};"number"==typeof e?s={configurable:!0,get(){return Number(this.getAttribute(o)||0)},set(t){this.setAttribute(o,t)}}:"boolean"==typeof e&&(s={configurable:!0,get(){return this.hasAttribute(o)},set(t){this.toggleAttribute(o,t)}}),Object.defineProperty(t,n,s),n in t&&!t.hasAttribute(o)&&s.set.call(t,e)}}const st=Symbol.for("catalyst");class rt{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,o)};let s=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,s)},set(t){s=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>et(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...at(t.prototype,nt)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=tt(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),ot(t),function(t){Y.add(t),t.shadowRoot&&X(t.shadowRoot),_(t),G(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&X(t.shadowRoot)}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,o){ot(t),"data-catalyst"!==e&&o&&o.call(t,e,n,i)}}function at(t,e){if(!Object.prototype.hasOwnProperty.call(t,st)){const e=t[st],n=t[st]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[st];return n.has(e)||n.set(e,new Set),n.get(e)}function lt(t,e){at(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function ct(t,e){at(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const o of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))o.closest(n)||i.push(o);for(const o of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))o.closest(n)===t&&i.push(o);return i}(this,e)}})}function ut(t){new rt(t)}new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}));const dt={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},ht={start:["end","center"],end:["start","center"],center:["end","start"]};function ft(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),o=function(t){let e=t;for(;null!==e&&e!==document.body;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),o=getComputedStyle(n),[s,r,a,l]=[o.borderTopWidth,o.borderLeftWidth,o.borderRightWidth,o.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+s,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-s-l,n===document.body?window.innerHeight:-1/0)}}(i),s=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[s.borderTopWidth,s.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:o,align:s,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=pt(n,i,o,s,a,l),d=o,h=s;if(u.top-=e.top,u.left-=e.left,!r){const r=dt[o];let f=0;if(r){let t=o;for(;f<r.length&>(t,u,c,n);){const o=r[f++];t=o,u=pt(n,i,o,s,a,l),u.top-=e.top,u.left-=e.left,d=o}}const m=ht[s];let p=0;if(m){let t=s;for(;p<m.length&&bt(t,u,c,n);){const o=m[p++];t=o,u=pt(n,i,d,o,a,l),u.top-=e.top,u.left-=e.left,h=o}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=t.height+c.top-n.height)}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(o,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,o,s;const r=null!==(e=t.side)&&void 0!==e?e:mt.side,a=null!==(n=t.align)&&void 0!==n?n:mt.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:mt.anchorOffset,alignmentOffset:null!==(o=t.alignmentOffset)&&void 0!==o?o:"center"!==a&&r.startsWith("inside")?mt.alignmentOffset:0,allowOutOfBounds:null!==(s=t.allowOutOfBounds)&&void 0!==s?s:mt.allowOutOfBounds}}(n))}const mt={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function pt(t,e,n,i,o,s){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-o-t.height:"outside-bottom"===n?l=a+o:"outside-left"===n?c=e.left-o-t.width:"outside-right"===n&&(c=r+o),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+s:"center"===i?e.left-(t.width-e.width)/2+s:r-t.width-s),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+s:"center"===i?e.top-(t.height-e.height)/2+s:a-t.height-s),"inside-top"===n?l=e.top+o:"inside-bottom"===n?l=a-o-t.height:"inside-left"===n?c=e.left+o:"inside-right"===n?c=r-o-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+o),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+s:"center"===i?e.left-(t.width-e.width)/2+s:r-t.width-s:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+s:"center"===i?e.top-(t.height-e.height)/2+s:a-t.height-s),{top:l,left:c}}function gt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function bt(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*vt(t,e={}){var n,i;const o=null!==(n=e.strict)&&void 0!==n&&n,s=null!==(i=e.onlyTabbable)&&void 0!==i&&i?Et:yt,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&s(t,o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&s(t,o)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&s(t,o)&&(yield t)}function wt(t,e=!1){return vt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function yt(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,o=t instanceof HTMLInputElement&&"hidden"===t.type,s=t.classList.contains("sentinel");if(n||i||o||s)return!1;if(e){const e=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(getComputedStyle(t).visibility),i=0===t.getClientRects().length;if(e||n||i)return!1}return null!=t.getAttribute("tabindex")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex}function Et(t,e=!1){return yt(t,e)&&"-1"!==t.getAttribute("tabindex")}let At=!1;function kt(){}try{const t=Object.create({},{signal:{get(){At=!0}}});window.addEventListener("test",kt,t),window.removeEventListener("test",kt,t)}catch(t){}function Lt(){At||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),At=!0)}Lt();const Tt=[];let Mt,xt;function St(t,e,n){const i=new AbortController,o=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const s=document.createElement("span");s.setAttribute("class","sentinel"),s.setAttribute("tabindex","0"),s.setAttribute("aria-hidden","true"),s.onfocus=()=>{const e=wt(t,!0);null==e||e.focus()};const r=document.createElement("span");let a;function l(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(a=n);if(a&&Et(a)&&t.contains(a))return void a.focus();if(e&&t.contains(e))return void e.focus();{const e=wt(t);return void(null==e||e.focus())}}}r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=wt(t);null==e||e.focus()},t.prepend(s),t.append(r);const c=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(o);if(Mt){const t=Mt;Mt.container.setAttribute("data-focus-trap","suspended"),Mt.controller.abort(),Tt.push(t)}c.signal.addEventListener("abort",(()=>{Mt=void 0})),o.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=Tt.findIndex((e=>e.container===t));n>=0&&Tt.splice(n,1),function(){const t=Tt.pop();t&&St(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{l(t.target)}),{signal:c.signal,capture:!0}),l(document.activeElement),Mt={container:t,controller:c,initialFocus:e,originalSignal:o};const u=Tt.findIndex((e=>e.container===t));if(u>=0&&Tt.splice(u,1),!n)return i}function Ct(){return void 0===xt&&(xt=/^mac/i.test(window.navigator.platform)),xt}let Dt=1e4;var It;Lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(It||(It={}));const Ot={ArrowLeft:It.ArrowHorizontal,ArrowDown:It.ArrowVertical,ArrowUp:It.ArrowVertical,ArrowRight:It.ArrowHorizontal,h:It.HL,j:It.JK,k:It.JK,l:It.HL,a:It.AD,s:It.WS,w:It.WS,d:It.AD,Tab:It.Tab,Home:It.HomeAndEnd,End:It.HomeAndEnd,PageUp:It.PageUpDown,PageDown:It.PageUpDown,Backspace:It.Backspace},Ht={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function Pt(t){const e=Ht[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=Ct();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}const Rt="data-is-active-descendant",Wt="data-has-active-descendant";function qt(t,e){var n,i,o,s,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?It.ArrowAll:It.ArrowVertical)|It.HomeAndEnd,u=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",d=null!==(o=null==e?void 0:e.focusInStrategy)&&void 0!==o?o:"previous",h=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(s=null==e?void 0:e.preventScroll)&&void 0!==s&&s;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,h?t&&document.activeElement===h?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+Dt++),e&&e!==n&&e.removeAttribute(Rt),h&&(i||h.getAttribute("aria-activedescendant")!==n.id)&&(h.setAttribute("aria-activedescendant",n.id),t.setAttribute(Wt,n.id),n.setAttribute(Rt,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===d&&(m=void 0),null==h||h.removeAttribute("aria-activedescendant"),t.removeAttribute(Wt),null==e||e.removeAttribute(Rt),null==f||f(void 0,e,!1)}function y(...t){const n=t.filter((t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i}));if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}y(...vt(t));b("function"==typeof d?d(document.body):g());new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)t instanceof HTMLElement&&A(...vt(t));for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&y(...vt(t))})).observe(t,{subtree:!0,childList:!0});const k=new AbortController,L=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:k.signal;let T;L.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(T=a.indexOf(t.target))}),{signal:L}),h?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(h.focus({preventScroll:p}),b(t.target))})),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:L,capture:!0}),h.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())})),h.addEventListener("focusout",(()=>{w()}))):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==T)T>=0&&a[T]!==m&&b(a[T]),T=void 0;else if("previous"===d)b(e.target);else if("closest"===d||"first"===d){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof d)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=d(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0}),{signal:L});const M=null!=h?h:t;let x;return"closest"===d&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(x=Pt(t))}),{signal:L,capture:!0}),M.addEventListener("keydown",(n=>{var i;if(n.key in Ht){const o=Ot[n.key];if(!n.defaultPrevented&&(o&c)>0&&!function(t,e){const n=t.key,i=[...n].length,o=e instanceof HTMLInputElement&&"text"===e.type||e instanceof HTMLTextAreaElement;if(o&&(1===i||"Home"===n||"End"===n))return!0;if(e instanceof HTMLSelectElement){if(1===i)return!0;if("ArrowDown"===n&&Ct()&&!t.metaKey)return!0;if("ArrowDown"===n&&!Ct()&&t.altKey)return!0}if(e instanceof HTMLTextAreaElement&&("PageUp"===n||"PageDown"===n))return!0;if(o){const t=e,i=0===t.selectionStart&&0===t.selectionEnd,o=t.selectionStart===t.value.length&&t.selectionEnd===t.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!o)return!0;if(t instanceof HTMLTextAreaElement){if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!o)return!0}}return!1}(n,document.activeElement)){const o=Pt(n);let s;if((null==e?void 0:e.getNextFocusable)&&(s=e.getNextFocusable(o,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!s){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===o?i-=1:"start"===o?i=0:"next"===o?i+=1:i=a.length-1,i<0&&(i="wrap"===u&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===u&&"Tab"!==n.key?0:a.length-1),e!==i&&(s=a[i])}h?b(s||m,!0):s&&(x=o,s.focus({preventScroll:p})),("Tab"!==n.key||s)&&n.preventDefault()}}}),{signal:L}),k}var Ft,Nt,$t,Bt,jt,Kt,zt,Ut,Yt,Xt,Vt,Gt;const _t=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Zt&&t.update()}})),Jt=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Zt&&t.update(e.contentRect)}}));let Zt=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Ft.add(this),Nt.set(this,void 0),$t.set(this,void 0),Bt.set(this,null)}connectedCallback(){var t,e,n,i;U(this,$t,null!==(t=this.offsetWidth)&&void 0!==t?t:1/0,"f"),U(this,Nt,null!==(e=this.itemContainer.offsetWidth)&&void 0!==e?e:1/0,"f");for(const t of this.items){const e=t.getBoundingClientRect().width,o=parseInt(null===(n=window.getComputedStyle(t))||void 0===n?void 0:n.marginLeft,10),s=parseInt(null===(i=window.getComputedStyle(t))||void 0===i?void 0:i.marginRight,10);t.setAttribute("data-offset-width",`${e+o+s}`)}Jt.observe(this),_t.observe(this),setTimeout((()=>{this.style.overflow="visible",this.update()}),20)}disconnectedCallback(){Jt.unobserve(this),_t.unobserve(this)}menuItemClick(t){var e;const n=t.currentTarget,i=null==n?void 0:n.getAttribute("data-for");i&&(null===(e=document.getElementById(i))||void 0===e||e.click())}update(t=this.getBoundingClientRect()){t.width<=z(this,$t,"f")||0===z(this,$t,"f")?z(this,Ft,"m",Ut).call(this):t.width>z(this,$t,"f")&&z(this,Ft,"m",Yt).call(this),U(this,$t,t.width,"f"),t.width<=z(this,Nt,"f")?this.style.justifyContent="space-between":this.style.justifyContent="flex-end",z(this,Bt,"f")&&z(this,Bt,"f").abort(),U(this,Bt,qt(this,{bindKeys:It.ArrowHorizontal|It.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>!t.closest(".ActionBar-item[hidden]")&&!t.closest("li.ActionListItem")}),"f")}};Nt=new WeakMap,$t=new WeakMap,Bt=new WeakMap,Ft=new WeakSet,jt=function(){var t;return parseInt(null===(t=window.getComputedStyle(this.itemContainer))||void 0===t?void 0:t.columnGap,10)||0},Kt=function(){return this.offsetWidth-this.itemContainer.offsetWidth},zt=function(){return this.moreMenu.hidden?0:this.moreMenu.offsetWidth+z(this,Ft,"m",jt).call(this)},Ut=function(){if(this.items[0].hidden)return;let t=this.items.length-1;for(const e of this.items.reverse()){if(!e.hidden&&z(this,Ft,"m",Kt).call(this)<z(this,Ft,"m",zt).call(this))z(this,Ft,"m",Vt).call(this,t);else if(z(this,Ft,"m",Kt).call(this)>=z(this,Ft,"m",zt).call(this))return;t--}},Yt=function(){if(!this.items[this.items.length-1].hidden)return;let t=0;for(const e of this.items){if(e.hidden){const n=Number(e.getAttribute("data-offset-width"));if(!(z(this,Ft,"m",Kt).call(this)>=z(this,Ft,"m",zt).call(this)+n||t===this.items.length-1))return;z(this,Ft,"m",Xt).call(this,t)}t++}this.items[this.items.length-1].hidden||(this.moreMenu.hidden=!0)},Xt=function(t){this.items[t].hidden=!1,z(this,Ft,"a",Gt)[t].hidden=!0},Vt=function(t){this.items[t].hidden=!0,z(this,Ft,"a",Gt)[t].hidden=!1,this.moreMenu.hidden&&(this.moreMenu.hidden=!1)},Gt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},K([ct],Zt.prototype,"items",void 0),K([lt],Zt.prototype,"itemContainer",void 0),K([lt],Zt.prototype,"moreMenu",void 0),Zt=K([ut],Zt),window.ActionBarElement=Zt;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const n=[ee(t,"compositionstart",(t=>de(this,t))),ee(t,"compositionend",(t=>de(this,t))),ee(t,"click",(e=>ae(t,e))),ee(t,"change",(e=>ae(t,e))),ee(t,"keydown",(e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Qt.get(e);if(!i||i.isComposing)return;const o=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(ue(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{o&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=se(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{o&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=se(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if(re&&n.ctrlKey){const e=se(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if(re&&n.ctrlKey){const e=se(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&ce(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e))),ee(t,"toggle",(()=>ne(t,this)),{once:!0}),ee(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t))),this.preload?ee(t,"mouseover",(()=>ne(t,this)),{once:!0}):te,...ie(t)];Qt.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Qt.get(this);if(t){Qt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Qt=new WeakMap,te={unsubscribe(){}};function ee(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function ne(t,e){const n=e.getAttribute("src");if(!n)return;const i=Qt.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const o=e.querySelector("include-fragment");o&&!o.hasAttribute("src")&&(o.addEventListener("loadend",(()=>oe(t))),o.setAttribute("src",n))}function ie(t){let e=!1;return[ee(t,"mousedown",(()=>e=!0)),ee(t,"keydown",(()=>e=!1)),ee(t,"toggle",(()=>{t.hasAttribute("open")&&(oe(t)||e||function(t){const e=document.activeElement;if(e&&ce(e)&&t.contains(e))return;const n=se(t,!0);n&&n.focus()}(t))}))]}function oe(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function se(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,o=i instanceof HTMLElement?n.indexOf(i):-1,s=e?n[o+1]:n[o-1],r=e?n[0]:n[n.length-1];return s||r}const re=navigator.userAgent.match(/Macintosh/);function ae(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||le(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&le(e,t)}}function le(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&ue(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function ce(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function ue(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function de(t,e){const n=Qt.get(t);n&&(n.isComposing="compositionstart"===e.type)}var he,fe;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const me=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return o=>{window.addEventListener("resize",i),e||(e=new IntersectionObserver((e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),n||(n=new ResizeObserver((()=>{for(const e of t)e.update()}))),n.observe(o.ownerDocument.documentElement),e.observe(o)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),he.set(this,null),fe.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(z(this,he,"f"))return z(this,he,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){U(this,he,t,"f"),z(this,he,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),me(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(z(this,fe,"f")),U(this,fe,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=ft(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var pe,ge,be,ve;he=new WeakMap,fe=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));const we=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),ye=t=>{var e;return null===(e=t.textContent)||void 0===e?void 0:e.trim()[0].toLowerCase()},Ee=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),pe.add(this),ge.set(this,null),be.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){U(this,be,new AbortController,"f");const{signal:t}=z(this,be,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){var t;null===(t=z(this,be,"f"))||void 0===t||t.abort()}handleEvent(t){var e;const{direction:n,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(we)){null===(e=z(this,ge,"f"))||void 0===e||e.abort();const{signal:n}=U(this,ge,new AbortController,"f");for(const e of z(this,pe,"a",ve)){e.setAttribute("tabindex",e===t.target?"0":"-1");const i=t.target.closest("[popover]");e===t.target&&"auto"===(null==i?void 0:i.popover)&&i.closest("focus-group")===this&&i.addEventListener("toggle",(t=>{var n,o;if(t.target instanceof Element&&"closed"===t.newState&&(null===(n=z(this,ge,"f"))||void 0===n||n.abort(),e.setAttribute("tabindex","-1"),i.id)){const t=this.querySelector(`[popovertarget="${i.id}"]`);t?t.setAttribute("tabindex","0"):null===(o=z(this,pe,"a",ve)[0])||void 0===o||o.setAttribute("tabindex","0")}}),{signal:n})}}}else if(t instanceof KeyboardEvent){const e=Array.from(z(this,pe,"a",ve));let o=e.indexOf(t.target);const s=t.key;if("Up"===s||"ArrowUp"===s)"vertical"!==n&&"both"!==n||(o-=o<0?0:1,t.preventDefault());else if("Down"===s||"ArrowDown"===s)"vertical"!==n&&"both"!==n||(o+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==n&&"both"!==n||(o-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==n&&"both"!==n||(o+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)o=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)o=e.length-1,t.preventDefault();else{if(!this.mnemonics||!Ee.test(s))return;{const n=s.toLowerCase(),r=o>0&&ye(t.target)===n?o:0;o=e.findIndex(((t,e)=>e>r&&ye(t)===n)),o<0&&!i&&(o=e.findIndex((t=>ye(t)===n)))}}i&&o<0&&(o=0),!i&&o>=e.length&&(o=0);const r=e.at(Math.min(o,e.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==(null==e?void 0:e.popover)||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=(null==e?void 0:e.parentElement)||null}while(e)}null==r||r.focus()}}}ge=new WeakMap,be=new WeakMap,pe=new WeakSet,ve=function(){return this.querySelectorAll(we)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));const Ae=new WeakMap,ke=new WeakMap,Le=new WeakMap;function Te(t){const e=t.currentTarget;if(!(e instanceof ImageCropElement))return;const{box:n,image:i}=Le.get(e)||{};if(!n||!i)return;let o=0,s=0;if(t instanceof KeyboardEvent)"ArrowUp"===t.key?s=-1:"ArrowDown"===t.key?s=1:"ArrowLeft"===t.key?o=-1:"ArrowRight"===t.key&&(o=1);else if(ke.has(e)&&t instanceof MouseEvent){const n=ke.get(e);o=t.pageX-n.dragStartX,s=t.pageY-n.dragStartY}else if(ke.has(e)&&t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0],{dragStartX:r,dragStartY:a}=ke.get(e);o=n-r,s=i-a}if(0!==o||0!==s){const t=Math.min(Math.max(0,n.offsetLeft+o),i.width-n.offsetWidth),r=Math.min(Math.max(0,n.offsetTop+s),i.height-n.offsetHeight);n.style.left=`${t}px`,n.style.top=`${r}px`,Oe(e,{x:t,y:r,width:n.offsetWidth,height:n.offsetHeight})}if(t instanceof MouseEvent)ke.set(e,{dragStartX:t.pageX,dragStartY:t.pageY});else if(t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0];ke.set(e,{dragStartX:n,dragStartY:i})}}function Me(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=xe(e);if(!(n instanceof ImageCropElement))return;const{box:i}=Le.get(n)||{};if(!i)return;const o=n.getBoundingClientRect();let s,r,a;if(t instanceof KeyboardEvent){if("Escape"===t.key)return De(n);if("-"===t.key&&(a=-10),"="===t.key&&(a=10),!a)return;s=i.offsetWidth+a,r=i.offsetHeight+a,Ae.set(n,{startX:i.offsetLeft,startY:i.offsetTop})}else if(t instanceof MouseEvent){const e=Ae.get(n);if(!e)return;s=t.pageX-e.startX-o.left-window.pageXOffset,r=t.pageY-e.startY-o.top-window.pageYOffset}else if(t instanceof TouchEvent){const e=Ae.get(n);if(!e)return;s=t.changedTouches[0].pageX-e.startX-o.left-window.pageXOffset,r=t.changedTouches[0].pageY-e.startY-o.top-window.pageYOffset}s&&r&&Ce(n,s,r,!(t instanceof KeyboardEvent))}function xe(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.host:t}function Se(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const n=xe(e);if(!(n instanceof ImageCropElement))return;const{box:i}=Le.get(n)||{};if(!i)return;const o=t.target;if(o instanceof HTMLElement)if(o.hasAttribute("data-direction")){const e=o.getAttribute("data-direction")||"";n.addEventListener("mousemove",Me),n.addEventListener("touchmove",Me,{passive:!0}),["nw","se"].indexOf(e)>=0&&n.classList.add("nwse"),["ne","sw"].indexOf(e)>=0&&n.classList.add("nesw"),Ae.set(n,{startX:i.offsetLeft+(["se","ne"].indexOf(e)>=0?0:i.offsetWidth),startY:i.offsetTop+(["se","sw"].indexOf(e)>=0?0:i.offsetHeight)}),Me(t)}else n.addEventListener("mousemove",Te),n.addEventListener("touchmove",Te,{passive:!0})}function Ce(t,e,n,i=!0){let o=Math.max(Math.abs(e),Math.abs(n),10);const s=Ae.get(t);if(!s)return;const{box:r,image:a}=Le.get(t)||{};if(!r||!a)return;o=Math.min(o,n>0?a.height-s.startY:s.startY,e>0?a.width-s.startX:s.startX);const l=i?Math.round(Math.max(0,e>0?s.startX:s.startX-o)):r.offsetLeft,c=i?Math.round(Math.max(0,n>0?s.startY:s.startY-o)):r.offsetTop;r.style.left=`${l}px`,r.style.top=`${c}px`,r.style.width=`${o}px`,r.style.height=`${o}px`,Oe(t,{x:l,y:c,width:o,height:o})}function De(t){const{image:e}=Le.get(t)||{};if(!e)return;const n=Math.round(e.clientWidth>e.clientHeight?e.clientHeight:e.clientWidth);Ae.set(t,{startX:(e.clientWidth-n)/2,startY:(e.clientHeight-n)/2}),Ce(t,n,n)}function Ie(t){const e=t.currentTarget;e instanceof ImageCropElement&&(ke.delete(e),e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",Me),e.removeEventListener("mousemove",Te),e.removeEventListener("touchmove",Me),e.removeEventListener("touchmove",Te))}function Oe(t,e){const{image:n}=Le.get(t)||{};if(!n)return;const i=n.naturalWidth/n.width;for(const n in e){const o=Math.round(e[n]*i);e[n]=o;const s=t.querySelector(`[data-image-crop-input='${n}']`);s instanceof HTMLInputElement&&(s.value=o.toString())}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}class ImageCropElement extends HTMLElement{connectedCallback(){if(Le.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML='\n<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: \' \';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class="crop-wrapper">\n <img width="100%" class="crop-image" alt="">\n <div class="crop-container">\n <div data-crop-box class="crop-box">\n <div class="crop-outline"></div>\n <div data-direction="nw" class="handle nw"></div>\n <div data-direction="ne" class="handle ne"></div>\n <div data-direction="sw" class="handle sw"></div>\n <div data-direction="se" class="handle se"></div>\n </div>\n </div>\n</div>\n';const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const n=t.querySelector("img");n instanceof HTMLImageElement&&(Le.set(this,{box:e,image:n}),n.addEventListener("load",(()=>{this.loaded=!0,De(this)})),this.addEventListener("mouseleave",Ie),this.addEventListener("touchend",Ie),this.addEventListener("mouseup",Ie),e.addEventListener("mousedown",Se),e.addEventListener("touchstart",Se,{passive:!0}),this.addEventListener("keydown",Te),this.addEventListener("keydown",Me),this.src&&(n.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,n){const{image:i}=Le.get(this)||{};"src"===t&&(this.loaded=!1,i&&(i.src=n))}}var He,Pe,Re,We;function qe(t){document.activeElement!==t&&(null==t||t.focus())}window.customElements.get("image-crop")||(window.ImageCropElement=ImageCropElement,window.customElements.define("image-crop",ImageCropElement));const Fe=[];function Ne(t){const e=t.target,n=null==e?void 0:e.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=null==n?void 0:n.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}const o=Fe[Fe.length-1];o&&(i=n.getAttribute("data-close-dialog-id"),i===o.id&&(Fe.pop(),o.close()),i=n.getAttribute("data-submit-dialog-id"),i===o.id&&(Fe.pop(),o.close(!0)))}function $e(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ne(t)}function Be(t){const e=t.target;if(null==e?void 0:e.closest("button"))return;const n=Fe[Fe.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(Fe.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),He.add(this),Pe.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){var e,n,i,o;if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",null===(e=z(this,He,"a",Re))||void 0===e||e.classList.remove("Overlay--hidden"),z(this,Pe,"f").signal.aborted&&U(this,Pe,new AbortController,"f"),St(this,void 0,z(this,Pe,"f").signal),Fe.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),null===(n=z(this,He,"a",Re))||void 0===n||n.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",z(this,Pe,"f").abort();const t=(null===(i=this.openButton)||void 0===i?void 0:i.closest("details"))||(null===(o=this.openButton)||void 0===o?void 0:o.closest("action-menu"));qe(t?wt(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ne),document.addEventListener("keydown",$e),document.addEventListener("mousedown",Be),this.addEventListener("keydown",(t=>z(this,He,"m",We).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var je,Ke,ze,Ue,Ye,Xe,Ve,Ge;Pe=new WeakMap,He=new WeakSet,Re=function(){var t;return(null===(t=this.parentElement)||void 0===t?void 0:t.hasAttribute("data-modal-dialog-overlay"))?this.parentElement:null},We=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let _e=class NavListElement extends HTMLElement{constructor(){super(...arguments),je.add(this)}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}selectItemById(t){if(!t)return!1;const e=z(this,je,"m",ze).call(this,t);return!!e&&(z(this,je,"m",Xe).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=z(this,je,"m",Ue).call(this,t);return!!e&&(z(this,je,"m",Xe).call(this,e),!0)}selectItemByCurrentLocation(){const t=z(this,je,"m",Ye).call(this);return!!t&&(z(this,je,"m",Xe).call(this,t),!0)}expandItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===(null==t?void 0:t.tagName)||"true"===(null==t?void 0:t.getAttribute("aria-expanded"))}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}async showMore(t){var e,n;if(t.preventDefault(),this.showMoreDisabled)return;let i;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const e=await fetch(t);if(!e.ok)return;i=await e.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const o=z(this,je,"m",Ke).call(this,document,i);null===(e=null==o?void 0:o.querySelector("li > a"))||void 0===e||e.setAttribute("data-targets","nav-list.focusMarkers");const s=t.target.closest("button").getAttribute("data-list-id");document.getElementById(s).append(o),null===(n=this.focusMarkers.pop())||void 0===n||n.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var Je,Ze;je=new WeakSet,Ke=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},ze=function(t){var e;for(const n of this.items){if(n.classList.contains("ActionListItem--hasSubItem"))continue;if(((null===(e=n.getAttribute("data-item-id"))||void 0===e?void 0:e.split(" "))||[]).includes(t))return n}return null},Ue=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},Ye=function(){return z(this,je,"m",Ue).call(this,window.location.pathname)},Xe=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&z(this,je,"m",Ve).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=z(this,je,"m",Ge).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},Ve=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=z(this,je,"m",Ge).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},Ge=function(t){var e;if(!t.classList.contains("ActionListItem--subItem"))return null;const n=null===(e=t.closest("li.ActionListItem--hasSubItem"))||void 0===e?void 0:e.querySelector("button.ActionListContent");return n||null},K([ct],_e.prototype,"items",void 0),K([lt],_e.prototype,"showMoreItem",void 0),K([ct],_e.prototype,"focusMarkers",void 0),_e=K([ut],_e);let Qe=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),Je.add(this)}connectedCallback(){z(this,Je,"m",Ze).call(this)}select(t){var e,n;const i=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),null===(e=t.querySelector("[aria-current]"))||void 0===e||e.setAttribute("aria-current","false");null===(n=i.closest("li.SegmentedControl-item"))||void 0===n||n.classList.add("SegmentedControl-item--selected"),i.setAttribute("aria-current","true")}};Je=new WeakSet,Ze=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},K([ct],Qe.prototype,"items",void 0),Qe=K([ut],Qe),window.customElements.get("segmented-control")||(window.SegmentedControlElement=Qe,window.customElements.define("segmented-control",Qe));let tn=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:{"Requested-With":"XMLHttpRequest"},body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text())}};var en,nn,on,sn,rn,an,ln,cn,un;K([lt],tn.prototype,"switch",void 0),K([lt],tn.prototype,"loadingSpinner",void 0),K([lt],tn.prototype,"errorIcon",void 0),tn=K([ut],tn),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=tn,window.customElements.define("toggle-switch",tn));const dn=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch(n){try{return t=":open",e.matches(":open")}catch(n){return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),hn="sr-only",fn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function mn(t){for(const e of bn)e!==t&&(dn(e)?e.hidePopover():bn.delete(e))}function pn(){mn()}const gn=new Set,bn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),en.add(this),nn.set(this,void 0),on.set(this,"center"),sn.set(this,"outside-bottom"),rn.set(this,!1)}styles(){return'\n :host {\n padding: .5em .75em !important;\n font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--color-fg-on-emphasis) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--color-neutral-emphasis-plus) !important;\n border-radius: 6px;\n border: 0 !important;\n opacity: 0;\n max-width: 250px;\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tool-tip-position-top, 0) auto auto var(--tool-tip-position-left, 0) !important;\n overflow: visible !important;\n }\n\n :host:before{\n position: absolute;\n z-index: 1000001;\n color: var(--color-neutral-emphasis-plus);\n content: "";\n border: 6px solid transparent;\n opacity: 0\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1\n }\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: 12px;\n content: ""\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n\n :host(.\\:popover-open),\n :host(.\\:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-n):before {\n right: 50%;\n margin-right: -6px;\n }\n\n :host(.tooltip-s):before,\n :host(.tooltip-se):before,\n :host(.tooltip-sw):before {\n bottom: 100%;\n border-bottom-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):before,\n :host(.tooltip-ne):before,\n :host(.tooltip-nw):before {\n top: 100%;\n border-top-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%\n }\n\n :host(.tooltip-se):before,\n :host(.tooltip-ne):before {\n left: 0;\n margin-left: 6px;\n }\n\n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: 6px;\n }\n\n :host(.tooltip-w):before {\n top: 50%;\n bottom: 50%;\n left: 100%;\n margin-top: -6px;\n border-left-color: var(--color-neutral-emphasis-plus)\n }\n\n :host(.tooltip-e):before {\n top: 50%;\n right: 100%;\n bottom: 50%;\n margin-top: -6px;\n border-right-color: var(--color-neutral-emphasis-plus)\n }\n '}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&dn(this)?this.hidePopover():t||dn(this)||this.showPopover()}get hiddenFromView(){return!dn(this)}connectedCallback(){var t,e;if(gn.add(this),z(this,en,"m",ln).call(this),z(this,en,"m",cn).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(z(this,en,"m",an).call(this,!1),U(this,rn,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),null===(t=z(this,nn,"f"))||void 0===t||t.abort(),U(this,nn,new AbortController,"f");const{signal:n}=z(this,nn,"f");this.addEventListener("mouseleave",this,{signal:n}),this.addEventListener("toggle",this,{signal:n}),this.control.addEventListener("mouseenter",this,{signal:n}),this.control.addEventListener("mouseleave",this,{signal:n}),this.control.addEventListener("focus",this,{signal:n}),this.control.addEventListener("mousedown",this,{signal:n}),null===(e=this.control.popoverTargetElement)||void 0===e||e.addEventListener("beforetoggle",this,{signal:n}),this.ownerDocument.addEventListener("focusout",pn),this.ownerDocument.addEventListener("keydown",this,{signal:n})}disconnectedCallback(){var t;gn.delete(this),bn.delete(this),null===(t=z(this,nn,"f"))||void 0===t||t.abort()}async handleEvent(t){if(!this.control)return;const e=dn(this),n="mouseenter"===t.type||"focus"===t.type,i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,o="keydown"===t.type&&"Escape"===t.key,s="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||o||s||r;await Promise.resolve(),e||!n||dn(this)?e&&a&&dn(this)&&this.hidePopover():this.showPopover(),"toggle"===t.type&&z(this,en,"m",an).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?z(this,en,"m",ln).call(this):"data-direction"===t&&z(this,en,"m",cn).call(this))}}var vn,wn;nn=new WeakMap,on=new WeakMap,sn=new WeakMap,rn=new WeakMap,en=new WeakSet,an=function(t){t?(bn.add(this),this.classList.remove(hn),mn(this),z(this,en,"m",un).call(this)):(bn.delete(this),this.classList.remove(...fn),this.classList.add(hn))},ln=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},cn=function(){this.classList.remove(...fn);const t=this.direction;"n"===t?(U(this,on,"center","f"),U(this,sn,"outside-top","f")):"ne"===t?(U(this,on,"start","f"),U(this,sn,"outside-top","f")):"e"===t?(U(this,on,"center","f"),U(this,sn,"outside-right","f")):"se"===t?(U(this,on,"start","f"),U(this,sn,"outside-bottom","f")):"s"===t?(U(this,on,"center","f"),U(this,sn,"outside-bottom","f")):"sw"===t?(U(this,on,"end","f"),U(this,sn,"outside-bottom","f")):"w"===t?(U(this,on,"center","f"),U(this,sn,"outside-left","f")):"nw"===t&&(U(this,on,"end","f"),U(this,sn,"outside-top","f"))},un=function(){if(!this.control)return;if(!z(this,rn,"f")||!dn(this))return;const t=ft(this,this.control,{side:z(this,sn,"f"),align:z(this,on,"f"),anchorOffset:10}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let yn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),vn.add(this)}dismiss(){const t=this.parentElement;t&&("remove"===z(this,vn,"a",wn)?t.removeChild(this):this.hide())}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};vn=new WeakSet,wn=function(){return this.getAttribute("data-dismiss-scheme")},K([lt],yn.prototype,"titleText",void 0),yn=K([ut],yn),window.customElements.get("x-banner")||(window.XBannerElement=yn,window.customElements.define("x-banner",yn));class En{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":kn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&kn(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.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",An),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",An)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Ln)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Ln)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Ln),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let o=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(o=e)}const s=n[o];if(s)for(const t of n)t.removeAttribute("data-combobox-option-default"),s===t?(this.input.setAttribute("aria-activedescendant",s.id),s.setAttribute("aria-selected","true"),Tn(this.list,s)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function An(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function kn(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Ln(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Tn(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,o=e.offsetTop,s=o+e.clientHeight;return o>=n&&s<=i})(t,e)||(t.scrollTop=e.offsetTop)}const Mn=window.testScreenReaderDelay||100;class xn{constructor(t,e,n,i=!1){var o;if(this.container=t,this.input=e,this.results=n,this.combobox=new En(e,n,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(o=this.clearButton)||void 0===o||o.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.container.open=!1}onKeydown(t){if("Escape"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.container.open=!0,t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.fetchResults()}onInputBlur(){this.interactingWithList?this.interactingWithList=!1:this.container.open=!1}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.container.open=!1,e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),Mn)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void(this.container.open=!1);const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[o]=e,s=null==o?void 0:o.textContent;this.autoselectEnabled&&s?this.updateFeedbackForScreenReaders(`${i} results. ${s} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),this.container.open=n,this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){this.results.hidden&&(this.combobox.start(),this.results.hidden=!1)}close(){this.results.hidden||(this.combobox.stop(),this.results.hidden=!0)}}var Sn,Cn,Dn,In,On,Hn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Pn=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},Rn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};const Wn=globalThis.HTMLElement||null;class qn extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Rn(e,["relatedTarget"])),this.relatedTarget=n}}const Fn=new WeakMap;let Nn=null;class AutoCompleteElement extends Wn{constructor(){super(...arguments),Sn.add(this),Cn.set(this,null),Dn.set(this,null),On.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Nn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Hn(this,Cn,"f"))||void 0===t?void 0:t.isConnected)return Hn(this,Cn,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){Pn(this,Cn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Hn(this,Dn,"f"))||void 0===t?void 0:t.isConnected)?Hn(this,Dn,"f"):this.querySelector("input")}set inputElement(t){Pn(this,Dn,t,"f"),Hn(this,Sn,"m",In).call(this)}connectedCallback(){this.isConnected&&Hn(this,Sn,"m",In).call(this)}disconnectedCallback(){const t=Fn.get(this);t&&(t.destroy(),Fn.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=Hn(this,On,"f"))||void 0===e||e.abort();const{signal:n}=Pn(this,On,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(Nn){return(await Nn).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,o;if(e===n)return;const s=Fn.get(this);if(s)switch(this.forElement===(null===(i=Fn.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(o=Fn.get(this))||void 0===o?void 0:o.input)||Hn(this,Sn,"m",In).call(this),t){case"open":null===n?s.close():s.open();break;case"value":null!==n&&(s.input.value=n),this.dispatchEvent(new qn("auto-complete-change",{bubbles:!0,relatedTarget:s.input}))}}}Cn=new WeakMap,Dn=new WeakMap,On=new WeakMap,Sn=new WeakSet,In=function(){var t;null===(t=Fn.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");Fn.set(this,new xn(this,n,e,i)),e.setAttribute("role","listbox")};const $n="undefined"!=typeof globalThis?globalThis:window;try{$n.AutocompleteElement=$n.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!($n.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Bn(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function jn(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),Bn(n),e.removeChild(n),Promise.resolve()}async function Kn(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var o;if("true"!==t.getAttribute("aria-disabled"))if(n)await jn(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const s=n.getElementById(e);s&&(await(o=s,o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement?jn(o.value):o instanceof HTMLAnchorElement&&o.hasAttribute("href")?jn(o.href):Bn(o)),i())}}function zn(t){const e=t.currentTarget;e instanceof HTMLElement&&Kn(e)}function Un(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),Kn(e))}}function Yn(t){t.currentTarget.addEventListener("keydown",Un)}function Xn(t){t.currentTarget.removeEventListener("keydown",Un)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",zn),this.addEventListener("focus",Yn),this.addEventListener("blur",Xn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const Vn="undefined"!=typeof globalThis?globalThis:window;try{Vn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(Vn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Gn(t){t.style.display="inline-block"}function _n(t){t.style.display="none"}const Jn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=Jn.get(t);e?(clearTimeout(e),Jn.delete(t)):function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(_n(e),Gn(n))}(t),Jn.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(Gn(e),_n(n))}(t),Jn.delete(t)}),2e3))}));var Zn,Qn=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n},ti=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const ei="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ni=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],ii={minimumIntegerDigits:2};class oi{constructor(t,e={}){Zn.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const o=e.hours||i;i="2-digit"===o?"numeric":o;const s=e.minutes||i;i="2-digit"===s?"numeric":s;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;Qn(this,Zn,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:o,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:s,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return ti(this,Zn,"f")}formatToParts(t){const e=[],n=ti(this,Zn,"f"),i=n.style,o=n.locale;for(const[i,s]of ni){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?ii:"numeric"===a?{}:{style:"unit",unit:s,unitDisplay:a};e.push(new Intl.NumberFormat(o,l).format(r))}return new ei(o,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}Zn=new WeakMap;const si=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,ri=["year","month","week","day","hour","minute","second","millisecond"];class ai{constructor(t=0,e=0,n=0,i=0,o=0,s=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=o,this.minutes=s,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new ai(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,o=null===(e=n.match(si))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return o?new ai(...o):new ai}if("object"==typeof t){const{years:e,months:n,weeks:i,days:o,hours:s,minutes:r,seconds:a,milliseconds:l}=t;return new ai(e,n,i,o,s,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(li(n,ai.from(t)).getTime()-n),o=Math.abs(li(n,ai.from(e)).getTime()-n);return i>o?-1:i<o?1:0}toLocaleString(t,e){return new oi(t,e).format(this)}}function li(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}function ci(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),o=Math.abs(t.months),s=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),u=Math.abs(t.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||r||s||o||i)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||s||o||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||s||o||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||s||o||i)&&(a=0);const d=e.getFullYear();let h=e.getMonth();const f=e.getDate();return(r>=27||i+o&&r)&&(e.setDate(f+r*n),o+=Math.abs(e.getFullYear()>=d?e.getMonth()-h:e.getMonth()-h-12),o&&(r=0),h=e.getMonth()),r>=6&&(s+=Math.round(r/7)),(s||o||i)&&(r=0),s>=4&&(o+=Math.round(s/4)),(o||i)&&(s=0),(o>=11||i&&o)&&(e.setMonth(e.getMonth()+o*n),i+=Math.abs(d-e.getFullYear())),i&&(o=0),new ai(i*n,o*n,s*n,r*n,a*n,l*n,c*n,u*n)}var ui,di,hi,fi,mi,pi,gi,bi,vi,wi,yi,Ei=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ai=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const ki=globalThis.HTMLElement||null,Li=new ai,Ti=new ai(0,0,0,0,0,1);class Mi extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function xi(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Si=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=xi(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,xi(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends ki{constructor(){super(...arguments),ui.add(this),di.set(this,!1),hi.set(this,!1),mi.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),yi.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","datetime","lang","title"]}get onRelativeTimeUpdated(){return Ei(this,yi,"f")}set onRelativeTimeUpdated(t){Ei(this,yi,"f")&&this.removeEventListener("relative-time-updated",Ei(this,yi,"f")),Ai(this,yi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,si.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return ri.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Si.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&Ai(this,di,null!==n&&(this.date&&Ei(this,ui,"m",pi).call(this,this.date))!==n,"f"),Ei(this,hi,"f")||"title"===t&&Ei(this,di,"f")||Ai(this,hi,(async()=>{await Promise.resolve(),this.update()})(),"f"))}update(){const t=Ei(this,mi,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ei(this,mi,"f").textContent=t);const o=Date.now();Ei(this,di,"f")||(n=Ei(this,ui,"m",pi).call(this,i)||"",n&&this.setAttribute("title",n));const s=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new ai;const o=Math.sign(i),s=Math.abs(i),r=Math.floor(s/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=ri.indexOf(e)||ri.length;return new ai(h>=0?d*o:0,h>=1?(u-12*d)*o:0,0,h>=3?(c-30*u)*o:0,h>=4?(l-24*c)*o:0,h>=5?(a-60*l)*o:0,h>=6?(r-60*a)*o:0,h>=7?(s-1e3*r)*o:0)}(i,this.precision,o),r=Ei(this,ui,"m",gi).call(this,s);let a=t;a="duration"===r?Ei(this,ui,"m",bi).call(this,s):"relative"===r?Ei(this,ui,"m",vi).call(this,s):Ei(this,ui,"m",wi).call(this,i),a?Ei(this,mi,"f").textContent=a:this.shadowRoot===Ei(this,mi,"f")&&this.textContent&&(Ei(this,mi,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new Mi(t,a,e,n)),"relative"===r||"duration"===r?Si.observe(this):Si.unobserve(this),Ai(this,hi,!1,"f")}}di=new WeakMap,hi=new WeakMap,mi=new WeakMap,yi=new WeakMap,ui=new WeakSet,fi=function(){var t;return(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},pi=function(t){return new Intl.DateTimeFormat(Ei(this,ui,"a",fi),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},gi=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===ai.compare(t,this.threshold))return"relative"}return"datetime"},bi=function(t){const e=Ei(this,ui,"a",fi),n=this.format,i=this.formatStyle,o=this.tense;let s=Li;"micro"===n?(t=ci(t),s=Ti,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Ti)):("past"===o&&-1!==t.sign||"future"===o&&1!==t.sign)&&(t=s);const r=`${this.precision}sDisplay`;return t.blank?s.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},vi=function(t){const e=new Intl.RelativeTimeFormat(Ei(this,ui,"a",fi),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Li),"past"===n&&-1!==t.sign&&(t=Li);const[i,o]=function(t,e){const n=ci(t,e);if(n.blank)return[0,"second"];for(const t of ri){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===o&&i<10?e.format(0,"second"):e.format(i,o)},wi=function(t){const e=new Intl.DateTimeFormat(Ei(this,ui,"a",fi),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const Ci="undefined"!=typeof globalThis?globalThis:window;try{Ci.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Ci.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Di(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const n=t.target;if(!(n instanceof HTMLElement))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=Di(this),o=i.indexOf(i.find((t=>t.matches('[aria-selected="true"]')))),[s,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(s.some((e=>t.code===e))){let t=o+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=o-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Di(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}));for(const t of Di(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Di(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],o=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:o}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),o.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:o}}))}}}const Ii="undefined"!=typeof globalThis?globalThis:window;try{Ii.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Ii.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let Oi=class PrimerMultiInputElement extends HTMLElement{activateField(t){var e,n;const i=this.findField(t);if(i){for(const t of this.fields)t!==i&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),null===(e=t.parentElement)||void 0===e||e.setAttribute("hidden","hidden"));i.removeAttribute("disabled"),i.removeAttribute("hidden"),null===(n=i.parentElement)||void 0===n||n.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Hi(t,e=0,{start:n=!1,middle:i=!1,once:o=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:o=!1}={}){let s,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),o&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(s),s=setTimeout((()=>{r=Date.now(),t.apply(this,c),o&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(s),a=!0},l}(t,e,{start:n,middle:i,once:o})}K([ct],Oi.prototype,"fields",void 0),Oi=K([ut],Oi),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:Oi}),window.customElements.define("primer-multi-input",Oi));var Pi,Ri=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Wi=function(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n};const qi=new WeakMap;class Fi extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class Ni extends Fi{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class $i extends Fi{constructor(){super("complete")}}class Bi extends Fi{constructor(t){super("success"),this.response=t}}class ji extends Ni{constructor(){super("start","Verifying…")}}class Ki extends Ni{constructor(t){super("error","Validation failed"),this.response=t}}class zi extends Fi{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),Pi.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Ri(this,Pi,"f")}set onloadend(t){Ri(this,Pi,"f")&&this.removeEventListener("loadend",Ri(this,Pi,"f")),Wi(this,Pi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Hi(Yi.bind(null,this),300),n={check:e,controller:null};qi.set(this,n),t.addEventListener("input",Ui),t.addEventListener("input",e),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=qi.get(this);e&&(qi.delete(this),t.removeEventListener("input",Ui),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}}function Ui(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,o=n.csrf,s=qi.get(n);if(!i||!o||!s)return;const r=new ji;e.dispatchEvent(r),n.required&&e.setCustomValidity(r.message)}async function Yi(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,o=t.csrf,s=qi.get(t);if(!i||!o||!s)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const r=new FormData;r.append(n,o),r.append("value",e.value),e.dispatchEvent(new zi(r)),s.controller?s.controller.abort():t.dispatchEvent(new Event("loadstart")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};try{const n=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,i,{credentials:"same-origin",signal:s.controller.signal,method:"POST",body:r});if(n.ok)t.required&&e.setCustomValidity(""),e.dispatchEvent(new Bi(n.clone()));else{const i=new Ki(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}s.controller=null,e.dispatchEvent(new $i)}catch(t){"AbortError"!==t.name&&(s.controller=null,e.dispatchEvent(new $i))}}Pi=new WeakMap;const Xi="undefined"!=typeof globalThis?globalThis:window;try{Xi.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(Xi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var Vi;let Gi=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),Vi.set(this,void 0)}connectedCallback(){var t;null===(t=z(this,Vi,"f"))||void 0===t||t.abort();const{signal:e}=U(this,Vi,new AbortController,"f");this.inputElement.addEventListener("auto-check-success",(()=>{this.clearError()}),{signal:e}),this.inputElement.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:e})}disconnectedCallback(){var t;null===(t=z(this,Vi,"f"))||void 0===t||t.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus()}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.textContent=""}setError(t){this.validationMessageElement.textContent=t,this.validationElement.hidden=!1,this.inputElement.setAttribute("invalid","true")}};Vi=new WeakMap,K([lt],Gi.prototype,"inputElement",void 0),K([lt],Gi.prototype,"validationElement",void 0),K([lt],Gi.prototype,"validationMessageElement",void 0),Gi=K([ut],Gi);let _i=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var Ji,Zi,Qi,to,eo,no,io,oo,so,ro,ao,lo,co,uo,ho,fo,mo,po,go,bo,vo,wo,yo;K([lt],_i.prototype,"validationElement",void 0),K([lt],_i.prototype,"validationMessageElement",void 0),_i=K([ut],_i);const Eo=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'].map((t=>`:not([hidden]) > ${t}`));let Ao=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Ji.add(this),Zi.set(this,void 0),Qi.set(this,""),to.set(this,""),eo.set(this,!1)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){var t;return(null===(t=this.invokerElement)||void 0===t?void 0:t.popoverTargetElement)||null}get invokerElement(){var t;const e=null===(t=this.querySelector("[role=menu]"))||void 0===t?void 0:t.id;if(!e)return null;for(const t of this.querySelectorAll("[aria-controls]"))if(t.getAttribute("aria-controls")===e)return t;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:null==t?void 0:t.textContent,value:null==n?void 0:n.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=U(this,Zi,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),z(this,Ji,"m",bo).call(this),z(this,Ji,"m",vo).call(this),z(this,Ji,"m",no).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t})}disconnectedCallback(){z(this,Zi,"f").abort()}handleEvent(t){var e,n,i;const o=null===(e=this.invokerElement)||void 0===e?void 0:e.contains(t.target),s=z(this,Ji,"m",ro).call(this,t);if(o&&"mousedown"===t.type)return void U(this,eo,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(o&&s)return z(this,Ji,"m",ao).call(this,t),void U(this,eo,!1,"f");if((null===(n=t.target)||void 0===n?void 0:n.closest("dialog"))||(null===(i=t.target)||void 0===i?void 0:i.closest("modal-dialog")))return;if("focusout"===t.type){if(z(this,eo,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||z(this,Ji,"m",fo).call(this)}))}const r=t.target.closest(Eo.join(","));if(null!==r&&s){const e=r.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void z(this,Ji,"m",lo).call(this,t,n)}return z(this,Ji,"m",uo).call(this,t,r),void z(this,Ji,"m",co).call(this,t,r)}"include-fragment-replaced"===t.type&&z(this,Ji,"m",ho).call(this)}};Zi=new WeakMap,Qi=new WeakMap,to=new WeakMap,eo=new WeakMap,Ji=new WeakSet,no=function(){const{signal:t}=z(this,Zi,"f");for(const e of z(this,Ji,"a",yo))e.addEventListener("click",z(this,Ji,"m",io).bind(this),{signal:t}),e.addEventListener("keydown",z(this,Ji,"m",io).bind(this),{signal:t})},io=function(t){if(!z(this,Ji,"m",ro).call(this,t))return;const e=t.target.closest(Eo.join(","));e&&e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())},oo=function(t){return t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&("Enter"===t.key||" "===t.key)},so=function(t){return t instanceof MouseEvent&&"click"===t.type},ro=function(t){return z(this,Ji,"m",so).call(this,t)||z(this,Ji,"m",oo).call(this,t)},ao=function(t){var e;t.preventDefault(),t.stopPropagation(),z(this,Ji,"m",go).call(this)?z(this,Ji,"m",po).call(this):(z(this,Ji,"m",mo).call(this),null===(e=z(this,Ji,"a",wo))||void 0===e||e.focus())},lo=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,o=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",z(this,Ji,"m",go).call(this)&&z(this,Ji,"m",po).call(this)};e.addEventListener("close",o,{signal:i}),e.addEventListener("cancel",o,{signal:i})},co=function(t,e){if("multiple"!==this.selectVariant&&setTimeout((()=>{z(this,Ji,"m",go).call(this)&&z(this,Ji,"m",po).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const n="true"!==e.getAttribute("aria-checked");if("single"===this.selectVariant){n&&e.setAttribute("aria-checked","true");for(const t of this.querySelectorAll("[aria-checked]"))t!==e&&t.setAttribute("aria-checked","false");z(this,Ji,"m",bo).call(this)}else e.setAttribute("aria-checked",`${n}`);z(this,Ji,"m",vo).call(this),t instanceof KeyboardEvent&&t.target instanceof HTMLButtonElement&&t.preventDefault()},uo=function(t,e){if(t instanceof MouseEvent&&"click"===t.type||t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&"Enter"===t.key)return;t.stopPropagation();e.click()},ho=function(){z(this,Ji,"a",wo)&&z(this,Ji,"a",wo).focus(),z(this,Ji,"m",no).call(this)},fo=function(){z(this,Ji,"m",po).call(this)},mo=function(){var t;null===(t=this.popoverElement)||void 0===t||t.showPopover()},po=function(){var t;null===(t=this.popoverElement)||void 0===t||t.hidePopover()},go=function(){var t;return null===(t=this.popoverElement)||void 0===t?void 0:t.matches(":popover-open")},bo=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;U(this,Qi,z(this,Qi,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=z(this,Qi,"f")},vo=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&U(this,to,z(this,to,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=z(this,to,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},wo=function(){return this.querySelector(Eo.join(","))},yo=function(){return Array.from(this.querySelectorAll(Eo.join(",")))},K([lt],Ao.prototype,"includeFragment",void 0),Ao=K([ut],Ao),window.customElements.get("action-menu")||(window.ActionMenuElement=Ao,window.customElements.define("action-menu",Ao))}();
|
2
2
|
//# sourceMappingURL=primer_view_components.js.map
|