text: !function(){var e={258:function(e,t,o){var r=o(81),n=o(645)(r);n.push([e.id,".header-bar-box{width:100%;height:5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 2rem;line-height:5rem;background-color:#3bcc90}.header-bar-box .logo-box{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:.5rem}.header-bar-box .logo-box .logo-icon-container{height:4rem;width:4rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:#245791;border-radius:2rem}.header-bar-box .logo-box .logo-icon-container .logo-icon{width:2rem;height:2rem}.header-bar-box .logo-box .logo-text-box{margin-left:1rem;color:#245791;font-size:1.6rem;font-weight:500}.header-bar-box .logo-box:hover{background-color:rgba(255,255,255,0.3);cursor:pointer}.format-json-box{width:100%;height:40rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box;padding:2rem}.format-json-box .text-label{height:2rem;line-height:2rem;font-size:1.2rem}.format-json-box .source-text-box{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:30rem;min-height:40rem}.format-json-box .source-text-box .source-text-area{display:block;width:100%;height:40rem;resize:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1rem}.format-json-box .format-button{-ms-flex-item-align:center;align-self:center;width:10rem;height:5rem;margin:0 1rem;line-height:5rem;background-color:#245791;color:#FFFFFF;font-size:1.5rem;text-align:center;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.format-json-box .format-button:hover{background-color:#183b64}.format-json-box .result-text-box{position:relative;-webkit-box-flex:3;-ms-flex:3;flex:3;min-width:30rem;min-height:40rem}.format-json-box .result-text-box .result-text-container{height:40rem;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #666666;border-radius:2px;box-sizing:border-box;padding:1rem;overflow:scroll}.format-json-box .result-text-box .result-text-container .result-text{margin:0}.format-json-box .result-text-box .result-text-container .copy-button{display:none;position:absolute;top:4rem;right:2rem;width:4rem;height:2rem;line-height:2rem;text-align:center;font-size:1.2rem;background-color:#cccccc;cursor:pointer;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.format-json-box .result-text-box .result-text-container .copy-button:hover{background-color:#aaaaaa}.format-json-box .result-text-box .result-text-container:hover{border:1px solid #3e3ee0}.format-json-box .result-text-box .result-text-container:hover .copy-button{display:block}\n",""]),e.exports=n},98:function(e,t,o){var r=o(81),n=o(645)(r);n.push([e.id,"html,body{margin:0;padding:0;font-size:12px}.manuscript-app{width:100vw;height:100vh;overflow:auto}\n",""]),e.exports=n},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",r=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),r&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),r&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,r,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var b=[].concat(e[c]);r&&a[b[0]]||(void 0!==i&&(void 0===b[5]||(b[1]="@layer".concat(b[5].length>0?" ".concat(b[5]):""," {").concat(b[1],"}")),b[5]=i),o&&(b[2]?(b[1]="@media ".concat(b[2]," {").concat(b[1],"}"),b[2]=o):b[2]=o),n&&(b[4]?(b[1]="@supports (".concat(b[4],") {").concat(b[1],"}"),b[4]=n):b[4]="".concat(n)),t.push(b))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},379:function(e){"use strict";var t=[];function o(e){for(var o=-1,r=0;r<t.length;r++)if(t[r].identifier===e){o=r;break}return o}function r(e,r){for(var i={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],b=i[c]||0,u="".concat(c," ").concat(b);i[c]=b+1;var d=o(u),x={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(x);else{var p=n(x,r);r.byIndex=s,t.splice(s,0,{identifier:u,updater:p,references:1})}a.push(u)}return a}function n(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,n){var i=r(e=e||[],n=n||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=o(i[a]);t[s].references--}for(var l=r(e,n),c=0;c<i.length;c++){var b=o(i[c]);0===t[b].references&&(t[b].updater(),t.splice(b,1))}i=l}}},569:function(e){"use strict";var t={};e.exports=function(e,o){var r=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,o){"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var n=void 0!==o.layer;n&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,n&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var i=o.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,o),i.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=o(379),t=o.n(e),r=o(795),n=o.n(r),i=o(569),a=o.n(i),s=o(565),l=o.n(s),c=o(216),b=o.n(c),u=o(589),d=o.n(u),x=o(98),p=o.n(x),f={};f.styleTagTransform=d(),f.setAttributes=l(),f.insert=a().bind(null,"head"),f.domAPI=n(),f.insertStyleElement=b(),t()(p(),f),p()&&p().locals&&p().locals;var m=o(258),g=o.n(m),h={};function w({data:e,tabChars:t="\t",tabNumber:o=0,toHTML:r=!1}={data:"",tabChars:"\t",tabNumber:0,toHTML:!1}){const n=new Array(o).fill(t).join("");switch(Object.prototype.toString.call(e)){case"[object Undefined]":return r?'<span style="color: #0000aa;">undefined</span>':"undefined";case"[object Null]":return r?'<span style="color: #0000aa;">null</span>':"null";case"[object String]":return r?`<span style="color: #aaaa00;">"${e.toString()}"</span>`:`"${e.toString()}"`;case"[object Number]":case"[object Boolean]":return r?`<span style="color: #0000aa;">${e.toString()}</span>`:e.toString();case"[object Array]":return e.length?`[\n${n}${t}${e.map((e=>w({data:e,tabChars:t,tabNumber:o+1,toHTML:r}))).join(`,\n${n}${t}`)}\n${n}]`:"[]";case"[object Object]":return Object.keys(e).length?`{\n${n}${t}${Object.keys(e).map((n=>`"${n}":${t}${w({data:e[n],tabChars:t,tabNumber:o+1,toHTML:r})}`)).join(`,\n${n}${t}`)}\n${n}}`:"{}";default:return console.log(Object.prototype.toString.call(e)),e}}h.styleTagTransform=d(),h.setAttributes=l(),h.insert=a().bind(null,"head"),h.domAPI=n(),h.insertStyleElement=b(),t()(g(),h),g()&&g().locals&&g().locals,console.log("Format JSON String"),document.getElementById("logoBox").addEventListener("click",(()=>{window.location.assign("..")}));const y=document.getElementById("resultText"),v=document.getElementById("sourceText");document.getElementById("formatButton").addEventListener("click",(()=>{const e=v.value;let t="";try{t=JSON.parse(e)}catch(e){if(console.error(e),e.message.match(/position (\d*)/g),0===RegExp.$1||RegExp.$1){const t=v.value[RegExp.$1],o=v.value.split("");o.splice(RegExp.$1,1,`<span style="color: red;">${t}</span>`),y.innerHTML=`<span style="color: red;">${e.message}</span>\n${o.join("")}`}else y.innerHTML=`<span style="color: red;">${e.message}</span>`;return}y.innerHTML=w({data:JSON.parse(e),tabChars:"  ",toHTML:!0})})),document.getElementById("copyButton").addEventListener("click",(()=>{const e=v.value;e?navigator.clipboard.writeText(w({data:JSON.parse(e),tabChars:"  "})).then((()=>{console.log("复制成功"),window.alert("复制成功")}),(()=>{console.log("复制失败"),window.alert("复制失败")})):window.alert("请输入需格式化的源字符串")}))}()}();