@flyfish-group/file-viewer 1.0.9 → 1.0.13

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.
Files changed (165) hide show
  1. package/README.md +13 -17
  2. package/dist/components/CadViewer.js +1 -1
  3. package/dist/components/CodeViewer.js +1 -1
  4. package/dist/components/ImageViewer.js +1 -1
  5. package/dist/components/MarkdownViewer.js +1 -1
  6. package/dist/components/OfdViewer.js +1 -1
  7. package/dist/components/PdfView.js +1 -31587
  8. package/dist/components/PptxRender.js +1 -1
  9. package/dist/components/XlsxTable.js +1 -1
  10. package/dist/components/_commonjsHelpers.js +1 -1
  11. package/dist/components/docx-preview.js +2 -2
  12. package/dist/components/index.js +1 -24558
  13. package/dist/components/index2.js +1 -2
  14. package/dist/components/jszip.min.js +1 -1
  15. package/dist/components/ofd.js +1 -1
  16. package/dist/components/worker-ref.js +1 -1
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.mjs +1 -1
  19. package/dist/index.umd.js +3 -4973
  20. package/dist/package/index.d.ts +3 -10
  21. package/dist/style.css +2 -2
  22. package/dist/worker/pdf.worker.js +1 -55
  23. package/dist/worker/pptx.worker.js +1 -1
  24. package/dist/worker/sheet.worker.js +1 -1
  25. package/package.json +1 -9
  26. package/dist/components/AudioViewer.js +0 -1
  27. package/dist/components/DrawingViewer.js +0 -1
  28. package/dist/components/EpubViewer.js +0 -1
  29. package/dist/components/UmdViewer.js +0 -2
  30. package/dist/components/_commonjs-dynamic-modules.js +0 -1
  31. package/dist/components/ar-SA-G6X2FPQ2.js +0 -1
  32. package/dist/components/arc.js +0 -1
  33. package/dist/components/architecture-7EHR7CIX.js +0 -1
  34. package/dist/components/architectureDiagram-3BPJPVTR.js +0 -1
  35. package/dist/components/az-AZ-76LH7QW2.js +0 -1
  36. package/dist/components/bg-BG-XCXSNQG7.js +0 -1
  37. package/dist/components/blockDiagram-GPEHLZMM.js +0 -1
  38. package/dist/components/bn-BD-2XOGV67Q.js +0 -1
  39. package/dist/components/c4Diagram-AAUBKEIU.js +0 -1
  40. package/dist/components/ca-ES-6MX7JW3Y.js +0 -1
  41. package/dist/components/channel.js +0 -1
  42. package/dist/components/chunk-2J33WTMH.js +0 -1
  43. package/dist/components/chunk-4BX2VUAB.js +0 -1
  44. package/dist/components/chunk-55IACEB6.js +0 -1
  45. package/dist/components/chunk-727SXJPM.js +0 -1
  46. package/dist/components/chunk-AQP2D5EJ.js +0 -1
  47. package/dist/components/chunk-EIO257PC.js +0 -1738
  48. package/dist/components/chunk-FMBD7UC4.js +0 -1
  49. package/dist/components/chunk-ND2GUHAM.js +0 -1
  50. package/dist/components/chunk-QZHKN3VN.js +0 -1
  51. package/dist/components/classDiagram-4FO5ZUOK.js +0 -1
  52. package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -1
  53. package/dist/components/cose-bilkent-S5V4N54A.js +0 -1
  54. package/dist/components/cs-CZ-2BRQDIVT.js +0 -1
  55. package/dist/components/cytoscape.esm.js +0 -1
  56. package/dist/components/da-DK-5WZEPLOC.js +0 -1
  57. package/dist/components/dagre-BM42HDAG.js +0 -1
  58. package/dist/components/de-DE-XR44H4JA.js +0 -1
  59. package/dist/components/defaultLocale.js +0 -1
  60. package/dist/components/diagram-2AECGRRQ.js +0 -1
  61. package/dist/components/diagram-5GNKFQAL.js +0 -1
  62. package/dist/components/diagram-KO2AKTUF.js +0 -1
  63. package/dist/components/diagram-LMA3HP47.js +0 -1
  64. package/dist/components/diagram-OG6HWLK6.js +0 -1
  65. package/dist/components/directory-open-01563666.js +0 -1
  66. package/dist/components/directory-open-4ed118d0.js +0 -1
  67. package/dist/components/el-GR-BZB4AONW.js +0 -1
  68. package/dist/components/en-B4ZKOASM.js +0 -1
  69. package/dist/components/erDiagram-TEJ5UH35.js +0 -1
  70. package/dist/components/es-ES-U4NZUMDT.js +0 -1
  71. package/dist/components/eu-ES-A7QVB2H4.js +0 -1
  72. package/dist/components/eventmodeling-FCH6USID.js +0 -1
  73. package/dist/components/fa-IR-HGAKTJCU.js +0 -1
  74. package/dist/components/fi-FI-Z5N7JZ37.js +0 -1
  75. package/dist/components/file-open-002ab408.js +0 -1
  76. package/dist/components/file-open-7c801643.js +0 -1
  77. package/dist/components/file-save-3189631c.js +0 -1
  78. package/dist/components/file-save-745eba88.js +0 -1
  79. package/dist/components/flowDiagram-I6XJVG4X.js +0 -1
  80. package/dist/components/fr-FR-RHASNOE6.js +0 -1
  81. package/dist/components/ganttDiagram-6RSMTGT7.js +0 -1
  82. package/dist/components/gitGraph-WXDBUCRP.js +0 -1
  83. package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -1
  84. package/dist/components/gl-ES-HMX3MZ6V.js +0 -1
  85. package/dist/components/graph.js +0 -1
  86. package/dist/components/he-IL-6SHJWFNN.js +0 -1
  87. package/dist/components/hi-IN-IWLTKZ5I.js +0 -1
  88. package/dist/components/hu-HU-A5ZG7DT2.js +0 -1
  89. package/dist/components/id-ID-SAP4L64H.js +0 -1
  90. package/dist/components/image-GAAHSSAO.js +0 -1
  91. package/dist/components/image-blob-reduce.esm.js +0 -2
  92. package/dist/components/index3.js +0 -1
  93. package/dist/components/index4.js +0 -1
  94. package/dist/components/index5.js +0 -1
  95. package/dist/components/info-J43DQDTF.js +0 -1
  96. package/dist/components/infoDiagram-5YYISTIA.js +0 -1
  97. package/dist/components/init.js +0 -1
  98. package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -1
  99. package/dist/components/it-IT-JPQ66NNP.js +0 -1
  100. package/dist/components/ja-JP-DBVTYXUO.js +0 -1
  101. package/dist/components/journeyDiagram-JHISSGLW.js +0 -1
  102. package/dist/components/kaa-6HZHGXH3.js +0 -1
  103. package/dist/components/kab-KAB-ZGHBKWFO.js +0 -1
  104. package/dist/components/kanban-definition-UN3LZRKU.js +0 -1
  105. package/dist/components/katex.js +0 -1
  106. package/dist/components/kk-KZ-P5N5QNE5.js +0 -1
  107. package/dist/components/km-KH-HSX4SM5Z.js +0 -1
  108. package/dist/components/ko-KR-MTYHY66A.js +0 -1
  109. package/dist/components/ku-TR-6OUDTVRD.js +0 -1
  110. package/dist/components/layout.js +0 -1
  111. package/dist/components/linear.js +0 -1
  112. package/dist/components/lt-LT-XHIRWOB4.js +0 -1
  113. package/dist/components/lv-LV-5QDEKY6T.js +0 -1
  114. package/dist/components/mermaid-parser.core.js +0 -14
  115. package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1
  116. package/dist/components/mr-IN-CRQNXWMA.js +0 -1
  117. package/dist/components/my-MM-5M5IBNSE.js +0 -1
  118. package/dist/components/nb-NO-T6EIAALU.js +0 -1
  119. package/dist/components/nl-NL-IS3SIHDZ.js +0 -1
  120. package/dist/components/nn-NO-6E72VCQL.js +0 -1
  121. package/dist/components/oc-FR-POXYY2M6.js +0 -1
  122. package/dist/components/ordinal.js +0 -1
  123. package/dist/components/pa-IN-N4M65BXN.js +0 -1
  124. package/dist/components/packet-YPE3B663.js +0 -1
  125. package/dist/components/percentages-BXMCSKIN.js +0 -1
  126. package/dist/components/pica.js +0 -1
  127. package/dist/components/pie-LRSECV5Y.js +0 -1
  128. package/dist/components/pie.js +0 -1
  129. package/dist/components/pieDiagram-4H26LBE5.js +0 -1
  130. package/dist/components/pl-PL-T2D74RX3.js +0 -1
  131. package/dist/components/pt-BR-5N22H2LF.js +0 -1
  132. package/dist/components/pt-PT-UZXXM6DQ.js +0 -1
  133. package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1
  134. package/dist/components/radar-GUYGQ44K.js +0 -1
  135. package/dist/components/requirementDiagram-4Y6WPE33.js +0 -1
  136. package/dist/components/ro-RO-JPDTUUEW.js +0 -1
  137. package/dist/components/roundRect.js +0 -1
  138. package/dist/components/ru-RU-B4JR7IUQ.js +0 -1
  139. package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -1
  140. package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -1
  141. package/dist/components/si-LK-N5RQ5JYF.js +0 -1
  142. package/dist/components/sk-SK-C5VTKIMK.js +0 -1
  143. package/dist/components/sl-SI-NN7IZMDC.js +0 -1
  144. package/dist/components/stateDiagram-AJRCARHV.js +0 -1
  145. package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -1
  146. package/dist/components/subset-shared.chunk.js +0 -1
  147. package/dist/components/subset-worker.chunk.js +0 -1
  148. package/dist/components/sv-SE-XGPEYMSR.js +0 -1
  149. package/dist/components/ta-IN-2NMHFXQM.js +0 -1
  150. package/dist/components/th-TH-HPSO5L25.js +0 -1
  151. package/dist/components/time.js +0 -1
  152. package/dist/components/timeline-definition-PNZ67QCA.js +0 -1
  153. package/dist/components/tr-TR-DEFEU3FU.js +0 -1
  154. package/dist/components/transform.js +0 -1
  155. package/dist/components/treeView-BLDUP644.js +0 -1
  156. package/dist/components/treemap-LRROVOQU.js +0 -1
  157. package/dist/components/uk-UA-QMV73CPH.js +0 -1
  158. package/dist/components/vennDiagram-CIIHVFJN.js +0 -1
  159. package/dist/components/vi-VN-M7AON7JQ.js +0 -1
  160. package/dist/components/wardley-L42UT6IY.js +0 -1
  161. package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -1
  162. package/dist/components/xychartDiagram-2RQKCTM6.js +0 -1
  163. package/dist/components/zh-CN-LNUGB5OW.js +0 -1
  164. package/dist/components/zh-HK-E62DVLB3.js +0 -1
  165. package/dist/components/zh-TW-RAJ6MFWO.js +0 -1
