PageSourceSearch

https://www.aat.org.uk/csr/chunk-OZOOUQCU.js

js aat.org.uk collected 2026-10-03 21:40:17 UTC 4,377 bytes, 1 lines download raw bytes

1import{a as z,b as G}from"./chunk-WQ7N6GI5.js";import{a as V,b as W}from"./chunk-5T5T7ANT.js";import{a as D,b as L}from"./chunk-2L7BC3FF.js";import{ra as A,sa as q}from"./chunk-WPHW6CRH.js";import{K as N,c as I,h as F,o as E}from"./chunk-76O7YCWW.js";import{v as k}from"./chunk-PO2RDVKE.js";import{Ac as P,Ec as j,Fc as T,Gc as O,Ic as J,Lc as B,Mb as x,Pb as b,Rb as M,Tc as m,Uc as f,Wb as v,Xb as s,Yb as c,ca as y,db as p,ha as h,jc as S,lc as w,pb as g,ub as _,xb as C,zc as d}from"./chunk-3URBZWPM.js";import{i as u}from"./chunk-ODN5LVDJ.js";var K=(()=>{let t=class t{constructor(){}jsonToSchemaTop(e){if(Array.isArray(e)){let n={type:"array",items:[]};return e.forEach(o=>{n.items.push(this.jsonToSchema(o))}),n}else return this.jsonToSchema(e)}jsonToSchema(e){let n={type:typeof e,required:[],properties:{}};for(let o in e)if(e.hasOwnProperty(o)&&e[o]!==null){let r=e[o],a=Array.isArray(r)?"array":typeof r;n.required.push(o),a==="object"?n.properties[o]=this.jsonToSchema(r):a==="array"?n.properties[o]={type:"array",items:typeof r[0]=="object"?this.jsonToSchema(r[0]):{type:typeof r[0]}}:n.properties[o]={type:a}}else n.required.push(o),n.properties[o]={anyOf:[{type:typeof e[o]},{type:"null"}]};return n}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var l=(()=>{let t=class t{constructor(e){this.jsonSchemaService=e}transform(e){if(this._isValidJson(e))return this.jsonSchemaService.jsonToSchemaTop(JSON.parse(e))}_isValidJson(e){try{return JSON.parse(e),!0}catch{}}};t.\u0275fac=function(n){return new(n||t)(g(K,16))},t.\u0275pipe=C({name:"jsonSchema",type:t,pure:!0});let i=t;return i})();function U(i,t){if(i&1&&(s(0,"pre",5),d(1),m(2,"jsonSchema"),m(3,"json"),c()),i&2){let Q=w();p(),P(f(3,3,f(2,1,Q.json)))}}var de=(()=>{let t=class t{constructor(){this._schemaPipe=h(l),this.copyButton={label:"Copy schema",action:()=>u(this,null,function*(){yield window.navigator.clipboard.writeText(JSON.stringify(this._schemaPipe.transform(this.json))).then().catch(e=>console.error(e))})}}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_({type:t,selectors:[["app-json-converter"]],features:[B([l])],decls:11,vars:5,consts:[[1,"flex","gap-2"],["variant","on",1,"w-1/2"],["rows","20","pTextarea","","name","jsonInput","id","jsonInput",1,"w-full","h-[50vh]",3,"ngModelChange","ngModel"],["for","jsonInput"],[1,"w-1/2","overflow-scroll","h-[50vh]"],[1,"overflow-scroll"],[1,"flex","justify-end-safe","mt-5"],[3,"onClick","label"]],template:function(n,o){n&1&&(s(0,"section")(1,"p-card")(2,"div",0)(3,"p-floatlabel",1)(4,"textarea",2),O("ngModelChange",function(a){return T(o.json,a)||(o.json=a),a}),c(),s(5,"label",3),d(6,"JSON"),c()(),s(7,"p-card",4),b(8,U,4,5,"pre",5),c()(),s(9,"div",6)(10,"p-button",7),S("onClick",function(){return o.copyButton.action()}),c()()()()),n&2&&(p(4),j("ngModel",o.json),p(4),M(o.json?8:-1),p(2),v("label",J(o.copyButton.label)),x("data-auto",o.copyButton.label))},dependencies:[W,V,N,I,F,E,G,z,L,D,q,A,k,l],styles:["[_ngcontent-%COMP%]:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.main[_ngcontent-%COMP%]{display:flex}.main__content[_ngcontent-%COMP%]{flex-basis:85%;max-width:80%;margin:auto}.data-container[_ngcontent-%COMP%]{background-color:#eee;display:flex;flex-direction:column}.data-container__beside[_ngcontent-%COMP%]{flex-direction:row}.data-container__beside--content[_ngcontent-%COMP%]{flex-grow:1;margin:10px}.data-container__content[_ngcontent-%COMP%]{background-color:#fff;max-width:90%;min-width:85%;margin:15px auto;padding:15px;font-size:smaller}.data-container__content--json-toggle[_ngcontent-%COMP%]{margin:10px 0;display:flex;justify-content:flex-end}.data-container__content--json-display[_ngcontent-%COMP%]{border:thin solid rgb(238.425,238.425,238.425);padding:5px}.data-container__content--box[_ngcontent-%COMP%]{padding:15px;border-bottom:thin solid rgb(238.425,238.425,238.425)}.data-container__double-panel[_ngcontent-%COMP%]{display:grid;grid-template-columns:48% 48%}.data-container__loader[_ngcontent-%COMP%]{background-color:#fff}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:10px}.button-container--single[_ngcontent-%COMP%]{justify-content:flex-end}"]});let i=t;return i})();export{de as JsonConverterComponent};

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.