1"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[2071],{88538(e,t,l){l.r(t),l.d(t,{default:()=>o});var r=l(74848),n=l(96540);let a=(e,t,l,r,n,s,o=!1)=>{if(null===e)return[{lineNo:r.value++,type:"scalar",indent:n,path:t,label:s,valueType:"null",value:"null",comma:o}];if(void 0===e)return[{lineNo:r.value++,type:"scalar",indent:n,path:t,label:s,valueType:"undefined",value:"undefined",comma:o}];if("boolean"==typeof e)return[{lineNo:r.value++,type:"scalar",indent:n,path:t,label:s,valueType:"boolean",value:String(e),comma:o}];if("number"==typeof e)return[{lineNo:r.value++,type:"scalar",indent:n,path:t,label:s,valueType:"number",value:String(e),comma:o}];if("string"==typeof e){let l=/^(https?|file):\/\/[^\s]+$/i.test(e);return[{lineNo:r.value++,type:"scalar",indent:n,path:t,label:s,valueType:l?"url":"string",value:e,comma:o}]}let i=Array.isArray(e),d=i?e.map((e,t)=>[t,e]):Object.entries(e),p=i?"[":"{",c=i?"]":"}",u=d.length;if(l[t]){let e=r.value++;return r.value++,[{lineNo:e,type:"collapsed",indent:n,path:t,label:s,open:p,close:c,preview:`// ${u} item${1!==u?"s":""}`,comma:o}]}let h=[];return h.push({lineNo:r.value++,type:"open",indent:n,path:t,label:s,open:p}),d.forEach(([e,s],o)=>h.push(...a(s,`${t}.${e}`,l,r,n+1,e,o<d.length-1))),h.push({lineNo:r.value++,type:"close",indent:n,path:t,close:c,comma:o}),h},s=({line:e,guides:t,collapsed:l,onToggle:n})=>(0,r.jsxs)("div",{className:"flex items-stretch text-text_neutral_default",children:[(0,r.jsx)("div",{className:"flex-shrink-0 flex items-start border-r border-border_neutral_strong bg-bkg_neutral_secondary w-7 pl-2",children:(0,r.jsx)("span",{className:"select-none text-text_neutral_default",children:e.lineNo})}),(0,r.jsx)("div",{className:"flex-shrink-0 flex items-start justify-center pt-2 w-4",children:("open"===e.type||"collapsed"===e.type)&&(0,r.jsx)("span",{role:"button",tabIndex:0,"aria-label":"collapsed"===e.type?"Expand":"Collapse",onClick:()=>n(e.path),onKeyDown:t=>"Enter"===t.key&&n(e.path),className:`inline-block cursor-pointer select-none opacity-50 hover:opacity-100 h-0 w-0 border-solid transition-transform duration-100 ease-in-out border-t-[6px] border-r-[4px] border-b-0 border-l-[4px] border-r-transparent border-b-transparent border-l-transparent border-t-text_neutral_default ${l[e.path]?"-rotate-90":"rotate-0"}`,style:{transform:l[e.path]?"rotate(-90deg)":"rotate(0deg)"}})}),(0,r.jsxs)("div",{className:"flex items-stretch flex-1 min-w-0",children:[Array.from({length:e.indent},(e,l)=>(0,r.jsx)("div",{className:"flex-shrink-0 self-stretch h-[calc(100%-1px)] w-7 ml-[3px]",style:{borderLeft:t.has(l)?"1px dotted var(--text_neutral_default)":"1px dotted transparent"}},l)),(0,r.jsxs)("div",{className:"flex-1 min-w-0 py-px pr-3 break-words",children:[void 0!==e.label&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:'"'}),(0,r.jsx)("span",{children:"number"==typeof e.label?String(e.label):e.label}),(0,r.jsx)("span",{children:'"'}),(0,r.jsx)("span",{children:": "})]}),"scalar"===e.type&&(()=>{let{valueType:t,value:l=""}=e;return"url"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:'"'}),(0,r.jsx)("a",{href:l,className:"text-text_blue_default break-all",children:l}),(0,r.jsx)("span",{children:'"'})]}):"string"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:'"'}),(0,r.jsx)("span",{className:"text-text_blue_default",children:l}),(0,r.jsx)("span",{children:'"'})]}):"boolean"===t?(0,r.jsx)("span",{className:"text-text_blue_default font-bold",children:l}):(0,r.jsx)("span",{className:"text-text_blue_default",children:l})})(),"open"===e.type&&(0,r.jsx)("span",{children:e.open}),"collapsed"===e.type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:e.open}),(0,r.jsx)("span",{onClick:()=>n(e.path),className:"text-text_neutral_secondary italic pl-1 select-none cursor-pointer hover:underline",children:e.preview}),(0,r.jsx)("span",{children:e.close})]}),"close"===e.type&&(0,r.jsx)("span",{children:e.close}),e.comma&&(0,r.jsx)("span",{children:","})]})]})]}),o=({Json:e,Title:t="JSON",ShowCopyButton:l=!0,Height:o=190})=>
1{let[i,d]=(0,n.useState)({}),p=null;try{p="string"==typeof e?JSON.parse(e):e}catch{p=null}let c=(0,n.useCallback)(e=>{d(t=>({...t,[e]:!t[e]}))},[]),u=(0,n.useCallback)(()=>{try{navigator.clipboard.writeText("string"==typeof e?e:JSON.stringify(p,null,2)??"")}catch{}},[e,p]),{lines:h,guides:x}=(0,n.useMemo)(()=>{let e=null!=p?a(p,"root",i,{value:1},0):[];return{lines:e,guides:(e=>{let t=[],l=[];for(let r of e)if("open"===r.type)t.push(new Set(l)),l.push(r.indent);else if("close"===r.type){t.push(new Set(l));let e=l.lastIndexOf(r.indent);-1!==e&&l.splice(e,1)}else t.push(new Set(l));return t})(e)}},[p,i]);return(0,r.jsx)("div",{className:"vgjv-root",children:(0,r.jsxs)("div",{className:"rounded-md border border-solid border-border_neutral_strong bg-bkg_neutral_secondary",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-2.5 border-b border-solid border-border_neutral_strong border-t border-l border-r border-t-transparent border-l-transparent border-r-transparent",children:[(0,r.jsx)("h4",{className:"text-[14px] font-medium leading-6 m-0 text-text_neutral_default",children:t}),l&&(0,r.jsx)("button",{onClick:u,title:"Copy JSON",type:"button",className:"bg-transparent text-text_neutral_default border-0 p-0 cursor-pointer flex items-center justify-center leading-none transition-opacity duration-150",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor",width:"16",height:"16",children:(0,r.jsx)("path",{d:"M400 336l-224 0 0-288 156.1 0 67.9 67.9 0 220.1zM448 96l-96-96-224 0 0 384 320 0 0-288zM48 128l-48 0 0 384 320 0 0-80-48 0 0 32-224 0 0-288 32 0 0-48-32 0z"})})})]}),(0,r.jsx)("div",{className:"overflow-auto text-[.875em] vgjv-mono-font my-4",style:{height:o},children:h.map((e,t)=>(0,r.jsx)(s,{line:e,guides:x[t],collapsed:i,onToggle:c},`${e.path}-${e.indent}-${"close"===e.type?"close":"scalar"===e.type?`s${e.lineNo}`:"open"}`))})]})})}}}]);
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.