PageSourceSearch

https://stupendiumstore.com/assets/TmlGeoChart.44664741.js

js stupendiumstore.com collected 2026-09-30 06:13:35 UTC 4,569 bytes, 2 lines download raw bytes

1import{d as b,r as m,w as d,o as _,l as D,h as G,ai as R,N as A,D as O,W as T}from"./vue.00f7c436.js";import{_ as j}from"./index.474d7b13.js";import"./sentry.09480738.js";const g="https://www.gstatic.com/charts/loader.js";let f=null;const h=new Map;function x(){return window.google!==void 0?Promise.resolve(window.google.charts):(f===null&&(f=new Promise(e=>{const t=document.querySelector('script[src="'.concat(g,'"]')),n=t||document.createElement("script");t||(n.src=g,n.type="text/javascript",document.head.append(n)),n.onload=()=>{window.google!==void 0&&e(window.google.charts)}})),f)}async function k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"current",{packages:t=["corechart","controls"],language:n="en",mapsApiKey:o}=arguments.length>1?arguments[1]:void 0;const a=await x(),r="".concat(e,"_").concat(t.join("_"),"_").concat(n);if(h.has(r))return h.get(r);const i=new Promise(l=>{a.load(e,{packages:t,language:n,mapsApiKey:o}),a.setOnLoadCallback(()=>l(window.google))});return h.set(r,i),i}function E(e,t,n){return e!==null&&t instanceof e.visualization.DataTable||e!==null&&t instanceof e.visualization.DataView?t:e!==null&&Array.isArray(t)?e.visualization.arrayToDataTable(t,n):e!==null&&t!==null&&typeof t=="object"?new e.visualization.DataTable(t):null}function w(e,t,n,o,a,r){const i=(u,c,p)=>{if(p===void 0)throw new Error("please, provide chart type property");return new c.visualization[p](u)};if(e===null)throw new Error("please, provide charts lib property");if(n===null)throw new Error("please, provide chart element property");return t=(r||i)(n,e,o),F(e,t,a),t}function F(e,t,n){if(n!==null)for(const[o,a]of Object.entries(n))e!==null&&t!==null&&e.visualization.events.addListener(t,o,a)}function y(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:50,n;function o(){return t}return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];const u=this,c=function(){n=void 0,e.apply(u,i)};n!==void 0&&clearTimeout(n),n=setTimeout(c,o())}}let s=null;const C=b({name:"GChart",props:{type:{type:String,required:!0},data:{type:[Array,Object,null],default:()=>[]},isFirstRowLabels:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},version:{type:String,default:"current"},settings:{type:Object,default:()=>({packages:["corechart","table"]})},events:{type:Object,default:null},createChart:{type:Function,default:void 0},resizeDebounce:{type:Number,default:200}},setup(e,t){let{emit:n}=t;const o=m(null),a=m(null);function r(){if(s===null||o.value===null)return;const i=E(s,e.data,e.isFirstRowLabels);if(i!==null){var l;(l=o.value)===null||l===void 0||l.draw(i,e.options)}}return d(()=>e.data,()=>r(),{deep:!0}),d(()=>e.options,()=>r(),{deep:!0}),d(()=>e.type,()=>{o.value=w(s,o.value,a.value,e.type,e.events,e.createChart),r()}),_(()=>{k(e.version,e.settings).then(i=>{i!==void 0&&(s=i,o.value=w(s,o.value,a.value,e.type,e.events,e.createChart),n("ready",o.value,i),r())}),e.resizeDebounce>0&&window.addEventListener("resize",y(r,e.resizeDebounce))}),D(()=>{o.value!==null&&typeof o.value.clearChart=="function"&&o.value.clearChart(),e.resizeDebounce>0&&window.removeEventListener("resize",y(r,e.resizeDebounce))}),()=>G("div",{ref:a},[])}}),z=R({});function P(){z.component("GChart",C)}const S={version:"1.1.0",install:P};let v=null;typeof window<"u"&&(v=window.Vue);v!=null&&z.use(S);const V={name:"TmlGeoChart",components:{GChart:C},inject:["theme"],props:{label:{type:String,required:!0},data:Array},data(){return{chartOptions:{width:900,keepAspectRatio:!0,colorAxis:{colors:[]},backgroundColor:"#fff",datalessRegionColor:"#fff"}}},computed:{chartColours(){return this.theme().get("primary.color")},chartData(){const e=[["Country",this.label]];return this.data&&this.data.forEach(t=>{const n=t.country.value||t.country,o=t.country.label||n,a=parseInt(t.value.value||t.value,10),r=t.value.label||a;e.push([{v:n,f:o},{v:a,f:r}])}),e}},mounted(){this.chartOptions.colorAxis.colors=this.chartColours,this.onResize(),window.addEventListener("resize",this.onResize)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{onResize(){this.chartOptions.width=this.$el.clientWidth,this.chartOptions.height=this.$el.clientWidth*.624}}};function B(e,t,n,o,a,r){const i=A("GChart");return O(),T(i,{class:"tml-geomap",type:"GeoChart",data:r.chartData,options:a.chartOptions,settings:{packages:["geochart"]},onResize:r.onResize},null,8,["data","options","onResize"])}const U=j(V,[["render",B]]);
1export{U as default};
2//# sourceMappingURL=TmlGeoChart.44664741.js.map

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.