@kit-data-manager/visualization-component
Version:
The visualization-component is a dynamic, interactive graph component built using D3.js. It is designed to render graphs based on provided JSON data, making it ideal for visualizing complex relationships and networks in an intuitive manner.
3 lines • 11.5 kB
JavaScript
const t="visualization-component";let n;let e;let s=false;let l=false;const o=(t,n="")=>{{return()=>{}}};const c=(t,n)=>{{return()=>{}}};const i="{visibility:hidden}.hydrated{visibility:inherit}";const f="slot-fb{display:contents}slot-fb[hidden]{display:none}";const r={};const u="http://www.w3.org/2000/svg";const a="http://www.w3.org/1999/xhtml";const d=t=>t!=null;const h=t=>{t=typeof t;return t==="object"||t==="function"};function y(t){var n,e,s;return(s=(e=(n=t.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&s!==void 0?s:undefined}const v=(t,n,...e)=>{let s=null;let l=null;let o=false;let c=false;const i=[];const f=n=>{for(let e=0;e<n.length;e++){s=n[e];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(o=typeof t!=="function"&&!h(s)){s=String(s)}if(o&&c){i[i.length-1].t+=s}else{i.push(o?p(null,s):s)}c=o}}};f(e);if(n){if(n.key){l=n.key}}const r=p(t,null);r.l=n;if(i.length>0){r.o=i}{r.i=l}return r};const p=(t,n)=>{const e={u:0,h:t,t:n,v:null,o:null};{e.l=null}{e.i=null}return e};const m={};const $=t=>t&&t.h===m;const w=(t,n)=>{if(t!=null&&!h(t)){if(n&4){return t==="false"?false:t===""||!!t}if(n&1){return String(t)}return t}return t};const b=t=>lt(t).$hostElement$;const g=(t,n,e)=>{const s=yt.ce(n,e);t.dispatchEvent(s);return s};const S=new WeakMap;const j=(t,n,e)=>{let s=at.get(t);if(pt&&e){s=s||new CSSStyleSheet;if(typeof s==="string"){s=n}else{s.replaceSync(n)}}else{s=n}at.set(t,s)};const k=(t,n,e)=>{var s;const l=C(n);const o=at.get(l);t=t.nodeType===11?t:ht;if(o){if(typeof o==="string"){t=t.head||t;let e=S.get(t);let c;if(!e){S.set(t,e=new Set)}if(!e.has(l)){{c=ht.createElement("style");c.innerHTML=o;const n=(s=yt.p)!==null&&s!==void 0?s:y(ht);if(n!=null){c.setAttribute("nonce",n)}t.insertBefore(c,t.querySelector("link"))}if(n.u&4){c.innerHTML+=f}if(e){e.add(l)}}}else if(!t.adoptedStyleSheets.includes(o)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]}}return l};const O=t=>{const n=t.m;const e=t.$hostElement$;const s=n.u;const l=o("attachStyles",n.$);const c=k(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);if(s&10){e["s-sc"]=c;e.classList.add(c+"-h")}l()};const C=(t,n)=>"sc-"+t.$;const M=(t,n,e,s,l,o)=>{if(e!==s){let c=it(t,n);n.toLowerCase();if(n==="style"){{for(const n in e){if(!s||s[n]==null){if(n.includes("-")){t.style.removeProperty(n)}else{t.style[n]=""}}}}for(const n in s){if(!e||s[n]!==e[n]){if(n.includes("-")){t.style.setProperty(n,s[n])}else{t.style[n]=s[n]}}}}else if(n==="key");else{const i=h(s);if((c||i&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(n==="list"){c=false}else if(e==null||t[n]!=l){t[n]=l}}else{t[n]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(n)===""){{t.removeAttribute(n)}}}else if((!c||o&4||l)&&!i){s=s===true?"":s;{t.setAttribute(n,s)}}}}};const P=(t,n,e,s)=>{const l=n.v.nodeType===11&&n.v.host?n.v.host:n.v;const o=t&&t.l||r;const c=n.l||r;{for(s in o){if(!(s in c)){M(l,s,o[s],undefined,e,n.u)}}}for(s in c){M(l,s,o[s],c[s],e,n.u)}};const x=(t,l,o,c)=>{const i=l.o[o];let f=0;let r;let h;{if(!s){s=i.h==="svg"}r=i.v=ht.createElementNS(s?u:a,i.h);if(s&&i.h==="foreignObject"){s=false}{P(null,i,s)}if(d(n)&&r["s-si"]!==n){r.classList.add(r["s-si"]=n)}if(i.o){for(f=0;f<i.o.length;++f){h=x(t,i,f);if(h){r.appendChild(h)}}}{if(i.h==="svg"){s=false}else if(r.tagName==="foreignObject"){s=true}}}r["s-hn"]=e;return r};const E=(t,n,s,l,o,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===e){i=i.shadowRoot}for(;o<=c;++o){if(l[o]){f=x(null,s,o);if(f){l[o].v=f;i.insertBefore(f,n)}}}};const U=(t,n,e)=>{for(let s=n;s<=e;++s){const n=t[s];if(n){const t=n.v;if(t){t.remove()}}}};const A=(t,n,e,s,l=false)=>{let o=0;let c=0;let i=0;let f=0;let r=n.length-1;let u=n[0];let a=n[r];let d=s.length-1;let h=s[0];let y=s[d];let v;let p;while(o<=r&&c<=d){if(u==null){u=n[++o]}else if(a==null){a=n[--r]}else if(h==null){h=s[++c]}else if(y==null){y=s[--d]}else if(L(u,h,l)){N(u,h,l);u=n[++o];h=s[++c]}else if(L(a,y,l)){N(a,y,l);a=n[--r];y=s[--d]}else if(L(u,y,l)){N(u,y,l);t.insertBefore(u.v,a.v.nextSibling);u=n[++o];y=s[--d]}else if(L(a,h,l)){N(a,h,l);t.insertBefore(a.v,u.v);a=n[--r];h=s[++c]}else{i=-1;{for(f=o;f<=r;++f){if(n[f]&&n[f].i!==null&&n[f].i===h.i){i=f;break}}}if(i>=0){p=n[i];if(p.h!==h.h){v=x(n&&n[c],e,i)}else{N(p,h,l);n[i]=undefined;v=p.v}h=s[++c]}else{v=x(n&&n[c],e,c);h=s[++c]}if(v){{u.v.parentNode.insertBefore(v,u.v)}}}}if(o>r){E(t,s[d+1]==null?null:s[d+1].v,e,s,c,d)}else if(c>d){U(n,o,r)}};const L=(t,n,e=false)=>{if(t.h===n.h){if(!e){return t.i===n.i}return true}return false};const N=(t,n,e=false)=>{const l=n.v=t.v;const o=t.o;const c=n.o;const i=n.h;{{s=i==="svg"?true:i==="foreignObject"?false:s}{{P(t,n,s)}}if(o!==null&&c!==null){A(l,o,n,c,e)}else if(c!==null){E(l,null,n,c,0,c.length-1)}else if(o!==null){U(o,0,o.length-1)}if(s&&i==="svg"){s=false}}};const T=(t,s,l=false)=>{const o=t.$hostElement$;const c=t.S||p(null,null);const i=$(s)?s:v(null,null,s);e=o.tagName;if(l&&i.l){for(const t of Object.keys(i.l)){if(o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){i.l[t]=o[t]}}}i.h=null;i.u|=4;t.S=i;i.v=c.v=o.shadowRoot||o;{n=o["s-sc"]}N(c,i,l)};const R=(t,n)=>{if(n&&!t.j&&n["s-p"]){n["s-p"].push(new Promise((n=>t.j=n)))}};const W=(t,n)=>{{t.u|=16}if(t.u&4){t.u|=512;return}R(t,t.k);const e=()=>q(t,n);return jt(e)};const q=(t,n)=>{const e=o("scheduleUpdate",t.m.$);const s=t.O;let l;e();return z(l,(()=>F(t,s,n)))};const z=(t,n)=>D(t)?t.then(n):n();const D=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const F=async(t,n,e)=>{var s;const l=t.$hostElement$;const c=o("update",t.m.$);const i=l["s-rc"];if(e){O(t)}const f=o("render",t.m.$);{H(t,n,l,e)}if(i){i.map((t=>t()));l["s-rc"]=undefined}f();c();{const n=(s=l["s-p"])!==null&&s!==void 0?s:[];const e=()=>I(t);if(n.length===0){e()}else{Promise.all(n).then(e);t.u|=4;n.length=0}}};const H=(t,n,e,s)=>{try{n=n.render();{t.u&=~16}{t.u|=2}{{{T(t,n,s)}}}}catch(n){ft(n,t.$hostElement$)}return null};const I=t=>{const n=t.m.$;const e=t.$hostElement$;const s=o("postUpdate",n);const l=t.O;const c=t.k;if(!(t.u&64)){t.u|=64;{B(e)}{_(l,"componentDidLoad")}s();{t.C(e);if(!c){V()}}}else{s()}{if(t.j){t.j();t.j=undefined}if(t.u&512){St((()=>W(t,false)))}t.u&=~(4|512)}};const V=n=>{{B(ht.documentElement)}St((()=>g(dt,"appload",{detail:{namespace:t}})))};const _=(t,n,e)=>{if(t&&t[n]){try{return t[n](e)}catch(t){ft(t)}}return undefined};const B=t=>t.classList.add("hydrated");const G=(t,n)=>lt(t).M.get(n);const J=(t,n,e,s)=>{const l=lt(t);const o=l.$hostElement$;const c=l.M.get(n);const i=l.u;const f=l.O;e=w(e,s.P[n][0]);const r=Number.isNaN(c)&&Number.isNaN(e);const u=e!==c&&!r;if((!(i&8)||c===undefined)&&u){l.M.set(n,e);if(f){if(s.U&&i&128){const t=s.U[n];if(t){t.map((t=>{try{f[t](e,c,n)}catch(t){ft(t,o)}}))}}if((i&(2|16))===2){W(l,false)}}}};const K=(t,n,e)=>{var s;const l=t.prototype;if(n.P){if(t.watchers){n.U=t.watchers}const o=Object.entries(n.P);o.map((([t,[s]])=>{if(s&31||e&2&&s&32){Object.defineProperty(l,t,{get(){return G(this,t)},set(e){J(this,t,e,n)},configurable:true,enumerable:true})}}));if(e&1){const e=new Map;l.attributeChangedCallback=function(t,s,o){yt.jmp((()=>{var c;const i=e.get(t);if(this.hasOwnProperty(i)){o=this[i];delete this[i]}else if(l.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==o){return}else if(i==null){const e=lt(this);const l=e===null||e===void 0?void 0:e.u;if(l&&!(l&8)&&l&128&&o!==s){const l=e.O;const i=(c=n.U)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((n=>{if(l[n]!=null){l[n].call(l,o,s,t)}}))}return}this[i]=o===null&&typeof this[i]==="boolean"?false:o}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=n.U)!==null&&s!==void 0?s:{}),...o.filter((([t,n])=>n[0]&15)).map((([t,n])=>{const s=n[1]||t;e.set(s,t);return s}))]))}}return t};const Q=async(t,n,e,s)=>{let l;if((n.u&32)===0){n.u|=32;const s=e.A;if(s){l=ut(e);if(l.then){const t=c();l=await l;t()}if(!l.isProxied){{e.U=l.watchers}K(l,e,2);l.isProxied=true}const t=o("createInstance",e.$);{n.u|=8}try{new l(n)}catch(t){ft(t)}{n.u&=~8}{n.u|=128}t();X(n.O)}else{l=t.constructor;customElements.whenDefined(e.$).then((()=>n.u|=128))}if(l.style){let t=l.style;const n=C(e);if(!at.has(n)){const s=o("registerStyles",e.$);j(n,t,!!(e.u&1));s()}}}const i=n.k;const f=()=>W(n,true);if(i&&i["s-rc"]){i["s-rc"].push(f)}else{f()}};const X=t=>{{_(t,"connectedCallback")}};const Y=t=>{if((yt.u&1)===0){const n=lt(t);const e=n.m;const s=o("connectedCallback",e.$);if(!(n.u&1)){n.u|=1;{let e=t;while(e=e.parentNode||e.host){if(e["s-p"]){R(n,n.k=e);break}}}if(e.P){Object.entries(e.P).map((([n,[e]])=>{if(e&31&&t.hasOwnProperty(n)){const e=t[n];delete t[n];t[n]=e}}))}{Q(t,n,e)}}else{if(n===null||n===void 0?void 0:n.O){X(n.O)}else if(n===null||n===void 0?void 0:n.L){n.L.then((()=>X(n.O)))}}s()}};const Z=t=>{};const tt=async t=>{if((yt.u&1)===0){const n=lt(t);if(n===null||n===void 0?void 0:n.O);else if(n===null||n===void 0?void 0:n.L){n.L.then((()=>Z()))}}};const nt=(t,n={})=>{var e;const s=o();const l=[];const c=n.exclude||[];const r=dt.customElements;const u=ht.head;const a=u.querySelector("meta[charset]");const d=ht.createElement("style");const h=[];let v;let p=true;Object.assign(yt,n);yt.N=new URL(n.resourcesUrl||"./",ht.baseURI).href;let m=false;t.map((t=>{t[1].map((n=>{var e;const s={u:n[0],$:n[1],P:n[2],T:n[3]};if(s.u&4){m=true}{s.P=n[2]}{s.U=(e=n[4])!==null&&e!==void 0?e:{}}const o=s.$;const i=class extends HTMLElement{constructor(t){super(t);t=this;ct(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(v){clearTimeout(v);v=null}if(p){h.push(this)}else{yt.jmp((()=>Y(this)))}}disconnectedCallback(){yt.jmp((()=>tt(this)))}componentOnReady(){return lt(this).L}};s.A=t[0];if(!c.includes(o)&&!r.get(o)){l.push(o);r.define(o,K(i,s,1))}}))}));if(l.length>0){if(m){d.textContent+=f}{d.textContent+=l+i}if(d.innerHTML.length){d.setAttribute("data-styles","");const t=(e=yt.p)!==null&&e!==void 0?e:y(ht);if(t!=null){d.setAttribute("nonce",t)}u.insertBefore(d,a?a.nextSibling:u.firstChild)}}p=false;if(h.length){h.map((t=>t.connectedCallback()))}else{{yt.jmp((()=>v=setTimeout(V,30)))}}s()};const et=t=>yt.p=t;const st=new WeakMap;const lt=t=>st.get(t);const ot=(t,n)=>st.set(n.O=t,n);const ct=(t,n)=>{const e={u:0,$hostElement$:t,m:n,M:new Map};{e.L=new Promise((t=>e.C=t));t["s-p"]=[];t["s-rc"]=[]}return st.set(t,e)};const it=(t,n)=>n in t;const ft=(t,n)=>(0,console.error)(t,n);const rt=new Map;const ut=(t,n,e)=>{const s=t.$.replace(/-/g,"_");const l=t.A;const o=rt.get(l);if(o){return o[s]}
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((t=>{{rt.set(l,t)}return t[s]}),ft)};const at=new Map;const dt=typeof window!=="undefined"?window:{};const ht=dt.document||{head:{}};const yt={u:0,N:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const vt=t=>Promise.resolve(t);const pt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const mt=[];const $t=[];const wt=(t,n)=>e=>{t.push(e);if(!l){l=true;if(n&&yt.u&4){St(gt)}else{yt.raf(gt)}}};const bt=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){ft(t)}}t.length=0};const gt=()=>{bt(mt);{bt($t);if(l=mt.length>0){yt.raf(gt)}}};const St=t=>vt().then(t);const jt=wt($t,true);export{nt as b,b as g,v as h,vt as p,ot as r,et as s};
//# sourceMappingURL=p-d3a03820.js.map