forked from bombastictranz/Github-docs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_assets_modules_github_behaviors_inline-comment_ts-ui_pack.js
6 lines (6 loc) · 8.08 KB
/
app_assets_modules_github_behaviors_inline-comment_ts-ui_pack.js
1
2
3
4
5
6
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["app_assets_modules_github_behaviors_inline-comment_ts-ui_packages_aria-live_aria-live_ts-ui_p-94ed76"],{43467:(e,t,n)=>{n.d(t,{j:()=>a,w:()=>c});var r=n(59753),o=n(97390),i=n(9238);function a(e){let t=e.querySelector(".js-inline-comment-form-container");t.classList.add("open"),t.querySelector(".js-write-tab")?.click(),t.querySelector(".js-comment-field").focus(),(0,r.f)(t,"inlinecomment:focus")}function c(e){e.reset();let t=e.closest(".js-inline-comment-form-container");t.classList.remove("open");let n=t.querySelector(".js-multi-line-preview");n&&(n.hidden=!0),(0,r.f)(t,"inlinecomment:collapse")}(0,r.on)("click",".js-toggle-inline-comment-form",function(e){let t=e.currentTarget.closest(".js-line-comments");a(t)}),(0,r.on)("quote-selection",".js-line-comments",function(e){a(e.currentTarget),e.stopPropagation()}),(0,i.w4)("keydown",".js-inline-comment-form-container form .js-comment-field",function(e){let t=e.target;if(!t.classList.contains("js-navigation-enable")&&"Escape"===e.key&&0===t.value.length){let n=t.closest("form");c(n),e.preventDefault()}}),(0,r.on)("click",".js-hide-inline-comment-form",function(e){let t=e.currentTarget.closest("form");!(0,o.T)(t)||confirm(e.currentTarget.getAttribute("data-confirm-cancel-text"))?c(t):e.preventDefault()})},9238:(e,t,n)=>{n.d(t,{ZG:()=>c,q6:()=>s,w4:()=>l});var r=n(8439);let o=!1,i=new r.Z;function a(e){let t=e.target;if(t instanceof HTMLElement&&t.nodeType!==Node.DOCUMENT_NODE)for(let e of i.matches(t))e.data.call(null,t)}function c(e,t){o||(o=!0,document.addEventListener("focus",a,!0)),i.add(e,t),document.activeElement instanceof HTMLElement&&document.activeElement.matches(e)&&t(document.activeElement)}function l(e,t,n){function r(t){let o=t.currentTarget;o&&(o.removeEventListener(e,n),o.removeEventListener("blur",r))}c(t,function(t){t.addEventListener(e,n),t.addEventListener("blur",r)})}function s(e,t){function n(e){let{currentTarget:r}=e;r&&(r.removeEventListener("input",t),r.removeEventListener("blur",n))}c(e,function(e){e.addEventListener("input",t),e.addEventListener("blur",n)})}},80810:(e,t,n)=>{n.d(t,{N:()=>o,x:()=>i});var r=n(71207);function o(e,t){i((e.getAttribute("aria-label")||e.innerText||"").trim(),t)}function i(e,t){let{assertive:n,selector:o}=t??{};!function(e,t,n){let o=r.n4?.querySelector(n||(t?"#js-global-screen-reader-notice-assertive":"#js-global-screen-reader-notice"));o&&(o.textContent===e?o.textContent=`${e}\u00A0`:o.textContent=e)}(e,n,o)}},65809:(e,t,n)=>{n.d(t,{eK:()=>h});var r=n(82918),o=n(21630),i=n(28382);function a(e){let t=document.querySelectorAll(e);if(t.length>0)return t[t.length-1]}var c=n(54508),l=n(71207),s=n(18515),u=n(58374);let m=!1,f=0,d=Date.now(),p=new Set(["Failed to fetch","NetworkError when attempting to fetch resource."]);function y(e){return!!("AbortError"===e.name||"TypeError"===e.name&&p.has(e.message)||e.name.startsWith("ApiError")&&p.has(e.message))}function h(e,t={}){if((0,s.c)("FAILBOT_HANDLE_NON_ERRORS")){if(!(e instanceof Error||"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name&&"message"in e&&"string"==typeof e.message)){if(function(e){if(!e||"boolean"==typeof e||"number"==typeof e)return!0;if("string"==typeof e){if(S.some(t=>e.includes(t)))return!0}else if("object"==typeof e&&"string"==typeof e.message&&"number"==typeof e.code)return!0;return!1}(e))return;let n=Error(),r=function(e){try{return JSON.stringify(e)}catch{return"Unserializable"}}(e),o={type:"UnknownError",value:`Unable to report error, due to a thrown non-Error type: ${typeof e}, with value ${r}`,stacktrace:v(n),catalogService:void 0};g(E(o,t));return}y(e)||g(E(T(e),t))}else y(e)||g(E(T(e),t))}async function g(e){if(!(!w&&!m&&f<10&&(0,o.Gb)()))return;let t=document.head?.querySelector('meta[name="browser-errors-url"]')?.content;if(t){if(e.error.stacktrace.some(e=>b.test(e.filename)||b.test(e.function))){m=!0;return}f++;try{await fetch(t,{method:"post",body:JSON.stringify(e)})}catch{}}}function T(e){return{type:e.name,value:e.message,stacktrace:v(e),catalogService:e.catalogService}}function E(e,t={}){return Object.assign({error:e,sanitizedUrl:`${window.location.protocol}//${window.location.host}${function(){let e=a("meta[name=analytics-location]");return e?e.content:window.location.pathname}()+function(){let e=a("meta[name=analytics-location-query-strip]"),t="";e||(t=window.location.search);let n=a("meta[name=analytics-location-params]");for(let e of(n&&(t+=(t?"&":"?")+n.content),document.querySelectorAll("meta[name=analytics-param-rename]"))){let n=e.content.split(":",2);t=t.replace(RegExp(`(^|[?&])${n[0]}($|=)`,"g"),`$1${n[1]}$2`)}return t}()}`||window.location.href,readyState:document.readyState,referrer:(0,u.wP)(),timeSinceLoad:Math.round(Date.now()-d),user:function(){let e=document.head?.querySelector('meta[name="user-login"]')?.content;if(e)return e;let t=(0,r.b)();return`anonymous-${t}`}()||void 0,bundler:c.A,ui:!!document.querySelector('meta[name="ui"]')},t)}function v(e){return(0,i.Q)(e.stack||"").map(e=>({filename:e.file||"",function:String(e.methodName),lineno:(e.lineNumber||0).toString(),colno:(e.column||0).toString()}))}let b=/(chrome|moz|safari)-extension:\/\//,w=!1;if(l.iG?.addEventListener("pageshow",()=>w=!1),l.iG?.addEventListener("pagehide",()=>w=!0),"function"==typeof BroadcastChannel){let e=new BroadcastChannel("shared-worker-error");e.addEventListener("message",e=>{h(e.data.error)})}let S=["Object Not Found Matching Id","Not implemented on this platform","provider because it's not your default extension"]},5223:(e,t,n)=>{n.d(t,{r:()=>c});var r=n(47940),o=n(50655);let i="parse-html-no-op",a=r.ZO.createPolicy(i,{createHTML:e=>o.O.apply({policy:()=>e,policyName:i,fallback:e,sanitize:!1,fallbackOnError:!0})});function c(e,t){let n=e.createElement("template");return n.innerHTML=a.createHTML(t),e.importNode(n.content,!0)}},50655:(e,t,n)=>{n.d(t,{O:()=>s,d:()=>TrustedTypesPolicyError});var r=n(18515),o=n(43786),i=n(65809),a=n(27856),c=n.n(a),l=n(79697);let TrustedTypesPolicyError=class TrustedTypesPolicyError extends Error{};let s={apply:function({policy:e,policyName:t,fallback:n,fallbackOnError:a=!1,sanitize:s,silenceErrorReporting:u=!1}){try{if((0,r.c)("BYPASS_TRUSTED_TYPES_POLICY_RULES"))return n;(0,o.b)({incrementKey:"TRUSTED_TYPES_POLICY_CALLED",trustedTypesPolicyName:t},!1,.1);let i=e();return s&&new Promise(e=>{let n=window.performance.now(),r=c().sanitize(i,{FORBID_ATTR:[]}),o=window.performance.now();if(i.length!==r.length){let a=Error("Trusted Types policy output sanitized"),c=a.stack?.slice(0,1e3),s=i.slice(0,250);(0,l.qP)("trusted_types_policy.sanitize",{policyName:t,output:s,stack:c,outputLength:i.length,sanitizedLength:r.length,executionTime:o-n}),e(i)}}),i}catch(e){if(e instanceof TrustedTypesPolicyError||(u||(0,i.eK)(e),(0,o.b)({incrementKey:"TRUSTED_TYPES_POLICY_ERROR",trustedTypesPolicyName:t}),!a))throw e}return n}}},47940:(e,t,n)=>{n.d(t,{ZO:()=>u});var r,o=n(71207),i=n(43786);function a(e){return()=>{throw TypeError(`The policy does not implement the function ${e}`)}}let c={createHTML:a("createHTML"),createScript:a("createScript"),createScriptURL:a("createScriptURL")},l=(r=globalThis).__TRUSTED_TYPE_POLICIES__??(r.__TRUSTED_TYPE_POLICIES__=new Map),s=globalThis.trustedTypes??{createPolicy:(e,t)=>({name:e,...c,...t})},u={createPolicy:(e,t)=>{if(l.has(e))return(0,i.b)({incrementKey:"TRUSTED_TYPES_POLICY_INITIALIZED_TWICE"}),l.get(e);{let n=Object.freeze(s.createPolicy(e,t));return l.set(e,n),n}}},m=!1;o.n4?.addEventListener("securitypolicyviolation",e=>{"require-trusted-types-for"!==e.violatedDirective||m||(console.warn(`Hi fellow Hubber!
You're probably seeing a Report Only Trusted Types error near this message. This is intended behaviour, staff-only,
does not impact application control flow, and is used solely for statistic collection. Unfortunately we
can't gather these statistics without adding the above warnings to your console. Sorry about that!
Feel free to drop by #prodsec-engineering if you have any additional questions about Trusted Types or CSP.`),m=!0)})}}]);
//# sourceMappingURL=app_assets_modules_github_behaviors_inline-comment_ts-ui_packages_aria-live_aria-live_ts-ui_p-94ed76-2ab18ca6fafc.js.map