performance.mark("js-parse-end:marketplace-d09139b27f78bec5.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["37801"],{67891(e,t,n){var r=n(51729),i=n(21403),a=n(21744),o=n(63557),l=n(40893),s=n(46131),c=n(49481);function u(e){e.closest(".js-marketplace-listing-form-container").querySelector(".js-marketplace-listing-error-container").hidden=!0}function d(e,t){let n=e.closest(".js-marketplace-listing-form-container").querySelector(".js-marketplace-listing-error-container");n.hidden=!1;let r=n.querySelector(".js-marketplace-listing-error");r.textContent=t,(0,c.C)(r,{assertive:!0})}function p(e){let t=e.querySelector(".js-marketplace-listing-save-notice");t&&(t.classList.add("visible"),setTimeout(()=>t.classList.remove("visible"),1500))}function m(e,t){for(let n of e.closest(".js-marketplace-listing-form-container").querySelectorAll(".js-marketplace-listing-bgcolor"))n instanceof HTMLElement&&(n.style.backgroundColor=`#${t}`)}function f(e){let t=document.querySelector(".js-hero-listing-container .js-hero-listing-bgcolor");t instanceof HTMLElement&&(t.style.backgroundColor=`#${e}`)}function h(e,t,n){let i=n.closest(".js-listing-characters-remaining-container").querySelector(".js-listing-characters-remaining"),a=String(i.getAttribute("data-suffix")),o=t-(0,r.bV)(e);i.textContent=`${o} ${a}`,i.classList.toggle("color-fg-danger",o<=5),o<=5&&(0,c.C)(i,{assertive:!0})}function g(e){let t=e.item,n=t.querySelector(".js-marketplace-listing-screenshot-resequence-form"),r=n.elements.namedItem("marketplace_listing_screenshot[previousScreenshotId]"),i=t.previousElementSibling;i instanceof HTMLElement?r.value=i.getAttribute("data-screenshot-id"):r.value="",(0,s.k_)(n)}function y(e){return["FLAT_RATE","PER_UNIT"].includes(e)}function v(e){return"PER_UNIT"===e}function b(e,t){for(let n of e)n.disabled=!t}(0,o.eC)(".js-marketplace-short-description-field",function(e){let t=e.target,n=t.closest(".form-group");t.validity.patternMismatch?n.classList.add("errored"):n.classList.remove("errored")}),(0,a.on)("change",".js-marketplace-listing-light-text",function(e){var t;let n;t=e.target.value,(n=document.querySelector(".js-hero-listing-name"))&&("true"===t?(n.classList.add("color-text-white"),n.classList.remove("color-fg-default")):(n.classList.remove("color-text-white"),n.classList.add("color-fg-default")))}),(0,a.on)("change",".js-marketplace-listing-logo-background-color",function(e){let t=e.target;m(t.closest("form"),t.value),f(t.value)}),(0,l.JW)(".js-marketplace-listing-form",async function(e,t){var n;let r,i;u(e);try{r=await t.json()}catch(t){if(!t.response)throw t;d(e,t.response.json.error);return}if(r.json.path){let e=window.location.pathname,t=r.json.path;if(e!==t){window.location.href=t;return}}r.json.bgcolor&&(m(e,r.json.bgcolor),f(r.json.bgcolor)),r.json.short_description&&(n=r.json.short_description,(i=document.querySelector(".js-hero-listing-description"))&&(i.textContent=n)),p(e)}),(0,l.JW)(".js-marketplace-listing-screenshot-update-form",async function(e,t){try{await t.text()}catch{let t;(t=e.querySelector(".js-marketplace-listing-save-error"))&&(t.classList.add("visible"),setTimeout(()=>t.classList.remove("visible"),1500));return}let n=e.querySelector(".js-marketplace-listing-screenshot-caption-field"),r=e.querySelector(".js-marketplace-listing-screenshot-caption-present"),i=e.querySelector(".js-marketplace-listing-screenshot-caption-empty");r.textContent=n.value,n.value.trim().length<1?(r.classList.add("d-none"),i.classList.remove("d-none")):(r.classList.remove("d-none"),i.classList.add("d-none")),p(e)}),(0,l.JW)(".js-marketplace-listing-screenshot-delete-form",async function(e,t){u(e);let n=e.querySelector(".js-marketplace-listing-screenshot-delete-button");n.disabled=!0;try{await t.text()}catch(t){if(t.response){try{d(e,t.response.json.error)}catch{throw t}finally{n.disabled=!1}return}throw t}e.closest(".js-marketplace-listing-screenshot-container").remove()}),(0,o.eC)("textarea.js-listing-characters-remaining-field",function(e){let t=e.target,n=parseInt(t.getAttribute("data-character-limit")||"",10);h(t.value,n,t)}),(0,o.eC)("input.js-listing-characters-remaining-field",function(e){let t=e.target,n=t.maxLength;h(t.value,n,t)}),(0,a.on)("details-menu-selected",".js-languages-menu",function(e){let t=e.currentTarget.querySelectorAll('[role="menuitemcheckbox"][aria-checked="true"]');document.querySelector(".js-language-selection").textContent=Array.from(t).map(e=>(e.textContent||"").trim()).sort().join(", ")},{capture:!0}),(0,i.lB)(".js-draggable-screenshots-container",{async add(e){let{Sortable:t}=await Promise.all([n.e("86089"),n.e("45954")]).then(n.bind(n,27417));t.create(e,{animation:150,draggable:".js-draggable-screenshot",onUpdate:g})}}),(0,i.lB)(".js-listing-plan-option:checked",{constructor:HTMLInputElement,add(e){let t=e.value,n=e.closest(".js-marketplace-edit-plan-editor"),r=n.querySelectorAll(".js-marketplace-plan-price-field-group"),i=n.querySelectorAll(".js-marketplace-plan-free-trial-field-group"),a=n.querySelectorAll(".js-marketplace-plan-unit-field-group");(function(e){for(let t of document.querySelectorAll(".js-marketplace-plan-edit-unit"))t instanceof HTMLElement&&(t.hidden=!v(e));for(let t of document.querySelectorAll(".js-marketplace-plan-edit-price, .js-marketplace-plan-enable-free-trial"))t instanceof HTMLElement&&(t.hidden=!y(e))})(t),b(r,["FLAT_RATE","PER_UNIT"].includes(t)),b(i,y(t)),b(a,v(t)),n.querySelector(".js-marketplace-plan-unit-name-field").required=v(t)}}),(0,a.on)("click",".js-marketplace-plan-preview-toggle",function(e){let t=e.currentTarget.closest(".js-marketplace-edit-plan-container"),n=t.querySelector(".js-marketplace-plan-editor-toggle"),r=t.querySelector(".js-marketplace-edit-plan-editor"),i=t.querySelector(".js-marketplace-edit-plan-preview");i.classList.contains("d-none")&&(e.currentTarget.classList.add("selected"),n.classList.remove("selected"),i.classList.remove("d-none"),r.classList.add("d-none"),function(e,t){t.querySelector(".js-marketplace-plan-name").textContent=e.querySelector(".js-marketplace-plan-name-field").value;let n=t.querySelector(".js-marketplace-free-trial-container"),r=t.querySelector(".js-marketplace-no-trial-container"),i=t.querySelector(".js-marketplace-direct-billing-container");e.querySelector(".js-marketplace-free-trial-field").checked?(n.classList.remove("d-none"),i.classList.add("d-none"),r.classList.add("d-none")):(r.classList.remove("d-none"),n.classList.add("d-none"),i.classList.add("d-none"));let a=e.querySelector(".js-listing-plan-option:checked").value,o=t.querySelectorAll(".js-marketplace-plan-unit-name"),l=t.querySelector(".js-marketplace-plan-per-unit-info");if("PER_UNIT"===a){let t=e.querySelector(".js-marketplace-plan-unit-name-field").value;for(let e of o)e.textContent=t,e.classList.remove("d-none");l.classList.remove("d-none")}else{for(let e of o)e.classList.add("d-none");l.classList.add("d-none")}if("FREE"===a||"DIRECT_BILLING"===a)for(let e of t.querySelectorAll(".js-marketplace-plan-dollars-container"))e.classList.add("d-none");else{let n=t.querySelector(".js-marketplace-plan-monthly-dollars");n.textContent=e.querySelector(".js-marketplace-plan-monthly-price-field").value,n.closest(".js-marketplace-plan-dollars-container").classList.remove("d-none");let r=t.querySelector(".js-marketplace-plan-yearly-dollars");r.textContent=e.querySelector(".js-marketplace-plan-yearly-price-field").value,r.closest(".js-marketplace-plan-dollars-container").classList.remove("d-none")}"DIRECT_BILLING"===a&&(r.classList.add("d-none"),n.classList.add("d-none"),i.classList.remove("d-none"));let s=t.querySelector(".js-marketplace-plan-bullets");s.textContent="";let c=e.querySelectorAll(".js-marketplace-plan-bullet-field"),u=t.querySelector(".js-marketplace-plan-bullet-template");for(let e of c){let t=e.value;if(t.trim().length<1)continue;let n=u.content.cloneNode(!0);if(!(n instanceof DocumentFragment))return;n.querySelector(".js-marketplace-plan-bullet").textContent=t,s.appendChild(n)}t.querySelector(".js-marketplace-plan-description").textContent=e.querySelector(".js-marketplace-plan-description-field").value,t.querySelector(".js-marketplace-plan-for-account-type").textContent=(e.querySelector(".js-plan-for-account-type").textContent||"").toLowerCase()}(r,i))}),(0,a.on)("click",".js-marketplace-plan-editor-toggle",function(e){let t=e.currentTarget.closest(".js-marketplace-edit-plan-container"),n=t.querySelector(".js-marketplace-plan-preview-toggle"),r=t.querySelector(".js-marketplace-edit-plan-editor"),i=t.querySelector(".js-marketplace-edit-plan-preview");r.classList.contains("d-none")&&(e.currentTarget.classList.add("selected"),n.classList.remove("selected"),i.classList.add("d-none"),r.classList.remove("d-none"))}),(0,a.on)("change",".js-marketplace-plan-dollar-field",function(e){let t=e.currentTarget;t.closest(".js-marketplace-plan-dollar-field-container").classList.toggle("is-errored",!t.checkValidity())});var k=n(89149);async function E(e){let t=e.target,n=parseInt(t.value,10).toFixed(),r=new URL(t.getAttribute("data-url"),window.location.origin),i=new URLSearchParams(r.search.slice(1));i.set("quantity",n),r.search=i.toString();let a=await (0,k.Ts)(document,r.toString()),o=document.querySelector(".js-marketplace-order-preview");o.textContent="",o.appendChild(a)}(0,i.lB)(".js-marketplace-order-quantity",function(e){e.addEventListener("input",E)}),(0,a.on)("change","input.js-grant-oap-checkbox",function(e){let t=e.currentTarget,n=document.querySelector(".js-marketplace-complete-order");n&&(n.disabled=!t.checked)}),(0,a.on)("click",".js-marketplace-complete-order",function(e){e.preventDefault();let t=e.currentTarget,n=t.form,r=document.querySelector(".js-marketplace-billing-modal");"true"===t.getAttribute("data-show-billing-modal")&&r?r.setAttribute("open","true"):n&&n.submit()}),(0,a.on)("upload:setup",".js-upload-marketplace-listing-hero-card-background",function(e){let{form:t}=e.detail,n=e.currentTarget.getAttribute("data-marketplace-listing-id");n&&t.append("marketplace_listing_id",n)}),(0,a.on)("upload:complete",".js-upload-marketplace-listing-hero-card-background",function(e){let{attachment:t}=e.detail;document.querySelector(".js-marketplace-listing-hero-card-background-id").value=t.id,document.querySelector(".js-hero-listing-container").style.backgroundImage=`url(${t.href})`}),(0,a.on)("upload:setup",".js-upload-marketplace-listing-screenshot",function(e){let{form:t}=e.detail,n=e.currentTarget.getAttribute("data-marketplace-listing-id");n&&t.append("marketplace_listing_id",n)}),(0,a.on)("upload:complete",".js-upload-marketplace-listing-screenshot",async function(e){let t=e.currentTarget.getAttribute("data-screenshots-url"),n=document.querySelector(".js-marketplace-listing-screenshots-container"),r=await (0,k.Ts)(document,t);n.textContent="",n.appendChild(r)});var S=n(5225),j=n(91385),w=n(31733);async function q(e){let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}let L=new Map,C=(0,S.A)(q,{cache:L}),T="query-builder-marketplace-search-box";async function x(){return C(document.querySelector(`query-builder#${T}`).getAttribute("data-suggestable-publishers-path"))}async function A(){let e=await x(),t=document.getElementById("type"),n=t?.value;return"apps"===n?e.apps:"actions"===n?e.actions:"stacks"===n?e.stacks:e.all}let R=[{name:"Best Match",value:"match-desc"},{name:"Recently added",value:"created-desc"},{name:"Popularity",value:"popularity-desc"}],_=document.querySelector("#marketplace-search-combobox-form")?.getAttribute("action")||"",I=(e,t)=>e.filter(e=>{if(t&&(0,j.qA)(t,e)||""===t)return e});class M extends EventTarget{priority=1;name="Search";singularItemName="search item";value="search";type="search";queryBuilder;constructor(e){super(),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),this.queryBuilder.attachProvider(this)}handleEvent(e){""!==String(e)&&this.dispatchEvent(new w.CN({priority:1,value:e.toString(),icon:w.m4.Search,scope:"GENERAL",action:{url:`${_}?query=${e.toString()}`}}))}}class N extends EventTarget{name="Publishers";singularItemName="publisher";value="publisher";priority=2;type="filter";queryBuilder;constructor(e){super(),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),this.queryBuilder.attachProvider(this)}async handleEvent(e){let t=e.parsedQuery.at(-1),n=t?.value||"",r=t?.type,i=t?.filter||"";if("filter"!==r&&((0,j.qA)(n,this.value)||""===n)&&this.dispatchEvent(new Event("show")),"filter"===r&&i===this.value)for(let e of I((await A()).map(e=>e.login),n).slice(0,30))this.dispatchEvent(new w.qi({filter:"publisher",value:e}))}}class P extends EventTarget{name="Sort by";singularItemName="sort";value="sort";priority=3;type="filter";queryBuilder;constructor(e){super(),this.queryBuilder=e,this.queryBuilder.addEventListener("query",this),this.queryBuilder.attachProvider(this)}handleEvent(e){let t=e.parsedQuery.at(-1),n=t?.value||"",r=t?.type,i=t?.filter||"",a=I(R.map(e=>e.name),n);if("filter"!==r&&((0,j.qA)(n,this.value)||""===n)&&this.dispatchEvent(new Event("show")),"filter"===r&&i===this.value)for(let e of a){let t=R.findIndex(t=>t.name===e),n=R[t]?.value||"";this.dispatchEvent(new w.qi({filter:"sort",name:e,value:n}))}}}document.addEventListener("query-builder:request-provider",e=>{let t=e.target;t&&t.id===T&&(new M(e.target),new N(e.target),new P(e.target))}),(0,a.on)("click",".js-listing-delist-button",function({currentTarget:e}){let t=e.getAttribute("data-show-dialog-id"),n=document.getElementById(t);n.addEventListener("cancel",()=>{B("1")},{once:!0}),n.addEventListener("close",()=>{B("1")},{once:!0})}),(0,a.on)("click",".js-listing-delist-proceed-button",function({currentTarget:e}){let t=e.getAttribute("data-next-stage");t&&B(t)}),(0,o.eC)(".js-listing-delist-proceed-confirmation",function({currentTarget:e}){let t=e.getAttribute("data-repo-nwo");if(t){let a=document.getElementById("listing-delist-proceed-button"),o=e.value===t;if(a&&o){var n,r,i;let o,l=e.closest("form");l&&(n=l,r="verify",i=t,(o=document.createElement("input")).setAttribute("type","hidden"),o.setAttribute("name",r),o.setAttribute("value",i),n.appendChild(o),a.disabled=!1)}else a.disabled=!0}});function B(e){let t=document.getElementById(`delist-listing-step-${e}`),n=document.getElementById(`proceed-button-delist-step-${e}`);if(t&&n){let e=n.content.cloneNode(!0),r=t.content.cloneNode(!0),i=document.getElementById("listing-delist-warning-container"),a=document.getElementById("listing-delist-proceed-button-container");i&&a&&(i.textContent="",a.textContent="",i.appendChild(r),a.appendChild(e))}}},49481(e,t,n){n.d(t,{C:()=>o,i:()=>l});var r=n(26316),i=n(73537),a=n(46493);function o(e,t){(0,i.G7)("arianotify_comprehensive_migration")?l(s(e),{...t,element:t?.element??e}):(0,i.G7)("primer_live_region_element")&&t?.element===void 0?(0,a.Cj)(e,{politeness:t?.assertive?"assertive":"polite"}):l(s(e),t)}function l(e,t){let{assertive:n,element:o}=t??{};if((0,i.G7)("arianotify_comprehensive_migration"))try{(o?.isConnected?o:r.XC).ariaNotify(e,{priority:n?"high":"normal"})}catch(e){console.error("Error calling ariaNotify:",e)}else{var l,s;let t;(0,i.G7)("primer_live_region_element")&&void 0===o?(0,a.iP)(e,{politeness:n?"assertive":"polite"}):(l=e,s=n,(t=o??r.XC?.querySelector(s?"#js-global-screen-reader-notice-assertive":"#js-global-screen-reader-notice"))&&(t.textContent===l?t.textContent=`${l}\u00A0`:t.textContent=l))}}function s(e){return(e.getAttribute("aria-label")||e.innerText||"").trim()}n(89272)},7909(e,t,n){let r;function i(){let e=(void 0)??r;if(!e)throw Error("Client env was requested before it was loaded. This likely means you are attempting to use client env at the module level in SSR, which is not supported. Please move your client env usage into a function.");return e}function a(){return i().locale??"en-US"}function o(){return!!i().login}function l(){return i().login}if(n.d(t,{JK:()=>a,M3:()=>o,_$:()=>i,cj:()=>l}),"u">typeof document){let e=document.getElementById("client-env");if(e)try{r=JSON.parse(e.textContent||"")}catch(e){console.error("Error parsing client-env",e)}}},34619(e,t,n){n.d(t,{O:()=>o,S:()=>a});var r=n(26316);let i=r.cg?.document?.head?.querySelector('meta[name="release"]')?.content||"",a="X-GitHub-Client-Version";function o(){return i}},73537(e,t,n){n.d(t,{G7:()=>s,XY:()=>c,fQ:()=>l});var r=n(5225),i=n(7909);function a(){return new Set((0,i._$)().featureFlags)}let o=n(37337).X3||function(){try{return process?.env?.STORYBOOK==="true"}catch{return!1}}()?a:(0,r.A)(a);function l(){return Array.from(o())}function s(e){return o().has(e)}let c={isFeatureEnabled:s}},5045(e,t,n){n.d(t,{jC:()=>l,kt:()=>a,tV:()=>o});var r=n(34619),i=n(381);function a(e){let t={"X-Requested-With":"XMLHttpRequest",...(0,i.wE)(e)};return{...t,[r.S]:(0,r.O)()}}function o(e,t){for(let[n,r]of Object.entries(a(t)))e.set(n,r)}function l(e){return{"X-GitHub-App-Type":e}}},381(e,t,n){n.d(t,{$r:()=>o,M1:()=>l,li:()=>i,pS:()=>c,wE:()=>s});var r=n(26316);let i="X-Fetch-Nonce",a=new Set;function o(e){a.add(e)}function l(){return a.values().next().value||""}function s(e){let t={};return void 0!==e&&(t["X-Fetch-Nonce-To-Validate"]=e),void 0===e?t[i]=l():a.has(e)?t[i]=e:t[i]=Array.from(a).join(","),t}function c(){let e=r.XC?.head?.querySelector('meta[name="fetch-nonce"]')?.content||"";e&&o(e)}},89149(e,t,n){n.d(t,{Ee:()=>l,Ts:()=>o,b4:()=>s});var r=n(7749),i=n(69185),a=n(5045);async function o(e,t,n){let o=new Request(t,n);(0,a.tV)(o.headers);let l=await self.fetch(o);if(l.status<200||l.status>=300)throw Error(`HTTP ${l.status}${l.statusText||""}`);return(0,r.A)((0,r.K)(e),l),(0,i.B)(e,await l.text())}function l(e,t,n=1e3,r=[200],i=[202]){return async function n(o){let l=new Request(e,t);(0,a.tV)(l.headers);let s=await self.fetch(l);if(i.includes(s.status))return await new Promise(e=>setTimeout(e,o)),n(1.5*o);if(r.includes(s.status))return s;if(s.status<200||s.status>=300)throw Error(`HTTP ${s.status}${s.statusText||""}`);throw Error(`Unexpected ${s.status} response status from poll endpoint`)}(n)}async function s(e,t,n){let{wait:r=500,acceptedStatusCodes:i=[200],max:o=3,attempt:l=0}=n||{},c=async()=>new Promise((n,s)=>{setTimeout(async()=>{try{let r=new Request(e,t);(0,a.tV)(r.headers);let s=await self.fetch(r);if(i.includes(s.status)||l+1===o)return n(s);n("retry")}catch(e){s(e)}},r*l)}),u=await c();return"retry"!==u?u:s(e,t,{wait:r,acceptedStatusCodes:i,max:o,attempt:l+1})}},46131(e,t,n){n.d(t,{Cy:()=>l,K3:()=>u,Z8:()=>s,k_:()=>a,lK:()=>d,m$:()=>o});var r=n(84592);function i(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:n}))}function a(e,t){t&&(function(e,t){if(!(e instanceof HTMLFormElement))throw TypeError("The specified element is not of type HTMLFormElement.");if(!(t instanceof HTMLElement))throw TypeError("The specified element is not of type HTMLElement.");if("submit"!==t.type)throw TypeError("The specified element is not a submit button.");if(!e||e!==t.form)throw Error("The specified element is not owned by the form element.")}(e,t),(0,r.A)(t)),i(e,"submit",!0)&&e.submit()}function o(e,t){if("boolean"==typeof t)if(e instanceof HTMLInputElement)e.checked=t;else throw TypeError("only checkboxes can be set to boolean value");else if("checkbox"===e.type)throw TypeError("checkbox can't be set to string value");else e.value=t;i(e,"change",!1)}function l(e,t){for(let n in t){let r=t[n],i=e.elements.namedItem(n);i instanceof HTMLInputElement?i.value=r:i instanceof HTMLTextAreaElement&&(i.value=r)}}function s(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),n=(e.getAttribute("type")||"").toLowerCase();return"select"===t||"textarea"===t||"input"===t&&"submit"!==n&&"reset"!==n||e.isContentEditable}function c(e){return new URLSearchParams(e)}function u(e,t){let n=new URLSearchParams(e.search);for(let[e,r]of c(t))n.append(e,r);return n.toString()}function d(e){return c(new FormData(e)).toString()}},84592(e,t,n){function r(e){let t=e.closest("form");if(!(t instanceof HTMLFormElement))return;let n=i(t);if(e.name){let r=e.matches("input[type=submit]")?"Submit":"",i=e.value||r;n||((n=document.createElement("input")).type="hidden",n.classList.add("js-submit-button-value"),t.prepend(n)),n.name=e.name,n.value=i}else n&&n.remove()}function i(e){let t=e.querySelector("input.js-submit-button-value");return t instanceof HTMLInputElement?t:null}n.d(t,{A:()=>r,C:()=>i})},7749(e,t,n){function r(e){let t=[...e.querySelectorAll("meta[name=html-safe-nonce]")].map(e=>e.content);if(t.length<1)throw Error("could not find html-safe-nonce on document");return t}n.d(t,{A:()=>a,K:()=>r});class i extends Error{response;constructor(e,t){super(`${e} for HTTP ${t.status}`),this.response=t,this.name="ResponseError"}}function a(e,t,n=!1){let r=t.headers.get("content-type")||"";if(!n&&!r.startsWith("text/html"))throw new i(`expected response with text/html, but was ${r}`,t);if(n&&!(r.startsWith("text/html")||r.startsWith("application/json")))throw new i(`expected response with text/html or application/json, but was ${r}`,t);let o=t.headers.get("x-html-safe");if(o){if(!e.includes(o))throw new i("response X-HTML-Safe nonce did not match",t)}else throw new i("missing X-HTML-Safe nonce",t)}},63557(e,t,n){n.d(t,{Ff:()=>s,eC:()=>c,uE:()=>l});var r=n(6986);let i=!1,a=new r.A;function o(e){let t=e.target;if(t instanceof HTMLElement&&t.nodeType!==Node.DOCUMENT_NODE)for(let e of a.matches(t))e.data.call(null,t)}function l(e,t){i||(i=!0,document.addEventListener("focus",o,!0)),a.add(e,t),document.activeElement instanceof HTMLElement&&document.activeElement.matches(e)&&t(document.activeElement)}function s(e,t,n){function r(t){let i=t.currentTarget;i&&(i.removeEventListener(e,n),i.removeEventListener("blur",r))}l(t,function(t){t.addEventListener(e,n),t.addEventListener("blur",r)})}function c(e,t){function n(e){let{currentTarget:r}=e;r&&(r.removeEventListener("input",t),r.removeEventListener("blur",n))}l(e,function(e){e.addEventListener("input",t),e.addEventListener("blur",n)})}},69185(e,t,n){n.d(t,{B:()=>r});function r(e,t){let n=e.createElement("template");return n.innerHTML=t,e.importNode(n.content,!0)}},31733(e,t,n){n.d(t,{CN:()=>c,P$:()=>p,VJ:()=>u,dS:()=>d,k8:()=>i,m4:()=>l,nM:()=>o,o7:()=>r,qi:()=>a,yk:()=>s});let r={DIRECTORY:"Search in this directory",ORG:"Search in this organization",OWNER:"Search in this owner",REPO:"Search in this repository",ENTERPRISE:"Search in this enterprise",GITHUB:"Search all of GitHub",GENERAL:"Submit search",COMMAND:"Run command",COPILOT_CHAT:"Start a new Copilot thread",COPILOT_SEARCH:"Search with Copilot",EXPLORE:"Learn More",DEFAULT:"Jump to"},i="Autocomplete";class a extends Event{name;filter;value;description;inlineDescription=!1;action;priority;icon;avatar;constructor({filter:e,value:t,name:n="",description:r="",inlineDescription:i=!1,priority:a=1/0,icon:o,avatar:l,action:s}){super("filter-item"),this.filter=e,this.value=t,this.name=n,this.description=r,this.inlineDescription=i,this.priority=a,this.icon=o,this.avatar=l,this.action=s}}function o(e){return e instanceof Object}let l={Apps:"apps",Archived:"archived",Book:"book",Bookmark:"bookmark",Branch:"branch",Calendar:"calendar",Circle:"circle",Code:"code",CodeReview:"code-review",CodeSquare:"code-square",Comment:"comment",CommentDiscussion:"comment-discussion",Copilot:"copilot",CopilotError:"copilot-error",Codespaces:"codespaces",CreditCard:"credit-card",Default:"default",DeviceDesktop:"device-desktop",DeviceMobile:"device-mobile",Discussion:"discussion",Draft:"draft",FileCode:"file-code",Filter:"filter",Forbidden:"forbidden",Gift:"gift",Globe:"globe",Heart:"heart",History:"history",Issue:"issue",IssueOpened:"issue-opened",IssueClosed:"issueClosed",Iterations:"iterations",Mention:"mention",Merged:"merged",Milestone:"milestone",No:"no",Not:"not",Organization:"organization",Package:"package",Pencil:"pencil",Person:"person",Play:"play",PlusCircle:"plus-circle",Project:"project",PullRequest:"pullRequest",Question:"question",Reaction:"reaction",Repo:"repo",Rocket:"rocket",Search:"search",Server:"server",ShieldCheck:"shield-check",SingleSelect:"single-select",Sort:"sort",Tag:"tag",Team:"team",Telescope:"telescope",Trash:"trash",Workflow:"workflow"},s={Entity:"--color-prettylights-syntax-entity",Constant:"--color-prettylights-syntax-constant",Keyword:"--color-prettylights-syntax-keyword",Variable:"--color-prettylights-syntax-variable",String:"--color-prettylights-syntax-string"};class c extends Event{id;priority;value;action;description;icon;scope;prefixText;prefixColor;isFallbackSuggestion;constructor({id:e,priority:t,value:n,action:r,description:i="",icon:a,scope:o="DEFAULT",prefixText:l,prefixColor:s,isFallbackSuggestion:c,isUpdate:u}){super(u?"update-item":"search-item"),this.id=e,this.priority=t,this.value=n,this.prefixText=l,this.prefixColor=s,this.action=r,this.description=i,this.icon=a,this.scope=o,this.isFallbackSuggestion=c||!1}}let u={Normal:"normal",Entity:"entity",Constant:"constant",FilterValue:"filter-value"};class d extends Event{fetchPromise;constructor(e){super("fetch-data"),this.fetchPromise=e}}class p extends Event{parsedQuery;rawQuery;parsedMetadata;constructor(e,t,n){super("query"),this.parsedQuery=e,this.rawQuery=t,this.parsedMetadata=n}toString(){return this.rawQuery}}Event},40893(e,t,n){n.d(t,{Ax:()=>i.Ax,JW:()=>a,ZV:()=>i.ZV});var r=n(5045),i=n(13937);function a(e,t){(0,i.JW)(e,async(e,n,i)=>((0,r.tV)(i.headers),t(e,n,i)))}},26316(e,t,n){n.d(t,{Kn:()=>o,XC:()=>i,cg:()=>a,fV:()=>l});let r="u">typeof FORCE_SERVER_ENV&&FORCE_SERVER_ENV,i="u"a,X3:()=>i,g5:()=>o});var r=n(26316);let i=void 0===r.XC,a=!i;function o(){return!!i||!r.XC||!!(r.XC.querySelector('react-app[data-ssr="true"]')||r.XC.querySelector('react-partial[data-ssr="true"][partial-name="repos-overview"]'))}},51729(e,t,n){function r(e){let t=e.split("\u200D"),n=0;for(let e of t)n+=Array.from(e.split(/[\ufe00-\ufe0f]/).join("")).length;return n/t.length}function i(e,t,n,r=!0){let a=e.value.substring(0,e.selectionEnd||0),o=e.value.substring(e.selectionEnd||0);return l(e,(a=a.replace(t,n))+(o=o.replace(t,n)),a.length,r),n}function a(e,t,n){if(null===e.selectionStart||null===e.selectionEnd)return i(e,t,n);let r=e.value.substring(0,e.selectionStart),a=e.value.substring(e.selectionEnd);return l(e,r+n+a,r.length),n}function o(e,t,n={}){let r=e.selectionEnd||0,i=e.value.substring(0,r),a=e.value.substring(r),l=(""===e.value||i.match(/\n$/)?"":"\n")+t+(n.appendNewline?"\n":"");e.value=i+l+a;let s=r+l.length;return e.selectionStart=s,e.selectionEnd=s,e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1})),e.focus(),l}function l(e,t,n,r=!0){e.value=t,r&&(e.selectionStart=n,e.selectionEnd=n),e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1}))}function s(e,t){let n=[...e],r=new TextEncoder,i=new Uint8Array(4);for(let e=0;e=t))break}return t}n.d(t,{bV:()=>r,bc:()=>o,ee:()=>i,kN:()=>s,tJ:()=>a})}},function(e){e.O(0,["7053","78995","96232"],function(){return e(e.s=67891)}),e.O()}]); //# sourceMappingURL=marketplace-d09139b27f78bec5-2261b677a454d3c4.js.map