@@ -1 +0,0 @@
1
- const aT=b;function b(c,d){c=c-0x6d;const e=a();let f=e[c];return f;}(function(c,d){const aS=b,e=c();while(!![]){try{const f=-parseInt(aS(0x8a))/0x1+parseInt(aS(0x83))/0x2*(parseInt(aS(0x1a9))/0x3)+parseInt(aS(0x131))/0x4+-parseInt(aS(0x18b))/0x5*(parseInt(aS(0x193))/0x6)+parseInt(aS(0xad))/0x7+-parseInt(aS(0xae))/0x8*(parseInt(aS(0x91))/0x9)+parseInt(aS(0x1cf))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2716c));var Re=Object['defineProperty'],Oe=Object[aT(0xb5)],_e=Object['getOwnPropertyDescriptors'],ve=Object[aT(0x143)],We=Object[aT(0x101)]['hasOwnProperty'],$e=Object['prototype']['propertyIsEnumerable'],T=Math['pow'],se=(c,d,f)=>d in c?Re(c,d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':f}):c[d]=f,P=(c,d)=>{for(var f in d||(d={}))We['call'](d,f)&&se(c,f,d[f]);if(ve){for(var f of ve(d))$e['call'](d,f)&&se(c,f,d[f]);}return c;},w=(c,d)=>Oe(c,_e(d)),p=(c,d,f)=>(se(c,typeof d!='symbol'?d+'':d,f),f),H=(c,d,f)=>new Promise((g,h)=>{var k=u=>{try{m(f['next'](u));}catch(v){h(v);}},l=u=>{try{m(f['throw'](u));}catch(v){h(v);}},m=u=>u['done']?g(u['value']):Promise['resolve'](u['value'])['then'](k,l);m((f=f['apply'](c,d))['next']());});function Se(f,g,k=0x0,v=f['length']-0x1,x=je){for(;v>k;){if(v-k>0x258){const D=v-k+0x1,F=g-k+0x1,I=Math['log'](D),L=0.5*Math['exp'](0x2*I/0x3),N=0.5*Math['sqrt'](I*L*(D-L)/D)*(F-D/0x2<0x0?-0x1:0x1),O=Math['max'](k,Math['floor'](g-F*L/D+N)),R=Math['min'](v,Math['floor'](g+(D-F)*L/D+N));Se(f,g,O,R,x);}const y=f[g];let A=k,C=v;for(V(f,k,g),x(f[v],y)>0x0&&V(f,k,v);A<C;){for(V(f,A,C),A++,C--;x(f[A],y)<0x0;)A++;for(;x(f[C],y)>0x0;)C--;}x(f[k],y)===0x0?V(f,k,C):(C++,V(f,C,v)),C<=g&&(k=C+0x1),g<=C&&(v=C-0x1);}}function V(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function je(c,d){return c<d?-0x1:c>d?0x1:0x0;}class qe{constructor(c=0x9){const aU=aT;this['_maxEntries']=Math[aU(0x19e)](0x4,c),this['_minEntries']=Math['max'](0x2,Math['ceil'](this['_maxEntries']*0.4)),this['clear']();}['all'](){return this['_all'](this['data'],[]);}['search'](c){const aV=aT;let d=this[aV(0xf9)];const e=[];if(!ee(c,d))return e;const f=this['toBBox'],g=[];for(;d;){for(let h=0x0;h<d['children']['length'];h++){const k=d['children'][h],m=d['leaf']?f(k):k;ee(c,m)&&(d['leaf']?e['push'](k):ie(c,m)?this['_all'](k,e):g[aV(0xf6)](k));}d=g['pop']();}return e;}['collides'](c){const aW=aT;let d=this['data'];if(!ee(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d['children']['length'];f++){const g=d['children'][f],h=d['leaf']?this[aW(0xfd)](g):g;if(ee(c,h)){if(d['leaf']||ie(c,h))return!0x0;e['push'](g);}}d=e['pop']();}return!0x1;}['load'](c){const aX=aT;if(!(c&&c['length']))return this;if(c['length']<this['_minEntries']){for(let e=0x0;e<c['length'];e++)this['insert'](c[e]);return this;}let d=this[aX(0xa7)](c[aX(0x1ca)](),0x0,c['length']-0x1,0x0);if(!this[aX(0xf9)]['children']['length'])this['data']=d;else{if(this[aX(0xf9)]['height']===d['height'])this['_splitRoot'](this['data'],d);else{if(this[aX(0xf9)]['height']<d['height']){const f=this['data'];this['data']=d,d=f;}this[aX(0x13b)](d,this[aX(0xf9)]['height']-d['height']-0x1,!0x0);}}return this;}['insert'](c){return c&&this['_insert'](c,this['data']['height']-0x1),this;}['clear'](){return this['data']=q([]),this;}['remove'](d,e){const aY=aT;if(!d)return this;let f=this['data'];const g=this['toBBox'](d),k=[],m=[];let u,v,x;for(;f||k['length'];){if(f||(f=k['pop'](),v=k[k['length']-0x1],u=m[aY(0x94)](),x=!0x0),f['leaf']){const y=He(d,f['children'],e);if(y!==-0x1)return f['children']['splice'](y,0x1),k['push'](f),this['_condense'](k),this;}!x&&!f['leaf']&&ie(f,g)?(k[aY(0xf6)](f),m[aY(0xf6)](u),u=0x0,v=f,f=f['children'][0x0]):v?(u++,f=v['children'][u],x=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){return c['minX']-d['minX'];}['compareMinY'](c,d){const aZ=aT;return c[aZ(0x14a)]-d['minY'];}['toJSON'](){return this['data'];}['fromJSON'](c){return this['data']=c,this;}['_all'](c,d){const b0=aT,e=[];for(;c;)c['leaf']?d['push'](...c[b0(0x145)]):e['push'](...c['children']),c=e['pop']();return d;}['_build'](e,f,g,k){const b1=aT,v=g-f+0x1;let x=this['_maxEntries'],y;if(v<=x)return y=q(e['slice'](f,g+0x1)),j(y,this['toBBox']),y;k||(k=Math[b1(0x1cd)](Math['log'](v)/Math['log'](x)),x=Math['ceil'](v/Math['pow'](x,k-0x1))),y=q([]),y['leaf']=!0x1,y['height']=k;const A=Math['ceil'](v/x),C=A*Math['ceil'](Math['sqrt'](x));Fe(e,f,g,C,this['compareMinX']);for(let D=f;D<=g;D+=C){const F=Math['min'](D+C-0x1,g);Fe(e,D,F,A,this['compareMinY']);for(let I=D;I<=F;I+=A){const L=Math['min'](I+A-0x1,F);y['children']['push'](this['_build'](e,I,L,k-0x1));}}return j(y,this['toBBox']),y;}['_chooseSubtree'](d,e,f,g){const b2=aT;for(;g['push'](e),!(e['leaf']||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,v;for(let x=0x0;x<e[b2(0x145)]['length'];x++){const y=e['children'][x],A=oe(y),C=Ge(d,y)-A;C<m?(m=C,k=A<k?A:k,v=y):C===m&&A<k&&(k=A,v=y);}e=v||e['children'][0x0];}return e;}['_insert'](c,d,e){const b3=aT,f=e?c:this['toBBox'](c),g=[],h=this[b3(0x174)](f,this['data'],d,g);for(h['children']['push'](c),Z(h,f);d>=0x0&&g[d]['children']['length']>this['_maxEntries'];)this['_split'](g,d),d--;this[b3(0xd3)](f,g,d);}['_split'](c,d){const b4=aT,e=c[d],f=e['children']['length'],g=this['_minEntries'];this['_chooseSplitAxis'](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=q(e['children']['splice'](h,e['children']['length']-h));k['height']=e['height'],k['leaf']=e['leaf'],j(e,this['toBBox']),j(k,this['toBBox']),d?c[d-0x1]['children']['push'](k):this[b4(0x132)](e,k);}[aT(0x132)](c,d){const b5=aT;this[b5(0xf9)]=q([c,d]),this['data']['height']=c['height']+0x1,this['data']['leaf']=!0x1,j(this['data'],this['toBBox']);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let v=e;v<=f-e;v++){const x=G(d,0x0,v,this['toBBox']),y=G(d,v,f,this['toBBox']),A=Ze(x,y),C=oe(x)+oe(y);A<k?(k=A,g=v,m=C<m?C:m):A===k&&C<m&&(m=C,g=v);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b6=aT,f=c[b6(0x12e)]?this[b6(0x172)]:Ve,g=c['leaf']?this['compareMinY']:Ue,h=this['_allDistMargin'](c,d,e,f),k=this['_allDistMargin'](c,d,e,g);h<k&&c['children']['sort'](f);}['_allDistMargin'](d,e,f,g){const b7=aT;d['children']['sort'](g);const k=this[b7(0xfd)],m=G(d,0x0,e,k),u=G(d,f-e,f,k);let v=J(m)+J(u);for(let x=e;x<f-e;x++){const y=d['children'][x];Z(m,d['leaf']?k(y):y),v+=J(m);}for(let A=f-e-0x1;A>=e;A--){const C=d[b7(0x145)][A];Z(u,d[b7(0x12e)]?k(C):C),v+=J(u);}return v;}['_adjustParentBBoxes'](c,d,e){for(let f=e;f>=0x0;f--)Z(d[f],c);}['_condense'](c){const b8=aT;for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children'][b8(0x79)]===0x0?d>0x0?(e=c[d-0x1][b8(0x145)],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():j(c[d],this[b8(0xfd)]);}}function He(c,d,f){if(!f)return d['indexOf'](c);for(let g=0x0;g<d['length'];g++)if(f(c,d[g]))return g;return-0x1;}function j(c,d){G(c,0x0,c['children']['length'],d,c);}function G(c,d,f,g,h){const b9=aT;h||(h=q(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h[b9(0x72)]=-0x1/0x0,h['maxY']=-0x1/0x0;for(let i=d;i<f;i++){const k=c['children'][i];Z(h,c['leaf']?g(k):k);}return h;}function Z(c,d){const bb=aT;return c['minX']=Math['min'](c[bb(0x185)],d['minX']),c['minY']=Math['min'](c['minY'],d[bb(0x14a)]),c['maxX']=Math[bb(0x19e)](c['maxX'],d['maxX']),c[bb(0x1d7)]=Math['max'](c['maxY'],d['maxY']),c;}function Ve(c,d){return c['minX']-d['minX'];}function Ue(c,d){return c['minY']-d['minY'];}function oe(c){const bc=aT;return(c['maxX']-c['minX'])*(c['maxY']-c[bc(0x14a)]);}function J(c){const bd=aT;return c[bd(0x72)]-c['minX']+(c[bd(0x1d7)]-c[bd(0x14a)]);}function Ge(c,d){const be=aT;return(Math['max'](d['maxX'],c[be(0x72)])-Math['min'](d['minX'],c['minX']))*(Math['max'](d['maxY'],c[be(0x1d7)])-Math['min'](d['minY'],c[be(0x14a)]));}function Ze(c,d){const bf=aT,f=Math['max'](c['minX'],d['minX']),g=Math[bf(0x19e)](c['minY'],d['minY']),h=Math['min'](c['maxX'],d[bf(0x72)]),i=Math['min'](c['maxY'],d[bf(0x1d7)]);return Math['max'](0x0,h-f)*Math['max'](0x0,i-g);}function ie(c,d){const bg=aT;return c['minX']<=d['minX']&&c[bg(0x14a)]<=d['minY']&&d['maxX']<=c[bg(0x72)]&&d['maxY']<=c['maxY'];}function ee(c,d){const bh=aT;return d['minX']<=c['maxX']&&d['minY']<=c['maxY']&&d['maxX']>=c[bh(0x185)]&&d[bh(0x1d7)]>=c['minY'];}function q(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function Fe(c,d,f,g,h){const bi=aT,i=[d,f];for(;i['length'];){if(f=i[bi(0x94)](),d=i['pop'](),f-d<=g)continue;const k=d+Math['ceil']((f-d)/g/0x2)*g;Se(c,k,d,f,h),i['push'](d,k,k,f);}}function Ke(c){const bj=aT,d=c['replace'](/\r\n?/g,'\x0a'),f=[],g=d[bj(0x79)];let h=0x0;for(;h<g;){for(;h<g&&d['charCodeAt'](h)===0xa;)h++;if(h>=g)break;let k=d['indexOf']('\x0a',h);k===-0x1&&(k=g);const m=d['substring'](h,k)['trim']();h=k+0x1;const u=parseInt(m,0xa);if(isNaN(u)){h<g&&(k=d['indexOf']('\x0a',h),k===-0x1&&(k=g),h=k+0x1);continue;}if(h>=g)break;k=d['indexOf']('\x0a',h),k===-0x1&&(k=g);const v=d['substring'](h,k)[bj(0x1c8)](/\s+$/,'');h=k+0x1,f['push']({'code':u,'value':v});}return f;}function Qe(c,d,f){const bk=aT;for(;d<c[bk(0x79)];){const g=c[d];if(g['code']===0x0&&g['value']===bk(0x19c))return d+0x1;if(g['code']===0x9){const h=g['value'];switch(d++,h){case'$ACADVER':d<c['length']&&(f[bk(0x1a7)]=c[d]['value'],d++);break;case bk(0x123):if(d<c['length']){const i=xe(c,d);f['extMin']=i['point'],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=xe(c,d);f['extMax']=k['point'],d=k['nextIndex'];}break;case'$INSUNITS':d<c['length']&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case'$MEASUREMENT':d<c['length']&&(f['measurement']=parseInt(c[d]['value'],0xa),d++);break;case'$LTSCALE':d<c['length']&&(f['ltScale']=parseFloat(c[d]['value']),d++);break;case'$DWGCODEPAGE':d<c['length']&&(f['dwgCodePage']=c[d]['value'],d++);break;case'$HANDSEED':d<c['length']&&(f['handleSeed']=c[d]['value'],d++);break;default:for(;d<c[bk(0x79)]&&c[d]['code']!==0x9&&c[d][bk(0x179)]!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function a(){const dH=['layerManager','byType','getWidth','render','#ff6600','#26004C','#007F7F','get','#696969','now','#004C4C','entitiesDrawn','is3d','handleTouchEnd','search','position','second-point','#00394C','SPLINE','renderer','save','#132613','#7C00A5','tree','emitter','#261C13','textOverride','onTouchStart','#A59152','push','devicePixelRatio','top','data','camera','defPoint2','\x22Times\x20New\x20Roman\x22,\x20serif','toBBox','beginPath','handlePointerMove','endAngle','prototype','#3F00FF','map','style','ARC','split','#00264C','handleZoom','clear','ellipse','#5F007F','#3F5F7F','midpoint','selectedEntityIndex','getLayers','fill','pointermove','elevation','workerManager','select','firstPoint','visible','setBackgroundColor','INSERT','\x20\x20Frame:\x20','parseTime','#264C00','cursor','grab','endpoint','#4C1300','items','onTouchEnd','arc','$EXTMIN','#BF7FFF','loadedFileName','generationFlags','ensureMap','lineTo','#FF00FF','debug','polyline','blockCount','DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.','leaf','lastFrameTime','isLocked','40936sZbBHs','_splitRoot','Failed\x20to\x20tokenize\x20DXF\x20content.','#FFBF7F','vAlign','done','has','type','viewer','onContextMenu','_insert','maxZoom','dark','font','layerCount','#7FFF9F','deactivate','text','getOwnPropertySymbols','windows-1257','children','doRender','#52A591','pointerup','entries','minY','strokeStyle','#52A567','colorOverrides','lineWeight','spatialIndexBuildTime','#00ff88','some','clearDocument','sqrt','mouseScreenY','error','Failed\x20to\x20get\x202D\x20rendering\x20context.\x20The\x20canvas\x20may\x20already\x20have\x20a\x20different\x20context\x20type,\x20or\x20canvas\x20rendering\x20is\x20not\x20available\x20in\x20this\x20environment.','layers','#132617','drawCalls','#ffffff','loadedFileSize','BYLAYER','insertionPoint','currentSnap','startAngle','#6F3F7F','solidFill','#7F5F00','frameTimestamps','TEXT','fitToView','point','isFrozen','onmessage','globalAlpha','visibleCache','doc','lineType','onPointerDown','#5291A5','clientY','boundaryPaths','#A5A500','compareMinX','top-left','_chooseSubtree','POINT','center','fillStyle','height','code','lineWidth','getCursorForTool','File:\x20','getBoundingClientRect','phase','POLYLINE','tag','message','#7F7FFF','color','lastDebugStats','minX','debugOptions','patternAngle','sin','activate','rgb(','130DBXNxw','defPoint3','inputHandler','lastDoRenderTime','string','AC1021','min','from','6294YbOujg','defaultEntityColor','end','removeEventListener','utf-8','obliqueAngle','weights','DIMENSION','entityBBoxes','ENDSEC','getContext','max','getWorker','LTYPE','offsetX','#FF0000','controlPoints','stroke','visibility','worker','acadVersion','closePath','4122gakyUn','alignmentPoint','name','runConverters','theme','pending','preventDefault','requestRender','value','options','textMidpoint','degree','#000000','rowCount','size','terminate','fromCodePoint','rotate','bulge','isClosed','#007F5F','#1C2600','floor','atan2','#00BFFF','totalLoadTime','#261713','FPS:\x20','measureColor','LWPOLYLINE','hypot','replace','#007FFF','slice','handleMove','flags','ceil','#3F007F','2433370ywlxqF','touchend','addEventListener','zoomTo','entityIndex','first-point','result','majorAxis','maxY','startTangent','rotation','bind','#171326','#A57C52','#00FF00','#39264C','pointerId','hAlign','#FF7F7F','maxX','widthFactor','entities','loadBuffer','onPointerUp','#A552A5','getVisibleLayerNames','length','onerror','#91A552','releasePointerCapture','currentTool','parse','left','windows-1254','boolean','trueColor','106zruRGX','moveTo','defPoint','debugEnabled','#52A500','measureTool','#7FFF00','106797IqJxUW','minScale','handleClick','emit','touches','dimStyle','#261313','112059YeJmWc','defPoint5','STANDARD','pop','destroyed','handleTouchMove','MTEXT','blockName','header','width','setLayerColor','measure','onPointerMove','lastY','textAlign','lineSpacingFactor','loadGeneration','fitPoints','styles','set','canvas','toFixed','_build','startPan','#004C00','rgba(255,\x20255,\x20255,\x200.15)','textDirection','edges','1169014XWfAxy','128xyVXNP','attachmentPoint','scale','offsetY','match','getAllLayers','getTransform','defineProperties','setTransform','abs','defPoint4','#26131C','#007F00','hatchStyle','#172613','radius','entitiesSkipped','#7FBFFF','isSeparator','destroy','scaleX','\x22Courier\x20New\x22,\x20monospace','resizeObserver','guardDestroyed','idle','transform','#4C0000','text/javascript','#4C262F','#131326','minZoom','CIRCLE','setLineDash','ELLIPSE','getZoomSpeed','start','right','_adjustParentBBoxes','lineTypes','spatialIndex','vertices','#A55291','clientX'];a=function(){return dH;};return a();}function xe(c,d){const bl=aT,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c[bl(0x79)];){const g=c[d]['code'];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d][bl(0x1b1)]),d++;else{if(g===0x1e)f['z']=parseFloat(c[d][bl(0x1b1)]),d++;else break;}}}return{'point':f,'nextIndex':d};}function Je(c,d,f){const bm=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']===bm(0x19c))return d+0x1;if(g['code']===0x0&&g['value']==='TABLE'){if(d++,d>=c['length'])break;const h=c[d]['value'];switch(d++,h){case'LAYER':d=tt(c,d,f['layers']);break;case bm(0x1a0):d=at(c,d,f[bm(0xd4)]);break;case'STYLE':d=nt(c,d,f['styles']);break;default:d=et(c,d);break;}}else d++;}return d;}function et(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function tt(c,d,f){const bn=aT;for(;d<c['length'];){const g=c[d];if(g[bn(0x179)]===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='LAYER'){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x6:h['lineType']=i['value'];break;case 0x3e:h[bn(0x183)]=parseInt(i['value'],0xa);break;case 0x46:h['flags']=parseInt(i[bn(0x1b1)],0xa);break;case 0x172:h[bn(0x14e)]=parseInt(i['value'],0xa);break;case 0x1a4:h['trueColor']=parseInt(i['value'],0xa);break;}d++;}f['set'](h[bn(0x1ab)],h);}else d++;}return d;}function at(c,d,f){const bo=aT;for(;d<c[bo(0x79)];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c['length']&&c[d][bo(0x179)]!==0x0;){const i=c[d];switch(i[bo(0x179)]){case 0x2:h['name']=i[bo(0x1b1)];break;case 0x3:h['description']=i['value'];break;case 0x28:h['totalLength']=parseFloat(i['value']);break;case 0x31:h['pattern']['push'](parseFloat(i['value']));break;}d++;}h['name']&&f[bo(0xa4)](h['name'],h);}else d++;}return d;}function nt(c,d,f){const bp=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='STYLE'){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i[bp(0x1b1)];break;case 0x3:h['fontName']=i['value'];break;case 0x4:h['bigFontName']=i[bp(0x1b1)];break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x29:h[bp(0x73)]=parseFloat(i['value']);break;case 0x32:h['obliqueAngle']=parseFloat(i['value']);break;}d++;}h['name']&&f['set'](h[bp(0x1ab)],h);}else d++;}return d;}function E(c){const bq=aT,d={'type':'','layer':'0','color':0x100,'lineType':bq(0x15c),'lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f[bq(0x179)]){case 0x5:d['handle']=f['value'];break;case 0x8:d['layer']=f['value'];break;case 0x6:d[bq(0x16c)]=f['value'];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d[bq(0x116)]=f['value']==='0'||f['value']==='';break;case 0x3e:d['color']=parseInt(f['value'],0xa);break;case 0x172:d['lineWeight']=parseInt(f['value'],0xa);break;case 0x1a4:d['trueColor']=parseInt(f['value'],0xa);break;case 0xd2:d['extrusion']['x']=parseFloat(f['value']);break;case 0xdc:d['extrusion']['y']=parseFloat(f[bq(0x1b1)]);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function rt(c){const br=aT,d=E(c),f=w(P({},d),{'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}});for(const g of c)switch(g['code']){case 0xa:f['start']['x']=parseFloat(g['value']);break;case 0x14:f[br(0xd1)]['y']=parseFloat(g[br(0x1b1)]);break;case 0x1e:f['start']['z']=parseFloat(g['value']);break;case 0xb:f['end']['x']=parseFloat(g['value']);break;case 0x15:f['end']['y']=parseFloat(g[br(0x1b1)]);break;case 0x1f:f['end']['z']=parseFloat(g['value']);break;}return f;}function st(c){const d=E(c),f=w(P({},d),{'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0});for(const g of c)switch(g['code']){case 0xa:f['center']['x']=parseFloat(g['value']);break;case 0x14:f['center']['y']=parseFloat(g['value']);break;case 0x1e:f['center']['z']=parseFloat(g['value']);break;case 0x28:f['radius']=parseFloat(g['value']);break;}return f;}function ot(c){const bs=aT,d=E(c),f=w(P({},d),{'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168});for(const g of c)switch(g['code']){case 0xa:f['center']['x']=parseFloat(g['value']);break;case 0x14:f['center']['y']=parseFloat(g['value']);break;case 0x1e:f['center']['z']=parseFloat(g[bs(0x1b1)]);break;case 0x28:f[bs(0xbd)]=parseFloat(g['value']);break;case 0x32:f[bs(0x15f)]=parseFloat(g['value']);break;case 0x33:f['endAngle']=parseFloat(g[bs(0x1b1)]);break;}return f;}function it(c){const bu=aT,d=E(c),f=w(P({},d),{'type':bu(0x1c6),'vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0});let g=null;for(const h of c)switch(h['code']){case 0x46:f['closed']=(parseInt(h['value'],0xa)&0x1)!==0x0;break;case 0x26:f[bu(0x112)]=parseFloat(h['value']);break;case 0x2b:f['constantWidth']=parseFloat(h['value']);break;case 0xa:g&&f['vertices']['push'](g),g={'x':parseFloat(h['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:g&&(g['y']=parseFloat(h[bu(0x1b1)]));break;case 0x28:g&&(g['startWidth']=parseFloat(h['value']));break;case 0x29:g&&(g['endWidth']=parseFloat(h['value']));break;case 0x2a:g&&(g['bulge']=parseFloat(h['value']));break;}return g&&f[bu(0xd6)]['push'](g),f;}function lt(c){const bv=aT,d=E(c),f=w(P({},d),{'type':bv(0x17f),'vertices':[],'closed':!0x1,'is3d':!0x1});for(const g of c)switch(g['code']){case 0x46:{const h=parseInt(g['value'],0xa);f['closed']=(h&0x1)!==0x0,f[bv(0xe5)]=(h&0x8)!==0x0;break;}}return f;}function ct(c){const bw=aT,d=E(c),f=w(P({},d),{'type':'ELLIPSE','center':{'x':0x0,'y':0x0,'z':0x0},'majorAxis':{'x':0x1,'y':0x0,'z':0x0},'minorRatio':0x1,'startParam':0x0,'endParam':Math['PI']*0x2});for(const g of c)switch(g['code']){case 0xa:f[bw(0x176)]['x']=parseFloat(g['value']);break;case 0x14:f['center']['y']=parseFloat(g['value']);break;case 0x1e:f['center']['z']=parseFloat(g[bw(0x1b1)]);break;case 0xb:f['majorAxis']['x']=parseFloat(g['value']);break;case 0x15:f[bw(0x1d6)]['y']=parseFloat(g['value']);break;case 0x1f:f['majorAxis']['z']=parseFloat(g['value']);break;case 0x28:f['minorRatio']=parseFloat(g[bw(0x1b1)]);break;case 0x29:f['startParam']=parseFloat(g['value']);break;case 0x2a:f['endParam']=parseFloat(g[bw(0x1b1)]);break;}return f;}function ht(c){const bx=aT,d=E(c),f=w(P({},d),{'type':'SPLINE','degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]});let g=null,h=null;for(const i of c)switch(i[bx(0x179)]){case 0x46:f['flags']=parseInt(i['value'],0xa);break;case 0x47:f['degree']=parseInt(i['value'],0xa);break;case 0x28:f['knots']['push'](parseFloat(i['value']));break;case 0x29:f['weights']['push'](parseFloat(i[bx(0x1b1)]));break;case 0xa:g&&f['controlPoints']['push'](g),g={'x':parseFloat(i['value']),'y':0x0,'z':0x0};break;case 0x14:g&&(g['y']=parseFloat(i['value']));break;case 0x1e:g&&(g['z']=parseFloat(i['value']));break;case 0xb:h&&f[bx(0xa2)]['push'](h),h={'x':parseFloat(i['value']),'y':0x0,'z':0x0};break;case 0x15:h&&(h['y']=parseFloat(i[bx(0x1b1)]));break;case 0x1f:h&&(h['z']=parseFloat(i['value']));break;case 0xc:f['startTangent']||(f['startTangent']={'x':0x0,'y':0x0,'z':0x0}),f[bx(0x1d8)]['x']=parseFloat(i['value']);break;case 0x16:f[bx(0x1d8)]&&(f['startTangent']['y']=parseFloat(i['value']));break;case 0x20:f['startTangent']&&(f['startTangent']['z']=parseFloat(i['value']));break;case 0xd:f['endTangent']||(f['endTangent']={'x':0x0,'y':0x0,'z':0x0}),f['endTangent']['x']=parseFloat(i['value']);break;case 0x17:f['endTangent']&&(f['endTangent']['y']=parseFloat(i['value']));break;case 0x21:f['endTangent']&&(f['endTangent']['z']=parseFloat(i['value']));break;}return g&&f['controlPoints']['push'](g),h&&f['fitPoints']['push'](h),f;}function ut(c){const by=aT,d=E(c),f=w(P({},d),{'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':by(0x93),'hAlign':0x0,'vAlign':0x0,'generationFlags':0x0});for(const g of c)switch(g['code']){case 0x1:f[by(0x142)]=g[by(0x1b1)];break;case 0xa:f['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:f['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:f['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:f['alignmentPoint']||(f[by(0x1aa)]={'x':0x0,'y':0x0,'z':0x0}),f['alignmentPoint']['x']=parseFloat(g[by(0x1b1)]);break;case 0x15:f['alignmentPoint']||(f['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),f['alignmentPoint']['y']=parseFloat(g['value']);break;case 0x1f:f['alignmentPoint']||(f['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),f['alignmentPoint']['z']=parseFloat(g[by(0x1b1)]);break;case 0x28:f['height']=parseFloat(g['value']);break;case 0x29:f['widthFactor']=parseFloat(g['value']);break;case 0x32:f[by(0x1d9)]=parseFloat(g['value']);break;case 0x33:f[by(0x198)]=parseFloat(g['value']);break;case 0x7:f['style']=g['value'];break;case 0x47:f['generationFlags']=parseInt(g['value'],0xa);break;case 0x48:f['hAlign']=parseInt(g['value'],0xa);break;case 0x49:f[by(0x135)]=parseInt(g[by(0x1b1)],0xa);break;}return f;}function dt(c){const bz=aT,d=E(c),f=w(P({},d),{'type':'MTEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'width':0x0,'attachmentPoint':0x1,'drawingDirection':0x1,'rotation':0x0,'lineSpacingStyle':0x1,'lineSpacingFactor':0x1,'style':'STANDARD','bgFill':0x0,'bgFillScale':1.5}),g=[];for(const h of c)switch(h['code']){case 0x1:g['push'](h['value']);break;case 0x3:g['push'](h[bz(0x1b1)]);break;case 0x7:f[bz(0x104)]=h['value'];break;case 0xa:f['insertionPoint']['x']=parseFloat(h['value']);break;case 0x14:f['insertionPoint']['y']=parseFloat(h['value']);break;case 0x1e:f['insertionPoint']['z']=parseFloat(h['value']);break;case 0xb:f['textDirection']||(f['textDirection']={'x':0x0,'y':0x0,'z':0x0}),f['textDirection']['x']=parseFloat(h[bz(0x1b1)]);break;case 0x15:f['textDirection']||(f['textDirection']={'x':0x0,'y':0x0,'z':0x0}),f[bz(0xab)]['y']=parseFloat(h[bz(0x1b1)]);break;case 0x1f:f['textDirection']||(f['textDirection']={'x':0x0,'y':0x0,'z':0x0}),f['textDirection']['z']=parseFloat(h['value']);break;case 0x28:f[bz(0x178)]=parseFloat(h['value']);break;case 0x29:f['width']=parseFloat(h['value']);break;case 0x2c:f['lineSpacingFactor']=parseFloat(h['value']);break;case 0x32:f['rotation']=parseFloat(h['value']);break;case 0x47:f['attachmentPoint']=parseInt(h[bz(0x1b1)],0xa);break;case 0x48:f['drawingDirection']=parseInt(h['value'],0xa);break;case 0x49:f['lineSpacingStyle']=parseInt(h[bz(0x1b1)],0xa);break;case 0x5a:f['bgFill']=parseInt(h['value'],0xa);break;}return f[bz(0x142)]=g['join'](''),f;}function ft(c){const bA=aT,d=E(c),f=w(P({},d),{'type':bA(0x118),'blockName':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'scaleX':0x1,'scaleY':0x1,'scaleZ':0x1,'rotation':0x0,'columnCount':0x1,'rowCount':0x1,'columnSpacing':0x0,'rowSpacing':0x0,'attribs':[]});for(const g of c)switch(g['code']){case 0x2:f[bA(0x98)]=g['value'];break;case 0xa:f['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:f['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:f[bA(0x15d)]['z']=parseFloat(g['value']);break;case 0x29:f['scaleX']=parseFloat(g['value']);break;case 0x2a:f['scaleY']=parseFloat(g['value']);break;case 0x2b:f['scaleZ']=parseFloat(g['value']);break;case 0x2c:f['columnSpacing']=parseFloat(g['value']);break;case 0x2d:f['rowSpacing']=parseFloat(g['value']);break;case 0x32:f['rotation']=parseFloat(g['value']);break;case 0x46:f['columnCount']=parseInt(g['value'],0xa)||0x1;break;case 0x47:f[bA(0x1b6)]=parseInt(g['value'],0xa)||0x1;break;}return f;}function pt(c){const bB=aT,d=E(c),f=w(P({},d),{'type':bB(0x19a),'blockName':'','dimStyle':'STANDARD','dimType':0x0,'defPoint':{'x':0x0,'y':0x0,'z':0x0},'textMidpoint':{'x':0x0,'y':0x0,'z':0x0},'textOverride':'','rotation':0x0,'textRotation':0x0,'leaderLength':0x0});for(const g of c)switch(g['code']){case 0x1:f[bB(0xf3)]=g[bB(0x1b1)];break;case 0x2:f['blockName']=g['value'];break;case 0x3:f[bB(0x8f)]=g['value'];break;case 0xa:f[bB(0x85)]['x']=parseFloat(g['value']);break;case 0x14:f['defPoint']['y']=parseFloat(g[bB(0x1b1)]);break;case 0x1e:f['defPoint']['z']=parseFloat(g[bB(0x1b1)]);break;case 0xb:f['textMidpoint']['x']=parseFloat(g['value']);break;case 0x15:f[bB(0x1b3)]['y']=parseFloat(g[bB(0x1b1)]);break;case 0x1f:f[bB(0x1b3)]['z']=parseFloat(g['value']);break;case 0xd:f['defPoint2']||(f['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),f['defPoint2']['x']=parseFloat(g['value']);break;case 0x17:f['defPoint2']||(f['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),f['defPoint2']['y']=parseFloat(g['value']);break;case 0x21:f['defPoint2']||(f[bB(0xfb)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint2']['z']=parseFloat(g['value']);break;case 0xe:f[bB(0x18c)]||(f['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),f['defPoint3']['x']=parseFloat(g['value']);break;case 0x18:f['defPoint3']||(f[bB(0x18c)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint3']['y']=parseFloat(g[bB(0x1b1)]);break;case 0x22:f['defPoint3']||(f['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),f[bB(0x18c)]['z']=parseFloat(g['value']);break;case 0xf:f['defPoint4']||(f['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),f['defPoint4']['x']=parseFloat(g['value']);break;case 0x19:f['defPoint4']||(f[bB(0xb8)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint4']['y']=parseFloat(g['value']);break;case 0x23:f[bB(0xb8)]||(f[bB(0xb8)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint4']['z']=parseFloat(g[bB(0x1b1)]);break;case 0x10:f['defPoint5']||(f[bB(0x92)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint5']['x']=parseFloat(g['value']);break;case 0x1a:f['defPoint5']||(f[bB(0x92)]={'x':0x0,'y':0x0,'z':0x0}),f['defPoint5']['y']=parseFloat(g[bB(0x1b1)]);break;case 0x24:f['defPoint5']||(f['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),f['defPoint5']['z']=parseFloat(g['value']);break;case 0x28:f['leaderLength']=parseFloat(g['value']);break;case 0x32:f['rotation']=parseFloat(g['value']);break;case 0x35:f['textRotation']=parseFloat(g['value']);break;case 0x46:f['dimType']=parseInt(g['value'],0xa);break;}return f;}function mt(c){const bC=aT,d=E(c),f=w(P({},d),{'type':'HATCH','patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]});let g=0x0;for(;g<c['length'];){const h=c[g];switch(h['code']){case 0x2:f['patternName']=h['value'];break;case 0x29:f['patternScale']=parseFloat(h['value']);break;case 0x34:f[bC(0x187)]=parseFloat(h['value']);break;case 0x46:f['solidFill']=h['value']==='1';break;case 0x47:f['associative']=h['value']==='1';break;case 0x4b:f[bC(0xbb)]=parseInt(h['value'],0xa);break;case 0x4c:f['patternType']=parseInt(h['value'],0xa);break;case 0x5b:{const k=parseInt(h['value'],0xa);g++;for(let l=0x0;l<k&&g<c['length'];l++){const m=bt(c,g);f[bC(0x170)]['push'](m['path']),g=m['nextIndex'];}continue;}}g++;}return f;}function bt(c,d){const bD=aT;let f=0x0;return d<c[bD(0x79)]&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?gt(c,d,f):vt(c,d,f);}function gt(c,d,f){const bE=aT,g={'type':'polyline','vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c['length']&&c[d]['code']===0x48&&(h=c[d]['value']==='1',d++),d<c['length']&&c[d]['code']===0x49&&(g[bE(0x1bc)]=c[d][bE(0x1b1)]==='1',d++);let k=0x0;d<c['length']&&c[d]['code']===0x5d&&(k=parseInt(c[d]['value'],0xa),d++);for(let l=0x0;l<k&&d<c['length'];l++){const m={'x':0x0,'y':0x0};c[d][bE(0x179)]===0xa&&(m['x']=parseFloat(c[d]['value']),d++),d<c['length']&&c[d][bE(0x179)]===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g['vertices'][bE(0xf6)](m),h&&d<c['length']&&c[d]['code']===0x2a?(g['bulges']['push'](parseFloat(c[d]['value'])),d++):h&&g['bulges']['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d][bE(0x179)]===0x14a);)if(c[d]['code']===0x61){const u=parseInt(c[d]['value'],0xa);d++;for(let v=0x0;v<u&&d<c['length']&&c[d]['code']===0x14a;v++)d++;}else d++;return{'path':g,'nextIndex':d};}function vt(f,g,k){const bF=aT,v={'type':'edges','edges':[],'flags':k};let x=0x0;g<f['length']&&f[g]['code']===0x5d&&(x=parseInt(f[g]['value'],0xa),g++);for(let y=0x0;y<x&&g<f['length']&&f[g]['code']===0x48;y++){const A=parseInt(f[g]['value'],0xa);switch(g++,A){case 0x1:{const C={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};g<f['length']&&f[g]['code']===0xa&&(C['start']['x']=parseFloat(f[g][bF(0x1b1)]),g++),g<f[bF(0x79)]&&f[g]['code']===0x14&&(C['start']['y']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0xb&&(C[bF(0x195)]['x']=parseFloat(f[g]['value']),g++),g<f[bF(0x79)]&&f[g][bF(0x179)]===0x15&&(C[bF(0x195)]['y']=parseFloat(f[g]['value']),g++),v['edges']['push'](C);break;}case 0x2:{const D={'type':bF(0x122),'center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};g<f[bF(0x79)]&&f[g][bF(0x179)]===0xa&&(D['center']['x']=parseFloat(f[g][bF(0x1b1)]),g++),g<f['length']&&f[g]['code']===0x14&&(D['center']['y']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x28&&(D['radius']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x32&&(D['startAngle']=parseFloat(f[g]['value']),g++),g<f[bF(0x79)]&&f[g]['code']===0x33&&(D['endAngle']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x49&&(D['ccw']=f[g]['value']==='1',g++),v[bF(0xac)][bF(0xf6)](D);break;}case 0x3:{const F={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};g<f['length']&&f[g]['code']===0xa&&(F['center']['x']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x14&&(F['center']['y']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0xb&&(F[bF(0x1d6)]['x']=parseFloat(f[g][bF(0x1b1)]),g++),g<f['length']&&f[g]['code']===0x15&&(F['majorAxis']['y']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x28&&(F['minorRatio']=parseFloat(f[g]['value']),g++),g<f['length']&&f[g]['code']===0x32&&(F[bF(0x15f)]=parseFloat(f[g][bF(0x1b1)]),g++),g<f['length']&&f[g]['code']===0x33&&(F[bF(0x100)]=parseFloat(f[g][bF(0x1b1)]),g++),g<f['length']&&f[g]['code']===0x49&&(F['ccw']=f[g]['value']==='1',g++),v['edges'][bF(0xf6)](F);break;}case 0x4:{let I=0x3;const L=[],N=[];g<f['length']&&f[g]['code']===0x5e&&(I=parseInt(f[g]['value'],0xa),g++),g<f['length']&&f[g]['code']===0x49&&g++,g<f['length']&&f[g][bF(0x179)]===0x4a&&g++;let O=0x0;g<f['length']&&f[g]['code']===0x5f&&(O=parseInt(f[g]['value'],0xa),g++);let R=0x0;g<f['length']&&f[g][bF(0x179)]===0x60&&(R=parseInt(f[g]['value'],0xa),g++);for(let S=0x0;S<O&&g<f['length']&&f[g]['code']===0x28;S++)L[bF(0xf6)](parseFloat(f[g][bF(0x1b1)])),g++;for(let W=0x0;W<R&&g<f['length'];W++){const Y={'x':0x0,'y':0x0};f[g]['code']===0xa&&(Y['x']=parseFloat(f[g]['value']),g++),g<f[bF(0x79)]&&f[g][bF(0x179)]===0x14&&(Y['y']=parseFloat(f[g][bF(0x1b1)]),g++),N['push'](Y);}v['edges']['push']({'type':'spline','degree':I,'knots':L,'controlPoints':N});break;}}}for(;g<f['length']&&(f[g]['code']===0x61||f[g][bF(0x179)]===0x14a);)if(f[g]['code']===0x61){const a0=parseInt(f[g]['value'],0xa);g++;for(let a1=0x0;a1<a0&&g<f['length']&&f[g]['code']===0x14a;a1++)g++;}else g++;return{'path':v,'nextIndex':g};}function Ft(c){const bG=aT,d=E(c),f=w(P({},d),{'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}});for(const g of c)switch(g['code']){case 0xa:f['position']['x']=parseFloat(g['value']);break;case 0x14:f['position']['y']=parseFloat(g['value']);break;case 0x1e:f['position']['z']=parseFloat(g[bG(0x1b1)]);break;}return f;}function Ce(c,d,f){const bH=aT;for(;d<c['length'];){const g=c[d];if(g['code']!==0x0){d++;continue;}const h=g['value'];if(h==='ENDSEC'||h==='ENDBLK')return d+0x1;d++;const i=[];for(;d<c['length']&&c[d]['code']!==0x0;)i['push'](c[d]),d++;switch(h){case'LINE':f['push'](rt(i));break;case'CIRCLE':f[bH(0xf6)](st(i));break;case'ARC':f['push'](ot(i));break;case'LWPOLYLINE':f['push'](it(i));break;case'ELLIPSE':f['push'](ct(i));break;case'SPLINE':f['push'](ht(i));break;case bH(0x164):f[bH(0xf6)](ut(i));break;case bH(0x97):f['push'](dt(i));break;case'INSERT':{const k=ft(i);i[bH(0x151)](m=>m[bH(0x179)]===0x42&&m[bH(0x1b1)]==='1')&&(d=kt(c,d,k['attribs'])),f['push'](k);break;}case'DIMENSION':f['push'](pt(i));break;case'HATCH':f['push'](mt(i));break;case'POINT':f[bH(0xf6)](Ft(i));break;case'POLYLINE':{const l=lt(i);d=xt(c,d,l[bH(0xd6)]),f['push'](l);break;}}}return d;}function xt(c,d,f){const bI=aT;for(;d<c[bI(0x79)];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g==='ENDBLK')return d;if(g==='VERTEX'){d++;const h={'x':0x0,'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i[bI(0x179)]){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i[bI(0x1b1)]);break;case 0x2a:h[bI(0x1bb)]=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i[bI(0x1b1)]);break;case 0x29:h['endWidth']=parseFloat(i['value']);break;}d++;}f[bI(0xf6)](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function kt(c,d,f){const bJ=aT;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g==='ENDBLK')return d;if(g==='ATTRIB'){d++;const h={'tag':'','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'style':'STANDARD','layer':'0','color':0x100};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x1:h[bJ(0x142)]=i['value'];break;case 0x2:h[bJ(0x180)]=i['value'];break;case 0x7:h['style']=i['value'];break;case 0x8:h['layer']=i['value'];break;case 0xa:h[bJ(0x15d)]['x']=parseFloat(i[bJ(0x1b1)]);break;case 0x14:h['insertionPoint']['y']=parseFloat(i['value']);break;case 0x1e:h['insertionPoint']['z']=parseFloat(i['value']);break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x32:h['rotation']=parseFloat(i['value']);break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d][bJ(0x179)]!==0x0;)d++;}}return d;}function yt(c,d,f){const bK=aT;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i[bK(0x1b1)];break;case 0x8:break;case 0xa:h['basePoint']['x']=parseFloat(i['value']);break;case 0x14:h['basePoint']['y']=parseFloat(i['value']);break;case 0x1e:h['basePoint']['z']=parseFloat(i['value']);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;}d++;}d=Ce(c,d,h['entities']),h['name']&&!h['name']['startsWith']('*Model_Space')&&!h[bK(0x1ab)]['startsWith']('*Paper_Space')&&f['set'](h['name'],h);}else d++;}return d;}var ke='AutoCAD\x20Binary\x20DXF',Pt={'ANSI_874':'windows-874','ANSI_932':'shift_jis','ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':'big5','ANSI_1250':'windows-1250','ANSI_1251':'windows-1251','ANSI_1252':'windows-1252','ANSI_1253':'windows-1253','ANSI_1254':aT(0x80),'ANSI_1255':'windows-1255','ANSI_1256':'windows-1256','ANSI_1257':aT(0x144),'ANSI_1258':'windows-1258'},wt=aT(0x190);function It(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function ye(c){const bL=aT;return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String[bL(0x1b9)](parseInt(f,0x10)));}function Tt(d){const bM=aT;var f,g,k;if(typeof d==bM(0x18f))return ye(d);const m=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](m['slice'](0x0,ke['length']))===ke)throw new B('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let v=new TextDecoder('utf-8')['decode'](d);const x=v[bM(0xb2)](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/),y=(f=x==null?void 0x0:x[0x1])!=null?f:'';if(y&&y<wt){const A=v['match'](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/),C=(g=A==null?void 0x0:A[0x1])!=null?g:'',D=(k=Pt[C])!=null?k:'windows-1252';D!==bM(0x197)&&(v=new TextDecoder(D)['decode'](d));}return ye(v);}function Mt(c,d){const bN=aT;for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']===bN(0x19c))return d+0x1;d++;}return d;}function Et(c){c['layers']['has']('0')||c['layers']['set']('0',{'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function At(c){const bO=aT;for(const [,d]of c['layers'])d['isOff']=d[bO(0x183)]<0x0,d['isOff']&&(d['color']=Math['abs'](d[bO(0x183)])),d['isFrozen']=(d['flags']&0x1)!==0x0,d[bO(0x130)]=(d['flags']&0x4)!==0x0;}var B=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function le(c){const bP=aT;if(typeof c=='string'){if(c['length']===0x0)throw new B('Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.');}else{if(c instanceof ArrayBuffer){if(c['byteLength']===0x0)throw new B('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new B('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=Tt(c);}catch(h){throw h instanceof B?h:new B('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Ke(d);}catch(i){throw new B(bP(0x133),i);}if(f['length']===0x0)throw new B(bP(0x12d));const g={'header':It(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let k=0x0;for(;k<f['length'];){const l=f[k];if(l['code']===0x0&&l['value']==='SECTION'){if(k++,k>=f['length'])break;const m=f[k]['value'];switch(k++,m){case'HEADER':k=Qe(f,k,g['header']);break;case'TABLES':k=Je(f,k,g);break;case'BLOCKS':k=yt(f,k,g['blocks']);break;case'ENTITIES':k=Ce(f,k,g['entities']);break;default:k=Mt(f,k);break;}}else{if(l['code']===0x0&&l[bP(0x1b1)]==='EOF')break;k++;}}}catch(u){throw new B('Failed\x20to\x20parse\x20DXF\x20sections.',u);}return Et(g),At(g),g;}var St=['#000000','#FF0000','#FFFF00','#00FF00','#00FFFF','#0000FF',aT(0x129),'#FFFFFF','#808080','#C0C0C0',aT(0x1a2),aT(0x71),'#A50000','#A55252','#7F0000','#7F3F3F',aT(0xc8),'#4C2626','#260000',aT(0x90),'#FF3F00','#FF9F7F','#A52900','#A56752','#7F1F00','#7F4F3F',aT(0x11f),'#4C2F26','#260900',aT(0x1c3),'#FF7F00',aT(0x134),'#A55200',aT(0x1dc),'#7F3F00','#7F5F3F','#4C2600','#4C3926','#261300',aT(0xf2),'#FFBF00','#FFDF7F','#A57C00',aT(0xf5),aT(0x162),'#7F6F3F','#4C3900','#4C4226','#261C00','#262113','#FFFF00','#FFFF7F',aT(0x171),'#A5A552','#7F7F00','#7F7F3F','#4C4C00','#4C4C26','#262600','#262613','#BFFF00','#DFFF7F','#7CA500',aT(0x7b),'#5F7F00','#6F7F3F','#394C00','#424C26',aT(0x1be),'#212613',aT(0x89),'#BFFF7F',aT(0x87),'#7CA552','#3F7F00','#5F7F3F',aT(0x11b),'#394C26','#132600','#1C2613','#3FFF00','#9FFF7F','#29A500','#67A552','#1F7F00','#4F7F3F','#134C00','#2F4C26','#092600',aT(0xbc),aT(0x6d),'#7FFF7F','#00A500','#52A552',aT(0xba),'#3F7F3F',aT(0xa9),'#264C26','#002600',aT(0xee),'#00FF3F',aT(0x140),'#00A529',aT(0x14c),'#007F1F','#3F7F4F','#004C13','#264C2F','#002609',aT(0x158),'#00FF7F','#7FFFBF','#00A552','#52A57C','#007F3F','#3F7F5F','#004C26','#264C39','#002613','#13261C','#00FFBF','#7FFFDF','#00A57C',aT(0x147),aT(0x1bd),'#3F7F6F','#004C39','#264C42','#00261C','#132621','#00FFFF','#7FFFFF','#00A5A5','#52A5A5',aT(0xdf),'#3F7F7F',aT(0xe3),'#264C4C','#002626','#132626',aT(0x1c1),'#7FDFFF','#007CA5',aT(0x16e),'#005F7F','#3F6F7F',aT(0xea),'#26424C','#001C26','#132126',aT(0x1c9),aT(0xbf),'#0052A5','#527CA5','#003F7F',aT(0x10c),aT(0x107),'#26394C','#001326','#131C26','#003FFF','#7F9FFF','#0029A5','#5267A5','#001F7F','#3F4F7F','#00134C','#262F4C','#000926','#131726','#0000FF',aT(0x182),'#0000A5','#5252A5','#00007F','#3F3F7F','#00004C','#26264C','#000026',aT(0xcb),aT(0x102),'#9F7FFF','#2900A5','#6752A5','#1F007F','#4F3F7F','#13004C','#2F264C','#090026',aT(0x1db),'#7F00FF',aT(0x124),'#5200A5','#7C52A5',aT(0x1ce),'#5F3F7F',aT(0xde),aT(0x6e),'#130026','#1C1326','#BF00FF','#DF7FFF',aT(0xef),'#9152A5',aT(0x10b),aT(0x160),'#39004C','#42264C','#1C0026','#211326','#FF00FF','#FF7FFF','#A500A5',aT(0x77),'#7F007F','#7F3F7F','#4C004C','#4C264C','#260026','#261326','#FF00BF','#FF7FDF','#A5007C',aT(0xd7),'#7F005F','#7F3F6F','#4C0039','#4C2642','#26001C','#261321','#FF007F','#FF7FBF','#A50052','#A5527C','#7F003F','#7F3F5F','#4C0026','#4C2639','#260013',aT(0xb9),'#FF003F','#FF7F9F','#A50029','#A55267','#7F001F','#7F3F4F','#4C0013',aT(0xca),'#260009','#261317','#333333','#505050',aT(0xe1),'#828282','#BEBEBE','#FFFFFF'];function Ct(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return St[c];}var X={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':aT(0x150),'measureColor':'#ffaa00','gridColor':'#333333','crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':'#000000','selectionColor':'#0066ff','measureColor':aT(0xdd),'gridColor':'#dddddd','crosshairColor':'#cccccc'}};function U(c,d,f){const bQ=aT;return[d*c['scale']+c['offsetX'],-f*c['scale']+c[bQ(0xb1)]];}function K(c,d,f){const bR=aT;return[(d-c['offsetX'])/c['scale'],-(f-c['offsetY'])/c[bR(0xb0)]];}function Pe(c,d){const bS=aT,f=window['devicePixelRatio']||0x1;c['setTransform'](d[bS(0xb0)]*f,0x0,0x0,-d[bS(0xb0)]*f,d[bS(0x1a1)]*f,d['offsetY']*f);}function Dt(g,k,v,x,y,A,C=0.05){const D=y-v,F=A-x;if(D<=0x0||F<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const I=g/D,L=k/F,N=Math['min'](I,L)*(0x1-C*0x2),O=(v+y)/0x2,R=(x+A)/0x2,S=g/0x2-O*N,W=k/0x2+R*N;return{'scale':N,'offsetX':S,'offsetY':W};}function Lt(c,d,f,g,h=0.0001,k=0x186a0){const l=Math['max'](h,Math['min'](k,c['scale']*g)),m=l/c['scale'];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c['offsetY'])*m};}var Nt=class{constructor(c){const bT=aT;p(this,'transform',{'scale':0x1,'offsetX':0x0,'offsetY':0x0}),p(this,'minScale'),p(this,'maxScale'),(this[bT(0x8b)]=c['minZoom'],this['maxScale']=c['maxZoom']);}['getTransform'](){const bU=aT;return this[bU(0xc7)];}['setTransform'](c){const bV=aT;this[bV(0xc7)]=c;}['pan'](c,d){this['transform']=w(P({},this['transform']),{'offsetX':this['transform']['offsetX']+c,'offsetY':this['transform']['offsetY']+d});}['zoom'](c,d,f){this['transform']=Lt(this['transform'],c,d,f,this['minScale'],this['maxScale']);}};function we(c,d){const bW=aT;var f;return c===0x7?d===bW(0x13d)?'#ffffff':bW(0x1b5):(f=Ct(c))!=null?f:bW(0x15a);}function ue(c,d,f,g){const bX=aT;if(c['trueColor']!==void 0x0){const k=c['trueColor']>>0x10&0xff,m=c['trueColor']>>0x8&0xff,u=c[bX(0x82)]&0xff;return'rgb('+k+','+m+','+u+')';}if(c['color']===0x0)return g!=null?g:X[f]['defaultEntityColor'];if(c[bX(0x183)]!==0x100)return we(c['color'],f);const h=d['get'](c['layer']);if(h){if(h['trueColor']!==void 0x0){const x=h['trueColor']>>0x10&0xff,y=h['trueColor']>>0x8&0xff,A=h['trueColor']&0xff;return bX(0x18a)+x+','+y+','+A+')';}const v=Math['abs'](h['color']);return we(v,f);}return X[f][bX(0x194)];}function Bt(c,d){const bY=aT;c['beginPath'](),c['moveTo'](d[bY(0xd1)]['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']),c[bY(0x1a4)]();}function Xt(c,d){const bZ=aT;d['radius']<=0x0||(c['beginPath'](),c[bZ(0x122)](d['center']['x'],d[bZ(0x176)]['y'],d['radius'],0x0,Math['PI']*0x2),c['stroke']());}function Yt(c,d){if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1),c['stroke']();}function zt(k,A,C,D,I){const c0=aT,L=C-k,N=D-A,O=Math[c0(0x153)](L*L+N*N);if(O<1e-10)return{'cx':k,'cy':A,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const R=Math[c0(0xb7)](I)*O/0x2,S=(T(O/0x2,0x2)+T(R,0x2))/(0x2*R),W=(k+C)/0x2,Y=(A+D)/0x2,a0=-N/O,a1=L/O,a2=S-R,a3=I>0x0?0x1:-0x1,a4=W+a3*a2*a0,a5=Y+a3*a2*a1,a6=Math['atan2'](A-a5,k-a4),a7=Math[c0(0x1c0)](D-a5,C-a4),a8=I<0x0;return{'cx':a4,'cy':a5,'radius':S,'startAngle':a6,'endAngle':a7,'anticlockwise':a8};}function Q(c,d,f,g,h,i){const c1=aT,k=zt(d,f,g,h,i);if(k['radius']<1e-10){c['lineTo'](g,h);return;}c['arc'](k['cx'],k['cy'],k[c1(0xbd)],k['startAngle'],k[c1(0x100)],k['anticlockwise']);}function Rt(c,d){const c2=aT,f=d['vertices'];if(f['length']<0x2)return;c[c2(0xfe)](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f[c2(0x79)]:f['length']-0x1;for(let h=0x0;h<g;h++){const i=f[h],k=f[(h+0x1)%f['length']];Math['abs'](i['bulge'])<1e-10?c[c2(0x128)](k['x'],k['y']):Q(c,i['x'],i['y'],k['x'],k['y'],i['bulge']);}c[c2(0x1a4)]();}function Ot(c,d){const c3=aT;var f;const g=d['vertices'];if(g['length']<0x2)return;c['beginPath'](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);const h=d['closed']?g[c3(0x79)]:g['length']-0x1;for(let k=0x0;k<h;k++){const m=g[k],u=g[(k+0x1)%g[c3(0x79)]],v=(f=m['bulge'])!=null?f:0x0;Math['abs'](v)<1e-10?c['lineTo'](u['x'],u['y']):Q(c,m['x'],m['y'],u['x'],u['y'],v);}c['stroke']();}function _t(c,d){const c4=aT,f=Math[c4(0x153)](T(d['majorAxis']['x'],0x2)+T(d['majorAxis']['y'],0x2)+T(d[c4(0x1d6)]['z'],0x2));if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d[c4(0x1d6)]['y'],d['majorAxis']['x']);c[c4(0xfe)](),c[c4(0x10a)](d['center']['x'],d['center']['y'],f,g,h,d['startParam'],d['endParam'],!0x1),c['stroke']();}function Wt(k,y,A,C,D){var I;const L=y['length']-0x1;let N=k;for(;N<L&&A[N+0x1]<=C;)N++;const O=[],R=[];for(let S=0x0;S<=k;S++){const W=N-k+S;O['push'](P({},y[W])),R['push'](D?D[W]:0x1);}for(let Y=0x1;Y<=k;Y++)for(let a0=k;a0>=Y;a0--){const a1=N-k+a0,a2=A[a1+k-Y+0x1]-A[a1];if(Math['abs'](a2)<1e-10)continue;const a3=(C-A[a1])/a2,a4=O[a0],a5=O[a0-0x1];if(D){const a6=R[a0-0x1]*(0x1-a3),a7=R[a0]*a3,a8=a6+a7;if(Math['abs'](a8)<1e-10)continue;a4['x']=(a5['x']*a6+a4['x']*a7)/a8,a4['y']=(a5['y']*a6+a4['y']*a7)/a8,a4['z']=(a5['z']*a6+a4['z']*a7)/a8,R[a0]=a8;}else a4['x']=(0x1-a3)*a5['x']+a3*a4['x'],a4['y']=(0x1-a3)*a5['y']+a3*a4['y'],a4['z']=(0x1-a3)*a5['z']+a3*a4['z'];}return(I=O[k])!=null?I:{'x':0x0,'y':0x0,'z':0x0};}function $t(f){const c5=aT;if(f['length']<0x2)return f[c5(0x103)](x=>({'x':x['x'],'y':x['y']}));const g=[],k=f[c5(0x79)],v=0xa;for(let x=0x0;x<k-0x1;x++){const y=f[Math['max'](0x0,x-0x1)],A=f[x],C=f[Math[c5(0x191)](k-0x1,x+0x1)],D=f[Math[c5(0x191)](k-0x1,x+0x2)];for(let F=0x0;F<=(x===k-0x2?v:v-0x1);F++){const I=F/v,L=I*I,N=L*I,O=0.5*(0x2*A['x']+(-y['x']+C['x'])*I+(0x2*y['x']-0x5*A['x']+0x4*C['x']-D['x'])*L+(-y['x']+0x3*A['x']-0x3*C['x']+D['x'])*N),R=0.5*(0x2*A['y']+(-y['y']+C['y'])*I+(0x2*y['y']-0x5*A['y']+0x4*C['y']-D['y'])*L+(-y['y']+0x3*A['y']-0x3*C['y']+D['y'])*N);g['push']({'x':O,'y':R});}}return g;}function De(d,f){const c6=aT;if(d[c6(0x1b4)]===0x1)return d['controlPoints']['map'](y=>({'x':y['x'],'y':y['y']}));if(d[c6(0x1a3)]['length']===0x0&&d['fitPoints'][c6(0x79)]>=0x2)return $t(d['fitPoints']);if(d[c6(0x1a3)][c6(0x79)]<d[c6(0x1b4)]+0x1)return[];if(d['knots'][c6(0x79)]<d['controlPoints']['length']+d['degree']+0x1)return[];const g=[],k=d['knots'][d['degree']],m=d['knots'][d['knots']['length']-d['degree']-0x1];if(m<=k)return[];const u=Math['max'](d['controlPoints'][c6(0x79)]*0xa,Math[c6(0x1cd)]((m-k)/f)),v=Math['min'](u,0x1388),x=d[c6(0x199)]['length']>0x0?d[c6(0x199)]:void 0x0;for(let y=0x0;y<=v;y++){const A=k+(m-k)*(y/v),C=Wt(d[c6(0x1b4)],d['controlPoints'],d['knots'],A,x);g['push']({'x':C['x'],'y':C['y']});}return g;}function jt(c,d,f){const c7=aT,g=De(d,f);if(!(g['length']<0x2)){c['beginPath'](),c[c7(0x84)](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c[c7(0x128)](g[h]['x'],g[h]['y']);d[c7(0x1cc)]&0x1&&c[c7(0x1a8)](),c['stroke']();}}var qt={'standard':'Arial,\x20sans-serif','arial':'Arial,\x20sans-serif','arial.ttf':'Arial,\x20sans-serif','romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':aT(0xc3),'txt.shx':'monospace','monotxt.shx':'monospace','isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':aT(0xc3),'times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':aT(0xfc),'gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Le(c){const d=c['toLowerCase']()['trim']();return qt[d]||'sans-serif';}function Ht(c,d,f){const c8=aT;if(!d['text']||d['height']<f*0x4)return;const g=d['hAlign']!==0x0||d['vAlign']!==0x0,k=g&&d['alignmentPoint']?d['alignmentPoint']['x']:d['insertionPoint']['x'],m=g&&d[c8(0x1aa)]?d['alignmentPoint']['y']:d[c8(0x15d)]['y'];if(c[c8(0xed)](),c['translate'](k,m),c['scale'](0x1,-0x1),d['rotation']&&c[c8(0x1ba)](-d['rotation']*Math['PI']/0xb4),d['widthFactor']!==0x1&&c['scale'](d[c8(0x73)],0x1),d[c8(0x198)]){const y=Math['tan'](d['obliqueAngle']*Math['PI']/0xb4);c[c8(0xc7)](0x1,0x0,y,0x1,0x0,0x0);}const u=(d['generationFlags']&0x2)!==0x0,v=(d[c8(0x126)]&0x4)!==0x0;u&&c[c8(0xb0)](-0x1,0x1),v&&c['scale'](0x1,-0x1);const x=Le(d['style']||'Standard');switch(c['font']=d[c8(0x178)]+'px\x20'+x,d[c8(0x70)]){case 0x0:c[c8(0x9f)]='left';break;case 0x1:c['textAlign']='center';break;case 0x2:c[c8(0x9f)]=c8(0xd2);break;case 0x3:c[c8(0x9f)]='left';break;case 0x4:c[c8(0x9f)]=c8(0x176);break;case 0x5:c['textAlign']='left';break;default:c['textAlign']='left';}switch(d[c8(0x135)]){case 0x0:c['textBaseline']='alphabetic';break;case 0x1:c['textBaseline']='bottom';break;case 0x2:c['textBaseline']='middle';break;case 0x3:c['textBaseline']='top';break;default:c['textBaseline']='alphabetic';}c['fillText'](d['text'],0x0,0x0),c['restore']();}function Vt(c){const c9=aT;return c[c9(0x1c8)](/\\P/g,'\x0a')['replace'](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')['replace'](/\\~/g,'\u00a0')['replace'](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Ut(f,g,k){const cb=aT;var r;if(!g['text']||g['height']<k*0x4)return;f['save'](),f['translate'](g[cb(0x15d)]['x'],g['insertionPoint']['y']),f['scale'](0x1,-0x1);const v=g['textDirection']?Math[cb(0x1c0)](g['textDirection']['y'],g['textDirection']['x']):(g['rotation']||0x0)*Math['PI']/0xb4;v&&f[cb(0x1ba)](-v);const x=Vt(g[cb(0x142)])[cb(0x106)]('\x0a'),y=g[cb(0x178)]*(g[cb(0xa0)]||1.4),A=Le(g['style']||'Standard');f['font']=g['height']+'px\x20'+A;const C=(g[cb(0xaf)]-0x1)%0x3,D=Math[cb(0x1bf)]((g['attachmentPoint']-0x1)/0x3),F=['left','center',cb(0xd2)];f['textAlign']=(r=F[C])!=null?r:'left';let I=0x0;const L=x['length']*y;switch(D){case 0x0:I=g['height'];break;case 0x1:I=g['height']-L/0x2;break;case 0x2:I=g[cb(0x178)]-L;break;}for(let N=0x0;N<x['length'];N++)f['fillText'](x[N],0x0,I+N*y);f['restore']();}var Gt=0x64;function Zt(f,g,k,m=0x0){const cc=aT;if(m>Gt)return null;if(k['has'](f))return k[cc(0xe0)](f);const v=g['blocks']['get'](f);if(!v)return k['set'](f,null),null;k[cc(0xa4)](f,null);let x=0x1/0x0,y=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const I of v['entities']){let L;I['type']==='INSERT'?L=Ne(I,g,k,m+0x1):L=_(I),L&&(D=!0x0,x=Math['min'](x,L['minX']),y=Math['min'](y,L['minY']),A=Math['max'](A,L[cc(0x72)]),C=Math[cc(0x19e)](C,L['maxY']));}const F=D?{'minX':x,'minY':y,'maxX':A,'maxY':C}:null;return k['set'](f,F),F;}function Ne(a0,a1,a2,a3=0x0){const cd=aT,a4=Zt(a0['blockName'],a1,a2,a3);if(!a4)return null;const a5=a1['blocks']['get'](a0[cd(0x98)]);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4[cd(0x14a)]-a7,ab=a4[cd(0x72)]-a6,ac=a4['maxY']-a7;const ad=a0['scaleX'],af=a0['scaleY'];let ag=a8*ad,ah=ab*ad,ai=a9*af,aj=ac*af;if(ag>ah){const ax=ag;ag=ah,ah=ax;}if(ai>aj){const ay=ai;ai=aj,aj=ay;}const ak=(a0[cd(0x1d9)]||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0[cd(0x15d)]['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math['max'](0x1,a0['columnCount']),aG=Math['max'](0x1,a0[cd(0x1b6)]);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0['rowSpacing'];aB=Math['min'](aB,aB+aH),aD=Math['max'](aD,aD+aH),aC=Math['min'](aC,aC+aI),aE=Math['max'](aE,aE+aI);}return{'minX':aB,'minY':aC,'maxX':aD,'maxY':aE};}const al=Math['cos'](ak),am=Math[cd(0x188)](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0[cd(0x15d)]['x'],ap=a0['insertionPoint']['y'];let aq=0x1/0x0,ar=0x1/0x0,as=-0x1/0x0,au=-0x1/0x0;for(const aJ of an){const aK=aJ['x']*al-aJ['y']*am+ao,aL=aJ['x']*am+aJ['y']*al+ap;aq=Math['min'](aq,aK),ar=Math['min'](ar,aL),as=Math['max'](as,aK),au=Math['max'](au,aL);}const av=Math['max'](0x1,a0['columnCount']),aw=Math['max'](0x1,a0[cd(0x1b6)]);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0['columnSpacing'],aN=(aw-0x1)*a0['rowSpacing'],aO=[{'x':0x0,'y':0x0},{'x':aM,'y':0x0},{'x':aM,'y':aN},{'x':0x0,'y':aN}];for(const aP of aO){const aQ=aP['x']*al-aP['y']*am,aR=aP['x']*am+aP['y']*al;aq=Math['min'](aq,aq+aQ),ar=Math[cd(0x191)](ar,ar+aR),as=Math['max'](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function Kt(c,d){let f=0x1/0x0,g=0x1/0x0,k=-0x1/0x0,m=-0x1/0x0,u=!0x1;const v=d?new Map():void 0x0;for(const x of c){const y=d&&v?Be(x,d,v):_(x);y&&(u=!0x0,f=Math['min'](f,y['minX']),g=Math['min'](g,y['minY']),k=Math['max'](k,y['maxX']),m=Math['max'](m,y['maxY']));}return u?{'minX':f,'minY':g,'maxX':k,'maxY':m}:null;}function Be(c,d,f){return c['type']==='INSERT'?Ne(c,d,f):_(c);}var ne=null;function Qt(c){const cf=aT,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g['entities'][cf(0x79)]);for(let i=0x0;i<g['entities']['length'];i++)h[i]=_(g['entities'][i]);d['set'](f,h);}return d;}function Jt(c){ne=c;}function Ie(){ne=null;}function ea(c,d){if(!ne)return;const f=ne['get'](c);if(!(!f||d>=f['length']))return f[d];}function _(A){const cg=aT;var D,I,L,N,O,R,W,Y,a0,a1,a2,a3,a4,a5,a6,a7;switch(A['type']){case'LINE':return{'minX':Math['min'](A['start']['x'],A[cg(0x195)]['x']),'minY':Math[cg(0x191)](A['start']['y'],A['end']['y']),'maxX':Math['max'](A['start']['x'],A['end']['x']),'maxY':Math['max'](A['start']['y'],A['end']['y'])};case cg(0xcd):return{'minX':A['center']['x']-A['radius'],'minY':A[cg(0x176)]['y']-A['radius'],'maxX':A['center']['x']+A['radius'],'maxY':A[cg(0x176)]['y']+A['radius']};case'ARC':return{'minX':A['center']['x']-A['radius'],'minY':A['center']['y']-A['radius'],'maxX':A[cg(0x176)]['x']+A['radius'],'maxY':A['center']['y']+A['radius']};case'LWPOLYLINE':case cg(0x17f):{if(A[cg(0xd6)]['length']===0x0)return null;let a8=0x1/0x0,a9=0x1/0x0,ab=-0x1/0x0,ac=-0x1/0x0;for(const ad of A['vertices'])a8=Math['min'](a8,ad['x']),a9=Math['min'](a9,ad['y']),ab=Math['max'](ab,ad['x']),ac=Math['max'](ac,ad['y']);return{'minX':a8,'minY':a9,'maxX':ab,'maxY':ac};}case cg(0xcf):{const af=Math['sqrt'](T(A['majorAxis']['x'],0x2)+T(A['majorAxis']['y'],0x2));return{'minX':A[cg(0x176)]['x']-af,'minY':A['center']['y']-af,'maxX':A['center']['x']+af,'maxY':A['center']['y']+af};}case'TEXT':return{'minX':A['insertionPoint']['x'],'minY':A['insertionPoint']['y'],'maxX':A['insertionPoint']['x']+A[cg(0x178)]*A['text']['length']*0.6,'maxY':A['insertionPoint']['y']+A['height']};case'MTEXT':return{'minX':A['insertionPoint']['x'],'minY':A[cg(0x15d)]['y']-A['height'],'maxX':A['insertionPoint']['x']+(A['width']||A['height']*0xa),'maxY':A['insertionPoint']['y']+A['height']};case'SPLINE':{if(A['controlPoints']['length']===0x0)return null;let ag=0x1/0x0,ah=0x1/0x0,ai=-0x1/0x0,aj=-0x1/0x0;for(const ak of A[cg(0x1a3)])ag=Math[cg(0x191)](ag,ak['x']),ah=Math['min'](ah,ak['y']),ai=Math[cg(0x19e)](ai,ak['x']),aj=Math['max'](aj,ak['y']);return{'minX':ag,'minY':ah,'maxX':ai,'maxY':aj};}case cg(0x175):return{'minX':A['position']['x'],'minY':A['position']['y'],'maxX':A[cg(0xe8)]['x'],'maxY':A['position']['y']};case'INSERT':return{'minX':A[cg(0x15d)]['x'],'minY':A[cg(0x15d)]['y'],'maxX':A['insertionPoint']['x'],'maxY':A['insertionPoint']['y']};case'DIMENSION':return A['defPoint']?{'minX':Math['min'](A['defPoint']['x'],(I=(D=A['defPoint2'])==null?void 0x0:D['x'])!=null?I:A['defPoint']['x'],(N=(L=A['defPoint3'])==null?void 0x0:L['x'])!=null?N:A[cg(0x85)]['x']),'minY':Math[cg(0x191)](A['defPoint']['y'],(R=(O=A['defPoint2'])==null?void 0x0:O['y'])!=null?R:A['defPoint']['y'],(Y=(W=A['defPoint3'])==null?void 0x0:W['y'])!=null?Y:A['defPoint']['y']),'maxX':Math[cg(0x19e)](A[cg(0x85)]['x'],(a1=(a0=A['defPoint2'])==null?void 0x0:a0['x'])!=null?a1:A['defPoint']['x'],(a3=(a2=A['defPoint3'])==null?void 0x0:a2['x'])!=null?a3:A['defPoint']['x']),'maxY':Math['max'](A['defPoint']['y'],(a5=(a4=A['defPoint2'])==null?void 0x0:a4['y'])!=null?a5:A['defPoint']['y'],(a7=(a6=A['defPoint3'])==null?void 0x0:a6['y'])!=null?a7:A['defPoint']['y'])}:null;case'HATCH':{let al=0x1/0x0,am=0x1/0x0,an=-0x1/0x0,ao=-0x1/0x0,ap=!0x1;for(const aq of A[cg(0x170)])if(aq['vertices']){for(const ar of aq['vertices'])ap=!0x0,al=Math[cg(0x191)](al,ar['x']),am=Math['min'](am,ar['y']),an=Math['max'](an,ar['x']),ao=Math['max'](ao,ar['y']);}return ap?{'minX':al,'minY':am,'maxX':an,'maxY':ao}:null;}default:return null;}}var ta=new Set(['LINE',aT(0x105),'CIRCLE','LWPOLYLINE','POLYLINE','ELLIPSE','SPLINE']);function Xe(c){return ta['has'](c);}function aa(c,d){const ch=aT;c[ch(0x84)](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']);}function na(c,d){const ci=aT;if(d[ci(0xbd)]<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d[ci(0x100)]*Math['PI']/0xb4;c['moveTo'](d[ci(0x176)]['x']+d['radius']*Math['cos'](f),d[ci(0x176)]['y']+d['radius']*Math[ci(0x188)](f)),c['arc'](d['center']['x'],d[ci(0x176)]['y'],d['radius'],f,g,!0x1);}function ra(c,d){d['radius']<=0x0||(c['moveTo'](d['center']['x']+d['radius'],d['center']['y']),c['arc'](d['center']['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2));}function sa(c,d){const f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const i=f[h],k=f[(h+0x1)%f['length']];Math['abs'](i['bulge'])<1e-10?c['lineTo'](k['x'],k['y']):Q(c,i['x'],i['y'],k['x'],k['y'],i['bulge']);}}function oa(c,d){const cj=aT;var f;const g=d['vertices'];if(g['length']<0x2)return;c['moveTo'](g[0x0]['x'],g[0x0]['y']);const h=d['closed']?g['length']:g['length']-0x1;for(let k=0x0;k<h;k++){const m=g[k],u=g[(k+0x1)%g[cj(0x79)]],v=(f=m['bulge'])!=null?f:0x0;Math['abs'](v)<1e-10?c['lineTo'](u['x'],u['y']):Q(c,m['x'],m['y'],u['x'],u['y'],v);}}function ia(c,d){const ck=aT,f=Math[ck(0x153)](T(d[ck(0x1d6)]['x'],0x2)+T(d['majorAxis']['y'],0x2)+T(d['majorAxis']['z'],0x2));if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d[ck(0x1d6)]['y'],d['majorAxis']['x']),k=Math['cos'](h),m=Math['sin'](h),u=Math['cos'](d['startParam']),v=Math['sin'](d['startParam']);c['moveTo'](d[ck(0x176)]['x']+f*k*u-g*m*v,d['center']['y']+f*m*u+g*k*v),c['ellipse'](d['center']['x'],d[ck(0x176)]['y'],f,g,h,d['startParam'],d['endParam'],!0x1);}function la(c,d,f){const cl=aT,g=De(d,f);if(!(g['length']<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g[cl(0x79)];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Ye(c,d,f){const cm=aT;switch(d['type']){case'LINE':aa(c,d);break;case'ARC':na(c,d);break;case'CIRCLE':ra(c,d);break;case'LWPOLYLINE':sa(c,d);break;case cm(0x17f):oa(c,d);break;case cm(0xcf):ia(c,d);break;case'SPLINE':la(c,d,f);break;}}var ca=0x64,ha=0.5;function ze(I,L,N,O,R,W,Y=0x0,a0){const cn=aT;var a1;if(Y>ca)return;const a2=N['blocks'][cn(0xe0)](L['blockName']);if(!a2)return;const a3=Math['max'](0x1,L['columnCount']),a4=Math['max'](0x1,L['rowCount']);for(let a5=0x0;a5<a4;a5++)for(let a6=0x0;a6<a3;a6++){I[cn(0xed)]();const a7=L[cn(0x15d)]['x']+a6*L['columnSpacing'],a8=L['insertionPoint']['y']+a5*L['rowSpacing'];I['translate'](a7,a8),L['rotation']&&I['rotate'](L['rotation']*Math['PI']/0xb4),I['scale'](L[cn(0xc2)],L['scaleY']),I['translate'](-a2['basePoint']['x'],-a2['basePoint']['y']);const a9=Math['max'](Math['abs'](L['scaleX']),Math['abs'](L['scaleY'])),ab=W/(a9||0x1);let ac=null;const ad=a2['entities'];for(let af=0x0;af<ad['length'];af++){const ag=ad[af];if(ag['type']!=='INSERT'){const ai=ea(L[cn(0x98)],af),aj=ai!==void 0x0?ai:_(ag);if(aj){const ak=Math['max'](aj['maxX']-aj['minX'],aj['maxY']-aj['minY']);if(ak>0x0&&ak/ab<ha)continue;}}const ah=ue(ag,N['layers'],R);ag['type']!=='INSERT'&&Xe(ag[cn(0x138)])?(ah!==ac&&(ac!==null&&(I['stroke'](),a0&&a0[cn(0x159)]++),ac=ah,I['beginPath'](),I['strokeStyle']=ah,I[cn(0x17a)]=ab),Ye(I,ag,ab),a0&&(a0['byType'][ag['type']]=((a1=a0['byType'][ag['type']])!=null?a1:0x0)+0x1)):(ac!==null&&(I['stroke'](),a0&&a0['drawCalls']++,ac=null),I['strokeStyle']=ah,I['fillStyle']=ah,I[cn(0x17a)]=ab,ag[cn(0x138)]===cn(0x118)?ze(I,ag,N,O,R,ab,Y+0x1,a0):re(I,ag,N,O,R,ab,a0));}ac!==null&&(I['stroke'](),a0&&a0[cn(0x159)]++),I['restore']();}}function ua(c,d,f,g,k,m,u){const co=aT;if(d['blockName']){const v=f['blocks'][co(0xe0)](d['blockName']);if(v){for(const x of v['entities']){const y=ue(x,f['layers'],k);c['strokeStyle']=y,c['fillStyle']=y,c['lineWidth']=m,re(c,x,f,g,k,m,u);}return;}}d['defPoint2']&&d['defPoint3']&&(c[co(0xfe)](),c['moveTo'](d[co(0xfb)]['x'],d['defPoint2']['y']),c['lineTo'](d['defPoint']['x'],d['defPoint']['y']),c[co(0x1a4)](),c['beginPath'](),c['moveTo'](d[co(0x18c)]['x'],d['defPoint3']['y']),c['lineTo'](d['defPoint']['x'],d[co(0x85)]['y']),c['stroke']());}function da(c,d){const cp=aT;var f,g;if(d['boundaryPaths']['length']!==0x0){c[cp(0xfe)]();for(const k of d['boundaryPaths'])if(k['type']===cp(0x12b)&&k['vertices']&&k[cp(0xd6)]['length']>0x0){const m=k['vertices'][0x0];c['moveTo'](m['x'],m['y']);for(let u=0x1;u<k[cp(0xd6)][cp(0x79)];u++){const v=k[cp(0xd6)][u-0x1],x=k['vertices'][u],y=(g=(f=k['bulges'])==null?void 0x0:f[u-0x1])!=null?g:0x0;Math['abs'](y)<1e-10?c['lineTo'](x['x'],x['y']):Q(c,v['x'],v['y'],x['x'],x['y'],y);}k['isClosed']&&c['closePath']();}else{if(k['type']==='edges'&&k[cp(0xac)])for(let A=0x0;A<k['edges']['length'];A++){const C=k['edges'][A];if(C['type']==='line')A===0x0&&c['moveTo'](C['start']['x'],C['start']['y']),c[cp(0x128)](C['end']['x'],C['end']['y']);else{if(C[cp(0x138)]==='arc'){if(A===0x0){const D=C['center']['x']+C[cp(0xbd)]*Math['cos'](C[cp(0x15f)]*Math['PI']/0xb4),F=C[cp(0x176)]['y']+C['radius']*Math['sin'](C['startAngle']*Math['PI']/0xb4);c['moveTo'](D,F);}c['arc'](C['center']['x'],C['center']['y'],C['radius'],C['startAngle']*Math['PI']/0xb4,C['endAngle']*Math['PI']/0xb4,!C['ccw']);}}}}d[cp(0x161)]&&(c['globalAlpha']=0.3,c[cp(0x110)]('evenodd'),c[cp(0x169)]=0x1),c['stroke']();}}function fa(c,d,f){const g=f*0x3;c['beginPath'](),c['arc'](d['position']['x'],d['position']['y'],g,0x0,Math['PI']*0x2),c['fill']();}function re(c,d,f,g,h,k,l){const cq=aT;var m;switch(l&&(l['drawCalls']++,l['byType'][d['type']]=((m=l[cq(0xda)][d[cq(0x138)]])!=null?m:0x0)+0x1),d['type']){case'LINE':Bt(c,d);break;case'CIRCLE':Xt(c,d);break;case'ARC':Yt(c,d);break;case'LWPOLYLINE':Rt(c,d);break;case'POLYLINE':Ot(c,d);break;case cq(0xcf):_t(c,d);break;case cq(0xeb):jt(c,d,k);break;case'TEXT':Ht(c,d,k);break;case'MTEXT':Ut(c,d,k);break;case'INSERT':ze(c,d,f,g,h,k,0x0,l);break;case cq(0x19a):ua(c,d,f,g,h,k,l);break;case'HATCH':da(c,d);break;case'POINT':fa(c,d,k);break;}}var pa=0.5,ma=class{constructor(c){const cr=aT;p(this,'ctx'),p(this,'width',0x0),p(this,'height',0x0),this['canvas']=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new Error(cr(0x156));this['ctx']=d,this['updateSize']();}['getContext'](){return this['ctx'];}['getWidth'](){return this['width'];}['getHeight'](){return this['height'];}['updateSize'](){const cs=aT,c=window['devicePixelRatio']||0x1,d=this['canvas']['getBoundingClientRect']();this['width']=d[cs(0x9a)],this['height']=d['height'],this['canvas'][cs(0x9a)]=d['width']*c,this['canvas']['height']=d['height']*c;}[aT(0xdc)](k,x,y,A,C,D,I){const cu=aT;var L;const N=this['ctx'],O=window['devicePixelRatio']||0x1,R={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};N['setTransform'](O,0x0,0x0,O,0x0,0x0),N['fillStyle']=X[y]['backgroundColor'],N['fillRect'](0x0,0x0,this['width'],this['height']),Pe(N,x);const S=0x1/x['scale'];N['lineCap']='round',N['lineJoin']='round';let W=null;for(let Y=0x0;Y<k['entities']['length'];Y++){const a0=k['entities'][Y];if(!a0['visible']){R['entitiesSkipped']++;continue;}if(!A['has'](a0['layer'])){R['entitiesSkipped']++;continue;}if(D&&!D[cu(0x137)](Y)){R[cu(0xbe)]++;continue;}if(I){const a2=I[Y];if(a2){const a3=(a2['maxX']-a2[cu(0x185)])*x['scale'],a4=(a2['maxY']-a2['minY'])*x[cu(0xb0)];if(Math['max'](a3,a4)<pa){R['entitiesSkipped']++;continue;}}}const a1=ue(a0,k[cu(0x157)],y);Xe(a0['type'])?(a1!==W&&(W!==null&&(N['stroke'](),R['drawCalls']++),W=a1,N[cu(0xfe)](),N['strokeStyle']=a1,N['lineWidth']=S),Ye(N,a0,S),R['entitiesDrawn']++,R['byType'][a0[cu(0x138)]]=((L=R['byType'][a0['type']])!=null?L:0x0)+0x1):(W!==null&&(N['stroke'](),R['drawCalls']++,W=null),N['strokeStyle']=a1,N[cu(0x177)]=a1,N['lineWidth']=S,R[cu(0xe4)]++,re(N,a0,k,x,y,S,R));}if(W!==null&&(N['stroke'](),R['drawCalls']++),C>=0x0&&C<k['entities']['length']){const a5=k[cu(0x74)][C];Pe(N,x),N['strokeStyle']=X[y]['selectionColor'],N['fillStyle']=X[y]['selectionColor'],N['lineWidth']=S*0x3,re(N,a5,k,x,y,S);}return R;}['renderEmpty'](c){const cv=aT,d=this['ctx'],f=window[cv(0xf7)]||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=X[c]['backgroundColor'],d['fillRect'](0x0,0x0,this['width'],this['height']);}['destroy'](){}},ba={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':aT(0x173)};function ce(c){return P(P({},ba),c);}function ga(c){return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+'\x20KB':(c/(0x400*0x400))['toFixed'](0x1)+'\x20MB';}function va(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var Fa='11px\x20monospace',Te=0xf,Me=0x8,te=0x8,z=0xa;function xa(k,x,y,A,C,D){const cw=aT;k['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const F=[];if(A['showFps']&&F['push']([cw(0x1c4)+x['fps']+cw(0x119)+x['frameTime']['toFixed'](0x1)+'ms']),A['showRenderStats']){const a0=x['renderStats']['entitiesDrawn']+x['renderStats']['entitiesSkipped'],a1=['Drawn:\x20'+x['renderStats']['entitiesDrawn']+'\x20/\x20'+a0+'\x20\x20Calls:\x20'+x['renderStats']['drawCalls']],a2=Object[cw(0x149)](x['renderStats']['byType'])['sort'](([,a3],[,a4])=>a4-a3)['slice'](0x0,0x6)['map'](([a3,a4])=>a3+':\x20'+a4)['join']('\x20\x20');a2&&a1['push'](a2),F['push'](a1);}if(A['showDocumentInfo']){const a3=['Layers:\x20'+x['visibleLayerCount']+'\x20/\x20'+x[cw(0x13f)]+'\x20\x20Blocks:\x20'+x[cw(0x12c)]];x['dxfVersion']&&a3['push']('DXF:\x20'+x['dxfVersion']),x['fileName']&&a3[cw(0xf6)](cw(0x17c)+x['fileName']),x['fileSize']>0x0&&a3['push']('Size:\x20'+ga(x['fileSize'])),F['push'](a3);}if(A['showTimings']){const a4=[];x['parseTime']>0x0&&a4['push']('Parse:\x20'+x['parseTime']['toFixed'](0x0)+'ms'),x[cw(0x14f)]>0x0&&a4['push']('Index:\x20'+x['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),x[cw(0x1c2)]>0x0&&a4['push']('Load:\x20'+x['totalLoadTime'][cw(0xa6)](0x0)+'ms'),a4['length']>0x0&&F['push']([a4['join']('\x20\x20')]);}if(A['showCamera']){const a5=x['viewportBounds'];F['push'](['Zoom:\x20'+va(x['zoom'])+'\x20\x20Pixel:\x20'+x['pixelSize']['toFixed'](0x2),'View:\x20['+a5['minX']['toFixed'](0x0)+',\x20'+a5[cw(0x14a)]['toFixed'](0x0)+']\x20→\x20['+a5['maxX']['toFixed'](0x0)+',\x20'+a5['maxY'][cw(0xa6)](0x0)+']']);}if(F['length']===0x0)return;k[cw(0x13e)]=Fa;const I=[];for(let a6=0x0;a6<F['length'];a6++){a6>0x0&&I['push']({'text':'','isSeparator':!0x0});for(const a7 of F[a6])I['push']({'text':a7,'isSeparator':!0x1});}let L=0x0;for(const a8 of I)if(!a8[cw(0xc0)]){const a9=k['measureText'](a8['text'])['width'];a9>L&&(L=a9);}const N=L+te*0x2;let O=te*0x2;for(const ab of I)O+=ab['isSeparator']?Me:Te;let R,S;switch(A['position']){case'top-left':R=z,S=z;break;case'top-right':R=C-N-z,S=z;break;case'bottom-left':R=z,S=D-O-z;break;case'bottom-right':R=C-N-z,S=D-O-z;break;}const W=X[y];k['fillStyle']=y==='dark'?'rgba(0,\x200,\x200,\x200.75)':'rgba(255,\x20255,\x20255,\x200.85)',k['fillRect'](R,S,N,O),k['strokeStyle']=y==='dark'?cw(0xaa):'rgba(0,\x200,\x200,\x200.15)',k['lineWidth']=0x1,k['strokeRect'](R+0.5,S+0.5,N-0x1,O-0x1),k['fillStyle']=y==='dark'?W[cw(0x194)]:'rgba(0,\x200,\x200,\x200.85)',k['textAlign']='left',k['textBaseline']='top';let Y=S+te;for(const ac of I)ac['isSeparator']?Y+=Me:(k['fillText'](ac['text'],R+te,Y),Y+=Te);}var ka=class{constructor(){const cx=aT;p(this,'layers',new Map()),p(this,cx(0x1a5),new Map()),p(this,'colorOverrides',new Map()),p(this,'visibleCache',null);}['setLayers'](c){const cy=aT;this['layers']=new Map(c),this['visibility']['clear'](),this[cy(0x14d)]['clear'](),this['visibleCache']=null;for(const [d,f]of this[cy(0x157)])this['visibility']['set'](d,!f['isOff']&&!f[cy(0x167)]);}[aT(0xb3)](){const cz=aT;return Array[cz(0x192)](this['layers']['values']());}['setVisible'](c,d){this['visibility']['set'](c,d),this['visibleCache']=null;}['isVisible'](c){var d;return(d=this['visibility']['get'](c))!=null?d:!0x0;}['setColorOverride'](c,d){this['colorOverrides']['set'](c,d);}['getColorOverride'](c){return this['colorOverrides']['get'](c);}['getVisibleLayerNames'](){const cA=aT;if(this[cA(0x16a)])return this['visibleCache'];const c=new Set();for(const [d,f]of this['visibility'])f&&c['add'](d);return this['visibleCache']=c,c;}['clear'](){const cB=aT;this[cB(0x157)]['clear'](),this[cB(0x1a5)]['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;}},ya=class{constructor(){p(this,'listeners',new Map());}['on'](c,d){this['listeners']['has'](c)||this['listeners']['set'](c,new Set()),this['listeners']['get'](c)['add'](d);}['off'](c,d){var f;(f=this['listeners']['get'](c))==null||f['delete'](d);}['emit'](c,d){const f=this['listeners']['get'](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){this['listeners']['clear']();}},Pa=class{constructor(c,d){const cC=aT;p(this,'isPanning',!0x1),p(this,'lastX',0x0),p(this,'lastY',0x0),p(this,'touches',new Map()),p(this,'onPointerDown'),p(this,cC(0x9d)),p(this,'onPointerUp'),p(this,'onWheel'),p(this,'onTouchStart'),p(this,'onTouchMove'),p(this,cC(0x121)),p(this,'onContextMenu'),(this[cC(0xa5)]=c,this[cC(0x139)]=d,this[cC(0x16d)]=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove'][cC(0x1da)](this),this['onPointerUp']=this['handlePointerUp'][cC(0x1da)](this),this['onWheel']=this['handleWheel'][cC(0x1da)](this),this[cC(0xf4)]=this['handleTouchStart']['bind'](this),this['onTouchMove']=this[cC(0x96)]['bind'](this),this['onTouchEnd']=this[cC(0xe6)]['bind'](this),this[cC(0x13a)]=f=>f['preventDefault'](),c['addEventListener']('pointerdown',this[cC(0x16d)]),c['addEventListener'](cC(0x111),this['onPointerMove']),c[cC(0x1d1)]('pointerup',this[cC(0x76)]),c['addEventListener']('wheel',this['onWheel'],{'passive':!0x1}),c['addEventListener']('touchstart',this['onTouchStart'],{'passive':!0x1}),c['addEventListener']('touchmove',this['onTouchMove'],{'passive':!0x1}),c[cC(0x1d1)]('touchend',this['onTouchEnd']),c['addEventListener']('contextmenu',this['onContextMenu']));}[aT(0xc1)](){const cD=aT;this['canvas']['removeEventListener']('pointerdown',this['onPointerDown']),this['canvas'][cD(0x196)]('pointermove',this[cD(0x9d)]),this['canvas'][cD(0x196)](cD(0x148),this['onPointerUp']),this['canvas'][cD(0x196)]('wheel',this['onWheel']),this['canvas']['removeEventListener']('touchstart',this['onTouchStart']),this['canvas']['removeEventListener']('touchmove',this['onTouchMove']),this['canvas']['removeEventListener'](cD(0x1d0),this['onTouchEnd']),this['canvas']['removeEventListener']('contextmenu',this['onContextMenu']);}['handlePointerDown'](c){const cE=aT,d=this[cE(0x139)]['getTool'](),f=this[cE(0xa5)]['getBoundingClientRect'](),g=c['clientX']-f['left'],h=c['clientY']-f[cE(0xf8)];c['button']===0x0&&d==='pan'?this[cE(0xa8)](c,g,h):c['button']===0x1?this['startPan'](c,g,h):c['button']===0x0&&(d===cE(0x114)||d==='measure')&&this['viewer'][cE(0x8c)](g,h);}['startPan'](c,d,f){const cF=aT;this['isPanning']=!0x0,this['lastX']=d,this[cF(0x9e)]=f,this[cF(0xa5)]['setPointerCapture'](c['pointerId']),this['canvas']['style'][cF(0x11c)]='grabbing';}[aT(0xff)](c){const cG=aT,d=this['canvas'][cG(0x17d)](),f=c['clientX']-d[cG(0x7f)],g=c['clientY']-d['top'];if(this['isPanning']){const h=f-this['lastX'],i=g-this['lastY'];this['lastX']=f,this[cG(0x9e)]=g,this[cG(0x139)]['handlePan'](h,i);}else this['viewer']['handleMouseMove'](f,g);}['handlePointerUp'](c){const cH=aT;this['isPanning']&&(this['isPanning']=!0x1,this['canvas'][cH(0x7c)](c[cH(0x6f)]),this['canvas']['style']['cursor']=this['viewer']['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cI=aT;c['preventDefault']();const d=this['canvas'][cI(0x17d)](),f=c['clientX']-d['left'],g=c['clientY']-d['top'],h=-Math['sign'](c['deltaY']),i=this['viewer']['getZoomSpeed'](),k=h>0x0?i:0x1/ i;this['viewer']['handleZoom'](f,g,k);}['handleTouchStart'](c){const cJ=aT;c[cJ(0x1af)]();for(const d of Array['from'](c['changedTouches']))this['touches']['set'](d['identifier'],{'x':d['clientX'],'y':d[cJ(0x16f)]});}[aT(0x96)](d){const cK=aT;if(d[cK(0x1af)](),this['touches']['size']===0x2&&d['touches']['length']===0x2){const f=d['touches'][0x0],g=d[cK(0x8e)][0x1],k=Array['from'](this[cK(0x8e)]['values']()),m=Math[cK(0x1c7)](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),v=Math['hypot'](f[cK(0xd8)]-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const x=v/m,y=this[cK(0xa5)]['getBoundingClientRect'](),A=(k[0x0]['x']+k[0x1]['x'])/0x2-y['left'],C=(k[0x0]['y']+k[0x1]['y'])/0x2-y['top'],D=(f['clientX']+g['clientX'])/0x2-y['left'],F=(f['clientY']+g['clientY'])/0x2-y[cK(0xf8)];this['viewer']['handleZoom'](A,C,x),this['viewer']['handlePan'](D-A,F-C);}}else{if(this['touches']['size']===0x1&&d['touches']['length']===0x1){const I=d['touches'][0x0],L=this[cK(0x8e)][cK(0xe0)](I['identifier']);L&&this['viewer']['handlePan'](I[cK(0xd8)]-L['x'],I['clientY']-L['y']);}}for(const N of Array['from'](d['changedTouches']))this['touches']['set'](N['identifier'],{'x':N[cK(0xd8)],'y':N['clientY']});}['handleTouchEnd'](c){for(const d of Array['from'](c['changedTouches']))this['touches']['delete'](d['identifier']);}},wa=0x5,Ia=class{constructor(){p(this,'tree',new qe()),p(this,'items',[]),p(this,'entityBBoxes',[]);}['build'](c,d){const cL=aT;this[cL(0x120)]=[],this['entityBBoxes']=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c[cL(0x79)];g++){const h=c[g],i=d&&f?Be(h,d,f):_(h);this['entityBBoxes'][g]=i,i&&this['items']['push'](w(P({},i),{'entityIndex':g}));}this[cL(0xf0)]['clear'](),this['tree']['load'](this['items']);}['search'](c,d,f,g){return this['tree']['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){var d;return(d=this['entityBBoxes'][c])!=null?d:null;}['getEntityBBoxes'](){const cM=aT;return this[cM(0x19b)];}[aT(0x109)](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function Ta(f,g,k,v,x,y){const A=wa/y,C=v['search'](f-A,g-A,f+A,g+A);let D=A,F=-0x1;for(let I=C['length']-0x1;I>=0x0;I--){const L=C[I],N=k[L['entityIndex']];if(!N||!x['has'](N['layer'])||!N['visible'])continue;const O=Ma(f,g,N);O<D&&(D=O,F=L['entityIndex']);}return F;}function Ma(c,d,f){const cN=aT;switch(f['type']){case'LINE':return he(c,d,f['start']['x'],f['start']['y'],f['end']['x'],f['end']['y']);case'CIRCLE':return Ea(c,d,f['center']['x'],f['center']['y'],f['radius']);case'ARC':return Aa(c,d,f['center']['x'],f[cN(0x176)]['y'],f['radius'],f[cN(0x15f)]*Math['PI']/0xb4,f['endAngle']*Math['PI']/0xb4);case cN(0x1c6):case'POLYLINE':{let g=0x1/0x0;const k=f['vertices'],m=f['closed']?k['length']:k['length']-0x1;for(let u=0x0;u<m;u++){const v=k[u],x=k[(u+0x1)%k['length']],y=he(c,d,v['x'],v['y'],x['x'],x['y']);g=Math[cN(0x191)](g,y);}return g;}case'ELLIPSE':return Ca(c,d,f['center']['x'],f[cN(0x176)]['y'],f['majorAxis'],f['minorRatio']);case'TEXT':case'MTEXT':{const A=_(f);return A?Sa(c,d,A['minX'],A[cN(0x14a)],A['maxX'],A['maxY']):0x1/0x0;}case'POINT':return Math['hypot'](c-f['position']['x'],d-f['position']['y']);case'SPLINE':{let C=0x1/0x0;const D=f['controlPoints'];for(let F=0x0;F<D['length']-0x1;F++){const I=he(c,d,D[F]['x'],D[F]['y'],D[F+0x1]['x'],D[F+0x1]['y']);C=Math[cN(0x191)](C,I);}return C;}default:return 0x1/0x0;}}function he(d,f,g,k,m,v){const x=m-g,y=v-k,A=x*x+y*y;if(A===0x0)return Math['hypot'](d-g,f-k);let C=((d-g)*x+(f-k)*y)/A;C=Math['max'](0x0,Math['min'](0x1,C));const D=g+C*x,F=k+C*y;return Math['hypot'](d-D,f-F);}function Ea(c,d,f,g,h){return Math['abs'](Math['hypot'](c-f,d-g)-h);}function Aa(f,g,i,k,u,v,x){const cO=aT,y=(Math['atan2'](g-k,f-i)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),A=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),C=(x%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(A<=C?y>=A&&y<=C:y>=A||y<=C)return Math['abs'](Math[cO(0x1c7)](f-i,g-k)-u);const D=Math['hypot'](f-(i+u*Math['cos'](v)),g-(k+u*Math['sin'](v))),F=Math['hypot'](f-(i+u*Math['cos'](x)),g-(k+u*Math['sin'](x)));return Math['min'](D,F);}function Sa(c,d,f,g,h,k){if(c>=f&&c<=h&&d>=g&&d<=k)return 0x0;const l=Math['max'](f-c,0x0,c-h),m=Math['max'](g-d,0x0,d-k);return Math['hypot'](l,m);}function Ca(g,k,x,y,A,C){const cP=aT,D=Math['atan2'](A['y'],A['x']),F=Math['cos'](-D),I=Math['sin'](-D),L=(g-x)*F-(k-y)*I,N=(g-x)*I+(k-y)*F,O=Math['sqrt'](T(A['x'],0x2)+T(A['y'],0x2)),R=O*C;if(O<1e-10)return Math['hypot'](g-x,k-y);const S=N*(O/R),W=Math['hypot'](L,S);if(W<1e-10)return O;const Y=L/W*O,a0=N/W*R;return Math[cP(0x1c7)](L-Y,N-a0);}var Da=class{constructor(){const cQ=aT;p(this,'state',{'phase':cQ(0xc6)}),p(this,'currentSnap',null);}['activate'](){this['state']={'phase':'first-point'},this['currentSnap']=null;}['deactivate'](){const cR=aT;this['state']={'phase':cR(0xc6)},this['currentSnap']=null;}['handleClick'](c,d,f){const cS=aT,g=f?f['point']:{'x':c,'y':d};switch(this['state']['phase']){case cS(0x1d4):return this['state']={'phase':cS(0xe9),'firstPoint':g,'firstSnap':f!=null?f:void 0x0},null;case'second-point':{const k=this['state'][cS(0x115)],m=g,u=m['x']-k['x'],v=m['y']-k['y'],x=Math['sqrt'](u*u+v*v),y=Math['atan2'](v,u)*0xb4/Math['PI'];return this['state']={'phase':'done','firstPoint':k,'secondPoint':m,'distance':x,'angle':y},{'distance':x,'angle':y,'deltaX':u,'deltaY':v,'points':[k,m]};}case cS(0x136):return this['state']={'phase':'second-point','firstPoint':g},null;default:return null;}}[aT(0x1cb)](c){this['currentSnap']=c;}};function Ee(f,g,k,v,x,y=new Set(['endpoint','midpoint','center'])){const cT=aT,A=0xa/x,C=[],D=v[cT(0xe7)](f-A,g-A,f+A,g+A);for(const F of D){const I=k[F['entityIndex']];if(!I)continue;const L=F['entityIndex'];switch(I['type']){case'LINE':{if(y['has']('endpoint')&&(M(C,I['start']['x'],I['start']['y'],'endpoint',L,f,g,A),M(C,I['end']['x'],I['end']['y'],'endpoint',L,f,g,A)),y['has']('midpoint')){const N=(I['start']['x']+I['end']['x'])/0x2,O=(I['start']['y']+I['end']['y'])/0x2;M(C,N,O,cT(0x10d),L,f,g,A);}break;}case'CIRCLE':{if(y[cT(0x137)]('center')&&M(C,I[cT(0x176)]['x'],I['center']['y'],cT(0x176),L,f,g,A),y['has']('endpoint'))for(const R of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const S=I['center']['x']+I['radius']*Math['cos'](R),W=I['center']['y']+I['radius']*Math['sin'](R);M(C,S,W,'endpoint',L,f,g,A);}break;}case'ARC':{if(y[cT(0x137)](cT(0x176))&&M(C,I[cT(0x176)]['x'],I['center']['y'],'center',L,f,g,A),y['has'](cT(0x11e))){const Y=I['startAngle']*Math['PI']/0xb4,a0=I['endAngle']*Math['PI']/0xb4;M(C,I['center']['x']+I['radius']*Math['cos'](Y),I['center']['y']+I['radius']*Math[cT(0x188)](Y),cT(0x11e),L,f,g,A),M(C,I['center']['x']+I['radius']*Math['cos'](a0),I['center']['y']+I['radius']*Math['sin'](a0),'endpoint',L,f,g,A);}break;}case'LWPOLYLINE':case cT(0x17f):{if(y['has']('endpoint')){for(const a1 of I['vertices'])M(C,a1['x'],a1['y'],'endpoint',L,f,g,A);}if(y['has'](cT(0x10d)))for(let a2=0x0;a2<I['vertices']['length']-0x1;a2++){const a3=I['vertices'][a2],a4=I['vertices'][a2+0x1];M(C,(a3['x']+a4['x'])/0x2,(a3['y']+a4['y'])/0x2,'midpoint',L,f,g,A);}break;}case'ELLIPSE':{y[cT(0x137)]('center')&&M(C,I[cT(0x176)]['x'],I[cT(0x176)]['y'],cT(0x176),L,f,g,A);break;}case'TEXT':{y[cT(0x137)]('endpoint')&&M(C,I[cT(0x15d)]['x'],I['insertionPoint']['y'],'endpoint',L,f,g,A);break;}case cT(0x97):{y['has']('endpoint')&&M(C,I[cT(0x15d)]['x'],I['insertionPoint']['y'],'endpoint',L,f,g,A);break;}}}return C['sort']((a5,a6)=>Math['hypot'](a5['point']['x']-f,a5['point']['y']-g)-Math['hypot'](a6['point']['x']-f,a6[cT(0x166)]['y']-g)),C;}function M(c,d,f,g,h,k,l,m){const cU=aT;Math['hypot'](d-k,f-l)<=m&&c[cU(0xf6)]({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function La(g,k,x,y,A,C){const cV=aT,D=X[C];g[cV(0xb6)](0x1,0x0,0x0,0x1,0x0,0x0);const F=x['state'];if(x[cV(0x15e)]){const [I,L]=U(k,x['currentSnap']['point']['x'],x['currentSnap']['point']['y']);Na(g,I,L,x['currentSnap'][cV(0x138)],D[cV(0x1c5)]);}if(F['phase']===cV(0xe9)){const [N,O]=U(k,F['firstPoint']['x'],F['firstPoint']['y']);let R,S;if(x['currentSnap']){const [a1,a2]=U(k,x[cV(0x15e)]['point']['x'],x['currentSnap']['point']['y']);R=a1,S=a2;}else R=y,S=A;g['strokeStyle']=D[cV(0x1c5)],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g['moveTo'](N,O),g['lineTo'](R,S),g['stroke'](),g[cV(0xce)]([]),ae(g,N,O,D['measureColor']),ae(g,R,S,D['measureColor']);let W,Y;x['currentSnap']?(W=x[cV(0x15e)]['point']['x'],Y=x['currentSnap']['point']['y']):[W,Y]=K(k,y,A);const a0=Math['hypot'](W-F['firstPoint']['x'],Y-F['firstPoint']['y']);Ae(g,(N+R)/0x2,(O+S)/0x2,a0,C);}if(F['phase']==='done'){const [a3,a4]=U(k,F['firstPoint']['x'],F['firstPoint']['y']),[a5,a6]=U(k,F['secondPoint']['x'],F['secondPoint']['y']);g[cV(0x14b)]=D[cV(0x1c5)],g['lineWidth']=0x2,g['beginPath'](),g['moveTo'](a3,a4),g['lineTo'](a5,a6),g['stroke'](),ae(g,a3,a4,D[cV(0x1c5)]),ae(g,a5,a6,D['measureColor']),Ae(g,(a3+a5)/0x2,(a4+a6)/0x2,F['distance'],C);}}function Na(c,d,f,g,h){const cW=aT;c['strokeStyle']=h,c['lineWidth']=0x2;const i=0x8;switch(g){case'endpoint':c['strokeRect'](d-i/0x2,f-i/0x2,i,i);break;case cW(0x10d):c['beginPath'](),c[cW(0x84)](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c[cW(0x128)](d-i/0x2,f+i/0x2),c[cW(0x1a8)](),c['stroke']();break;case'center':c['beginPath'](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c[cW(0xfe)](),c['moveTo'](d-i/0x2,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['moveTo'](d+i/0x2,f-i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['stroke']();break;}}function ae(c,d,f,g){c['fillStyle']=g,c['beginPath'](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c['fill']();}function Ae(d,f,g,k,m){const cX=aT,v=k['toFixed'](0x4);d['font']='13px\x20monospace',d['textAlign']='center',d['textBaseline']='bottom';const x=d['measureText'](v),y=0x4,A=f-x['width']/0x2-y,C=g-0x14,D=x['width']+y*0x2,F=0x12;d['fillStyle']=m==='dark'?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d['fillRect'](A,C,D,F),d[cX(0x177)]=X[m]['measureColor'],d['fillText'](v,f,g-0x6);}var Ba=class{constructor(){p(this,'worker',null),p(this,'blobUrl',null),p(this,'nextId',0x1),p(this,'pending',new Map());}[aT(0x19f)](){const cY=aT;return this[cY(0x1a6)]?this['worker']:(this['blobUrl']=URL['createObjectURL'](new Blob(['\x22use\x20strict\x22;(()=>{function\x20h(a){let\x20e=a.replace(/\x5cr\x5cn?/g,`\x0a`),t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&e.charCodeAt(n)===10;)n++;if(n>=r)break;let\x20o=e.indexOf(`\x0a`,n);o===-1&&(o=r);let\x20c=e.substring(n,o).trim();n=o+1;let\x20s=parseInt(c,10);if(isNaN(s)){n<r&&(o=e.indexOf(`\x0a`,n),o===-1&&(o=r),n=o+1);continue}if(n>=r)break;o=e.indexOf(`\x0a`,n),o===-1&&(o=r);let\x20p=e.substring(n,o).replace(/\x5cs+$/,\x22\x22);n=o+1,t.push({code:s,value:p})}return\x20t}function\x20m(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===9){let\x20n=r.value;switch(e++,n){case\x22$ACADVER\x22:e<a.length&&(t.acadVersion=a[e].value,e++);break;case\x22$EXTMIN\x22:if(e<a.length){let\x20o=v(a,e);t.extMin=o.point,e=o.nextIndex}break;case\x22$EXTMAX\x22:if(e<a.length){let\x20o=v(a,e);t.extMax=o.point,e=o.nextIndex}break;case\x22$INSUNITS\x22:e<a.length&&(t.insUnits=parseInt(a[e].value,10),e++);break;case\x22$MEASUREMENT\x22:e<a.length&&(t.measurement=parseInt(a[e].value,10),e++);break;case\x22$LTSCALE\x22:e<a.length&&(t.ltScale=parseFloat(a[e].value),e++);break;case\x22$DWGCODEPAGE\x22:e<a.length&&(t.dwgCodePage=a[e].value,e++);break;case\x22$HANDSEED\x22:e<a.length&&(t.handleSeed=a[e].value,e++);break;default:for(;e<a.length&&a[e].code!==9&&a[e].code!==0;)t[n]=a[e].value,e++}}else\x20e++}return\x20e}function\x20v(a,e){let\x20t={x:0,y:0,z:0};for(;e<a.length;){let\x20r=a[e].code;if(r===10)t.x=parseFloat(a[e].value),e++;else\x20if(r===20)t.y=parseFloat(a[e].value),e++;else\x20if(r===30)t.z=parseFloat(a[e].value),e++;else\x20break}return{point:t,nextIndex:e}}function\x20k(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22TABLE\x22){if(e++,e>=a.length)break;let\x20n=a[e].value;switch(e++,n){case\x22LAYER\x22:e=H(a,e,t.layers);break;case\x22LTYPE\x22:e=O(a,e,t.lineTypes);break;case\x22STYLE\x22:e=_(a,e,t.styles);break;default:e=R(a,e);break}}else\x20e++}return\x20e}function\x20R(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDTAB\x22)return\x20e+1;e++}return\x20e}function\x20H(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LAYER\x22){e++;let\x20n={name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x206:n.lineType=o.value;break;case\x2062:n.color=parseInt(o.value,10);break;case\x2070:n.flags=parseInt(o.value,10);break;case\x20370:n.lineWeight=parseInt(o.value,10);break;case\x20420:n.trueColor=parseInt(o.value,10);break}e++}t.set(n.name,n)}else\x20e++}return\x20e}function\x20O(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LTYPE\x22){e++;let\x20n={name:\x22\x22,description:\x22\x22,pattern:[],totalLength:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.description=o.value;break;case\x2040:n.totalLength=parseFloat(o.value);break;case\x2049:n.pattern.push(parseFloat(o.value));break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20_(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22STYLE\x22){e++;let\x20n={name:\x22\x22,fontName:\x22\x22,bigFontName:\x22\x22,height:0,widthFactor:1,obliqueAngle:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.fontName=o.value;break;case\x204:n.bigFontName=o.value;break;case\x2040:n.height=parseFloat(o.value);break;case\x2041:n.widthFactor=parseFloat(o.value);break;case\x2050:n.obliqueAngle=parseFloat(o.value);break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20l(a){let\x20e={type:\x22\x22,layer:\x220\x22,color:256,lineType:\x22BYLAYER\x22,lineTypeScale:1,lineWeight:-1,visible:!0,extrusion:{x:0,y:0,z:1}};for(let\x20t\x20of\x20a)switch(t.code){case\x205:e.handle=t.value;break;case\x208:e.layer=t.value;break;case\x206:e.lineType=t.value;break;case\x2048:e.lineTypeScale=parseFloat(t.value);break;case\x2060:e.visible=t.value===\x220\x22||t.value===\x22\x22;break;case\x2062:e.color=parseInt(t.value,10);break;case\x20370:e.lineWeight=parseInt(t.value,10);break;case\x20420:e.trueColor=parseInt(t.value,10);break;case\x20210:e.extrusion.x=parseFloat(t.value);break;case\x20220:e.extrusion.y=parseFloat(t.value);break;case\x20230:e.extrusion.z=parseFloat(t.value);break}return\x20e}function\x20D(a){let\x20t={...l(a),type:\x22LINE\x22,start:{x:0,y:0,z:0},end:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.start.x=parseFloat(r.value);break;case\x2020:t.start.y=parseFloat(r.value);break;case\x2030:t.start.z=parseFloat(r.value);break;case\x2011:t.end.x=parseFloat(r.value);break;case\x2021:t.end.y=parseFloat(r.value);break;case\x2031:t.end.z=parseFloat(r.value);break}return\x20t}function\x20F(a){let\x20t={...l(a),type:\x22CIRCLE\x22,center:{x:0,y:0,z:0},radius:0};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break}return\x20t}function\x20E(a){let\x20t={...l(a),type:\x22ARC\x22,center:{x:0,y:0,z:0},radius:0,startAngle:0,endAngle:360};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break;case\x2050:t.startAngle=parseFloat(r.value);break;case\x2051:t.endAngle=parseFloat(r.value);break}return\x20t}function\x20P(a){let\x20t={...l(a),type:\x22LWPOLYLINE\x22,vertices:[],closed:!1,constantWidth:0,elevation:0},r=null;for(let\x20n\x20of\x20a)switch(n.code){case\x2070:t.closed=(parseInt(n.value,10)&1)!==0;break;case\x2038:t.elevation=parseFloat(n.value);break;case\x2043:t.constantWidth=parseFloat(n.value);break;case\x2010:r&&t.vertices.push(r),r={x:parseFloat(n.value),y:0,bulge:0,startWidth:0,endWidth:0};break;case\x2020:r&&(r.y=parseFloat(n.value));break;case\x2040:r&&(r.startWidth=parseFloat(n.value));break;case\x2041:r&&(r.endWidth=parseFloat(n.value));break;case\x2042:r&&(r.bulge=parseFloat(n.value));break}return\x20r&&t.vertices.push(r),t}function\x20T(a){let\x20t={...l(a),type:\x22POLYLINE\x22,vertices:[],closed:!1,is3d:!1};for(let\x20r\x20of\x20a)if(r.code===70){let\x20n=parseInt(r.value,10);t.closed=(n&1)!==0,t.is3d=(n&8)!==0}return\x20t}function\x20w(a){let\x20t={...l(a),type:\x22ELLIPSE\x22,center:{x:0,y:0,z:0},majorAxis:{x:1,y:0,z:0},minorRatio:1,startParam:0,endParam:Math.PI*2};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2011:t.majorAxis.x=parseFloat(r.value);break;case\x2021:t.majorAxis.y=parseFloat(r.value);break;case\x2031:t.majorAxis.z=parseFloat(r.value);break;case\x2040:t.minorRatio=parseFloat(r.value);break;case\x2041:t.startParam=parseFloat(r.value);break;case\x2042:t.endParam=parseFloat(r.value);break}return\x20t}function\x20g(a){let\x20t={...l(a),type:\x22SPLINE\x22,degree:3,flags:0,knots:[],controlPoints:[],fitPoints:[],weights:[]},r=null,n=null;for(let\x20o\x20of\x20a)switch(o.code){case\x2070:t.flags=parseInt(o.value,10);break;case\x2071:t.degree=parseInt(o.value,10);break;case\x2040:t.knots.push(parseFloat(o.value));break;case\x2041:t.weights.push(parseFloat(o.value));break;case\x2010:r&&t.controlPoints.push(r),r={x:parseFloat(o.value),y:0,z:0};break;case\x2020:r&&(r.y=parseFloat(o.value));break;case\x2030:r&&(r.z=parseFloat(o.value));break;case\x2011:n&&t.fitPoints.push(n),n={x:parseFloat(o.value),y:0,z:0};break;case\x2021:n&&(n.y=parseFloat(o.value));break;case\x2031:n&&(n.z=parseFloat(o.value));break;case\x2012:t.startTangent||(t.startTangent={x:0,y:0,z:0}),t.startTangent.x=parseFloat(o.value);break;case\x2022:t.startTangent&&(t.startTangent.y=parseFloat(o.value));break;case\x2032:t.startTangent&&(t.startTangent.z=parseFloat(o.value));break;case\x2013:t.endTangent||(t.endTangent={x:0,y:0,z:0}),t.endTangent.x=parseFloat(o.value);break;case\x2023:t.endTangent&&(t.endTangent.y=parseFloat(o.value));break;case\x2033:t.endTangent&&(t.endTangent.z=parseFloat(o.value));break}return\x20r&&t.controlPoints.push(r),n&&t.fitPoints.push(n),t}function\x20I(a){let\x20t={...l(a),type:\x22TEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,widthFactor:1,obliqueAngle:0,style:\x22STANDARD\x22,hAlign:0,vAlign:0,generationFlags:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.text=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2011:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.x=parseFloat(r.value);break;case\x2021:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.y=parseFloat(r.value);break;case\x2031:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.z=parseFloat(r.value);break;case\x2040:t.height=parseFloat(r.value);break;case\x2041:t.widthFactor=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2051:t.obliqueAngle=parseFloat(r.value);break;case\x207:t.style=r.value;break;case\x2071:t.generationFlags=parseInt(r.value,10);break;case\x2072:t.hAlign=parseInt(r.value,10);break;case\x2073:t.vAlign=parseInt(r.value,10);break}return\x20t}function\x20A(a){let\x20t={...l(a),type:\x22MTEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,width:0,attachmentPoint:1,drawingDirection:1,rotation:0,lineSpacingStyle:1,lineSpacingFactor:1,style:\x22STANDARD\x22,bgFill:0,bgFillScale:1.5},r=[];for(let\x20n\x20of\x20a)switch(n.code){case\x201:r.push(n.value);break;case\x203:r.push(n.value);break;case\x207:t.style=n.value;break;case\x2010:t.insertionPoint.x=parseFloat(n.value);break;case\x2020:t.insertionPoint.y=parseFloat(n.value);break;case\x2030:t.insertionPoint.z=parseFloat(n.value);break;case\x2011:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.x=parseFloat(n.value);break;case\x2021:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.y=parseFloat(n.value);break;case\x2031:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.z=parseFloat(n.value);break;case\x2040:t.height=parseFloat(n.value);break;case\x2041:t.width=parseFloat(n.value);break;case\x2044:t.lineSpacingFactor=parseFloat(n.value);break;case\x2050:t.rotation=parseFloat(n.value);break;case\x2071:t.attachmentPoint=parseInt(n.value,10);break;case\x2072:t.drawingDirection=parseInt(n.value,10);break;case\x2073:t.lineSpacingStyle=parseInt(n.value,10);break;case\x2090:t.bgFill=parseInt(n.value,10);break}return\x20t.text=r.join(\x22\x22),t}function\x20z(a){let\x20t={...l(a),type:\x22INSERT\x22,blockName:\x22\x22,insertionPoint:{x:0,y:0,z:0},scaleX:1,scaleY:1,scaleZ:1,rotation:0,columnCount:1,rowCount:1,columnSpacing:0,rowSpacing:0,attribs:[]};for(let\x20r\x20of\x20a)switch(r.code){case\x202:t.blockName=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2041:t.scaleX=parseFloat(r.value);break;case\x2042:t.scaleY=parseFloat(r.value);break;case\x2043:t.scaleZ=parseFloat(r.value);break;case\x2044:t.columnSpacing=parseFloat(r.value);break;case\x2045:t.rowSpacing=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2070:t.columnCount=parseInt(r.value,10)||1;break;case\x2071:t.rowCount=parseInt(r.value,10)||1;break}return\x20t}function\x20S(a){let\x20t={...l(a),type:\x22DIMENSION\x22,blockName:\x22\x22,dimStyle:\x22STANDARD\x22,dimType:0,defPoint:{x:0,y:0,z:0},textMidpoint:{x:0,y:0,z:0},textOverride:\x22\x22,rotation:0,textRotation:0,leaderLength:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.textOverride=r.value;break;case\x202:t.blockName=r.value;break;case\x203:t.dimStyle=r.value;break;case\x2010:t.defPoint.x=parseFloat(r.value);break;case\x2020:t.defPoint.y=parseFloat(r.value);break;case\x2030:t.defPoint.z=parseFloat(r.value);break;case\x2011:t.textMidpoint.x=parseFloat(r.value);break;case\x2021:t.textMidpoint.y=parseFloat(r.value);break;case\x2031:t.textMidpoint.z=parseFloat(r.value);break;case\x2013:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.x=parseFloat(r.value);break;case\x2023:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.y=parseFloat(r.value);break;case\x2033:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.z=parseFloat(r.value);break;case\x2014:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.x=parseFloat(r.value);break;case\x2024:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.y=parseFloat(r.value);break;case\x2034:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.z=parseFloat(r.value);break;case\x2015:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.x=parseFloat(r.value);break;case\x2025:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.y=parseFloat(r.value);break;case\x2035:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.z=parseFloat(r.value);break;case\x2016:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.x=parseFloat(r.value);break;case\x2026:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.y=parseFloat(r.value);break;case\x2036:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.z=parseFloat(r.value);break;case\x2040:t.leaderLength=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2053:t.textRotation=parseFloat(r.value);break;case\x2070:t.dimType=parseInt(r.value,10);break}return\x20t}function\x20N(a){let\x20t={...l(a),type:\x22HATCH\x22,patternName:\x22\x22,solidFill:!0,associative:!1,hatchStyle:0,patternType:1,patternAngle:0,patternScale:1,boundaryPaths:[]},r=0;for(;r<a.length;){let\x20n=a[r];switch(n.code){case\x202:t.patternName=n.value;break;case\x2041:t.patternScale=parseFloat(n.value);break;case\x2052:t.patternAngle=parseFloat(n.value);break;case\x2070:t.solidFill=n.value===\x221\x22;break;case\x2071:t.associative=n.value===\x221\x22;break;case\x2075:t.hatchStyle=parseInt(n.value,10);break;case\x2076:t.patternType=parseInt(n.value,10);break;case\x2091:{let\x20o=parseInt(n.value,10);r++;for(let\x20c=0;c<o&&r<a.length;c++){let\x20s=W(a,r);t.boundaryPaths.push(s.path),r=s.nextIndex}continue}}r++}return\x20t}function\x20W(a,e){let\x20t=0;return\x20e<a.length&&a[e].code===92&&(t=parseInt(a[e].value,10),e++),(t&2)!==0?X(a,e,t):Y(a,e,t)}function\x20X(a,e,t){let\x20r={type:\x22polyline\x22,vertices:[],bulges:[],flags:t},n=!1;e<a.length&&a[e].code===72&&(n=a[e].value===\x221\x22,e++),e<a.length&&a[e].code===73&&(r.isClosed=a[e].value===\x221\x22,e++);let\x20o=0;e<a.length&&a[e].code===93&&(o=parseInt(a[e].value,10),e++);for(let\x20c=0;c<o&&e<a.length;c++){let\x20s={x:0,y:0};a[e].code===10&&(s.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.y=parseFloat(a[e].value),e++),r.vertices.push(s),n&&e<a.length&&a[e].code===42?(r.bulges.push(parseFloat(a[e].value)),e++):n&&r.bulges.push(0)}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20c=parseInt(a[e].value,10);e++;for(let\x20s=0;s<c&&e<a.length&&a[e].code===330;s++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20Y(a,e,t){let\x20r={type:\x22edges\x22,edges:[],flags:t},n=0;e<a.length&&a[e].code===93&&(n=parseInt(a[e].value,10),e++);for(let\x20o=0;o<n&&e<a.length&&a[e].code===72;o++){let\x20c=parseInt(a[e].value,10);switch(e++,c){case\x201:{let\x20s={type:\x22line\x22,start:{x:0,y:0},end:{x:0,y:0}};e<a.length&&a[e].code===10&&(s.start.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.start.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.end.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.end.y=parseFloat(a[e].value),e++),r.edges.push(s);break}case\x202:{let\x20s={type:\x22arc\x22,center:{x:0,y:0},radius:0,startAngle:0,endAngle:360,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.radius=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x203:{let\x20s={type:\x22ellipse\x22,center:{x:0,y:0},majorAxis:{x:1,y:0},minorRatio:1,startAngle:0,endAngle:Math.PI*2,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.majorAxis.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.majorAxis.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.minorRatio=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x204:{let\x20s=3,p=[],b=[];e<a.length&&a[e].code===94&&(s=parseInt(a[e].value,10),e++),e<a.length&&a[e].code===73&&e++,e<a.length&&a[e].code===74&&e++;let\x20d=0;e<a.length&&a[e].code===95&&(d=parseInt(a[e].value,10),e++);let\x20x=0;e<a.length&&a[e].code===96&&(x=parseInt(a[e].value,10),e++);for(let\x20f=0;f<d&&e<a.length&&a[e].code===40;f++)p.push(parseFloat(a[e].value)),e++;for(let\x20f=0;f<x&&e<a.length;f++){let\x20y={x:0,y:0};a[e].code===10&&(y.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(y.y=parseFloat(a[e].value),e++),b.push(y)}r.edges.push({type:\x22spline\x22,degree:s,knots:p,controlPoints:b});break}default:break}}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20o=parseInt(a[e].value,10);e++;for(let\x20c=0;c<o&&e<a.length&&a[e].code===330;c++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20L(a){let\x20t={...l(a),type:\x22POINT\x22,position:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.position.x=parseFloat(r.value);break;case\x2020:t.position.y=parseFloat(r.value);break;case\x2030:t.position.z=parseFloat(r.value);break}return\x20t}function\x20u(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code!==0){e++;continue}let\x20n=r.value;if(n===\x22ENDSEC\x22||n===\x22ENDBLK\x22)return\x20e+1;e++;let\x20o=[];for(;e<a.length&&a[e].code!==0;)o.push(a[e]),e++;switch(n){case\x22LINE\x22:t.push(D(o));break;case\x22CIRCLE\x22:t.push(F(o));break;case\x22ARC\x22:t.push(E(o));break;case\x22LWPOLYLINE\x22:t.push(P(o));break;case\x22ELLIPSE\x22:t.push(w(o));break;case\x22SPLINE\x22:t.push(g(o));break;case\x22TEXT\x22:t.push(I(o));break;case\x22MTEXT\x22:t.push(A(o));break;case\x22INSERT\x22:{let\x20c=z(o);o.some(p=>p.code===66&&p.value===\x221\x22)&&(e=$(a,e,c.attribs)),t.push(c);break}case\x22DIMENSION\x22:t.push(S(o));break;case\x22HATCH\x22:t.push(N(o));break;case\x22POINT\x22:t.push(L(o));break;case\x22POLYLINE\x22:{let\x20c=T(o);e=V(a,e,c.vertices),t.push(c);break}default:break}}return\x20e}function\x20V(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22VERTEX\x22){e++;let\x20n={x:0,y:0,bulge:0,startWidth:0,endWidth:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x2010:n.x=parseFloat(o.value);break;case\x2020:n.y=parseFloat(o.value);break;case\x2042:n.bulge=parseFloat(o.value);break;case\x2040:n.startWidth=parseFloat(o.value);break;case\x2041:n.endWidth=parseFloat(o.value);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20$(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22ATTRIB\x22){e++;let\x20n={tag:\x22\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,style:\x22STANDARD\x22,layer:\x220\x22,color:256};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x201:n.text=o.value;break;case\x202:n.tag=o.value;break;case\x207:n.style=o.value;break;case\x208:n.layer=o.value;break;case\x2010:n.insertionPoint.x=parseFloat(o.value);break;case\x2020:n.insertionPoint.y=parseFloat(o.value);break;case\x2030:n.insertionPoint.z=parseFloat(o.value);break;case\x2040:n.height=parseFloat(o.value);break;case\x2050:n.rotation=parseFloat(o.value);break;case\x2062:n.color=parseInt(o.value,10);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20B(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22BLOCK\x22){e++;let\x20n={name:\x22\x22,basePoint:{x:0,y:0,z:0},entities:[],flags:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x208:break;case\x2010:n.basePoint.x=parseFloat(o.value);break;case\x2020:n.basePoint.y=parseFloat(o.value);break;case\x2030:n.basePoint.z=parseFloat(o.value);break;case\x2070:n.flags=parseInt(o.value,10);break}e++}e=u(a,e,n.entities),n.name&&!n.name.startsWith(\x22*Model_Space\x22)&&!n.name.startsWith(\x22*Paper_Space\x22)&&t.set(n.name,n)}else\x20e++}return\x20e}var\x20C=\x22AutoCAD\x20Binary\x20DXF\x22,U={ANSI_874:\x22windows-874\x22,ANSI_932:\x22shift_jis\x22,ANSI_936:\x22gbk\x22,ANSI_949:\x22euc-kr\x22,ANSI_950:\x22big5\x22,ANSI_1250:\x22windows-1250\x22,ANSI_1251:\x22windows-1251\x22,ANSI_1252:\x22windows-1252\x22,ANSI_1253:\x22windows-1253\x22,ANSI_1254:\x22windows-1254\x22,ANSI_1255:\x22windows-1255\x22,ANSI_1256:\x22windows-1256\x22,ANSI_1257:\x22windows-1257\x22,ANSI_1258:\x22windows-1258\x22},G=\x22AC1021\x22;function\x20K(){return{acadVersion:\x22\x22,insUnits:0,measurement:0,ltScale:1}}function\x20j(a){return\x20a.replace(/\x5c\x5cU\x5c+([0-9A-Fa-f]{4})/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}function\x20q(a){if(typeof\x20a==\x22string\x22)return\x20j(a);let\x20e=new\x20Uint8Array(a);if(new\x20TextDecoder(\x22ascii\x22).decode(e.slice(0,C.length))===C)throw\x20new\x20i(\x22Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.\x22);let\x20r=new\x20TextDecoder(\x22utf-8\x22).decode(a),o=r.match(/\x5c$ACADVER[\x5cs\x5cS]*?\x5cn\x5cs*1\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22;if(o&&o<G){let\x20s=r.match(/\x5c$DWGCODEPAGE[\x5cs\x5cS]*?\x5cn\x5cs*3\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22,p=U[s]??\x22windows-1252\x22;p!==\x22utf-8\x22&&(r=new\x20TextDecoder(p).decode(a))}return\x20j(r)}function\x20Q(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDSEC\x22)return\x20e+1;e++}return\x20e}function\x20Z(a){a.layers.has(\x220\x22)||a.layers.set(\x220\x22,{name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1})}function\x20J(a){for(let[,e]of\x20a.layers)e.isOff=e.color<0,e.isOff&&(e.color=Math.abs(e.color)),e.isFrozen=(e.flags&1)!==0,e.isLocked=(e.flags&4)!==0}var\x20i=class\x20extends\x20Error{constructor(t,r){super(t);this.cause=r;this.name=\x22DxfParseError\x22}};function\x20M(a){if(typeof\x20a==\x22string\x22){if(a.length===0)throw\x20new\x20i(\x22Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.\x22)}else\x20if(a\x20instanceof\x20ArrayBuffer){if(a.byteLength===0)throw\x20new\x20i(\x22Input\x20ArrayBuffer\x20is\x20empty.\x22)}else\x20throw\x20new\x20i(\x22Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.\x22);let\x20e;try{e=q(a)}catch(n){throw\x20n\x20instanceof\x20i?n:new\x20i(\x22Failed\x20to\x20decode\x20DXF\x20input.\x22,n)}let\x20t;try{t=h(e)}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20tokenize\x20DXF\x20content.\x22,n)}if(t.length===0)throw\x20new\x20i(\x22DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.\x22);let\x20r={header:K(),layers:new\x20Map,lineTypes:new\x20Map,styles:new\x20Map,blocks:new\x20Map,entities:[]};try{let\x20n=0;for(;n<t.length;){let\x20o=t[n];if(o.code===0&&o.value===\x22SECTION\x22){if(n++,n>=t.length)break;let\x20c=t[n].value;switch(n++,c){case\x22HEADER\x22:n=m(t,n,r.header);break;case\x22TABLES\x22:n=k(t,n,r);break;case\x22BLOCKS\x22:n=B(t,n,r.blocks);break;case\x22ENTITIES\x22:n=u(t,n,r.entities);break;default:n=Q(t,n);break}}else{if(o.code===0&&o.value===\x22EOF\x22)break;n++}}}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20parse\x20DXF\x20sections.\x22,n)}return\x20Z(r),J(r),r}self.onmessage=a=>{let{type:e,id:t,payload:r}=a.data;if(e===\x22parse\x22)try{let\x20n=M(r);postMessage({type:\x22result\x22,id:t,doc:n})}catch(n){let\x20o=n\x20instanceof\x20Error?n.message:String(n);postMessage({type:\x22error\x22,id:t,message:o})}};})();\x0a'],{'type':cY(0xc9)})),this['worker']=new Worker(this['blobUrl']),this['worker'][cY(0x168)]=c=>{const cZ=cY,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending'][cZ(0xe0)](f);i&&(this['pending']['delete'](f),d===cZ(0x1d5)?i['resolve'](this['reviveDocument'](g)):d===cZ(0x155)&&i['reject'](new Error(h!=null?h:'Worker\x20parse\x20failed')));},this['worker'][cY(0x7a)]=c=>{const d0=cY;var d;const f=new Error((d=c[d0(0x181)])!=null?d:'Worker\x20error');for(const [,g]of this['pending'])g['reject'](f);this['pending']['clear'](),this['destroyWorker']();},this[cY(0x1a6)]);}[aT(0x7e)](c){return new Promise((d,f)=>{const d1=b,g=this['nextId']++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this['getWorker']();}catch(k){this[d1(0x1ae)]['delete'](g),f(k instanceof Error?k:new Error(String(k)));return;}const i={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](i,[c]):h['postMessage'](i);}catch(l){this['pending']['delete'](g),f(l instanceof Error?l:new Error(String(l)));}});}['terminate'](){this['destroyWorker']();const c=new Error('Worker\x20terminated');for(const [,d]of this['pending'])d['reject'](c);this['pending']['clear']();}['destroyWorker'](){const d2=aT;this['worker']&&(this[d2(0x1a6)]['terminate'](),this[d2(0x1a6)]=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){const d3=aT;return w(P({},c),{'layers':this['ensureMap'](c['layers']),'lineTypes':this[d3(0x127)](c['lineTypes']),'styles':this['ensureMap'](c[d3(0xa3)]),'blocks':this['ensureMap'](c['blocks'])});}['ensureMap'](c){return c instanceof Map?c:c&&typeof c=='object'?new Map(Object['entries'](c)):new Map();}},Ya=class{constructor(c,d){const d4=aT;p(this,'canvas'),p(this,'renderer'),p(this,d4(0xfa)),p(this,d4(0xd9)),p(this,d4(0xf1)),p(this,'spatialIndex'),p(this,'measureTool'),p(this,'doc',null),p(this,'options'),p(this,'currentTool'),p(this,'inputHandler'),p(this,d4(0xc4)),p(this,'formatConverters'),p(this,'workerManager',null),p(this,'selectedEntityIndex',-0x1),p(this,'renderPending',!0x1),p(this,d4(0x95),!0x1),p(this,'loadGeneration',0x0),p(this,'mouseScreenX',0x0),p(this,'mouseScreenY',0x0),p(this,d4(0x86),!0x1),p(this,'debugOptions'),p(this,'lastRenderStats',null),p(this,'lastDebugStats',null),p(this,'frameTimestamps',[]),p(this,'lastDoRenderTime',0x0),p(this,d4(0x12f),0x0),p(this,'parseTime',0x0),p(this,'spatialIndexBuildTime',0x0),p(this,'loadedFileName',null),p(this,'loadedFileSize',0x0),p(this,'debugRafId',0x0);var f,g,h,k,m,u,v;this[d4(0xa5)]=c,this[d4(0x1b2)]={'theme':(f=d==null?void 0x0:d['theme'])!=null?f:'dark','backgroundColor':d==null?void 0x0:d['backgroundColor'],'antialias':(g=d==null?void 0x0:d['antialias'])!=null?g:!0x0,'minZoom':(h=d==null?void 0x0:d[d4(0xcc)])!=null?h:0.0001,'maxZoom':(k=d==null?void 0x0:d[d4(0x13c)])!=null?k:0x186a0,'zoomSpeed':(m=d==null?void 0x0:d['zoomSpeed'])!=null?m:1.1,'initialTool':(u=d==null?void 0x0:d['initialTool'])!=null?u:'pan'},this['formatConverters']=(v=d==null?void 0x0:d['formatConverters'])!=null?v:[],d!=null&&d['worker']&&(this['workerManager']=new Ba()),d!=null&&d['debug']?(this['debugEnabled']=!0x0,this['debugOptions']=ce(typeof d[d4(0x12a)]==d4(0x81)?void 0x0:d['debug'])):this['debugOptions']=ce(),this[d4(0xec)]=new ma(c),this[d4(0xfa)]=new Nt(this['options']),this['layerManager']=new ka(),this[d4(0xf1)]=new ya(),this[d4(0xd5)]=new Ia(),this[d4(0x88)]=new Da(),this['currentTool']=this['options']['initialTool'],this[d4(0x18d)]=new Pa(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this['resizeObserver']['observe'](c),c['style'][d4(0x11c)]=this['getCursorForTool'](this[d4(0x7d)]),this['requestRender'](),this[d4(0x86)]&&this['startDebugLoop']();}['guardDestroyed'](){if(this['destroyed'])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}['runConverters'](c){return H(this,null,function*(){for(const d of this['formatConverters']){let f=!0x1;try{f=d['detect'](c);}catch(g){continue;}if(f)return d['convert'](c);}return null;});}['loadFile'](c){return H(this,null,function*(){const d5=b;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c['name'],this[d5(0x15b)]=c[d5(0x1b7)];const f=yield c['arrayBuffer']();if(this['destroyed']||d!==this['loadGeneration'])return;const g=yield this['runConverters'](f);if(this['destroyed']||d!==this['loadGeneration'])return;const h=performance['now'](),i=g!=null?g:f;this['doc']=yield this['parseWithOptionalWorker'](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-h,this['onDocumentLoaded']());});}[aT(0x75)](c){return H(this,null,function*(){const d6=b;this['guardDestroyed']();const d=++this['loadGeneration'];this[d6(0x125)]=null,this[d6(0x15b)]=c['byteLength'];const f=yield this[d6(0x1ac)](c);if(this['destroyed']||d!==this['loadGeneration'])return;const g=performance[d6(0xe2)](),h=f!=null?f:c;this['doc']=yield this['parseWithOptionalWorker'](h,d),!(this['destroyed']||d!==this[d6(0xa1)])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());});}['parseWithOptionalWorker'](c,d){return H(this,null,function*(){const d7=b;if(!this[d7(0x113)])return le(c);try{return yield this['workerManager']['parse'](c);}catch(f){if(this['destroyed']||d!==this['loadGeneration'])return null;throw f;}});}['loadDocument'](c){const d8=aT;if(this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=0x0,this[d8(0x11a)]=0x0,!c||!Array['isArray'](c[d8(0x74)])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this['onDocumentLoaded']();}['loadString'](c){const d9=aT;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['length'];const d=performance[d9(0xe2)]();this['doc']=le(c),this['parseTime']=performance[d9(0xe2)]()-d,this['onDocumentLoaded']();}['loadArrayBuffer'](c){this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const d=performance['now']();this['doc']=le(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}[aT(0x152)](){const db=aT;this['guardDestroyed'](),++this['loadGeneration'],this['doc']=null,this[db(0x10e)]=-0x1,this['spatialIndex']['clear'](),Ie(),this['layerManager']['clear'](),this['measureTool'][db(0x141)](),this['requestRender']();}['onDocumentLoaded'](){const dc=aT;if(!this['doc'])return;this['layerManager']['setLayers'](this['doc']['layers']);const c=performance['now']();this[dc(0xd5)]['build'](this['doc']['entities'],this['doc']),Jt(Qt(this['doc'])),this['spatialIndexBuildTime']=performance['now']()-c,this['selectedEntityIndex']=-0x1,this['measureTool']['deactivate'](),this['currentTool']==='measure'&&this['measureTool']['activate'](),this['fitToView']();}[aT(0x165)](){const dd=aT;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas']['getBoundingClientRect']();this[dd(0xfa)]['setTransform'](Dt(d['width'],d['height'],c['minX'],c['minY'],c['maxX'],c['maxY'])),this[dd(0x1b0)](),this[dd(0xf1)][dd(0x8d)]('viewchange',this['camera'][dd(0xb4)]());}[aT(0x1d2)](c){const de=aT;this['guardDestroyed']();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d['height']/0x2,h=c/this['camera']['getTransform']()['scale'];this['camera']['zoom'](f,g,h),this[de(0x1b0)](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['panTo'](c,d){const df=aT;this['guardDestroyed']();const f=this['canvas']['getBoundingClientRect'](),g=this['camera']['getTransform'](),h=c*g[df(0xb0)]+g['offsetX'],k=-d*g['scale']+g['offsetY'],l=f['width']/0x2-h,m=f[df(0x178)]/0x2-k;this['camera']['pan'](l,m),this['requestRender'](),this['emitter'][df(0x8d)]('viewchange',this['camera']['getTransform']());}['getViewTransform'](){const dg=aT;return P({},this[dg(0xfa)]['getTransform']());}[aT(0xd0)](){return this['options']['zoomSpeed'];}[aT(0x10f)](){const dh=aT;return this[dh(0xd9)]['getAllLayers']();}['setLayerVisible'](c,d){const di=aT;this[di(0xc5)](),this['layerManager']['setVisible'](c,d),this['requestRender']();}[aT(0x9b)](c,d){this['guardDestroyed'](),this['layerManager']['setColorOverride'](c,d),this['requestRender']();}['setTheme'](c){const dj=aT;this['guardDestroyed'](),this['options'][dj(0x1ad)]=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}[aT(0x117)](c){const dk=aT;this[dk(0xc5)](),this['options']['backgroundColor']=c,this['requestRender']();}['setTool'](c){const dl=aT;this['guardDestroyed'](),this['currentTool']==='measure'&&c!=='measure'&&this['measureTool']['deactivate'](),this[dl(0x7d)]=c,this['canvas'][dl(0x104)]['cursor']=this['getCursorForTool'](c),c==='measure'&&this['measureTool'][dl(0x189)](),c!==dl(0x114)&&(this['selectedEntityIndex']=-0x1),this['requestRender']();}['getTool'](){const dm=aT;return this[dm(0x7d)];}[aT(0x17b)](c){const dn=aT;switch(c){case'pan':return dn(0x11d);case'select':return'crosshair';case'measure':return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){const dp=aT;this[dp(0xf1)]['off'](c,d);}['getDocument'](){const dq=aT;return this[dq(0x16b)];}['getEntities'](){const dr=aT;var c,d;return(d=(c=this[dr(0x16b)])==null?void 0x0:c['entities'])!=null?d:[];}['resize'](){const ds=aT;this[ds(0xec)]['updateSize'](),this['requestRender']();}['destroy'](){const du=aT;var c;this['destroyed']=!0x0,this['stopDebugLoop'](),this['inputHandler']['destroy'](),this['resizeObserver']['disconnect'](),this[du(0xec)]['destroy'](),this['emitter']['removeAllListeners'](),this[du(0xd5)]['clear'](),Ie(),this['layerManager']['clear'](),(c=this['workerManager'])==null||c[du(0x1b8)](),this['workerManager']=null,this['doc']=null;}['requestRender'](){const dv=aT;if(!this[dv(0x95)]){if(this['debugRafId']){this[dv(0x146)]();return;}this['renderPending']||(this['renderPending']=!0x0,requestAnimationFrame(()=>{const dw=dv;this['renderPending']=!0x1,!this[dw(0x95)]&&this['doRender']();}));}}['doRender'](){const dx=aT;if(!this['doc']){this['renderer']['renderEmpty'](this[dx(0x1b2)]['theme']);return;}const d=this['camera']['getTransform'](),f=this['renderer']['getWidth'](),g=this['renderer']['getHeight'](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex'][dx(0xe7)](k['minX'],k['minY'],k['maxX'],k['maxY']),u=new Set();for(let A=0x0;A<m['length'];A++)u['add'](m[A][dx(0x1d3)]);const v=performance[dx(0xe2)](),x=this['renderer']['render'](this['doc'],d,this['options']['theme'],this['layerManager'][dx(0x78)](),this['selectedEntityIndex'],u,this['spatialIndex']['getEntityBBoxes']());this[dx(0x12f)]=performance['now']()-v,this['lastRenderStats']=x;const y=performance[dx(0xe2)]();for(y-this['lastDoRenderTime']>=0x3&&this[dx(0x163)]['push'](y),this[dx(0x18e)]=y;this['frameTimestamps'][dx(0x79)]>0x0&&this['frameTimestamps'][0x0]<y-0x3e8;)this['frameTimestamps']['shift']();if(this['currentTool']==='measure'&&this['measureTool']['state'][dx(0x17e)]!=='idle'){const C=this[dx(0xec)][dx(0x19d)]();La(C,this['camera'][dx(0xb4)](),this['measureTool'],this['mouseScreenX'],this[dx(0x154)],this['options']['theme']);}if(this['debugEnabled']){const D=this['renderer']['getContext'](),F=this['buildDebugStats']();this['lastDebugStats']=F,xa(D,F,this['options'][dx(0x1ad)],this['debugOptions'],this['renderer']['getWidth'](),this['renderer']['getHeight']());}}['setDebug'](c){const dy=aT;this['guardDestroyed'](),typeof c=='boolean'?this['debugEnabled']=c:(this[dy(0x86)]=!0x0,this[dy(0x186)]=ce(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this[dy(0x1b0)]());}['startDebugLoop'](){if(this['debugRafId'])return;const c=()=>{if(!this['debugEnabled']||this['destroyed']){this['debugRafId']=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this['debugRafId']=requestAnimationFrame(c);}['stopDebugLoop'](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}['getDebugStats'](){const dz=aT;return this['debugEnabled']?this[dz(0x184)]:null;}['buildDebugStats'](){const dA=aT;var f,g,k,m,v,x,y,A,C;const D=this[dA(0xfa)]['getTransform'](),F=this['renderer'][dA(0xdb)](),I=this['renderer']['getHeight'](),L=this['computeViewportBounds'](D,F,I);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':(f=this['lastRenderStats'])!=null?f:{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':(k=(g=this['doc'])==null?void 0x0:g['entities']['length'])!=null?k:0x0,'layerCount':(v=(m=this['doc'])==null?void 0x0:m['layers']['size'])!=null?v:0x0,'visibleLayerCount':this['layerManager']['getVisibleLayerNames']()['size'],'blockCount':(y=(x=this[dA(0x16b)])==null?void 0x0:x['blocks'][dA(0x1b7)])!=null?y:0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this['parseTime']+this['spatialIndexBuildTime'],'zoom':D[dA(0xb0)],'pixelSize':D[dA(0xb0)]>0x0?0x1/D['scale']:0x0,'viewportBounds':L,'fileName':this[dA(0x125)],'fileSize':this['loadedFileSize'],'dxfVersion':(C=(A=this['doc'])==null?void 0x0:A['header'][dA(0x1a7)])!=null?C:null};}['computeViewportBounds'](c,d,f){const [g,h]=K(c,0x0,f),[i,k]=K(c,d,0x0);return{'minX':Math['min'](g,i),'minY':Math['min'](h,k),'maxX':Math['max'](g,i),'maxY':Math['max'](h,k)};}['handlePan'](c,d){const dB=aT;this[dB(0xfa)]['pan'](c,d),this['requestRender'](),this['emitter'][dB(0x8d)]('viewchange',this[dB(0xfa)][dB(0xb4)]());}[aT(0x108)](c,d,f){const dC=aT;this[dC(0xfa)]['zoom'](c,d,f),this[dC(0x1b0)](),this['emitter'][dC(0x8d)]('viewchange',this['camera']['getTransform']());}['handleClick'](c,d){const dD=aT;if(!this['doc'])return;const f=this[dD(0xfa)]['getTransform'](),[g,h]=K(f,c,d);switch(this['currentTool']){case'select':this['handleSelect'](g,h,c,d);break;case'measure':{const k=Ee(g,h,this['doc']['entities'],this[dD(0xd5)],f['scale']),l=k[dD(0x79)]>0x0?k[0x0]:null,m=this['measureTool'][dD(0x8c)](g,h,l);this['requestRender'](),m&&this['emitter'][dD(0x8d)](dD(0x9c),m);break;}}}['handleMouseMove'](c,d){const dE=aT;var f;if(this['mouseScreenX']=c,this[dE(0x154)]=d,this['currentTool']==='measure'&&this[dE(0x16b)]){const g=this['camera'][dE(0xb4)](),[h,i]=K(g,c,d),k=Ee(h,i,this['doc']['entities'],this['spatialIndex'],g['scale']);this['measureTool']['handleMove']((f=k[0x0])!=null?f:null),this['requestRender']();}}['handleSelect'](c,d,f,g){const dF=aT;if(!this['doc'])return;const h=Ta(c,d,this['doc'][dF(0x74)],this['spatialIndex'],this[dF(0xd9)][dF(0x78)](),this['camera'][dF(0xb4)]()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this[dF(0x16b)]){const i=this['doc']['entities'][h];i&&this['emitter']['emit']('select',{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){const dG=aT;return this['doc']?this['doc']['header']['extMin']&&this['doc']['header']['extMax']?{'minX':this[dG(0x16b)][dG(0x99)]['extMin']['x'],'minY':this['doc'][dG(0x99)]['extMin']['y'],'maxX':this['doc']['header']['extMax']['x'],'maxY':this['doc']['header']['extMax']['y']}:Kt(this[dG(0x16b)][dG(0x74)]):null;}};export{Ya as CadViewer,Nt as Camera,ma as CanvasRenderer,B as DxfParseError,ya as EventEmitter,ka as LayerManager,Da as MeasureTool,Ia as SpatialIndex,X as THEMES,Ct as aciToHex,Pe as applyTransform,Kt as computeEntitiesBounds,_ as computeEntityBBox,re as drawEntity,Ee as findSnaps,Dt as fitToView,Ta as hitTest,le as parseDxf,xa as renderDebugOverlay,La as renderMeasureOverlay,ue as resolveEntityColor,K as screenToWorld,U as worldToScreen,Lt as zoomAtPoint};