1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[976],{8791:()=>{},14925:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(22174),o=n(65162);let i=function(){let[e,t]=(0,o.useState)(!1);return()=>{e||((0,r.wD)(),t(!0))}}},15976:(e,t,n)=>{"use strict";n.d(t,{A:()=>en});var r,o,i=n(4930);n(77139);var a=n(77518),s=n.n(a),l=n(65162),c=n(32371),u=n(99579),d=n(68569),f=n(61018),m=n.n(f),g=n(52764),p=n(99253),h=function(e){if(!e)return 0;var t=m()(e).valueOf()-Date.now();return t<0?0:t};let v=function(e){void 0===e&&(e={});var t=e||{},n=t.leftTime,r=t.targetDate,o=t.interval,i=void 0===o?1e3:o,a=t.onEnd,s=(0,l.useMemo)(function(){return(0,p.Et)(n)&&n>0?Date.now()+n:void 0},[n]),c="leftTime"in e?s:r,u=(0,d.zs)((0,l.useState)(function(){return h(c)}),2),f=u[0],m=u[1],v=(0,g.A)(a);(0,l.useEffect)(function(){if(!c)return void m(0);m(h(c));var e=setInterval(function(){var t,n=h(c);m(n),0===n&&(clearInterval(e),null==(t=v.current)||t.call(v))},i);return function(){return clearInterval(e)}},[c,i]);var y=(0,l.useMemo)(function(){return{days:Math.floor(f/864e5),hours:Math.floor(f/36e5)%24,minutes:Math.floor(f/6e4)%60,seconds:Math.floor(f/1e3)%60,milliseconds:Math.floor(f)%1e3}},[f]);return[f,y]};var y=n(4577),S=n.n(y),N=n(26980),j=n(24641),x=n(6185),A=n(71298),b=n(97847),w=n.n(b),C=n(37211),O=n.n(C);n(41200);var J=n(83356),I=n(47805),M=n(33202),E=n.n(M),L=n(49097),T=n.n(L);let k=/("(?:[^\\"]|\\.)*")|[:,]/g;var D=n(87422),P=n(87426),$=n(40284),R=n(34081),F=n(94408),_=n(33147),V=n(85466),z=n(67197),K=n(80805),q=n(81394),W=n(14925),U=n(22174),X=n(87673);let B=s()(()=>n.e(461).then(n.bind(n,37461)),{loadableGenerated:{webpack:()=>[37461]},ssr:!1,loading:()=>(0,i.jsx)("div",{children:"Loading editor..."})}),G="formatter.json.formatStyle",H="formatter.json.leftPaneFlex",Y="line-widgets-container",Z=`{ 2 // JSON5 supports comment 3 "url": "https://json-5.com", 4 // Key without quotes is allowed: 5 unquoted: "string", 6}`;var Q=((r=Q||{}).Unfold="Unfold",r.Fold="Fold",r),ee=((o=ee||{}).Minified="Minified",o.Compact="Compact",o.Expanded="Expanded",o);let et=(e,t)=>"Compact"===t?function(e,t={}){let n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),r=""===n?1/0:void 0===t.maxLength?80:t.maxLength,{replacer:o}=t;return function e(t,i,a){t&&"function"==typeof t.toJSON&&(t=t.toJSON());let s=JSON.stringify(t,o);if(void 0===s)return s;let l=r-i.length-a;if(s.length<=l){let e=s.replace(k,(e,t)=>t||`${e} `);if(e.length<=l)return e}if(null!=o&&(t=JSON.parse(s),o=void 0),"object"==typeof t&&null!==t){let r,o,a=i+n,s=[],l=0;if(Array.isArray(t)){r="[",o="]";let{length:n}=t;for(;l<n;l++)s.push(e(t[l],a,+(l!==n-1))||"null")}else{r="{",o="}";let n=Object.keys(t),{length:i}=n;for(;l<i;l++){let r=n[l],o=`${JSON.stringify(r)}: `,c=e(t[r],a,o.length+ +(l!==i-1));void 0!==c&&s.push(o+c)}}if(s.length>0)return[r,n+s.join(`, 7${a}`),o].join(` 8${i}`)}return s}(e,"",0)}(e):"Minified"===t?JSON.stringify(e):JSON.stringify(e,null,2),en=e=>{let{notification:t}=N.A.useApp(),r=l.useRef(null),o=(0,l.useRef)(null),a=(0,l.useRef)(null),s=(0,l.useRef)(null),[d,f]=(0,l.useState)(!1),[m,g]=(0,l.useState)(!1),[p,h]=l.useState(),y=(0,l.useRef)(void 0),[b,C]=(0,u.A)("Fold","Unfold"),[M,L]=(0,u.A)(!1,!0),k=(0,P.A)(),Q=(0,$.A)(),en=(0,V.I)(),er=(0,W.A)();(0,l.useEffect)(()=>{(async()=>{(await n.e(632).then(n.bind(n,38632))).default.config({paths:{vs:I.A.getMonacoEditorPath()}})})()},[]),v({leftTime:5e3,onEnd:async()=>{o?.current?.editorInstance?(0,U.C9)(U.r8.monacoLoadSuccess):((0,U.C9)(U.r8.monacoLoadFail),t.warning({message:"Connection lost. Reloading..."}),await I.A.sleep(1e3),location.href="/")}}),(0,l.useEffect)(()=>{setInterval(()=>{g(!0)},1e3)},[]),(0,l.useEffect)(()=>{y.current=p},[p]);let eo=E().debounce(e=>{r?.current?.mergeActiveTabData({inputText:e})},500);(0,l.useEffect)(()=>{let e=localStorage.getItem(G),t=E().values(ee);e&&t?.includes(e)?h(e):h("Expanded")},[]);let ei=()=>{var e;let t,n=(0,K.eS)(o.current?.editorInstance);try{if(n){let e=T().parse(n);t=et(e,p)}else t="";f(!1)}catch(e){f(!0),t=e.toString()}e=t,a?.current?.editorInstance?.setValue(e)};(0,l.useEffect)(()=>{ei()},[p]),(0,R.A)("meta.b",e=>{L.toggle()});let ea=l.useMemo(()=>
8{if(!Q)return .35;if(M)return 0;let e=parseFloat(window?.localStorage?.getItem(H))||.35;return e>.9?.9:e<.1?.1:e},[Q&&window?.localStorage?.getItem(H),M]),es=(0,i.jsxs)("div",{className:"editor-container placeholder",children:[(0,i.jsxs)("h1",{children:["JSON5: Online Editor for Formatting & Minification ",(0,i.jsx)(D.A,{})," "]}),(0,i.jsx)("p",{children:"A JSON5 formatting tool is a program, website, or browser extension that helps you make your JSON5 code easier to read and understand. JSON5 is a format very similar to JSON, but it allows for some extra features that can make working with it by hand more convenient."}),(0,i.jsx)("p",{children:"A JSON5 minification tool is essentially the opposite of a formatting tool. Instead of making your JSON5 code easier to read by humans, it aims to reduce its file size for efficiency. This is particularly useful for situations where bandwidth or storage space is limited, such as in web applications."})]}),el=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(J.u$,{orientation:"vertical",className:"editor-container",children:[(0,i.jsx)(J.LT,{flex:ea,className:"left-pane",onResize:e=>{let{flex:t}=e.component.props;window.localStorage.setItem(H,`${t}`)},children:(0,i.jsx)(B,{defaultLanguage:"typescript",onMount:(e,t)=>{o.current={editorInstance:e,monacoInstance:t},e?.focus(),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0,onlyVisible:!0}),e.onDidChangeCursorPosition(()=>{s?.current?.computeJsonPath(e)})},options:{...z.C,lineNumbersMinChars:1},onChange:(e,t)=>
8{eo(e),ei(),t?.isFlush||er()}})}),(0,i.jsx)(J.kT,{}),(0,i.jsxs)(J.LT,{name:"rightPane",children:[(0,i.jsx)(B,{defaultLanguage:"json",onMount:(e,n)=>{a.current={editorInstance:e,monacoInstance:n},e.onDidChangeCursorPosition(()=>{((e,n)=>{if(E().isNil(e)||E().isNil(n))return;e.removeContentWidget({getId:()=>Y});let r=(0,K.T_)(e),o=(0,K.AX)(e);if(["]","}"].includes(r)&&!(o?.length>1))return;let s=e.getPosition(),l={column:1,lineNumber:s?.lineNumber||1};e.addContentWidget({allowEditorOverflow:!0,suppressMouseDown:!0,getDomNode(){let e=document.createElement("div");return e.className=Y,(0,c.createRoot)(e).render((e=>{let n=a.current?.editorInstance,r=(0,K.T_)(n);if(["}","]","},","],"].includes(r?.trim()))return null;let o=(0,i.jsx)(j.Ay,{className:"line-copy-btn",type:"primary",size:"small",onClick:()=>{if(!n)return;let r=n?.getModel(),o=!1,i=0,a=0,s="",l=r?.getLineCount()||1;for(let t=e;t<=l;t++){let e=r?.getLineContent(t).trim()||"";for(let t=0;t<e.length;t++){let n=e[t],r=e[t-1];'"'===n&&"\\"!==r?o=!o:!o&&("{"===n?i++:"}"===n?i--:"["===n?a++:"]"===n&&a--),s+=n}if(0===i&&0===a)break}","===s[s.length-1]&&(s=s.substring(0,s.length-1)),"{"!==s[0]&&(s=`{${s} } `);try{let e;O()(et((e=s,T().parse(e)),y.current)),t.success({duration:1,message:"Content Copied!"})}catch(e){t.error({duration:4,message:"JSON data is invalid."})}},children:"Copy"});return(0,i.jsx)("div",{className:"action-bar",children:(0,i.jsx)(x.A,{title:"Copy current JSON object",placement:"left",children:o})})})(s?.lineNumber)),e},getId:()=>Y,getPosition:()=>({position:l,preference:[n.editor.ContentWidgetPositionPreference.EXACT]})})})(e,n),s?.current?.computeJsonPath(e)})},options:z.C,onChange:(e,t)=>
8{}}),!en&&!d&&(0,i.jsx)("div",{className:"editor-topbar",children:(0,i.jsx)(A.Ay.Group,{className:"format-style-radio-group",options:[{label:"Minified",value:"Minified"},{label:"Compact",value:"Compact"},{label:"Expanded",value:"Expanded"}],onChange:e=>{var t;h(t=e.target.value),localStorage.setItem(G,t)},value:p,size:"small"})})]})]}),(0,i.jsx)(q.A,{ref:s})]});return(0,i.jsxs)("div",{className:S()("json-editor-container",{"hide-y":m}),children:[(0,i.jsxs)(w(),{children:[(0,i.jsx)("title",{children:"JSON Formatter Online - Prettify / Minify / Verify JSON"}),(0,i.jsx)(_.A,{domain:"json-5.com",path:""}),(0,i.jsx)("meta",{name:"description",content:"Looking for a VS Code-like JSON5 editor that offers an error-free editing experience? Look no further than our JSON editor, which is designed to be compatible with both JSON and JSON5. With our editor, you can easily create, edit, and manage your JSON files with ease, all while enjoying the familiar and intuitive interface of VS Code. "})]}),(0,i.jsx)(X.Ay,{}),(0,i.jsx)(F.A,{ref:r,tabItemsStorageKey:"formatter.json.tabItems",activeTabKeyStorageKey:"formatter.json.activeTabKey",size:"small",type:"editable-card",firstTabItemData:{inputText:Z},newTabItemData:{inputText:"",outputText:""},onActiveTabKeyChange:async(e,t)=>{if(t?.data){let{inputText:e,outputText:n}=t.data;await I.A.waitUntil(async()=>!!o.current&&!!a.current),o?.current?.editorInstance?.setValue(e)}}}),k?es:el]})}},22174:(e,t,n)=>{"use strict";n.d(t,{C9:()=>a,r8:()=>i,wD:()=>s});var r,o=n(47805);n(33202);var i=((r={}).monacoLoadSuccess="monacoLoadSuccess",r.monacoLoadFail="monacoLoadFail",r);let a=e=>{try{if(o.A.isAdmin())return;window.__aemSendEvent(e),console.log("aemEvent",e)}catch(e){console.warn("aemEvent",e)}},s=async()=>{let e="AW-978306195/Sll4CIbA05wYEJOJv9ID";try{if(o.A.isAdmin())return;await o.A.sleep(3e3),window.gtag("event","conversion",{send_to:e}),console.log("aaa gtagReportConversion",e)}catch(e){console.error("gtagReportConversion",e)}}},40284:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65162);let o=function(){return r.useMemo(()=>!0,[])}},77139:()=>{},80805:(e,t,n)=>{"use strict";n.d(t,{AX:()=>o,T_:()=>r,eS:()=>i});let r=e=>{let t=e?.getPosition(),n=e?.getModel();return n?.getLineContent(t?.lineNumber||1).trim()||""},o=e=>{let t=e?.getModel();return t?.getLinesContent()},i=e=>{let t=e?.getModel();return t?.getLinesContent()?.join("\n")}},81394:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(4930);n(8791);var o=n(65162),i=n(80805),a=n(47150);let s=["A-Z","\xc0-\xd6","\xd8-\xf6","\xf8-\xff"];var l=n(26980),c=n(58519),u=n(6185),d=n(37211),f=n.n(d),m=n(22824);let g=o.forwardRef((e,t)=>{let{notification:n}=l.A.useApp(),[d,g]=(0,o.useState)([]);return o.useImperativeHandle(t,()=>({computeJsonPath:e=>{var t;let n,r=e?.getPosition(),o=e?.getModel(),l=(0,i.AX)(e).join("\n"),c=o.getOffsetAt(r);g((t={useBracketNotation:!1,quote:"Double"},""===(n=a.g$(l,c)).path[n.path.length-1]&&n.path.pop(),n.path.map((e,n)=>{var r,o,i,a,l,c;let u,d,f;return r=e,o=0===n,i=t,Number.isInteger(r)?`[${r}]`:(a=r,u=s.join(""),!RegExp(`^[${u}_$]+[${u}_$0-9]*$`,"gi").test(a.toString())||i?.useBracketNotation)?(l=r,c=i,d=JSON.stringify(l),f='"',c?.quote==="Single"?f="'":c?.quote==="Double"&&(f='"'),d=d.replace(/^"|"$/g,f),`[${d}]`):o?r.toString():"."+r})))}})),(0,o.useMemo)(()=>{let e=[].concat((d||[]).map((e,t)=>(0,r.jsx)(c.A.Item,{children:e},t))),t=d?.join("");return(0,r.jsxs)("div",{className:"component-json-path",children:[(0,r.jsxs)("span",{className:"home",children:[(0,r.jsx)(m.A,{className:"mr-1"}),"JSON Path:"]}),(0,r.jsx)(c.A,{separator:">",children:e}),t&&(0,r.jsx)(u.A,{placement:"topLeft",title:(0,r.jsxs)(r.Fragment,{children:["Copy JSON Path: ",t]}),children:(0,r.jsx)("a",{className:"copy-path-btn",onClick:()=>{f()(t),n.success({message:"JSON path copied."})},children:"Copy JSON Path"})})]})},[d])})},85466:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var r=n(65162),o=n(64967);let i=()=>{let e=r.useRef(window.document.body),t=(0,o.A)(e);return!!t&&t.width<600}},87426:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65162);let o=function(){let e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}}}]);
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.