PageSourceSearch

https://app.vizcab.io/assets/ChartVolumetrie-DhblbNt6.js

js vizcab.io collected 2026-10-03 20:00:15 UTC 5,388 bytes, 1 lines download raw bytes

1import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{It as n,q as r,t as i,w as a,x as o}from"./vue.runtime.esm-bundler-CFudVDr2.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as c}from"./lodash-B9Vws8nc.js";import{c as l,l as u,s as d}from"./d3-B5i2VnzJ.js";import{t as f}from"./select-GFC5acv7.js";import{n as p,r as m,t as h}from"./array-C25vyv2r.js";import"./enumsExploV2-CuW3dGTY.js";function g(e){return typeof e==`string`?new d([document.querySelectorAll(e)],[document.documentElement]):new d([e==null?[]:u(e)],l)}function _(e){this._context=e}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function v(e){return new _(e)}function y(e){return e[0]}function b(e){return e[1]}function x(e,t){var n=p(!0),r=null,i=v,a=null;e=typeof e==`function`?e:e===void 0?y:p(e),t=typeof t==`function`?t:t===void 0?b:p(t);function o(o){var s,c=(o=h(o)).length,l,u=!1,d;for(r??(a=i(d=m())),s=0;s<=c;++s)!(s<c&&n(l=o[s],s,o))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+e(l,s,o),+t(l,s,o));if(d)return a=null,d+``||null}return o.x=function(t){return arguments.length?(e=typeof t==`function`?t:p(+t),o):e},o.y=function(e){return arguments.length?(t=typeof e==`function`?e:p(+e),o):t},o.defined=function(e){return arguments.length?(n=typeof e==`function`?e:p(!!e),o):n},o.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),o):i},o.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),o):r},o}var S=e(c(),1),C={name:`ChartVolumetrie`,props:{volumetrie:{type:Array},width:{type:Number},height:{type:Number},isVolumetrieO:{type:Boolean,default:!1},parentKey:{type:[Number,String],default:``}},data:function(){return{margin:10,coords:null,coords2:[]}},computed:{containerStyle(){let e=`height: ${this.height}px;`;return e+=`width: ${this.width}px;`,e},boussoleStyle(){return{transform:`rotate(${this.orientation}deg)`}},canvas_size(){return this.width-40},graph_size(){return this.canvas_size-2*this.margin}},mounted:function(){this.coords=this.get_coords(this.volumetrie),this.drawShape()},methods:{get_coords(e){let t=[],n=e[0].size-e[2].size+e[4].size,r=e[6].size-e[4].size+e[2].size,i=e[1].size+e[3].size+e[5].size,a=Math.max(n,r,i,e[0].size,e[6].size),o=[n,r,i,e[0].size,e[6].size].indexOf(a),s=(this.canvas_size-this.graph_size*i/a)/2,c;if(o==0||o==3)c=this.canvas_size-this.margin;else if(o==1||o==4)c=this.canvas_size-this.margin-this.graph_size*(e[8].size-e[10].size)/a;else if(o==2){let t=Math.max(n,r,e[0].size,e[6].size),i=[n,r,e[0].size,e[6].size].indexOf(t);i==0||i==2?c=this.canvas_size-this.margin-this.graph_size*(1-t/a)/2:(i==1||i==3)&&(c=this.canvas_size-this.margin-this.graph_size*(1-t/a)/2,c-=this.graph_size*(e[8].size-e[10].size)/a)}if(c!==void 0){s=Number(s.toFixed(0)),c=Number(c.toFixed(0)),this.isVolumetrieO||t.push([s,c]),e.map(e=>{e.direction===`up`&&(c-=Number((e.size*this.graph_size/a).toFixed(0))),e.direction===`down`&&(c+=Number((e.size*this.graph_size/a).toFixed(0))),e.direction===`right`&&(s+=Number((e.size*this.graph_size/a).toFixed(0))),e.direction===`left`&&(s-=Number((e.size*this.graph_size/a).toFixed(0))),t.push([s,c])});let n=(0,S.uniqWith)(t,S.isEqual);return n.push(t[0]),n}return[0,0]},drawShape(){f(`#chart-svg-${this.parentKey}`).selectAll(`svg`).remove();let e=[this.coords];if(this.isVolumetrieO){let t=this.coords[0][0]*7,n=this.coords[0][1]*3+this.coords[0][0],r=this.coords[0][1]*2+this.coords[0][0],i=this.coords[0][1]*4+this.coords[0][0];this.coords2=[[t,r],[n,r],[n,i],[t,i],[t,r]],e.push(this.coords2)}let t=x().x(function(e){return e[0]}).y(function(e){return e[1]});f(`#chart-svg-${this.parentKey}`).append(`svg`).style(`padding`,`20px`).style(`overflow`,`visible`).selectAll(`.line`).data(e).enter().append(`path`).attr(`d`,t).attr(`fill`,`none`).attr(`stroke`,`black`),g(`text-${this.parentKey}`).remove();let n=this.coords;this.isVolumetrieO&&(n=n.concat(this.coords2));let r=0;for(let e=0;e<n.length-1;e++){let t,i,a;n[e][0]===n[e+1][0]?(t=n[e][0],a=t>130?`translate(10px, 0px)`:`translate(-10px, 0px)`):t=(n[e][0]+n[e+1][0])/2,n[e][1]===n[e+1][1]?(i=n[e][1],a=i>
1130?`translate(0, 15px)`:`translate(0, -3px)`):i=(n[e][1]+n[e+1][1])/2;let o;e===6&&!this.isVolumetrieO&&(o=(this.coords[e-1][1]+this.coords[e][1])/2==211.59999999999997),this.isVolumetrieO&&e===4?o=!0:r++,o||f(`#chart-svg-${this.parentKey}`).select(`svg`).append(`text`).attr(`class`,`text-${this.parentKey}`).style(`overflow`,`visible`).text(r).attr(`x`,t).attr(`y`,i).attr(`fill`,`black`).attr(`class`,`typography-indice`).style(`transform`,a).attr(`text-anchor`,`middle`)}},redrawShape(e){this.coords=this.get_coords(e),this.drawShape()}}};i();var w=t({default:()=>D}),T=[`id`,`height`,`width`];function E(e,t,i,s,c,l){return r(),a(`div`,{class:`container`,style:n(l.containerStyle)},[(r(),a(`svg`,{id:`chart-svg-${i.parentKey}`,height:l.canvas_size,width:l.canvas_size},[...t[0]||=[o(`path`,null,null,-1)]],8,T))],4)}var D=s(C,[[`render`,E],[`__scopeId`,`data-v-480fd7c0`]]);export{w as n,g as r,D as t};

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.