@glycanage/web-components 1.167.0 → 1.168.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 +1 @@
|
|
|
1
|
-
import{S as X,i as e2,s as t2,e as u,b,v as j,m as Y,n as e,p as s,g as k,q as o,r as q,u as K,k as A,c as s2,f as _,a as a2,w as c2,x as d2,j as p2,t as u2,y as h2,o as f2}from"./index2.js";import{s as i2,k as r2,a as z}from"./helpers.js";function l2(i){let t,l,r;return{c(){t=u("div"),l=b(),r=u("div"),e(t,"position","absolute"),e(t,"right","10px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(135deg)"),e(r,"position","absolute"),e(r,"right","10px"),e(r,"top","5px"),e(r,"height","3px"),e(r,"width","14px"),e(r,"background-color","#DD2222"),e(r,"border-radius","4px"),e(r,"transform","rotate(-135deg)")},m(n,d){k(n,t,d),k(n,l,d),k(n,r,d)},d(n){n&&(A(t),A(l),A(r))}}}function n2(i){let t,l,r;return{c(){t=u("div"),l=b(),r=u("div"),e(t,"position","absolute"),e(t,"left","11px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(45deg)"),e(r,"position","absolute"),e(r,"left","11px"),e(r,"top","5px"),e(r,"height","3px"),e(r,"width","14px"),e(r,"background-color","#DD2222"),e(r,"border-radius","4px"),e(r,"transform","rotate(-45deg)")},m(n,d){k(n,t,d),k(n,l,d),k(n,r,d)},d(n){n&&(A(t),A(l),A(r))}}}function g2(i){let t,l,r,n,d,a,G,L,M,B,f,g,S,p,N,x,T,m,C,c,y,Z,D,I,H,R,U=i2(i[0])+"",J,Q,W,w,P,O,V,$=i[1]==="left"&&l2(),E=i[1]==="right"&&n2();return{c(){t=u("div"),l=u("div"),$&&$.c(),r=b(),n=u("div"),d=b(),a=u("div"),G=b(),L=u("div"),M=b(),B=u("div"),f=b(),g=u("div"),S=b(),p=u("div"),N=b(),x=u("div"),E&&E.c(),T=b(),m=u("div"),C=j("svg"),c=j("rect"),Z=b(),D=u("div"),I=u("b"),H=Y(i[0]),R=u("sup"),J=Y(U),Q=Y(" percentile"),W=b(),w=u("div"),P=j("svg"),O=j("path"),e(l,"position","relative"),e(l,"height","100%"),e(l,"flex","1"),e(l,"background-color",i[1]==="left"?"#DD2222":"#CADBD1"),e(l,"border-radius","4px"),e(n,"height","100%"),e(n,"flex","2"),e(n,"background-color",i[1]==="left"?"#DD2222":"#CADBD1"),e(n,"border-radius","4px"),e(a,"height","100%"),e(a,"flex","2"),e(a,"background-color",i[1]==="left"?"#EE6600":"#CADBD1"),e(a,"border-radius","4px"),e(L,"position","relative"),e(L,"height","100%"),e(L,"flex","2"),e(L,"background-color","#CADBD1"),e(L,"border-radius","4px"),e(B,"height","100%"),e(B,"flex","2"),e(B,"background-color","#CADBD1"),e(B,"border-radius","4px"),e(g,"height","100%"),e(g,"flex","2"),e(g,"background-color",i[1]==="left"?"#CADBD1":"#EE6600"),e(g,"border-radius","4px"),e(p,"height","100%"),e(p,"flex","2"),e(p,"background-color",i[1]==="left"?"#CADBD1":"#DD2222"),e(p,"border-radius","4px"),e(x,"position","relative"),e(x,"height","100%"),e(x,"flex","1"),e(x,"background-color",i[1]==="left"?"#CADBD1":"#DD2222"),e(x,"border-radius","4px"),s(c,"width","100"),s(c,"height","24"),s(c,"rx","4"),s(c,"fill",y=F(i[0],i[1])),s(C,"width","100"),s(C,"height","24"),s(C,"viewBox","0 0 100 24"),s(C,"fill","none"),s(C,"xmlns","http://www.w3.org/2000/svg"),e(m,"left",i[2](i[0])+"%"),e(m,"position","absolute"),e(m,"transform","translate(-50%, -100%)"),e(m,"display","flex"),e(m,"align-items","center"),e(m,"flex-direction","column"),e(m,"width","100px"),e(m,"height","38px"),e(R,"font-size","0.5rem"),e(D,"left",i[2](i[0])+"%"),e(D,"position","absolute"),e(D,"transform","translate(-50%, -95%)"),e(D,"display","flex"),e(D,"align-items","center"),e(D,"flex-direction","column"),e(D,"width","100px"),e(D,"height","38px"),e(D,"color","white"),e(D,"font-size","0.75rem"),s(O,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),s(O,"fill",V=F(i[0],i[1])),s(P,"width","12"),s(P,"height","8"),s(P,"viewBox","0 0 12 8"),s(P,"fill","none"),s(P,"xmlns","http://www.w3.org/2000/svg"),e(w,"left",i[2](i[0])+"%"),e(w,"position","absolute"),e(w,"transform","translate(-50%, -40%)"),e(w,"display","flex"),e(w,"align-items","center"),e(w,"flex-direction","column"),e(w,"width","100px"),e(w,"height","38px"),e(w,"color","white"),e(w,"font-size","0.75rem"),e(t,"position","relative"),e(t,"width","92%"),e(t,"height","4px"),e(t,"display","flex"),e(t,"justify-content","space-between"),e(t,"gap","4px")},m(h,v){k(h,t,v),o(t,l),$&&$.m(l,null),o(t,r),o(t,n),o(t,d),o(t,a),o(t,G),o(t,L),o(t,M),o(t,B),o(t,f),o(t,g),o(t,S),o(t,p),o(t,N),o(t,x),E&&E.m(x,null),o(t,T),o(t,m),o(m,C),o(C,c),o(t,Z),o(t,D),o(D,I),o(I,H),o(I,R),o(R,J),o(I,Q),o(t,W),o(t,w),o(w,P),o(P,O)},p(h,[v]){h[1]==="left"?$||($=l2(),$.c(),$.m(l,null)):$&&($.d(1),$=null),v&2&&e(l,"background-color",h[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(n,"background-color",h[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(a,"background-color",h[1]==="left"?"#EE6600":"#CADBD1"),v&2&&e(g,"background-color",h[1]==="left"?"#CADBD1":"#EE6600"),v&2&&e(p,"background-color",h[1]==="left"?"#CADBD1":"#DD2222"),h[1]==="right"?E||(E=n2(),E.c(),E.m(x,null)):E&&(E.d(1),E=null),v&2&&e(x,"background-color",h[1]==="left"?"#CADBD1":"#DD2222"),v&3&&y!==(y=F(h[0],h[1]))&&s(c,"fill",y),v&1&&e(m,"left",h[2](h[0])+"%"),v&1&&q(H,h[0]),v&1&&U!==(U=i2(h[0])+"")&&q(J,U),v&1&&e(D,"left",h[2](h[0])+"%"),v&3&&V!==(V=F(h[0],h[1]))&&s(O,"fill",V),v&1&&e(w,"left",h[2](h[0])+"%")},i:K,o:K,d(h){h&&A(t),$&&$.d(),E&&E.d()}}}function F(i,t){return t==="left"?i>=34?"#119999":i>18&&i<34?"#EE6600":"#DD2222":i<=66?"#119999":i>66&&i<82?"#EE6600":"#DD2222"}function C2(i,t,l){let{percentile:r=0}=t,{direction:n=""}=t;function d(a){if(a===50)return 50;if(a<2)return 9;if(a>98)return 91;if(a>=2&&a<50)return r2(a,9.2,50,13,50);if(a>50&&a<=98)return r2(a,50,90.8,50,86.8)}return i.$$set=a=>{"percentile"in a&&l(0,r=a.percentile),"direction"in a&&l(1,n=a.direction)},[r,n,d]}class x2 extends X{constructor(t){super(),e2(this,t,C2,g2,t2,{percentile:0,direction:1})}}function m2(i){a2(i,"svelte-9bcij0",".main.svelte-9bcij0{height:100%;width:100%;display:flex}.label.svelte-9bcij0{width:25%;display:flex;align-items:center}")}function b2(i){let t,l=z(i[0],"GLYCAN")+"",r;return{c(){t=u("b"),r=Y(l)},m(n,d){k(n,t,d),o(t,r)},p(n,d){d&1&&l!==(l=z(n[0],"GLYCAN")+"")&&q(r,l)},d(n){n&&A(t)}}}function v2(i){let t,l,r;return{c(){t=j("svg"),l=j("path"),s(l,"d","M10.8656 29.0002L8.93229 25.7335L5.26563 24.9335C4.93229 24.8668 4.66563 24.6946 4.46563 24.4168C4.26563 24.139 4.18785 23.8335 4.23229 23.5002L4.59896 19.7335L2.09896 16.8668C1.87674 16.6224 1.76562 16.3335 1.76562 16.0002C1.76562 15.6668 1.87674 15.3779 2.09896 15.1335L4.59896 12.2668L4.23229 8.50016C4.18785 8.16682 4.26563 7.86127 4.46563 7.58349C4.66563 7.30571 4.93229 7.13349 5.26563 7.06682L8.93229 6.26682L10.8656 3.00016C11.0434 2.71127 11.2878 2.51682 11.599 2.41682C11.9101 2.31682 12.2212 2.33349 12.5323 2.46682L15.999 3.93349L19.4656 2.46682C19.7767 2.33349 20.0878 2.31682 20.399 2.41682C20.7101 2.51682 20.9545 2.71127 21.1323 3.00016L23.0656 6.26682L26.7323 7.06682C27.0656 7.13349 27.3323 7.30571 27.5323 7.58349C27.7323 7.86127 27.8101 8.16682 27.7656 8.50016L27.399 12.2668L29.899 15.1335C30.1212 15.3779 30.2323 15.6668 30.2323 16.0002C30.2323 16.3335 30.1212 16.6224 29.899 16.8668L27.399 19.7335L27.7656 23.5002C27.8101 23.8335 27.7323 24.139 27.5323 24.4168C27.3323 24.6946 27.0656 24.8668 26.7323 24.9335L23.0656 25.7335L21.1323 29.0002C20.9545 29.289 20.7101 29.4835 20.399 29.5835C20.0878 29.6835 19.7767 29.6668 19.4656 29.5335L15.999 28.0668L12.5323 29.5335C12.2212 29.6668 11.9101 29.6835 11.599 29.5835C11.2878 29.4835 11.0434 29.289 10.8656 29.0002ZM15.999 22.6668C16.3767 22.6668 16.6934 22.539 16.949 22.2835C17.2045 22.0279 17.3323 21.7113 17.3323 21.3335C17.3323 20.9557 17.2045 20.639 16.949 20.3835C16.6934 20.1279 16.3767 20.0002 15.999 20.0002C15.6212 20.0002 15.3045 20.1279 15.049 20.3835C14.7934 20.639 14.6656 20.9557 14.6656 21.3335C14.6656 21.7113 14.7934 22.0279 15.049 22.2835C15.3045 22.539 15.6212 22.6668 15.999 22.6668ZM15.999 17.3335C16.3767 17.3335 16.6934 17.2057 16.949 16.9502C17.2045 16.6946 17.3323 16.3779 17.3323 16.0002V10.6668C17.3323 10.289 17.2045 9.97238 16.949 9.71682C16.6934 9.46127 16.3767 9.33349 15.999 9.33349C15.6212 9.33349 15.3045 9.46127 15.049 9.71682C14.7934 9.97238 14.6656 10.289 14.6656 10.6668V16.0002C14.6656 16.3779 14.7934 16.6946 15.049 16.9502C15.3045 17.2057 15.6212 17.3335 15.999 17.3335Z"),s(l,"fill",r=i[3]==="#EE6600"?"#EE6600":"#DD2222"),s(t,"width","32"),s(t,"height","32"),s(t,"viewBox","0 0 32 32"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(n,d){k(n,t,d),o(t,l)},p(n,d){d&8&&r!==(r=n[3]==="#EE6600"?"#EE6600":"#DD2222")&&s(l,"fill",r)},d(n){n&&A(t)}}}function L2(i){let t,l;return{c(){t=j("svg"),l=j("path"),s(l,"d","M13.599 14.9335L11.6656 13.0335C11.4212 12.789 11.1156 12.6668 10.749 12.6668C10.3823 12.6668 10.0656 12.8002 9.79896 13.0668C9.55451 13.3113 9.43229 13.6224 9.43229 14.0002C9.43229 14.3779 9.55451 14.689 9.79896 14.9335L12.6656 17.8002C12.9323 18.0668 13.2434 18.2002 13.599 18.2002C13.9545 18.2002 14.2656 18.0668 14.5323 17.8002L20.199 12.1335C20.4656 11.8668 20.5934 11.5557 20.5823 11.2002C20.5712 10.8446 20.4434 10.5335 20.199 10.2668C19.9323 10.0002 19.6156 9.86127 19.249 9.85016C18.8823 9.83905 18.5656 9.96683 18.299 10.2335L13.599 14.9335ZM9.86563 27.0002L7.93229 23.7335L4.26563 22.9335C3.93229 22.8668 3.66563 22.6946 3.46563 22.4168C3.26563 22.1391 3.18785 21.8335 3.23229 21.5002L3.59896 17.7335L1.09896 14.8668C0.876736 14.6224 0.765625 14.3335 0.765625 14.0002C0.765625 13.6668 0.876736 13.3779 1.09896 13.1335L3.59896 10.2668L3.23229 6.50016C3.18785 6.16683 3.26563 5.86127 3.46563 5.58349C3.66563 5.30571 3.93229 5.13349 4.26563 5.06683L7.93229 4.26683L9.86563 1.00016C10.0434 0.711269 10.2878 0.516825 10.599 0.416825C10.9101 0.316825 11.2212 0.333491 11.5323 0.466825L14.999 1.93349L18.4656 0.466825C18.7767 0.333491 19.0878 0.316825 19.399 0.416825C19.7101 0.516825 19.9545 0.711269 20.1323 1.00016L22.0656 4.26683L25.7323 5.06683C26.0656 5.13349 26.3323 5.30571 26.5323 5.58349C26.7323 5.86127 26.8101 6.16683 26.7656 6.50016L26.399 10.2668L28.899 13.1335C29.1212 13.3779 29.2323 13.6668 29.2323 14.0002C29.2323 14.3335 29.1212 14.6224 28.899 14.8668L26.399 17.7335L26.7656 21.5002C26.8101 21.8335 26.7323 22.1391 26.5323 22.4168C26.3323 22.6946 26.0656 22.8668 25.7323 22.9335L22.0656 23.7335L20.1323 27.0002C19.9545 27.2891 19.7101 27.4835 19.399 27.5835C19.0878 27.6835 18.7767 27.6668 18.4656 27.5335L14.999 26.0668L11.5323 27.5335C11.2212 27.6668 10.9101 27.6835 10.599 27.5835C10.2878 27.4835 10.0434 27.2891 9.86563 27.0002Z"),s(l,"fill","#119999"),s(t,"width","30"),s(t,"height","28"),s(t,"viewBox","0 0 30 28"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(r,n){k(r,t,n),o(t,l)},p:K,d(r){r&&A(t)}}}function D2(i){let t,l,r,n,d,a,G,L,M,B,f,g,S,p,N,x=(i[5].name==="shield"||i[5].name==="mature"||i[5].name==="median"||i[5].name==="youth"||i[5].name==="lifestyle")&&b2(i);g=new x2({props:{direction:i[1],percentile:i[4]}});function T(c,y){return c[3]==="#119999"?L2:v2}let m=T(i),C=m(i);return{c(){t=u("div"),l=u("div"),r=u("div"),n=u("div"),x&&x.c(),d=b(),a=u("b"),a.textContent=`${i[5].label}`,G=b(),L=u("div"),M=Y(i[2]),B=b(),f=u("div"),c2(g.$$.fragment),S=b(),p=u("div"),C.c(),e(n,"font-size","0.9rem"),e(r,"display","flex"),e(r,"flex-direction","column"),e(r,"padding-left","0.3rem"),s(l,"class","label svelte-9bcij0"),e(l,"font-size","0.8rem"),e(f,"width","70%"),e(f,"display","flex"),e(f,"align-items","center"),e(f,"justify-content","center"),e(p,"width","5%"),e(p,"height","100%"),e(p,"display","flex"),e(p,"align-items","center"),s(t,"class","main svelte-9bcij0")},m(c,y){k(c,t,y),o(t,l),o(l,r),o(r,n),x&&x.m(n,null),o(n,d),o(n,a),o(r,G),o(r,L),o(L,M),o(t,B),o(t,f),d2(g,f,null),o(t,S),o(t,p),C.m(p,null),N=!0},p(c,[y]){(c[5].name==="shield"||c[5].name==="mature"||c[5].name==="median"||c[5].name==="youth"||c[5].name==="lifestyle")&&x.p(c,y),(!N||y&4)&&q(M,c[2]);const Z={};y&2&&(Z.direction=c[1]),y&16&&(Z.percentile=c[4]),g.$set(Z),m===(m=T(c))&&C?C.p(c,y):(C.d(1),C=m(c),C&&(C.c(),C.m(p,null)))},i(c){N||(p2(g.$$.fragment,c),N=!0)},o(c){u2(g.$$.fragment,c),N=!1},d(c){c&&A(t),x&&x.d(),h2(g),C.d()}}}function w2(i,t){return t==="left"?i>=34?"#119999":i>18&&i<34?"#EE6600":"#DD2222":i<=66?"#119999":i>66&&i<82?"#EE6600":"#DD2222"}function y2(i,t,l){let{lang:r}=t,{subtype:n}=t,{direction:d}=t,{service:a=window.GaReportService}=t,G=[{name:"mature",label:"Mature",csvName:"G0percentile"},{name:"youth",label:"Youth",csvName:"G2percentile"},{name:"shield",label:"Shield",csvName:"Spercentile"},{name:"lifestyle",label:"Lifestyle",csvName:"Bpercentile"},{name:"median",label:"Median",csvName:"G1percentile"},{name:"peak18",label:"P18",csvName:"P18percentile"},{name:"peak22",label:"P22",csvName:"P22percentile"},{name:"peak23",label:"P23",csvName:"P23percentile"},{name:"peak26",label:"P26",csvName:"P26percentile"}],L,M="",B="",f=0;const g=G.find(p=>p.name===n);function S(){return d==="right"?f<=66?z(r,"OPTIMAL"):z(r,"SUBOPTIMAL"):f>=34?z(r,"OPTIMAL"):z(r,"SUBOPTIMAL")}return f2(async()=>{L=await a.getReport(),g&&(l(4,f=Number(L[g.csvName])),l(2,M=S())),(f===100||f===0)&&l(4,f=f===100?99:1),l(3,B=w2(f,d))}),i.$$set=p=>{"lang"in p&&l(0,r=p.lang),"subtype"in p&&l(6,n=p.subtype),"direction"in p&&l(1,d=p.direction),"service"in p&&l(7,a=p.service)},[r,d,M,B,f,g,n,a]}class o2 extends X{constructor(t){super(),e2(this,t,y2,D2,t2,{lang:0,subtype:6,direction:1,service:7},m2)}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),_()}get subtype(){return this.$$.ctx[6]}set subtype(t){this.$$set({subtype:t}),_()}get direction(){return this.$$.ctx[1]}set direction(t){this.$$set({direction:t}),_()}get service(){return this.$$.ctx[7]}set service(t){this.$$set({service:t}),_()}}customElements.define("ga-arrow-graph-three",s2(o2,{lang:{},subtype:{},direction:{},service:{}},[],[],!0));export{o2 as default};
|
|
1
|
+
import{S as W,i as X,s as e2,e as u,b,v as j,m as Y,n as e,p as s,g as B,q as o,r as q,u as t2,k as N,c as s2,f as _,a as a2,w as c2,x as d2,j as u2,t as p2,y as h2,o as f2}from"./index2.js";import{s as i2,k as r2,a as z}from"./helpers.js";function n2(r){let t,n,i;return{c(){t=u("div"),n=b(),i=u("div"),e(t,"position","absolute"),e(t,"right","10px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(135deg)"),e(i,"position","absolute"),e(i,"right","10px"),e(i,"top","5px"),e(i,"height","3px"),e(i,"width","14px"),e(i,"background-color","#DD2222"),e(i,"border-radius","4px"),e(i,"transform","rotate(-135deg)")},m(l,p){B(l,t,p),B(l,n,p),B(l,i,p)},d(l){l&&(N(t),N(n),N(i))}}}function o2(r){let t,n,i;return{c(){t=u("div"),n=b(),i=u("div"),e(t,"position","absolute"),e(t,"left","11px"),e(t,"bottom","5px"),e(t,"height","3px"),e(t,"width","14px"),e(t,"background-color","#DD2222"),e(t,"border-radius","4px"),e(t,"transform","rotate(45deg)"),e(i,"position","absolute"),e(i,"left","11px"),e(i,"top","5px"),e(i,"height","3px"),e(i,"width","14px"),e(i,"background-color","#DD2222"),e(i,"border-radius","4px"),e(i,"transform","rotate(-45deg)")},m(l,p){B(l,t,p),B(l,n,p),B(l,i,p)},d(l){l&&(N(t),N(n),N(i))}}}function g2(r){let t,n,i,l,p,a,G,L,P,k,f,g,S,d,M,C,T,x,m,c,A,Z,D,I,H,R,U=i2(r[0])+"",J,K,Q,w,E,O,V,y=r[1]==="left"&&n2(),$=r[1]==="right"&&o2();return{c(){t=u("div"),n=u("div"),y&&y.c(),i=b(),l=u("div"),p=b(),a=u("div"),G=b(),L=u("div"),P=b(),k=u("div"),f=b(),g=u("div"),S=b(),d=u("div"),M=b(),C=u("div"),$&&$.c(),T=b(),x=u("div"),m=j("svg"),c=j("rect"),Z=b(),D=u("div"),I=u("b"),H=Y(r[0]),R=u("sup"),J=Y(U),K=Y(" percentile"),Q=b(),w=u("div"),E=j("svg"),O=j("path"),e(n,"position","relative"),e(n,"height","100%"),e(n,"flex","1"),e(n,"background-color",r[1]==="left"?"#DD2222":"#CADBD1"),e(n,"border-radius","4px"),e(l,"height","100%"),e(l,"flex","2"),e(l,"background-color",r[1]==="left"?"#DD2222":"#CADBD1"),e(l,"border-radius","4px"),e(a,"height","100%"),e(a,"flex","2"),e(a,"background-color",r[1]==="left"?"#EE6600":"#CADBD1"),e(a,"border-radius","4px"),e(L,"position","relative"),e(L,"height","100%"),e(L,"flex","2"),e(L,"background-color","#CADBD1"),e(L,"border-radius","4px"),e(k,"height","100%"),e(k,"flex","2"),e(k,"background-color","#CADBD1"),e(k,"border-radius","4px"),e(g,"height","100%"),e(g,"flex","2"),e(g,"background-color",r[1]==="left"?"#CADBD1":"#EE6600"),e(g,"border-radius","4px"),e(d,"height","100%"),e(d,"flex","2"),e(d,"background-color",r[1]==="left"?"#CADBD1":"#DD2222"),e(d,"border-radius","4px"),e(C,"position","relative"),e(C,"height","100%"),e(C,"flex","1"),e(C,"background-color",r[1]==="left"?"#CADBD1":"#DD2222"),e(C,"border-radius","4px"),s(c,"width","100"),s(c,"height","24"),s(c,"rx","4"),s(c,"fill",A=F(r[0],r[1])),s(m,"width","100"),s(m,"height","24"),s(m,"viewBox","0 0 100 24"),s(m,"fill","none"),s(m,"xmlns","http://www.w3.org/2000/svg"),e(x,"left",r[2](r[0])+"%"),e(x,"position","absolute"),e(x,"transform","translate(-50%, -85%)"),e(x,"display","flex"),e(x,"align-items","center"),e(x,"flex-direction","column"),e(x,"width","100px"),e(x,"height","38px"),e(R,"font-size","0.5rem"),e(D,"left",r[2](r[0])+"%"),e(D,"position","absolute"),e(D,"transform","translate(-50%, -80%)"),e(D,"display","flex"),e(D,"align-items","center"),e(D,"flex-direction","column"),e(D,"width","100px"),e(D,"height","38px"),e(D,"color","white"),e(D,"font-size","0.75rem"),s(O,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),s(O,"fill",V=F(r[0],r[1])),s(E,"width","12"),s(E,"height","8"),s(E,"viewBox","0 0 12 8"),s(E,"fill","none"),s(E,"xmlns","http://www.w3.org/2000/svg"),e(w,"left",r[2](r[0])+"%"),e(w,"position","absolute"),e(w,"transform","translate(-50%, -25%)"),e(w,"display","flex"),e(w,"align-items","center"),e(w,"flex-direction","column"),e(w,"width","100px"),e(w,"height","38px"),e(w,"color","white"),e(w,"font-size","0.75rem"),e(t,"position","relative"),e(t,"width","92%"),e(t,"height","4px"),e(t,"display","flex"),e(t,"justify-content","space-between"),e(t,"gap","4px")},m(h,v){B(h,t,v),o(t,n),y&&y.m(n,null),o(t,i),o(t,l),o(t,p),o(t,a),o(t,G),o(t,L),o(t,P),o(t,k),o(t,f),o(t,g),o(t,S),o(t,d),o(t,M),o(t,C),$&&$.m(C,null),o(t,T),o(t,x),o(x,m),o(m,c),o(t,Z),o(t,D),o(D,I),o(I,H),o(I,R),o(R,J),o(I,K),o(t,Q),o(t,w),o(w,E),o(E,O)},p(h,[v]){h[1]==="left"?y||(y=n2(),y.c(),y.m(n,null)):y&&(y.d(1),y=null),v&2&&e(n,"background-color",h[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(l,"background-color",h[1]==="left"?"#DD2222":"#CADBD1"),v&2&&e(a,"background-color",h[1]==="left"?"#EE6600":"#CADBD1"),v&2&&e(g,"background-color",h[1]==="left"?"#CADBD1":"#EE6600"),v&2&&e(d,"background-color",h[1]==="left"?"#CADBD1":"#DD2222"),h[1]==="right"?$||($=o2(),$.c(),$.m(C,null)):$&&($.d(1),$=null),v&2&&e(C,"background-color",h[1]==="left"?"#CADBD1":"#DD2222"),v&3&&A!==(A=F(h[0],h[1]))&&s(c,"fill",A),v&1&&e(x,"left",h[2](h[0])+"%"),v&1&&q(H,h[0]),v&1&&U!==(U=i2(h[0])+"")&&q(J,U),v&1&&e(D,"left",h[2](h[0])+"%"),v&3&&V!==(V=F(h[0],h[1]))&&s(O,"fill",V),v&1&&e(w,"left",h[2](h[0])+"%")},i:t2,o:t2,d(h){h&&N(t),y&&y.d(),$&&$.d()}}}function F(r,t){return t==="left"?r>=34?"#119999":"#DD2222":r<=66?"#119999":"#DD2222"}function C2(r,t,n){let{percentile:i=0}=t,{direction:l=""}=t;function p(a){if(a===50)return 50;if(a<2)return 9;if(a>98)return 91;if(a>=2&&a<50)return r2(a,9.2,50,13,50);if(a>50&&a<=98)return r2(a,50,90.8,50,86.8)}return r.$$set=a=>{"percentile"in a&&n(0,i=a.percentile),"direction"in a&&n(1,l=a.direction)},[i,l,p]}class x2 extends W{constructor(t){super(),X(this,t,C2,g2,e2,{percentile:0,direction:1})}}function m2(r){a2(r,"svelte-9bcij0",".main.svelte-9bcij0{height:100%;width:100%;display:flex}.label.svelte-9bcij0{width:25%;display:flex;align-items:center}")}function b2(r){let t,n=z(r[0],"GLYCAN")+"",i;return{c(){t=u("b"),i=Y(n)},m(l,p){B(l,t,p),o(t,i)},p(l,p){p&1&&n!==(n=z(l[0],"GLYCAN")+"")&&q(i,n)},d(l){l&&N(t)}}}function v2(r){let t,n;return{c(){t=j("svg"),n=j("path"),s(n,"d","M10.8656 29.0002L8.93229 25.7335L5.26563 24.9335C4.93229 24.8668 4.66563 24.6946 4.46563 24.4168C4.26563 24.139 4.18785 23.8335 4.23229 23.5002L4.59896 19.7335L2.09896 16.8668C1.87674 16.6224 1.76562 16.3335 1.76562 16.0002C1.76562 15.6668 1.87674 15.3779 2.09896 15.1335L4.59896 12.2668L4.23229 8.50016C4.18785 8.16682 4.26563 7.86127 4.46563 7.58349C4.66563 7.30571 4.93229 7.13349 5.26563 7.06682L8.93229 6.26682L10.8656 3.00016C11.0434 2.71127 11.2878 2.51682 11.599 2.41682C11.9101 2.31682 12.2212 2.33349 12.5323 2.46682L15.999 3.93349L19.4656 2.46682C19.7767 2.33349 20.0878 2.31682 20.399 2.41682C20.7101 2.51682 20.9545 2.71127 21.1323 3.00016L23.0656 6.26682L26.7323 7.06682C27.0656 7.13349 27.3323 7.30571 27.5323 7.58349C27.7323 7.86127 27.8101 8.16682 27.7656 8.50016L27.399 12.2668L29.899 15.1335C30.1212 15.3779 30.2323 15.6668 30.2323 16.0002C30.2323 16.3335 30.1212 16.6224 29.899 16.8668L27.399 19.7335L27.7656 23.5002C27.8101 23.8335 27.7323 24.139 27.5323 24.4168C27.3323 24.6946 27.0656 24.8668 26.7323 24.9335L23.0656 25.7335L21.1323 29.0002C20.9545 29.289 20.7101 29.4835 20.399 29.5835C20.0878 29.6835 19.7767 29.6668 19.4656 29.5335L15.999 28.0668L12.5323 29.5335C12.2212 29.6668 11.9101 29.6835 11.599 29.5835C11.2878 29.4835 11.0434 29.289 10.8656 29.0002ZM15.999 22.6668C16.3767 22.6668 16.6934 22.539 16.949 22.2835C17.2045 22.0279 17.3323 21.7113 17.3323 21.3335C17.3323 20.9557 17.2045 20.639 16.949 20.3835C16.6934 20.1279 16.3767 20.0002 15.999 20.0002C15.6212 20.0002 15.3045 20.1279 15.049 20.3835C14.7934 20.639 14.6656 20.9557 14.6656 21.3335C14.6656 21.7113 14.7934 22.0279 15.049 22.2835C15.3045 22.539 15.6212 22.6668 15.999 22.6668ZM15.999 17.3335C16.3767 17.3335 16.6934 17.2057 16.949 16.9502C17.2045 16.6946 17.3323 16.3779 17.3323 16.0002V10.6668C17.3323 10.289 17.2045 9.97238 16.949 9.71682C16.6934 9.46127 16.3767 9.33349 15.999 9.33349C15.6212 9.33349 15.3045 9.46127 15.049 9.71682C14.7934 9.97238 14.6656 10.289 14.6656 10.6668V16.0002C14.6656 16.3779 14.7934 16.6946 15.049 16.9502C15.3045 17.2057 15.6212 17.3335 15.999 17.3335Z"),s(n,"fill","#DD2222"),s(t,"width","32"),s(t,"height","32"),s(t,"viewBox","0 0 32 32"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(i,l){B(i,t,l),o(t,n)},d(i){i&&N(t)}}}function L2(r){let t,n;return{c(){t=j("svg"),n=j("path"),s(n,"d","M13.599 14.9335L11.6656 13.0335C11.4212 12.789 11.1156 12.6668 10.749 12.6668C10.3823 12.6668 10.0656 12.8002 9.79896 13.0668C9.55451 13.3113 9.43229 13.6224 9.43229 14.0002C9.43229 14.3779 9.55451 14.689 9.79896 14.9335L12.6656 17.8002C12.9323 18.0668 13.2434 18.2002 13.599 18.2002C13.9545 18.2002 14.2656 18.0668 14.5323 17.8002L20.199 12.1335C20.4656 11.8668 20.5934 11.5557 20.5823 11.2002C20.5712 10.8446 20.4434 10.5335 20.199 10.2668C19.9323 10.0002 19.6156 9.86127 19.249 9.85016C18.8823 9.83905 18.5656 9.96683 18.299 10.2335L13.599 14.9335ZM9.86563 27.0002L7.93229 23.7335L4.26563 22.9335C3.93229 22.8668 3.66563 22.6946 3.46563 22.4168C3.26563 22.1391 3.18785 21.8335 3.23229 21.5002L3.59896 17.7335L1.09896 14.8668C0.876736 14.6224 0.765625 14.3335 0.765625 14.0002C0.765625 13.6668 0.876736 13.3779 1.09896 13.1335L3.59896 10.2668L3.23229 6.50016C3.18785 6.16683 3.26563 5.86127 3.46563 5.58349C3.66563 5.30571 3.93229 5.13349 4.26563 5.06683L7.93229 4.26683L9.86563 1.00016C10.0434 0.711269 10.2878 0.516825 10.599 0.416825C10.9101 0.316825 11.2212 0.333491 11.5323 0.466825L14.999 1.93349L18.4656 0.466825C18.7767 0.333491 19.0878 0.316825 19.399 0.416825C19.7101 0.516825 19.9545 0.711269 20.1323 1.00016L22.0656 4.26683L25.7323 5.06683C26.0656 5.13349 26.3323 5.30571 26.5323 5.58349C26.7323 5.86127 26.8101 6.16683 26.7656 6.50016L26.399 10.2668L28.899 13.1335C29.1212 13.3779 29.2323 13.6668 29.2323 14.0002C29.2323 14.3335 29.1212 14.6224 28.899 14.8668L26.399 17.7335L26.7656 21.5002C26.8101 21.8335 26.7323 22.1391 26.5323 22.4168C26.3323 22.6946 26.0656 22.8668 25.7323 22.9335L22.0656 23.7335L20.1323 27.0002C19.9545 27.2891 19.7101 27.4835 19.399 27.5835C19.0878 27.6835 18.7767 27.6668 18.4656 27.5335L14.999 26.0668L11.5323 27.5335C11.2212 27.6668 10.9101 27.6835 10.599 27.5835C10.2878 27.4835 10.0434 27.2891 9.86563 27.0002Z"),s(n,"fill","#119999"),s(t,"width","30"),s(t,"height","28"),s(t,"viewBox","0 0 30 28"),s(t,"fill","none"),s(t,"xmlns","http://www.w3.org/2000/svg")},m(i,l){B(i,t,l),o(t,n)},d(i){i&&N(t)}}}function D2(r){let t,n,i,l,p,a,G,L,P,k,f,g,S,d,M,C=(r[5].name==="shield"||r[5].name==="mature"||r[5].name==="median"||r[5].name==="youth"||r[5].name==="lifestyle")&&b2(r);g=new x2({props:{direction:r[1],percentile:r[4]}});function T(c,A){return c[3]==="#119999"?L2:v2}let x=T(r),m=x(r);return{c(){t=u("div"),n=u("div"),i=u("div"),l=u("div"),C&&C.c(),p=b(),a=u("b"),a.textContent=`${r[5].label}`,G=b(),L=u("div"),P=Y(r[2]),k=b(),f=u("div"),c2(g.$$.fragment),S=b(),d=u("div"),m.c(),e(l,"font-size","0.9rem"),e(i,"display","flex"),e(i,"flex-direction","column"),e(i,"padding-left","0.3rem"),s(n,"class","label svelte-9bcij0"),e(n,"font-size","0.8rem"),e(f,"width","70%"),e(f,"display","flex"),e(f,"align-items","center"),e(f,"justify-content","center"),e(d,"width","5%"),e(d,"height","100%"),e(d,"display","flex"),e(d,"align-items","center"),s(t,"class","main svelte-9bcij0")},m(c,A){B(c,t,A),o(t,n),o(n,i),o(i,l),C&&C.m(l,null),o(l,p),o(l,a),o(i,G),o(i,L),o(L,P),o(t,k),o(t,f),d2(g,f,null),o(t,S),o(t,d),m.m(d,null),M=!0},p(c,[A]){(c[5].name==="shield"||c[5].name==="mature"||c[5].name==="median"||c[5].name==="youth"||c[5].name==="lifestyle")&&C.p(c,A),(!M||A&4)&&q(P,c[2]);const Z={};A&2&&(Z.direction=c[1]),A&16&&(Z.percentile=c[4]),g.$set(Z),x!==(x=T(c))&&(m.d(1),m=x(c),m&&(m.c(),m.m(d,null)))},i(c){M||(u2(g.$$.fragment,c),M=!0)},o(c){p2(g.$$.fragment,c),M=!1},d(c){c&&N(t),C&&C.d(),h2(g),m.d()}}}function w2(r,t){return t==="left"?r>=34?"#119999":"#DD2222":r<=66?"#119999":"#DD2222"}function y2(r,t,n){let{lang:i}=t,{subtype:l}=t,{direction:p}=t,{service:a=window.GaReportService}=t,G=[{name:"mature",label:"Mature",csvName:"G0percentile"},{name:"youth",label:"Youth",csvName:"G2percentile"},{name:"shield",label:"Shield",csvName:"Spercentile"},{name:"lifestyle",label:"Lifestyle",csvName:"Bpercentile"},{name:"median",label:"Median",csvName:"G1percentile"},{name:"peak18",label:"P18",csvName:"P18percentile"},{name:"peak22",label:"P22",csvName:"P22percentile"},{name:"peak23",label:"P23",csvName:"P23percentile"},{name:"peak26",label:"P26",csvName:"P26percentile"}],L,P="",k="",f=0;const g=G.find(d=>d.name===l);function S(){return p==="right"?f<=66?z(i,"OPTIMAL"):z(i,"SUBOPTIMAL"):f>=34?z(i,"OPTIMAL"):z(i,"SUBOPTIMAL")}return f2(async()=>{L=await a.getReport(),g&&(n(4,f=Number(L[g.csvName])),n(2,P=S())),(f===100||f===0)&&n(4,f=f===100?99:1),n(3,k=w2(f,p))}),r.$$set=d=>{"lang"in d&&n(0,i=d.lang),"subtype"in d&&n(6,l=d.subtype),"direction"in d&&n(1,p=d.direction),"service"in d&&n(7,a=d.service)},[i,p,P,k,f,g,l,a]}class l2 extends W{constructor(t){super(),X(this,t,y2,D2,e2,{lang:0,subtype:6,direction:1,service:7},m2)}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),_()}get subtype(){return this.$$.ctx[6]}set subtype(t){this.$$set({subtype:t}),_()}get direction(){return this.$$.ctx[1]}set direction(t){this.$$set({direction:t}),_()}get service(){return this.$$.ctx[7]}set service(t){this.$$set({service:t}),_()}}customElements.define("ga-arrow-graph-three",s2(l2,{lang:{},subtype:{},direction:{},service:{}},[],[],!0));export{l2 as default};
|