1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./dist-CbfhLTox.js";import{t as n}from"./punycode-DpdQ0SRX.js";var r=e(n());function i(){t(`click`,`a[data-confirm]`,c),t(`click`,`a[data-method]:not([data-confirm])`,l),t(`click`,`:not(form) button[data-confirm]:not([form])`,c)}function a(e){try{return new URL(e).hostname}catch{return null}}var o=`xn--`;function s(e){return e.split(`.`).map(e=>e.startsWith(o)?r.default.decode(e.slice(4)):e).join(`.`)}function c(e){let t=e.currentTarget;if(!(t instanceof HTMLAnchorElement)&&!(t instanceof HTMLButtonElement))return;let n=t.dataset.confirm;if(!n||!window.confirm(n)){e.preventDefault();return}t.dataset.method&&l(e)}function l(e){let t=e.currentTarget;if(!(t instanceof HTMLAnchorElement))return;let n=t.dataset.method?.toLowerCase();if(!n)return;e.preventDefault();let r=document.createElement(`form`);r.method=`post`,r.action=t.href;let i=document.createElement(`input`);i.type=`hidden`,i.name=`_method`,i.value=n,r.appendChild(i);let a=u();if(a&&!d(t.href)){let e=document.createElement(`input`);e.type=`hidden`,e.name=a.param,e.value=a.token,r.appendChild(e)}r.style.display=`none`,document.body.appendChild(r),r.requestSubmit()}function u(){let e=document.querySelector(`meta[name="csrf-param"]`),t=document.querySelector(`meta[name="csrf-token"]`);return e&&t?{param:e.content,token:t.content}:null}function d(e){let t=document.createElement(`a`);return t.href=e,t.protocol!==window.location.protocol||t.host!==window.location.host}export{i as n,a as r,s as t}; 2//# sourceMappingURL=links-r8D4IrQp.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.