performance.mark("js-parse-end:12734-63fa4aadaafd4358.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["12734"],{55150(e,t,n){n.d(t,{Bu:()=>u,YV:()=>a,o:()=>o});let l=null;function r(e){return e instanceof HTMLSelectElement||(i(e)?e.checked!==e.defaultChecked:e.value!==e.defaultValue)}function s(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement}function i(e){return e instanceof HTMLInputElement&&/checkbox|radio/.test(e.type)}function a(e,t){var n,i,a,o,u,c;let h,p=null!=(n=null==t?void 0:t.scope)?n:document,f=null!=(i=null==t?void 0:t.selector)?i:".js-session-resumable",d=null!=(a=null==t?void 0:t.fields)?a:p.querySelectorAll(f),g=null!=(o=null==t?void 0:t.keyPrefix)?o:"session-resume:",m=null!=(u=null==t?void 0:t.storageFilter)?u:r;try{h=null!=(c=null==t?void 0:t.storage)?c:sessionStorage}catch(e){return}let b=`${g}${e}`,v=[];for(let e of d)s(e)&&v.push(e);let y=v.filter(e=>!!e.id&&m(e)&&e.form!==l).map(e=>e instanceof HTMLSelectElement?[e.id,Array.from(e.selectedOptions).map(e=>e.value)]:[e.id,e.value]);if(y.length)try{let e=h.getItem(b);if(null!==e){let t=JSON.parse(e).filter(function(e){return!y.some(t=>t[0]===e[0])});y=y.concat(t)}h.setItem(b,JSON.stringify(y))}catch(e){}}function o(e,t){var n,l;let r,a,o=null!=(n=null==t?void 0:t.keyPrefix)?n:"session-resume:";try{r=null!=(l=null==t?void 0:t.storage)?l:sessionStorage}catch(e){return}let u=`${o}${e}`;try{a=r.getItem(u)}catch(e){}if(!a)return;let c=[],h=[];for(let[e,t]of JSON.parse(a)){let n=new CustomEvent("session:resume",{bubbles:!0,cancelable:!0,detail:{targetId:e,targetValue:t}});if(document.dispatchEvent(n)){let n=document.getElementById(e);if(s(n))if(n instanceof HTMLSelectElement){for(let e of n.options)e.selected=t.includes(e.value);c.push(n)}else i(n)?(n.checked=!n.defaultChecked,c.push(n)):n.value===n.defaultValue&&(n.value=t,c.push(n));else h.push([e,t])}}if(0===h.length)try{r.removeItem(u)}catch(e){}else r.setItem(u,JSON.stringify(h));setTimeout(function(){for(let e of c)e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))},0)}function u(e){l=e.target,setTimeout(function(){e.defaultPrevented&&(l=null)},0)}},85498(e,t,n){n.d(t,{TemplateInstance:()=>v,xr:()=>g});let l=new Map;function r(e){if(l.has(e))return l.get(e);let t=e.length,n=0,r=0,s=0,i=[];for(let l=0;ln&&(i.push(Object.freeze({type:"string",start:n,end:r,value:e.slice(n,r)})),n=r),i.push(Object.freeze({type:"part",start:r,end:l+2,value:e.slice(n+2,l).trim()})),l+=1,n=l+1)}return n"string"==typeof e?e:e.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,e)}}}let u=new WeakMap;class c{constructor(e,t){this.expression=t,u.set(this,[e]),e.textContent=""}get value(){return u.get(this).map(e=>e.textContent).join("")}set value(e){this.replace(e)}get previousSibling(){return u.get(this)[0].previousSibling}get nextSibling(){return u.get(this)[u.get(this).length-1].nextSibling}replace(...e){var t,n;let l=e.map(e=>"string"==typeof e?new Text(e):e);l.length||l.push(new Text(""));let r=u.get(this)[0];for(let e of l)null==(t=r.parentNode)||t.insertBefore(e,r);for(let e of u.get(this))null==(n=e.parentNode)||n.removeChild(e);u.set(this,l)}}class h extends c{constructor(e){var t;super(e,null!=(t=e.getAttribute("expression"))?t:""),this.template=e}get directive(){var e;return null!=(e=this.template.getAttribute("directive"))?e:""}}function p(e){return{processCallback(t,n,l){var r;if("object"==typeof l&&l){for(let t of n)if(t.expression in l){let n=null!=(r=l[t.expression])?r:"";e(t,n,l)}}}}}function f(e,t){e.value=t instanceof Node?t:String(t)}let d=p(f),g=p((e,t)=>{"boolean"==typeof t&&e instanceof a&&"boolean"==typeof e.element[e.attributeName]&&(e.booleanValue=t,1)||f(e,t)}),m=new WeakMap,b=new WeakMap;class v extends(globalThis.DocumentFragment||EventTarget){constructor(e,t,n=d){var l,s;super(),Object.getPrototypeOf(this)!==v.prototype&&Object.setPrototypeOf(this,v.prototype),this.appendChild(e.content.cloneNode(!0)),b.set(this,Array.from(function* e(t){let n,l=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);for(;n=l.nextNode();)if(n instanceof HTMLTemplateElement)if(n.hasAttribute("directive"))yield new h(n);else for(let t of e(n.content))yield t;else if(n instanceof Element&&n.hasAttributes())for(let e=0;e{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function s(e,t){let n;return(l,s)=>(()=>{if(n)return n;let l=indexedDB.open(e);return l.onupgradeneeded=()=>l.result.createObjectStore(t),(n=r(l)).then(e=>{e.onclose=()=>n=void 0},()=>{}),n})().then(e=>s(e.transaction(t,l).objectStore(t)))}function i(){return l||(l=s("keyval-store","keyval")),l}function a(e,t=i()){return t("readonly",t=>r(t.get(e)))}function o(e,t,n=i()){return n("readwrite",n=>(n.put(t,e),r(n.transaction)))}function u(e,t=i()){return t("readwrite",t=>(t.delete(e),r(t.transaction)))}function c(e=i()){return e("readwrite",e=>(e.clear(),r(e.transaction)))}function h(e=i()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([r(t.getAllKeys()),r(t.getAll())]).then(([e,t])=>e.map((e,n)=>[e,t[n]]));let n=[];return e("readonly",e=>{var t;return(t=e=>n.push([e.key,e.value]),e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},r(e.transaction)).then(()=>n)})})}n.d(t,{IU:()=>c,Jt:()=>a,hZ:()=>o,jO:()=>h,y$:()=>s,yH:()=>u})}}]); //# sourceMappingURL=12734-63fa4aadaafd4358-434bad76be1f2e49.js.map