@mlightcad/cad-simple-viewer-cli 1.8.0-preview.3 → 1.8.0-preview.4
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.
- package/LICENSE +21 -21
- package/README.md +182 -182
- package/dist-runner/assets/cad-html-plugin-ndOcDphI.js +1565 -0
- package/dist-runner/assets/cad-pdf-plugin-COsuQTug.js +1043 -0
- package/dist-runner/assets/cad-simple-viewer-AcApSimpleUiChrome-D_0b6okm-DBsZjt_l.js +1 -0
- package/dist-runner/assets/{cad-svg-plugin-D-Z-nIZi.js → cad-svg-plugin-BWbiwrld.js} +2 -2
- package/dist-runner/assets/index-DIn0aEGh.js +9530 -0
- package/dist-runner/index.html +12 -12
- package/dist-runner/viewer-runtime.iife.js +258 -258
- package/dist-runner/workers/libredwg-parser-worker.js +20 -20
- package/dist-runner/workers/libredwg-web.wasm +0 -0
- package/dist-runner/workers/mtext-renderer-worker.js +4 -5
- package/examples/batch-export-html-multi-preview.mjs +306 -306
- package/examples/batch-export-html.mjs +105 -105
- package/examples/batch-export-pdf.mjs +114 -114
- package/examples/batch-export-png.mjs +103 -103
- package/examples/create-drawing-dxf.scr +15 -15
- package/examples/create-drawing-png.scr +19 -19
- package/examples/create-shapes-dxf.scr +17 -17
- package/examples/export-dxf.scr +5 -5
- package/examples/export-html-multi-preview.scr +23 -21
- package/examples/export-html-multi.scr +18 -16
- package/examples/export-html.scr +15 -13
- package/examples/export-pdf-monochrome.scr +14 -13
- package/examples/export-pdf.scr +16 -14
- package/examples/export-png.scr +9 -9
- package/examples/freeze-layer-png.scr +15 -15
- package/examples/index.json +141 -141
- package/examples/open-quit.scr +2 -2
- package/package.json +10 -10
- package/dist-runner/assets/cad-html-plugin-B7q3l8cW.js +0 -1565
- package/dist-runner/assets/cad-pdf-plugin-CN3SFYWU.js +0 -209
- package/dist-runner/assets/index-C50ZUySK.js +0 -7820
|
@@ -0,0 +1,1565 @@
|
|
|
1
|
+
import{a2 as Na,a3 as _a,a4 as qr,a5 as Kt,a6 as Qr,a7 as tn,a8 as Ve,a9 as en,aa as Xe,ab as an,ac as ut,E as rn,ad as nn,ae as Da,af as on,ag as sn,ah as ln,ai as Ta,aj as cn,ak as dn,al as un,am as Ye,an as mn,ao as pn,ap as fn,aq as hn,ar as gn,as as bn,at as me,au as wn,av as xn,aw as yn,ax as vn,ay as kn,az as An,aA as Mn,aB as Bn,aC as Sn,aD as Cn,aE as In,aF as En,aG as Ln,aH as Fn,aI as zn,aJ as Pn,aK as Hn,aL as Un,aM as Nn,aN as _n,aO as X,aP as Dn,aQ as lt,aR as Ra,aS as Tn,aT as pe,M as Rn,aU as On,aV as jn,aW as $n,aX as Vn,_ as Xn,o as Yn,aY as pt,d as x,c as K,aZ as C,a_ as Wn,a$ as Gn,t as $,b0 as Kn,V as We,b1 as Jn}from"./index-DIn0aEGh.js";import{b2 as _l,b3 as Dl}from"./index-DIn0aEGh.js";var P=Uint8Array,N=Uint16Array,fe=Int32Array,he=new P([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ge=new P([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ge=new P([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Oa=function(t,e){for(var a=new N(31),r=0;r<31;++r)a[r]=e+=1<<t[r-1];for(var n=new fe(a[30]),r=1;r<30;++r)for(var i=a[r];i<a[r+1];++i)n[i]=i-a[r]<<5|r;return{b:a,r:n}},ja=Oa(he,2),Zn=ja.b,te=ja.r;Zn[28]=258,te[258]=28;var qn=Oa(ge,0),Ke=qn.r,ee=new N(32768);for(var B=0;B<32768;++B){var Z=(B&43690)>>1|(B&21845)<<1;Z=(Z&52428)>>2|(Z&13107)<<2,Z=(Z&61680)>>4|(Z&3855)<<4,ee[B]=((Z&65280)>>8|(Z&255)<<8)>>1}var wt=(function(t,e,a){for(var r=t.length,n=0,i=new N(e);n<r;++n)t[n]&&++i[t[n]-1];var o=new N(e);for(n=1;n<e;++n)o[n]=o[n-1]+i[n-1]<<1;var s;if(a){s=new N(1<<e);var l=15-e;for(n=0;n<r;++n)if(t[n])for(var c=n<<4|t[n],d=e-t[n],u=o[t[n]-1]++<<d,p=u|(1<<d)-1;u<=p;++u)s[ee[u]>>l]=c}else for(s=new N(r),n=0;n<r;++n)t[n]&&(s[n]=ee[o[t[n]-1]++]>>15-t[n]);return s}),et=new P(288);for(var B=0;B<144;++B)et[B]=8;for(var B=144;B<256;++B)et[B]=9;for(var B=256;B<280;++B)et[B]=7;for(var B=280;B<288;++B)et[B]=8;var Et=new P(32);for(var B=0;B<32;++B)Et[B]=5;var Qn=wt(et,9,0),ti=wt(Et,5,0),$a=function(t){return(t+7)/8|0},Va=function(t,e,a){return(a==null||a>t.length)&&(a=t.length),new P(t.subarray(e,a))},ei=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Dt=function(t,e,a){var r=new Error(e||ei[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,Dt),!a)throw r;return r},W=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8},ft=function(t,e,a){a<<=e&7;var r=e/8|0;t[r]|=a,t[r+1]|=a>>8,t[r+2]|=a>>16},Jt=function(t,e){for(var a=[],r=0;r<t.length;++r)t[r]&&a.push({s:r,f:t[r]});var n=a.length,i=a.slice();if(!n)return{t:Ya,l:0};if(n==1){var o=new P(a[0].s+1);return o[a[0].s]=1,{t:o,l:1}}a.sort(function(M,I){return M.f-I.f}),a.push({s:-1,f:25001});var s=a[0],l=a[1],c=0,d=1,u=2;for(a[0]={s:-1,f:s.f+l.f,l:s,r:l};d!=n-1;)s=a[a[c].f<a[u].f?c++:u++],l=a[c!=d&&a[c].f<a[u].f?c++:u++],a[d++]={s:-1,f:s.f+l.f,l:s,r:l};for(var p=i[0].s,r=1;r<n;++r)i[r].s>p&&(p=i[r].s);var m=new N(p+1),f=ae(a[d-1],m,0);if(f>e){var r=0,h=0,g=f-e,w=1<<g;for(i.sort(function(I,S){return m[S.s]-m[I.s]||I.f-S.f});r<n;++r){var b=i[r].s;if(m[b]>e)h+=w-(1<<f-m[b]),m[b]=e;else break}for(h>>=g;h>0;){var A=i[r].s;m[A]<e?h-=1<<e-m[A]++-1:++r}for(;r>=0&&h;--r){var k=i[r].s;m[k]==e&&(--m[k],++h)}f=e}return{t:new P(m),l:f}},ae=function(t,e,a){return t.s==-1?Math.max(ae(t.l,e,a+1),ae(t.r,e,a+1)):e[t.s]=a},Je=function(t){for(var e=t.length;e&&!t[--e];);for(var a=new N(++e),r=0,n=t[0],i=1,o=function(l){a[r++]=l},s=1;s<=e;++s)if(t[s]==n&&s!=e)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=t[s]}return{c:a.subarray(0,r),n:e}},ht=function(t,e){for(var a=0,r=0;r<e.length;++r)a+=t[r]*e[r];return a},Xa=function(t,e,a){var r=a.length,n=$a(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var i=0;i<r;++i)t[n+i+4]=a[i];return(n+4+r)*8},Ze=function(t,e,a,r,n,i,o,s,l,c,d){W(e,d++,a),++n[256];for(var u=Jt(n,15),p=u.t,m=u.l,f=Jt(i,15),h=f.t,g=f.l,w=Je(p),b=w.c,A=w.n,k=Je(h),M=k.c,I=k.n,S=new N(19),y=0;y<b.length;++y)++S[b[y]&31];for(var y=0;y<M.length;++y)++S[M[y]&31];for(var v=Jt(S,7),H=v.t,rt=v.l,U=19;U>4&&!H[Ge[U-1]];--U);var nt=c+5<<3,_=ht(n,et)+ht(i,Et)+o,D=ht(n,p)+ht(i,h)+o+14+3*U+ht(S,H)+2*S[16]+3*S[17]+7*S[18];if(l>=0&&nt<=_&&nt<=D)return Xa(e,d,t.subarray(l,l+c));var R,F,T,J;if(W(e,d,1+(D<_)),d+=2,D<_){R=wt(p,m,0),F=p,T=wt(h,g,0),J=h;var Xt=wt(H,rt,0);W(e,d,A-257),W(e,d+5,I-1),W(e,d+10,U-4),d+=14;for(var y=0;y<U;++y)W(e,d+3*y,H[Ge[y]]);d+=3*U;for(var O=[b,M],mt=0;mt<2;++mt)for(var it=O[mt],y=0;y<it.length;++y){var j=it[y]&31;W(e,d,Xt[j]),d+=H[j],j>15&&(W(e,d,it[y]>>5&127),d+=it[y]>>12)}}else R=Qn,F=et,T=ti,J=Et;for(var y=0;y<s;++y){var z=r[y];if(z>255){var j=z>>18&31;ft(e,d,R[j+257]),d+=F[j+257],j>7&&(W(e,d,z>>23&31),d+=he[j]);var ot=z&31;ft(e,d,T[ot]),d+=J[ot],ot>3&&(ft(e,d,z>>5&8191),d+=ge[ot])}else ft(e,d,R[z]),d+=F[z]}return ft(e,d,R[256]),d+F[256]},ai=new fe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ya=new P(0),ri=function(t,e,a,r,n,i){var o=i.z||t.length,s=new P(r+o+5*(1+Math.ceil(o/7e3))+n),l=s.subarray(r,s.length-n),c=i.l,d=(i.r||0)&7;if(e){d&&(l[0]=i.r>>3);for(var u=ai[e-1],p=u>>13,m=u&8191,f=(1<<a)-1,h=i.p||new N(32768),g=i.h||new N(f+1),w=Math.ceil(a/3),b=2*w,A=function(Gt){return(t[Gt]^t[Gt+1]<<w^t[Gt+2]<<b)&f},k=new fe(25e3),M=new N(288),I=new N(32),S=0,y=0,v=i.i||0,H=0,rt=i.w||0,U=0;v+2<o;++v){var nt=A(v),_=v&32767,D=g[nt];if(h[_]=D,g[nt]=_,rt<=v){var R=o-v;if((S>7e3||H>24576)&&(R>423||!c)){d=Ze(t,l,0,k,M,I,y,H,U,v-U,d),H=S=y=0,U=v;for(var F=0;F<286;++F)M[F]=0;for(var F=0;F<30;++F)I[F]=0}var T=2,J=0,Xt=m,O=_-D&32767;if(R>2&&nt==A(v-O))for(var mt=Math.min(p,R)-1,it=Math.min(32767,v),j=Math.min(258,R);O<=it&&--Xt&&_!=D;){if(t[v+T]==t[v+T-O]){for(var z=0;z<j&&t[v+z]==t[v+z-O];++z);if(z>T){if(T=z,J=O,z>mt)break;for(var ot=Math.min(O,z-2),Re=0,F=0;F<ot;++F){var Yt=v-O+F&32767,Zr=h[Yt],Oe=Yt-Zr&32767;Oe>Re&&(Re=Oe,D=Yt)}}}_=D,D=h[_],O+=_-D&32767}if(J){k[H++]=268435456|te[T]<<18|Ke[J];var je=te[T]&31,$e=Ke[J]&31;y+=he[je]+ge[$e],++M[257+je],++I[$e],rt=v+T,++S}else k[H++]=t[v],++M[t[v]]}}for(v=Math.max(v,rt);v<o;++v)k[H++]=t[v],++M[t[v]];d=Ze(t,l,c,k,M,I,y,H,U,v-U,d),c||(i.r=d&7|l[d/8|0]<<3,d-=7,i.h=g,i.p=h,i.i=v,i.w=rt)}else{for(var v=i.w||0;v<o+c;v+=65535){var Wt=v+65535;Wt>=o&&(l[d/8|0]=c,Wt=o),d=Xa(l,d+1,t.subarray(v,Wt))}i.i=o}return Va(s,0,r+$a(d)+n)},ni=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var a=e,r=9;--r;)a=(a&1&&-306674912)^a>>>1;t[e]=a}return t})(),Wa=function(){var t=-1;return{p:function(e){for(var a=t,r=0;r<e.length;++r)a=ni[a&255^e[r]]^a>>>8;t=a},d:function(){return~t}}},Ga=function(t,e,a,r,n){if(!n&&(n={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),o=new P(i.length+t.length);o.set(i),o.set(t,i.length),t=o,n.w=i.length}return ri(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,a,r,n)},Ka=function(t,e){var a={};for(var r in t)a[r]=t[r];for(var r in e)a[r]=e[r];return a},E=function(t,e,a){for(;a;++e)t[e]=a,a>>>=8},ii=function(t,e){var a=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&E(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),a){t[3]=8;for(var r=0;r<=a.length;++r)t[r+10]=a.charCodeAt(r)}},oi=function(t){return 10+(t.filename?t.filename.length+1:0)};function si(t,e){return Ga(t,e||{},0,0)}function li(t,e){e||(e={});var a=Wa(),r=t.length;a.p(t);var n=Ga(t,e,oi(e),8),i=n.length;return ii(n,e),E(n,i-8,a.d()),E(n,i-4,r),n}var Ja=function(t,e,a,r){for(var n in t){var i=t[n],o=e+n,s=r;Array.isArray(i)&&(s=Ka(r,i[1]),i=i[0]),i instanceof P?a[o]=[i,s]:(a[o+="/"]=[new P(0),s],Ja(i,o,a,r))}},qe=typeof TextEncoder<"u"&&new TextEncoder,ci=typeof TextDecoder<"u"&&new TextDecoder,di=0;try{ci.decode(Ya,{stream:!0}),di=1}catch{}function vt(t,e){var a;if(qe)return qe.encode(t);for(var r=t.length,n=new P(t.length+(t.length>>1)),i=0,o=function(d){n[i++]=d},a=0;a<r;++a){if(i+5>n.length){var s=new P(i+8+(r-a<<1));s.set(n),n=s}var l=t.charCodeAt(a);l<128||e?o(l):l<2048?(o(192|l>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|t.charCodeAt(++a)&1023,o(240|l>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|l&63)):(o(224|l>>12),o(128|l>>6&63),o(128|l&63))}return Va(n,0,i)}var re=function(t){var e=0;if(t)for(var a in t){var r=t[a].length;r>65535&&Dt(9),e+=r+4}return e},Qe=function(t,e,a,r,n,i,o,s){var l=r.length,c=a.extra,d=s&&s.length,u=re(c);E(t,e,o!=null?33639248:67324752),e+=4,o!=null&&(t[e++]=20,t[e++]=a.os),t[e]=20,e+=2,t[e++]=a.flag<<1|(i<0&&8),t[e++]=n&&8,t[e++]=a.compression&255,t[e++]=a.compression>>8;var p=new Date(a.mtime==null?Date.now():a.mtime),m=p.getFullYear()-1980;if((m<0||m>119)&&Dt(10),E(t,e,m<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),e+=4,i!=-1&&(E(t,e,a.crc),E(t,e+4,i<0?-i-2:i),E(t,e+8,a.size)),E(t,e+12,l),E(t,e+14,u),e+=16,o!=null&&(E(t,e,d),E(t,e+6,a.attrs),E(t,e+10,o),e+=14),t.set(r,e),e+=l,u)for(var f in c){var h=c[f],g=h.length;E(t,e,+f),E(t,e+2,g),t.set(h,e+4),e+=4+g}return d&&(t.set(s,e),e+=d),e},ui=function(t,e,a,r,n){E(t,e,101010256),E(t,e+8,a),E(t,e+10,a),E(t,e+12,r),E(t,e+16,n)};function mi(t,e){e||(e={});var a={},r=[];Ja(t,"",a,e);var n=0,i=0;for(var o in a){var s=a[o],l=s[0],c=s[1],d=c.level==0?0:8,u=vt(o),p=u.length,m=c.comment,f=m&&vt(m),h=f&&f.length,g=re(c.extra);p>65535&&Dt(11);var w=d?si(l,c):l,b=w.length,A=Wa();A.p(l),r.push(Ka(c,{size:l.length,crc:A.d(),c:w,f:u,m:f,u:p!=o.length||f&&m.length!=h,o:n,compression:d})),n+=30+p+g+b,i+=76+2*(p+g)+(h||0)+b}for(var k=new P(i+22),M=n,I=i-n,S=0;S<r.length;++S){var u=r[S];Qe(k,u.o,u,u.f,u.u,u.c.length);var y=30+u.f.length+re(u.extra);k.set(u.c,u.o+y),Qe(k,n,u,u.f,u.u,u.c.length,u.o,u.m),n+=16+y+(u.m?u.m.length:0)}return ui(k,n,r.length,I,M),k}class be{constructor(){this.chunks=[],this.length=0}writeU8(e){const a=new Uint8Array(1);a[0]=e&255,this.chunks.push(a),this.length+=1}writeU32(e){const a=new Uint8Array(4);new DataView(a.buffer).setUint32(0,e>>>0,!0),this.chunks.push(a),this.length+=4}writeI32(e){const a=new Uint8Array(4);new DataView(a.buffer).setInt32(0,e|0,!0),this.chunks.push(a),this.length+=4}writeF32(e){const a=new Uint8Array(4);new DataView(a.buffer).setFloat32(0,e,!0),this.chunks.push(a),this.length+=4}writeF64(e){const a=new Uint8Array(8);new DataView(a.buffer).setFloat64(0,e,!0),this.chunks.push(a),this.length+=8}writeBytes(e){this.chunks.push(e),this.length+=e.length}writeString(e){const a=vt(e);this.writeU32(a.length),this.writeBytes(a)}writeJson(e){this.writeString(JSON.stringify(e))}writeFloat32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}writeUint32Array(e){this.alignTo(4);const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);this.writeU32(a.length),this.writeBytes(a)}alignTo(e){const a=this.length%e;if(a===0)return;const r=e-a;for(let n=0;n<r;n++)this.writeU8(0)}toUint8Array(){const e=new Uint8Array(this.length);let a=0;for(const r of this.chunks)e.set(r,a),a+=r.length;return e}}const Y=4,Za="gzip";function ne(t){return{bytes:li(t),compression:Za}}async function qa(t){if(typeof CompressionStream>"u")return ne(t);try{const e=new Uint8Array(t.byteLength);e.set(t);const a=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return{bytes:new Uint8Array(await new Response(a).arrayBuffer()),compression:Za}}catch{return ne(t)}}const Lt="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%()*+,-.;=?@[]^_{|}~",ie=new Int16Array(128).fill(-1);for(let t=0;t<Lt.length;t++)ie[Lt.charCodeAt(t)]=t;function Tt(t,e){return e==="base85"?fi(t):bi(t)}function pi(t,e){const a=t.length>0&&(t.charCodeAt(0)<=32||t.charCodeAt(t.length-1)<=32)?t.trim():t;return e==="base85"?hi(a):wi(a)}function fi(t){const e=t.length;if(e===0)return"";const a=(4-e%4)%4,r=e+a,n=[];for(let o=0;o<r;o+=4){const s=t[o]??0,l=o+1<e?t[o+1]:0,c=o+2<e?t[o+2]:0,d=o+3<e?t[o+3]:0;let u=(s<<24>>>0)+(l<<16)+(c<<8)+d;const p=new Array(5);for(let m=4;m>=0;m--)p[m]=u%85,u=u/85|0;for(let m=0;m<5;m++)n.push(Lt[p[m]])}const i=Math.ceil(e*5/4);return n.slice(0,i).join("")}function hi(t){const e=t.replace(/\s+/g,""),a=e.length;if(a===0)return new Uint8Array(0);const r=Math.floor(a*4/5),n=(5-a%5)%5,i=a+n,o=new Uint8Array(i/5*4),s=Lt.length-1;let l=0;for(let c=0;c<i;c+=5){let d=0;for(let u=0;u<5;u++){const p=c+u<a?gi(e.charCodeAt(c+u)):s;d=d*85+p}o[l++]=d>>>24&255,o[l++]=d>>>16&255,o[l++]=d>>>8&255,o[l++]=d&255}return o.subarray(0,r)}function gi(t){if(t<0||t>=ie.length)throw new Error("Invalid base85 character");const e=ie[t];if(e<0)throw new Error("Invalid base85 character");return e}function bi(t){let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}function wi(t){const e=atob(t),a=new Uint8Array(e.length);for(let r=0;r<e.length;r++)a[r]=e.charCodeAt(r);return a}const ta=1,ea=2,aa=4,ra=8,na=16,xi=32,ia=1,oa=2,sa=4,la=8,ca=16,yi=32,da=64,ua=128;function we(t){let e=256+t.positions.byteLength;return t.indices&&(e+=t.indices.byteLength),t.lineDistances&&(e+=t.lineDistances.byteLength),t.linePattern&&(e+=64+t.linePattern.pattern.length*8),e}function xe(t){let e=256+t.positions.byteLength;return t.indices&&(e+=t.indices.byteLength),t.gradientPositions&&(e+=t.gradientPositions.byteLength),t.uvs&&(e+=t.uvs.byteLength),t.texture&&(e+=t.texture.bytes.byteLength+64),t.hatchPattern&&(e+=128),t.gradientFill&&(e+=64),e}function Qa(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let a=0;e.indices&&e.indices.length>0&&(a|=ta),e.linePattern&&(a|=ea),e.lineDistances&&e.lineDistances.length>0&&(a|=aa),e.lineWidth!=null&&e.lineWidth>0&&(a|=ra),e.renderOrder!=null&&e.renderOrder!==0&&(a|=na),e.excludeFromOsnap&&(a|=xi),t.writeU8(a),a&ta&&t.writeUint32Array(e.indices),a&ea&&t.writeJson(e.linePattern),a&aa&&t.writeFloat32Array(e.lineDistances),a&ra&&t.writeF32(e.lineWidth),a&na&&t.writeI32(e.renderOrder)}function tr(t,e){t.writeString(e.layer),t.writeU32(e.color>>>0),t.writeF64(e.offset[0]),t.writeF64(e.offset[1]),t.writeF64(e.offset[2]),t.writeFloat32Array(e.positions);let a=0;e.indices&&e.indices.length>0&&(a|=ia),e.hatchPattern&&(a|=oa),e.gradientFill&&(a|=sa),e.gradientPositions&&e.gradientPositions.length>0&&(a|=la),e.side!=null&&(a|=ca),e.points&&(a|=yi),e.renderOrder!=null&&e.renderOrder!==0&&(a|=da),e.texture&&e.texture.bytes.length>0&&e.uvs&&e.uvs.length>=2&&(a|=ua),t.writeU8(a),a&ia&&t.writeUint32Array(e.indices),a&oa&&t.writeJson(e.hatchPattern),a&sa&&t.writeJson(e.gradientFill),a&la&&t.writeFloat32Array(e.gradientPositions),a&ca&&t.writeU8(e.side),a&da&&t.writeI32(e.renderOrder),a&ua&&(t.writeFloat32Array(e.uvs),t.writeString(e.texture.mimeType||"image/png"),t.writeU32(e.texture.bytes.byteLength),t.writeBytes(e.texture.bytes))}const vi=1329939265,ki=1,Ai=1,Mi=2,Bi=3,Si=4,Ci=5,Ii=6,Ei=7;function er(t){var e;switch(t.kind){case"line":return 37;case"circle":return 30;case"arc":return 46;case"ellipse":return 71;case"point":return 21;case"path":return 10+t.vertices.length*8;case"spline":return 10+(t.controlPoints.length+t.knots.length+t.weights.length+(((e=t.fitPoints)==null?void 0:e.length)??0))*8+16;default:return t}}function Li(t,e){if(t.length===0)return[];const a=[];let r=[],n=64;const i=()=>{r.length!==0&&(a.push(r),r=[],n=64)};for(const o of t){const s=er(o);r.length>0&&n+s>e&&i(),r.push(o),n+=s}return i(),a}function ye(t){const e=new be;e.writeU32(vi),e.writeU8(ki),e.writeU8(0),e.writeU8(0),e.writeU8(0);const a=[],r=new Map,n=i=>{const o=r.get(i);if(o!=null)return o;const s=a.length;return a.push(i),r.set(i,s),s};for(const i of t.primitives)n(i.layer);e.writeU32(a.length);for(const i of a)e.writeString(i);e.writeU32(t.primitives.length);for(const i of t.primitives)zi(e,i,n(i.layer));return e.toUint8Array()}async function Fi(t){const e=ye(t),a=(await qa(e)).bytes;return{uncompressed:e,compressed:a}}function Zt(t,e){t.writeU8(e<0?0:1)}function gt(t,e){t.writeU32(e.length);for(const a of e)t.writeF64(a)}function zi(t,e,a){switch(e.kind){case"line":t.writeU8(Ai),t.writeU32(a),t.writeF64(e.x0),t.writeF64(e.y0),t.writeF64(e.x1),t.writeF64(e.y1);return;case"circle":t.writeU8(Mi),t.writeU32(a),t.writeF64(e.cx),t.writeF64(e.cy),t.writeF64(e.r),Zt(t,e.normalSign);return;case"arc":t.writeU8(Bi),t.writeU32(a),t.writeF64(e.cx),t.writeF64(e.cy),t.writeF64(e.r),t.writeF64(e.startAngle),t.writeF64(e.endAngle),Zt(t,e.normalSign);return;case"ellipse":t.writeU8(Si),t.writeU32(a),t.writeF64(e.cx),t.writeF64(e.cy),t.writeF64(e.majorX),t.writeF64(e.majorY),t.writeF64(e.majorR),t.writeF64(e.minorR),t.writeF64(e.startAngle),t.writeF64(e.endAngle),t.writeU8(e.closed?1:0),Zt(t,e.normalSign??1);return;case"spline":t.writeU8(Ci),t.writeU32(a),gt(t,e.controlPoints),t.writeU32(e.degree),gt(t,e.knots),gt(t,e.weights),t.writeU8(e.closed?1:0),gt(t,e.fitPoints??[]);return;case"point":t.writeU8(Ii),t.writeU32(a),t.writeF64(e.x),t.writeF64(e.y);return;case"path":t.writeU8(Ei),t.writeU32(a),t.writeU8(e.closed?1:0),gt(t,e.vertices);return;default:{const r=e;throw new Error(`Unsupported osnap primitive: ${String(r)}`)}}}const Pi=1480934209;function Hi(t){if(t.version!==Y)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=new be;e.writeU32(Pi),e.writeU8(Y),e.writeU8(0),e.writeU8(0),e.writeU8(0),e.writeJson(Ui(t)),e.writeJson(t.layers),e.writeString(t.activeLayoutBtrId),e.writeU32(t.layouts.length);for(const a of t.layouts)Ni(e,a);return e.toUint8Array()}function Ui(t){const e={...t.meta.savedViews??{}},a={...t.meta.fitExtents??{}};for(const l of t.layouts)l.savedView&&(e[l.btrId]=l.savedView),l.fitExtents&&(a[l.btrId]=l.fitExtents);const r=Object.keys(e).length>0,n=Object.keys(a).length>0;if(!r&&!n){if(t.meta.savedViews==null&&t.meta.fitExtents==null)return t.meta;const{savedViews:l,fitExtents:c,...d}=t.meta;return d}const{savedViews:i,fitExtents:o,...s}=t.meta;return{...s,...r?{savedViews:e}:{},...n?{fitExtents:a}:{}}}function Ni(t,e){t.writeString(e.btrId),t.writeString(e.name),t.writeU8(e.isModelSpace?1:0),_i(t,e.osnap),t.writeJson(e.viewports??null),t.writeU32(e.lineBatches.length);for(const a of e.lineBatches)Qa(t,a);t.writeU32(e.meshBatches.length);for(const a of e.meshBatches)tr(t,a)}function _i(t,e){if(!e||e.primitives.length===0){t.writeU32(0);return}const a=ye(e);t.writeU32(a.length),t.writeBytes(a)}const Di="application/vnd.mlightcad.acex-snapshot+binary";function ar(t){if(t.version!==Y)throw new Error(`Unsupported snapshot version: ${t.version}`);const e=Hi(t),a=ne(e);return{payload:Tt(a.bytes,"base85"),compression:a.compression}}function Ti(){return Di}function at(t,e,a){if(a<=0)return new Float32Array(0);if(t instanceof Float32Array)return t.subarray(e,e+a).slice();const r=new Float32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function Ri(t,e,a){if(a<=0)return new Uint32Array(0);const r=new Uint32Array(a);for(let n=0;n<a;n++)r[n]=t[e+n];return r}function rr(t,e){if(e.length===0)return{positions:t,indices:e};let a=0;for(let n=0;n<e.length;n++){const i=e[n];i>a&&(a=i)}const r=(a+1)*3;return r>=t.length?{positions:t,indices:e}:{positions:at(t,0,r),indices:e}}function ma(t,e){return t+e}const st={x:0,y:0,z:0};function Oi(t){t.updateMatrixWorld(!0);const e=t.matrixWorld.elements;return st.x=e[12],st.y=e[13],st.z=e[14],[st.x,st.y,st.z]}function ve(t,e){const a=e.elements,r=t.positions;if(r.length===0)return{positions:new Float32Array(0),indices:t.indices};const n=new Float32Array(r.length);for(let i=0;i<r.length;i+=3){const o=r[i],s=r[i+1],l=r[i+2];n[i]=a[0]*o+a[4]*s+a[8]*l+a[12],n[i+1]=a[1]*o+a[5]*s+a[9]*l+a[13],n[i+2]=a[2]*o+a[6]*s+a[10]*l+a[14]}return{positions:n,indices:t.indices?new Uint32Array(t.indices):void 0}}function pa(t,e){const a=e*3;return Number.isFinite(t[a])&&Number.isFinite(t[a+1])&&Number.isFinite(t[a+2])}function ct(t,e){const a=t.positions,r=a.length/3|0;if(r===0||e<=0)return t;let n=!1;for(let s=0;s<a.length;s++)if(!Number.isFinite(a[s])){n=!0;break}if(!n)return t;const i=t.indices;if(i&&i.length>0){const s=[];for(let u=0;u+e<=i.length;u+=e){let p=!0;for(let m=0;m<e;m++){const f=i[u+m];if(f<0||f>=r||!pa(a,f)){p=!1;break}}if(p)for(let m=0;m<e;m++)s.push(i[u+m])}if(s.length===0)return{positions:new Float32Array(0)};const l=new Int32Array(r);l.fill(-1);const c=[],d=new Uint32Array(s.length);for(let u=0;u<s.length;u++){const p=s[u];let m=l[p];if(m<0){m=c.length/3,l[p]=m;const f=p*3;c.push(a[f],a[f+1],a[f+2])}d[u]=m}return{positions:Float32Array.from(c),indices:d}}const o=[];for(let s=0;s+e<=r;s+=e){let l=!0;for(let c=0;c<e;c++)if(!pa(a,s+c)){l=!1;break}if(l)for(let c=0;c<e;c++){const d=(s+c)*3;o.push(a[d],a[d+1],a[d+2])}}return o.length===0?{positions:new Float32Array(0)}:{positions:Float32Array.from(o)}}function ke(t){const e=t.positions;if(e.length<3)return{slice:t,offset:[0,0,0]};let a=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,s=-1/0,l=0;for(let u=0;u<e.length;u+=3){const p=e[u],m=e[u+1],f=e[u+2];!Number.isFinite(p)||!Number.isFinite(m)||!Number.isFinite(f)||(l++,a=Math.min(a,p),r=Math.min(r,m),n=Math.min(n,f),i=Math.max(i,p),o=Math.max(o,m),s=Math.max(s,f))}if(l===0)return{slice:{positions:new Float32Array(0)},offset:[0,0,0]};const c=[(a+i)/2,(r+o)/2,(n+s)/2],d=new Float32Array(e.length);for(let u=0;u<e.length;u+=3){const p=e[u],m=e[u+1],f=e[u+2];if(!Number.isFinite(p)||!Number.isFinite(m)||!Number.isFinite(f)){d[u]=0,d[u+1]=0,d[u+2]=0;continue}d[u]=p-c[0],d[u+1]=m-c[1],d[u+2]=f-c[2]}return{slice:{positions:d,indices:t.indices?new Uint32Array(t.indices):void 0},offset:c}}function ji(t,e,a={}){t.updateMatrixWorld(!0);const r=ve(e,t.matrixWorld);return ke(r)}function $i(t){const e=t.image;if(!e)return;if(typeof document>"u")return void 0;const a=document.createElement("canvas"),r=a.getContext("2d");if(!r)return;try{if(e instanceof ImageData)a.width=e.width,a.height=e.height,r.putImageData(e,0,0);else if(Xi(e)){a.width=e.width,a.height=e.height;const l=Wi(e.data,e.width*e.height),c=new ImageData(new Uint8ClampedArray(l),e.width,e.height);r.putImageData(c,0,0)}else if(Vi(e)){const l=Yi(e);if(!l)return;a.width=l.width,a.height=l.height,r.drawImage(e,0,0)}else return}catch{return}const n=a.toDataURL("image/png"),i=n.indexOf(",");if(i<0)return;const o=atob(n.slice(i+1)),s=new Uint8Array(o.length);for(let l=0;l<o.length;l++)s[l]=o.charCodeAt(l);return{mimeType:"image/png",bytes:s}}function Vi(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement}function Xi(t){if(!t||typeof t!="object")return!1;const e=t;return e.data!=null&&typeof e.width=="number"&&typeof e.height=="number"&&e.width>=1&&e.height>=1}function Yi(t){let e=Number(t.width),a=Number(t.height);if(t instanceof HTMLImageElement?(e=t.naturalWidth||t.width,a=t.naturalHeight||t.height):typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement&&(e=t.videoWidth||t.width,a=t.videoHeight||t.height),!(!Number.isFinite(e)||!Number.isFinite(a)||e<1||a<1))return{width:e,height:a}}function Wi(t,e){const a=e*4;if(t instanceof Uint8ClampedArray&&t.length>=a)return t.length===a?t:t.subarray(0,a);const r=new Uint8ClampedArray(a),n=Math.min(a,t.length);for(let i=0;i<n;i++)r[i]=t[i];if(t.length>=e*3&&t.length<a)for(let i=e-1;i>=0;i--){const o=i*3,s=i*4;r[s]=t[o],r[s+1]=t[o+1],r[s+2]=t[o+2],r[s+3]=255}return r}function Gi(t,e){const a=t.getAttribute("uv");if(!a||a.count===0||a.itemSize<2)return;const r=Math.floor(e.length/3)*2;if(r<=0)return;const n=a.array;if(!(a.count*a.itemSize<r))return at(n,0,r)}function nr(t){const e=t;return e.map?!1:e.transparent===!0&&typeof e.opacity=="number"&&e.opacity<.01}function Ae(t){const e=t;if(e.isShaderMaterial===!0||t.type==="ShaderMaterial")return e}function Ki(t){var e;const a=Ae(t);if(!a)return;const r=a.uniforms.pattern,n=a.uniforms.patternLength;if(!r||!n)return;const i=r.value;if(!(!Array.isArray(i)||i.length===0))return{pattern:[...i],patternLength:Number(n.value),viewportScale:Number(((e=a.uniforms.u_viewportScale)==null?void 0:e.value)??1)}}function Ji(t){var e;const a=Ae(t);if(!a)return;const r=a.uniforms.u_patternLines;if(!r)return;const n=r.value;if(!(!Array.isArray(n)||n.length===0))return{patternAngle:Number(((e=a.uniforms.u_patternAngle)==null?void 0:e.value)??0),patternLines:n.map(qi)}}function Zi(t){var e,a,r,n,i;const o=Ae(t);if(!o||o.uniforms.u_patternLines)return;const s=(e=o.uniforms.u_startColor)==null?void 0:e.value,l=(a=o.uniforms.u_endColor)==null?void 0:a.value,c=o.uniforms.u_gradientType;if(!(!(s!=null&&s.getHex)||c==null))return{startColor:s.getHex(),endColor:((r=l==null?void 0:l.getHex)==null?void 0:r.call(l))??s.getHex(),angle:Number(((n=o.uniforms.u_angle)==null?void 0:n.value)??0),shift:Number(((i=o.uniforms.u_shift)==null?void 0:i.value)??0),gradientType:Number(c.value)}}function qi(t){return{angle:t.angle,base:[t.base.x,t.base.y],offset:[t.offset.x,t.offset.y],dashLengths:[...t.dashLengths],patternLength:t.patternLength}}function Me(t){const e=t.length/3;if(e<2)return new Float32Array(0);const a=new Float32Array(e);for(let r=0;r<e;r+=2){r===0?a[r]=0:a[r]=a[r-1];const n=t[r*3],i=t[r*3+1],o=t[r*3+2]??0,s=t[(r+1)*3],l=t[(r+1)*3+1],c=t[(r+1)*3+2]??0,d=s-n,u=l-i,p=c-o;a[r+1]=a[r]+Math.sqrt(d*d+u*u+p*p)}return a}function Qi(t,e){const a=t.getAttribute(e);if(!a||a.count===0)return;const r=a.itemSize;if(t.getIndex()){const d=a.array;return at(d,0,a.count*r)}const n=t.drawRange,i=a.count,o=Math.max(0,Math.min(Math.floor(n.start),i)),s=Math.max(0,i-o),l=!Number.isFinite(n.count)||n.count<=0?s:Math.min(Math.floor(n.count),s);if(l<=0)return;const c=a.array;return at(c,o*r,l*r)}function fa(t,e){const a=e[0],r=e[1],n=e[4],i=e[5],o=e[12],s=e[13],l=Math.atan2(r,a),c=(p,m)=>[a*p+n*m+o,r*p+i*m+s],d=(p,m)=>[a*p+n*m,r*p+i*m],u=(p,m,f)=>{const h=Math.cos(f),g=Math.sin(f);return[h*p-g*m,g*p+h*m]};return{patternAngle:t.patternAngle,patternLines:t.patternLines.map(p=>{const m=p.angle+t.patternAngle,f=p.angle+l,h=f+t.patternAngle,[g,w]=d(Math.cos(m),Math.sin(m)),b=Math.hypot(g,w),[A,k]=u(p.offset[0],p.offset[1],m),[M,I]=d(A,k),S=u(M,I,-h);return{angle:f,base:c(p.base[0],p.base[1]),offset:S,dashLengths:p.dashLengths.map(y=>y*b),patternLength:p.patternLength*b}})}}function to(t,e){return{patternAngle:t.patternAngle,patternLines:t.patternLines.map(a=>{const r=new Ye(a.base[0]-e[0],a.base[1]-e[1]),n=new Ye(a.offset[0],a.offset[1]);return mn(r,n,a.angle,t.patternAngle,a.patternLength),{angle:a.angle,base:[r.x,r.y],offset:[a.offset[0],a.offset[1]],dashLengths:[...a.dashLengths],patternLength:a.patternLength}})}}function oe(t,e){return!Number.isFinite(t)||t<0?0:Math.min(Math.floor(t),e)}function se(t,e,a){const r=Math.max(0,e-a);return!Number.isFinite(t)||t<=0?r:Math.min(Math.floor(t),r)}function Ft(t){const e=t.getAttribute("position");if(!e)return{positions:new Float32Array(0)};const a=t.drawRange,r=e.array,n=e.itemSize,i=t.getIndex();if(i){const l=at(r,0,e.count*n),c=i.array,d=oe(a.start,i.count),u=se(a.count,i.count,d),p=Ri(c,d,u);return rr(l,p)}const o=oe(a.start,e.count),s=se(a.count,e.count,o);return{positions:at(r,o*n,s*n)}}function kt(t){return Nn(t.flags)&&_n(t.flags)}function Be(t,e){const a=(e==null?void 0:e.geometryLayerName)??"";if(!t||!(e!=null&&e.insertLayerByObjectId)||!e.frozenLayers)return a;const r=e.insertLayerByObjectId.get(t);return r&&r!==a&&e.frozenLayers.has(r)?r:a}function Rt(t,e){const a=new Map,{count:r}=t.mappingStats;for(let n=0;n<r;n++){let i;try{i=t.getGeometryRangeAt(n)}catch{continue}if(!kt(i))continue;const o=Be(i.objectId,e),s=a.get(o);s?s.push(n):a.set(o,[n])}return a}function ir(t){const{count:e}=t.mappingStats;for(let a=0;a<e;a++){let r;try{r=t.getGeometryRangeAt(a)}catch{continue}if(kt(r)&&r.bboxIntersectionCheck)return!0}return!1}function le(t){return Da(t).bboxIntersectionCheck===!0}function Se(t,e,a){const r=e.getAttribute("position");if(!r)return{positions:new Float32Array(0)};const n=r.itemSize,i=r.array,o=e.getIndex(),s=a??Array.from({length:t.mappingStats.count},(p,m)=>m);if(o){const p=at(i,0,r.count*n),m=o.array;let f=0;const h=[];for(const b of s){let A;try{A=t.getGeometryRangeAt(b)}catch{continue}const k=A.indexStart??0,M=A.indexCount??0;!kt(A)||M<=0||(h.push({start:k,count:M}),f+=M)}if(f===0)return{positions:new Float32Array(0)};const g=new Uint32Array(f);let w=0;for(const b of h)for(let A=0;A<b.count;A++)g[w++]=m[b.start+A];return rr(p,g)}let l=0;const c=[];for(const p of s){let m;try{m=t.getGeometryRangeAt(p)}catch{continue}if(!kt(m)||m.vertexCount<=0)continue;const f=m.vertexCount*n;c.push({start:m.vertexStart*n,floatCount:f}),l+=f}if(l===0)return{positions:new Float32Array(0)};const d=new Float32Array(l);let u=0;if(i instanceof Float32Array)for(const p of c)d.set(i.subarray(p.start,p.start+p.floatCount),u),u+=p.floatCount;else for(const p of c)for(let m=0;m<p.floatCount;m++)d[u++]=i[p.start+m];return{positions:d}}function ha(t,e,a){t.push(e.getX(a),e.getY(a),e.getZ(a))}function eo(t,e,a){const r=e.getAttribute("instanceStart"),n=e.getAttribute("instanceEnd");if(!r||!n)return{positions:new Float32Array(0)};const i=a??Array.from({length:t.mappingStats.count},(s,l)=>l),o=[];for(const s of i){let l;try{l=t.getGeometryRangeAt(s)}catch{continue}if(!kt(l)||l.vertexCount<=0)continue;const c=l.vertexStart,d=c+l.vertexCount;for(let u=c;u<d;u++)ha(o,r,u),ha(o,n,u)}return{positions:new Float32Array(o)}}function ao(t,e){const a=t.instanceCount;if(Number.isFinite(a)&&a>=0)return Math.min(Math.floor(a),e);const r=t.drawRange,n=oe(r.start,e);return se(r.count,e,n)}function ro(t){const e=t.getAttribute("instanceStart"),a=t.getAttribute("instanceEnd");if(!e||!a||e.count===0)return{positions:new Float32Array(0)};const r=ao(t,e.count);if(r<=0)return{positions:new Float32Array(0)};const n=[];for(let i=0;i<r;i++){const o=[e.getX(i),e.getY(i),e.getZ(i)],s=[a.getX(i),a.getY(i),a.getZ(i)];!o.every(Number.isFinite)||!s.every(Number.isFinite)||n.push(o[0],o[1],o[2],s[0],s[1],s[2])}return{positions:new Float32Array(n)}}function St(t,e){let a=t;for(;a&&a!==e;){if(a.visible===!1)return!1;a=a.parent}return!0}function or(t){if(t instanceof dn)return t.linewidth}function xt(t){if("material"in t){const e=t.userData.originalMaterial??t.material;return Array.isArray(e)?e[0]:e}return t.material}function q(t){var e;const a=Ta(t),r=a.layer??"0",n=t;let i=n.color!=null?n.color.getHex():a.color??16777215;const o=Ki(t),s=Ji(t),l=Zi(t);if(t instanceof cn||t.type==="ShaderMaterial"){const c=(e=t.uniforms.u_color)==null?void 0:e.value;c!=null&&c.getHex?i=c.getHex():l&&(i=l.startColor)}return{color:i,layer:r,linePattern:o,hatchPattern:s,gradientFill:l,side:s||l?t.side:void 0}}function no(t,e){const a=Ta(e).drawOrder??t.renderOrder;return a===0?void 0:a}function dt(t,e,a){const r=no(e,a);r!=null&&(t.renderOrder=r)}function io(t,e){if(!e)return;const a=t.userData.bakedWorldMatrix;return a&&a.length>=16?fa(e,a):(t.updateMatrixWorld(!0),fa(e,Array.from(t.matrixWorld.elements)))}function Ot(t){return Oi(t)}function qt(t,e,a={}){const r=ji(t,e,a);return{...r.slice,offset:r.offset}}function oo(t){if(t.indices&&t.indices.length>=3)return t;const e=t.positions.length/3|0;if(e<3||e%3!==0)return t;const a=new Uint32Array(e);for(let r=0;r<e;r++)a[r]=r;return{...t,indices:a}}function At(t,e,a,r,n,i=!1){i&&(r=oo(r));const o=q(e),s=io(a,o.hatchPattern),l=s?to(s,n):void 0,c=o.gradientFill?Qi(t,"gradientPosition"):void 0,d={layer:o.layer,color:o.color,offset:n,hatchPattern:l,gradientFill:o.gradientFill,gradientPositions:c,side:o.side,...r},u=e;if(u.map){const p=$i(u.map),m=Gi(t,r.positions);if(!p||!m)return;d.texture=p,d.uvs=m,d.color=16777215,d.side=un}return dt(d,a,e),d}function so(t,e){const a=Rt(t,e);if(a.size===0)return[];const{color:r}=q(t.material),n=or(t.material),i=Ot(t),o=ir(t),s=t.material,l=[];for(const[c,d]of a){const u=eo(t,t.geometry,d);if(u.positions.length===0)continue;const p={layer:c,color:r,offset:i,lineWidth:n,...u};o&&(p.excludeFromOsnap=!0),dt(p,t,s),l.push(p)}return l}function lo(t,e){const a=Rt(t,e);if(a.size===0)return[];const{color:r,linePattern:n}=q(t.material),i=Ot(t),o=ir(t),s=t.material,l=[];for(const[c,d]of a){const u=Se(t,t.geometry,d);if(u.positions.length===0)continue;const p=n?Me(u.positions):void 0,m={layer:c,color:r,offset:i,linePattern:n,lineDistances:p,...u};o&&(m.excludeFromOsnap=!0),dt(m,t,s),l.push(m)}return l}function co(t,e){const a=Rt(t,e);if(a.size===0)return[];const r=[];for(const[n,i]of a){const o=Se(t,t.geometry,i);if(o.positions.length===0)continue;const s=At(t.geometry,t.material,t,o,Ot(t),!0);s&&(s.layer=n,r.push(s))}return r}function uo(t,e){const a=Rt(t,e);if(a.size===0)return[];const r=[];for(const[n,i]of a){const o=Se(t,t.geometry,i);if(o.positions.length===0)continue;const s=At(t.geometry,t.material,t,o,Ot(t));s&&(s.layer=n,r.push({points:!0,...s}))}return r}const V=new ut,zt=new ut,bt=new Vn;bt.matrixAutoUpdate=!1;function mo(t){const e=t;return e.isInstancedMesh===!0&&e.instanceMatrix!=null&&typeof e.count=="number"&&e.geometry!=null}function po(t){return t.renderOrder<1e4||t.isInstancedMesh===!0?!1:Da(t).sharesTemplateGeometry===!0}function Pt(t){const e=t.elements;for(let i=0;i<16;i++)if(!Number.isFinite(e[i]))return!1;const a=Math.hypot(e[0],e[1],e[2]),r=Math.hypot(e[4],e[5],e[6]),n=Math.hypot(e[8],e[9],e[10]);return a+r+n>=1e-8}function fo(t,e){let a=t;for(;a;){const r=a.getObjectIdAt;if(typeof r=="function")return r.call(a,e);a=a.parent}}function sr(t,e){t.updateMatrixWorld(!0);const a=t.instanceMatrix.array,r=new Map,n=(e==null?void 0:e.geometryLayerName)??"";for(let i=0;i<t.count;i++){if(V.fromArray(a,i*16),!Pt(V))continue;const o=fo(t,i),s=Be(o,e)||n,l=r.get(s);l?l.push(i):r.set(s,[i])}return r}function lr(t,e,a){var r;const n=ct(Ft(t.geometry),e),i=n.positions.length;if(i===0)return;t.updateMatrixWorld(!0);const o=t.instanceMatrix.array,s=((r=n.indices)==null?void 0:r.length)??0,l=a??Array.from({length:t.count},(h,g)=>g);let c=0;for(const h of l)V.fromArray(o,h*16),Pt(V)&&c++;if(c===0)return;const d=new Float32Array(c*i),u=n.indices!=null?new Uint32Array(c*s):void 0,p=i/3;let m=0;for(const h of l){if(V.fromArray(o,h*16),!Pt(V))continue;zt.multiplyMatrices(t.matrixWorld,V);const g=ve(n,zt);if(d.set(g.positions,m*i),u&&g.indices){const w=m*p;for(let b=0;b<g.indices.length;b++)u[m*s+b]=g.indices[b]+w}m++}const f=ke(ct({positions:d,indices:u},e));if(f.slice.positions.length!==0)return{slice:f.slice,offset:f.offset}}function ho(t){const e=q(t),a=t;return!!(e.hatchPattern||e.gradientFill||a.map)}function go(t,e,a){t.updateMatrixWorld(!0);const r=t.instanceMatrix.array,n=a??Array.from({length:t.count},(i,o)=>o);for(const i of n)V.fromArray(r,i*16),Pt(V)&&(zt.multiplyMatrices(t.matrixWorld,V),e(zt,i))}function bo(t,e,a){const r=sr(t,a);if(r.size===0)return;const n=xt(t),{color:i,layer:o,linePattern:s}=q(n),l=(a==null?void 0:a.geometryLayerName)||o,c=le(t);for(const[d,u]of r){const p=lr(t,2,u);if(!p)continue;const m=s?Me(p.slice.positions):void 0,f={layer:d||l,color:i,offset:p.offset,linePattern:s,lineDistances:m,...p.slice};c&&(f.excludeFromOsnap=!0),dt(f,t,n),e.push(f)}}function ga(t,e,a,r){const n=xt(t);if(!a&&nr(n))return;const i=sr(t,r);if(i.size===0)return;const o=(r==null?void 0:r.geometryLayerName)||q(n).layer;if(!a&&ho(n)){const s=ct(Ft(t.geometry),3);if(s.positions.length===0)return;for(const[l,c]of i)go(t,d=>{const u=ct(ve(s,d),3);if(u.positions.length===0)return;const p=ke(u);bt.matrix.copy(d),bt.matrixWorld.copy(d),bt.matrixWorldNeedsUpdate=!1;const m=At(t.geometry,n,bt,p.slice,p.offset,!0);m&&(m.layer=l||o,e.push(m))},c);return}for(const[s,l]of i){const c=lr(t,a?1:3,l);if(!c)continue;const d=At(t.geometry,n,t,c.slice,c.offset,!a);d&&(d.layer=s||o,e.push(a?{...d,points:!0}:d))}}function Ct(t){const e=t;return t instanceof sn||e.isLineSegments2===!0||t.type==="LineSegments2"}function ba(t){const e=t;return t instanceof on||e.isLineSegments===!0||t.type==="LineSegments"}function wa(t){const e=t;return t instanceof ln||e.isMesh===!0||e.isInstancedMesh===!0||t.type==="Mesh"}function wo(t,e){const a=[],r=[],n=(e==null?void 0:e.geometryLayerName)??"",i=o=>{const s=o.userData,l=s.objectId??s.sharedInstanceObjectId;return Be(l,e)};return t.traverse(o=>{if(!(Qr(o)||tn(o)||po(o))){if(mo(o)){if(!St(o,t))return;o.isPoints===!0?ga(o,r,!0,e):ba(o)&&!Ct(o)?bo(o,a,e):wa(o)&&!Ct(o)&&ga(o,r,!1,e);return}if(o instanceof Ve){a.push(...lo(o,e));return}if(o instanceof en){a.push(...so(o,e));return}if(o instanceof Xe){r.push(...co(o,e));return}if(o instanceof an){r.push(...uo(o,e));return}if(Ct(o)){if(!St(o,t))return;const s=ro(o.geometry);if(s.positions.length===0)return;const l=xt(o),{color:c}=q(l),{offset:d,...u}=qt(o,s),p={layer:i(o)||n,color:c,offset:d,lineWidth:or(l),...u};le(o)&&(p.excludeFromOsnap=!0),dt(p,o,l),a.push(p)}else if(ba(o)&&!(o instanceof Ve)){if(!St(o,t))return;const s=ct(Ft(o.geometry),2);if(s.positions.length===0)return;const l=xt(o),{color:c,linePattern:d}=q(l),{offset:u,...p}=qt(o,s),m=d?Me(p.positions):void 0,f={layer:i(o)||n,color:c,offset:u,linePattern:d,lineDistances:m,...p};le(o)&&(f.excludeFromOsnap=!0),dt(f,o,l),a.push(f)}else if(wa(o)&&!Ct(o)&&!(o instanceof Xe)){if(!St(o,t))return;const s=xt(o);if(nr(s))return;const l=ct(Ft(o.geometry),3);if(l.positions.length===0)return;const{offset:c,...d}=qt(o,l),u=At(o.geometry,s,o,d,c,!0);u&&(u.layer=i(o)||n,r.push(u))}}}),{lineBatches:a,meshBatches:r}}const xa={size:8,colorCss:"#0080ff",hotColorCss:"#ff0000"};function ya(t){const e=new rn(nn.ByACI,t);return e.cssColor??`rgb(${e.red}, ${e.green}, ${e.blue})`}function xo(t){try{const e=qr.instance(),a=e.getVar(Kt.GRIPSIZE,t),r=e.getVar(Kt.GRIPCOLOR,t),n=e.getVar(Kt.GRIPHOT,t);return!(a>0)||!Number.isFinite(a)?xa:{size:a,colorCss:ya(r),hotColorCss:ya(n)}}catch{return xa}}function cr(t,e){const a=t.extmin,r=t.extmax,n=xo(t);return{title:e==null?void 0:e.title,extents:{minX:a.x,minY:a.y,maxX:r.x,maxY:r.y},units:{insunits:t.insunits,lunits:t.lunits,luprec:t.luprec,aunits:t.aunits,auprec:t.auprec,measurement:t.measurement,ltscale:t.ltscale,angbase:t.angbase,angdir:t.angdir},grip:n,background:(e==null?void 0:e.background)??0}}function va(t,e,a,r,n){return Math.atan2(r-e,n*(a-t))}function Ce(t){return t.z>=0?1:-1}function dr(t,e,a){if(!(a.radius>0)||!Number.isFinite(a.radius))return;const r=a.clockwise?-1:1,n=a.center.x,i=a.center.y;t.push({kind:"arc",layer:e,cx:n,cy:i,r:a.radius,startAngle:va(n,i,a.startPoint.x,a.startPoint.y,r),endAngle:va(n,i,a.endPoint.x,a.endPoint.y,r),normalSign:r})}function L(t,e){const a=new X(e.x,e.y,e.z??0).applyMatrix4(t);return{x:a.x,y:a.y}}function yo(t){const e=t.elements;return new ut(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function Ht(t,e){return new ut().multiplyMatrices(t,yo(e))}function ur(t,e){const a=new X(e.x,e.y,e.z??0).transformDirection(t).normalize();return{x:a.x,y:a.y}}function ce(t){const e=new X(t.elements[0],t.elements[1],t.elements[2]).length(),a=new X(t.elements[4],t.elements[5],t.elements[6]).length();return lt.equal(e,a,Ra*Math.max(e,a,1))}function vo(t,e){const a=t.tables.blockTable.getIdAt(e);if(a)return a;for(const n of t.tables.blockTable.newIterator())if(n.objectId===e)return n;const r=t.tables.blockTable.modelSpace;if(r.objectId===e)return r}function ko(t){if(t instanceof Dn)return!0;const e=t;return(e.type==="LINE"||e.type==="Line")&&e.startPoint!=null&&e.endPoint!=null}function Ao(t,e,a,r){r.startPoint,r.endPoint}function mr(t,e){return t.blockTableRecord??(t.blockName?e.tables.blockTable.getAt(t.blockName):void 0)}function Mo(t,e){const a=t.dimBlockId;return a?e.tables.blockTable.getAt(a):void 0}function Bo(t,e){const a=mr(t,e);if(a)return a;const r=t.owningBlockRecordId;return r?e.tables.blockTable.getAt(r):void 0}function pr(t){return t.getFullInsertionTransform()}function So(t){for(const e of t.newIterator())return!0;return!1}function Co(t){return typeof t.getFullInsertionTransform=="function"&&"blockTableRecord"in t}function Q(t,e,a,r,n){if(r.length<2)return;const i=ce(a),o=a.elements[0]*a.elements[5]-a.elements[4]*a.elements[1]<0?-1:1,s=[];for(const l of r){const c=L(a,l);let d=l.bulge??0;lt.isPositive(Math.abs(d))&&(d=i?d*o:0),s.push(c.x,c.y,d)}t.push({kind:"path",layer:e,closed:n,vertices:s})}function fr(t,e){return lt.equal(t.x,e.x)&<.equal(t.y,e.y)}function Io(t){return(t.clockwise?-1:1)*Math.tan(t.deltaAngle/4)}function ka(t,e,a,r){if(t.length===0){t.push({x:e.x,y:e.y,z:e.z??0,bulge:r}),t.push({x:a.x,y:a.y,z:a.z??0,bulge:0});return}const n=t[t.length-1];fr(n,e)?n.bulge=r:(n.bulge=0,t.push({x:e.x,y:e.y,z:e.z??0,bulge:r})),t.push({x:a.x,y:a.y,z:a.z??0,bulge:0})}function Aa(t){return t.length>=2&&fr(t[0],t[t.length-1])&&t.pop(),t}function yt(t,e,a,r,n){if(r.length<2)return;const i=n?r.length:r.length-1;for(let o=0;o<i;o++)r[o],r[(o+1)%r.length]}function Eo(t,e,a,r){const n=[r.startPosition];for(const i of r.segments)n.push(i.position);yt(t,e,a,n,r.closed)}function Lo(t,e,a){if(a.vertices.length===0)return[];const r=a.vertices[a.vertices.length-1],n=e.lastLeaderLinePoint??e.landingPoint??t.landingPoint??t.contentBasePosition;if(!n)return a.vertices;const i=r.x-n.x,o=r.y-n.y,s=(r.z??0)-(n.z??0);return Math.hypot(i,o,s)<=Ra?a.vertices:[...a.vertices,n]}function Fo(t,e,a,r){var n,i;for(const s of r.leaders)for(const l of s.leaderLines){const c=Lo(r,s,l);yt(t,e,a,c,!1)}const o=s=>{if(!s)return;const l=L(a,s);t.push({kind:"point",layer:e,x:l.x,y:l.y})};o(r.contentBasePosition),o((n=r.mtextContent)==null?void 0:n.anchorPoint),o((i=r.blockContent)==null?void 0:i.position)}function zo(t,e,a,r){const n=r.numberOfVertices;if(n<2)return;const i=r.elevation,o=r.closed?n:n-1;for(let s=0;s<o;s++){const l=r.getPointAt(s),c=r.getPointAt((s+1)%n),d=r.getBulgeAt(s),u={x:l.x,y:l.y,z:i},p={x:c.x,y:c.y,z:i};if(lt.isPositive(Math.abs(d))){const m=L(a,u),f=L(a,p);dr(t,e,new pe(m,f,d))}}}function Po(t,e,a,r,n,i){const o=L(a,r),s=new X(a.elements[0],a.elements[1],a.elements[2]).length(),l={kind:"circle",layer:e,cx:o.x,cy:o.y,r:n*s,normalSign:Ce(i)};t.push(l)}function Ho(t,e,a,r){const n=L(a,r.center),i=new X(a.elements[0],a.elements[1],a.elements[2]).length(),o={kind:"arc",layer:e,cx:n.x,cy:n.y,r:r.radius*i,startAngle:r.startAngle,endAngle:r.endAngle,normalSign:Ce(r.normal)};t.push(o)}function Qt(t,e,a,r){const n=L(a,r.center),i=r._geo,o=(i==null?void 0:i.majorAxis)??{x:1,y:0,z:0},s=ur(a,o),l=Math.hypot(s.x,s.y)||1,c=new X(a.elements[0],a.elements[1],a.elements[2]).length(),d=new X(a.elements[4],a.elements[5],a.elements[6]).length(),u={kind:"ellipse",layer:e,cx:n.x,cy:n.y,majorX:s.x/l,majorY:s.y/l,majorR:r.majorAxisRadius*c,minorR:r.minorAxisRadius*d,startAngle:r.startAngle,endAngle:r.endAngle,closed:r.closed,normalSign:Ce(r.normal)};t.push(u)}function Uo(t,e,a,r){var n,i;const o=r._geo;if(!((n=o==null?void 0:o.controlPoints)!=null&&n.length))return;const s=[];for(const c of o.controlPoints){const d=L(a,c);s.push(d.x,d.y)}const l={kind:"spline",layer:e,controlPoints:s,degree:o.degree??3,knots:[...o.knots??[]],weights:[...o.weights??[]],closed:o.closed??!1};if((i=o.fitPoints)!=null&&i.length){l.fitPoints=[];for(const c of o.fitPoints){const d=L(a,c);l.fitPoints.push(d.x,d.y)}}t.push(l)}const Ma=1e-6;function No(t){var e;const a=t.elevation,r=(e=t._geo)==null?void 0:e.vertices;return r&&r.length>1?r.map(n=>({x:n.x,y:n.y,z:a,bulge:n.bulge,startWidth:n.startWidth,endWidth:n.endWidth})):Array.from({length:t.numberOfVertices},(n,i)=>{const o=t.getPoint2dAt(i);return{x:o.x,y:o.y,z:a,bulge:0}})}function _o(t){return t.some(e=>{const a=Math.max(0,e.startWidth??0),r=Math.max(0,e.endWidth??0);return a>Ma||r>Ma})}function Do(t,e,a,r){const n=No(r),i=n.length;if(i<2)return;if(_o(n)){Q(t,e,a,n,r.closed);return}const o=r.closed?i:i-1;for(let s=0;s<o;s++){const l=n[s],c=n[(s+1)%i],d=l.bulge??0;if(lt.isPositive(Math.abs(d))){const u=L(a,l),p=L(a,c);dr(t,e,new pe(u,p,d))}}}function To(t,e,a,r,n){const i=L(a,{x:r.center.x,y:r.center.y,z:n}),o=ur(a,{x:Math.cos(r.rotation),y:Math.sin(r.rotation),z:0}),s=Math.hypot(o.x,o.y)||1,l=new X(a.elements[0],a.elements[1],a.elements[2]).length(),c=new X(a.elements[4],a.elements[5],a.elements[6]).length();t.push({kind:"ellipse",layer:e,cx:i.x,cy:i.y,majorX:o.x/s,majorY:o.y/s,majorR:r.majorAxisRadius*l,minorR:r.minorAxisRadius*c,startAngle:r.startAngle,endAngle:r.endAngle,closed:!1,normalSign:r.clockwise?-1:1})}function Ro(t,e,a,r,n){var i;const o=r.numberOfVertices;if(o<2)return;const s=[];for(let l=0;l<o;l++){const c=r.getPointAt(l);s.push({x:c.x,y:c.y,z:n,bulge:((i=r.vertices[l])==null?void 0:i.bulge)??0})}Q(t,e,a,s,r.closed)}function Oo(t,e,a,r,n){if(r instanceof Rn){Ro(t,e,a,r,n);return}if(!(r instanceof On))return;const i=[];let o=!1;const s=()=>{const c=Aa(i);c.length>=2&&Q(t,e,a,c,!1),i.length=0};for(const c of r.curves)c instanceof jn?ka(i,{x:c.startPoint.x,y:c.startPoint.y,z:n},{x:c.endPoint.x,y:c.endPoint.y,z:n},0):c instanceof pe?ka(i,{x:c.startPoint.x,y:c.startPoint.y,z:n},{x:c.endPoint.x,y:c.endPoint.y,z:n},Io(c)):c instanceof $n&&(o=!0,s(),To(t,e,a,c,n));const l=Aa(i);l.length>=2&&Q(t,e,a,l,!o)}function jo(t,e,a,r){var n;const i=(n=r._geo)==null?void 0:n.loops;if(!(i!=null&&i.length))return;const o=r.elevation;for(const s of i)Oo(t,e,a,s,o)}function $o(t,e,a,r){Ht(a,pr(r));const n=[0];for(let o=0;o<r.numColumns;o++)n.push(n[o]+r.columnWidth(o));const i=[0];for(let o=0;o<r.numRows;o++)i.push(i[o]-r.rowHeight(o));n[n.length-1],i[i.length-1];for(const o of i);for(const o of n);}function Vo(t,e,a,r,n,i,o,s=!0){const l=de(t.layer,a);if(o&&!o(l))return;const c=Bo(t,i);if(c&&!n.has(c.objectId)&&So(c)){n.add(c.objectId);const u=Ht(e,pr(t));Ut(c,u,l,r,n,i,o,s),n.delete(c.objectId);return}$o(r,l,e,t);const d=L(e,t.position);r.push({kind:"point",layer:l,x:d.x,y:d.y})}function Xo(t,e,a,r){let n=r.boundaryPath();if(n.length>1){const o=n[0],s=n[n.length-1];o.x===s.x&&o.y===s.y&&(o.z??0)===(s.z??0)&&(n=n.slice(0,-1))}n.length>=2&&Q(t,e,a,n,!0);const i=L(a,r.position);t.push({kind:"point",layer:e,x:i.x,y:i.y})}function Yo(t,e,a,r){const n=r.position();Q(t,e,a,[n.upperLeft,n.upperRight,n.lowerRight,n.lowerLeft],!0);const i=L(a,r.getLocation());t.push({kind:"point",layer:e,x:i.x,y:i.y})}function Wo(t){var e;const a=(e=t.attributeIterator)==null?void 0:e.call(t);return a?typeof a.toArray=="function"?a.toArray():[...a]:[]}function de(t,e){return t==="0"?e:t}function hr(t,e,a,r,n,i,o,s=!0){if(!t.visibility)return;const l=de(t.layer,a);if(!(o&&!o(l))){if(t instanceof pn){Vo(t,e,a,r,n,i,o,s);return}if(Co(t)){const c=mr(t,i);if(!c||n.has(c.objectId))return;n.add(c.objectId);const d=t.getFullInsertionTransform(),u=Math.max(1,t.columnCount??1),p=Math.max(1,t.rowCount??1),m=t.columnSpacing??0,f=t.rowSpacing??0,h=de(t.layer,a);for(let g=0;g<p;g++)for(let w=0;w<u;w++){const b=Ht(e,d);(w!==0||g!==0)&&b.multiply(new ut().makeTranslation(w*m,g*f,0));const A=L(b,{x:0,y:0,z:0});r.push({kind:"point",layer:h,x:A.x,y:A.y}),Ut(c,b,h,r,n,i,o,s)}for(const g of Wo(t))g instanceof fn,g.isInvisible||hr(g,e,h,r,n,i,o,s);n.delete(c.objectId);return}if(t instanceof hn){const c=t,d=Mo(c,i);if(!d||n.has(d.objectId))return;n.add(d.objectId);const u=Ht(e,c.getFullDimBlockTransform());Ut(d,u,l,r,n,i,o,!0),n.delete(d.objectId);return}if(ko(t)){Ao(r,l,e,t);return}if(t instanceof gn){ce(e)?Po(r,l,e,t.center,t.radius,t.normal):Qt(r,l,e,Go(t));return}if(t instanceof bn){ce(e)?Ho(r,l,e,t):Qt(r,l,e,Ko(t));return}if(t instanceof me){Qt(r,l,e,t);return}if(t instanceof wn){Uo(r,l,e,t);return}if(t instanceof xn){Do(r,l,e,t);return}if(t instanceof yn){zo(r,l,e,t);return}if(t instanceof vn){const c=[];for(let d=0;d<t.numberOfVertices;d++)c.push(t.getPointAt(d));yt(r,l,e,c,t.closed);return}if(t instanceof kn){s&&jo(r,l,e,t);return}if(t instanceof An){t.basePoint,t.unitDir;return}if(t instanceof Mn){t.basePoint,t.unitDir;return}if(t instanceof Bn){Q(r,l,e,[t.getPointAt(0),t.getPointAt(1),t.getPointAt(3),t.getPointAt(2)],!0);return}if(t instanceof Sn){s&&Q(r,l,e,[t.getPointAt(0),t.getPointAt(1),t.getPointAt(3),t.getPointAt(2)],!0);return}if(t instanceof Cn){const c=t.subGetGripPoints();c.length>=2&&yt(r,l,e,c,c.length>=3);return}if(t instanceof In){const c=t.vertices;c.length>=2&&yt(r,l,e,c,!1);return}if(t instanceof En){Eo(r,l,e,t);return}if(t instanceof Ln){Fo(r,l,e,t);return}if(t instanceof Fn){const c=L(e,t.position);r.push({kind:"point",layer:l,x:c.x,y:c.y});return}if(t instanceof zn){const c=L(e,t.location);r.push({kind:"point",layer:l,x:c.x,y:c.y});return}if(t instanceof Pn){s&&Yo(r,l,e,t);return}if(t instanceof Hn){s&&Xo(r,l,e,t);return}if(t instanceof Un){const c=L(e,t.position);r.push({kind:"point",layer:l,x:c.x,y:c.y})}}}function Ut(t,e,a,r,n,i,o,s=!0){for(const l of t.newIterator())hr(l,e,a,r,n,i,o,s)}function Go(t){return new me(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,0,Tn)}function Ko(t){return new me(t.center,t.normal,{x:1,y:0,z:0},t.radius,t.radius,t.startAngle,t.endAngle)}function Jo(t,e,a={}){const r=vo(t,e);if(!r)return{primitives:[]};const n=[],i=new ut;return Ut(r,i,"0",n,new Set,t,a.includeLayer),{primitives:n.filter(o=>o.kind!=="line"&&Zo(o))}}function Zo(t){switch(t.kind){case"line":return Number.isFinite(t.x0)&&Number.isFinite(t.y0)&&Number.isFinite(t.x1)&&Number.isFinite(t.y1);case"circle":return Number.isFinite(t.cx)&&Number.isFinite(t.cy)&&Number.isFinite(t.r);case"arc":return Number.isFinite(t.cx)&&Number.isFinite(t.cy)&&Number.isFinite(t.r)&&Number.isFinite(t.startAngle)&&Number.isFinite(t.endAngle);case"ellipse":return Number.isFinite(t.cx)&&Number.isFinite(t.cy)&&Number.isFinite(t.majorX)&&Number.isFinite(t.majorY)&&Number.isFinite(t.majorR)&&Number.isFinite(t.minorR)&&Number.isFinite(t.startAngle)&&Number.isFinite(t.endAngle);case"spline":return t.controlPoints.every(e=>Number.isFinite(e))&&t.knots.every(e=>Number.isFinite(e))&&t.weights.every(e=>Number.isFinite(e));case"point":return Number.isFinite(t.x)&&Number.isFinite(t.y);case"path":return t.vertices.length>=6&&t.vertices.length%3===0&&t.vertices.every(e=>Number.isFinite(e));default:return t}}const qo=["en","zh","ja","ko","cs","tr","ar"];function Ie(t){if(t==null||t==="")return null;const e=t.toLowerCase().replace("_","-");for(const a of qo)if(e===a||e.startsWith(`${a}-`))return a;return null}const Qo=1128612673;function gr(t){if(t.version!==Y)throw new Error(`Unsupported chunk version: ${t.version}`);const e=new be;e.writeU32(Qo),e.writeU8(Y),e.writeU8(0),e.writeU8(0),e.writeU8(0),e.writeString(t.layoutBtrId),e.writeU32(t.lineBatches.length);for(const a of t.lineBatches)Qa(e,a);e.writeU32(t.meshBatches.length);for(const a of t.meshBatches)tr(e,a);return e.toUint8Array()}async function ts(t){const e=gr(t),a=(await qa(e)).bytes;return{uncompressed:e,compressed:a}}const es=1,br=2*1024*1024,jt=2*1024*1024,as=8*1024*1024,Ba=12*1024*1024,rs=2*1024*1024,$t="drawing.acex.json",ns=`./${$t}`;function Ee(...t){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1024 1024">${t.map(e=>`<path fill="currentColor" d="${e}"/>`).join("")}</svg>`}Ee("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z");Ee("M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160");Ee("M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176","M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48");const is='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 13.5 14.5 9h-9L10 13.5Z"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 3.53 16.09 6.97 10.09 10.29 4.18 7 10.09 3.56M10.09 2.4 2.17 7 3.31 7.65 10.09 11.45 17 7.62 18.17 7 10.08 2.37 10.09 2.4Z"/><path fill="currentColor" d="M10.25 14.83 18.17 10.22 17 9.57 10.22 13.57 3.32 9.59 2.17 10.22 10.25 14.83Z"/><path fill="currentColor" d="M10.25 17.63 18.17 13 17 12.37 10.22 16.37 3.32 12.38 2.17 13 10.25 17.63Z"/></svg>',ss='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 5.15 16.09 8.59 10.09 11.91 4.18 8.59 10.09 5.15ZM10.09 4 2.17 8.61 3.31 9.25 10.09 13.06 17 9.24 18.16 8.61 10.08 4 10.09 4Z"/><path fill="currentColor" d="M10.25 16.46 18.17 11.85 17 11.2 10.22 15.2 3.32 11.21 2.17 11.85 10.25 16.46Z"/><path fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" d="M3.5 3.5 16.5 16.5"/></svg>',ue={layerOn:os,layerOff:ss,chevronDown:is},ls=[90,45,30,23,18,10,5];function cs(){return`<div id="mlcad-polar-angles" role="group" data-i18n-attr="aria-label" data-i18n-key="settings.polarAngles" aria-label="Polar tracking angles" hidden>
|
|
2
|
+
${ls.map(t=>`<button type="button" class="mlcad-tool-btn mlcad-settings-option-btn mlcad-polar-angle-btn" data-polar-ang="${t}" title="${t}°" aria-label="${t}°"><span class="mlcad-settings-option-indicator" aria-hidden="true"></span><span class="mlcad-settings-option-text">${t}°</span></button>`).join("")}
|
|
3
|
+
</div>`}const ds=600,us=960,ms=1.231,Le=`
|
|
4
|
+
:root {
|
|
5
|
+
--mlcad-ui-bg: rgba(24, 26, 30, 0.94);
|
|
6
|
+
--mlcad-ui-bg-elevated: rgba(32, 35, 40, 0.98);
|
|
7
|
+
--mlcad-ui-border: rgba(255, 255, 255, 0.1);
|
|
8
|
+
--mlcad-ui-text: #e8eaed;
|
|
9
|
+
--mlcad-ui-muted: #9aa0a6;
|
|
10
|
+
--mlcad-accent: #08e8de;
|
|
11
|
+
--mlcad-accent-active: #1a8cff;
|
|
12
|
+
/* Shared measure-tool SVGs read --el-color-primary (Element Plus in cad-viewer). */
|
|
13
|
+
--el-color-primary: var(--mlcad-accent);
|
|
14
|
+
--ml-ui-accent: var(--mlcad-accent);
|
|
15
|
+
--ml-ui-bg: var(--mlcad-ui-bg);
|
|
16
|
+
--ml-ui-bg-elevated: var(--mlcad-ui-bg-elevated);
|
|
17
|
+
--ml-ui-border: var(--mlcad-ui-border);
|
|
18
|
+
--ml-ui-text: var(--mlcad-ui-text);
|
|
19
|
+
--ml-ui-muted: var(--mlcad-ui-muted);
|
|
20
|
+
--mlcad-tool-btn-active-border: rgba(26, 140, 255, 0.55);
|
|
21
|
+
--mlcad-tool-btn-active-bg: rgba(26, 140, 255, 0.22);
|
|
22
|
+
--mlcad-measure-accent: #08e8de;
|
|
23
|
+
--mlcad-measure-accent-border: rgba(8, 232, 222, 0.45);
|
|
24
|
+
--mlcad-measure-accent-fill: rgba(8, 232, 222, 0.2);
|
|
25
|
+
--mlcad-markup-accent: #e53935;
|
|
26
|
+
--mlcad-markup-accent-border: rgba(229, 57, 53, 0.45);
|
|
27
|
+
--mlcad-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
|
|
28
|
+
--mlcad-toolbar-width: 44px;
|
|
29
|
+
--mlcad-drawer-width: 220px;
|
|
30
|
+
--mlcad-drawer-gap: 8px;
|
|
31
|
+
--mlcad-ui-inset: 12px;
|
|
32
|
+
--mlcad-review-max-height: calc(100vh - 2 * var(--mlcad-ui-inset) - 48px);
|
|
33
|
+
--mlcad-z-chrome: 7;
|
|
34
|
+
/* Drawing overlays stay under chrome, session panel, and modal dialogs. */
|
|
35
|
+
--mlcad-z-measure: 1;
|
|
36
|
+
--mlcad-z-markup: 2;
|
|
37
|
+
--ml-ui-grip-size: 8px;
|
|
38
|
+
--ml-ui-grip-normal: #0080ff;
|
|
39
|
+
--ml-ui-grip-hot: #ff0000;
|
|
40
|
+
}
|
|
41
|
+
html, body {
|
|
42
|
+
margin: 0; height: 100%; overflow: hidden;
|
|
43
|
+
background: #121418;
|
|
44
|
+
font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
45
|
+
color: var(--mlcad-ui-text);
|
|
46
|
+
}
|
|
47
|
+
#mlcad-root { position: relative; width: 100%; height: 100%; }
|
|
48
|
+
#mlcad-canvas-host {
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
min-height: 0;
|
|
53
|
+
-webkit-touch-callout: none;
|
|
54
|
+
-webkit-tap-highlight-color: transparent;
|
|
55
|
+
}
|
|
56
|
+
#mlcad-canvas-host canvas,
|
|
57
|
+
#mlcad-root > canvas {
|
|
58
|
+
display: block;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
touch-action: none;
|
|
62
|
+
-webkit-user-select: none;
|
|
63
|
+
user-select: none;
|
|
64
|
+
-webkit-touch-callout: none;
|
|
65
|
+
-webkit-tap-highlight-color: transparent;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mlcad-snap-loupe {
|
|
69
|
+
position: absolute;
|
|
70
|
+
left: 8px;
|
|
71
|
+
top: 8px;
|
|
72
|
+
width: 128px;
|
|
73
|
+
height: 128px;
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
border: 2px solid var(--mlcad-measure-accent, #08e8de);
|
|
76
|
+
border-radius: 2px;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
z-index: 8;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
box-shadow: var(--mlcad-shadow);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
html[data-mlcad-theme="light"] {
|
|
84
|
+
--mlcad-ui-bg: rgba(255, 255, 255, 0.94);
|
|
85
|
+
--mlcad-ui-bg-elevated: rgba(248, 249, 250, 0.98);
|
|
86
|
+
--mlcad-ui-border: rgba(0, 0, 0, 0.12);
|
|
87
|
+
--mlcad-ui-text: #202124;
|
|
88
|
+
--mlcad-ui-muted: #5f6368;
|
|
89
|
+
--mlcad-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
|
|
90
|
+
}
|
|
91
|
+
html[data-mlcad-theme="light"],
|
|
92
|
+
html[data-mlcad-theme="light"] body {
|
|
93
|
+
background: #e8eaed;
|
|
94
|
+
color: var(--mlcad-ui-text);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
#mlcad-sidebar {
|
|
98
|
+
position: absolute;
|
|
99
|
+
left: var(--mlcad-ui-inset);
|
|
100
|
+
top: 50%;
|
|
101
|
+
z-index: var(--mlcad-z-chrome);
|
|
102
|
+
transform: translateY(-50%);
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: flex-start;
|
|
105
|
+
gap: var(--mlcad-drawer-gap);
|
|
106
|
+
max-width: calc(100% - 2 * var(--mlcad-ui-inset));
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
pointer-events: none;
|
|
109
|
+
}
|
|
110
|
+
#mlcad-sidebar > * { pointer-events: auto; }
|
|
111
|
+
|
|
112
|
+
#mlcad-toolbar {
|
|
113
|
+
flex-shrink: 0;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
align-items: stretch;
|
|
117
|
+
padding: 0;
|
|
118
|
+
background: transparent;
|
|
119
|
+
border: none;
|
|
120
|
+
border-radius: 0;
|
|
121
|
+
box-shadow: none;
|
|
122
|
+
backdrop-filter: none;
|
|
123
|
+
}
|
|
124
|
+
/* AcUiToolbar chrome replaces the old .mlcad-tool-btn shell styles. */
|
|
125
|
+
#mlcad-toolbar .ml-ex-ui-toolbar {
|
|
126
|
+
position: relative !important;
|
|
127
|
+
inset: auto !important;
|
|
128
|
+
left: auto !important;
|
|
129
|
+
top: auto !important;
|
|
130
|
+
right: auto !important;
|
|
131
|
+
bottom: auto !important;
|
|
132
|
+
transform: none !important;
|
|
133
|
+
background: var(--mlcad-ui-bg);
|
|
134
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
box-shadow: var(--mlcad-shadow);
|
|
137
|
+
backdrop-filter: blur(12px);
|
|
138
|
+
--ml-ex-ui-toolbar-btn-size: var(--mlcad-toolbar-width);
|
|
139
|
+
}
|
|
140
|
+
#mlcad-toolbar .ml-ex-ui-toolbar.is-left,
|
|
141
|
+
#mlcad-toolbar .ml-ex-ui-toolbar.is-right {
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
}
|
|
144
|
+
#mlcad-toolbar .ml-ex-ui-toolbar.is-bottom,
|
|
145
|
+
#mlcad-toolbar .ml-ex-ui-toolbar.is-top {
|
|
146
|
+
flex-direction: row;
|
|
147
|
+
width: 100%;
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
}
|
|
150
|
+
#mlcad-sidebar > #mlcad-toolbar.ml-ex-ui-toolbar-host {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
align-items: stretch;
|
|
154
|
+
}
|
|
155
|
+
/* Phone strips mount on #mlcad-root so they can sit above the bottom bar. */
|
|
156
|
+
#mlcad-root > .ml-ex-ui-subtoolbar {
|
|
157
|
+
z-index: calc(var(--mlcad-z-chrome) + 1);
|
|
158
|
+
}
|
|
159
|
+
.mlcad-tool-btn {
|
|
160
|
+
position: relative;
|
|
161
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
162
|
+
gap: 2px;
|
|
163
|
+
width: var(--mlcad-toolbar-width); height: var(--mlcad-toolbar-width);
|
|
164
|
+
margin: 0; padding: 0;
|
|
165
|
+
border: 1px solid transparent;
|
|
166
|
+
border-radius: 6px;
|
|
167
|
+
background: transparent;
|
|
168
|
+
color: var(--mlcad-ui-text);
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
|
|
171
|
+
}
|
|
172
|
+
.mlcad-tool-btn:hover {
|
|
173
|
+
background: rgba(255, 255, 255, 0.08);
|
|
174
|
+
border-color: var(--mlcad-ui-border);
|
|
175
|
+
}
|
|
176
|
+
.mlcad-tool-btn.active,
|
|
177
|
+
.mlcad-tool-btn.is-menu-open {
|
|
178
|
+
background: var(--mlcad-tool-btn-active-bg);
|
|
179
|
+
border-color: var(--mlcad-tool-btn-active-border);
|
|
180
|
+
color: #fff;
|
|
181
|
+
}
|
|
182
|
+
.mlcad-tool-btn-icon {
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
width: 20px;
|
|
187
|
+
height: 20px;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
}
|
|
190
|
+
.mlcad-tool-btn-icon svg,
|
|
191
|
+
.mlcad-tool-btn svg {
|
|
192
|
+
width: 20px; height: 20px; display: block; flex-shrink: 0;
|
|
193
|
+
}
|
|
194
|
+
.mlcad-tool-btn-label {
|
|
195
|
+
display: none;
|
|
196
|
+
max-width: 100%;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
font-size: 10px;
|
|
201
|
+
line-height: 1.2;
|
|
202
|
+
text-align: center;
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
}
|
|
205
|
+
/* Settings is always on the bar (desktop/pad/phone); language lives under it. */
|
|
206
|
+
/* Flyout mark: opaque corner triangle (cad-simple-ui-plugin is-left style). */
|
|
207
|
+
.mlcad-tool-btn.has-children::after {
|
|
208
|
+
content: '';
|
|
209
|
+
position: absolute;
|
|
210
|
+
right: 1px;
|
|
211
|
+
bottom: 1px;
|
|
212
|
+
width: 6px;
|
|
213
|
+
height: 6px;
|
|
214
|
+
background: currentColor;
|
|
215
|
+
clip-path: polygon(100% 100%, 0 100%, 100% 0);
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
}
|
|
218
|
+
.mlcad-dropdown {
|
|
219
|
+
position: fixed;
|
|
220
|
+
z-index: 40;
|
|
221
|
+
min-width: 180px;
|
|
222
|
+
max-width: min(280px, calc(100vw - 24px));
|
|
223
|
+
max-height: min(360px, calc(100vh - 24px));
|
|
224
|
+
overflow-y: auto;
|
|
225
|
+
padding: 4px;
|
|
226
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
227
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
228
|
+
border-radius: 8px;
|
|
229
|
+
box-shadow: var(--mlcad-shadow);
|
|
230
|
+
backdrop-filter: blur(12px);
|
|
231
|
+
}
|
|
232
|
+
.mlcad-dropdown-item {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: 8px;
|
|
236
|
+
width: 100%;
|
|
237
|
+
box-sizing: border-box;
|
|
238
|
+
margin: 0;
|
|
239
|
+
padding: 6px 8px;
|
|
240
|
+
border: none;
|
|
241
|
+
border-radius: 5px;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: var(--mlcad-ui-text);
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
font-weight: 500;
|
|
246
|
+
text-align: left;
|
|
247
|
+
cursor: pointer;
|
|
248
|
+
}
|
|
249
|
+
.mlcad-dropdown-item:hover {
|
|
250
|
+
background: rgba(255, 255, 255, 0.08);
|
|
251
|
+
}
|
|
252
|
+
.mlcad-dropdown-item.active,
|
|
253
|
+
.mlcad-dropdown-item.is-toggled {
|
|
254
|
+
background: rgba(26, 140, 255, 0.22);
|
|
255
|
+
color: #fff;
|
|
256
|
+
}
|
|
257
|
+
.mlcad-dropdown-icon {
|
|
258
|
+
display: inline-flex;
|
|
259
|
+
width: 18px;
|
|
260
|
+
height: 18px;
|
|
261
|
+
flex-shrink: 0;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
}
|
|
265
|
+
.mlcad-dropdown-icon svg {
|
|
266
|
+
width: 18px;
|
|
267
|
+
height: 18px;
|
|
268
|
+
display: block;
|
|
269
|
+
}
|
|
270
|
+
.mlcad-dropdown-label {
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
text-overflow: ellipsis;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
}
|
|
275
|
+
.mlcad-dropdown-separator {
|
|
276
|
+
height: 1px;
|
|
277
|
+
margin: 4px 6px;
|
|
278
|
+
background: var(--mlcad-ui-border);
|
|
279
|
+
}
|
|
280
|
+
#mlcad-toolbar-toggle {
|
|
281
|
+
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
282
|
+
margin-top: -4px;
|
|
283
|
+
margin-bottom: -4px;
|
|
284
|
+
border-radius: 4px;
|
|
285
|
+
}
|
|
286
|
+
#mlcad-toolbar-toggle svg {
|
|
287
|
+
width: calc(var(--mlcad-toolbar-width) / 2);
|
|
288
|
+
height: calc(var(--mlcad-toolbar-width) / 2);
|
|
289
|
+
}
|
|
290
|
+
.mlcad-tool-separator {
|
|
291
|
+
height: 1px;
|
|
292
|
+
margin: 4px 8px;
|
|
293
|
+
background: var(--mlcad-ui-border);
|
|
294
|
+
}
|
|
295
|
+
.mlcad-locale-option-badge {
|
|
296
|
+
display: inline-flex;
|
|
297
|
+
align-items: center;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
width: 100%;
|
|
300
|
+
height: 100%;
|
|
301
|
+
font-size: 12px;
|
|
302
|
+
font-weight: 700;
|
|
303
|
+
line-height: 1;
|
|
304
|
+
letter-spacing: -0.04em;
|
|
305
|
+
user-select: none;
|
|
306
|
+
}
|
|
307
|
+
#mlcad-zoom-window-rect,
|
|
308
|
+
#mlcad-selection-rect {
|
|
309
|
+
position: fixed;
|
|
310
|
+
z-index: 25;
|
|
311
|
+
box-sizing: border-box;
|
|
312
|
+
pointer-events: none;
|
|
313
|
+
border: 1px dashed var(--mlcad-accent, #08e8de);
|
|
314
|
+
background: rgba(8, 232, 222, 0.12);
|
|
315
|
+
}
|
|
316
|
+
#mlcad-zoom-window-rect[hidden],
|
|
317
|
+
#mlcad-selection-rect[hidden] { display: none; }
|
|
318
|
+
#mlcad-selection-rect[data-mode='window'] {
|
|
319
|
+
border-style: solid;
|
|
320
|
+
border-color: #00ff5a;
|
|
321
|
+
background: rgba(64, 158, 255, 0.12);
|
|
322
|
+
}
|
|
323
|
+
#mlcad-selection-rect[data-mode='crossing'] {
|
|
324
|
+
border-style: dashed;
|
|
325
|
+
border-color: #00d1ff;
|
|
326
|
+
background: rgba(64, 158, 255, 0.12);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
#mlcad-layer-drawer,
|
|
330
|
+
#mlcad-review-drawer,
|
|
331
|
+
#mlcad-measure-drawer {
|
|
332
|
+
flex-shrink: 1;
|
|
333
|
+
min-width: 0;
|
|
334
|
+
width: var(--mlcad-drawer-width);
|
|
335
|
+
max-height: min(420px, var(--mlcad-review-max-height));
|
|
336
|
+
display: flex; flex-direction: column;
|
|
337
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
338
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
339
|
+
border-radius: 8px;
|
|
340
|
+
box-shadow: var(--mlcad-shadow);
|
|
341
|
+
backdrop-filter: blur(12px);
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
box-sizing: border-box;
|
|
344
|
+
}
|
|
345
|
+
#mlcad-markup-strip-wrap {
|
|
346
|
+
position: relative;
|
|
347
|
+
}
|
|
348
|
+
#mlcad-review-drawer {
|
|
349
|
+
position: absolute;
|
|
350
|
+
left: 100%;
|
|
351
|
+
top: 0;
|
|
352
|
+
margin-left: var(--mlcad-drawer-gap);
|
|
353
|
+
width: min(320px, calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap)));
|
|
354
|
+
height: 100%;
|
|
355
|
+
max-height: var(--mlcad-review-max-height);
|
|
356
|
+
}
|
|
357
|
+
#mlcad-layer-drawer[hidden],
|
|
358
|
+
#mlcad-review-drawer[hidden],
|
|
359
|
+
#mlcad-measure-drawer[hidden] { display: none; }
|
|
360
|
+
|
|
361
|
+
.mlcad-drawer-header {
|
|
362
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
363
|
+
gap: 6px; padding: 8px 10px;
|
|
364
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
365
|
+
font-size: 13px; font-weight: 600;
|
|
366
|
+
}
|
|
367
|
+
.mlcad-drawer-close {
|
|
368
|
+
width: 28px; height: 28px; padding: 0;
|
|
369
|
+
border: none; border-radius: 4px;
|
|
370
|
+
background: transparent; color: var(--mlcad-ui-muted);
|
|
371
|
+
cursor: pointer; font-size: 18px; line-height: 1;
|
|
372
|
+
}
|
|
373
|
+
.mlcad-drawer-close:hover {
|
|
374
|
+
background: rgba(255, 255, 255, 0.08); color: var(--mlcad-ui-text);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.mlcad-drawer-sheet-chrome {
|
|
378
|
+
display: none;
|
|
379
|
+
position: relative;
|
|
380
|
+
}
|
|
381
|
+
.mlcad-drawer-grabber {
|
|
382
|
+
flex: 1 1 auto;
|
|
383
|
+
display: flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
justify-content: center;
|
|
386
|
+
min-height: 20px;
|
|
387
|
+
cursor: ns-resize;
|
|
388
|
+
touch-action: none;
|
|
389
|
+
}
|
|
390
|
+
.mlcad-drawer-grabber::before {
|
|
391
|
+
content: '';
|
|
392
|
+
position: absolute;
|
|
393
|
+
left: 50%;
|
|
394
|
+
top: 50%;
|
|
395
|
+
transform: translate(-50%, -50%);
|
|
396
|
+
width: 36px;
|
|
397
|
+
height: 4px;
|
|
398
|
+
border-radius: 2px;
|
|
399
|
+
background: var(--mlcad-ui-muted);
|
|
400
|
+
opacity: 0.75;
|
|
401
|
+
}
|
|
402
|
+
.mlcad-drawer-sheet-close {
|
|
403
|
+
width: 36px; height: 28px; padding: 0;
|
|
404
|
+
border: none; background: transparent;
|
|
405
|
+
color: var(--mlcad-ui-muted); cursor: pointer;
|
|
406
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
407
|
+
flex: 0 0 auto;
|
|
408
|
+
position: relative;
|
|
409
|
+
z-index: 1;
|
|
410
|
+
}
|
|
411
|
+
.mlcad-drawer-sheet-close:hover { color: var(--mlcad-ui-text); }
|
|
412
|
+
.mlcad-drawer-sheet-close svg { width: 18px; height: 18px; }
|
|
413
|
+
|
|
414
|
+
.mlcad-layer-actions {
|
|
415
|
+
display: flex; gap: 4px; padding: 6px 8px;
|
|
416
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
417
|
+
}
|
|
418
|
+
.mlcad-layer-action-btn {
|
|
419
|
+
flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
420
|
+
min-height: 30px; padding: 4px 8px;
|
|
421
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
422
|
+
border-radius: 5px;
|
|
423
|
+
background: rgba(255, 255, 255, 0.04);
|
|
424
|
+
color: var(--mlcad-ui-text);
|
|
425
|
+
font-size: 12px; cursor: pointer;
|
|
426
|
+
}
|
|
427
|
+
.mlcad-layer-action-btn:hover { background: rgba(255, 255, 255, 0.1); }
|
|
428
|
+
.mlcad-layer-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
429
|
+
|
|
430
|
+
#mlcad-layer-list {
|
|
431
|
+
flex: 1; overflow: auto; padding: 4px 0;
|
|
432
|
+
}
|
|
433
|
+
.mlcad-layer-item {
|
|
434
|
+
display: grid;
|
|
435
|
+
grid-template-columns: auto auto 1fr auto;
|
|
436
|
+
align-items: center; gap: 6px;
|
|
437
|
+
padding: 5px 8px;
|
|
438
|
+
font-size: 12px; cursor: pointer;
|
|
439
|
+
}
|
|
440
|
+
.mlcad-layer-item:hover { background: rgba(255, 255, 255, 0.05); }
|
|
441
|
+
.mlcad-layer-item input { margin: 0; cursor: pointer; }
|
|
442
|
+
.mlcad-layer-swatch {
|
|
443
|
+
width: 12px; height: 12px; border-radius: 2px;
|
|
444
|
+
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
445
|
+
}
|
|
446
|
+
.mlcad-layer-name {
|
|
447
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
448
|
+
}
|
|
449
|
+
.mlcad-layer-zoom {
|
|
450
|
+
display: flex; align-items: center; justify-content: center;
|
|
451
|
+
width: 22px; height: 22px; padding: 0;
|
|
452
|
+
border: 1px solid transparent; border-radius: 4px;
|
|
453
|
+
background: transparent; color: var(--mlcad-ui-muted);
|
|
454
|
+
cursor: pointer;
|
|
455
|
+
}
|
|
456
|
+
.mlcad-layer-zoom svg {
|
|
457
|
+
width: 14px; height: 14px; display: block;
|
|
458
|
+
}
|
|
459
|
+
.mlcad-layer-zoom:hover:not(:disabled) {
|
|
460
|
+
color: var(--mlcad-accent);
|
|
461
|
+
border-color: var(--mlcad-ui-border);
|
|
462
|
+
background: rgba(255, 255, 255, 0.06);
|
|
463
|
+
}
|
|
464
|
+
.mlcad-layer-zoom:disabled { opacity: 0.35; cursor: not-allowed; }
|
|
465
|
+
|
|
466
|
+
.mlcad-review-toolbar {
|
|
467
|
+
display: flex; gap: 6px; align-items: center;
|
|
468
|
+
padding: 6px 8px;
|
|
469
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
470
|
+
}
|
|
471
|
+
.mlcad-review-search {
|
|
472
|
+
flex: 1; min-width: 0;
|
|
473
|
+
box-sizing: border-box;
|
|
474
|
+
padding: 4px 8px;
|
|
475
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
476
|
+
border-radius: 4px;
|
|
477
|
+
background: rgba(255, 255, 255, 0.04);
|
|
478
|
+
color: var(--mlcad-ui-text);
|
|
479
|
+
font-size: 12px;
|
|
480
|
+
}
|
|
481
|
+
.mlcad-review-clear,
|
|
482
|
+
.mlcad-review-zoom,
|
|
483
|
+
.mlcad-review-delete {
|
|
484
|
+
flex: 0 0 auto;
|
|
485
|
+
padding: 4px 8px;
|
|
486
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
487
|
+
border-radius: 4px;
|
|
488
|
+
background: rgba(255, 255, 255, 0.04);
|
|
489
|
+
color: var(--mlcad-ui-text);
|
|
490
|
+
font-size: 12px; cursor: pointer;
|
|
491
|
+
}
|
|
492
|
+
.mlcad-review-clear:disabled { opacity: 0.5; cursor: default; }
|
|
493
|
+
.mlcad-review-delete { color: #f56c6c; border-color: rgba(245, 108, 108, 0.55); }
|
|
494
|
+
.mlcad-review-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
495
|
+
.mlcad-review-table {
|
|
496
|
+
width: 100%; border-collapse: collapse; font-size: 12px;
|
|
497
|
+
}
|
|
498
|
+
.mlcad-review-table th,
|
|
499
|
+
.mlcad-review-table td {
|
|
500
|
+
padding: 4px 8px; text-align: left;
|
|
501
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
502
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
503
|
+
max-width: 90px;
|
|
504
|
+
}
|
|
505
|
+
.mlcad-review-table tr.is-selected td {
|
|
506
|
+
background: rgba(26, 140, 255, 0.22);
|
|
507
|
+
}
|
|
508
|
+
.mlcad-review-table tr { cursor: pointer; }
|
|
509
|
+
.mlcad-review-empty td { text-align: center; color: var(--mlcad-ui-muted); cursor: default; }
|
|
510
|
+
.mlcad-review-detail {
|
|
511
|
+
flex: 0 1 auto;
|
|
512
|
+
max-height: 52%;
|
|
513
|
+
overflow: auto;
|
|
514
|
+
border-top: 1px solid var(--mlcad-ui-border);
|
|
515
|
+
padding: 8px 10px 14px;
|
|
516
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
517
|
+
box-sizing: border-box;
|
|
518
|
+
}
|
|
519
|
+
.mlcad-review-detail[hidden] { display: none; }
|
|
520
|
+
.mlcad-review-detail-header {
|
|
521
|
+
display: flex; align-items: center; justify-content: space-between; gap: 4px;
|
|
522
|
+
}
|
|
523
|
+
.mlcad-review-detail-title { font-weight: 600; font-size: 12px; }
|
|
524
|
+
.mlcad-review-detail-close {
|
|
525
|
+
flex-shrink: 0;
|
|
526
|
+
width: 24px; height: 24px; padding: 0;
|
|
527
|
+
border: none; border-radius: 4px;
|
|
528
|
+
background: transparent; color: var(--mlcad-ui-muted);
|
|
529
|
+
cursor: pointer; font-size: 16px; line-height: 1;
|
|
530
|
+
}
|
|
531
|
+
.mlcad-review-detail-close:hover {
|
|
532
|
+
background: rgba(255, 255, 255, 0.08); color: var(--mlcad-ui-text);
|
|
533
|
+
}
|
|
534
|
+
.mlcad-review-field { display: flex; flex-direction: column; gap: 2px; }
|
|
535
|
+
.mlcad-review-field-label { font-size: 11px; color: var(--mlcad-ui-muted); }
|
|
536
|
+
.mlcad-review-status,
|
|
537
|
+
.mlcad-review-author,
|
|
538
|
+
.mlcad-review-text,
|
|
539
|
+
.mlcad-review-comment {
|
|
540
|
+
box-sizing: border-box; width: 100%;
|
|
541
|
+
padding: 4px 6px;
|
|
542
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
543
|
+
border-radius: 4px;
|
|
544
|
+
background: rgba(255, 255, 255, 0.04);
|
|
545
|
+
color: var(--mlcad-ui-text);
|
|
546
|
+
font-size: 12px;
|
|
547
|
+
}
|
|
548
|
+
.mlcad-review-author:disabled { opacity: 0.7; }
|
|
549
|
+
.mlcad-review-comment { min-height: 44px; resize: vertical; }
|
|
550
|
+
.mlcad-review-detail-actions { display: flex; gap: 6px; margin-top: 2px; }
|
|
551
|
+
|
|
552
|
+
.mlcad-measure-toolbar {
|
|
553
|
+
display: flex; gap: 8px; align-items: center;
|
|
554
|
+
padding: 8px 10px; border-bottom: 1px solid var(--mlcad-ui-border);
|
|
555
|
+
}
|
|
556
|
+
.mlcad-measure-filter {
|
|
557
|
+
flex: 1 1 auto; min-width: 0;
|
|
558
|
+
display: flex; overflow: hidden;
|
|
559
|
+
border: 1px solid var(--mlcad-ui-border); border-radius: 4px;
|
|
560
|
+
}
|
|
561
|
+
.mlcad-measure-filter-btn {
|
|
562
|
+
flex: 1 1 0; min-width: 0; padding: 4px 2px;
|
|
563
|
+
border: none; border-right: 1px solid var(--mlcad-ui-border);
|
|
564
|
+
background: transparent; color: var(--mlcad-ui-text);
|
|
565
|
+
font: inherit; font-size: 11px; cursor: pointer;
|
|
566
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
567
|
+
}
|
|
568
|
+
.mlcad-measure-filter-btn:last-child { border-right: none; }
|
|
569
|
+
.mlcad-measure-filter-btn:hover:not(.is-active) {
|
|
570
|
+
background: rgba(255, 255, 255, 0.06);
|
|
571
|
+
}
|
|
572
|
+
.mlcad-measure-filter-btn.is-active {
|
|
573
|
+
background: rgba(8, 232, 222, 0.18);
|
|
574
|
+
}
|
|
575
|
+
.mlcad-measure-clear,
|
|
576
|
+
.mlcad-measure-row-delete {
|
|
577
|
+
border: 1px solid var(--mlcad-ui-border); border-radius: 4px;
|
|
578
|
+
background: rgba(255, 255, 255, 0.04); color: var(--mlcad-ui-text);
|
|
579
|
+
padding: 4px 8px; font-size: 12px; cursor: pointer;
|
|
580
|
+
}
|
|
581
|
+
.mlcad-measure-clear:disabled { opacity: 0.5; cursor: default; }
|
|
582
|
+
.mlcad-measure-row-delete { color: #f56c6c; border-color: rgba(245, 108, 108, 0.55); padding: 2px 6px; font-size: 11px; }
|
|
583
|
+
.mlcad-measure-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
584
|
+
.mlcad-measure-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
|
585
|
+
.mlcad-measure-table th,
|
|
586
|
+
.mlcad-measure-table td {
|
|
587
|
+
padding: 6px 8px; text-align: left; font-size: 12px;
|
|
588
|
+
border-bottom: 1px solid var(--mlcad-ui-border);
|
|
589
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
590
|
+
}
|
|
591
|
+
.mlcad-measure-table tr.is-selected td {
|
|
592
|
+
background: rgba(8, 232, 222, 0.12);
|
|
593
|
+
}
|
|
594
|
+
.mlcad-measure-table tr { cursor: pointer; }
|
|
595
|
+
.mlcad-measure-empty td { text-align: center; color: var(--mlcad-ui-muted); cursor: default; }
|
|
596
|
+
#mlcad-measure-strip-wrap { position: relative; }
|
|
597
|
+
#mlcad-measure-drawer {
|
|
598
|
+
position: absolute;
|
|
599
|
+
left: 100%;
|
|
600
|
+
top: 0;
|
|
601
|
+
margin-left: var(--mlcad-drawer-gap);
|
|
602
|
+
width: min(320px, calc(100vw - 2 * var(--mlcad-ui-inset) - var(--mlcad-toolbar-width) - var(--mlcad-drawer-gap)));
|
|
603
|
+
height: 100%;
|
|
604
|
+
max-height: var(--mlcad-review-max-height);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/*
|
|
608
|
+
* Top canvas chrome: message bar + expiry share one row. Shortcut toolbar
|
|
609
|
+
* and snap loupe stack below (see AcExHtmlTopChrome / ShortCutToolbar /
|
|
610
|
+
* SnapLoupeMath).
|
|
611
|
+
*/
|
|
612
|
+
#mlcad-top-chrome {
|
|
613
|
+
position: absolute;
|
|
614
|
+
left: 12px;
|
|
615
|
+
right: 12px;
|
|
616
|
+
top: 10px;
|
|
617
|
+
z-index: var(--mlcad-z-chrome);
|
|
618
|
+
display: flex;
|
|
619
|
+
align-items: flex-start;
|
|
620
|
+
gap: 8px;
|
|
621
|
+
box-sizing: border-box;
|
|
622
|
+
pointer-events: none;
|
|
623
|
+
}
|
|
624
|
+
#mlcad-status-bar {
|
|
625
|
+
position: relative;
|
|
626
|
+
flex: 1 1 auto;
|
|
627
|
+
min-width: 0;
|
|
628
|
+
/* Block layout so text-overflow: ellipsis works on direct textContent. */
|
|
629
|
+
display: block;
|
|
630
|
+
min-height: 28px;
|
|
631
|
+
line-height: 28px;
|
|
632
|
+
padding: 0 12px;
|
|
633
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
634
|
+
border-radius: 6px;
|
|
635
|
+
background: var(--mlcad-accent);
|
|
636
|
+
color: #0b1f1e;
|
|
637
|
+
font-size: 12px;
|
|
638
|
+
font-weight: 600;
|
|
639
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
|
|
640
|
+
backdrop-filter: blur(10px);
|
|
641
|
+
pointer-events: none;
|
|
642
|
+
opacity: 1;
|
|
643
|
+
transform: translateY(0);
|
|
644
|
+
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
645
|
+
/* Shrink before the expiry badge; clip with an ellipsis when too narrow. */
|
|
646
|
+
overflow: hidden;
|
|
647
|
+
white-space: nowrap;
|
|
648
|
+
text-overflow: ellipsis;
|
|
649
|
+
}
|
|
650
|
+
#mlcad-status-bar:empty,
|
|
651
|
+
#mlcad-status-bar[hidden] {
|
|
652
|
+
display: none;
|
|
653
|
+
opacity: 0;
|
|
654
|
+
transform: translateY(-6px);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/* Session panel DOM/CSS comes from shared AcUiMobileSessionPanel. */
|
|
658
|
+
#mlcad-root {
|
|
659
|
+
--ml-mobile-cmd-collapsed-height: var(--mlcad-toolbar-phone-height, 56px);
|
|
660
|
+
}
|
|
661
|
+
.ml-mobile-cmd-panel {
|
|
662
|
+
z-index: calc(var(--mlcad-z-chrome) + 3);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-snap-strip-wrap,
|
|
666
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-measure-strip-wrap,
|
|
667
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-markup-strip-wrap,
|
|
668
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-zoom-strip-wrap,
|
|
669
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-settings-strip-wrap,
|
|
670
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-locale-strip-wrap,
|
|
671
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-layer-drawer,
|
|
672
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-review-drawer,
|
|
673
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-measure-drawer {
|
|
674
|
+
display: none !important;
|
|
675
|
+
}
|
|
676
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-btn:not(#mlcad-toolbar-toggle) {
|
|
677
|
+
display: none;
|
|
678
|
+
}
|
|
679
|
+
#mlcad-sidebar.mlcad-sidebar--collapsed #mlcad-toolbar .mlcad-tool-separator {
|
|
680
|
+
display: none;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
#mlcad-snap-strip-wrap,
|
|
684
|
+
#mlcad-measure-strip-wrap,
|
|
685
|
+
#mlcad-markup-strip-wrap,
|
|
686
|
+
#mlcad-zoom-strip-wrap,
|
|
687
|
+
#mlcad-settings-strip-wrap,
|
|
688
|
+
#mlcad-locale-strip-wrap {
|
|
689
|
+
flex-shrink: 0;
|
|
690
|
+
min-width: 0;
|
|
691
|
+
display: flex;
|
|
692
|
+
flex-direction: row;
|
|
693
|
+
align-items: flex-start;
|
|
694
|
+
gap: var(--mlcad-drawer-gap);
|
|
695
|
+
}
|
|
696
|
+
#mlcad-snap-strip-wrap[hidden],
|
|
697
|
+
#mlcad-measure-strip-wrap[hidden],
|
|
698
|
+
#mlcad-markup-strip-wrap[hidden],
|
|
699
|
+
#mlcad-zoom-strip-wrap[hidden],
|
|
700
|
+
#mlcad-settings-strip-wrap[hidden],
|
|
701
|
+
#mlcad-locale-strip-wrap[hidden] { display: none; }
|
|
702
|
+
|
|
703
|
+
#mlcad-snap-strip,
|
|
704
|
+
#mlcad-measure-strip,
|
|
705
|
+
#mlcad-markup-strip,
|
|
706
|
+
#mlcad-zoom-strip,
|
|
707
|
+
#mlcad-settings-strip,
|
|
708
|
+
#mlcad-locale-strip {
|
|
709
|
+
flex-shrink: 0;
|
|
710
|
+
display: flex;
|
|
711
|
+
flex-direction: column;
|
|
712
|
+
align-items: stretch;
|
|
713
|
+
gap: 4px;
|
|
714
|
+
padding: 6px;
|
|
715
|
+
background: var(--mlcad-ui-bg);
|
|
716
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
717
|
+
border-radius: 8px;
|
|
718
|
+
box-shadow: var(--mlcad-shadow);
|
|
719
|
+
backdrop-filter: blur(12px);
|
|
720
|
+
}
|
|
721
|
+
/* Pad/desktop: same button size as the parent bar so a vertical strip
|
|
722
|
+
matches its width and a horizontal strip matches its height. */
|
|
723
|
+
#mlcad-snap-strip .mlcad-tool-btn,
|
|
724
|
+
#mlcad-measure-strip .mlcad-tool-btn,
|
|
725
|
+
#mlcad-markup-strip .mlcad-tool-btn,
|
|
726
|
+
#mlcad-zoom-strip .mlcad-tool-btn,
|
|
727
|
+
#mlcad-settings-strip .mlcad-tool-btn,
|
|
728
|
+
#mlcad-locale-strip .mlcad-tool-btn {
|
|
729
|
+
width: var(--mlcad-toolbar-width);
|
|
730
|
+
height: var(--mlcad-toolbar-width);
|
|
731
|
+
}
|
|
732
|
+
#mlcad-measure-strip .mlcad-tool-separator,
|
|
733
|
+
#mlcad-markup-strip .mlcad-tool-separator {
|
|
734
|
+
margin: 2px 4px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
#mlcad-polar-angles {
|
|
738
|
+
flex-shrink: 0;
|
|
739
|
+
display: inline-flex;
|
|
740
|
+
flex-direction: column;
|
|
741
|
+
align-items: stretch;
|
|
742
|
+
gap: 4px;
|
|
743
|
+
padding: 6px;
|
|
744
|
+
max-width: min(280px, calc(100vw - 2 * var(--mlcad-ui-inset) - 3 * var(--mlcad-toolbar-width) - 3 * var(--mlcad-drawer-gap)));
|
|
745
|
+
background: var(--mlcad-ui-bg);
|
|
746
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
747
|
+
border-radius: 8px;
|
|
748
|
+
box-shadow: var(--mlcad-shadow);
|
|
749
|
+
backdrop-filter: blur(12px);
|
|
750
|
+
}
|
|
751
|
+
#mlcad-polar-angles[hidden] { display: none; }
|
|
752
|
+
|
|
753
|
+
.mlcad-color-input {
|
|
754
|
+
position: absolute;
|
|
755
|
+
width: 0;
|
|
756
|
+
height: 0;
|
|
757
|
+
opacity: 0;
|
|
758
|
+
pointer-events: none;
|
|
759
|
+
}
|
|
760
|
+
.mlcad-settings-option-btn {
|
|
761
|
+
width: 100%;
|
|
762
|
+
box-sizing: border-box;
|
|
763
|
+
height: var(--mlcad-toolbar-width);
|
|
764
|
+
justify-content: flex-start;
|
|
765
|
+
gap: 8px;
|
|
766
|
+
padding: 0 10px;
|
|
767
|
+
font-size: 11px;
|
|
768
|
+
font-weight: 500;
|
|
769
|
+
}
|
|
770
|
+
.mlcad-settings-option-indicator {
|
|
771
|
+
flex-shrink: 0;
|
|
772
|
+
width: 10px;
|
|
773
|
+
height: 10px;
|
|
774
|
+
border: 1px solid var(--mlcad-ui-muted);
|
|
775
|
+
border-radius: 2px;
|
|
776
|
+
box-sizing: border-box;
|
|
777
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
778
|
+
}
|
|
779
|
+
.mlcad-settings-option-btn.active .mlcad-settings-option-indicator {
|
|
780
|
+
background: var(--mlcad-accent);
|
|
781
|
+
border-color: var(--mlcad-accent);
|
|
782
|
+
}
|
|
783
|
+
.mlcad-settings-option-text {
|
|
784
|
+
overflow: hidden;
|
|
785
|
+
text-overflow: ellipsis;
|
|
786
|
+
white-space: nowrap;
|
|
787
|
+
pointer-events: none;
|
|
788
|
+
line-height: 1.2;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
#mlcad-measure-overlays {
|
|
792
|
+
position: absolute;
|
|
793
|
+
inset: 0;
|
|
794
|
+
pointer-events: none;
|
|
795
|
+
z-index: var(--mlcad-z-measure);
|
|
796
|
+
overflow: hidden;
|
|
797
|
+
}
|
|
798
|
+
.mlcad-measure-canvas {
|
|
799
|
+
position: absolute;
|
|
800
|
+
left: 0;
|
|
801
|
+
top: 0;
|
|
802
|
+
z-index: 1;
|
|
803
|
+
pointer-events: none;
|
|
804
|
+
}
|
|
805
|
+
.mlcad-measure-dot {
|
|
806
|
+
position: absolute;
|
|
807
|
+
z-index: 3;
|
|
808
|
+
/* em size tracks the paired badge font-size (set inline on the dot) */
|
|
809
|
+
font-size: 12px;
|
|
810
|
+
width: 0.55em;
|
|
811
|
+
height: 0.55em;
|
|
812
|
+
min-width: 5px;
|
|
813
|
+
min-height: 5px;
|
|
814
|
+
border-radius: 50%;
|
|
815
|
+
background: var(--mlcad-measure-accent);
|
|
816
|
+
border: 0.12em solid rgba(255, 255, 255, 0.9);
|
|
817
|
+
box-sizing: border-box;
|
|
818
|
+
transform: translate(-50%, -50%);
|
|
819
|
+
visibility: hidden;
|
|
820
|
+
pointer-events: none;
|
|
821
|
+
cursor: grab;
|
|
822
|
+
}
|
|
823
|
+
.mlcad-measure-dot.mlcad-measure-selected {
|
|
824
|
+
visibility: visible;
|
|
825
|
+
pointer-events: auto;
|
|
826
|
+
/* Hard ring at half original em thickness + soft glow */
|
|
827
|
+
box-shadow:
|
|
828
|
+
0 0 0 0.06em rgba(255, 213, 79, 0.75),
|
|
829
|
+
0 0 0.35em rgba(255, 213, 79, 0.9),
|
|
830
|
+
0 0 0.7em rgba(255, 213, 79, 0.5);
|
|
831
|
+
}
|
|
832
|
+
#mlcad-measure-overlays.mlcad-grip-dragging .mlcad-measure-dot {
|
|
833
|
+
visibility: hidden !important;
|
|
834
|
+
pointer-events: none !important;
|
|
835
|
+
}
|
|
836
|
+
.mlcad-measure-badge {
|
|
837
|
+
position: absolute;
|
|
838
|
+
z-index: 2;
|
|
839
|
+
/* em padding/radius/border so the capsule scales with font-size */
|
|
840
|
+
padding: 0.25em 0.833em;
|
|
841
|
+
border-radius: 1.167em;
|
|
842
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
843
|
+
border: 0.083em solid var(--mlcad-measure-accent-border);
|
|
844
|
+
color: var(--mlcad-measure-accent);
|
|
845
|
+
font-size: 12px;
|
|
846
|
+
font-weight: 600;
|
|
847
|
+
white-space: nowrap;
|
|
848
|
+
transform: translate(-50%, -50%);
|
|
849
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
850
|
+
pointer-events: none;
|
|
851
|
+
}
|
|
852
|
+
.mlcad-measure-badge--coordinate {
|
|
853
|
+
/* em so the lift tracks the capsule when text height changes. */
|
|
854
|
+
transform: translate(-50%, calc(-50% - ${ms}em));
|
|
855
|
+
}
|
|
856
|
+
.mlcad-measure-badge.mlcad-measure-selected {
|
|
857
|
+
/* Hard ring at half original em thickness + soft glow */
|
|
858
|
+
outline: 0.075em solid rgba(255, 213, 79, 0.85);
|
|
859
|
+
outline-offset: 0.04em;
|
|
860
|
+
box-shadow:
|
|
861
|
+
0 0 0 0.075em rgba(255, 213, 79, 0.4),
|
|
862
|
+
0 0 0.45em rgba(255, 213, 79, 0.85),
|
|
863
|
+
0 0 0.9em rgba(255, 213, 79, 0.55),
|
|
864
|
+
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
865
|
+
}
|
|
866
|
+
.mlcad-measure-canvas.mlcad-measure-selected {
|
|
867
|
+
/* font-size is seeded from the paired badge so em tracks text size */
|
|
868
|
+
filter:
|
|
869
|
+
drop-shadow(0 0 0.12em #ffd54f)
|
|
870
|
+
drop-shadow(0 0 0.3em rgba(255, 213, 79, 0.95))
|
|
871
|
+
drop-shadow(0 0 0.6em rgba(255, 213, 79, 0.55));
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
#mlcad-markup-overlays {
|
|
875
|
+
position: absolute;
|
|
876
|
+
inset: 0;
|
|
877
|
+
pointer-events: none;
|
|
878
|
+
z-index: var(--mlcad-z-markup);
|
|
879
|
+
overflow: hidden;
|
|
880
|
+
}
|
|
881
|
+
.mlcad-markup-canvas {
|
|
882
|
+
position: absolute;
|
|
883
|
+
left: 0;
|
|
884
|
+
top: 0;
|
|
885
|
+
z-index: 1;
|
|
886
|
+
pointer-events: none;
|
|
887
|
+
}
|
|
888
|
+
.mlcad-markup-badge,
|
|
889
|
+
.mlcad-markup-stamp {
|
|
890
|
+
position: absolute;
|
|
891
|
+
z-index: 2;
|
|
892
|
+
padding: 3px 10px;
|
|
893
|
+
border-radius: 14px;
|
|
894
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
895
|
+
border: 1px solid var(--mlcad-markup-accent-border);
|
|
896
|
+
color: var(--mlcad-markup-accent);
|
|
897
|
+
font-size: 12px;
|
|
898
|
+
font-weight: 600;
|
|
899
|
+
white-space: pre-wrap;
|
|
900
|
+
max-width: 240px;
|
|
901
|
+
min-width: 80px;
|
|
902
|
+
min-height: 1.75em;
|
|
903
|
+
box-sizing: border-box;
|
|
904
|
+
transform: translate(-50%, -50%);
|
|
905
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
906
|
+
pointer-events: auto;
|
|
907
|
+
cursor: grab;
|
|
908
|
+
touch-action: none;
|
|
909
|
+
user-select: none;
|
|
910
|
+
}
|
|
911
|
+
.mlcad-markup-stamp {
|
|
912
|
+
border-radius: 4px;
|
|
913
|
+
border-width: 2px;
|
|
914
|
+
text-transform: uppercase;
|
|
915
|
+
letter-spacing: 0.04em;
|
|
916
|
+
font-size: 11px;
|
|
917
|
+
white-space: nowrap;
|
|
918
|
+
min-width: 0;
|
|
919
|
+
}
|
|
920
|
+
.mlcad-markup-preview-dot {
|
|
921
|
+
position: absolute;
|
|
922
|
+
font-size: 12px;
|
|
923
|
+
width: 0.55em;
|
|
924
|
+
height: 0.55em;
|
|
925
|
+
min-width: 5px;
|
|
926
|
+
min-height: 5px;
|
|
927
|
+
border-radius: 50%;
|
|
928
|
+
background: var(--mlcad-markup-accent);
|
|
929
|
+
border: 0.12em solid rgba(255, 255, 255, 0.9);
|
|
930
|
+
box-sizing: border-box;
|
|
931
|
+
transform: translate(-50%, -50%);
|
|
932
|
+
pointer-events: none;
|
|
933
|
+
}
|
|
934
|
+
.mlcad-markup-dot {
|
|
935
|
+
position: absolute;
|
|
936
|
+
z-index: 3;
|
|
937
|
+
font-size: 12px;
|
|
938
|
+
width: 0.55em;
|
|
939
|
+
height: 0.55em;
|
|
940
|
+
min-width: 5px;
|
|
941
|
+
min-height: 5px;
|
|
942
|
+
border-radius: 50%;
|
|
943
|
+
background: var(--mlcad-markup-accent);
|
|
944
|
+
border: 0.12em solid rgba(255, 255, 255, 0.9);
|
|
945
|
+
box-sizing: border-box;
|
|
946
|
+
transform: translate(-50%, -50%);
|
|
947
|
+
visibility: hidden;
|
|
948
|
+
pointer-events: none;
|
|
949
|
+
cursor: grab;
|
|
950
|
+
}
|
|
951
|
+
.mlcad-markup-dot.mlcad-markup-selected {
|
|
952
|
+
visibility: visible;
|
|
953
|
+
pointer-events: auto;
|
|
954
|
+
box-shadow:
|
|
955
|
+
0 0 0 0.06em rgba(255, 213, 79, 0.75),
|
|
956
|
+
0 0 0.35em rgba(255, 213, 79, 0.9),
|
|
957
|
+
0 0 0.7em rgba(255, 213, 79, 0.5);
|
|
958
|
+
}
|
|
959
|
+
#mlcad-markup-overlays.mlcad-grip-dragging .mlcad-markup-dot {
|
|
960
|
+
visibility: hidden !important;
|
|
961
|
+
pointer-events: none !important;
|
|
962
|
+
}
|
|
963
|
+
.mlcad-markup-badge.mlcad-markup-selected,
|
|
964
|
+
.mlcad-markup-stamp.mlcad-markup-selected {
|
|
965
|
+
outline: 0.075em solid rgba(255, 213, 79, 0.85);
|
|
966
|
+
outline-offset: 0.04em;
|
|
967
|
+
box-shadow:
|
|
968
|
+
0 0 0 0.075em rgba(255, 213, 79, 0.4),
|
|
969
|
+
0 0 0.45em rgba(255, 213, 79, 0.85),
|
|
970
|
+
0 0 0.9em rgba(255, 213, 79, 0.55),
|
|
971
|
+
0 2px 8px rgba(0, 0, 0, 0.35);
|
|
972
|
+
}
|
|
973
|
+
.mlcad-markup-canvas.mlcad-markup-selected {
|
|
974
|
+
filter:
|
|
975
|
+
drop-shadow(0 0 0.12em #ffd54f)
|
|
976
|
+
drop-shadow(0 0 0.3em rgba(255, 213, 79, 0.95))
|
|
977
|
+
drop-shadow(0 0 0.6em rgba(255, 213, 79, 0.55));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
#mlcad-loading {
|
|
981
|
+
position: fixed; inset: 0; z-index: 100;
|
|
982
|
+
display: flex; align-items: center; justify-content: center;
|
|
983
|
+
background: #121418;
|
|
984
|
+
transition: opacity 0.35s ease, visibility 0.35s ease;
|
|
985
|
+
}
|
|
986
|
+
#mlcad-loading.mlcad-loading--done {
|
|
987
|
+
opacity: 0; visibility: hidden; pointer-events: none;
|
|
988
|
+
}
|
|
989
|
+
#mlcad-loading.mlcad-loading--gate .mlcad-loading-spinner {
|
|
990
|
+
display: none;
|
|
991
|
+
}
|
|
992
|
+
.mlcad-loading-spinner {
|
|
993
|
+
width: 48px; height: 48px; box-sizing: border-box;
|
|
994
|
+
border: 3px solid rgba(255, 255, 255, 0.12);
|
|
995
|
+
border-top-color: var(--mlcad-accent);
|
|
996
|
+
border-radius: 50%;
|
|
997
|
+
animation: mlcad-spin 0.85s linear infinite;
|
|
998
|
+
}
|
|
999
|
+
@keyframes mlcad-spin { to { transform: rotate(360deg); } }
|
|
1000
|
+
|
|
1001
|
+
#mlcad-access-gate {
|
|
1002
|
+
display: flex;
|
|
1003
|
+
align-items: center;
|
|
1004
|
+
justify-content: center;
|
|
1005
|
+
width: 100%;
|
|
1006
|
+
max-width: 360px;
|
|
1007
|
+
padding: 0 20px;
|
|
1008
|
+
box-sizing: border-box;
|
|
1009
|
+
}
|
|
1010
|
+
#mlcad-access-gate[hidden] {
|
|
1011
|
+
display: none !important;
|
|
1012
|
+
}
|
|
1013
|
+
.mlcad-access-card {
|
|
1014
|
+
width: 100%;
|
|
1015
|
+
padding: 24px 20px;
|
|
1016
|
+
border-radius: 10px;
|
|
1017
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
1018
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
1019
|
+
box-shadow: var(--mlcad-shadow);
|
|
1020
|
+
box-sizing: border-box;
|
|
1021
|
+
}
|
|
1022
|
+
.mlcad-access-title {
|
|
1023
|
+
margin: 0 0 8px;
|
|
1024
|
+
font-size: 16px;
|
|
1025
|
+
font-weight: 600;
|
|
1026
|
+
color: var(--mlcad-ui-text);
|
|
1027
|
+
text-align: center;
|
|
1028
|
+
}
|
|
1029
|
+
.mlcad-access-hint {
|
|
1030
|
+
margin: 0 0 16px;
|
|
1031
|
+
font-size: 13px;
|
|
1032
|
+
line-height: 1.45;
|
|
1033
|
+
color: var(--mlcad-ui-muted);
|
|
1034
|
+
text-align: center;
|
|
1035
|
+
}
|
|
1036
|
+
.mlcad-access-expiry {
|
|
1037
|
+
margin: -8px 0 16px;
|
|
1038
|
+
font-size: 12px;
|
|
1039
|
+
line-height: 1.4;
|
|
1040
|
+
color: var(--mlcad-ui-muted);
|
|
1041
|
+
text-align: center;
|
|
1042
|
+
}
|
|
1043
|
+
.mlcad-access-expiry[hidden] {
|
|
1044
|
+
display: none;
|
|
1045
|
+
}
|
|
1046
|
+
.mlcad-access-expiry.mlcad-expiry-countdown {
|
|
1047
|
+
width: fit-content;
|
|
1048
|
+
max-width: 100%;
|
|
1049
|
+
margin-left: auto;
|
|
1050
|
+
margin-right: auto;
|
|
1051
|
+
margin-bottom: 16px;
|
|
1052
|
+
padding: 6px 10px;
|
|
1053
|
+
border-radius: 6px;
|
|
1054
|
+
box-sizing: border-box;
|
|
1055
|
+
}
|
|
1056
|
+
.mlcad-access-field {
|
|
1057
|
+
display: flex;
|
|
1058
|
+
gap: 8px;
|
|
1059
|
+
margin-bottom: 12px;
|
|
1060
|
+
}
|
|
1061
|
+
.mlcad-access-field input {
|
|
1062
|
+
flex: 1 1 auto;
|
|
1063
|
+
min-width: 0;
|
|
1064
|
+
height: 36px;
|
|
1065
|
+
padding: 0 12px;
|
|
1066
|
+
border-radius: 6px;
|
|
1067
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
1068
|
+
background: rgba(0, 0, 0, 0.25);
|
|
1069
|
+
color: var(--mlcad-ui-text);
|
|
1070
|
+
font: inherit;
|
|
1071
|
+
box-sizing: border-box;
|
|
1072
|
+
}
|
|
1073
|
+
.mlcad-access-field input:focus {
|
|
1074
|
+
outline: none;
|
|
1075
|
+
border-color: rgba(26, 140, 255, 0.65);
|
|
1076
|
+
box-shadow: 0 0 0 2px rgba(26, 140, 255, 0.2);
|
|
1077
|
+
}
|
|
1078
|
+
.mlcad-access-submit {
|
|
1079
|
+
width: 100%;
|
|
1080
|
+
height: 36px;
|
|
1081
|
+
border: 1px solid rgba(26, 140, 255, 0.55);
|
|
1082
|
+
border-radius: 6px;
|
|
1083
|
+
background: rgba(26, 140, 255, 0.22);
|
|
1084
|
+
color: #fff;
|
|
1085
|
+
font: inherit;
|
|
1086
|
+
font-weight: 600;
|
|
1087
|
+
cursor: pointer;
|
|
1088
|
+
}
|
|
1089
|
+
.mlcad-access-submit:hover {
|
|
1090
|
+
background: rgba(26, 140, 255, 0.32);
|
|
1091
|
+
}
|
|
1092
|
+
.mlcad-access-error {
|
|
1093
|
+
margin: 0;
|
|
1094
|
+
font-size: 12px;
|
|
1095
|
+
line-height: 1.4;
|
|
1096
|
+
color: #ff8a80;
|
|
1097
|
+
text-align: center;
|
|
1098
|
+
}
|
|
1099
|
+
.mlcad-access-error[hidden] {
|
|
1100
|
+
display: none;
|
|
1101
|
+
}
|
|
1102
|
+
.mlcad-access-gate--locked .mlcad-access-submit:disabled,
|
|
1103
|
+
.mlcad-access-gate--locked .mlcad-access-field input:disabled {
|
|
1104
|
+
opacity: 0.55;
|
|
1105
|
+
cursor: not-allowed;
|
|
1106
|
+
}
|
|
1107
|
+
.mlcad-access-field[hidden],
|
|
1108
|
+
.mlcad-access-submit[hidden],
|
|
1109
|
+
.mlcad-access-gate--expired .mlcad-access-field,
|
|
1110
|
+
.mlcad-access-gate--expired .mlcad-access-submit,
|
|
1111
|
+
.mlcad-access-gate--expired #mlcad-access-expiry,
|
|
1112
|
+
.mlcad-access-gate--expired #mlcad-access-error {
|
|
1113
|
+
display: none !important;
|
|
1114
|
+
}
|
|
1115
|
+
.mlcad-expiry-badge {
|
|
1116
|
+
position: relative;
|
|
1117
|
+
flex: 0 0 auto;
|
|
1118
|
+
margin-left: auto;
|
|
1119
|
+
max-width: none;
|
|
1120
|
+
padding: 8px 12px;
|
|
1121
|
+
border-radius: 6px;
|
|
1122
|
+
border: 1px solid var(--mlcad-ui-border);
|
|
1123
|
+
background: var(--mlcad-ui-bg-elevated);
|
|
1124
|
+
box-shadow: var(--mlcad-shadow);
|
|
1125
|
+
color: var(--mlcad-ui-text);
|
|
1126
|
+
font-size: 12px;
|
|
1127
|
+
line-height: 1.4;
|
|
1128
|
+
white-space: nowrap;
|
|
1129
|
+
pointer-events: none;
|
|
1130
|
+
box-sizing: border-box;
|
|
1131
|
+
}
|
|
1132
|
+
.mlcad-expiry-badge[hidden] {
|
|
1133
|
+
display: none !important;
|
|
1134
|
+
}
|
|
1135
|
+
.mlcad-expiry-countdown {
|
|
1136
|
+
border-color: rgba(255, 152, 0, 0.55);
|
|
1137
|
+
background: rgba(255, 152, 0, 0.16);
|
|
1138
|
+
color: #ffcc80;
|
|
1139
|
+
font-variant-numeric: tabular-nums;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
@media (max-width: ${ds}px) {
|
|
1143
|
+
:root {
|
|
1144
|
+
--mlcad-drawer-width: min(280px, calc(100vw - 16px));
|
|
1145
|
+
--mlcad-ui-inset: 0px;
|
|
1146
|
+
--mlcad-toolbar-phone-height: 56px;
|
|
1147
|
+
/* Portrait min width (narrower than simple-ui's height - 4). */
|
|
1148
|
+
--mlcad-toolbar-phone-btn-size: max(
|
|
1149
|
+
24px,
|
|
1150
|
+
calc(var(--mlcad-toolbar-phone-height) - 16px)
|
|
1151
|
+
);
|
|
1152
|
+
}
|
|
1153
|
+
#mlcad-root {
|
|
1154
|
+
display: flex;
|
|
1155
|
+
flex-direction: column;
|
|
1156
|
+
}
|
|
1157
|
+
#mlcad-canvas-host {
|
|
1158
|
+
position: relative;
|
|
1159
|
+
flex: 1 1 auto;
|
|
1160
|
+
inset: auto;
|
|
1161
|
+
width: 100%;
|
|
1162
|
+
min-height: 0;
|
|
1163
|
+
}
|
|
1164
|
+
#mlcad-sidebar {
|
|
1165
|
+
position: relative;
|
|
1166
|
+
left: auto;
|
|
1167
|
+
top: auto;
|
|
1168
|
+
right: auto;
|
|
1169
|
+
transform: none;
|
|
1170
|
+
width: 100%;
|
|
1171
|
+
max-width: none;
|
|
1172
|
+
flex: 0 0 auto;
|
|
1173
|
+
flex-direction: column-reverse;
|
|
1174
|
+
align-items: stretch;
|
|
1175
|
+
gap: 0;
|
|
1176
|
+
overflow: visible;
|
|
1177
|
+
}
|
|
1178
|
+
#mlcad-toolbar {
|
|
1179
|
+
flex-direction: row;
|
|
1180
|
+
width: 100%;
|
|
1181
|
+
box-sizing: border-box;
|
|
1182
|
+
gap: 0;
|
|
1183
|
+
padding: 4px 0;
|
|
1184
|
+
border-radius: 0;
|
|
1185
|
+
border-left: none;
|
|
1186
|
+
border-right: none;
|
|
1187
|
+
border-bottom: none;
|
|
1188
|
+
}
|
|
1189
|
+
#mlcad-toolbar .mlcad-tool-btn {
|
|
1190
|
+
flex: 1 1 0;
|
|
1191
|
+
width: auto;
|
|
1192
|
+
min-width: 0;
|
|
1193
|
+
height: auto;
|
|
1194
|
+
min-height: var(--mlcad-toolbar-phone-height);
|
|
1195
|
+
border-radius: 0;
|
|
1196
|
+
padding: 4px 2px;
|
|
1197
|
+
}
|
|
1198
|
+
#mlcad-toolbar .mlcad-tool-btn-label,
|
|
1199
|
+
#mlcad-zoom-strip .mlcad-tool-btn-label,
|
|
1200
|
+
#mlcad-measure-strip .mlcad-tool-btn-label,
|
|
1201
|
+
#mlcad-markup-strip .mlcad-tool-btn-label,
|
|
1202
|
+
#mlcad-settings-strip .mlcad-tool-btn-label,
|
|
1203
|
+
#mlcad-locale-strip .mlcad-tool-btn-label,
|
|
1204
|
+
#mlcad-snap-strip .mlcad-tool-btn-label {
|
|
1205
|
+
display: block;
|
|
1206
|
+
max-width: 100%;
|
|
1207
|
+
overflow: hidden;
|
|
1208
|
+
text-overflow: ellipsis;
|
|
1209
|
+
white-space: nowrap;
|
|
1210
|
+
}
|
|
1211
|
+
/* Drop sticky :focus / touch :hover chrome after closing a strip. */
|
|
1212
|
+
#mlcad-toolbar .mlcad-tool-btn:focus,
|
|
1213
|
+
#mlcad-toolbar .mlcad-tool-btn:focus-visible {
|
|
1214
|
+
outline: none;
|
|
1215
|
+
}
|
|
1216
|
+
#mlcad-toolbar .mlcad-tool-btn:focus:not(.active):not(.is-menu-open),
|
|
1217
|
+
#mlcad-toolbar .mlcad-tool-btn:focus-visible:not(.active):not(.is-menu-open) {
|
|
1218
|
+
background: transparent;
|
|
1219
|
+
border-color: transparent;
|
|
1220
|
+
}
|
|
1221
|
+
@media (hover: none) {
|
|
1222
|
+
#mlcad-toolbar .mlcad-tool-btn:hover:not(.active):not(.is-menu-open) {
|
|
1223
|
+
background: transparent;
|
|
1224
|
+
border-color: transparent;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
.mlcad-tool-btn.has-children::after {
|
|
1228
|
+
display: none;
|
|
1229
|
+
}
|
|
1230
|
+
#mlcad-toolbar-toggle,
|
|
1231
|
+
#mlcad-toolbar .mlcad-tool-separator {
|
|
1232
|
+
display: none !important;
|
|
1233
|
+
}
|
|
1234
|
+
/* Float above the bottom bar so the wrap does not occupy an in-flow
|
|
1235
|
+
rectangle of page background around the rounded strip. */
|
|
1236
|
+
#mlcad-sidebar > #mlcad-snap-strip-wrap,
|
|
1237
|
+
#mlcad-sidebar > #mlcad-measure-strip-wrap,
|
|
1238
|
+
#mlcad-sidebar > #mlcad-markup-strip-wrap,
|
|
1239
|
+
#mlcad-sidebar > #mlcad-zoom-strip-wrap,
|
|
1240
|
+
#mlcad-sidebar > #mlcad-settings-strip-wrap,
|
|
1241
|
+
#mlcad-sidebar > #mlcad-locale-strip-wrap {
|
|
1242
|
+
position: absolute;
|
|
1243
|
+
left: 0;
|
|
1244
|
+
right: 0;
|
|
1245
|
+
bottom: 100%;
|
|
1246
|
+
width: auto;
|
|
1247
|
+
flex-direction: column;
|
|
1248
|
+
align-items: stretch;
|
|
1249
|
+
background: none;
|
|
1250
|
+
box-shadow: none;
|
|
1251
|
+
backdrop-filter: none;
|
|
1252
|
+
overflow: visible;
|
|
1253
|
+
pointer-events: none;
|
|
1254
|
+
z-index: calc(var(--mlcad-z-chrome) + 1);
|
|
1255
|
+
}
|
|
1256
|
+
#mlcad-settings-strip-wrap:not([hidden]) {
|
|
1257
|
+
display: flex !important;
|
|
1258
|
+
}
|
|
1259
|
+
#mlcad-snap-strip,
|
|
1260
|
+
#mlcad-measure-strip,
|
|
1261
|
+
#mlcad-markup-strip,
|
|
1262
|
+
#mlcad-zoom-strip,
|
|
1263
|
+
#mlcad-settings-strip,
|
|
1264
|
+
#mlcad-locale-strip {
|
|
1265
|
+
display: grid;
|
|
1266
|
+
/* Fallback before wrap-pack JS: auto-fit stretches a short strip evenly.
|
|
1267
|
+
JS then sets an explicit column count so wrapped last rows stay narrow. */
|
|
1268
|
+
grid-template-columns: repeat(
|
|
1269
|
+
auto-fit,
|
|
1270
|
+
minmax(var(--mlcad-toolbar-phone-btn-size), 1fr)
|
|
1271
|
+
);
|
|
1272
|
+
justify-content: start;
|
|
1273
|
+
align-content: flex-start;
|
|
1274
|
+
width: auto;
|
|
1275
|
+
box-sizing: border-box;
|
|
1276
|
+
gap: 0;
|
|
1277
|
+
margin: 4px 8px 8px;
|
|
1278
|
+
padding: 4px 0;
|
|
1279
|
+
border-radius: 8px;
|
|
1280
|
+
/* Match active toolbar button outline. */
|
|
1281
|
+
border: 1px solid var(--mlcad-tool-btn-active-border);
|
|
1282
|
+
box-shadow: none;
|
|
1283
|
+
backdrop-filter: none;
|
|
1284
|
+
overflow: hidden;
|
|
1285
|
+
isolation: isolate;
|
|
1286
|
+
clip-path: inset(0 round 8px);
|
|
1287
|
+
pointer-events: auto;
|
|
1288
|
+
}
|
|
1289
|
+
#mlcad-snap-strip .mlcad-tool-btn,
|
|
1290
|
+
#mlcad-measure-strip .mlcad-tool-btn,
|
|
1291
|
+
#mlcad-markup-strip .mlcad-tool-btn,
|
|
1292
|
+
#mlcad-zoom-strip .mlcad-tool-btn,
|
|
1293
|
+
#mlcad-settings-strip .mlcad-tool-btn,
|
|
1294
|
+
#mlcad-locale-strip .mlcad-tool-btn {
|
|
1295
|
+
width: 100%;
|
|
1296
|
+
min-width: 0;
|
|
1297
|
+
height: auto;
|
|
1298
|
+
min-height: var(--mlcad-toolbar-phone-height);
|
|
1299
|
+
border-radius: 0;
|
|
1300
|
+
padding: 4px 2px;
|
|
1301
|
+
box-sizing: border-box;
|
|
1302
|
+
}
|
|
1303
|
+
#mlcad-measure-strip .mlcad-tool-separator,
|
|
1304
|
+
#mlcad-markup-strip .mlcad-tool-separator {
|
|
1305
|
+
display: none;
|
|
1306
|
+
}
|
|
1307
|
+
#mlcad-polar-angles {
|
|
1308
|
+
flex-direction: row;
|
|
1309
|
+
flex-wrap: wrap;
|
|
1310
|
+
max-width: none;
|
|
1311
|
+
width: 100%;
|
|
1312
|
+
box-sizing: border-box;
|
|
1313
|
+
border-radius: 0;
|
|
1314
|
+
pointer-events: auto;
|
|
1315
|
+
}
|
|
1316
|
+
#mlcad-layer-drawer,
|
|
1317
|
+
#mlcad-review-drawer,
|
|
1318
|
+
#mlcad-measure-drawer {
|
|
1319
|
+
position: fixed;
|
|
1320
|
+
left: 0;
|
|
1321
|
+
right: 0;
|
|
1322
|
+
bottom: var(--mlcad-phone-drawer-bottom, var(--mlcad-toolbar-phone-height));
|
|
1323
|
+
top: auto;
|
|
1324
|
+
margin: 0;
|
|
1325
|
+
width: 100%;
|
|
1326
|
+
max-width: none;
|
|
1327
|
+
height: min(42vh, calc(100vh - var(--mlcad-phone-drawer-bottom, var(--mlcad-toolbar-phone-height)) - 12px));
|
|
1328
|
+
max-height: calc(100vh - var(--mlcad-phone-drawer-bottom, var(--mlcad-toolbar-phone-height)) - 12px);
|
|
1329
|
+
z-index: calc(var(--mlcad-z-chrome) + 1);
|
|
1330
|
+
border-radius: 12px 12px 0 0;
|
|
1331
|
+
pointer-events: auto;
|
|
1332
|
+
}
|
|
1333
|
+
#mlcad-layer-drawer .mlcad-drawer-sheet-chrome,
|
|
1334
|
+
#mlcad-review-drawer .mlcad-drawer-sheet-chrome,
|
|
1335
|
+
#mlcad-measure-drawer .mlcad-drawer-sheet-chrome {
|
|
1336
|
+
display: flex;
|
|
1337
|
+
align-items: center;
|
|
1338
|
+
flex: 0 0 auto;
|
|
1339
|
+
min-height: 28px;
|
|
1340
|
+
}
|
|
1341
|
+
#mlcad-layer-drawer .mlcad-drawer-header,
|
|
1342
|
+
#mlcad-review-drawer .mlcad-drawer-header,
|
|
1343
|
+
#mlcad-measure-drawer .mlcad-drawer-header {
|
|
1344
|
+
display: none;
|
|
1345
|
+
}
|
|
1346
|
+
.mlcad-layer-action-btn {
|
|
1347
|
+
min-height: 28px;
|
|
1348
|
+
padding: 3px 6px;
|
|
1349
|
+
font-size: 11px;
|
|
1350
|
+
gap: 4px;
|
|
1351
|
+
}
|
|
1352
|
+
.mlcad-layer-action-btn svg { width: 12px; height: 12px; }
|
|
1353
|
+
.mlcad-layer-zoom {
|
|
1354
|
+
width: 20px;
|
|
1355
|
+
height: 20px;
|
|
1356
|
+
}
|
|
1357
|
+
.mlcad-layer-zoom svg {
|
|
1358
|
+
width: 12px;
|
|
1359
|
+
height: 12px;
|
|
1360
|
+
}
|
|
1361
|
+
#mlcad-top-chrome {
|
|
1362
|
+
left: 8px;
|
|
1363
|
+
right: 8px;
|
|
1364
|
+
top: 8px;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/* Pad / coarse pointer: same toolbar as desktop, minus select and pan. */
|
|
1370
|
+
@media (max-width: ${us}px), (pointer: coarse) {
|
|
1371
|
+
#mlcad-toolbar [data-action="select"],
|
|
1372
|
+
#mlcad-toolbar [data-action="pan"] {
|
|
1373
|
+
display: none !important;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/*
|
|
1378
|
+
* Hide toolbar chrome during measure / markup without changing canvas size.
|
|
1379
|
+
* On phone the sidebar is in the flex column; display:none would expand
|
|
1380
|
+
* #mlcad-canvas-host and shift the drawing. Session panel floats on top.
|
|
1381
|
+
*/
|
|
1382
|
+
#mlcad-root.mlcad-session-active #mlcad-sidebar {
|
|
1383
|
+
visibility: hidden !important;
|
|
1384
|
+
pointer-events: none !important;
|
|
1385
|
+
}
|
|
1386
|
+
`;function Fe(t,e="measure",a=!0){const r=e==="measure"?`${cs()}${fs()}${ps()}`:"";return`
|
|
1387
|
+
<div id="mlcad-loading" aria-hidden="true" style="background:${t}">
|
|
1388
|
+
<div class="mlcad-loading-spinner"></div>
|
|
1389
|
+
<div id="mlcad-access-gate" hidden>
|
|
1390
|
+
<form id="mlcad-access-form" class="mlcad-access-card">
|
|
1391
|
+
<h2 class="mlcad-access-title" data-i18n-key="access.title" data-i18n-text>Protected drawing</h2>
|
|
1392
|
+
<p class="mlcad-access-hint" data-i18n-key="access.passwordPrompt" data-i18n-text>Enter the password to open this file.</p>
|
|
1393
|
+
<p id="mlcad-access-expiry" class="mlcad-access-expiry" hidden></p>
|
|
1394
|
+
<div class="mlcad-access-field">
|
|
1395
|
+
<input
|
|
1396
|
+
id="mlcad-access-password"
|
|
1397
|
+
type="password"
|
|
1398
|
+
autocomplete="off"
|
|
1399
|
+
data-i18n-key="access.passwordPlaceholder"
|
|
1400
|
+
data-i18n-attr="placeholder aria-label"
|
|
1401
|
+
placeholder="Password"
|
|
1402
|
+
aria-label="Password"
|
|
1403
|
+
/>
|
|
1404
|
+
</div>
|
|
1405
|
+
<button type="submit" class="mlcad-access-submit" data-i18n-key="access.unlock" data-i18n-text>Unlock</button>
|
|
1406
|
+
<p id="mlcad-access-error" class="mlcad-access-error" hidden></p>
|
|
1407
|
+
</form>
|
|
1408
|
+
</div>
|
|
1409
|
+
</div>
|
|
1410
|
+
<div id="mlcad-root">
|
|
1411
|
+
<div id="mlcad-canvas-host">
|
|
1412
|
+
<div id="mlcad-top-chrome">
|
|
1413
|
+
<footer id="mlcad-status-bar" aria-live="polite" hidden></footer>
|
|
1414
|
+
</div>
|
|
1415
|
+
</div>
|
|
1416
|
+
<aside id="mlcad-sidebar">
|
|
1417
|
+
<nav id="mlcad-toolbar" data-i18n-attr="aria-label" data-i18n-key="toolbar.viewerTools" aria-label="Viewer tools"></nav>
|
|
1418
|
+
${r}
|
|
1419
|
+
<div id="mlcad-layer-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="layers.title" aria-label="Layers" hidden>
|
|
1420
|
+
${ze("mlcad-layer-sheet-close","layers.close","Close layers")}
|
|
1421
|
+
<div class="mlcad-drawer-header">
|
|
1422
|
+
<span data-i18n-key="layers.title" data-i18n-text>Layers</span>
|
|
1423
|
+
<button type="button" class="mlcad-drawer-close" id="mlcad-layer-close" data-i18n-key="layers.close" data-i18n-attr="aria-label" aria-label="Close layers">×</button>
|
|
1424
|
+
</div>
|
|
1425
|
+
<div class="mlcad-layer-actions">
|
|
1426
|
+
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-show-all">
|
|
1427
|
+
${ue.layerOn}<span data-i18n-key="layers.showAll" data-i18n-text>Show all</span>
|
|
1428
|
+
</button>
|
|
1429
|
+
<button type="button" class="mlcad-layer-action-btn" id="mlcad-layer-hide-all">
|
|
1430
|
+
${ue.layerOff}<span data-i18n-key="layers.hideAll" data-i18n-text>Hide all</span>
|
|
1431
|
+
</button>
|
|
1432
|
+
</div>
|
|
1433
|
+
<div id="mlcad-layer-list"></div>
|
|
1434
|
+
</div>
|
|
1435
|
+
</aside>
|
|
1436
|
+
</div>
|
|
1437
|
+
`}function ze(t,e,a){return`<div class="mlcad-drawer-sheet-chrome">
|
|
1438
|
+
<div class="mlcad-drawer-grabber" role="separator" aria-orientation="horizontal"></div>
|
|
1439
|
+
<button type="button" class="mlcad-drawer-sheet-close" id="${t}" data-i18n-key="${e}" data-i18n-attr="aria-label" aria-label="${a}">${ue.chevronDown}</button>
|
|
1440
|
+
</div>`}function ps(){return`<div id="mlcad-review-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="review.title" aria-label="Review" hidden>
|
|
1441
|
+
${ze("mlcad-review-sheet-close","review.close","Close review")}
|
|
1442
|
+
<div class="mlcad-drawer-header">
|
|
1443
|
+
<span data-i18n-key="review.title" data-i18n-text>Review</span>
|
|
1444
|
+
<button type="button" class="mlcad-drawer-close" id="mlcad-review-close" data-i18n-key="review.close" data-i18n-attr="aria-label" aria-label="Close review">×</button>
|
|
1445
|
+
</div>
|
|
1446
|
+
<div class="mlcad-review-toolbar">
|
|
1447
|
+
<input type="search" class="mlcad-review-search" data-i18n-key="review.searchPlaceholder" data-i18n-attr="placeholder" placeholder="Search markups" />
|
|
1448
|
+
<button type="button" class="mlcad-review-clear" data-i18n-key="review.clear" data-i18n-text>Clear all</button>
|
|
1449
|
+
</div>
|
|
1450
|
+
<div class="mlcad-review-table-wrap">
|
|
1451
|
+
<table class="mlcad-review-table">
|
|
1452
|
+
<thead>
|
|
1453
|
+
<tr>
|
|
1454
|
+
<th data-review-col="type" data-i18n-key="review.type" data-i18n-text>Type</th>
|
|
1455
|
+
<th data-review-col="status" data-i18n-key="review.status" data-i18n-text>Status</th>
|
|
1456
|
+
<th data-review-col="author" data-i18n-key="review.author" data-i18n-text>Author</th>
|
|
1457
|
+
<th data-review-col="summary" data-i18n-key="review.summary" data-i18n-text>Summary</th>
|
|
1458
|
+
</tr>
|
|
1459
|
+
</thead>
|
|
1460
|
+
<tbody></tbody>
|
|
1461
|
+
</table>
|
|
1462
|
+
</div>
|
|
1463
|
+
<div class="mlcad-review-detail" hidden>
|
|
1464
|
+
<div class="mlcad-review-detail-header">
|
|
1465
|
+
<div class="mlcad-review-detail-title" data-i18n-key="review.details" data-i18n-text>Details</div>
|
|
1466
|
+
<button type="button" class="mlcad-review-detail-close" data-i18n-key="review.closeDetails" data-i18n-attr="title aria-label" title="Close details" aria-label="Close details">×</button>
|
|
1467
|
+
</div>
|
|
1468
|
+
<div class="mlcad-review-field">
|
|
1469
|
+
<label class="mlcad-review-field-label" data-review-field="status" data-i18n-key="review.status" data-i18n-text>Status</label>
|
|
1470
|
+
<select class="mlcad-review-status"></select>
|
|
1471
|
+
</div>
|
|
1472
|
+
<div class="mlcad-review-field">
|
|
1473
|
+
<label class="mlcad-review-field-label" data-review-field="author" data-i18n-key="review.author" data-i18n-text>Author</label>
|
|
1474
|
+
<input type="text" class="mlcad-review-author" disabled />
|
|
1475
|
+
</div>
|
|
1476
|
+
<div class="mlcad-review-field">
|
|
1477
|
+
<label class="mlcad-review-field-label" data-review-field="label" data-i18n-key="review.label" data-i18n-text>Label</label>
|
|
1478
|
+
<input type="text" class="mlcad-review-text" />
|
|
1479
|
+
</div>
|
|
1480
|
+
<div class="mlcad-review-field">
|
|
1481
|
+
<label class="mlcad-review-field-label" data-review-field="comment" data-i18n-key="review.comment" data-i18n-text>Comment</label>
|
|
1482
|
+
<textarea class="mlcad-review-comment" rows="2"></textarea>
|
|
1483
|
+
</div>
|
|
1484
|
+
<div class="mlcad-review-detail-actions">
|
|
1485
|
+
<button type="button" class="mlcad-review-zoom" data-i18n-key="review.zoomTo" data-i18n-text>Zoom to</button>
|
|
1486
|
+
<button type="button" class="mlcad-review-delete" data-i18n-key="review.delete" data-i18n-text>Delete</button>
|
|
1487
|
+
</div>
|
|
1488
|
+
</div>
|
|
1489
|
+
</div>`}function fs(){return`<div id="mlcad-measure-drawer" role="dialog" data-i18n-attr="aria-label" data-i18n-key="measurePanel.title" aria-label="Measurements" hidden>
|
|
1490
|
+
${ze("mlcad-measure-sheet-close","measurePanel.close","Close measurements")}
|
|
1491
|
+
<div class="mlcad-drawer-header">
|
|
1492
|
+
<span data-i18n-key="measurePanel.title" data-i18n-text>Measurements</span>
|
|
1493
|
+
<button type="button" class="mlcad-drawer-close" id="mlcad-measure-close" data-i18n-key="measurePanel.close" data-i18n-attr="aria-label" aria-label="Close measurements">×</button>
|
|
1494
|
+
</div>
|
|
1495
|
+
<div class="mlcad-measure-toolbar">
|
|
1496
|
+
<div class="mlcad-measure-filter" role="group" data-i18n-key="measurePanel.filterGroup" data-i18n-attr="aria-label" aria-label="Filter by type">
|
|
1497
|
+
<button type="button" class="mlcad-measure-filter-btn" data-measure-filter="distance" aria-pressed="false" data-i18n-key="measurePanel.filterDistance" data-i18n-text data-i18n-attr="title aria-label" title="Distance">Distance</button>
|
|
1498
|
+
<button type="button" class="mlcad-measure-filter-btn" data-measure-filter="arc" aria-pressed="false" data-i18n-key="measurePanel.filterArc" data-i18n-text data-i18n-attr="title aria-label" title="Arc">Arc</button>
|
|
1499
|
+
<button type="button" class="mlcad-measure-filter-btn" data-measure-filter="radius" aria-pressed="false" data-i18n-key="measurePanel.filterRadius" data-i18n-text data-i18n-attr="title aria-label" title="Radius">Radius</button>
|
|
1500
|
+
<button type="button" class="mlcad-measure-filter-btn" data-measure-filter="angle" aria-pressed="false" data-i18n-key="measurePanel.filterAngle" data-i18n-text data-i18n-attr="title aria-label" title="Angle">Angle</button>
|
|
1501
|
+
<button type="button" class="mlcad-measure-filter-btn" data-measure-filter="area" aria-pressed="false" data-i18n-key="measurePanel.filterArea" data-i18n-text data-i18n-attr="title aria-label" title="Area">Area</button>
|
|
1502
|
+
</div>
|
|
1503
|
+
<button type="button" class="mlcad-measure-clear" data-i18n-key="measurePanel.clear" data-i18n-text>Clear all</button>
|
|
1504
|
+
</div>
|
|
1505
|
+
<div class="mlcad-measure-table-wrap">
|
|
1506
|
+
<table class="mlcad-measure-table">
|
|
1507
|
+
<thead>
|
|
1508
|
+
<tr>
|
|
1509
|
+
<th data-measure-col="type" data-i18n-key="measurePanel.type" data-i18n-text>Type</th>
|
|
1510
|
+
<th data-measure-col="value" data-i18n-key="measurePanel.value" data-i18n-text>Value</th>
|
|
1511
|
+
<th></th>
|
|
1512
|
+
</tr>
|
|
1513
|
+
</thead>
|
|
1514
|
+
<tbody></tbody>
|
|
1515
|
+
</table>
|
|
1516
|
+
</div>
|
|
1517
|
+
</div>`}function hs(t,e){var a;const r=e.title??t.meta.title??"CAD Drawing",n=e.encoded??ar(t),i=e.viewerRuntime,o=Ti(),s=n.compression,l=((a=e.accessManifest)==null?void 0:a.encrypted)===!0,c=`#${t.meta.background.toString(16).padStart(6,"0")}`,d=Ie(t.meta.locale)??"en",u=t.meta.viewerMode??"measure",p=t.meta.exportLayouts!==!1,m=e.accessManifest?` <script id="mlcad-access" type="application/json">${yr(JSON.stringify(e.accessManifest))}<\/script>
|
|
1518
|
+
`:"",f=l?`${o}+aes-gcm;base85`:`${o}+${s};base85`;return`<!DOCTYPE html>
|
|
1519
|
+
<html lang="${d}">
|
|
1520
|
+
<head>
|
|
1521
|
+
<meta charset="utf-8" />
|
|
1522
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
1523
|
+
<meta name="generator" content="mlightcad-cad-html-plugin" />
|
|
1524
|
+
<title>${wr(r)}</title>
|
|
1525
|
+
<style>${Le}</style>
|
|
1526
|
+
</head>
|
|
1527
|
+
<body>
|
|
1528
|
+
${Fe(c,u,p)}
|
|
1529
|
+
${m} <script id="mlcad-snapshot" type="${f}">${n.payload}<\/script>
|
|
1530
|
+
<script>${xr(i)}<\/script>
|
|
1531
|
+
</body>
|
|
1532
|
+
</html>`}function gs(t,e){var a;const r=e.title??t.meta.title??"CAD Drawing",n=e.viewerRuntime,i=`#${t.meta.background.toString(16).padStart(6,"0")}`,o=Ie(t.meta.locale)??"en",s=t.meta.viewerMode??"measure",l=t.meta.exportLayouts!==!1,c=(a=e.manifestUrl)==null?void 0:a.trim(),d=JSON.stringify(c&&c!==ns?{manifestUrl:c}:{});return`<!DOCTYPE html>
|
|
1533
|
+
<html lang="${o}">
|
|
1534
|
+
<head>
|
|
1535
|
+
<meta charset="utf-8" />
|
|
1536
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
1537
|
+
<meta name="generator" content="mlightcad-cad-html-plugin" />
|
|
1538
|
+
<title>${wr(r)}</title>
|
|
1539
|
+
<style>${Le}</style>
|
|
1540
|
+
</head>
|
|
1541
|
+
<body>
|
|
1542
|
+
${Fe(i,s,l)}
|
|
1543
|
+
<script id="mlcad-package" type="application/json">${yr(d)}<\/script>
|
|
1544
|
+
<script>${xr(n)}<\/script>
|
|
1545
|
+
</body>
|
|
1546
|
+
</html>`}function wr(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function xr(t){return t.replace(/<\/script/gi,"<\\/script")}function yr(t){return t.replace(/</g,"\\u003c")}const bs=1,ws=1e5,xs=16,ys=12;function vs(t,e=Date.now(),a){return t==="never"?null:t==="custom"?a??null:e+t*24*60*60*1e3}function vr(t){var e;const a=!!((e=t.password)!=null&&e.trim());return t.expiresAt!=null||a}function Nt(t){var e;if(!vr(t))return;const a=!!((e=t.password)!=null&&e.trim());return{v:bs,expiresAt:t.expiresAt,encrypted:a,...a&&t.salt?{salt:t.salt}:{}}}async function kr(t,e){const a=crypto.getRandomValues(new Uint8Array(xs));return{key:await Bs(t,a),salt:Ar(a)}}async function Pe(t,e){const a=crypto.getRandomValues(new Uint8Array(ys)),r=new Uint8Array(e),n=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:a},t,r)),i=new Uint8Array(a.length+n.length);return i.set(a,0),i.set(n,a.length),i}async function ks(t,e,a="base85"){const{key:r,salt:n}=await kr(t),i=pi(e,a),o=await Pe(r,i);return{encryptedPayload:Tt(o,a),salt:n}}function As(t){return Ar(t)}async function Ms(t,e){var a;if(!vr(e))return{encoded:t};const r=(a=e.password)==null?void 0:a.trim();if(r){const{encryptedPayload:n,salt:i}=await ks(r,t.payload);return{encoded:{payload:n,compression:t.compression},manifest:Nt({expiresAt:e.expiresAt,password:r,salt:i})}}return{encoded:t,manifest:Nt({expiresAt:e.expiresAt})}}async function Bs(t,e){const a=new TextEncoder,r=await crypto.subtle.importKey("raw",a.encode(t),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:new Uint8Array(e),iterations:ws,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}function Ar(t){let e="";for(let a=0;a<t.length;a++)e+=String.fromCharCode(t[a]);return btoa(e)}const Ss=256;function Cs(t,e=jt){return!(e>0)||we(t)<=e?[t]:t.indices&&t.indices.length>=2?Ls(t,e):Es(t,e)}function Is(t,e=jt){return t.texture?[t]:!(e>0)||xe(t)<=e?[t]:t.points?zs(t,e):!t.indices||t.indices.length<3?Br(t,e):Hs(t,e)}function Mr(t){return t.linePattern?64+t.linePattern.pattern.length*8:0}function He(t){return(t.hatchPattern?128:0)+(t.gradientFill?64:0)}function Bt(t,e,a){const r=t-Ss-e;return r<a?1:Math.max(1,Math.floor(r/a))}function Es(t,e){var a;const r=(((a=t.lineDistances)==null?void 0:a.length)??0)>=2,n=24+(r?8:0),i=Bt(e,Mr(t),n),o=t.positions.length/6|0;if(o<=1)return[t];const s=[];for(let l=0;l<o;l+=i){const c=Math.min(i,o-l),d=l*6,u={layer:t.layer,color:t.color,offset:t.offset,positions:t.positions.slice(d,d+c*6)};if(Ir(t,u),r&&t.lineDistances){const p=l*2;u.lineDistances=t.lineDistances.slice(p,p+c*2)}s.push(u)}return s.length>0?s:[t]}function Ls(t,e){var a;const r=t.indices,n=32+((((a=t.lineDistances)==null?void 0:a.length)??0)>0?8:0),i=Bt(e,Mr(t),n),o=[];for(let s=0;s+1<r.length;){const l=Math.min(i*2,r.length-s),c=l-l%2;if(c<2)break;o.push(Fs(t,s,c)),s+=c}return o.length>0?o:[t]}function Fs(t,e,a){const r=Cr(t.positions,t.indices.subarray(e,e+a),t.lineDistances?[t.lineDistances]:[],[1]),n={layer:t.layer,color:t.color,offset:t.offset,positions:r.positions,indices:r.indices};return Ir(t,n),r.attributes[0]&&r.attributes[0].length>0&&(n.lineDistances=r.attributes[0]),n}function zs(t,e){return t.indices&&t.indices.length>0?Ps(t,e):Br(t,e)}function Ps(t,e){const a=t.indices,r=16+(t.uvs?8:0)+(t.gradientPositions?8:0),n=Bt(e,He(t),r),i=[];for(let o=0;o<a.length;){const s=Math.min(n,a.length-o);if(s<1)break;i.push(Sr(t,o,s)),o+=s}return i.length>0?i:[t]}function Br(t,e){const a=t.positions.length/3|0;if(a<=1)return[t];const r=12+(t.uvs?8:0)+(t.gradientPositions?8:0),n=Bt(e,He(t),r),i=t.points?1:3,o=Math.max(i,n-n%i),s=[];for(let l=0;l<a;l+=o){const c=Math.min(o,a-l),d=c-c%i;if(d<i)break;s.push(Us(t,l,d))}return s.length>0?s:[t]}function Hs(t,e){const a=t.indices,r=48+(t.uvs?24:0)+(t.gradientPositions?24:0),n=Bt(e,He(t),r),i=[];for(let o=0;o+2<a.length;){const s=Math.min(n*3,a.length-o),l=s-s%3;if(l<3)break;i.push(Sr(t,o,l)),o+=l}return i.length>0?i:[t]}function Us(t,e,a){const r=e*3,n={layer:t.layer,color:t.color,offset:t.offset,positions:t.positions.slice(r,r+a*3)};return Er(t,n),t.uvs&&(n.uvs=t.uvs.slice(e*2,(e+a)*2)),t.gradientPositions&&(n.gradientPositions=t.gradientPositions.slice(e*2,(e+a)*2)),n}function Sr(t,e,a){const r=[],n=[];t.uvs&&(r.push(t.uvs),n.push(2)),t.gradientPositions&&(r.push(t.gradientPositions),n.push(2));const i=Cr(t.positions,t.indices.subarray(e,e+a),r,n),o={layer:t.layer,color:t.color,offset:t.offset,positions:i.positions,indices:i.indices};Er(t,o);let s=0;return t.uvs&&(o.uvs=i.attributes[s++]),t.gradientPositions&&(o.gradientPositions=i.attributes[s]),o}function Cr(t,e,a,r){const n=new Map,i=[],o=new Uint32Array(e.length),s=a.map(()=>[]);for(let l=0;l<e.length;l++){const c=e[l];let d=n.get(c);if(d==null){d=n.size,n.set(c,d);const u=c*3;i.push(t[u]??0,t[u+1]??0,t[u+2]??0);for(let p=0;p<a.length;p++){const m=r[p],f=a[p],h=c*m;for(let g=0;g<m;g++)s[p].push(f[h+g]??0)}}o[l]=d}return{positions:Float32Array.from(i),indices:o,attributes:s.map(l=>Float32Array.from(l))}}function Ir(t,e){t.linePattern&&(e.linePattern=t.linePattern),t.lineWidth!=null&&(e.lineWidth=t.lineWidth),t.renderOrder!=null&&(e.renderOrder=t.renderOrder),t.excludeFromOsnap&&(e.excludeFromOsnap=!0)}function Er(t,e){t.hatchPattern&&(e.hatchPattern=t.hatchPattern),t.gradientFill&&(e.gradientFill=t.gradientFill),t.side!=null&&(e.side=t.side),t.renderOrder!=null&&(e.renderOrder=t.renderOrder),t.points&&(e.points=!0)}function Ns(t,e,a=jt){const r=[];let n={lineBatches:[],meshBatches:[],estimatedBytes:64};const i=()=>{n.lineBatches.length===0&&n.meshBatches.length===0&&r.length>0||(r.push(n),n={lineBatches:[],meshBatches:[],estimatedBytes:64})},o=c=>{const d=we(c);n.estimatedBytes+d>e&&(n.lineBatches.length>0||n.meshBatches.length>0)&&i(),n.lineBatches.push(c),n.estimatedBytes+=d},s=c=>{const d=xe(c);n.estimatedBytes+d>e&&(n.lineBatches.length>0||n.meshBatches.length>0)&&i(),n.meshBatches.push(c),n.estimatedBytes+=d},l=Math.min(e,a);for(const c of t.lineBatches)for(const d of Cs(c,l))o(d);for(const c of t.meshBatches)for(const d of Is(c,l))s(d);return(r.length===0||n.lineBatches.length>0||n.meshBatches.length>0)&&i(),r.length===0&&r.push({lineBatches:[],meshBatches:[],estimatedBytes:64}),r}function _s(t,e){if(t.version!==Y)throw new Error(`Unsupported snapshot version: ${t.version}`);const a=e.maxChunkBytes??br,r=e.maxBatchBytes??jt,n=e.maxOsnapChunkBytes??a,i=e.compressChunks!==!1,o=i?"acex.gz":"acex",s=i?"osnap.gz":"osnap",l=$t,c=Os(t.layouts,t.activeLayoutBtrId),d=[],u=[],p=new Map;return c.forEach((m,f)=>{var h;p.set(m.btrId,f);const g=Ns(m,a,r),w=[];g.forEach((k,M)=>{const I=`L${f}-${String(M).padStart(3,"0")}`,S=`chunks/${I}.${o}`;w.push(I),d.push({kind:"geometry",id:I,href:S,layoutBtrId:m.btrId,lineBatchCount:k.lineBatches.length,meshBatchCount:k.meshBatches.length,chunk:{version:Y,layoutBtrId:m.btrId,lineBatches:k.lineBatches,meshBatches:k.meshBatches}})});const b={btrId:m.btrId,name:m.name,isModelSpace:m.isModelSpace,viewports:m.viewports,...m.savedView?{savedView:m.savedView}:{},...m.fitExtents?{fitExtents:m.fitExtents}:{},chunkIds:w},A=(h=m.osnap)==null?void 0:h.primitives;if(A&&A.length>0){const k=Li(A,n),M=[];k.forEach((I,S)=>{const y=`L${f}-osnap-${String(S).padStart(3,"0")}`,v=`chunks/${y}.${s}`;M.push(y),d.push({kind:"osnap",id:y,href:v,layoutBtrId:m.btrId,primitiveCount:I.length,primitives:I})}),b.osnapChunkIds=M}u.push(b)}),{jobs:d,layoutRefs:u,layoutIndexByBtrId:p,manifestFileName:l,compressChunks:i}}function Ds(t,e,a,r,n){var i,o;const s=[],l=[],c=[];for(const w of n){const{job:b,uncompressedByteLength:A,compressed:k}=w;c.push({path:b.href,bytes:k}),b.kind==="geometry"?s.push({id:b.id,href:b.href,layoutBtrId:b.layoutBtrId,byteLength:A,compressedByteLength:k.byteLength,lineBatchCount:b.lineBatchCount,meshBatchCount:b.meshBatchCount}):l.push({id:b.id,href:b.href,layoutBtrId:b.layoutBtrId,byteLength:A,compressedByteLength:k.byteLength,primitiveCount:b.primitiveCount})}const d=t.layouts.map(w=>{const b=a.get(w.btrId);return e[b]}),u=new Set(((i=d.find(w=>w.btrId===t.activeLayoutBtrId))==null?void 0:i.chunkIds)??[]),p=[...s.filter(w=>u.has(w.id)),...s.filter(w=>!u.has(w.id))],m=new Set(((o=d.find(w=>w.btrId===t.activeLayoutBtrId))==null?void 0:o.osnapChunkIds)??[]),f=[...l.filter(w=>m.has(w.id)),...l.filter(w=>!m.has(w.id))],h={format:"acex-package",packageVersion:es,snapshotVersion:Y,meta:t.meta,layers:t.layers,activeLayoutBtrId:t.activeLayoutBtrId,layouts:d,chunks:p,...f.length>0?{osnapChunks:f}:{}},g=`${JSON.stringify(h)}
|
|
1547
|
+
`;return c.unshift({path:r,bytes:vt(g)}),{manifest:h,manifestFileName:r,files:c}}async function Ts(t,e){if(t.kind==="geometry"){if(!e){const o=gr(t.chunk);return{job:t,uncompressedByteLength:o.byteLength,compressed:o}}const{uncompressed:n,compressed:i}=await ts(t.chunk);return{job:t,uncompressedByteLength:n.byteLength,compressed:i}}if(!e){const n=ye({primitives:t.primitives});return{job:t,uncompressedByteLength:n.byteLength,compressed:n}}const{uncompressed:a,compressed:r}=await Fi({primitives:t.primitives});return{job:t,uncompressedByteLength:a.byteLength,compressed:r}}async function Lr(t,e={}){const{jobs:a,layoutRefs:r,layoutIndexByBtrId:n,manifestFileName:i,compressChunks:o}=_s(t,e),s=await Promise.all(a.map(l=>Ts(l,o)));return Ds(t,r,n,i,s)}async function Rs(t,e){const a=await Lr(t,e),r=gs(t,{title:t.meta.title,viewerRuntime:e.viewerRuntime,...e.manifestUrl?{manifestUrl:e.manifestUrl}:{}});return{html:r,manifest:a.manifest,manifestFileName:a.manifestFileName,files:[{path:"viewer.html",bytes:vt(r)},...a.files]}}function Os(t,e){const a=t.find(n=>n.btrId===e),r=t.filter(n=>n.btrId!==e);return a?[a,...r]:[...t]}const js="application/vnd.mlightcad.acex-chunk;base85",$s="application/vnd.mlightcad.acex-chunk+aes-gcm;base85",Fr="data-acex-href";function Vs(t){var e;let a=0;for(const r of t.layouts){for(const i of r.lineBatches)a+=we(i);for(const i of r.meshBatches)a+=xe(i);const n=(e=r.osnap)==null?void 0:e.primitives;if(n)for(const i of n)a+=er(i)}return a}function Xs(t,e=as){return Vs(t)>=e}async function Ys(t,e){var a;const r=e.title??t.meta.title??"CAD Drawing",n=e.viewerRuntime,i=`#${t.meta.background.toString(16).padStart(6,"0")}`,o=Ie(t.meta.locale)??"en",s=t.meta.viewerMode??"measure",l=t.meta.exportLayouts!==!1,c=e.expiresAt??null,d=((a=e.password)==null?void 0:a.trim())||void 0,u={maxChunkBytes:e.maxChunkBytes??Ba,maxBatchBytes:e.maxBatchBytes??e.maxChunkBytes??Ba,maxOsnapChunkBytes:e.maxOsnapChunkBytes??rs},p=await Lr(t,u);let m,f,h;if(d){const{key:w,salt:b}=await kr(d);m=Nt({expiresAt:c,password:d,salt:b});const A=new TextEncoder().encode(`${JSON.stringify(p.manifest)}
|
|
1548
|
+
`),k=await Pe(w,A);f={mode:"embedded",encrypted:!0,encryptedManifest:As(k)},h=await Gs(p.files,w)}else m=Nt({expiresAt:c}),f={mode:"embedded",manifest:p.manifest},h=Ws(p.files);const g=m?` <script id="mlcad-access" type="application/json">${Sa(JSON.stringify(m))}<\/script>
|
|
1549
|
+
`:"";return`<!DOCTYPE html>
|
|
1550
|
+
<html lang="${o}">
|
|
1551
|
+
<head>
|
|
1552
|
+
<meta charset="utf-8" />
|
|
1553
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
1554
|
+
<meta name="generator" content="mlightcad-cad-html-plugin" />
|
|
1555
|
+
<title>${zr(r)}</title>
|
|
1556
|
+
<style>${Le}</style>
|
|
1557
|
+
</head>
|
|
1558
|
+
<body>
|
|
1559
|
+
${Fe(i,s,l)}
|
|
1560
|
+
${g} <script id="mlcad-package" type="application/json">${Sa(JSON.stringify(f))}<\/script>
|
|
1561
|
+
${h} <script>${Ks(n)}<\/script>
|
|
1562
|
+
</body>
|
|
1563
|
+
</html>`}function Ws(t){const e=[];for(const a of t)a.path!==$t&&e.push(` <script type="${js}" ${Fr}="${Pr(a.path)}">${Tt(a.bytes,"base85")}<\/script>
|
|
1564
|
+
`);return e.join("")}async function Gs(t,e){const a=[];for(const r of t){if(r.path===$t)continue;const n=await Pe(e,r.bytes);a.push(` <script type="${$s}" ${Fr}="${Pr(r.path)}">${Tt(n,"base85")}<\/script>
|
|
1565
|
+
`)}return a.join("")}function zr(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Pr(t){return zr(t).replace(/'/g,"'")}function Ks(t){return t.replace(/<\/script/gi,"<\\/script")}function Sa(t){return t.replace(/</g,"\\u003c")}function Js(t){return!t||t.startsWith("/")||t.includes("\\")||t.includes("\0")?!1:t.split("/").every(e=>e.length>0&&e!=="."&&e!==".."&&/^[A-Za-z0-9._-]+$/.test(e))}function Zs(t){return t.endsWith(".gz")}function qs(t){const e={};for(const a of t.files){if(!Js(a.path))throw new Error(`Unsafe package path: ${a.path}`);Zs(a.path)?e[a.path]=[a.bytes,{level:0}]:e[a.path]=[a.bytes,{level:6}]}return mi(e)}const Vt=0,Ue=16777215;function Hr(t){return t==="white"||t==="space"?t:"black"}function Qs(t){return t==="white"?Ue:Vt}function Ca(t,e,a){return t==="space"?e?Vt:Ue:a>>>0}function Ia(t){const e=t>>>0,a=e>>16&255,r=e>>8&255,n=e&255;return(a*299+r*587+n*114)/1e3>=128}function tl(t){const e=t>>>0,a=e>>16&255,r=e>>8&255,n=e&255,i=Math.max(a,r,n),o=Math.min(a,r,n);return i-o>16?null:i<=40?Ue:o>=215?Vt:null}function It(t){return tl(t)??t}function Ur(t,e,a){if(Ia(e)!==Ia(a)){for(const r of t.lineBatches)r.color=It(r.color);for(const r of t.meshBatches){if(r.texture)continue;r.color=It(r.color);const n=r.gradientFill;n&&(n.startColor=It(n.startColor),n.endColor=It(n.endColor))}}}function el(t,e,a){const r=a>>>0;t.meta.background=r;for(const n of t.layouts)Ur(n,e,r)}function al(t,e,a){const r=Hr(a);if(t.meta.backgroundMode=r,r==="space"){for(const i of t.layouts)Ur(i,e,Ca("space",i.isModelSpace,0));const n=t.layouts.find(i=>i.btrId===t.activeLayoutBtrId);t.meta.background=Ca("space",n==null||n.isModelSpace,Vt);return}el(t,e,Qs(r)),t.meta.backgroundMode=r}const Nr="https://mlightcad.com/cad-viewer/docs/";let _r=Tr(Nr);function Dr(){return _r}function rl(t){_r=Tr(t)}function Tr(t){const e=t.trim();return e?e.replace(/\/+$/,""):Nr.replace(/\/+$/,"")}function Ne(t,e,a){var r;if(e===a)return!1;const n=(r=t.tables)==null?void 0:r.blockTable,i=typeof(n==null?void 0:n.getIdAt)=="function"?n.getIdAt(e):void 0;if(!(i!=null&&i.newIterator))return!0;for(const o of i.newIterator()){if(o instanceof Na){if(_a.isDefaultPaperSpaceViewport(o))continue;return!1}return!1}return!0}function nl(){return{minX:0,minY:0,maxX:0,maxY:0,valid:!1}}function il(t,e,a){if(e.length<3)return;const r=a[0],n=a[1];for(let i=0;i+2<e.length;i+=3){const o=ma(e[i],r),s=ma(e[i+1],n);t.valid?(o<t.minX&&(t.minX=o),o>t.maxX&&(t.maxX=o),s<t.minY&&(t.minY=s),s>t.maxY&&(t.maxY=s)):(t.minX=t.maxX=o,t.minY=t.maxY=s,t.valid=!0)}}function Ea(t,e){il(t,e.positions,e.offset)}function ol(t){return t.valid?{minX:t.minX,minY:t.minY,maxX:t.maxX,maxY:t.maxY}:null}function sl(t,e){const a=nl();for(const r of t)Ea(a,r);for(const r of e)Ea(a,r);return ol(a)}function Rr(t,e){return t?e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t:e??null}function ll(t){if(!t||t.length===0)return null;let e=null;for(const a of t)e=Rr(e,a.paper);return e}function Or(t){return Rr(sl(t.lineBatches,t.meshBatches),ll(t.viewports))}function cl(t,e,a){if(a)return;const r=ul(t,e);if(!(r!=null&&r.newIterator))return;const n=[];for(const i of r.newIterator()){if(!(i instanceof Na)||_a.isDefaultPaperSpaceViewport(i)||typeof i.toGiViewport!="function")continue;const o=i.toGiViewport(),s=o.box,l=o.viewBox,c=La(s),d=La(l);if(!c||!d)continue;const u=Number.isFinite(o.viewTwistAngle)?o.viewTwistAngle:i.viewTwistAngle,p=dl(o,i),m={paper:c,model:d};Number.isFinite(u)&&Math.abs(u)>1e-12&&(m.twist=u),p.length>0&&(m.frozenLayers=p),n.push(m)}return n.length>0?n:void 0}function dl(t,e){var a;const r=t.frozenLayers;if(r&&r.length>0)return[...r];const n=e.frozenLayerIds;if(!(n!=null&&n.length))return[];const i=(a=e.database)==null?void 0:a.tables.layerTable;if(!i)return[];const o=[];for(const s of n){const l=i.getIdAt(s);l&&o.push(l.name)}return o}function La(t){if(typeof t.isEmpty=="function"&&t.isEmpty())return;const e=t.min.x,a=t.min.y,r=t.max.x,n=t.max.y;if(!(!Number.isFinite(e)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)||r-e<=0||n-a<=0))return{minX:e,minY:a,maxX:r,maxY:n}}function ul(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(!r)return;const n=typeof r.getIdAt=="function"?r.getIdAt(e):void 0;if(n)return n;if(typeof r.newIterator=="function"){for(const o of r.newIterator())if(o.objectId===e)return o}const i=r.modelSpace;if((i==null?void 0:i.objectId)===e)return i}const Fa=16/9;function ml(t,e,a,r=Fa){var n,i,o,s;const l=Number.isFinite(r)&&r>0?r:Fa;if(a){const d=(o=(i=(n=t.tables)==null?void 0:n.viewportTable)==null?void 0:i.getActiveVportBox)==null?void 0:o.call(i,l);return za(d)}const c=(s=t.objects)==null?void 0:s.layout;if(c!=null&&c.newIterator){for(const d of c.newIterator())if(d.blockTableRecordId===e)return za(d.limits)}}function za(t){if(!t||typeof t.isEmpty=="function"&&t.isEmpty())return;const e=t.min.x,a=t.min.y,r=t.max.x,n=t.max.y;if(!(!Number.isFinite(e)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)||r-e<=0||n-a<=0))return{minX:e,minY:a,maxX:r,maxY:n}}function jr(t){var e;const a=(e=t.objects)==null?void 0:e.layout;if(!(a!=null&&a.newIterator))return[];const r=[];for(const n of a.newIterator()){const i=n.blockTableRecordId;i&&r.push({name:n.layoutName||i,tabOrder:n.tabOrder??0,blockTableRecordId:i})}return r.sort((n,i)=>n.tabOrder-i.tabOrder),r}function pl(t,e,a={}){return hl(t,e,a)}async function fl(t,e,a={}){const r=a.yieldBetweenLayouts;r&&await r();const n=a.exportInvisibleLayers!==!1,i=a.exportLayouts!==!1,o=a.exportEmptyLayouts===!0,s=n?void 0:h=>_e(e,h,n),l=cr(t,{title:a.title,background:a.background}),c=$r(e,n),d=jr(t),u=new Map(d.map(h=>[h.blockTableRecordId,h.name])),p=Yr(t,e,i,o),m=Xr(t,e,d,i,o),f=[];for(const h of m)f.push(Wr(t,e,h,u,a,s)),r&&await r();return{version:Y,meta:Vr(l,a,f,p),layers:c,layouts:f,activeLayoutBtrId:p}}function hl(t,e,a){const r=a.exportInvisibleLayers!==!1,n=a.exportLayouts!==!1,i=a.exportEmptyLayouts===!0,o=r?void 0:f=>_e(e,f,r),s=cr(t,{title:a.title,background:a.background}),l=$r(e,r),c=jr(t),d=new Map(c.map(f=>[f.blockTableRecordId,f.name])),u=Yr(t,e,n,i),p=Xr(t,e,c,n,i),m=[];for(const f of p)m.push(Wr(t,e,f,d,a,o));return{version:Y,meta:Vr(s,a,m,u),layers:l,layouts:m,activeLayoutBtrId:u}}function $r(t,e){const a=[];for(const r of t.layers)_e(t,r.name,e)&&a.push({name:r.name,color:r.color,visible:r.visible});return a}function Vr(t,e,a,r){const n=a.find(s=>s.btrId===r)??a[0],i=n?Or(n):null,o=e.initialView??"fit";return{title:t.title,createdAt:new Date().toISOString(),extents:t.extents,viewExtents:i??void 0,units:t.units,grip:t.grip,background:t.background,locale:e.locale??"en",initialView:o,viewState:o==="current"?e.viewState:void 0,viewerMode:e.viewerMode??"measure",exportLayouts:e.exportLayouts!==!1,docsBaseUrl:e.docsBaseUrl??Dr()}}function gl(t){return(t.viewerMode??"measure")==="measure"}function _e(t,e,a){if(a)return!0;const r=t.layers.find(n=>n.name===e);return r?r.visible:!0}function Xr(t,e,a,r,n){if(!r){const l=e.layouts.find(c=>c.btrId===e.modelSpaceBtrId);return l?[l]:[]}const i=new Map(e.layouts.map(l=>[l.btrId,l])),o=new Set,s=[];for(const l of a){if(o.has(l.blockTableRecordId)||(o.add(l.blockTableRecordId),!n&&Ne(t,l.blockTableRecordId,e.modelSpaceBtrId)))continue;const c=i.get(l.blockTableRecordId);s.push(c??{btrId:l.blockTableRecordId,name:l.name,isModelSpace:l.blockTableRecordId===e.modelSpaceBtrId,layers:[]})}if(!s.some(l=>l.btrId===e.modelSpaceBtrId)){const l=i.get(e.modelSpaceBtrId);s.unshift(l??{btrId:e.modelSpaceBtrId,isModelSpace:!0,layers:[]})}return s}function Yr(t,e,a,r){if(!a)return e.modelSpaceBtrId;const n=e.activeLayoutBtrId||e.modelSpaceBtrId;return r||!Ne(t,n,e.modelSpaceBtrId)?n:e.modelSpaceBtrId}function Wr(t,e,a,r,n,i){const o=[],s=[],l=e.frozenLayers&&e.frozenLayers.length>0?new Set(e.frozenLayers):void 0;for(const f of a.layers){if(i&&!i(f.name))continue;const h=wo(f.root,{geometryLayerName:f.name,insertLayerByObjectId:a.insertLayerByObjectId,frozenLayers:l});for(const g of h.lineBatches)g.layer||(g.layer=f.name);for(const g of h.meshBatches)g.layer||(g.layer=f.name);o.push(...h.lineBatches),s.push(...h.meshBatches)}const c=a.isModelSpace||a.btrId===e.modelSpaceBtrId,d=ml(t,a.btrId,c,n.canvasAspectRatio),u=cl(t,a.btrId,c),p=Or({lineBatches:o,meshBatches:s,viewports:u})??void 0;let m;if(gl(n)){const f=performance.now();m=Jo(t,a.btrId,{includeLayer:i}),console.log(`[chtml] osnap catalog ${r.get(a.btrId)??a.name??a.btrId}: ${(performance.now()-f).toFixed(0)} ms (${(m==null?void 0:m.primitives.length)??0} primitives)`)}return{btrId:a.btrId,name:r.get(a.btrId)??a.name??bl(t,a.btrId),isModelSpace:c,lineBatches:o,meshBatches:s,osnap:m,viewports:u,...d?{savedView:d}:{},...p?{fitExtents:p}:{}}}function bl(t,e){var a;const r=(a=t.tables)==null?void 0:a.blockTable;if(r!=null&&r.newIterator){for(const n of r.newIterator())if(n.objectId===e)return n.name}return e}const wl=400,De=10,Te=1,Gr=64;function _t(t){return Math.floor(t)*1024*1024}function Kr(t){return Math.max(Te,Math.round(t/(1024*1024)))}function Jr(t){return Number.isFinite(t)?Math.min(Gr,Math.max(Te,Math.floor(t))):De}function G(t={}){var e;const a=t.exportFormat==="multi"?"multi":"single",r=a==="multi"?_t(Jr(t.maxChunkBytes!=null?Kr(t.maxChunkBytes):De)):br;return{exportFormat:a,exportInvisibleLayers:t.exportInvisibleLayers!==!1,exportLayouts:t.exportLayouts!==!1,exportEmptyLayouts:t.exportEmptyLayouts===!0,background:Hr(t.background),initialView:t.initialView??"fit",viewerMode:t.viewerMode??"measure",expiryDays:a==="multi"?"never":t.expiryDays??"never",expiresAt:a==="multi"?null:t.expiresAt??null,password:a==="multi"?"":((e=t.password)==null?void 0:e.trim())??"",maxChunkBytes:r,compressChunks:a==="multi"?t.compressChunks!==!1:!0}}function xl(t){const e=t.maxChunkBytes??_t(De),a=t.compressChunks!==!1;return{maxChunkBytes:e,maxBatchBytes:e,maxOsnapChunkBytes:e,compressChunks:a}}function yl(t){const e=t.activeLayoutView,a=e.center,r=e.trCamera.zoom,n=Math.max(e.height,1),i=r*(2*wl)/n;return{centerX:a.x,centerY:a.y,zoom:i}}const vl="./viewer-runtime.iife.js";let Mt={};function kl(t){Mt={...Mt,...t}}function Al(){return{...Mt}}function Ml(t){return t!=null?String(t):Mt.viewerRuntimeUrl!=null?String(Mt.viewerRuntimeUrl):vl}class Bl{build(e,a,r={}){return pl(a,Ha(e),Pa(r))}async buildAsync(e,a,r={}){return fl(a,Ha(e),{...Pa(r),yieldBetweenLayouts:()=>$()})}}function Pa(t){return{title:t.title,background:t.background,locale:t.locale??x.currentLocale,exportInvisibleLayers:t.exportInvisibleLayers,exportLayouts:t.exportLayouts,exportEmptyLayouts:t.exportEmptyLayouts,initialView:t.initialView,viewState:t.viewState,viewerMode:t.viewerMode,canvasAspectRatio:t.canvasAspectRatio,docsBaseUrl:Sl()}}function Sl(){try{rl(Jn())}catch{}return Dr()}function Ha(t){const e=[...t.layers.values()].map(n=>({name:n.name,color:n.color.RGB??16777215,visible:!n.isOff&&!n.isFrozen})),a=[...t.layers.values()].filter(n=>n.isFrozen).map(n=>n.name),r=[...t.layouts.entries()].map(([n,i])=>({btrId:n,isModelSpace:n===t.modelSpaceBtrId,layers:[...i.layers.values()].map(o=>({name:o.name,root:o.internalObject})),insertLayerByObjectId:i.insertLayerByObjectId}));return{layers:e,frozenLayers:a,layouts:r,activeLayoutBtrId:t.activeLayoutBtrId||t.modelSpaceBtrId,modelSpaceBtrId:t.modelSpaceBtrId}}function tt(t,e){console.log(`[chtml] ${t}: ${e.toFixed(0)} ms`)}function Ua(t,e){const a=t.cadScene;for(const r of a.layers.values())if(r.isFrozen)for(const n of a.layouts.values())n.applyInsertLayerFreeze(r.name,e);t.isDirty=!0}function Cl(t,e,a){if(t.initialView!=="current")return!1;const r=e.activeLayoutBtrId===e.modelSpaceBtrId;return!(!t.exportLayouts&&!r||!t.exportEmptyLayouts&&!r&&Ne(a,e.activeLayoutBtrId,e.modelSpaceBtrId))}class Il{constructor(e={}){this.options=e,this._snapshotBuilder=new Bl}async prepareAcTrView2dForHtmlExport(e,a={}){if(!e||!("cadScene"in e)||!e.cadScene)throw new Error("CAD scene is not available. Open a drawing before exporting to HTML.");if(!(e instanceof Gn))throw new Error("HTML export requires a 2D CAD view. Open a drawing before exporting.");const r=G(a),n={includeInvisibleLayers:r.exportInvisibleLayers,includeLayouts:r.exportLayouts};return await e.ensureEntitiesConvertedForExport(n),await $(),e}async exportToResult(e,a={},r){const n=K.instance,i=G(a),o=performance.now();let s;return await n.withBusyIndicator(async()=>{s=await this.buildExportResult(e,i,r),tt("chtml total",performance.now()-o)}),s}async convert(e,a={},r){const n=await this.exportToResult(e,a,r);this.downloadBytes(n.bytes,n.fileName,n.mediaType)}async buildExportResult(e,a,r){const n=K.instance;await $();const i=n.curDocument;let o=performance.now();const s=await this.prepareAcTrView2dForHtmlExport(r??n.curView,a);tt("prepare (missing entities)",performance.now()-o);const l=e||i.fileName||i.docTitle,c=Kn(l);o=performance.now(),Ua(s,!1);let d;try{d=await this._snapshotBuilder.buildAsync(s.cadScene,i.database,{title:c,background:s.backgroundColor,exportInvisibleLayers:a.exportInvisibleLayers,exportLayouts:a.exportLayouts,exportEmptyLayouts:a.exportEmptyLayouts,initialView:a.initialView,viewerMode:a.viewerMode,viewState:Cl(a,s,i.database)?yl(s):void 0,canvasAspectRatio:s.width/Math.max(s.height,1)})}finally{Ua(s,!0)}al(d,s.backgroundColor,a.background),tt("snapshot build",performance.now()-o),await $(),o=performance.now();const u=await this.loadViewerRuntime();if(tt("load viewer runtime",performance.now()-o),await $(),a.exportFormat==="multi"){o=performance.now();const f=xl(a),h=await Rs(d,{viewerRuntime:u,...f});tt(f.compressChunks?"package + gzip chunks":"package chunks",performance.now()-o),o=performance.now();const g=qs(h);return tt("zip package",performance.now()-o),await $(),{fileName:We(l,"zip"),bytes:g,mediaType:"application/zip"}}const p=vs(a.expiryDays,Date.now(),a.expiresAt);o=performance.now();const m=await this.packSelfContainedHtml(d,u,{expiresAt:p,password:a.password||void 0});return tt("pack self-contained html",performance.now()-o),await $(),{fileName:We(l,"html"),bytes:new TextEncoder().encode(m),mediaType:"text/html;charset=utf-8"}}async packSnapshot(e,a){await K.instance.withBusyIndicator(async()=>{await $();const r=await this.loadViewerRuntime();await $();const n=await this.packSelfContainedHtml(e,r,{expiresAt:null});await $(),this.downloadHtml(n,a)})}async packSelfContainedHtml(e,a,r){if(Xs(e))return Ys(e,{title:e.meta.title,viewerRuntime:a,expiresAt:r.expiresAt,password:r.password});const n=await Ms(ar(e),{expiresAt:r.expiresAt,password:r.password});return hs(e,{title:e.meta.title,viewerRuntime:a,encoded:n.encoded,accessManifest:n.manifest})}async loadViewerRuntime(){const e=Ml(this.options.viewerRuntimeUrl),a=await fetch(e);if(!a.ok)throw new Error(`Failed to load HTML viewer runtime from "${e}" (${a.status}). Install @mlightcad/cad-html-plugin, copy viewer-runtime.iife.js to your app assets, and set viewerRuntimeUrl on registerLazyHtmlPlugin / createHtmlPlugin / AcApHtmlConvertor.`);return a.text()}downloadHtml(e,a){this.downloadBytes(new TextEncoder().encode(e),a,"text/html;charset=utf-8")}downloadBytes(e,a,r){const n=new Uint8Array(e.byteLength);n.set(e);const i=new Blob([n],{type:r}),o=URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.download=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),window.setTimeout(()=>URL.revokeObjectURL(o),6e4)}}class El extends Yn{constructor(e={}){super(),this.pluginOptions=e}async execute(e){const a=await this.promptOptions();a&&await new Il(this.pluginOptions).convert(e.doc.fileName||e.doc.docTitle,a,e.view)}async promptOptions(){const e=G(),a=await this.promptExportFormat();if(a===void 0)return;const r=await this.promptYesNo("jig.chtml.exportInvisibleLayers",e.exportInvisibleLayers);if(r===void 0)return;const n=await this.promptYesNo("jig.chtml.exportLayouts",e.exportLayouts);if(n===void 0)return;let i=e.exportEmptyLayouts;if(n){const u=await this.promptYesNo("jig.chtml.exportEmptyLayouts",e.exportEmptyLayouts);if(u===void 0)return;i=u}const o=await this.promptBackground();if(o===void 0)return;const s=await this.promptInitialView();if(s===void 0)return;const l=await this.promptViewerMode();if(l===void 0)return;let c,d;if(!(a==="multi"&&(c=await this.promptChunkSizeMiB(),c===void 0||(d=await this.promptYesNo("jig.chtml.compressChunks",e.compressChunks),d===void 0))))return G({exportFormat:a,exportInvisibleLayers:r,exportLayouts:n,exportEmptyLayouts:i,background:o,initialView:s,viewerMode:l,...a==="multi"?{maxChunkBytes:c,compressChunks:d}:{}})}async promptExportFormat(){const e=G(),a=new pt(x.t("jig.chtml.exportFormat"));a.allowNone=!0;const r=a.keywords.add(x.t("jig.chtml.keywords.single.display"),x.t("jig.chtml.keywords.single.global"),x.t("jig.chtml.keywords.single.local")),n=a.keywords.add(x.t("jig.chtml.keywords.multi.display"),x.t("jig.chtml.keywords.multi.global"),x.t("jig.chtml.keywords.multi.local"));a.keywords.default=e.exportFormat==="multi"?n:r;const i=await K.instance.editor.getKeywords(a);if(i.status!==C.Cancel){if(i.status===C.None)return e.exportFormat;if(i.status===C.OK||i.status===C.Keyword)return i.stringResult?i.stringResult==="Multi"?"multi":"single":e.exportFormat}}async promptYesNo(e,a){const r=new pt(x.t(e));r.allowNone=!0;const n=r.keywords.add(x.t("jig.chtml.keywords.yes.display"),x.t("jig.chtml.keywords.yes.global"),x.t("jig.chtml.keywords.yes.local")),i=r.keywords.add(x.t("jig.chtml.keywords.no.display"),x.t("jig.chtml.keywords.no.global"),x.t("jig.chtml.keywords.no.local"));r.keywords.default=a?n:i;const o=await K.instance.editor.getKeywords(r);if(o.status!==C.Cancel){if(o.status===C.None)return a;if(o.status===C.OK||o.status===C.Keyword)return o.stringResult?o.stringResult==="Yes":a}}async promptChunkSizeMiB(){const e=G({exportFormat:"multi"}),a=Kr(e.maxChunkBytes),r=new Wn(x.t("jig.chtml.chunkSizeMiB"),Te,Gr);r.allowNone=!0,r.allowZero=!1,r.allowNegative=!1,r.useDefaultValue=!0,r.defaultValue=a;const n=await K.instance.editor.getInteger(r);if(n.status!==C.Cancel){if(n.status===C.None)return _t(a);if(n.status===C.OK){const i=Jr(n.value??a);return _t(i)}}}async promptBackground(){const e=G(),a=new pt(x.t("jig.chtml.background"));a.allowNone=!0;const r=a.keywords.add(x.t("jig.chtml.keywords.black.display"),x.t("jig.chtml.keywords.black.global"),x.t("jig.chtml.keywords.black.local")),n=a.keywords.add(x.t("jig.chtml.keywords.white.display"),x.t("jig.chtml.keywords.white.global"),x.t("jig.chtml.keywords.white.local")),i=a.keywords.add(x.t("jig.chtml.keywords.space.display"),x.t("jig.chtml.keywords.space.global"),x.t("jig.chtml.keywords.space.local"));a.keywords.default=e.background==="white"?n:e.background==="space"?i:r;const o=await K.instance.editor.getKeywords(a);if(o.status!==C.Cancel){if(o.status===C.None)return e.background;if(o.status===C.OK||o.status===C.Keyword)return o.stringResult?o.stringResult==="White"?"white":o.stringResult==="Space"?"space":"black":e.background}}async promptInitialView(){const e=G(),a=new pt(x.t("jig.chtml.initialView"));a.allowNone=!0;const r=a.keywords.add(x.t("jig.chtml.keywords.extents.display"),x.t("jig.chtml.keywords.extents.global"),x.t("jig.chtml.keywords.extents.local")),n=a.keywords.add(x.t("jig.chtml.keywords.current.display"),x.t("jig.chtml.keywords.current.global"),x.t("jig.chtml.keywords.current.local"));a.keywords.default=e.initialView==="current"?n:r;const i=await K.instance.editor.getKeywords(a);if(i.status!==C.Cancel){if(i.status===C.None)return e.initialView;if(i.status===C.OK||i.status===C.Keyword)return i.stringResult?i.stringResult==="Current"?"current":"fit":e.initialView}}async promptViewerMode(){const e=G(),a=new pt(x.t("jig.chtml.viewerMode"));a.allowNone=!0;const r=a.keywords.add(x.t("jig.chtml.keywords.view.display"),x.t("jig.chtml.keywords.view.global"),x.t("jig.chtml.keywords.view.local")),n=a.keywords.add(x.t("jig.chtml.keywords.measure.display"),x.t("jig.chtml.keywords.measure.global"),x.t("jig.chtml.keywords.measure.local"));a.keywords.default=e.viewerMode==="view"?r:n;const i=await K.instance.editor.getKeywords(a);if(i.status!==C.Cancel){if(i.status===C.None)return e.viewerMode;if(i.status===C.OK||i.status===C.Keyword)return i.stringResult?i.stringResult==="View"?"view":"measure":e.viewerMode}}}const Ll="1.8.0-preview.4",Fl={version:Ll};class zl{constructor(e={}){this.options=e,this.name="HtmlPlugin",this.version=Fl.version,this.description="HTML export (-chtml) command",this.registeredCommands=[]}onLoad(e,a){const r=Xn.SYSTEMT_COMMAND_GROUP_NAME,n=new El(this.options);a.addCommand(r,"-chtml","-chtml",n),this.registeredCommands.push({group:r,name:"-chtml"}),a.lookupGlobalCmd("chtml")||(a.addCommand(r,"chtml","chtml",n),this.registeredCommands.push({group:r,name:"chtml"}))}onUnload(e,a){for(const r of this.registeredCommands)a.removeCmd(r.group,r.name);this.registeredCommands=[]}}async function Hl(t={}){return t.viewerRuntimeUrl!=null&&kl(t),new zl(Al())}export{Qo as ACEC_CHUNK_MAGIC,vi as ACEO_OSNAP_MAGIC,ki as ACEO_OSNAP_VERSION,ms as ACEX_COORDINATE_BADGE_LIFT_EM,br as ACEX_DEFAULT_CHUNK_MAX_BYTES,De as ACEX_DEFAULT_CHUNK_SIZE_MIB,Nr as ACEX_DEFAULT_DOCS_BASE_URL,$t as ACEX_DEFAULT_MANIFEST_FILE,ns as ACEX_DEFAULT_MANIFEST_HREF,$s as ACEX_EMBEDDED_CHUNK_ENCRYPTED_MIME,Fr as ACEX_EMBEDDED_CHUNK_HREF_ATTR,Ba as ACEX_EMBEDDED_CHUNK_MAX_BYTES,js as ACEX_EMBEDDED_CHUNK_MIME,as as ACEX_EMBEDDED_CHUNK_THRESHOLD_BYTES,rs as ACEX_EMBEDDED_OSNAP_CHUNK_MAX_BYTES,Vt as ACEX_HTML_BACKGROUND_BLACK,Ue as ACEX_HTML_BACKGROUND_WHITE,qo as ACEX_HTML_LOCALES,Le as ACEX_HTML_SHELL_CSS,Gr as ACEX_MAX_CHUNK_SIZE_MIB,jt as ACEX_MAX_GEOMETRY_BATCH_BYTES,Te as ACEX_MIN_CHUNK_SIZE_MIB,es as ACEX_PACKAGE_VERSION,ls as ACEX_POLAR_ANGLE_INCREMENTS,Za as ACEX_SNAPSHOT_COMPRESSION,Y as ACEX_SNAPSHOT_VERSION,El as AcApExportHtmlCmd,Il as AcApHtmlConvertor,Bl as AcApHtmlSnapshotBuilder,be as AcExHtmlBinaryWriter,ue as AcExHtmlIcons,vl as DEFAULT_HTML_VIEWER_RUNTIME_URL,aa as F_LINE_DISTANCES,xi as F_LINE_EXCLUDE_OSNAP,ta as F_LINE_INDICES,ea as F_LINE_PATTERN,na as F_LINE_RENDER_ORDER,ra as F_LINE_WIDTH,sa as F_MESH_GRADIENT_FILL,la as F_MESH_GRADIENT_POS,oa as F_MESH_HATCH,ia as F_MESH_INDICES,yi as F_MESH_POINTS,da as F_MESH_RENDER_ORDER,ca as F_MESH_SIDE,ua as F_MESH_TEXTURE,_l as HTML_PLUGIN_NAME,Dl as HTML_PLUGIN_TRIGGERS,us as ML_UI_COMPACT_MAX_WIDTH,ds as ML_UI_MOBILE_MAX_WIDTH,Kr as acexChunkSizeBytesToMiB,_t as acexChunkSizeMiBToBytes,al as acexHtmlApplyBackground,Qs as acexHtmlBackgroundRgb,ve as acexHtmlBakePlainDrawableSlice,hi as acexHtmlBase85ToBytes,Nt as acexHtmlBuildAccessManifest,Jo as acexHtmlBuildOsnapCatalog,Rs as acexHtmlBuildPackageAsync,Lr as acexHtmlBuildPackageDataAsync,cs as acexHtmlBuildPolarAnglesPanel,Fe as acexHtmlBuildShellBody,pl as acexHtmlBuildSnapshotFromExportScene,fl as acexHtmlBuildSnapshotFromExportSceneAsync,cr as acexHtmlBuildViewerMetadata,As as acexHtmlBytesToBase64,fi as acexHtmlBytesToBase85,Tt as acexHtmlBytesToText,ml as acexHtmlCaptureSavedViewExtents,wo as acexHtmlCollectBatchesFromObject3D,cl as acexHtmlCollectLayoutViewports,rr as acexHtmlCompactIndexedSlice,ne as acexHtmlCompressSnapshotBinary,qa as acexHtmlCompressSnapshotBinaryAsync,sl as acexHtmlComputeLayoutExtents,Or as acexHtmlComputeLayoutViewExtents,Me as acexHtmlComputeLineDistancesForSegments,ll as acexHtmlComputeViewportPaperExtents,at as acexHtmlCopyFloat32Range,Ri as acexHtmlCopyUint32Range,kr as acexHtmlCreateAccessKey,nl as acexHtmlCreateEmptyExtents,gr as acexHtmlEncodeChunkBinary,ye as acexHtmlEncodeOsnapCatalogBinary,ar as acexHtmlEncodeSnapshot,Hi as acexHtmlEncodeSnapshotBinary,$i as acexHtmlEncodeTextureForExport,Pe as acexHtmlEncryptBytes,ks as acexHtmlEncryptSnapshotPayload,we as acexHtmlEstimateLineBatchBytes,xe as acexHtmlEstimateMeshBatchBytes,er as acexHtmlEstimateOsnapPrimitiveBytes,Vs as acexHtmlEstimateSnapshotGeometryBytes,Ea as acexHtmlExpandExtentsFromBatch,il as acexHtmlExpandExtentsFromPositions,eo as acexHtmlExportActiveBatchedLine2Slice,Se as acexHtmlExportActiveBatchedSlice,Ft as acexHtmlExportBufferGeometrySlice,ji as acexHtmlExportPlainDrawableSlice,Gi as acexHtmlExportUvsForPositionSlice,Qi as acexHtmlExportVertexAttributeSlice,Zi as acexHtmlExtractGradientFill,Ji as acexHtmlExtractHatchPattern,Ki as acexHtmlExtractLinePattern,Dr as acexHtmlGetDocsBaseUrl,Ne as acexHtmlIsEmptyPaperSpaceLayout,nr as acexHtmlIsTransparentImagePlaceholder,Ca as acexHtmlLayoutBackground,jr as acexHtmlListDatabaseLayouts,vr as acexHtmlNeedsAccessControl,Tr as acexHtmlNormalizeDocsBaseUrl,ct as acexHtmlOmitNonFinitePrimitives,hs as acexHtmlPackHtml,Ys as acexHtmlPackHtmlEmbeddedPackage,gs as acexHtmlPackHtmlPackage,Ms as acexHtmlProtectEncodedSnapshot,Oi as acexHtmlReadBatchWorldOffset,to as acexHtmlRebaseHatchPatternToLocalOffset,ke as acexHtmlRebasePlainDrawableSliceAroundCentroid,el as acexHtmlRemapSnapshotForegroundForBackground,Hr as acexHtmlResolveBackground,vs as acexHtmlResolveExpiresAt,Ie as acexHtmlResolveLocale,rl as acexHtmlSetDocsBaseUrl,Xs as acexHtmlShouldEmbedChunks,Ti as acexHtmlSnapshotMimeType,Ns as acexHtmlSplitLayoutIntoSlices,Cs as acexHtmlSplitLineBatch,Is as acexHtmlSplitMeshBatch,Li as acexHtmlSplitOsnapPrimitives,pi as acexHtmlTextToBytes,ol as acexHtmlToExtents,ma as acexHtmlToWcsCoord,fa as acexHtmlTransformHatchPatternToWorldSpace,Rr as acexHtmlUnionExtents,va as acexHtmlWcsPointToOcsArcAngle,Qa as acexHtmlWriteLineBatch,tr as acexHtmlWriteMeshBatch,qs as acexHtmlZipPackageFiles,yl as captureAcApHtmlViewState,Jr as clampAcApHtmlChunkSizeMiB,kl as configureHtmlPlugin,Hl as createHtmlPlugin,Al as getHtmlPluginOptions,G as resolveAcApHtmlExportOptions,xl as resolveAcApHtmlPackageBuildOptions,Ml as resolveViewerRuntimeUrl};
|