1import{a8 as t,a9 as e,t as n}from"./2c1ab0fe.GMbxnz74.js";import{W as r,fv as i,a1 as o}from"./4c290a1e.C6TDJ9Fn.js";function a(t,e){return t.protocol===e.protocol&&t.port===e.port&&(t.hostname===e.hostname||t.hostname.endsWith(`.${e.hostname}`))}const s="data-special-id";function c({id:t,url:e,privileges:n,title:r,name:i,iframeSpecialId:o,onLoad:a}){const c=document.getElementById(`sandbox-${t}`);if(c&&"IFRAME"===c.tagName)return c;const d=document.createElement("iframe");if(d.setAttribute("id",`sandbox-${t}`),d.setAttribute("src",e),d.setAttribute("sandbox",n.join(" ")),d.setAttribute("tabIndex","-1"),d.setAttribute("aria-hidden","true"),o&&d.setAttribute(s,o),r&&d.setAttribute("title",r),i&&d.setAttribute("name",i),d.setAttribute("style","display:none; height:0; width:0; visibility: hidden;"),l(d),a){const t=a(d);d.addEventListener("load",t,{once:!0})}return d}const d={};function u(n,r,i,o,a){const s=n.getAttribute("id");if(!s)throw Error("Endpoint cannot be created without an iframe id");o&&m(r,o);const c=`${s}-endpoint-${i}`,u=d[c];u&&(o?.leaveErrorBreadcrumb(`Terminating existing RPC endpoint ${c}`),u.terminate());const l=a?.isSandboxedWithNullOrigin?"*":new URL(r).origin,h=t(e(n,{targetOrigin:l}));return d[c]=h,h}function m(t,e){let n;try{n=new URL(t,window.location.href)}catch{return}const r=n.searchParams.get("shopHost");if(!r)return;const i=`https://${r}`,o=window.location.origin;(function(t,e,n=[]){try{const r=new URL(t),i=new URL(e),o=a(r,i)||n.some(t=>{try{const e=new URL(t);return e.origin===t&&a(r,e)}catch{return!1}});return r.origin===t&&"https:"===r.protocol&&o}catch{return!1}})(o,i,function(){const t=document.querySelector('meta[name="serialized-shop"]')?.getAttribute("content");if(t)try{return JSON.parse(t)}catch{return}}()?.origins)||e.log("sandbox_parent_origin_mismatch","Sandbox shopHost does not match the parent origin",{sandbox:n.pathname,expectedOrigin:i,actualOrigin:o})}function l(t){let e=document.querySelector("#SandboxContainer");null==e&&(e=document.createElement("div"),e.setAttribute("id","SandboxContainer"),document.body.appendChild(e)),e.appendChild(t)}function h(){const t=r().paymentLines;return n(()=>{const[e]=i(t.value,[o.AmazonPay]);return e})}export{s as D,l as a,u as b,c,m as r,h as u};
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.