@glycanage/web-components 1.32.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,2 @@
1
- import{c as ne,S as ae,i as de,f as V,s as me,a as ce,e as d,b,d as Y,g as y,n as _,h as x,o as pe,t as z,j as c,k as n,l as i,m as B,p as D}from"./index2.js";import{s as U,m as W,g as X,a as ee,b as te}from"./helpers.js";function ge(a){ce(a,"svelte-12034l8",".main.svelte-12034l8{width:450px;background-color:#f0f6f5;border:2px solid #c8dbd0;border-radius:12px;display:flex;flex-direction:column;justify-content:center}.summaryMain.svelte-12034l8{width:500px;height:540px;border-radius:10px;display:flex;flex-direction:column}.summaryHeader.svelte-12034l8{width:100%;height:30%;font-size:0.9rem;display:flex;align-items:center}.summaryBody.svelte-12034l8{width:95%;height:100%;padding:1.5rem 0 0 1.5rem}.row.svelte-12034l8{width:100%;display:flex}.label.svelte-12034l8{width:14%;height:100%;margin-left:1.5rem;line-height:0.9rem;display:flex;align-items:start;justify-content:center;flex-direction:column}.content.svelte-12034l8{width:86%;height:100%;position:relative}.min.svelte-12034l8{position:absolute;top:34%;left:1.6%;font-size:0.6rem;color:#6b8678}.middleParent.svelte-12034l8{position:absolute;width:76%;height:80%;left:10%;top:10%;display:flex;align-items:center;justify-content:center;flex-direction:column}.xAxis.svelte-12034l8{position:absolute;left:0;top:48%;width:100%;height:0.1rem;background-color:#08341f;border-radius:10px;z-index:9999;max-height:1px}.diseaseArea.svelte-12034l8{position:absolute;width:46%;top:10%;height:80%;background-color:#c8dbd0}.result.svelte-12034l8{width:1.5%;height:24%;background-color:#33664d;z-index:9998;position:relative}.yAxis.svelte-12034l8{position:absolute;left:49.72%;width:0.1rem;height:88%;background-color:#08341f;border-radius:10px}.max.svelte-12034l8{position:absolute;top:34%;right:5.5%;font-size:0.6rem;color:#6b8678}.lastRow.svelte-12034l8{width:100%;height:11%;display:flex;align-items:center;justify-content:center;margin-top:12px}.dot1.svelte-12034l8{height:10px;width:10px;border-radius:99px;background-color:#c8dbd0;border:1px solid black;margin-right:6px}.dot2.svelte-12034l8{height:10px;width:10px;border-radius:99px;background-color:#33664d;border:1px solid black;margin:0 6px 0 36px}.resultDisplay.svelte-12034l8{position:absolute;bottom:80%;display:flex;align-items:center;flex-direction:column}.message.svelte-12034l8{color:#33664d;z-index:99999;min-width:100px;font-size:0.48rem;margin-bottom:-8px}.triangle-down.svelte-12034l8{margin-top:0.6rem;margin-bottom:0.4rem;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:6px solid #33664d}.header.svelte-12034l8{width:100%;height:100%;display:flex;align-items:center}")}function he(a){let e,t,l,o,s,r,m,p,v,T,h,q,g,u,M,Z,S,C,R,w,k,L,j,A,G,P,I,E,f=U(a[4])+"",N,F,J,O,Q,K;return{c(){e=d("div"),t=d("div"),l=d("div"),l.innerHTML="Glycan<br/><b>Lifestyle</b>",o=b(),s=d("div"),r=d("div"),m=d("b"),p=z(a[1]),v=b(),T=d("div"),h=d("b"),q=z(a[2]),g=b(),u=d("div"),M=d("div"),Z=b(),S=d("div"),C=b(),R=d("div"),w=b(),k=d("div"),L=d("div"),j=d("div"),A=d("b"),G=z(a[3]),P=z(" ("),I=z(a[4]),E=d("sup"),N=z(f),F=z(" percentile)"),J=b(),O=d("div"),Q=b(),K=d("div"),K.innerHTML='<div class="dot1 svelte-12034l8"></div> <div style="font-size: 0.8rem;">Increased risk of hypertension</div> <div class="dot2 svelte-12034l8"></div> <div style="font-size: 0.8rem;">Your patient</div>',c(l,"class","label svelte-12034l8"),n(l,"font-size","0.8rem"),c(r,"class","min svelte-12034l8"),c(T,"class","max svelte-12034l8"),c(M,"class","xAxis svelte-12034l8"),c(S,"class","yAxis svelte-12034l8"),c(R,"class","diseaseArea svelte-12034l8"),n(R,"border-radius","0 6px 6px 0"),n(R,"left","50.3%"),c(j,"class","message svelte-12034l8"),c(O,"class","triangle-down svelte-12034l8"),c(L,"class","resultDisplay svelte-12034l8"),n(L,"right",W(a[4])),c(k,"class","result svelte-12034l8"),n(k,"padding",X(a[4])),n(k,"margin",ee(a[4])),n(k,"border-radius",te(a[4])),c(u,"class","middleParent svelte-12034l8"),c(s,"class","content svelte-12034l8"),c(t,"class","row svelte-12034l8"),n(t,"height","30%"),n(t,"padding-bottom","1rem"),c(K,"class","lastRow svelte-12034l8"),c(e,"class","main svelte-12034l8"),n(e,"height","180px")},m($,H){y($,e,H),i(e,t),i(t,l),i(t,o),i(t,s),i(s,r),i(r,m),i(m,p),i(s,v),i(s,T),i(T,h),i(h,q),i(s,g),i(s,u),i(u,M),i(u,Z),i(u,S),i(u,C),i(u,R),i(u,w),i(u,k),i(k,L),i(L,j),i(j,A),i(A,G),i(A,P),i(A,I),i(A,E),i(E,N),i(A,F),i(L,J),i(L,O),i(e,Q),i(e,K)},p($,H){H&2&&B(p,$[1]),H&4&&B(q,$[2]),H&8&&B(G,$[3]),H&16&&B(I,$[4]),H&16&&f!==(f=U($[4])+"")&&B(N,f),H&16&&n(L,"right",W($[4])),H&16&&n(k,"padding",X($[4])),H&16&&n(k,"margin",ee($[4])),H&16&&n(k,"border-radius",te($[4]))},d($){$&&x(e)}}}function be(a){let e,t=a[7]&&ie(a);return{c(){t&&t.c(),e=Y()},m(l,o){t&&t.m(l,o),y(l,e,o)},p(l,o){l[7]?t?t.p(l,o):(t=ie(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(l){l&&x(e),t&&t.d(l)}}}function ve(a){let e,t,l,o=a[5]&&re(a),s=a[6]&&le(a);return{c(){e=d("div"),o&&o.c(),t=b(),l=b(),s&&s.c(),c(e,"class","header svelte-12034l8")},m(r,m){y(r,e,m),o&&o.m(e,null),i(e,t),i(e,l),s&&s.m(e,null)},p(r,m){r[5]?o?o.p(r,m):(o=re(r),o.c(),o.m(e,t)):o&&(o.d(1),o=null),r[6]?s?s.p(r,m):(s=le(r),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(r){r&&x(e),o&&o.d(),s&&s.d()}}}function ie(a){let e;function t(s,r){return s[6]?fe:ue}let l=t(a),o=l(a);return{c(){o.c(),e=Y()},m(s,r){o.m(s,r),y(s,e,r)},p(s,r){l===(l=t(s))&&o?o.p(s,r):(o.d(1),o=l(s),o&&(o.c(),o.m(e.parentNode,e)))},d(s){s&&x(e),o.d(s)}}}function ue(a){let e,t,l,o,s,r,m,p,v,T,h,q,g,u,M,Z,S,C,R,w,k,L,j,A,G,P,I,E,f=a[5]&&se();return{c(){e=d("div"),t=d("div"),l=d("div"),f&&f.c(),o=b(),s=b(),r=d("div"),m=z("There is "),p=d("b"),p.textContent=`${a[12]()}`,v=z(" of glycan indexes between "),T=d("br"),h=z(` your patient and
2
- increased risk of hypertension patients.`),q=b(),g=d("div"),u=d("div"),u.textContent="Symptoms to check for:",M=b(),Z=d("div"),Z.innerHTML=`<b>Elevated blood pressure readings:</b> Consistently higher-than-normal blood
3
- <br/> pressure readings are a key indicator. Regular monitoring helps in early <br/>
4
- detection and management.`,S=b(),C=d("div"),C.innerHTML=`<b>Family history of hypertension:</b> A strong family history indicates a higher
5
- <br/>risk. It&#39;s essential to be aware of family medical history for early intervention.`,R=b(),w=d("div"),w.innerHTML=`<b>Lifestyle factors:</b> Poor lifestyle choices, such as a high-sodium diet, <br/>
6
- sedentary lifestyle, and excessive alcohol consumption, are critical <br/>
7
- symptoms to be addressed.`,k=b(),L=d("div"),L.textContent="Possible follow-up tests:",j=b(),A=d("div"),A.innerHTML=`<b>Blood pressure monitoring:</b> Regular monitoring of blood pressure levels is
8
- <br/> crucial for assessing the risk and initiating preventive measures.`,G=b(),P=d("div"),P.innerHTML=`<b>Blood tests:</b> These tests check for high cholesterol levels, diabetes, and
9
- <br/> kidney function, which are related to hypertension risk.`,I=b(),E=d("div"),E.innerHTML=`<b>Electrocardiogram (EKG):</b> These tests can identify areas of
10
- <br/>
11
- damage and help in diagnosis and management.`,n(l,"width","10%"),n(l,"padding-left","1.5rem"),n(l,"padding-right","1rem"),n(r,"width","90%"),n(r,"font-size","0.8rem"),c(t,"class","summaryHeader svelte-12034l8"),n(t,"border-radius","8px 8px 0 0"),n(t,"background-color",a[10]()),n(t,"border-bottom","2px solid "+a[9]()),n(u,"font-size","1.2rem"),n(u,"padding-bottom","1rem"),n(Z,"font-size","0.7rem"),n(Z,"padding-bottom","0.4rem"),n(C,"font-size","0.7rem"),n(C,"padding-bottom","0.4rem"),n(w,"font-size","0.7rem"),n(w,"padding-bottom","0.4rem"),n(L,"font-size","1.2rem"),n(L,"padding-top","0.4rem"),n(L,"padding-bottom","1rem"),n(A,"font-size","0.7rem"),n(A,"padding-bottom","0.4rem"),n(P,"font-size","0.7rem"),n(P,"padding-bottom","0.4rem"),n(E,"font-size","0.7rem"),n(E,"padding-bottom","0.4rem"),c(g,"class","summaryBody svelte-12034l8"),n(g,"background-color",a[11]()),c(e,"class","summaryMain svelte-12034l8"),n(e,"border","2px solid "+a[9]())},m(N,F){y(N,e,F),i(e,t),i(t,l),f&&f.m(l,null),i(l,o),i(t,s),i(t,r),i(r,m),i(r,p),i(r,v),i(r,T),i(r,h),i(e,q),i(e,g),i(g,u),i(g,M),i(g,Z),i(g,S),i(g,C),i(g,R),i(g,w),i(g,k),i(g,L),i(g,j),i(g,A),i(g,G),i(g,P),i(g,I),i(g,E)},p(N,F){N[5]?f||(f=se(),f.c(),f.m(l,o)):f&&(f.d(1),f=null)},d(N){N&&x(e),f&&f.d()}}}function fe(a){let e;return{c(){e=d("div"),e.innerHTML=`<div class="summaryHeader svelte-12034l8" style="border-radius: 8px; background-color: rgba(0,170,68,0.15); border: 2px solid #00AA44;"><div style="width: 10%; padding-left: 1.5rem; padding-right: 1rem;"><svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 24 24"><path fill="#00AA44" d="m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45Zm2.35-6.95L16.6 9.9l-1.4-1.45l-4.25 4.25l-2.15-2.1L7.4 12l3.55 3.55Z"></path></svg></div> <div style="width: 90%;">There is <b>no significant overlap</b> of glycan indexes between <br/> your patient and
12
- increased risk of hypertension <br/> patients.</div></div> <div class="summaryBody svelte-12034l8" style="opacity: 0.35;"><div style="font-size: 1.2rem; padding-bottom: 1rem;">Symptoms to check for:</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Elevated blood pressure readings:</b> Consistently higher-than-normal blood
13
- <br/> pressure readings are a key indicator. Regular monitoring helps in early <br/>
14
- detection and management.</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Family history of hypertension:</b> A strong family history indicates a higher
15
- <br/>risk. It&#39;s essential to be aware of family medical history for early intervention.</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Lifestyle factors:</b> Poor lifestyle choices, such as a high-sodium diet, <br/>
16
- sedentary lifestyle, and excessive alcohol consumption, are critical <br/>
17
- symptoms to be addressed.</div> <div style="font-size: 1.2rem; padding-top: 0.4rem;padding-bottom: 1rem;">Possible follow-up tests:</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Blood pressure monitoring:</b> Regular monitoring of blood pressure levels is
18
- <br/> crucial for assessing the risk and initiating preventive measures.</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Blood tests:</b> These tests check for high cholesterol levels, diabetes, and
19
- <br/> kidney function, which are related to hypertension risk.</div> <div style="font-size: 0.7rem; padding-bottom: 0.4rem;"><b>Electrocardiogram (EKG):</b> This test checks for heart abnormalities that
20
- <br/> may be associated with an increased risk of hypertension.</div></div>`,c(e,"class","summaryMain svelte-12034l8")},m(t,l){y(t,e,l)},p:_,d(t){t&&x(e)}}}function se(a){let e,t;return{c(){e=D("svg"),t=D("path"),c(t,"fill","#CC0000"),c(t,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45ZM12 17q.425 0 .713-.288T13 16q0-.425-.288-.713T12 15q-.425 0-.713.288T11 16q0 .425.288.713T12 17Zm-1-4h2V7h-2v6Z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"width","50"),c(e,"height","50"),c(e,"viewBox","0 0 24 24")},m(l,o){y(l,e,o),i(e,t)},d(l){l&&x(e)}}}function re(a){let e,t,l,o,s,r,m;return{c(){e=d("div"),t=d("b"),l=z(a[8]),o=b(),s=D("svg"),r=D("path"),m=z(`
21
- \xA0 Some overlap`),n(e,"padding-right","10px"),c(r,"fill","#F2590D"),c(r,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45ZM12 17q.425 0 .713-.288T13 16q0-.425-.288-.713T12 15q-.425 0-.713.288T11 16q0 .425.288.713T12 17Zm-1-4h2V7h-2v6Z"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"width","24"),c(s,"height","24"),c(s,"viewBox","0 0 24 24")},m(p,v){y(p,e,v),i(e,t),i(t,l),y(p,o,v),y(p,s,v),i(s,r),y(p,m,v)},p(p,v){v&256&&B(l,p[8])},d(p){p&&(x(e),x(o),x(s),x(m))}}}function le(a){let e,t,l,o,s,r,m;return{c(){e=d("div"),t=d("b"),l=z(a[8]),o=b(),s=D("svg"),r=D("path"),m=z(`
22
- \xA0 No significant overlap`),n(e,"padding-right","10px"),c(r,"fill","#12A195"),c(r,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45Zm2.35-6.95L16.6 9.9l-1.4-1.45l-4.25 4.25l-2.15-2.1L7.4 12l3.55 3.55Z"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"width","24"),c(s,"height","24"),c(s,"viewBox","0 0 24 24")},m(p,v){y(p,e,v),i(e,t),i(t,l),y(p,o,v),y(p,s,v),i(s,r),y(p,m,v)},p(p,v){v&256&&B(l,p[8])},d(p){p&&(x(e),x(o),x(s),x(m))}}}function ye(a){let e,t,l;function o(m,p){return m[0]==="header"?ve:m[0]==="summary"?be:he}let s=o(a),r=s(a);return{c(){e=d("head"),e.innerHTML='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300,1,0"/>',t=b(),r.c(),l=Y()},m(m,p){y(m,e,p),y(m,t,p),r.m(m,p),y(m,l,p)},p(m,[p]){s===(s=o(m))&&r?r.p(m,p):(r.d(1),r=s(m),r&&(r.c(),r.m(l.parentNode,l)))},i:_,o:_,d(m){m&&(x(e),x(t),x(l)),r.d(m)}}}function xe(a,e,t){let{language:l}=e,{report:o}=e,{type:s}=e,{service:r=window.GaReportService}=e,m,p=0,v=0,T=0,h=0,q=!1,g=!1,u=!1,M="";function Z(){return h===50?"#00AA44":h>50?"#CC0000":(h<50,"#00AA44")}function S(){return h===50?"rgba(0,170,68,0.15)":h>50?"rgba(204,0,0,0.15)":(h<50,"rgba(0,170,68,0.15)")}function C(){return h===50?"rgba(0,170,68,0.05)":h>50?"rgba(204,0,0,0.05)":(h<50,"rgba(0,170,68,0.05)")}function R(){return h===50?"no significant overlap":h>50?"some overlap":(h<50,"no significant overlap")}return pe(async()=>{if(m=await r.getReport(o),t(1,p=Number(m.Bxmin)),t(2,v=Number(m.Bxmax)),t(3,T=Number(m.Byourscore)),t(4,h=Number(m.Bpercentile)),h===50){t(8,M="0/1"),t(6,g=!0),t(7,u=!0);return}if(h>50){t(8,M="1/1"),t(5,q=!0),t(7,u=!0);return}if(h<50){t(8,M="0/1"),t(6,g=!0),t(7,u=!0);return}}),a.$$set=w=>{"language"in w&&t(13,l=w.language),"report"in w&&t(14,o=w.report),"type"in w&&t(0,s=w.type),"service"in w&&t(15,r=w.service)},[s,p,v,T,h,q,g,u,M,Z,S,C,R,l,o,r]}class oe extends ae{constructor(e){super(),de(this,e,xe,ye,me,{language:13,report:14,type:0,service:15},ge)}get language(){return this.$$.ctx[13]}set language(e){this.$$set({language:e}),V()}get report(){return this.$$.ctx[14]}set report(e){this.$$set({report:e}),V()}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),V()}get service(){return this.$$.ctx[15]}set service(e){this.$$set({service:e}),V()}}customElements.define("ga-hypertension-risk",ne(oe,{language:{},report:{},type:{},service:{}},[],[],!0));export{oe as default};
1
+ import{S as O,i as J,s as Q,e as u,b as D,t as S,p as B,k as t,j as s,g as k,l as o,m as T,n as z,h as L,o as W,c as te,f as j,a as ie,d as le,q as U,r as re,u as V,v as oe,w as se,x as ne,y as ae}from"./index2.js";import{s as X}from"./helpers.js";function Y(n){let e,i,l;return{c(){e=u("div"),i=D(),l=u("div"),t(e,"position","absolute"),t(e,"right","13px"),t(e,"bottom","8px"),t(e,"height","3px"),t(e,"width","24px"),t(e,"background-color","#DF2020"),t(e,"border-radius","4px"),t(e,"transform","rotate(135deg)"),t(l,"position","absolute"),t(l,"right","13px"),t(l,"top","8px"),t(l,"height","3px"),t(l,"width","24px"),t(l,"background-color","#DF2020"),t(l,"border-radius","4px"),t(l,"transform","rotate(-135deg)")},m(r,d){k(r,e,d),k(r,i,d),k(r,l,d)},d(r){r&&(L(e),L(i),L(l))}}}function _(n){let e,i,l;return{c(){e=u("div"),i=D(),l=u("div"),t(e,"position","absolute"),t(e,"left","13px"),t(e,"bottom","8px"),t(e,"height","3px"),t(e,"width","24px"),t(e,"background-color","#DF2020"),t(e,"border-radius","4px"),t(e,"transform","rotate(45deg)"),t(l,"position","absolute"),t(l,"left","13px"),t(l,"top","8px"),t(l,"height","3px"),t(l,"width","24px"),t(l,"background-color","#DF2020"),t(l,"border-radius","4px"),t(l,"transform","rotate(-45deg)")},m(r,d){k(r,e,d),k(r,i,d),k(r,l,d)},d(r){r&&(L(e),L(i),L(l))}}}function de(n){let e,i,l,r,d,m,f,p,w,a,h,c,x,y,A,g,b,v,M,H,G,R,N=X(n[0])+"",P,E,K,Z,I,C=n[1]==="left"&&Y(),$=n[1]==="right"&&_();return{c(){e=u("div"),i=u("div"),C&&C.c(),l=D(),r=u("div"),d=D(),m=u("div"),f=D(),p=u("div"),p.innerHTML='<div style="position: absolute; left: 92.1%; height: 2px; width: 12px; background-color: #32664C; transform: rotate(90deg); border-radius: 4px;"></div>',w=D(),a=u("div"),h=D(),c=u("div"),x=D(),y=u("div"),A=D(),g=u("div"),$&&$.c(),b=D(),v=u("div"),M=u("div"),H=u("b"),G=S(n[0]),R=u("sup"),P=S(N),E=S(" percentile"),K=D(),Z=B("svg"),I=B("path"),t(i,"position","relative"),t(i,"height","100%"),t(i,"width","7%"),t(i,"background-color",n[1]==="left"?"#DF2020":"#CADBD1"),t(i,"border-radius","4px"),t(r,"height","100%"),t(r,"width","13.7%"),t(r,"background-color",n[1]==="left"?"#DF2020":"#CADBD1"),t(r,"border-radius","4px"),t(m,"height","100%"),t(m,"width","13.7%"),t(m,"background-color",n[1]==="left"?"#F2800D":"#CADBD1"),t(m,"border-radius","4px"),t(p,"position","relative"),t(p,"height","100%"),t(p,"width","13.7%"),t(p,"background-color","#CADBD1"),t(p,"border-radius","4px"),t(a,"height","100%"),t(a,"width","13.7%"),t(a,"background-color","#CADBD1"),t(a,"border-radius","4px"),t(c,"height","100%"),t(c,"width","13.7%"),t(c,"background-color",n[1]==="left"?"#CADBD1":"#F2800D"),t(c,"border-radius","4px"),t(y,"height","100%"),t(y,"width","13.7%"),t(y,"background-color",n[1]==="left"?"#CADBD1":"#DF2020"),t(y,"border-radius","4px"),t(g,"position","relative"),t(g,"height","100%"),t(g,"width","7%"),t(g,"background-color",n[1]==="left"?"#CADBD1":"#DF2020"),t(g,"border-radius","4px"),s(M,"class","message"),t(M,"color","#09341F"),t(M,"z-index","99999"),t(M,"min-width","100px"),t(M,"font-size","0.74rem"),t(M,"display","flex"),t(M,"justify-content","center"),s(I,"d","M14.0718 4C17.151 -1.33334 24.849 -1.33333 27.9282 4.00001L40.0525 25C43.1317 30.3333 39.2827 37 33.1243 37L8.87563 37C2.71722 37 -1.13177 30.3333 1.94743 25L14.0718 4Z"),s(I,"fill","#09371F"),s(Z,"class","rotateImg"),t(Z,"transform","rotate(180deg)"),s(Z,"width","24%"),s(Z,"height","24%"),s(Z,"viewBox","0 0 42 37"),s(Z,"fill","none"),s(Z,"xmlns","http://www.w3.org/2000/svg"),t(v,"left",n[0]+"%"),t(v,"position","absolute"),t(v,"transform","translate(-50%, -100%)"),t(v,"display","flex"),t(v,"align-items","center"),t(v,"flex-direction","column"),t(v,"width","100px"),t(v,"height","38px"),t(e,"position","relative"),t(e,"width","100%"),t(e,"height","4px"),t(e,"display","flex"),t(e,"justify-content","space-between")},m(F,q){k(F,e,q),o(e,i),C&&C.m(i,null),o(e,l),o(e,r),o(e,d),o(e,m),o(e,f),o(e,p),o(e,w),o(e,a),o(e,h),o(e,c),o(e,x),o(e,y),o(e,A),o(e,g),$&&$.m(g,null),o(e,b),o(e,v),o(v,M),o(M,H),o(H,G),o(H,R),o(R,P),o(H,E),o(v,K),o(v,Z),o(Z,I)},p(F,[q]){F[1]==="left"?C||(C=Y(),C.c(),C.m(i,null)):C&&(C.d(1),C=null),q&2&&t(i,"background-color",F[1]==="left"?"#DF2020":"#CADBD1"),q&2&&t(r,"background-color",F[1]==="left"?"#DF2020":"#CADBD1"),q&2&&t(m,"background-color",F[1]==="left"?"#F2800D":"#CADBD1"),q&2&&t(c,"background-color",F[1]==="left"?"#CADBD1":"#F2800D"),q&2&&t(y,"background-color",F[1]==="left"?"#CADBD1":"#DF2020"),F[1]==="right"?$||($=_(),$.c(),$.m(g,null)):$&&($.d(1),$=null),q&2&&t(g,"background-color",F[1]==="left"?"#CADBD1":"#DF2020"),q&1&&T(G,F[0]),q&1&&N!==(N=X(F[0])+"")&&T(P,N),q&1&&t(v,"left",F[0]+"%")},i:z,o:z,d(F){F&&L(e),C&&C.d(),$&&$.d()}}}function ce(n,e,i){let{percentile:l=0}=e,{type:r=""}=e;return W(async()=>{console.log("type inside onMount",r)}),n.$$set=d=>{"percentile"in d&&i(0,l=d.percentile),"type"in d&&i(1,r=d.type)},[l,r]}class pe extends O{constructor(e){super(),J(this,e,ce,de,Q,{percentile:0,type:1})}}function he(n){ie(n,"svelte-1371dlk",".summaryMain.svelte-1371dlk{width:100%;height:100%;display:flex;flex-direction:column;color:#09341FCC}.summaryHeader.svelte-1371dlk{width:100%;height:16%;font-size:0.9rem;display:flex;align-items:center}.summaryBody.svelte-1371dlk{width:80%;height:100%;margin:auto;border-top:2px solid #C9DBD2}.main.svelte-1371dlk{height:100%;width:100%;display:flex}.label.svelte-1371dlk{width:30%;display:flex;align-items:center}.header.svelte-1371dlk{width:100%;height:100%;display:flex;align-items:center}")}function ue(n){let e,i,l,r,d,m,f,p,w,a,h,c,x,y,A;return y=new pe({props:{type:"right",percentile:n[5]}}),{c(){e=u("div"),i=u("div"),l=B("svg"),r=B("path"),m=D(),f=u("div"),p=u("div"),p.innerHTML="Glycan <b>Lifestyle (B)</b>",w=D(),a=u("div"),h=S(n[4]),c=D(),x=u("div"),se(y.$$.fragment),s(r,"fill",d=n[5]<=68?"#12A195":"#F2590D"),s(r,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45ZM12 17q.425 0 .713-.288T13 16q0-.425-.288-.713T12 15q-.425 0-.713.288T11 16q0 .425.288.713T12 17Zm-1-4h2V7h-2v6Z"),s(l,"xmlns","http://www.w3.org/2000/svg"),s(l,"width","24"),s(l,"height","24"),s(l,"viewBox","0 0 24 24"),t(f,"display","flex"),t(f,"flex-direction","column"),t(f,"padding-left","0.3rem"),s(i,"class","label svelte-1371dlk"),t(i,"font-size","0.8rem"),t(x,"width","70%"),t(x,"display","flex"),t(x,"align-items","center"),s(e,"class","main svelte-1371dlk")},m(g,b){k(g,e,b),o(e,i),o(i,l),o(l,r),o(i,m),o(i,f),o(f,p),o(f,w),o(f,a),o(a,h),o(e,c),o(e,x),ne(y,x,null),A=!0},p(g,b){(!A||b&32&&d!==(d=g[5]<=68?"#12A195":"#F2590D"))&&s(r,"fill",d),(!A||b&16)&&T(h,g[4]);const v={};b&32&&(v.percentile=g[5]),y.$set(v)},i(g){A||(V(y.$$.fragment,g),A=!0)},o(g){U(y.$$.fragment,g),A=!1},d(g){g&&L(e),ae(y)}}}function ge(n){let e,i,l,r,d,m,f=n[5]>68?"Some overlap":"No significant overlap",p,w,a,h,c,x;function y(b,v){return b[1]?ve:fe}let A=y(n),g=A(n);return{c(){e=u("div"),i=u("div"),l=u("div"),g.c(),r=D(),d=u("div"),m=u("b"),p=S(f),w=S(" of glycan indexes between "),a=u("br"),h=S(" your patient and this condition."),c=D(),x=u("div"),x.innerHTML='<h5>Signs and symptoms</h5> <ul style="font-size: 0.8rem;"><li>Usually asymptomatic</li></ul> <h5>Possible follow-up tests</h5> <ul style="font-size: 0.8rem;"><li>Serial blood pressure (BP) measurements \xB1 24-hour BP monitoring</li> <li>BMI and/or body composition check</li> <li>Basic bloods (lipid profile, renal and liver function)</li></ul> <h5>Related research papers</h5> <a style="color: #E66439;" href="https://pubmed.ncbi.nlm.nih.gov/34285147/">N-glycosylation of immunoglobulin G predicts incident hypertension</a> <p style="margin: 0; font-size: 0.8rem; color: #09341FCC;">In a study investigating the relationship between IgG glycosylation and hypertension, 989 unrelated incident hypertension cases and 1628 controls from the TwinsUK cohort, with a mean follow-up of 6.3 years, were examined. The average age of the participants was 56. The findings, which included an observed increase in B, were validated in additional cohorts from the &quot;10 001 Dalmatians&quot; (106 individuals) and KORA S4 (729 individuals). A predictive model incorporating age, BMI, mean arterial pressure (MAP), and specific glycan peaks with B modifications demonstrated robust predictive accuracy, achieving a very high AUC of 0.923.</p>',t(l,"transform","translate(-50%)"),t(m,"color",n[1]?"#F2590D":"#12A195"),s(i,"class","summaryHeader svelte-1371dlk"),s(x,"class","summaryBody svelte-1371dlk"),s(e,"class","summaryMain svelte-1371dlk")},m(b,v){k(b,e,v),o(e,i),o(i,l),g.m(l,null),o(i,r),o(i,d),o(d,m),o(m,p),o(d,w),o(d,a),o(d,h),o(e,c),o(e,x)},p(b,v){A!==(A=y(b))&&(g.d(1),g=A(b),g&&(g.c(),g.m(l,null))),v&32&&f!==(f=b[5]>68?"Some overlap":"No significant overlap")&&T(p,f),v&2&&t(m,"color",b[1]?"#F2590D":"#12A195")},i:z,o:z,d(b){b&&L(e),g.d()}}}function me(n){let e,i,l,r,d,m,f=n[1]?"Some overlap":"No significant overlap",p;function w(c,x){return c[1]?xe:we}let a=w(n),h=a(n);return{c(){e=u("div"),i=u("div"),l=u("b"),r=S(n[3]),d=D(),h.c(),m=S(`
2
+ \xA0`),p=S(f),t(i,"padding-right","10px"),s(e,"class","header svelte-1371dlk")},m(c,x){k(c,e,x),o(e,i),o(i,l),o(l,r),o(e,d),h.m(e,null),o(e,m),o(e,p)},p(c,x){x&8&&T(r,c[3]),a!==(a=w(c))&&(h.d(1),h=a(c),h&&(h.c(),h.m(e,m))),x&2&&f!==(f=c[1]?"Some overlap":"No significant overlap")&&T(p,f)},i:z,o:z,d(c){c&&L(e),h.d()}}}function fe(n){let e,i;return{c(){e=B("svg"),i=B("path"),s(i,"fill","#12A195"),s(i,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45Zm2.35-6.95L16.6 9.9l-1.4-1.45l-4.25 4.25l-2.15-2.1L7.4 12l3.55 3.55Z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","50"),s(e,"height","50"),s(e,"viewBox","0 0 24 24")},m(l,r){k(l,e,r),o(e,i)},d(l){l&&L(e)}}}function ve(n){let e,i;return{c(){e=B("svg"),i=B("path"),s(i,"fill","#F2590D"),s(i,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45ZM12 17q.425 0 .713-.288T13 16q0-.425-.288-.713T12 15q-.425 0-.713.288T11 16q0 .425.288.713T12 17Zm-1-4h2V7h-2v6Z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","50"),s(e,"height","50"),s(e,"viewBox","0 0 24 24")},m(l,r){k(l,e,r),o(e,i)},d(l){l&&L(e)}}}function we(n){let e,i;return{c(){e=B("svg"),i=B("path"),s(i,"fill","#12A195"),s(i,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45Zm2.35-6.95L16.6 9.9l-1.4-1.45l-4.25 4.25l-2.15-2.1L7.4 12l3.55 3.55Z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","24"),s(e,"height","24"),s(e,"viewBox","0 0 24 24")},m(l,r){k(l,e,r),o(e,i)},d(l){l&&L(e)}}}function xe(n){let e,i;return{c(){e=B("svg"),i=B("path"),s(i,"fill","#F2590D"),s(i,"d","m8.6 22.5l-1.9-3.2l-3.6-.8l.35-3.7L1 12l2.45-2.8l-.35-3.7l3.6-.8l1.9-3.2L12 2.95l3.4-1.45l1.9 3.2l3.6.8l-.35 3.7L23 12l-2.45 2.8l.35 3.7l-3.6.8l-1.9 3.2l-3.4-1.45l-3.4 1.45ZM12 17q.425 0 .713-.288T13 16q0-.425-.288-.713T12 15q-.425 0-.713.288T11 16q0 .425.288.713T12 17Zm-1-4h2V7h-2v6Z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","24"),s(e,"height","24"),s(e,"viewBox","0 0 24 24")},m(l,r){k(l,e,r),o(e,i)},d(l){l&&L(e)}}}function be(n){let e,i,l,r,d,m;const f=[me,ge,ue],p=[];function w(a,h){return a[0]==="header"?0:a[0]==="summary"&&a[2]?1:2}return l=w(n),r=p[l]=f[l](n),{c(){e=u("head"),e.innerHTML='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300,1,0"/>',i=D(),r.c(),d=le()},m(a,h){k(a,e,h),k(a,i,h),p[l].m(a,h),k(a,d,h),m=!0},p(a,[h]){let c=l;l=w(a),l===c?p[l].p(a,h):(oe(),U(p[c],1,1,()=>{p[c]=null}),re(),r=p[l],r?r.p(a,h):(r=p[l]=f[l](a),r.c()),V(r,1),r.m(d.parentNode,d))},i(a){m||(V(r),m=!0)},o(a){U(r),m=!1},d(a){a&&(L(e),L(i),L(d)),p[l].d(a)}}}function ye(n,e,i){let{report:l}=e,{type:r}=e,{service:d=window.GaReportService}=e,m,f=!1,p=!1,w="",a="",h=0;return W(async()=>{if(m=await d.getReport(l),i(5,h=Number(m.Bpercentile)),h<32){i(3,w="0/1"),i(4,a="Lower than average"),i(2,p=!0);return}if(h>=32&&h<=68){i(3,w="0/1"),i(4,a="Around average"),i(2,p=!0);return}if(h>68){i(3,w="1/1"),i(4,a="Higher than average"),i(3,w="1/1"),i(1,f=!0),i(2,p=!0);return}}),n.$$set=c=>{"report"in c&&i(6,l=c.report),"type"in c&&i(0,r=c.type),"service"in c&&i(7,d=c.service)},[r,f,p,w,a,h,l,d]}class ee extends O{constructor(e){super(),J(this,e,ye,be,Q,{report:6,type:0,service:7},he)}get report(){return this.$$.ctx[6]}set report(e){this.$$set({report:e}),j()}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),j()}get service(){return this.$$.ctx[7]}set service(e){this.$$set({service:e}),j()}}customElements.define("ga-hypertension-risk",te(ee,{report:{},type:{},service:{}},[],[],!0));export{ee as default};
package/dist/index2.js CHANGED
@@ -1 +1 @@
1
- var J=Object.defineProperty,q=(t,n,e)=>n in t?J(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,a=(t,n,e)=>(q(t,typeof n!="symbol"?n+"":n,e),e);function b(){}function C(t){return t()}function L(){return Object.create(null)}function g(t){t.forEach(C)}function S(t){return typeof t=="function"}function z(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function F(t){return Object.keys(t).length===0}function B(t,n){t.appendChild(n)}function I(t,n,e){const s=G(t);if(!s.getElementById(n)){const o=v("style");o.id=n,o.textContent=e,K(s,o)}}function G(t){if(!t)return document;const n=t.getRootNode?t.getRootNode():t.ownerDocument;return n&&n.host?n:t.ownerDocument}function K(t,n){return B(t.head||t,n),n.sheet}function M(t,n,e){t.insertBefore(n,e||null)}function y(t){t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function Q(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function w(t){return document.createTextNode(t)}function U(){return w(" ")}function V(){return w("")}function R(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function W(t){return Array.from(t.childNodes)}function X(t,n){n=""+n,t.data!==n&&(t.data=n)}function Y(t,n,e,s){e==null?t.style.removeProperty(n):t.style.setProperty(n,e,s?"important":"")}function Z(t){const n={};return t.childNodes.forEach(e=>{n[e.slot||"default"]=!0}),n}let p;function m(t){p=t}function tt(){if(!p)throw new Error("Function called outside component initialization");return p}function nt(t){tt().$$.on_mount.push(t)}const l=[],T=[];let f=[];const D=[],et=Promise.resolve();let x=!1;function ot(){x||(x=!0,et.then(k))}function E(t){f.push(t)}const O=new Set;let d=0;function k(){if(d!==0)return;const t=p;do{try{for(;d<l.length;){const n=l[d];d++,m(n),st(n.$$)}}catch(n){throw l.length=0,d=0,n}for(m(null),l.length=0,d=0;T.length;)T.pop()();for(let n=0;n<f.length;n+=1){const e=f[n];O.has(e)||(O.add(e),e())}f.length=0}while(l.length);for(;D.length;)D.pop()();x=!1,O.clear(),m(t)}function st(t){if(t.fragment!==null){t.update(),g(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(E)}}function rt(t){const n=[],e=[];f.forEach(s=>t.indexOf(s)===-1?n.push(s):e.push(s)),e.forEach(s=>s()),f=n}const it=new Set;function ct(t,n){t&&t.i&&(it.delete(t),t.i(n))}function $t(t,n,e){const{fragment:s,after_update:o}=t.$$;s&&s.m(n,e),E(()=>{const r=t.$$.on_mount.map(C).filter(S);t.$$.on_destroy?t.$$.on_destroy.push(...r):g(r),t.$$.on_mount=[]}),o.forEach(E)}function ut(t,n){const e=t.$$;e.fragment!==null&&(rt(e.after_update),g(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function at(t,n){t.$$.dirty[0]===-1&&(l.push(t),ot(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function ht(t,n,e,s,o,r,$,c=[-1]){const u=p;m(t);const i=t.$$={fragment:null,ctx:[],props:r,update:b,not_equal:o,bound:L(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:L(),dirty:c,skip_bound:!1,root:n.target||u.$$.root};$&&$(i.root);let N=!1;if(i.ctx=e?e(t,n.props||{},(h,A,...j)=>{const P=j.length?j[0]:A;return i.ctx&&o(i.ctx[h],i.ctx[h]=P)&&(!i.skip_bound&&i.bound[h]&&i.bound[h](P),N&&at(t,h)),A}):[],i.update(),N=!0,g(i.before_update),i.fragment=s?s(i.ctx):!1,n.target){if(n.hydrate){const h=W(n.target);i.fragment&&i.fragment.l(h),h.forEach(y)}else i.fragment&&i.fragment.c();n.intro&&ct(t.$$.fragment),$t(t,n.target,n.anchor),k()}m(u)}let H;typeof HTMLElement=="function"&&(H=class extends HTMLElement{constructor(t,n,e){super(),a(this,"$$ctor"),a(this,"$$s"),a(this,"$$c"),a(this,"$$cn",!1),a(this,"$$d",{}),a(this,"$$r",!1),a(this,"$$p_d",{}),a(this,"$$l",{}),a(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=n,e&&this.attachShadow({mode:"open"})}addEventListener(t,n,e){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const s=this.$$c.$on(t,n);this.$$l_u.set(n,s)}super.addEventListener(t,n,e)}removeEventListener(t,n,e){if(super.removeEventListener(t,n,e),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let r;return{c:function(){r=v("slot"),o!=="default"&&R(r,"name",o)},m:function($,c){M($,r,c)},d:function($){$&&y(r)}}}};if(await Promise.resolve(),!this.$$cn)return;const n={},e=Z(this);for(const o of this.$$s)o in e&&(n[o]=[t(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=_(r,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=_(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const r of this.$$l[o]){const $=this.$$c.$on(o,r);this.$$l_u.set(r,$)}this.$$l={}}}attributeChangedCallback(t,n,e){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=_(t,e,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function _(t,n,e,s){var o;const r=(o=e[t])==null?void 0:o.type;if(n=r==="Boolean"&&typeof n!="boolean"?n!=null:n,!s||!e[t])return n;if(s==="toAttribute")switch(r){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(r){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":return n;case"Number":return n!=null?+n:n;default:return n}}function lt(t,n,e,s,o,r){let $=class extends H{constructor(){super(t,e,o),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map(c=>(n[c].attribute||c).toLowerCase())}};return Object.keys(n).forEach(c=>{Object.defineProperty($.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(u){var i;u=_(c,u,n),this.$$d[c]=u,(i=this.$$c)==null||i.$set({[c]:u})}})}),s.forEach(c=>{Object.defineProperty($.prototype,c,{get(){var u;return(u=this.$$c)==null?void 0:u[c]}})}),r&&($=r($)),t.element=$,$}class ft{constructor(){a(this,"$$"),a(this,"$$set")}$destroy(){ut(this,1),this.$destroy=b}$on(n,e){if(!S(e))return b;const s=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return s.push(e),()=>{const o=s.indexOf(e);o!==-1&&s.splice(o,1)}}$set(n){this.$$set&&!F(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}const dt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(dt);export{ft as S,I as a,U as b,lt as c,V as d,v as e,k as f,M as g,y as h,ht as i,R as j,Y as k,B as l,X as m,b as n,nt as o,Q as p,z as s,w as t};
1
+ var G=Object.defineProperty,K=(t,n,e)=>n in t?G(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,a=(t,n,e)=>(K(t,typeof n!="symbol"?n+"":n,e),e);function y(){}function S(t){return t()}function B(){return Object.create(null)}function m(t){t.forEach(S)}function M(t){return typeof t=="function"}function Q(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function U(t){return Object.keys(t).length===0}function R(t,n){t.appendChild(n)}function V(t,n,e){const o=W(t);if(!o.getElementById(n)){const s=x("style");s.id=n,s.textContent=e,X(o,s)}}function W(t){if(!t)return document;const n=t.getRootNode?t.getRootNode():t.ownerDocument;return n&&n.host?n:t.ownerDocument}function X(t,n){return R(t.head||t,n),n.sheet}function T(t,n,e){t.insertBefore(n,e||null)}function w(t){t.parentNode&&t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function Z(){return E(" ")}function tt(){return E("")}function q(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function nt(t){return Array.from(t.childNodes)}function et(t,n){n=""+n,t.data!==n&&(t.data=n)}function ot(t,n,e,o){e==null?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function st(t){const n={};return t.childNodes.forEach(e=>{n[e.slot||"default"]=!0}),n}let b;function g(t){b=t}function rt(){if(!b)throw new Error("Function called outside component initialization");return b}function it(t){rt().$$.on_mount.push(t)}const f=[],D=[];let d=[];const H=[],ct=Promise.resolve();let k=!1;function $t(){k||(k=!0,ct.then(N))}function O(t){d.push(t)}const j=new Set;let p=0;function N(){if(p!==0)return;const t=b;do{try{for(;p<f.length;){const n=f[p];p++,g(n),ut(n.$$)}}catch(n){throw f.length=0,p=0,n}for(g(null),f.length=0,p=0;D.length;)D.pop()();for(let n=0;n<d.length;n+=1){const e=d[n];j.has(e)||(j.add(e),e())}d.length=0}while(f.length);for(;H.length;)H.pop()();k=!1,j.clear(),g(t)}function ut(t){if(t.fragment!==null){t.update(),m(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(O)}}function at(t){const n=[],e=[];d.forEach(o=>t.indexOf(o)===-1?n.push(o):e.push(o)),e.forEach(o=>o()),d=n}const _=new Set;let h;function lt(){h={r:0,c:[],p:h}}function ht(){h.r||m(h.c),h=h.p}function J(t,n){t&&t.i&&(_.delete(t),t.i(n))}function ft(t,n,e,o){if(t&&t.o){if(_.has(t))return;_.add(t),h.c.push(()=>{_.delete(t),o&&(e&&t.d(1),o())}),t.o(n)}else o&&o()}function dt(t){t&&t.c()}function z(t,n,e){const{fragment:o,after_update:s}=t.$$;o&&o.m(n,e),O(()=>{const r=t.$$.on_mount.map(S).filter(M);t.$$.on_destroy?t.$$.on_destroy.push(...r):m(r),t.$$.on_mount=[]}),s.forEach(O)}function F(t,n){const e=t.$$;e.fragment!==null&&(at(e.after_update),m(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function pt(t,n){t.$$.dirty[0]===-1&&(f.push(t),$t(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function mt(t,n,e,o,s,r,$,c=[-1]){const u=b;g(t);const i=t.$$={fragment:null,ctx:[],props:r,update:y,not_equal:s,bound:B(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:B(),dirty:c,skip_bound:!1,root:n.target||u.$$.root};$&&$(i.root);let P=!1;if(i.ctx=e?e(t,n.props||{},(l,A,...C)=>{const L=C.length?C[0]:A;return i.ctx&&s(i.ctx[l],i.ctx[l]=L)&&(!i.skip_bound&&i.bound[l]&&i.bound[l](L),P&&pt(t,l)),A}):[],i.update(),P=!0,m(i.before_update),i.fragment=o?o(i.ctx):!1,n.target){if(n.hydrate){const l=nt(n.target);i.fragment&&i.fragment.l(l),l.forEach(w)}else i.fragment&&i.fragment.c();n.intro&&J(t.$$.fragment),z(t,n.target,n.anchor),N()}g(u)}let I;typeof HTMLElement=="function"&&(I=class extends HTMLElement{constructor(t,n,e){super(),a(this,"$$ctor"),a(this,"$$s"),a(this,"$$c"),a(this,"$$cn",!1),a(this,"$$d",{}),a(this,"$$r",!1),a(this,"$$p_d",{}),a(this,"$$l",{}),a(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=n,e&&this.attachShadow({mode:"open"})}addEventListener(t,n,e){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,e)}removeEventListener(t,n,e){if(super.removeEventListener(t,n,e),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let r;return{c:function(){r=x("slot"),s!=="default"&&q(r,"name",s)},m:function($,c){T($,r,c)},d:function($){$&&w(r)}}}};if(await Promise.resolve(),!this.$$cn)return;const n={},e=st(this);for(const s of this.$$s)s in e&&(n[s]=[t(s)]);for(const s of this.attributes){const r=this.$$g_p(s.name);r in this.$$d||(this.$$d[r]=v(r,s.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const r=v(s,this.$$d[s],this.$$p_d,"toAttribute");r==null?this.removeAttribute(s):this.setAttribute(this.$$p_d[s].attribute||s,r)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const r of this.$$l[s]){const $=this.$$c.$on(s,r);this.$$l_u.set(r,$)}this.$$l={}}}attributeChangedCallback(t,n,e){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=v(t,e,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function v(t,n,e,o){var s;const r=(s=e[t])==null?void 0:s.type;if(n=r==="Boolean"&&typeof n!="boolean"?n!=null:n,!o||!e[t])return n;if(o==="toAttribute")switch(r){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(r){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":return n;case"Number":return n!=null?+n:n;default:return n}}function bt(t,n,e,o,s,r){let $=class extends I{constructor(){super(t,e,s),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map(c=>(n[c].attribute||c).toLowerCase())}};return Object.keys(n).forEach(c=>{Object.defineProperty($.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(u){var i;u=v(c,u,n),this.$$d[c]=u,(i=this.$$c)==null||i.$set({[c]:u})}})}),o.forEach(c=>{Object.defineProperty($.prototype,c,{get(){var u;return(u=this.$$c)==null?void 0:u[c]}})}),r&&($=r($)),t.element=$,$}class gt{constructor(){a(this,"$$"),a(this,"$$set")}$destroy(){F(this,1),this.$destroy=y}$on(n,e){if(!M(e))return y;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const s=o.indexOf(e);s!==-1&&o.splice(s,1)}}$set(n){this.$$set&&!U(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}const yt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(yt);export{gt as S,V as a,Z as b,bt as c,tt as d,x as e,N as f,T as g,w as h,mt as i,q as j,ot as k,R as l,et as m,y as n,it as o,Y as p,ft as q,ht as r,Q as s,E as t,J as u,lt as v,dt as w,z as x,F as y};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@glycanage/web-components",
3
3
  "description": "A collection of web-components",
4
- "version": "1.32.0",
4
+ "version": "1.34.0",
5
5
  "type": "module",
6
6
  "main": "dist/lib/@glycanage/web-components.js",
7
7
  "scripts": {