2024-10-11 10:02:13 +00:00
import { m as ze , f as X , i as Ke , b as se , a3 as Le , k as te , a2 as Ue , g as ae , U as Xe , ar as Ye , e as He , c as Je , n as pe , l as We , w as ke , t as qe , ad as Ge , _ as Qe } from "./index.7ba276e1.js" ; /* empty css */ /* empty css */ /* empty css */ import { j as $ , c as N , d as ne , i as Ze , r as ce , a as et , aI as y , aV as Ne , n as tt , t as he , w as be , o as Me , b as at , p as nt , bI as rt , bS as ot , C as W , D as q , aH as z , G as Q , aK as ye , aJ as _e , F as lt , aM as G , aN as ee , b8 as it , bi as ut , bK as st , bO as ct , bm as vt , bn as dt } from "./arco.9755215d.js" ; import { f as ft } from "./vue.e23f7fca.js" ; import { e as mt , b as gt , g as pt } from "./serial.c6b76da8.js" ; import { T as ht , I as bt } from "./index.d79f8a5a.js" ; import { l as we , b as yt } from "./index.c80f0c52.js" ; import "./chart.e5f26fc3.js" ; / * *
2024-10-09 15:16:10 +00:00
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var _t={disabled:{type:Boolean,default:void 0},inputNumberProps:{type:[Boolean,Object],default:!1},label:{type:[String,Boolean,Function],default:!0},layout:{type:String,default:"horizontal",validator:function(e){return e?["vertical","horizontal"].includes(e):!0}},marks:{type:[Object,Array]},max:{type:Number,default:100},min:{type:Number,default:0},range:Boolean,showStep:Boolean,step:{type:Number,default:1},tooltipProps:{type:Object},value:{type:[Number,Array],default:void 0},modelValue:{type:[Number,Array],default:void 0},defaultValue:{type:[Number,Array],default:0},onChange:Function,onChangeEnd:Function};/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var ie=function(e,t){return t?{top:"calc(".concat(100-e,"% - 1px)")}:{left:"".concat(e,"%")}},Pe=function(e,t){return t==="first"?e instanceof Array?e[0]:e:e instanceof Array?e[1]:0},wt=function(e,t){if(Boolean(e)===!1)return String(t);if(ze(e)){var n=String(t);try{var O=/ \ $ { value } % /g,p=O.test(e);if(p)n=e.replace(O,String(t));else throw n=e,new Error}catch{console.warn("fail to parse label prop, please pass string such as '${value}%'")}return n}return e};/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /function Se(v,e){var t=Object.keys(v);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(v);e&&(n=n.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),t.push.apply(t,n)}return t}function H(v){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Se(Object(t),!0).forEach(function(n){X(v,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(t)):Se(Object(t)).forEach(function(n){Object.defineProperty(v,n,Object.getOwnPropertyDescriptor(t,n))})}return v}var Pt={visible:!1,trigger:"hover",showArrow:!0,overlayInnerStyle:void 0,overlayClassName:void 0,attach:"body",theme:"default"},St=function(e){var t=$(),n=N({get:function(){return!!e.value.tooltipProps},set:function(M){return M}}),O=$(H({},Pt)),p=function(M){!n.value||(O.value.visible=M)},P=Ke(),S=N(function(){var _=e.value,M=_.vertical,l=_.tooltipProps,r=_.label,s=_.value,a=_.position,i=_.range,c=M?"right":"top",d=function(){return r===!0?String(s):typeof r=="string"?wt(r,s):P("label",{params:i?{value:s,position:a}:{value:s}})}();return l instanceof Object?(l!=null&&l.placement||(O.value.placement=c),l.content&&(d=l.content),H(H(H({},O.value),l),{},{content:d})):H(H({},O.value),{},{placement:c,content:d})});return{tooltipRef:t,tooltipProps:S,toggleTooltip:p,showTooltip:n}};/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var Ee=Symbol("sliderProps");/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var ue=ne({name:"TSliderButton",props:{value:{type:[Number],default:0},vertical:{type:Boolean,default:!1},tooltipProps:{type:[Boolean,Object],default:!0},label:{type:[String,Boolean,Function]},range:{type:Boolean,default:!1},position:{type:String}},emits:["input","mouseup"],setup:function(e,t){var n=se("slider__button"),O=N(function(){return e}),p=St(O),P=p.tooltipRef,S=p.tooltipProps,_=p.toggleTooltip,M=p.showTooltip,l=Ze(Ee),r=$(),s=$(!1),a=ce({dragging:!1,isClick:!1,startX:0,startY:0,startPos:0,newPos:null}),i=N(function(){return Number(l.max)-Number(l.min)}),c=N(function(){return"".concat((e.value-l.min)/i . value * 100 , "%" ) } ) , d = N ( function ( ) { return l . step } ) , u = N ( function ( ) { return e . vertical ? { bottom : c . value } : { left : c . value } } ) ; et ( function ( ) { l . toggleDragging ( a . dragging ) } ) ; var b = function ( j ) { var w = j ; if ( ! ( w === null || Number . isNaN ( w ) ) ) { w > 100 ? w = 100 : w < 0 && ( w = 0 ) ; var T = 100 * d . value / i . value , K = Math . round ( w / T ) , I = K * T * i . value * . 01 ; I += l . min , I = Number ( parseFloat ( "" . concat ( I ) ) . toFixed ( l . precision ) ) , t . emit ( "input" , I ) , tt ( function ( ) { var A , F ; P . value && ( ( A = ( F = P . value ) . updatePopper ) === null || A === void 0 || A . call ( F ) ) } ) } } , C = function ( ) { r . value . focus ( ) , _ ( ! 0 ) } , f = function ( ) { a . dragging || _ ( ! 1 ) } , m = function ( j ) { a . dragging = ! 0 , a . isClick = ! 0 ; var w = j . type , T = j . clientY , K = j . clientX ; if ( w === "touchstart" ) { var I = j . touches , A = [ I [ 0 ] . clientY , I [ 0 ] . clientX ] ; T = A [ 0 ] , K = A [ 1 ] } e . vertical ? a . startY = T : a . startX = K , a . startPos = parseFloat ( c . value ) , a . newPos = a . startPos } , D = function ( j ) { var w = j ; if ( ! ! a . dragging ) { s . value = ! 0 , a . isClick = ! 1 , l != null && l . resetSize && Le ( l == null ? void 0 : l . resetSize ) && l . resetSize ( ) ; var T = 0 , K = l . sliderSize ; e . vertical ? T = a . startY - w . clientY : T = w . clientX - a . startX , T = T / K * 100 , a . newPos = a . startPos + T , b ( a . newPos ) } } , k = function ( ) { a . dragging && ( setTimeout ( function ( ) { a . dragging = ! 1 , _ ( ! 1 ) , a . isClick || b ( a . newPos ) , s . value && t . emit ( "mouseup" ) , s . value = ! 1 } , 0 ) , window . removeEventListener ( "mousemove" , D ) , window . removeEventListener ( "touchmove" , D ) , window . removeEventListener ( "mouseup" , k ) , window . removeEventListener ( "touchend" , k ) , window . removeEventListener ( "contextmenu" , k ) ) } ; function L ( E ) { l . disabled || ( E . preventDefault ( ) , m ( E ) , window . addEventListener ( "mousemove" , D ) , window . addEventListener ( "mouseup" , k ) , window . addEventListener ( "touchmove" , D ) , window . addEventListener ( "touchend" , k ) , window . addEventListener ( "contextmenu" , k ) ) } var U = function ( j ) { if ( ! l . disabled ) { var w = d . value / i . value * 100 ; j === "sub" && ( w = - w ) , a . newPos = parseFloat ( c . value ) + w , b ( a . newPos ) } } , re = function ( j ) { var w = j . code ; j . preventDefault ( ) , ( w === "ArrowDown" || w === "ArrowLeft" ) && U ( "sub" ) , ( w === "ArrowUp" || w === "ArrowRight" ) && U ( "add" ) } ; return t . expose ( { setPosition : b } ) , function ( ) { return y ( "div" , { ref : r , class : "" . concat ( n . value , "-wrapper" ) , style : u . value , tabindex : "0" , "show-tooltip" : M . value , disabled : l . disabled , onmouseenter : C , onmouseleave : f , onmousedown : L , onTouchstart : L , onfocus : C , onblur : f , onKeydown : re } , [ y ( ht , Ne ( { ref : P , hideEmptyPopup : ! 0 , disabled : ! M . value } , S . value ) , { default : function ( ) { return [ y ( "div" , { class : [ n . value , X ( { } , "" . concat ( n . value , "--dragging" ) , a . dragging ) ] } , null ) ] } } ) ] ) } } } ) ; / * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var xt=ne({name:"TSliderMark",props:{mark:{type:[Object,Array,String,Number]},point:{type:Number},onClickMarkPoint:{type:Function,default:function(){}}},setup:function(e){var t=se("slider__mark"),n=function(p){var P;p.stopPropagation(),e==null||(P=e.onClickMarkPoint)===null||P===void 0||P.call(e,e.point)};return function(){return y("div",{class:"".concat(t.value,"-text"),onClick:n},[e.mark])}}});/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /var Ot=function(e){var t=e.value.prefixName,n=N(function(){var p=e.value;if(!p.marks)return[];var P=[];if(te(p.marks)){var S=Ue(p.marks).sort(function(l,r){return l-r}),_=Math.max.apply(Math,ae(S).concat([p.max])),M=Math.min.apply(Math,ae(S).concat([p.min]));M<p.min&&we.errorOnce("TSlider","marks min value should >= props min"),_>p.max&&we.errorOnce("TSlider","marks max value should <= props max"),S.forEach(function(l){P.push({point:l,position:(l-M)/ ( _ - M ) * 100 , mark : l } ) } ) } else Object . keys ( p . marks ) . map ( parseFloat ) . sort ( function ( l , r ) { return l - r } ) . filter ( function ( l ) { return l <= p . max && l >= p . min } ) . forEach ( function ( l ) { var r = { point : l , position : ( l - p . min ) * 100 / ( p . max - p . min ) , mark : p . marks [ l ] } ; P . push ( r ) } ) ; return P } ) , O = function ( P ) { return n . value . length ? y ( "div" , null , [ y ( "div" , { class : "" . concat ( t , "__stops" ) } , [ n . value . map ( function ( S , _ ) { return S . position === 0 || S . position === 100 ? null : y ( "div" , { class : "" . concat ( t , "__stop " ) . concat ( t , "__mark-stop" ) , style : ie ( S . position , e . value . vertical ) , key : _ } , null ) } ) ] ) , y ( "div" , { class : "" . concat ( t , "__mark" ) } , [ n . value . map ( function ( S , _ ) { return y ( xt , { mark : S . mark , point : S . point , key : _ , style : ie ( S . position , e . value . vertical ) , onClickMarkPoint : P } , null ) } ) ] ) ] ) : null } ; return O } ; / * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* /function xe(v,e){var t=Object.keys(v);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(v);e&&(n=n.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),t.push.apply(t,n)}return t}function Oe(v){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xe(Object(t),!0).forEach(function(n){X(v,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach(function(n){Object.defineProperty(v,n,Object.getOwnPropertyDescriptor(t,n))})}return v}var Ct=function(e){var t=e.value.prefixName,n=N(function(){var P,S={format:void 0,placeholder:"",theme:"column",decimalPlaces:((P=e.value.step.toString().split(".")[1])===null||P===void 0?void 0:P.length)||0},_=e.value;if(!Xe(_.inputNumberProps)){var M,l=(M=_.inputNumberProps)===null||M===void 0?void 0:M.theme;S=Oe(Oe({},S),Ye(_.inputNumberProps,"onChange")),["column","row","normal"].includes(l)&&(S.theme=l)}return S}),O=N(function(){return["".concat(t,"__input"),{"is-vertical":e.value.vertical}]}),p=function(S,_){var M=function(r,s){var a,i;r!==void 0&&!isNaN(r)&&_(r),(a=e.value)===null||a===void 0||(a=a.inputNumberProps)===null||a===void 0||(i=a.onChange)===null||i===void 0||i.call(a,r,s)};return y(bt,Ne(n.value,{class:O.value,value:S,step:e.value.step,onChange:M,disabled:e.value.disabled,min:e.value.min,max:e.value.max}),null)};return p};/ * *
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* / f u n c t i o n C e ( v , e ) { v a r t = O b j e c t . k e y s ( v ) ; i f ( O b j e c t . g e t O w n P r o p e r t y S y m b o l s ) { v a r n = O b j e c t . g e t O w n P r o p e r t y S y m b o l s ( v ) ; e & & ( n = n . f i l t e r ( f u n c t i o n ( O ) { r e t u r n O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( v , O ) . e n u m e r a b l e } ) ) , t . p u s h . a p p l y ( t , n ) } r e t u r n t } f u n c t i o n k t ( v ) { f o r ( v a r e = 1 ; e < a r g u m e n t s . l e n g t h ; e + + ) { v a r t = a r g u m e n t s [ e ] ! = n u l l ? a r g u m e n t s [ e ] : { } ; e % 2 ? C e ( O b j e c t ( t ) , ! 0 ) . f o r E a c h ( f u n c t i o n ( n ) { X ( v , n , t [ n ] ) } ) : O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r s ? O b j e c t . d e f i n e P r o p e r t i e s ( v , O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r s ( t ) ) : C e ( O b j e c t ( t ) ) . f o r E a c h ( f u n c t i o n ( n ) { O b j e c t . d e f i n e P r o p e r t y ( v , n , O b j e c t . g e t O w n P r o p e r t y D e s c r i p t o r ( t , n ) ) } ) } r e t u r n v } v a r N t = n e ( { n a m e : " T S l i d e r " , m o d e l : { p r o p : " v a l u e " , e v e n t : " c h a n g e " } , p r o p s : k t ( { } , _ t ) , s e t u p : f u n c t i o n ( e ) { v a r t = H e ( ) , n = s e ( " s l i d e r " ) , O = J e ( ) , p = O . S T A T U S , P = h e ( e ) , S = P . v a l u e , _ = P . m o d e l V a l u e , M = y t ( S , _ , e . d e f a u l t V a l u e , e . o n C h a n g e ) , l = p e ( M , 2 ) , r = l [ 0 ] , s = l [ 1 ] , a = $ ( ) , i = $ ( ) , c = $ ( ) , d = $ ( ) , u = $ ( P e ( r . v a l u e , " f i r s t " ) ) , b = $ ( P e ( r . v a l u e , " s e c o n d " ) ) , C = $ ( ! 1 ) , f = $ ( 1 ) , m = N ( f u n c t i o n ( ) { r e t u r n e . l a y o u t = = = " v e r t i c a l " } ) , D = N ( f u n c t i o n ( ) { r e t u r n [ " " . c o n c a t ( n . v a l u e , " _ _ c o n t a i n e r " ) , { " i s - v e r t i c a l " : m . v a l u e } ] } ) , k = N ( f u n c t i o n ( ) { r e t u r n [ " " . c o n c a t ( n . v a l u e ) , X ( X ( X ( { " i s - v e r t i c a l " : m . v a l u e } , " " . c o n c a t ( n . v a l u e , " - - w i t h - i n p u t " ) , e . i n p u t N u m b e r P r o p s ) , " " . c o n c a t ( n . v a l u e , " - - v e r t i c a l " ) , m . v a l u e ) , p . v a l u e . d i s a b l e d , t . v a l u e ) ] } ) , L = N ( f u n c t i o n ( ) { r e t u r n [ " " . c o n c a t ( n . v a l u e , " _ _ r a i l " ) , { " s h o w - i n p u t " : e . i n p u t N u m b e r P r o p s , d i s a b l e d : t . v a l u e } ] } ) , U = N ( f u n c t i o n ( ) { r e t u r n m . v a l u e ? { h e i g h t : " 1 0 0 % " } : { } } ) , r e = N ( f u n c t i o n ( ) { v a r h = e . r a n g e ? " " . c o n c a t ( 1 0 0 * ( j . v a l u e - e . m i n ) / E . v a l u e , " % " ) : " 0 % " , o = e . r a n g e ? w . v a l u e - j . v a l u e : u . v a l u e - e . m i n , g = " " . c o n c a t ( 1 0 0 * o / E . v a l u e , " % " ) ; r e t u r n m . v a l u e ? { h e i g h t : g , b o t t o m : h } : { w i d t h : g , l e f t : h } } ) , E = N ( f u n c t i o n ( ) { r e t u r n e . m a x - e . m i n } ) , j = N ( f u n c t i o n ( ) { r e t u r n M a t h . m i n ( u . v a l u e , b . v a l u e ) } ) , w = N ( f u n c t i o n ( ) { r e t u r n M a t h . m a x ( u . v a l u e , b . v a l u e ) } ) , T = N ( f u n c t i o n ( ) { i f ( ! e . s h o w S t e p | | e . m i n > e . m a x ) r e t u r n [ ] ; i f ( e . s t e p = = = 0 ) r e t u r n c o n s o l e . w a r n ( " [ E l e m e n t W a r n ] [ S l i d e r ] s t e p s h o u l d n o t b e 0 . " ) , [ ] ; f o r ( v a r h = E . v a l u e / e . s t e p , o = 1 0 0 * e . s t e p / E . v a l u e , g = [ ] , x = 1 ; x < h ; x + + ) g . p u s h ( x * o ) ; i f ( e . r a n g e ) { v a r V = g . f i l t e r ( f u n c t i o n ( R ) { r e t u r n R < 1 0 0 * ( j . v a l u e - e . m i n ) / E . v a l u e | | e . s t e p > 1 0 0 * ( w . v a l u e - e . m a x ) / E . v a l u e } ) ; r e t u r n V } r e t u r n g . f i l t e r ( f u n c t i o n ( R ) { r e t u r n R > 1 0 0 * ( u . v a l u e - e . m i n ) / E . v a l u e } ) } ) , K = N ( f u n c t i o n ( ) { v a r h = [ e . m i n , e . m a x , e . s t e p ] . m a p ( f u n c t i o n ( o ) { v a r g = " " . c o n c a t ( o ) . s p l i t ( " . " ) ; r e t u r n g [ 1 ] ? g [ 1 ] . l e n g t h : 0 } ) ; r e t u r n M a t h . m a x . a p p l y ( n u l l , h ) } ) , I = f u n c t i o n ( o ) { v a r g = [ e . m i n , e . m a x ] , x = g [ 0 ] , V = g [ 1 ] ; i f ( x > V ) { c o n s o l e . w a r n ( " [ S l i d e r ] m a x s h o u l d b e g r e a t e r t h a n m i n . " ) ; r e t u r n } i f ( e . r a n g e & & t e ( o ) ) { v a r R = [ M a t h . m i n . a p p l y ( M a t h , a e ( o ) ) , M a t h . m a x . a p p l y ( M a t h , a e ( o ) ) ] , B = R [ 0 ] , Y = R [ 1 ] ; B > V & & ( B = u . v a l u e ) , B < x & & ( B = x ) , Y < x & & ( Y = b . v a l u e ) , Y > V & & ( Y = V ) ; v a r g e = [ B , Y ] ; r e t u r n u . v a l u e = g e [ 0 ] , b . v a l u e = g e [ 1 ] , [ B , Y ] } v a r J = o ; r e t u r n J < x & & ( J = x ) , J > V & & ( J = V ) , J } , A = f u n c t i o n ( o ) { v a r g = o ; g = = = v o i d 0 & & ( e . r a n g e ? g = [ u . v a l u e , b . v a l u e ] : g = u . v a l u e ) ; v a r x = I ( g ) ; s ( x ) } , F = f u n c t i o n ( ) { i . v a l u e & & ( f . v a l u e = i . v a l u e [ " c l i e n t " . c o n c a t ( m . v a l u e ? " H e i g h t " : " W i d t h " ) ] ) } , d e = $ ( ! 1 ) , f e = f u n c t i o n ( ) { v a r o ; e . r a n g e ? ( t e ( r . v a l u e ) ? ( u . v a l u e = M a t h . m a x ( e . m i n | | 0 , r . v a l u e [ 0 ] ) , b . v a l u e = M a t h . m i n ( e . m a x | | 1 0 0 , r . v a l u e [ 1 ] ) ) : ( u . v a l u e = e . m i n | | 0 , b . v a l u e = e . m a x | | 1 0 0 ) , o = " " . c o n c a t ( u . v a l u e , " - " ) . c o n c a t ( b . v a l u e ) ) : ( W e ( r . v a l u e ) ? u . v a l u e = M a t h . m i n ( e . m a x , M a t h . m a x ( e . m i n , r . v a l u e ) ) : u . v a l u e = e . m i n , o = S t r i n g ( u . v a l u e ) ) , a . v a l u e & & a . v a l u e . s e t A t t r i b u t e ( " a r i a - v a l u e t e x t " , o ) , F ( ) , w i n d o w . a d d E v e n t L i s t e n e r ( " r e s i z e " , F ) } , o e = f u n c t i o n ( o ) { v a r g = o * E . v a l u e / 1 0 0 ; i f ( g = e . m i n + g , ! e . r a n g e & & c . v a l u e ) { c . v a l u e . s e t P o s i t i o n ( o ) ; r e t u r n } v a r x ; M a t h . a b s ( j . v a l u e - g ) < M a t h . a b s ( w . v a l u e - g ) ? x = u . v a l u e < b . v a l u e ? " b u t t o n 1 " : " b u t t o n 2 " : x = u . v a l u e > b . v a l u e ? " b u t t o n 1 " : " b u t t o n 2 " , x = = = " b u t t o n 1 " & & c . v a l u e & & c . v a l u e . s e t P o s i t i o n ( o ) , x = = = " b u t t o n 2 " & & d . v a l u e & & d . v a l u e . s e t P o s i t i o n ( o ) } , Z = f u n c t i o n ( ) { v a r o = e . r a n g e ? [ u . v a l u e , b . v a l u e ] : u . v a l u e ; r e t u r n I ( o ) } , j e = f u n c t i o n ( o ) { v a r g ; i f ( ! ( t . v a l u e | | C . v a l u e ) & & ! ! i . v a l u e ) { F ( ) ; v a r x = 0 ; i f ( m . v a l u e ) { v a r V = i . v a l u e . g e t B o u n d i n g C l i e n t R e c t ( ) . b o t t o m ; x = ( V - o . c l i e n t Y ) / f . v a l u e * 1 0 0 , o e ( x ) } e l s e { v a r R = i . v a l u e . g e t B o u n d i n g C l i e n t R e c t ( ) . l e f t ; x = ( o . c l i e n t X - R ) / f . v a l u e * 1 0 0 , o e ( x ) } v a r B = Z ( ) ; ( g = e . o n C h a n g e E n d ) = = = n u l l | | g = = = v o i d 0 | | g . c a l l ( e , B ) } } , D e = f u n c t i o n ( o ) { v a r g ; i f ( ! ( t . v a l u e | | C . v a l u e ) ) { F ( ) ; v a r x = N u m b e r ( o / E . v a l u e * 1 0 0 ) ; o e ( x ) , A ( o ) ; v a r V = Z ( ) ; ( g = e . o n C h a n g e E n d ) = = = n u l l | | g = = = v o i d 0 | | g . c a l l ( e , V ) } } ; b e ( f u n c t i o n ( ) { r e t u r n r . v a l u e } , f u n c t i o n ( h ) { i f ( C . v a l u e ! = = ! 0 ) i f
* tdesign v1 . 9.9
* ( c ) 2024 tdesign
* @ license MIT
* / v a r M t = k e ( N t ) ; k e ( u e ) ; c o n s t v e = v = > ( v t ( " d a t a - v - d c 4 7 d 6 d c " ) , v = v ( ) , d t ( ) , v ) , E t = { c l a s s : " c o n t a i n e r " } , j t = v e ( ( ) = > Q ( " d i v " , { i d : " c a n v a s D i v " , s t y l e : { z o o m : " 2 5 0 % " , d i s p l a y : " n o n e " } } , n u l l , - 1 ) ) , D t = { s t y l e : { p a d d i n g : " 0 " , m a r g i n : " 0 " , " b o r d e r - s p a c i n g " : " 0 " } } , I t = [ " o n M o u s e d o w n " , " o n M o u s e o v e r " ] , V t = v e ( ( ) = > Q ( " b r " , n u l l , n u l l , - 1 ) ) , T t = v e ( ( ) = > Q ( " b r " , n u l l , n u l l , - 1 ) ) , $ t = { n a m e : " B a c k u p " } , B t = n e ( { . . . $ t , s e t u p ( v ) { c o n s t e = q e ( ) , t = c e ( { b i n a r y F i l e : v o i d 0 , l o a d i n g : ! 1 , m a t r i x : [ ] , m o u s e d o w n : ! 1 , t h r e s h o l d : 1 2 8 , c a c h e : v o i d 0 } ) , n = f t ( ) ; M e ( a s y n c ( ) = > { i f ( n . q u e r y . u r l ) { c o n s t r = a w a i t f e t c h ( n . q u e r y . u r l , { r e s p o n s e T y p e : " b l o b " } ) ; P ( w i n d o w . U R L . c r e a t e O b j e c t U R L ( a w a i t r . b l o b ( ) ) ) } } ) ; c o n s t O = ( ) = > { c o n s t r = t . m a t r i x ; r . m a p ( ( s , a ) = > { s . m a p ( ( i , c ) = > { r [ a ] [ c ] = i = = " # f f f " ? " # 0 0 0 " : " # f f f " } ) } ) , t . m a t r i x = r } , p = ( r , s ) = > { i f ( t . m o u s e d o w n ) { c o n s t a = t . m a t r i x ; a [ s ] [ r ] = t . m a t r i x [ s ] [ r ] = = " # f f f " ? " # 0 0 0 " : " # f f f " , t . m a t r i x = a } } , P = r = > { c o n s t s = d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) ; s . w i d t h = 1 2 8 , s . h e i g h t = 6 4 ; c o n s t a = s . c l o n e N o d e ( ) , i = d o c u m e n t . g e t E l e m e n t B y I d ( " c a n v a s D i v " ) ; i . i n n e r H T M L = " " , i = = n u l l | | i . a p p e n d ( s , a ) ; c o n s t c = n e w I m a g e ; c . s r c = r , c . o n l o a d = ( ) = > { c o n s t d = s . g e t C o n t e x t ( " 2 d " ) ; d = = n u l l | | d . d r a w I m a g e ( c , 0 , 0 , 1 2 8 , 6 4 ) ; c o n s t u = d = = n u l l ? v o i d 0 : d . g e t I m a g e D a t a ( 0 , 0 , s . w i d t h , s . h e i g h t ) . d a t a ; t . c a c h e = u ; f u n c t i o n b ( f , m ) { c o n s t k = ( m * 1 2 8 + f ) * 4 ; r e t u r n u [ k ] + u [ k + 1 ] + u [ k + 2 ] > t . t h r e s h o l d * 3 ? 0 : 1 } c o n s t C = [ ] ; f o r ( l e t f = 0 ; f < 6 4 ; f + + ) { C . p u s h ( [ ] ) , C [ f ] = [ ] ; f o r ( l e t m = 0 ; m < 1 2 8 ; m + + ) { c o n s t D = ! b ( m , f ) ; C [ f ] [ m ] = D ? " # f f f " : " # 0 0 0 " } } t . m a t r i x = C } } , S = ( ) = > { c o n s t r = d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; r . t y p e = " f i l e " , r . o n c h a n g e = a s y n c ( ) = > { c o n s t s = n e w B l o b ( [ r . f i l e s [ 0 ] ] , { t y p e : " a p p l i c a t i o n / o c t e t - s t r e a m " } ) , a = U R L . c r e a t e O b j e c t U R L ( s ) , i = d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) ; i . w i d t h = 1 2 8 , i . h e i g h t = 6 4 ; c o n s t c = n e w I m a g e ; c . s r c = a , c . o n l o a d = ( ) = > { c o n s t d = i . g e t C o n t e x t ( " 2 d " ) ; d = = n u l l | | d . d r a w I m a g e ( c , 0 , 0 , 1 2 8 , 6 4 ) ; c o n s t u = d = = n u l l ? v o i d 0 : d . g e t I m a g e D a t a ( 0 , 0 , i . w i d t h , i . h e i g h t ) . d a t a ; t . c a c h e = u ; f u n c t i o n b ( f , m ) { c o n s t k = ( m * 1 2 8 + f ) * 4 ; r e t u r n u [ k ] + u [ k + 1 ] + u [ k + 2 ] > t . t h r e s h o l d * 3 ? 0 : 1 } c o n s t C = [ ] ; f o r ( l e t f = 0 ; f < 6 4 ; f + + ) { C . p u s h ( [ ] ) , C [ f ] = [ ] ; f o r ( l e t m = 0 ; m < 1 2 8 ; m + + ) { c o n s t D = ! b ( m , f ) ; C [ f ] [ m ] = D ? " # f f f " : " # 0 0 0 " } } t . m a t r i x = C } } , r . c l i c k ( ) } , _ = a s y n c ( ) = > { c o n s t r = t . m a t r i x , s = d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) ; s . w i d t h = 1 2 8 , s . h e i g h t = 6 4 ; c o n s t a = s . g e t C o n t e x t ( " 2 d " ) ; a & & ( a . f i l l S t y l e = " # f f f " , a . f i l l R e c t ( 0 , 0 , s . w i d t h , s . h e i g h t ) , a . f i l l S t y l e = " # 0 0 0 " ) ; f o r ( l e t c = 0 ; c < 6 4 ; c + + ) f o r ( l e t d = 0 ; d < 1 2 8 ; d + + ) r [ c ] [ d ] = = " # 0 0 0 " & & ( a = = n u l l | | a . b e g i n P a t h ( ) , a = = n u l l | | a . r e c t ( d , c , 1 , 1 ) , a = = n u l l | | a . f i l l ( ) ) ; c o n s t i = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; i . h r e f = s . t o D a t a U R L ( " i m a g e / j p e g " , 1 ) , i . d o w n l o a d = " i m a g e . j p g " , i . c l i c k ( ) } , M = a s y n c ( ) = > { v a r c , d , u , b , C ; c o n s t r = n e w U i n t 8 A r r a y ( 1 0 2 4 ) ; l e t s = 0 ; f o r ( l e t f = 0 ; f < 6 4 ; f + = 8 ) f o r ( l e t m = 0 ; m < 1 2 8 ; m + + ) { l e t D = 0 ; f o r ( l e t k = 0 ; k < 8 ; k + + ) D | = ( t . m a t r i x [ f + k ] [ m ] = = " # 0 0 0 " ? 1 : 0 ) < < k ; r [ s + + ] = D } i f ( t . b i n a r y F i l e = r , e . c o n n e c t S t a t e ! = ! 0 ) { a l e r t ( s e s s i o n S t o r a g e . g e t I t e m ( " n o t i c e C o n n e c t K 5 " ) ) ; r e t u r n } i f ( ( ( c = e . c o n f i g u r a t i o n ) = = n u l l ? v o i d 0 : c . u a r t ) = = " o f f i c i a l " ) { a l e r t ( s e s s i o n S t o r a g e . g e t I t e m ( " n o t i c e V e r s i o n N o S u p p o r t " ) ) ; r e t u r n } i f ( ( ( d = e . c o n f i g u r a t i o n ) = = n u l l ? v o i d 0 : d . c h a r s e t ) ! = " l o s e h u " & & ( ( u = e . c o n f i g u r a t i o n ) = = n u l l ? v o i d 0 : u . c h a r s e t ) ! = " g b 2 3 1 2 " ) { a l e r t ( s e s s i o n S t o r a g e . g e t I t e m ( " n o t i c e V e r s i o n N o S u p p o r t " ) ) ; r e t u r n } t . l o a d i n g = ! 0 ; l e t a = 1 2 3 7 2 8 ; ( ( b = e . c o n f i g u r a t i o n ) = = n u l l ? v o i d 0 : b . c h a r s e t ) = = " g b 2 3 1 2 " & & ( a = 8 3 2 0 ) , a w a i t m t ( e . c o n n e c t P o r t ) ; c o n s t i = t . b i n a r y F i l e ; f o r ( l e t f = a ; f < i . l e n g t h + a ; f + = 1 2 8 ) a w a i t g t ( e . c o n n e c t P o r t , f , i . s l i c e ( f - a , f - a + 1 2 8 ) , i . s l i c e ( f - a , f - a + 1 2 8 ) . l e n g t h , ( C = e . c o n f i g u r a t i o n ) = = n u l l ? v o i d 0 : C . u a r t ) ; a w a i t p t ( e . c o n n e c t P o r t ) , t . l o a d i n g = ! 1 } , l = ( ) = > { c o n s t r = t . c a c h e ; f u n c t i o n s ( i , c ) { c o n s t u = ( c * 1 2 8 + i ) * 4 ; r e t u r n r [ u ] + r [ u + 1 ] + r [ u + 2 ] > t . t h r e s h o l d * 3 ? 0 : 1 } c o n s t a = [ ] ; f o r ( l e t i = 0 ; i < 6 4 ; i + + ) { a . p u s h ( [ ] ) , a [ i ] = [ ] ; f o r ( l e t c = 0 ; c < 1 2 8 ; c + + ) { c o n s t d = ! s ( c , i ) ; a [ i ] [ c ] = d ? " # f f f " : " # 0 0 0 " } } t . m a t r i x = a } ; r e t u r n ( r , s ) = > { c o n s t a = G e , i = M t , c = i t , d = u t , u = r t , b = o t , C = s t , f = c t ; r e t u r n W ( ) , q ( " d i v " , E t , [ y ( a , { i t e m s : [ r . $ t ( " m e n u . l i s t " ) , r . $ t ( " m e n u . i m a g e " ) ] } , n u l l , 8 , [ " i t e m s " ] ) , y ( f , { g u t t e r : 2 0 , a l i g n : " s t r e t c h " } , { d e f a u l t : z ( ( ) = > [ y ( C , { s p a n : 2 4 } , { d e f a u l t : z ( ( ) = > [ y ( b , { l o a d i n g : t . l o a d i n g , t i p : " \ u 5 1 9 9 \ u 5 1 6 5 \ u 4 E 2 D . . . " , s t y l e : { w i d t h : " 1 0 0 % " } } , { d e f a u l t : z ( ( ) = > [ y ( u , { c l a s s : " g e n e r a l - c a r d " , t i t l e : r . $ t ( " m e n u . i m a g e " ) + r . $ t ( " g l o b a l . o n S t a r t " ) } , { d e f a u l t : z ( ( ) = > [ j t , Q ( " d i v " , n u l l , [ Q ( " t a b l e " , D t , [ ( W ( ! 0 ) , q ( y e , n u l l , _ e ( t . m a t r i x , ( m , D ) = > ( W ( ) , q ( " t r " , n u l l , [ ( W ( ! 0 ) , q ( y e , n u l l , _ e ( m , ( k , L ) = > ( W ( ) , q ( " t d " , { o n M o u