@flyfish-group/file-viewer 1.0.17 → 1.0.19

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 (201) hide show
  1. package/README.md +15 -13
  2. package/dist/components/3MFLoader.js +1 -1
  3. package/dist/components/AMFLoader.js +1 -1
  4. package/dist/components/AudioViewer.js +1 -1
  5. package/dist/components/CadViewer.js +1 -1
  6. package/dist/components/CodeViewer.js +1 -1
  7. package/dist/components/ColladaLoader.js +1 -1
  8. package/dist/components/DrawingViewer.js +1 -1
  9. package/dist/components/EdaViewer.js +1 -1
  10. package/dist/components/EmailViewer.js +1 -1
  11. package/dist/components/EpubViewer.js +1 -1
  12. package/dist/components/FBXLoader.js +1 -1
  13. package/dist/components/GLTFLoader.js +1 -1
  14. package/dist/components/ImageViewer.js +1 -1
  15. package/dist/components/KMZLoader.js +1 -1
  16. package/dist/components/MarkdownViewer.js +1 -1
  17. package/dist/components/OBJLoader.js +1 -1
  18. package/dist/components/OfdViewer.js +1 -1
  19. package/dist/components/PCDLoader.js +1 -1
  20. package/dist/components/PLYLoader.js +1 -1
  21. package/dist/components/PdfView.js +3563 -3504
  22. package/dist/components/STLLoader.js +1 -1
  23. package/dist/components/TDSLoader.js +1 -1
  24. package/dist/components/USDLoader.js +1 -1
  25. package/dist/components/UmdViewer.js +2 -2
  26. package/dist/components/VRMLLoader.js +1 -1
  27. package/dist/components/VTKLoader.js +1 -1
  28. package/dist/components/XYZLoader.js +1 -1
  29. package/dist/components/XlsxTable.js +1 -1
  30. package/dist/components/___vite-browser-external_commonjs-proxy.js +1 -1
  31. package/dist/components/_commonjs-dynamic-modules.js +1 -1
  32. package/dist/components/_commonjsHelpers.js +1 -1
  33. package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
  34. package/dist/components/arc.js +1 -1
  35. package/dist/components/architecture-7EHR7CIX.js +1 -1
  36. package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
  37. package/dist/components/az-AZ-76LH7QW2.js +1 -1
  38. package/dist/components/bg-BG-XCXSNQG7.js +1 -1
  39. package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
  40. package/dist/components/bn-BD-2XOGV67Q.js +1 -1
  41. package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
  42. package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
  43. package/dist/components/cfb.js +1 -1
  44. package/dist/components/channel.js +1 -1
  45. package/dist/components/chunk-2J33WTMH.js +1 -1
  46. package/dist/components/chunk-4BX2VUAB.js +1 -1
  47. package/dist/components/chunk-55IACEB6.js +1 -1
  48. package/dist/components/chunk-727SXJPM.js +1 -1
  49. package/dist/components/chunk-AQP2D5EJ.js +1 -1
  50. package/dist/components/chunk-FMBD7UC4.js +1 -1
  51. package/dist/components/chunk-ND2GUHAM.js +1 -1
  52. package/dist/components/chunk-QZHKN3VN.js +1 -1
  53. package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
  54. package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
  55. package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
  56. package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
  57. package/dist/components/cytoscape.esm.js +1 -1
  58. package/dist/components/da-DK-5WZEPLOC.js +1 -1
  59. package/dist/components/dagre-BM42HDAG.js +1 -1
  60. package/dist/components/de-DE-XR44H4JA.js +1 -1
  61. package/dist/components/defaultLocale.js +1 -1
  62. package/dist/components/diagram-2AECGRRQ.js +1 -1
  63. package/dist/components/diagram-5GNKFQAL.js +1 -1
  64. package/dist/components/diagram-KO2AKTUF.js +1 -1
  65. package/dist/components/diagram-LMA3HP47.js +1 -1
  66. package/dist/components/diagram-OG6HWLK6.js +1 -1
  67. package/dist/components/directory-open-01563666.js +1 -1
  68. package/dist/components/directory-open-4ed118d0.js +1 -1
  69. package/dist/components/docx-preview.js +2 -2
  70. package/dist/components/el-GR-BZB4AONW.js +1 -1
  71. package/dist/components/en-B4ZKOASM.js +1 -1
  72. package/dist/components/erDiagram-TEJ5UH35.js +1 -1
  73. package/dist/components/es-ES-U4NZUMDT.js +1 -1
  74. package/dist/components/eu-ES-A7QVB2H4.js +1 -1
  75. package/dist/components/eventmodeling-FCH6USID.js +1 -1
  76. package/dist/components/fa-IR-HGAKTJCU.js +1 -1
  77. package/dist/components/fflate.module.js +1 -1
  78. package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
  79. package/dist/components/file-open-002ab408.js +1 -1
  80. package/dist/components/file-open-7c801643.js +1 -1
  81. package/dist/components/file-save-3189631c.js +1 -1
  82. package/dist/components/file-save-745eba88.js +1 -1
  83. package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
  84. package/dist/components/fr-FR-RHASNOE6.js +1 -1
  85. package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
  86. package/dist/components/gitGraph-WXDBUCRP.js +1 -1
  87. package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
  88. package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
  89. package/dist/components/graph.js +1 -1
  90. package/dist/components/he-IL-6SHJWFNN.js +1 -1
  91. package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
  92. package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
  93. package/dist/components/id-ID-SAP4L64H.js +1 -1
  94. package/dist/components/image-GAAHSSAO.js +1 -1
  95. package/dist/components/image-blob-reduce.esm.js +1 -1
  96. package/dist/components/index10.js +1 -1
  97. package/dist/components/index11.js +1 -1
  98. package/dist/components/index12.js +1 -1
  99. package/dist/components/index13.js +1 -1
  100. package/dist/components/index14.js +1 -1
  101. package/dist/components/index15.js +1 -1
  102. package/dist/components/index16.js +1 -1
  103. package/dist/components/index17.js +1 -1
  104. package/dist/components/index18.js +1 -1
  105. package/dist/components/index19.js +1 -1
  106. package/dist/components/index2.js +1 -1
  107. package/dist/components/index20.js +1 -1
  108. package/dist/components/index21.js +2 -2
  109. package/dist/components/index22.js +1 -1
  110. package/dist/components/index23.js +1 -1
  111. package/dist/components/index24.js +1 -1
  112. package/dist/components/index3.js +1 -1
  113. package/dist/components/index4.js +1 -1
  114. package/dist/components/index5.js +1 -1
  115. package/dist/components/index6.js +1 -1
  116. package/dist/components/index7.js +1 -1
  117. package/dist/components/index8.js +1 -1
  118. package/dist/components/index9.js +1 -1
  119. package/dist/components/info-J43DQDTF.js +1 -1
  120. package/dist/components/infoDiagram-5YYISTIA.js +1 -1
  121. package/dist/components/init.js +1 -1
  122. package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
  123. package/dist/components/it-IT-JPQ66NNP.js +1 -1
  124. package/dist/components/ja-JP-DBVTYXUO.js +1 -1
  125. package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
  126. package/dist/components/jszip.min.js +1 -1
  127. package/dist/components/kaa-6HZHGXH3.js +1 -1
  128. package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
  129. package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
  130. package/dist/components/katex.js +1 -1
  131. package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
  132. package/dist/components/km-KH-HSX4SM5Z.js +1 -1
  133. package/dist/components/ko-KR-MTYHY66A.js +1 -1
  134. package/dist/components/ku-TR-6OUDTVRD.js +1 -1
  135. package/dist/components/layout.js +1 -1
  136. package/dist/components/libarchive.js +1 -1
  137. package/dist/components/linear.js +1 -1
  138. package/dist/components/lt-LT-XHIRWOB4.js +1 -1
  139. package/dist/components/lv-LV-5QDEKY6T.js +1 -1
  140. package/dist/components/mermaid-parser.core.js +2 -2
  141. package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
  142. package/dist/components/mr-IN-CRQNXWMA.js +1 -1
  143. package/dist/components/my-MM-5M5IBNSE.js +1 -1
  144. package/dist/components/nb-NO-T6EIAALU.js +1 -1
  145. package/dist/components/nestedRender.js +1 -1
  146. package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
  147. package/dist/components/nn-NO-6E72VCQL.js +1 -1
  148. package/dist/components/oc-FR-POXYY2M6.js +1 -1
  149. package/dist/components/ofd.js +1 -1
  150. package/dist/components/ordinal.js +1 -1
  151. package/dist/components/pa-IN-N4M65BXN.js +1 -1
  152. package/dist/components/packet-YPE3B663.js +1 -1
  153. package/dist/components/percentages-BXMCSKIN.js +1 -1
  154. package/dist/components/pica.js +1 -1
  155. package/dist/components/pie-LRSECV5Y.js +1 -1
  156. package/dist/components/pie.js +1 -1
  157. package/dist/components/pieDiagram-4H26LBE5.js +1 -1
  158. package/dist/components/pl-PL-T2D74RX3.js +1 -1
  159. package/dist/components/postal-mime.js +1 -1
  160. package/dist/components/printLayout.js +1 -0
  161. package/dist/components/pt-BR-5N22H2LF.js +1 -1
  162. package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
  163. package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
  164. package/dist/components/radar-GUYGQ44K.js +1 -1
  165. package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
  166. package/dist/components/ro-RO-JPDTUUEW.js +1 -1
  167. package/dist/components/rough.esm.js +1 -1
  168. package/dist/components/roundRect.js +1 -1
  169. package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
  170. package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
  171. package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
  172. package/dist/components/si-LK-N5RQ5JYF.js +1 -1
  173. package/dist/components/sk-SK-C5VTKIMK.js +1 -1
  174. package/dist/components/sl-SI-NN7IZMDC.js +1 -1
  175. package/dist/components/stateDiagram-AJRCARHV.js +1 -1
  176. package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
  177. package/dist/components/subset-shared.chunk.js +1 -1
  178. package/dist/components/subset-worker.chunk.js +1 -1
  179. package/dist/components/sv-SE-XGPEYMSR.js +1 -1
  180. package/dist/components/ta-IN-2NMHFXQM.js +1 -1
  181. package/dist/components/th-TH-HPSO5L25.js +1 -1
  182. package/dist/components/time.js +1 -1
  183. package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
  184. package/dist/components/tr-TR-DEFEU3FU.js +1 -1
  185. package/dist/components/transform.js +1 -1
  186. package/dist/components/treeView-BLDUP644.js +1 -1
  187. package/dist/components/treemap-LRROVOQU.js +1 -1
  188. package/dist/components/uk-UA-QMV73CPH.js +1 -1
  189. package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
  190. package/dist/components/vi-VN-M7AON7JQ.js +1 -1
  191. package/dist/components/wardley-L42UT6IY.js +1 -1
  192. package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
  193. package/dist/components/worker-ref.js +1 -1
  194. package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
  195. package/dist/components/zh-CN-LNUGB5OW.js +1 -1
  196. package/dist/components/zh-HK-E62DVLB3.js +1 -1
  197. package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
  198. package/dist/index.d.ts +24 -0
  199. package/dist/index.mjs +1 -1
  200. package/dist/style.css +2 -2
  201. package/package.json +8 -1
@@ -1 +1 @@
1
- const aY=b;function b(c,d){c=c-0xb8;const e=a();let f=e[c];return f;}(function(c,d){const aS=b,e=c();while(!![]){try{const f=parseInt(aS(0x134))/0x1+-parseInt(aS(0x171))/0x2+parseInt(aS(0x103))/0x3+parseInt(aS(0x148))/0x4*(-parseInt(aS(0x1cf))/0x5)+parseInt(aS(0x1d1))/0x6*(parseInt(aS(0x18c))/0x7)+parseInt(aS(0x196))/0x8*(parseInt(aS(0x14b))/0x9)+-parseInt(aS(0x1d5))/0xa*(-parseInt(aS(0x127))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x72b2d));function Pe(g,k,m=0x0,p=g['length']-0x1,v=De){for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math['log'](A),F=0.5*Math['exp'](0x2*D/0x3),I=0.5*Math['sqrt'](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math['max'](m,Math['floor'](k-C*F/A+I)),M=Math['min'](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){const aT=b;this['_maxEntries']=Math['max'](0x4,c),this[aT(0x10f)]=Math[aT(0x142)](0x2,Math[aT(0x1b2)](this['_maxEntries']*0.4)),this['clear']();}['all'](){return this['_all'](this['data'],[]);}['search'](d){const aU=b;let e=this['data'];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e['children']['length'];k++){const l=e[aU(0xd3)][k],m=e['leaf']?g(l):l;G(d,m)&&(e['leaf']?f['push'](l):te(d,m)?this[aU(0x16b)](l,f):h['push'](l));}e=h['pop']();}return f;}['collides'](c){const aV=b;let d=this['data'];if(!G(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d['children']['length'];f++){const g=d['children'][f],h=d[aV(0x1f8)]?this['toBBox'](g):g;if(G(c,h)){if(d['leaf']||te(c,h))return!0x0;e['push'](g);}}d=e['pop']();}return!0x1;}['load'](c){const aW=b;if(!(c&&c['length']))return this;if(c[aW(0x153)]<this['_minEntries']){for(let e=0x0;e<c['length'];e++)this['insert'](c[e]);return this;}let d=this['_build'](c['slice'](),0x0,c['length']-0x1,0x0);if(!this['data']['children'][aW(0x153)])this['data']=d;else{if(this['data']['height']===d['height'])this['_splitRoot'](this['data'],d);else{if(this['data']['height']<d['height']){const f=this[aW(0x150)];this[aW(0x150)]=d,d=f;}this['_insert'](d,this['data']['height']-d[aW(0x1fa)]-0x1,!0x0);}}return this;}['insert'](c){return c&&this['_insert'](c,this['data']['height']-0x1),this;}['clear'](){return this['data']=O([]),this;}['remove'](d,e){const aX=b;if(!d)return this;let f=this[aX(0x150)];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k[aX(0x153)];){if(f||(f=k['pop'](),u=k[k['length']-0x1],p=m['pop'](),v=!0x0),f['leaf']){const w=Ne(d,f[aX(0xd3)],e);if(w!==-0x1)return f['children']['splice'](w,0x1),k['push'](f),this['_condense'](k),this;}!v&&!f[aX(0x1f8)]&&te(f,g)?(k['push'](f),m[aX(0x1fb)](p),p=0x0,u=f,f=f['children'][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){return c['minX']-d['minX'];}[aY(0xca)](c,d){return c['minY']-d['minY'];}['toJSON'](){const aZ=aY;return this[aZ(0x150)];}['fromJSON'](c){return this['data']=c,this;}['_all'](c,d){const e=[];for(;c;)c['leaf']?d['push'](...c['children']):e['push'](...c['children']),c=e['pop']();return d;}['_build'](e,g,k,m){const b0=aY,p=k-g+0x1;let v=this['_maxEntries'],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math[b0(0x1b2)](Math['log'](p)/Math['log'](v)),v=Math['ceil'](p/Math['pow'](v,m-0x1))),w=O([]),w['leaf']=!0x1,w['height']=m;const x=Math['ceil'](p/v),z=x*Math['ceil'](Math['sqrt'](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math['min'](A+z-0x1,k);de(e,A,C,x,this['compareMinY']);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w['children']['push'](this['_build'](e,D,F,m-0x1));}}return R(w,this['toBBox']),w;}['_chooseSubtree'](d,e,f,g){for(;g['push'](e),!(e['leaf']||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children']['length'];v++){const w=e['children'][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e['children'][0x0];}return e;}[aY(0x21c)](c,d,e){const b1=aY,f=e?c:this['toBBox'](c),g=[],h=this[b1(0xc8)](f,this['data'],d,g);for(h['children']['push'](c),j(h,f);d>=0x0&&g[d]['children'][b1(0x153)]>this['_maxEntries'];)this[b1(0x114)](g,d),d--;this['_adjustParentBBoxes'](f,g,d);}[aY(0x114)](c,d){const b2=aY,e=c[d],f=e[b2(0xd3)]['length'],g=this['_minEntries'];this['_chooseSplitAxis'](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e['children']['splice'](h,e['children'][b2(0x153)]-h));k['height']=e['height'],k['leaf']=e[b2(0x1f8)],R(e,this['toBBox']),R(k,this[b2(0x17b)]),d?c[d-0x1]['children']['push'](k):this[b2(0x212)](e,k);}[aY(0x212)](c,d){const b3=aY;this['data']=O([c,d]),this['data']['height']=c[b3(0x1fa)]+0x1,this['data']['leaf']=!0x1,R(this['data'],this[b3(0x17b)]);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this['toBBox']),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b4=aY,f=c['leaf']?this[b4(0x17c)]:Be,g=c['leaf']?this['compareMinY']:Xe,h=this['_allDistMargin'](c,d,e,f),k=this[b4(0x118)](c,d,e,g);h<k&&c['children']['sort'](f);}['_allDistMargin'](d,e,f,g){const b5=aY;d['children'][b5(0x1c7)](g);const k=this['toBBox'],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d['children'][v];j(m,d[b5(0x1f8)]?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d[b5(0x1f8)]?k(z):z),u+=U(p);}return u;}[aY(0x1d7)](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}['_condense'](c){for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children']['length']===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(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 R(c,d){$(c,0x0,c['children']['length'],d,c);}function $(c,d,f,g,h){h||(h=O(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h['maxX']=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c['leaf']?g(l):l);}return h;}function j(c,d){const b6=aY;return c['minX']=Math['min'](c['minX'],d['minX']),c['minY']=Math[b6(0x21a)](c['minY'],d['minY']),c['maxX']=Math['max'](c['maxX'],d['maxX']),c['maxY']=Math['max'](c['maxY'],d['maxY']),c;}function Be(c,d){const b7=aY;return c['minX']-d[b7(0x19c)];}function Xe(c,d){return c['minY']-d['minY'];}function ee(c){return(c['maxX']-c['minX'])*(c['maxY']-c['minY']);}function U(c){const b8=aY;return c['maxX']-c[b8(0x19c)]+(c['maxY']-c[b8(0x16a)]);}function Ye(c,d){const b9=aY;return(Math['max'](d['maxX'],c['maxX'])-Math['min'](d['minX'],c['minX']))*(Math['max'](d['maxY'],c['maxY'])-Math['min'](d['minY'],c[b9(0x16a)]));}function ze(c,d){const bb=aY,f=Math[bb(0x142)](c['minX'],d['minX']),g=Math['max'](c['minY'],d['minY']),h=Math['min'](c['maxX'],d['maxX']),i=Math['min'](c[bb(0xf1)],d['maxY']);return Math['max'](0x0,h-f)*Math['max'](0x0,i-g);}function te(c,d){const bc=aY;return c['minX']<=d[bc(0x19c)]&&c['minY']<=d['minY']&&d['maxX']<=c['maxX']&&d[bc(0xf1)]<=c['maxY'];}function G(c,d){const bd=aY;return d[bd(0x19c)]<=c[bd(0x1d4)]&&d['minY']<=c[bd(0xf1)]&&d['maxX']>=c['minX']&&d['maxY']>=c[bd(0x16a)];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const bf=aY,k=[d,f];for(;k['length'];){if(f=k['pop'](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k[bf(0x1fb)](d,l,l,f);}}function Re(d){const bg=aY,f=d['replace'](/\r\n?/g,'\x0a'),g=[],h=f[bg(0x153)];let k=0x0;for(;k<h;){for(;k<h&&f['charCodeAt'](k)===0xa;)k++;if(k>=h)break;let l=f['indexOf']('\x0a',k);l===-0x1&&(l=h);const m=f['substring'](k,l)[bg(0xe6)]();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f['indexOf']('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f['indexOf']('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)[bg(0x200)](/\s+$/,'');k=l+0x1,g['push']({'code':p,'value':u});}return g;}function Oe(c,d,f){const bh=aY;for(;d<c['length'];){const g=c[d];if(g[bh(0x15e)]===0x0&&g['value']===bh(0xd5))return d+0x1;if(g['code']===0x9){const h=g['value'];switch(d++,h){case'$ACADVER':d<c['length']&&(f['acadVersion']=c[d][bh(0xbe)],d++);break;case'$EXTMIN':if(d<c['length']){const i=fe(c,d);f[bh(0x12d)]=i['point'],d=i[bh(0x181)];}break;case'$EXTMAX':if(d<c['length']){const k=fe(c,d);f['extMax']=k['point'],d=k['nextIndex'];}break;case bh(0x1bf):d<c['length']&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case bh(0x106):d<c[bh(0x153)]&&(f['measurement']=parseInt(c[d]['value'],0xa),d++);break;case'$LTSCALE':d<c['length']&&(f['ltScale']=parseFloat(c[d]['value']),d++);break;case bh(0xcd):d<c[bh(0x153)]&&(f[bh(0x137)]=c[d][bh(0xbe)],d++);break;case'$HANDSEED':d<c['length']&&(f['handleSeed']=c[d]['value'],d++);break;default:for(;d<c[bh(0x153)]&&c[d]['code']!==0x9&&c[d]['code']!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const bi=aY,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c[bi(0x153)];){const g=c[d]['code'];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d][bi(0xbe)]),d++;else{if(g===0x1e)f['z']=parseFloat(c[d][bi(0xbe)]),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bj=aY;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g[bj(0xbe)]==='ENDSEC')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=$e(c,d,f['layers']);break;case'LTYPE':d=je(c,d,f['lineTypes']);break;case'STYLE':d=qe(c,d,f['styles']);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bk=aY;for(;d<c[bk(0x153)];){const g=c[d];if(g['code']===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[bk(0xbe)];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h[bk(0x1dd)]=parseInt(i['value'],0xa);break;case 0x172:h['lineWeight']=parseInt(i[bk(0xbe)],0xa);break;case 0x1a4:h['trueColor']=parseInt(i[bk(0xbe)],0xa);break;}d++;}f[bk(0x1bb)](h['name'],h);}else d++;}return d;}function je(c,d,f){const bl=aY;for(;d<c['length'];){const g=c[d];if(g[bl(0x15e)]===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]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];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['set'](h['name'],h);}else d++;}return d;}function qe(c,d,f){const bm=aY;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['value'];break;case 0x3:h[bm(0xe8)]=i['value'];break;case 0x4:h['bigFontName']=i[bm(0xbe)];break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x29:h['widthFactor']=parseFloat(i[bm(0xbe)]);break;case 0x32:h[bm(0xee)]=parseFloat(i['value']);break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function P(c){const bn=aY,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f['code']){case 0x5:d['handle']=f[bn(0xbe)];break;case 0x8:d['layer']=f['value'];break;case 0x6:d['lineType']=f['value'];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d['visible']=f['value']==='0'||f['value']==='';break;case 0x3e:d[bn(0xd4)]=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[bn(0xbe)]);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function He(c){const bo=aY,d={...P(c),'type':bo(0x183),'start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f[bo(0x15e)]){case 0xa:d['start']['x']=parseFloat(f['value']);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d['start']['z']=parseFloat(f[bo(0xbe)]);break;case 0xb:d[bo(0x109)]['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d[bo(0x109)]['z']=parseFloat(f['value']);break;}return d;}function Ve(c){const bp=aY,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d[bp(0x163)]['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f[bp(0xbe)]);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f[bp(0xbe)]);break;}return d;}function Ue(c){const bq=aY,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f[bq(0x15e)]){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;case 0x32:d['startAngle']=parseFloat(f['value']);break;case 0x33:d['endAngle']=parseFloat(f['value']);break;}return d;}function Ge(c){const br=aY,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g['code']){case 0x46:d['closed']=(parseInt(g['value'],0xa)&0x1)!==0x0;break;case 0x26:d['elevation']=parseFloat(g['value']);break;case 0x2b:d['constantWidth']=parseFloat(g['value']);break;case 0xa:f&&d[br(0x14a)]['push'](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f['startWidth']=parseFloat(g['value']));break;case 0x29:f&&(f['endWidth']=parseFloat(g['value']));break;case 0x2a:f&&(f[br(0x10c)]=parseFloat(g['value']));break;}return f&&d['vertices']['push'](f),d;}function Ze(c){const bs=aY,d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f['code']){case 0x46:{const g=parseInt(f[bs(0xbe)],0xa);d['closed']=(g&0x1)!==0x0,d['is3d']=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const bu=aY,d={...P(c),'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 f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0xb:d['majorAxis']['x']=parseFloat(f[bu(0xbe)]);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f['value']);break;case 0x28:d['minorRatio']=parseFloat(f[bu(0xbe)]);break;case 0x29:d['startParam']=parseFloat(f['value']);break;case 0x2a:d['endParam']=parseFloat(f['value']);break;}return d;}function Qe(c){const bv=aY,d={...P(c),'type':'SPLINE','degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h[bv(0x15e)]){case 0x46:d[bv(0x1dd)]=parseInt(h[bv(0xbe)],0xa);break;case 0x47:d['degree']=parseInt(h[bv(0xbe)],0xa);break;case 0x28:d['knots']['push'](parseFloat(h[bv(0xbe)]));break;case 0x29:d['weights'][bv(0x1fb)](parseFloat(h['value']));break;case 0xa:f&&d['controlPoints']['push'](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h['value']));break;case 0xb:g&&d['fitPoints']['push'](g),g={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h[bv(0xbe)]));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d['startTangent']||(d['startTangent']={'x':0x0,'y':0x0,'z':0x0}),d['startTangent']['x']=parseFloat(h['value']);break;case 0x16:d[bv(0x210)]&&(d['startTangent']['y']=parseFloat(h['value']));break;case 0x20:d['startTangent']&&(d['startTangent']['z']=parseFloat(h['value']));break;case 0xd:d[bv(0x1b7)]||(d[bv(0x1b7)]={'x':0x0,'y':0x0,'z':0x0}),d[bv(0x1b7)]['x']=parseFloat(h['value']);break;case 0x17:d['endTangent']&&(d['endTangent']['y']=parseFloat(h['value']));break;case 0x21:d['endTangent']&&(d['endTangent']['z']=parseFloat(h['value']));break;}return f&&d['controlPoints']['push'](f),g&&d['fitPoints']['push'](g),d;}function Je(c){const bw=aY,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':'STANDARD','hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f['code']){case 0x1:d['text']=f['value'];break;case 0xa:d[bw(0x12e)]['x']=parseFloat(f['value']);break;case 0x14:d[bw(0x12e)]['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d[bw(0x125)]||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f['value']);break;case 0x15:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d[bw(0x125)]['y']=parseFloat(f['value']);break;case 0x1f:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d[bw(0x1fa)]=parseFloat(f['value']);break;case 0x29:d['widthFactor']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x33:d['obliqueAngle']=parseFloat(f['value']);break;case 0x7:d['style']=f[bw(0xbe)];break;case 0x47:d['generationFlags']=parseInt(f[bw(0xbe)],0xa);break;case 0x48:d['hAlign']=parseInt(f['value'],0xa);break;case 0x49:d['vAlign']=parseInt(f['value'],0xa);break;}return d;}function et(c){const bx=aY,d={...P(c),'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},f=[];for(const g of c)switch(g['code']){case 0x1:f['push'](g['value']);break;case 0x3:f['push'](g['value']);break;case 0x7:d[bx(0x14d)]=g['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['x']=parseFloat(g['value']);break;case 0x15:d['textDirection']||(d[bx(0x1cd)]={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['y']=parseFloat(g['value']);break;case 0x1f:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['z']=parseFloat(g['value']);break;case 0x28:d['height']=parseFloat(g['value']);break;case 0x29:d['width']=parseFloat(g['value']);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g[bx(0xbe)]);break;case 0x32:d['rotation']=parseFloat(g['value']);break;case 0x47:d[bx(0xd8)]=parseInt(g[bx(0xbe)],0xa);break;case 0x48:d['drawingDirection']=parseInt(g['value'],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g['value'],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d['text']=f['join'](''),d;}function tt(c){const by=aY,d={...P(c),'type':'INSERT','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 f of c)switch(f[by(0x15e)]){case 0x2:d['blockName']=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d[by(0x12e)]['y']=parseFloat(f['value']);break;case 0x1e:d[by(0x12e)]['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f['value']);break;case 0x2a:d['scaleY']=parseFloat(f['value']);break;case 0x2b:d['scaleZ']=parseFloat(f['value']);break;case 0x2c:d['columnSpacing']=parseFloat(f[by(0xbe)]);break;case 0x2d:d['rowSpacing']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x46:d['columnCount']=parseInt(f['value'],0xa)||0x1;break;case 0x47:d['rowCount']=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bz=aY,d={...P(c),'type':'DIMENSION','blockName':'','dimStyle':bz(0x202),'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 f of c)switch(f[bz(0x15e)]){case 0x1:d['textOverride']=f[bz(0xbe)];break;case 0x2:d[bz(0x149)]=f['value'];break;case 0x3:d['dimStyle']=f['value'];break;case 0xa:d['defPoint']['x']=parseFloat(f['value']);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['defPoint']['z']=parseFloat(f[bz(0xbe)]);break;case 0xb:d['textMidpoint']['x']=parseFloat(f['value']);break;case 0x15:d['textMidpoint']['y']=parseFloat(f['value']);break;case 0x1f:d['textMidpoint']['z']=parseFloat(f['value']);break;case 0xd:d[bz(0x1be)]||(d[bz(0x1be)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['x']=parseFloat(f[bz(0xbe)]);break;case 0x17:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['z']=parseFloat(f['value']);break;case 0xe:d['defPoint3']||(d[bz(0x11b)]={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x11b)]['x']=parseFloat(f['value']);break;case 0x18:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x11b)]['y']=parseFloat(f['value']);break;case 0x22:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x11b)]['z']=parseFloat(f['value']);break;case 0xf:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['x']=parseFloat(f['value']);break;case 0x19:d['defPoint4']||(d[bz(0x11d)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['y']=parseFloat(f['value']);break;case 0x23:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['z']=parseFloat(f['value']);break;case 0x10:d[bz(0xcf)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['y']=parseFloat(f['value']);break;case 0x24:d[bz(0xcf)]||(d[bz(0xcf)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['z']=parseFloat(f['value']);break;case 0x28:d['leaderLength']=parseFloat(f[bz(0xbe)]);break;case 0x32:d[bz(0x1db)]=parseFloat(f[bz(0xbe)]);break;case 0x35:d['textRotation']=parseFloat(f['value']);break;case 0x46:d['dimType']=parseInt(f[bz(0xbe)],0xa);break;}return d;}function nt(c){const bA=aY,d={...P(c),'type':bA(0x172),'patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c['length'];){const g=c[f];switch(g['code']){case 0x2:d['patternName']=g['value'];break;case 0x29:d['patternScale']=parseFloat(g['value']);break;case 0x34:d['patternAngle']=parseFloat(g[bA(0xbe)]);break;case 0x46:d['solidFill']=g['value']==='1';break;case 0x47:d[bA(0xb9)]=g[bA(0xbe)]==='1';break;case 0x4b:d['hatchStyle']=parseInt(g['value'],0xa);break;case 0x4c:d['patternType']=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g['value'],0xa);f++;for(let k=0x0;k<h&&f<c[bA(0x153)];k++){const l=rt(c,f);d['boundaryPaths']['push'](l['path']),f=l[bA(0x181)];}continue;}}f++;}return d;}function rt(c,d){let f=0x0;return d<c['length']&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bB=aY,g={'type':'polyline','vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c[bB(0x153)]&&c[d]['code']===0x48&&(h=c[d]['value']==='1',d++),d<c['length']&&c[d]['code']===0x49&&(g[bB(0x1ed)]=c[d]['value']==='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]['code']===0xa&&(m['x']=parseFloat(c[d][bB(0xbe)]),d++),d<c['length']&&c[d]['code']===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g['vertices'][bB(0x1fb)](m),h&&d<c[bB(0x153)]&&c[d]['code']===0x2a?(g[bB(0x16d)][bB(0x1fb)](parseFloat(c[d]['value'])),d++):h&&g[bB(0x16d)]['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d]['code']===0x14a);)if(c[d][bB(0x15e)]===0x61){const p=parseInt(c[d]['value'],0xa);d++;for(let u=0x0;u<p&&d<c['length']&&c[d]['code']===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bC=aY,p={'type':'edges','edges':[],'flags':m};let v=0x0;k<g['length']&&g[k]['code']===0x5d&&(v=parseInt(g[k]['value'],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k]['code']===0x48;w++){const x=parseInt(g[k][bC(0xbe)],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g[bC(0x153)]&&g[k]['code']===0xa&&(z['start']['x']=parseFloat(g[k][bC(0xbe)]),k++),k<g['length']&&g[k]['code']===0x14&&(z['start']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z['end']['y']=parseFloat(g[k]['value']),k++),p[bC(0x11e)][bC(0x1fb)](z);break;}case 0x2:{const A={'type':'arc','center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(A['center']['x']=parseFloat(g[k][bC(0xbe)]),k++),k<g['length']&&g[k]['code']===0x14&&(A['center']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(A['radius']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(A['startAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x33&&(A[bC(0xcb)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x49&&(A['ccw']=g[k][bC(0xbe)]==='1',k++),p[bC(0x11e)]['push'](A);break;}case 0x3:{const C={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g[bC(0x153)]&&g[k]['code']===0xa&&(C['center']['x']=parseFloat(g[k]['value']),k++),k<g[bC(0x153)]&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k]['value']),k++),k<g[bC(0x153)]&&g[k]['code']===0xb&&(C['majorAxis']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(C['majorAxis']['y']=parseFloat(g[k]['value']),k++),k<g[bC(0x153)]&&g[k]['code']===0x28&&(C['minorRatio']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(C['startAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x33&&(C['endAngle']=parseFloat(g[k][bC(0xbe)]),k++),k<g[bC(0x153)]&&g[k]['code']===0x49&&(C['ccw']=g[k]['value']==='1',k++),p[bC(0x11e)]['push'](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k]['code']===0x5e&&(D=parseInt(g[k]['value'],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k]['code']===0x4a&&k++;let L=0x0;k<g['length']&&g[k]['code']===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g['length']&&g[k]['code']===0x60&&(M=parseInt(g[k]['value'],0xa),k++);for(let N=0x0;N<L&&k<g['length']&&g[k]['code']===0x28;N++)F['push'](parseFloat(g[k]['value'])),k++;for(let V=0x0;V<M&&k<g['length'];V++){const X={'x':0x0,'y':0x0};g[k]['code']===0xa&&(X['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I['push'](X);}p['edges']['push']({'type':bC(0x139),'degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k]['code']===0x61||g[k][bC(0x15e)]===0x14a);)if(g[k]['code']===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bD=aY,d={...P(c),'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d['position']['y']=parseFloat(f['value']);break;case 0x1e:d['position']['z']=parseFloat(f[bD(0xbe)]);break;}return d;}function we(c,d,f){const bE=aY;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 k=[];for(;d<c['length']&&c[d]['code']!==0x0;)k[bE(0x1fb)](c[d]),d++;switch(h){case'LINE':f['push'](He(k));break;case'CIRCLE':f[bE(0x1fb)](Ve(k));break;case'ARC':f['push'](Ue(k));break;case'LWPOLYLINE':f['push'](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case bE(0x16e):f['push'](Qe(k));break;case bE(0x1a7):f['push'](Je(k));break;case'MTEXT':f['push'](et(k));break;case'INSERT':{const l=tt(k);k['some'](m=>m['code']===0x42&&m['value']==='1')&&(d=ct(c,d,l['attribs'])),f['push'](l);break;}case bE(0xd9):f['push'](at(k));break;case'HATCH':f[bE(0x1fb)](nt(k));break;case'POINT':f['push'](it(k));break;case'POLYLINE':{const m=Ze(k);d=lt(c,d,m['vertices']),f['push'](m);break;}}}return d;}function lt(c,d,f){const bF=aY;for(;d<c[bF(0x153)];){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[bF(0x153)]&&c[d][bF(0x15e)]!==0x0;){const i=c[d];switch(i[bF(0x15e)]){case 0xa:h['x']=parseFloat(i[bF(0xbe)]);break;case 0x14:h['y']=parseFloat(i['value']);break;case 0x2a:h['bulge']=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i[bF(0xbe)]);break;case 0x29:h['endWidth']=parseFloat(i['value']);break;}d++;}f[bF(0x1fb)](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ct(c,d,f){const bG=aY;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d][bG(0xbe)];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[bG(0x153)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x1:h[bG(0x1f1)]=i[bG(0xbe)];break;case 0x2:h['tag']=i['value'];break;case 0x7:h['style']=i[bG(0xbe)];break;case 0x8:h['layer']=i[bG(0xbe)];break;case 0xa:h['insertionPoint']['x']=parseFloat(i['value']);break;case 0x14:h[bG(0x12e)]['y']=parseFloat(i['value']);break;case 0x1e:h['insertionPoint']['z']=parseFloat(i['value']);break;case 0x28:h[bG(0x1fa)]=parseFloat(i['value']);break;case 0x32:h['rotation']=parseFloat(i[bG(0xbe)]);break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;}d++;}f[bG(0x1fb)](h);}else{for(d++;d<c['length']&&c[d][bG(0x15e)]!==0x0;)d++;}}return d;}function ht(c,d,f){const bH=aY;for(;d<c[bH(0x153)];){const g=c[d];if(g['code']===0x0&&g['value']===bH(0xd5))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['value'];break;case 0x8:break;case 0xa:h['basePoint']['x']=parseFloat(i['value']);break;case 0x14:h[bH(0xef)]['y']=parseFloat(i['value']);break;case 0x1e:h['basePoint']['z']=parseFloat(i['value']);break;case 0x46:h[bH(0x1dd)]=parseInt(i[bH(0xbe)],0xa);break;}d++;}d=we(c,d,h['entities']),h['name']&&!h[bH(0x1d9)]['startsWith'](bH(0x1bd))&&!h['name']['startsWith']('*Paper_Space')&&f['set'](h[bH(0x1d9)],h);}else d++;}return d;}var pe=aY(0x1f7),ut={'ANSI_874':'windows-874','ANSI_932':'shift_jis','ANSI_936':'gbk','ANSI_949':aY(0x15a),'ANSI_950':aY(0x112),'ANSI_1250':'windows-1250','ANSI_1251':aY(0x1eb),'ANSI_1252':aY(0x167),'ANSI_1253':'windows-1253','ANSI_1254':'windows-1254','ANSI_1255':'windows-1255','ANSI_1256':'windows-1256','ANSI_1257':'windows-1257','ANSI_1258':'windows-1258'},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String['fromCodePoint'](parseInt(f,0x10)));}function pt(d){const bI=aY;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f[bI(0xde)](0x0,pe['length']))===pe)throw new T('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let g=new TextDecoder('utf-8')['decode'](d);const h=g['match'](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g['match'](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??'windows-1252';k!=='utf-8'&&(g=new TextDecoder(k)[bI(0x166)](d));}return be(g);}function bt(c,d){const bJ=aY;for(;d<c[bJ(0x153)];){if(c[d]['code']===0x0&&c[d]['value']===bJ(0xd5))return d+0x1;d++;}return d;}function mt(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 gt(c){const bK=aY;for(const [,d]of c['layers'])d['isOff']=d['color']<0x0,d['isOff']&&(d['color']=Math['abs'](d['color'])),d[bK(0x1a1)]=(d['flags']&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){const bL=aY;super(c),this['cause']=d,this[bL(0x1d9)]=bL(0x201);}};function ae(c){const bM=aY;if(typeof c=='string'){if(c['length']===0x0)throw new T(bM(0x188));}else{if(c instanceof ArrayBuffer){if(c[bM(0xc4)]===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Re(d);}catch(k){throw new T('Failed\x20to\x20tokenize\x20DXF\x20content.',k);}if(f[bM(0x153)]===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f['length'];){const m=f[l];if(m['code']===0x0&&m['value']==='SECTION'){if(l++,l>=f['length'])break;const o=f[l]['value'];switch(l++,o){case'HEADER':l=Oe(f,l,g[bM(0x187)]);break;case'TABLES':l=_e(f,l,g);break;case bM(0x1f2):l=ht(f,l,g['blocks']);break;case'ENTITIES':l=we(f,l,g[bM(0x1f0)]);break;default:l=bt(f,l);break;}}else{if(m['code']===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=['#000000','#FF0000',aY(0x1c0),'#00FF00',aY(0xe9),'#0000FF',aY(0x1c9),'#FFFFFF','#808080','#C0C0C0',aY(0x17a),'#FF7F7F',aY(0x147),'#A55252','#7F0000','#7F3F3F','#4C0000',aY(0x14e),aY(0x1da),'#261313','#FF3F00',aY(0x218),'#A52900','#A56752','#7F1F00',aY(0xff),aY(0x15c),'#4C2F26',aY(0x156),aY(0x111),'#FF7F00',aY(0x18d),'#A55200','#A57C52','#7F3F00',aY(0x216),'#4C2600','#4C3926',aY(0x144),aY(0x1e0),'#FFBF00','#FFDF7F','#A57C00','#A59152',aY(0x1a3),'#7F6F3F','#4C3900',aY(0xc9),'#261C00','#262113','#FFFF00','#FFFF7F',aY(0x1b3),aY(0xe0),'#7F7F00','#7F7F3F',aY(0xf2),'#4C4C26',aY(0x1aa),'#262613','#BFFF00','#DFFF7F','#7CA500',aY(0xf3),'#5F7F00','#6F7F3F','#394C00','#424C26','#1C2600','#212613','#7FFF00','#BFFF7F','#52A500','#7CA552','#3F7F00','#5F7F3F','#264C00','#394C26','#132600','#1C2613',aY(0x128),aY(0x15b),'#29A500','#67A552','#1F7F00','#4F7F3F','#134C00',aY(0x204),'#092600','#172613','#00FF00','#7FFF7F','#00A500','#52A552',aY(0x1a0),'#3F7F3F','#004C00','#264C26','#002600','#132613','#00FF3F','#7FFF9F',aY(0x18b),aY(0x20c),'#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617',aY(0x219),'#7FFFBF',aY(0x1d2),'#52A57C','#007F3F','#3F7F5F','#004C26','#264C39','#002613','#13261C','#00FFBF','#7FFFDF','#00A57C','#52A591','#007F5F','#3F7F6F','#004C39','#264C42','#00261C','#132621','#00FFFF','#7FFFFF',aY(0x138),aY(0x158),'#007F7F','#3F7F7F','#004C4C','#264C4C',aY(0x21b),'#132626','#00BFFF','#7FDFFF','#007CA5',aY(0x1cb),'#005F7F','#3F6F7F','#00394C','#26424C',aY(0xf4),'#132126',aY(0x175),'#7FBFFF','#0052A5',aY(0x18f),'#003F7F',aY(0x165),aY(0x1a4),'#26394C','#001326','#131C26','#003FFF','#7F9FFF',aY(0x194),'#5267A5',aY(0x1dc),'#3F4F7F','#00134C','#262F4C','#000926','#131726',aY(0x151),'#7F7FFF','#0000A5','#5252A5','#00007F',aY(0xec),'#00004C','#26264C',aY(0x11f),'#131326','#3F00FF',aY(0x1e5),'#2900A5','#6752A5','#1F007F','#4F3F7F','#13004C','#2F264C','#090026','#171326','#7F00FF','#BF7FFF','#5200A5','#7C52A5','#3F007F',aY(0xc7),'#26004C','#39264C',aY(0x170),aY(0x119),'#BF00FF',aY(0xc3),'#7C00A5',aY(0x10a),'#5F007F',aY(0x193),'#39004C','#42264C','#1C0026',aY(0x1f4),aY(0x1c9),aY(0x1f5),'#A500A5',aY(0xe3),'#7F007F','#7F3F7F',aY(0x1b5),'#4C264C','#260026','#261326','#FF00BF','#FF7FDF','#A5007C',aY(0x1f9),'#7F005F','#7F3F6F',aY(0x186),'#4C2642',aY(0x182),'#261321','#FF007F','#FF7FBF','#A50052','#A5527C','#7F003F','#7F3F5F','#4C0026','#4C2639',aY(0xc6),'#26131C','#FF003F','#FF7F9F','#A50029','#A55267','#7F001F','#7F3F4F','#4C0013','#4C262F','#260009','#261317','#333333','#505050','#696969','#828282','#BEBEBE','#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':'#00ff88','measureColor':'#ffaa00','gridColor':aY(0x21d),'crosshairColor':'#555555'},'light':{'backgroundColor':aY(0x20f),'defaultEntityColor':aY(0xfe),'selectionColor':'#0066ff','measureColor':aY(0x160),'gridColor':'#dddddd','crosshairColor':'#cccccc'}};function W(c,d,f){const bN=aY;return[d*c['scale']+c[bN(0xf9)],-f*c['scale']+c['offsetY']];}function q(c,d,f){const bO=aY;return[(d-c['offsetX'])/c['scale'],-(f-c[bO(0x105)])/c['scale']];}function me(c,d){const f=window['devicePixelRatio']||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d['scale']*f,d['offsetX']*f,d['offsetY']*f);}function xt(g,k,m,v,w,x,z=0.05){const A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math['min'](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(c,d,f,g,h=0.0001,k=0x186a0){const bP=aY,l=Math['max'](h,Math[bP(0x21a)](k,c['scale']*g)),m=l/c['scale'];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c['offsetY'])*m};}var yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];['maxScale'];constructor(c){const bQ=aY;this['minScale']=c['minZoom'],this['maxScale']=c[bQ(0x169)];}['getTransform'](){return this['transform'];}['setTransform'](c){this['transform']=c;}['pan'](c,d){this['transform']={...this['transform'],'offsetX':this['transform']['offsetX']+c,'offsetY':this['transform']['offsetY']+d};}['zoom'](c,d,f){const bR=aY;this['transform']=kt(this['transform'],c,d,f,this['minScale'],this[bR(0x17e)]);}};function ge(c,d){return c===0x7?d==='dark'?'#ffffff':'#000000':Ft(c)??'#ffffff';}function se(d,f,g,h){const bS=aY;if(d['trueColor']!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d['trueColor']>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g]['defaultEntityColor'];if(d['color']!==0x100)return ge(d['color'],g);const k=f['get'](d['layer']);if(k){if(k['trueColor']!==void 0x0){const v=k[bS(0xc0)]>>0x10&0xff,w=k['trueColor']>>0x8&0xff,x=k['trueColor']&0xff;return bS(0x1e7)+v+','+w+','+x+')';}const u=Math[bS(0x14f)](k[bS(0xd4)]);return ge(u,g);}return E[g]['defaultEntityColor'];}function Pt(c,d){const bT=aY;c[bT(0xb8)](),c['moveTo'](d[bT(0x1b6)]['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']),c['stroke']();}function wt(c,d){const bU=aY;d['radius']<=0x0||(c['beginPath'](),c['arc'](d['center']['x'],d[bU(0x163)]['y'],d['radius'],0x0,Math['PI']*0x2),c['stroke']());}function It(c,d){const bV=aY;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c[bV(0xb8)](),c['arc'](d[bV(0x163)]['x'],d[bV(0x163)]['y'],d[bV(0x20e)],f,g,!0x1),c[bV(0x18a)]();}function a(){const dE=['#9F7FFF','getBoundingClientRect','rgb(','fillStyle','mouseScreenX','first-point','windows-1251','has','isClosed','getDebugStats','layers','entities','text','BLOCKS','measureText','#211326','#FF7FFF','\x20MB','AutoCAD\x20Binary\x20DXF','leaf','#A55291','height','push','byType','contextmenu','getTransform','emitter','replace','DxfParseError','STANDARD','removeEventListener','#2F4C26','spatialIndexBuildTime','doRender','type','knots','rgba(255,\x20255,\x20255,\x200.85)','lineTypes','off','#52A567','handleMove','radius','#ffffff','startTangent','fillRect','_splitRoot','debugEnabled','\x20/\x20','getEntities','#7F5F3F','renderStats','#FF9F7F','#00FF7F','min','#002626','_insert','#333333','pointerdown','identifier','entityIndex','ensureMap','firstPoint','fill','rowSpacing','POINT','beginPath','associative','guardDestroyed','left','sin','transform','value','addEventListener','trueColor','Load:\x20','parseWithOptionalWorker','#DF7FFF','byteLength','touchstart','#260013','#5F3F7F','_chooseSubtree','#4C4226','compareMinY','endAngle','destroyed','$DWGCODEPAGE','canvas','defPoint5','loadFile','loadedFileSize','columnSpacing','children','color','ENDSEC','state','runConverters','attachmentPoint','DIMENSION','lastDebugStats','debugRafId','search','secondPoint','slice','touches','#A5A552','hypot','\x20\x20Blocks:\x20','#A552A5','clearDocument','buildDebugStats','trim','pan','fontName','#00FFFF','dark','handlePointerMove','#3F3F7F','onPointerMove','obliqueAngle','basePoint','clientX','maxY','#4C4C00','#91A552','#001C26','ELLIPSE','polyline','lineSpacingFactor','setLayerColor','offsetX','object','onPointerUp','onWheel','lastRenderStats','#000000','#7F4F3F','setTransform','select','entityBBoxes','713049XZUxpQ','phase','offsetY','$MEASUREMENT','width','renderer','end','#9152A5','frameTimestamps','bulge','preventDefault','startPan','_minEntries','rgba(0,\x200,\x200,\x200.85)','#261713','big5','backgroundColor','_split','visibleLayerCount','workerManager','textBaseline','_allDistMargin','#1C1326','bind','defPoint3','items','defPoint4','edges','#000026','loadArrayBuffer','blocks','fitToView','pixelSize','onContextMenu','alignmentPoint','drawCalls','16181GQjVQk','#3FFF00','changedTouches','handlePointerUp','viewer','startAngle','extMin','insertionPoint','hAlign','colorOverrides','now','right','layerManager','165359NnXGwO','alphabetic','entries','dwgCodePage','#00A5A5','spline','atan2','tan','onTouchEnd','endpoint','get','formatConverters','scale','pointerId','max','debugOptions','#261300','onPointerDown','defPoint','#A50000','68pKxFaF','blockName','vertices','9HvVAir','top','style','#4C2626','abs','data','#0000FF','midpoint','length','worker','scaleX','#260900','loadGeneration','#52A5A5','13px\x20monospace','euc-kr','#9FFF7F','#4C1300','onTouchMove','code','mouseScreenY','#ff6600','spatialIndex','setTheme','center','terminate','#3F5F7F','decode','windows-1252','currentSnap','maxZoom','minY','_all','toLowerCase','bulges','SPLINE','handleWheel','#130026','577478UnVyQE','HATCH','entitiesDrawn','majorAxis','#007FFF','listeners','LWPOLYLINE','currentTool','CIRCLE','#FF0000','toBBox','compareMinX','setColorOverride','maxScale','handleClick','pending','nextIndex','#26001C','LINE','clear','moveTo','#4C0039','header','Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.','cos','stroke','#00A529','899969FOUwyH','#FFBF7F','camera','#527CA5','getTheme','isPanning','defaultEntityColor','#6F3F7F','#0029A5','lastY','2256184tHntWZ','px\x20','fileSize','lineWidth','endParam','stopDebugLoop','minX','resize','sqrt','lastDoRenderTime','#007F00','isFrozen','ctx','#7F5F00','#00264C','acadVersion','requestRender','TEXT','lastX','fillText','#262600','wheel','size','destroy','layerCount','getVisibleLayerNames','point','rotate','ceil','#A5A500','\x20\x20Pixel:\x20','#4C004C','start','endTangent','handleZoom','options','parseTime','set','strokeStyle','*Model_Space','defPoint2','$INSUNITS','#FFFF00','zoom','measureTool','add','styles','visibility','loadDocument','sort','toFixed','#FF00FF','ccw','#5291A5','lineTo','textDirection','position','75475xDcGgk','controlPoints','6MJoUkD','#00A552','getHeight','maxX','1370JQEdbF','button','_adjustParentBBoxes','showFps','name','#260000','rotation','#001F7F','flags','destroyWorker','\x22Courier\x20New\x22,\x20monospace','#261C13','File:\x20','textAlign','getCursorForTool','doc'];a=function(){return dE;};return a();}function Mt(k,w,z,A,C){const bW=aY,D=z-k,I=A-w,L=Math[bW(0x19e)](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math['abs'](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math[bW(0x13a)](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const bX=aY,l=Mt(d,f,g,h,k);if(l['radius']<1e-10){c['lineTo'](g,h);return;}c['arc'](l['cx'],l['cy'],l['radius'],l[bX(0x12c)],l['endAngle'],l['anticlockwise']);}function Tt(c,d){const bY=aY,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),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 k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c[bY(0x18a)]();}function Et(c,d){const bZ=aY,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c[bZ(0x185)](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f[bZ(0x153)]:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c['stroke']();}function At(c,d){const c0=aY,f=Math['sqrt'](d[c0(0x174)]['x']**0x2+d['majorAxis']['y']**0x2+d[c0(0x174)]['z']**0x2);if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math[c0(0x13a)](d['majorAxis']['y'],d['majorAxis']['x']);c['beginPath'](),c['ellipse'](d[c0(0x163)]['x'],d['center']['y'],f,g,h,d['startParam'],d['endParam'],!0x1),c['stroke']();}function St(k,w,x,z,A){const C=w['length']-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F['push']({...w[M]}),I['push'](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math['abs'](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math['abs'](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){if(g['length']<0x2)return g['map'](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g['length'],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math['max'](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math['min'](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c1=aY;if(d['degree']===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d[c1(0x1d0)][c1(0x153)]===0x0&&d['fitPoints']['length']>=0x2)return Ct(d['fitPoints']);if(d['controlPoints']['length']<d['degree']+0x1)return[];if(d['knots']['length']<d['controlPoints']['length']+d['degree']+0x1)return[];const g=[],k=d[c1(0x208)][d['degree']],m=d['knots'][d['knots']['length']-d['degree']-0x1];if(m<=k)return[];const p=Math[c1(0x142)](d['controlPoints'][c1(0x153)]*0xa,Math['ceil']((m-k)/f)),u=Math['min'](p,0x1388),v=d['weights']['length']>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d['degree'],d['controlPoints'],d['knots'],x,v);g[c1(0x1fb)]({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const c2=aY,g=Ie(d,f);if(!(g['length']<0x2)){c['beginPath'](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c[c2(0x1cc)](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath'](),c['stroke']();}}var Lt={'standard':'Arial,\x20sans-serif','arial':'Arial,\x20sans-serif','arial.ttf':'Arial,\x20sans-serif','romans.shx':aY(0x1df),'simplex.shx':'\x22Courier\x20New\x22,\x20monospace','txt.shx':'monospace','monotxt.shx':'monospace','isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':'\x22Courier\x20New\x22,\x20monospace','times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Me(c){const c3=aY,d=c[c3(0x16c)]()['trim']();return Lt[d]||'sans-serif';}function Nt(d,f,g){const c4=aY;if(!f['text']||f['height']<g*0x4)return;const k=f[c4(0x12f)]!==0x0||f['vAlign']!==0x0,l=k&&f['alignmentPoint']?f[c4(0x125)]['x']:f['insertionPoint']['x'],m=k&&f['alignmentPoint']?f['alignmentPoint']['y']:f[c4(0x12e)]['y'];if(d['save'](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d[c4(0x1b1)](-f['rotation']*Math['PI']/0xb4),f['widthFactor']!==0x1&&d['scale'](f['widthFactor'],0x1),f[c4(0xee)]){const w=Math[c4(0x13b)](f['obliqueAngle']*Math['PI']/0xb4);d[c4(0xbd)](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f['generationFlags']&0x4)!==0x0;p&&d['scale'](-0x1,0x1),u&&d['scale'](0x1,-0x1);const v=Me(f['style']||'Standard');switch(d['font']=f['height']+c4(0x197)+v,f['hAlign']){case 0x0:d['textAlign']='left';break;case 0x1:d['textAlign']='center';break;case 0x2:d['textAlign']='right';break;case 0x3:d['textAlign']='left';break;case 0x4:d['textAlign']=c4(0x163);break;case 0x5:d['textAlign']='left';break;default:d['textAlign']='left';}switch(f['vAlign']){case 0x0:d['textBaseline']='alphabetic';break;case 0x1:d[c4(0x117)]='bottom';break;case 0x2:d['textBaseline']='middle';break;case 0x3:d['textBaseline']='top';break;default:d['textBaseline']=c4(0x135);}d[c4(0x1a9)](f['text'],0x0,0x0),d['restore']();}function Bt(c){const c5=aY;return c['replace'](/\\P/g,'\x0a')['replace'](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')[c5(0x200)](/\\~/g,'\u00a0')['replace'](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')[c5(0xe6)]();}function Xt(g,k,m){const c6=aY;if(!k['text']||k['height']<m*0x4)return;g['save'](),g['translate'](k['insertionPoint']['x'],k['insertionPoint']['y']),g['scale'](0x1,-0x1);const p=k['textDirection']?Math['atan2'](k['textDirection']['y'],k['textDirection']['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g['rotate'](-p);const r=Bt(k['text'])['split']('\x0a'),v=k[c6(0x1fa)]*(k[c6(0xf7)]||1.4),w=Me(k['style']||'Standard');g['font']=k['height']+'px\x20'+w;const x=(k['attachmentPoint']-0x1)%0x3,z=Math['floor']((k['attachmentPoint']-0x1)/0x3),A=[c6(0xbb),'center',c6(0x132)];g['textAlign']=A[x]??'left';let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k[c6(0x1fa)];break;case 0x1:C=k['height']-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g['fillText'](r[F],0x0,C+F*v);g['restore']();}var Yt=0x64;function zt(f,g,k,m=0x0){const c7=aY;if(m>Yt)return null;if(k[c7(0x1ec)](f))return k[c7(0x13e)](f);const p=g['blocks']['get'](f);if(!p)return k['set'](f,null),null;k[c7(0x1bb)](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p['entities']){let F;D[c7(0x207)]==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math['min'](v,F['minX']),w=Math['min'](w,F['minY']),x=Math['max'](x,F['maxX']),z=Math['max'](z,F['maxY']));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k['set'](f,C),C;}function Te(a0,a1,a2,a3=0x0){const c8=aY,a4=zt(a0[c8(0x149)],a1,a2,a3);if(!a4)return null;const a5=a1[c8(0x121)]['get'](a0['blockName']);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4['minY']-a7,ab=a4['maxX']-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['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0[c8(0x12e)]['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['rowCount']);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0[c8(0x224)];aB=Math[c8(0x21a)](aB,aB+aH),aD=Math[c8(0x142)](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[c8(0xbc)](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0['insertionPoint']['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[c8(0x21a)](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[c8(0x142)](0x1,a0['rowCount']);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0[c8(0xd2)],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['min'](ar,ar+aR),as=Math[c8(0x142)](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function Rt(d,f){const c9=aY;let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w['minY']),l=Math[c9(0x142)](l,w['maxX']),m=Math['max'](m,w['maxY']));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){const cb=aY;return c[cb(0x207)]==='INSERT'?Te(c,d,f):B(c);}var Q=null;function Ot(c){const cc=aY,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g[cc(0x1f0)]['length']);for(let i=0x0;i<g['entities']['length'];i++)h[i]=B(g[cc(0x1f0)][i]);d[cc(0x1bb)](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f['length']))return f[d];}function B(c){const cd=aY;switch(c[cd(0x207)]){case'LINE':return{'minX':Math['min'](c['start']['x'],c['end']['x']),'minY':Math['min'](c['start']['y'],c['end']['y']),'maxX':Math['max'](c['start']['x'],c['end']['x']),'maxY':Math['max'](c['start']['y'],c['end']['y'])};case'CIRCLE':return{'minX':c['center']['x']-c['radius'],'minY':c[cd(0x163)]['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c[cd(0x20e)]};case'ARC':return{'minX':c['center']['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c[cd(0x163)]['x']+c['radius'],'maxY':c['center']['y']+c['radius']};case'LWPOLYLINE':case'POLYLINE':{if(c['vertices']['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c['vertices'])d=Math[cd(0x21a)](d,k['x']),f=Math['min'](f,k['y']),g=Math['max'](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math['sqrt'](c['majorAxis']['x']**0x2+c['majorAxis']['y']**0x2);return{'minX':c['center']['x']-l,'minY':c['center']['y']-l,'maxX':c['center']['x']+l,'maxY':c['center']['y']+l};}case'TEXT':return{'minX':c[cd(0x12e)]['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x']+c[cd(0x1fa)]*c['text']['length']*0.6,'maxY':c['insertionPoint']['y']+c['height']};case'MTEXT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y']-c['height'],'maxX':c['insertionPoint']['x']+(c[cd(0x107)]||c['height']*0xa),'maxY':c['insertionPoint']['y']+c['height']};case cd(0x16e):{if(c['controlPoints'][cd(0x153)]===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math[cd(0x21a)](p,w['y']),u=Math['max'](u,w['x']),v=Math['max'](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c[cd(0x1ce)]['y'],'maxX':c['position']['x'],'maxY':c[cd(0x1ce)]['y']};case'INSERT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c[cd(0x12e)]['x'],'maxY':c['insertionPoint']['y']};case'DIMENSION':return c['defPoint']?{'minX':Math[cd(0x21a)](c['defPoint']['x'],c['defPoint2']?.['x']??c['defPoint']['x'],c[cd(0x11b)]?.['x']??c['defPoint']['x']),'minY':Math['min'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y']),'maxX':Math['max'](c['defPoint']['x'],c[cd(0x1be)]?.['x']??c['defPoint']['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'maxY':Math['max'](c[cd(0x146)]['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y'])}:null;case'HATCH':{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c['boundaryPaths'])if(F['vertices']){for(const I of F['vertices'])D=!0x0,x=Math['min'](x,I['x']),z=Math[cd(0x21a)](z,I['y']),A=Math[cd(0x142)](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set(['LINE','ARC','CIRCLE','LWPOLYLINE','POLYLINE',aY(0xf5),aY(0x16e)]);function Ae(c){return $t['has'](c);}function jt(c,d){c['moveTo'](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']);}function qt(c,d){const ce=aY;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['moveTo'](d['center']['x']+d[ce(0x20e)]*Math['cos'](f),d['center']['y']+d['radius']*Math['sin'](f)),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1);}function Ht(c,d){const cf=aY;d['radius']<=0x0||(c[cf(0x185)](d['center']['x']+d[cf(0x20e)],d['center']['y']),c['arc'](d['center']['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2));}function Vt(c,d){const cg=aY,f=d['vertices'];if(f[cg(0x153)]<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 k=f[h],l=f[(h+0x1)%f['length']];Math[cg(0x14f)](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function Ut(c,d){const ch=aY,f=d[ch(0x14a)];if(f[ch(0x153)]<0x2)return;c[ch(0x185)](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f[ch(0x153)]-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[ch(0x153)]],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const ci=aY,g=Math['sqrt'](f[ci(0x174)]['x']**0x2+f['majorAxis']['y']**0x2+f['majorAxis']['z']**0x2);if(g<1e-10||f['minorRatio']<=0x0)return;const h=g*f['minorRatio'],k=Math['atan2'](f['majorAxis']['y'],f['majorAxis']['x']),l=Math['cos'](k),m=Math['sin'](k),p=Math['cos'](f['startParam']),u=Math['sin'](f['startParam']);d['moveTo'](f['center']['x']+g*l*p-h*m*u,f['center']['y']+g*m*p+h*l*u),d['ellipse'](f[ci(0x163)]['x'],f[ci(0x163)]['y'],g,h,k,f['startParam'],f[ci(0x19a)],!0x1);}function Zt(c,d,f){const cj=aY,g=Ie(d,f);if(!(g[cj(0x153)]<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Se(c,d,f){const ck=aY;switch(d['type']){case ck(0x183):jt(c,d);break;case'ARC':qt(c,d);break;case'CIRCLE':Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case'ELLIPSE':Gt(c,d);break;case'SPLINE':Zt(c,d,f);break;}}var Kt=0x64,Qt=0.5;function Ce(k,z,A,I,L,M,N=0x0,X){const cl=aY;if(N>Kt)return;const Y=A['blocks']['get'](z['blockName']);if(!Y)return;const a0=Math['max'](0x1,z['columnCount']),a1=Math[cl(0x142)](0x1,z['rowCount']);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z[cl(0x12e)]['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z['rowSpacing'];k['translate'](a4,a5),z['rotation']&&k[cl(0x1b1)](z['rotation']*Math['PI']/0xb4),k['scale'](z['scaleX'],z['scaleY']),k['translate'](-Y['basePoint']['x'],-Y['basePoint']['y']);const a6=Math['max'](Math['abs'](z[cl(0x155)]),Math['abs'](z['scaleY'])),a7=M/(a6||0x1);let a8=null;const a9=Y['entities'];for(let ab=0x0;ab<a9[cl(0x153)];ab++){const ac=a9[ab];if(ac['type']!=='INSERT'){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math['max'](ag['maxX']-ag['minX'],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A[cl(0x1ef)],L);ac['type']!=='INSERT'&&Ae(ac[cl(0x207)])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k['beginPath'](),k[cl(0x1bc)]=ad,k['lineWidth']=a7),Se(k,ac,a7),X&&(X['byType'][ac[cl(0x207)]]=(X['byType'][ac['type']]??0x0)+0x1)):(a8!==null&&(k['stroke'](),X&&X[cl(0x126)]++,a8=null),k['strokeStyle']=ad,k['fillStyle']=ad,k[cl(0x199)]=a7,ac['type']==='INSERT'?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k['restore']();}}function Jt(d,f,g,k,l,m,p){const cm=aY;if(f['blockName']){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f['defPoint2']&&f['defPoint3']&&(d[cm(0xb8)](),d[cm(0x185)](f['defPoint2']['x'],f['defPoint2']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d['stroke'](),d['beginPath'](),d[cm(0x185)](f['defPoint3']['x'],f['defPoint3']['y']),d['lineTo'](f[cm(0x146)]['x'],f['defPoint']['y']),d['stroke']());}function ea(c,d){const cn=aY;if(d['boundaryPaths']['length']!==0x0){c[cn(0xb8)]();for(const f of d['boundaryPaths'])if(f['type']===cn(0xf6)&&f[cn(0x14a)]&&f['vertices']['length']>0x0){const g=f[cn(0x14a)][0x0];c['moveTo'](g['x'],g['y']);for(let h=0x1;h<f['vertices']['length'];h++){const k=f['vertices'][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f['isClosed']&&c['closePath']();}else{if(f[cn(0x207)]==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u['type']==='line')p===0x0&&c['moveTo'](u['start']['x'],u['start']['y']),c['lineTo'](u['end']['x'],u['end']['y']);else{if(u['type']==='arc'){if(p===0x0){const v=u['center']['x']+u['radius']*Math[cn(0x189)](u['startAngle']*Math['PI']/0xb4),w=u['center']['y']+u['radius']*Math['sin'](u['startAngle']*Math['PI']/0xb4);c['moveTo'](v,w);}c['arc'](u['center']['x'],u['center']['y'],u[cn(0x20e)],u['startAngle']*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u[cn(0x1ca)]);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c[cn(0x223)]('evenodd'),c['globalAlpha']=0x1),c['stroke']();}}function ta(c,d,f){const co=aY,g=f*0x3;c[co(0xb8)](),c['arc'](d['position']['x'],d[co(0x1ce)]['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cp=aY;switch(l&&(l['drawCalls']++,l['byType'][d['type']]=(l['byType'][d[cp(0x207)]]??0x0)+0x1),d['type']){case'LINE':Pt(c,d);break;case cp(0x179):wt(c,d);break;case'ARC':It(c,d);break;case cp(0x177):Tt(c,d);break;case'POLYLINE':Et(c,d);break;case'ELLIPSE':At(c,d);break;case'SPLINE':Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case'INSERT':Ce(c,d,f,g,h,k,0x0,l);break;case'DIMENSION':Jt(c,d,f,g,h,k,l);break;case cp(0x172):ea(c,d);break;case'POINT':ta(c,d,k);break;}}var aa=0.5,na=class{constructor(c){const cq=aY;this['canvas']=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new 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.');this[cq(0x1a2)]=d,this['updateSize']();}['ctx'];['width']=0x0;[aY(0x1fa)]=0x0;['getContext'](){return this['ctx'];}['getWidth'](){const cr=aY;return this[cr(0x107)];}[aY(0x1d3)](){return this['height'];}['updateSize'](){const cs=aY,c=window['devicePixelRatio']||0x1,d=this['canvas'][cs(0x1e6)]();this['width']=d['width'],this['height']=d['height'],this['canvas']['width']=d['width']*c,this['canvas']['height']=d['height']*c;}['render'](k,v,w,x,z,A,C){const cu=aY,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D[cu(0x1e8)]=E[w]['backgroundColor'],D[cu(0x211)](0x0,0x0,this[cu(0x107)],this[cu(0x1fa)]),me(D,v);const L=0x1/v[cu(0x140)];D['lineCap']='round',D['lineJoin']='round';let M=null;for(let N=0x0;N<k[cu(0x1f0)]['length'];N++){const V=k['entities'][N];if(!V['visible']){I['entitiesSkipped']++;continue;}if(!x['has'](V['layer'])){I['entitiesSkipped']++;continue;}if(A&&!A['has'](N)){I['entitiesSkipped']++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v['scale'],a1=(Y['maxY']-Y['minY'])*v['scale'];if(Math['max'](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k['layers'],w);Ae(V['type'])?(X!==M&&(M!==null&&(D['stroke'](),I['drawCalls']++),M=X,D['beginPath'](),D['strokeStyle']=X,D['lineWidth']=L),Se(D,V,L),I['entitiesDrawn']++,I['byType'][V[cu(0x207)]]=(I[cu(0x1fc)][V['type']]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D['lineWidth']=L,I['entitiesDrawn']++,J(D,V,k,v,w,L,I));}if(M!==null&&(D['stroke'](),I['drawCalls']++),z>=0x0&&z<k['entities'][cu(0x153)]){const a2=k['entities'][z];me(D,v),D[cu(0x1bc)]=E[w]['selectionColor'],D['fillStyle']=E[w]['selectionColor'],D[cu(0x199)]=L*0x3,J(D,a2,k,v,w,L);}return I;}['renderEmpty'](c){const cv=aY,d=this['ctx'],f=window['devicePixelRatio']||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c][cv(0x113)],d['fillRect'](0x0,0x0,this['width'],this['height']);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){const cw=aY;return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+'\x20KB':(c/(0x400*0x400))['toFixed'](0x1)+cw(0x1f6);}function oa(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var ia='11px\x20monospace',Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cx=aY;k[cx(0x100)](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x[cx(0x1d8)]&&C[cx(0x1fb)](['FPS:\x20'+v['fps']+'\x20\x20Frame:\x20'+v['frameTime'][cx(0x1c8)](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v['renderStats']['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats'][cx(0x173)]+cx(0x214)+Y+'\x20\x20Calls:\x20'+v[cx(0x217)]['drawCalls']],a1=Object['entries'](v['renderStats']['byType'])['sort'](([,a2],[,a3])=>a3-a2)[cx(0xde)](0x0,0x6)['map'](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0['push'](a1),C['push'](a0);}if(x['showDocumentInfo']){const a2=['Layers:\x20'+v[cx(0x115)]+'\x20/\x20'+v[cx(0x1ae)]+cx(0xe2)+v['blockCount']];v['dxfVersion']&&a2['push']('DXF:\x20'+v['dxfVersion']),v['fileName']&&a2[cx(0x1fb)](cx(0x1e1)+v['fileName']),v['fileSize']>0x0&&a2['push']('Size:\x20'+sa(v[cx(0x198)])),C[cx(0x1fb)](a2);}if(x['showTimings']){const a3=[];v['parseTime']>0x0&&a3[cx(0x1fb)]('Parse:\x20'+v['parseTime'][cx(0x1c8)](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3[cx(0x1fb)]('Index:\x20'+v[cx(0x205)]['toFixed'](0x0)+'ms'),v['totalLoadTime']>0x0&&a3['push'](cx(0xc1)+v['totalLoadTime'][cx(0x1c8)](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v['viewportBounds'];C['push'](['Zoom:\x20'+oa(v[cx(0x1c1)])+cx(0x1b4)+v[cx(0x123)]['toFixed'](0x2),'View:\x20['+a4['minX']['toFixed'](0x0)+',\x20'+a4['minY']['toFixed'](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY']['toFixed'](0x0)+']']);}if(C['length']===0x0)return;k['font']=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D['push']({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D['push']({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k['measureText'](a7['text'])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9['isSeparator']?xe:Fe;let M,N;switch(x['position']){case'top-left':M=S,N=S;break;case'top-right':M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case'bottom-right':M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w==='dark'?'rgba(0,\x200,\x200,\x200.75)':cx(0x209),k[cx(0x211)](M,N,I,L),k['strokeStyle']=w==='dark'?'rgba(255,\x20255,\x20255,\x200.15)':'rgba(0,\x200,\x200,\x200.15)',k['lineWidth']=0x1,k['strokeRect'](M+0.5,N+0.5,I-0x1,L-0x1),k['fillStyle']=w==='dark'?V[cx(0x192)]:cx(0x110),k[cx(0x1e2)]='left',k[cx(0x117)]=cx(0x14c);let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab['text'],M+Z,X),X+=Fe);}var ca=class{['layers']=new Map();['visibility']=new Map();['colorOverrides']=new Map();['visibleCache']=null;['setLayers'](c){const cy=aY;this['layers']=new Map(c),this['visibility']['clear'](),this['colorOverrides'][cy(0x184)](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility']['set'](d,!f['isOff']&&!f['isFrozen']);}['getAllLayers'](){return Array['from'](this['layers']['values']());}['setVisible'](c,d){this['visibility']['set'](c,d),this['visibleCache']=null;}['isVisible'](c){return this['visibility']['get'](c)??!0x0;}[aY(0x17d)](c,d){const cz=aY;this[cz(0x130)]['set'](c,d);}['getColorOverride'](c){return this['colorOverrides']['get'](c);}[aY(0x1af)](){const cA=aY;if(this['visibleCache'])return this['visibleCache'];const c=new Set();for(const [d,f]of this[cA(0x1c5)])f&&c['add'](d);return this['visibleCache']=c,c;}['clear'](){this['layers']['clear'](),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;}},ha=class{['listeners']=new Map();['on'](c,d){const cB=aY;this['listeners']['has'](c)||this[cB(0x176)]['set'](c,new Set()),this[cB(0x176)]['get'](c)['add'](d);}['off'](c,d){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const cC=aY,f=this['listeners'][cC(0x13e)](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){const cD=aY;this['listeners'][cD(0x184)]();}},ua=class{constructor(c,d){const cE=aY;this['canvas']=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this['onPointerUp']=this[cE(0x12a)][cE(0x11a)](this),this['onWheel']=this[cE(0x16f)]['bind'](this),this['onTouchStart']=this['handleTouchStart']['bind'](this),this[cE(0x15d)]=this['handleTouchMove']['bind'](this),this[cE(0x13c)]=this['handleTouchEnd'][cE(0x11a)](this),this[cE(0x124)]=f=>f['preventDefault'](),c[cE(0xbf)](cE(0x21e),this['onPointerDown']),c[cE(0xbf)]('pointermove',this[cE(0xed)]),c['addEventListener']('pointerup',this['onPointerUp']),c['addEventListener'](cE(0x1ab),this[cE(0xfc)],{'passive':!0x1}),c['addEventListener'](cE(0xc5),this['onTouchStart'],{'passive':!0x1}),c[cE(0xbf)]('touchmove',this[cE(0x15d)],{'passive':!0x1}),c['addEventListener']('touchend',this[cE(0x13c)]),c['addEventListener'](cE(0x1fd),this['onContextMenu']);}['isPanning']=!0x1;[aY(0x1a8)]=0x0;['lastY']=0x0;['touches']=new Map();[aY(0x145)];['onPointerMove'];['onPointerUp'];['onWheel'];['onTouchStart'];['onTouchMove'];['onTouchEnd'];['onContextMenu'];[aY(0x1ad)](){const cF=aY;this[cF(0xce)][cF(0x203)]('pointerdown',this['onPointerDown']),this[cF(0xce)]['removeEventListener']('pointermove',this['onPointerMove']),this[cF(0xce)]['removeEventListener']('pointerup',this[cF(0xfb)]),this[cF(0xce)]['removeEventListener'](cF(0x1ab),this['onWheel']),this['canvas']['removeEventListener'](cF(0xc5),this['onTouchStart']),this['canvas']['removeEventListener']('touchmove',this['onTouchMove']),this['canvas']['removeEventListener']('touchend',this['onTouchEnd']),this[cF(0xce)]['removeEventListener'](cF(0x1fd),this['onContextMenu']);}['handlePointerDown'](c){const cG=aY,d=this['viewer']['getTool'](),f=this['canvas']['getBoundingClientRect'](),g=c['clientX']-f['left'],h=c['clientY']-f[cG(0x14c)];c['button']===0x0&&d===cG(0xe7)?this['startPan'](c,g,h):c[cG(0x1d6)]===0x1?this[cG(0x10e)](c,g,h):c['button']===0x0&&(d==='select'||d==='measure')&&this['viewer']['handleClick'](g,h);}[aY(0x10e)](c,d,f){const cH=aY;this['isPanning']=!0x0,this[cH(0x1a8)]=d,this[cH(0x195)]=f,this['canvas']['setPointerCapture'](c[cH(0x141)]),this['canvas']['style']['cursor']='grabbing';}[aY(0xeb)](c){const cI=aY,d=this[cI(0xce)]['getBoundingClientRect'](),f=c['clientX']-d[cI(0xbb)],g=c['clientY']-d['top'];if(this[cI(0x191)]){const h=f-this['lastX'],i=g-this['lastY'];this['lastX']=f,this['lastY']=g,this[cI(0x12b)]['handlePan'](h,i);}else this['viewer']['handleMouseMove'](f,g);}['handlePointerUp'](c){const cJ=aY;this['isPanning']&&(this['isPanning']=!0x1,this['canvas']['releasePointerCapture'](c[cJ(0x141)]),this['canvas']['style']['cursor']=this['viewer']['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cK=aY;c['preventDefault']();const d=this[cK(0xce)]['getBoundingClientRect'](),f=c['clientX']-d['left'],g=c['clientY']-d['top'],h=-Math['sign'](c['deltaY']),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this['viewer']['handleZoom'](f,g,l);}['handleTouchStart'](c){const cL=aY;c[cL(0x10d)]();for(const d of Array['from'](c['changedTouches']))this['touches']['set'](d[cL(0x21f)],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cM=aY;if(d[cM(0x10d)](),this[cM(0xdf)]['size']===0x2&&d['touches']['length']===0x2){const f=d['touches'][0x0],g=d['touches'][0x1],k=Array['from'](this['touches']['values']()),m=Math[cM(0xe1)](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math[cM(0xe1)](f[cM(0xf0)]-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const v=p/m,w=this['canvas']['getBoundingClientRect'](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w['left'],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w['top'],A=(f['clientX']+g[cM(0xf0)])/0x2-w['left'],C=(f['clientY']+g['clientY'])/0x2-w['top'];this['viewer']['handleZoom'](x,z,v),this['viewer']['handlePan'](A-x,C-z);}}else{if(this[cM(0xdf)][cM(0x1ac)]===0x1&&d['touches']['length']===0x1){const D=d['touches'][0x0],F=this[cM(0xdf)]['get'](D['identifier']);F&&this['viewer']['handlePan'](D['clientX']-F['x'],D['clientY']-F['y']);}}for(const I of Array['from'](d[cM(0x129)]))this['touches']['set'](I['identifier'],{'x':I['clientX'],'y':I['clientY']});}['handleTouchEnd'](c){for(const d of Array['from'](c['changedTouches']))this['touches']['delete'](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];['entityBBoxes']=[];['build'](c,d){const cN=aY;this['items']=[],this['entityBBoxes']=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this[cN(0x102)][g]=i,i&&this['items']['push']({...i,'entityIndex':g});}this['tree'][cN(0x184)](),this['tree']['load'](this[cN(0x11c)]);}[aY(0xdc)](c,d,f,g){return this['tree']['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){return this['entityBBoxes'][c]??null;}['getEntityBBoxes'](){return this['entityBBoxes'];}['clear'](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function pa(g,k,m,p,v,w){const cO=aY,x=da/w,z=p[cO(0xdc)](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z['length']-0x1;D>=0x0;D--){const F=z[D],I=m[F[cO(0x220)]];if(!I||!v[cO(0x1ec)](I['layer'])||!I['visible'])continue;const L=ba(g,k,I);L<A&&(A=L,C=F['entityIndex']);}return C;}function ba(d,f,g){const cP=aY;switch(g['type']){case'LINE':return re(d,f,g['start']['x'],g['start']['y'],g['end']['x'],g[cP(0x109)]['y']);case cP(0x179):return ma(d,f,g['center']['x'],g[cP(0x163)]['y'],g['radius']);case'ARC':return ga(d,f,g[cP(0x163)]['x'],g[cP(0x163)]['y'],g['radius'],g['startAngle']*Math['PI']/0xb4,g['endAngle']*Math['PI']/0xb4);case'LWPOLYLINE':case'POLYLINE':{let k=0x1/0x0;const l=g[cP(0x14a)],m=g['closed']?l['length']:l['length']-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l['length']],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case'ELLIPSE':return Fa(d,f,g['center']['x'],g['center']['y'],g[cP(0x174)],g['minorRatio']);case'TEXT':case'MTEXT':{const x=B(g);return x?va(d,f,x['minX'],x['minY'],x['maxX'],x['maxY']):0x1/0x0;}case cP(0x225):return Math[cP(0xe1)](d-g[cP(0x1ce)]['x'],f-g[cP(0x1ce)]['y']);case'SPLINE':{let z=0x1/0x0;const A=g['controlPoints'];for(let C=0x0;C<A['length']-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math['min'](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const cQ=aY,v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math['hypot'](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math['max'](0x0,Math['min'](0x1,z));const A=g+z*v,C=k+z*w;return Math[cQ(0xe1)](d-A,f-C);}function ma(c,d,f,g,h){const cR=aY;return Math['abs'](Math[cR(0xe1)](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cS=aY,w=(Math['atan2'](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math['hypot'](g-m,k-o)-p);const A=Math[cS(0xe1)](g-(m+p*Math[cS(0x189)](u)),k-(o+p*Math['sin'](u))),C=Math['hypot'](g-(m+p*Math['cos'](v)),k-(o+p*Math['sin'](v)));return Math['min'](A,C);}function va(c,d,f,g,h,k){const cT=aY;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[cT(0xe1)](l,m);}function Fa(g,k,v,w,x,z){const cU=aY,A=Math[cU(0x13a)](x['y'],x['x']),C=Math[cU(0x189)](-A),D=Math[cU(0xbc)](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math['sqrt'](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math['hypot'](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math['hypot'](F-X,I-Y);}var xa=class{['state']={'phase':'idle'};['currentSnap']=null;['activate'](){this['state']={'phase':'first-point'},this['currentSnap']=null;}['deactivate'](){this['state']={'phase':'idle'},this['currentSnap']=null;}[aY(0x17f)](d,f,g){const cV=aY,k=g?g['point']:{'x':d,'y':f};switch(this[cV(0xd6)][cV(0x104)]){case cV(0x1ea):return this['state']={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case'second-point':{const l=this[cV(0xd6)][cV(0x222)],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math[cV(0x13a)](u,p)*0xb4/Math['PI'];return this[cV(0xd6)]={'phase':'done','firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case'done':return this['state']={'phase':'second-point','firstPoint':k},null;default:return null;}}['handleMove'](c){this['currentSnap']=c;}};function ke(g,k,m,p,v,w=new Set([aY(0x13d),aY(0x152),'center'])){const cW=aY,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C['entityIndex']];if(!D)continue;const F=C[cW(0x220)];switch(D['type']){case'LINE':{if(w['has']('endpoint')&&(y(z,D['start']['x'],D['start']['y'],'endpoint',F,g,k,x),y(z,D['end']['x'],D['end']['y'],'endpoint',F,g,k,x)),w['has']('midpoint')){const I=(D['start']['x']+D[cW(0x109)]['x'])/0x2,L=(D['start']['y']+D['end']['y'])/0x2;y(z,I,L,'midpoint',F,g,k,x);}break;}case cW(0x179):{if(w[cW(0x1ec)](cW(0x163))&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w['has']('endpoint'))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math['cos'](M),V=D['center']['y']+D['radius']*Math[cW(0xbc)](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has']('center')&&y(z,D[cW(0x163)]['x'],D[cW(0x163)]['y'],'center',F,g,k,x),w['has']('endpoint')){const X=D['startAngle']*Math['PI']/0xb4,Y=D['endAngle']*Math['PI']/0xb4;y(z,D['center']['x']+D[cW(0x20e)]*Math[cW(0x189)](X),D['center']['y']+D['radius']*Math[cW(0xbc)](X),'endpoint',F,g,k,x),y(z,D['center']['x']+D['radius']*Math['cos'](Y),D['center']['y']+D['radius']*Math[cW(0xbc)](Y),'endpoint',F,g,k,x);}break;}case'LWPOLYLINE':case'POLYLINE':{if(w['has']('endpoint')){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],'endpoint',F,g,k,x);}if(w['has']('midpoint'))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D[cW(0x14a)][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,'midpoint',F,g,k,x);}break;}case cW(0xf5):{w['has']('center')&&y(z,D[cW(0x163)]['x'],D['center']['y'],cW(0x163),F,g,k,x);break;}case'TEXT':{w['has'](cW(0x13d))&&y(z,D[cW(0x12e)]['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}case'MTEXT':{w[cW(0x1ec)]('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}}}return z[cW(0x1c7)]((a4,a5)=>Math['hypot'](a4['point']['x']-g,a4[cW(0x1b0)]['y']-k)-Math['hypot'](a5['point']['x']-g,a5['point']['y']-k)),z;}function y(c,d,f,g,h,k,l,m){const cX=aY;Math['hypot'](d-k,f-l)<=m&&c[cX(0x1fb)]({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const cY=aY,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v['currentSnap']){const [D,F]=W(k,v['currentSnap']['point']['x'],v[cY(0x168)]['point']['y']);ya(g,D,F,v['currentSnap']['type'],A['measureColor']);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v[cY(0x168)]){const [a0,a1]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);M=a0,N=a1;}else M=w,N=x;g['strokeStyle']=A['measureColor'],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g[cY(0x185)](I,L),g['lineTo'](M,N),g['stroke'](),g['setLineDash']([]),K(g,I,L,A['measureColor']),K(g,M,N,A['measureColor']);let V,X;v['currentSnap']?(V=v['currentSnap']['point']['x'],X=v['currentSnap']['point']['y']):[V,X]=q(k,w,x);const Y=Math['hypot'](V-C[cY(0x222)]['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C['phase']==='done'){const [a2,a3]=W(k,C['firstPoint']['x'],C['firstPoint']['y']),[a4,a5]=W(k,C['secondPoint']['x'],C[cY(0xdd)]['y']);g['strokeStyle']=A['measureColor'],g['lineWidth']=0x2,g[cY(0xb8)](),g['moveTo'](a2,a3),g['lineTo'](a4,a5),g[cY(0x18a)](),K(g,a2,a3,A['measureColor']),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C['distance'],z);}}function ya(c,d,f,g,h){const cZ=aY;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'midpoint':c['beginPath'](),c['moveTo'](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['closePath'](),c['stroke']();break;case'center':c['beginPath'](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c['beginPath'](),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[cZ(0x1cc)](d-i/0x2,f+i/0x2),c['stroke']();break;}}function K(c,d,f,g){c['fillStyle']=g,c['beginPath'](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c['fill']();}function ye(d,f,g,k,m){const d0=aY,p=k['toFixed'](0x4);d['font']=d0(0x159),d['textAlign']='center',d['textBaseline']='bottom';const v=d[d0(0x1f3)](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v[d0(0x107)]+w*0x2,C=0x12;d[d0(0x1e8)]=m==='dark'?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d[d0(0x211)](x,z,A,C),d['fillStyle']=E[m]['measureColor'],d[d0(0x1a9)](p,f,g-0x6);}var Pa=class{['worker']=null;['blobUrl']=null;['nextId']=0x1;['pending']=new Map();['getWorker'](){const d1=aY;return this[d1(0x154)]?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':'text/javascript'})),this['worker']=new Worker(this['blobUrl']),this['worker']['onmessage']=c=>{const d2=d1,{type:d,id:f,doc:g,message:h}=c[d2(0x150)],i=this['pending']['get'](f);i&&(this['pending']['delete'](f),d==='result'?i['resolve'](this['reviveDocument'](g)):d==='error'&&i['reject'](new Error(h??'Worker\x20parse\x20failed')));},this[d1(0x154)]['onerror']=c=>{const d3=d1,d=new Error(c['message']??'Worker\x20error');for(const [,f]of this[d3(0x180)])f['reject'](d);this['pending'][d3(0x184)](),this['destroyWorker']();},this['worker']);}['parse'](c){return new Promise((d,f)=>{const d4=b,g=this['nextId']++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this['getWorker']();}catch(l){this['pending']['delete'](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this[d4(0x180)]['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}[aY(0x164)](){const d5=aY;this['destroyWorker']();const c=new Error('Worker\x20terminated');for(const [,d]of this['pending'])d['reject'](c);this['pending'][d5(0x184)]();}[aY(0x1de)](){this['worker']&&(this['worker']['terminate'](),this['worker']=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){const d6=aY;return{...c,'layers':this['ensureMap'](c['layers']),'lineTypes':this[d6(0x221)](c[d6(0x20a)]),'styles':this['ensureMap'](c[d6(0x1c4)]),'blocks':this['ensureMap'](c[d6(0x121)])};}['ensureMap'](c){const d7=aY;return c instanceof Map?c:c&&typeof c==d7(0xfa)?new Map(Object[d7(0x136)](c)):new Map();}},wa=class{['canvas'];['renderer'];['camera'];['layerManager'];['emitter'];['spatialIndex'];['measureTool'];['doc']=null;['options'];[aY(0x178)];['inputHandler'];['resizeObserver'];['formatConverters'];['workerManager']=null;['selectedEntityIndex']=-0x1;['renderPending']=!0x1;[aY(0xcc)]=!0x1;[aY(0x157)]=0x0;[aY(0x1e9)]=0x0;[aY(0x15f)]=0x0;[aY(0x213)]=!0x1;[aY(0x143)];['lastRenderStats']=null;['lastDebugStats']=null;[aY(0x10b)]=[];['lastDoRenderTime']=0x0;['lastFrameTime']=0x0;[aY(0x1ba)]=0x0;[aY(0x205)]=0x0;['loadedFileName']=null;['loadedFileSize']=0x0;['debugRafId']=0x0;constructor(c,d){const d8=aY;this['canvas']=c,this[d8(0x1b9)]={'theme':d?.['theme']??d8(0xea),'backgroundColor':d?.[d8(0x113)],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.['zoomSpeed']??1.1,'initialTool':d?.['initialTool']??d8(0xe7)},this['formatConverters']=d?.[d8(0x13f)]??[],d?.['worker']&&(this['workerManager']=new Pa()),d?.['debug']?(this['debugEnabled']=!0x0,this[d8(0x143)]=ne(typeof d['debug']=='boolean'?void 0x0:d['debug'])):this[d8(0x143)]=ne(),this[d8(0x108)]=new na(c),this['camera']=new yt(this['options']),this['layerManager']=new ca(),this['emitter']=new ha(),this[d8(0x161)]=new fa(),this['measureTool']=new xa(),this['currentTool']=this['options']['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this['resizeObserver']['observe'](c),c[d8(0x14d)]['cursor']=this[d8(0x1e3)](this['currentTool']),this['requestRender'](),this['debugEnabled']&&this['startDebugLoop']();}['guardDestroyed'](){if(this['destroyed'])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}async['runConverters'](c){const d9=aY;for(const d of this[d9(0x13f)]){let f=!0x1;try{f=d['detect'](c);}catch{continue;}if(f)return d['convert'](c);}return null;}async[aY(0xd0)](c){const db=aY;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c['name'],this[db(0xd1)]=c[db(0x1ac)];const f=await c['arrayBuffer']();if(this[db(0xcc)]||d!==this[db(0x157)])return;const g=await this[db(0xd7)](f);if(this[db(0xcc)]||d!==this['loadGeneration'])return;const h=performance['now'](),i=g??f;this['doc']=await this[db(0xc2)](i,d),!(this['destroyed']||d!==this[db(0x157)])&&(this['parseTime']=performance['now']()-h,this['onDocumentLoaded']());}async['loadBuffer'](c){const dc=aY;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const f=await this['runConverters'](c);if(this['destroyed']||d!==this['loadGeneration'])return;const g=performance['now'](),h=f??c;this['doc']=await this['parseWithOptionalWorker'](h,d),!(this['destroyed']||d!==this[dc(0x157)])&&(this[dc(0x1ba)]=performance['now']()-g,this['onDocumentLoaded']());}async['parseWithOptionalWorker'](c,d){if(!this['workerManager'])return ae(c);try{return await this['workerManager']['parse'](c);}catch(f){if(this['destroyed']||d!==this['loadGeneration'])return null;throw f;}}[aY(0x1c6)](c){const dd=aY;if(this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=0x0,this[dd(0x1ba)]=0x0,!c||!Array['isArray'](c['entities'])||!(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 df=aY;this[df(0xba)](),++this[df(0x157)],this['loadedFileName']=null,this['loadedFileSize']=c['length'];const d=performance[df(0x131)]();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}[aY(0x120)](c){const dg=aY;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c[dg(0xc4)];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}[aY(0xe4)](){this['guardDestroyed'](),++this['loadGeneration'],this['doc']=null,this['selectedEntityIndex']=-0x1,this['spatialIndex']['clear'](),ve(),this['layerManager']['clear'](),this['measureTool']['deactivate'](),this['requestRender']();}['onDocumentLoaded'](){const dh=aY;if(!this['doc'])return;this[dh(0x133)]['setLayers'](this['doc']['layers']);const c=performance['now']();this['spatialIndex']['build'](this['doc']['entities'],this[dh(0x1e4)]),_t(Ot(this['doc'])),this['spatialIndexBuildTime']=performance['now']()-c,this['selectedEntityIndex']=-0x1,this['measureTool']['deactivate'](),this[dh(0x178)]==='measure'&&this['measureTool']['activate'](),this[dh(0x122)]();}['fitToView'](){const di=aY;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas'][di(0x1e6)]();this[di(0x18e)]['setTransform'](xt(d['width'],d['height'],c['minX'],c['minY'],c['maxX'],c['maxY'])),this['requestRender'](),this['emitter']['emit']('viewchange',this[di(0x18e)][di(0x1fe)]());}['zoomTo'](c){const dj=aY;this['guardDestroyed']();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d[dj(0x1fa)]/0x2,h=c/this[dj(0x18e)][dj(0x1fe)]()['scale'];this['camera']['zoom'](f,g,h),this['requestRender'](),this[dj(0x1ff)]['emit']('viewchange',this[dj(0x18e)]['getTransform']());}['panTo'](c,d){const dk=aY;this['guardDestroyed']();const f=this[dk(0xce)]['getBoundingClientRect'](),g=this['camera'][dk(0x1fe)](),h=c*g['scale']+g['offsetX'],k=-d*g['scale']+g['offsetY'],l=f['width']/0x2-h,m=f['height']/0x2-k;this['camera']['pan'](l,m),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['getViewTransform'](){return{...this['camera']['getTransform']()};}['getZoomSpeed'](){return this['options']['zoomSpeed'];}['getLayers'](){const dl=aY;return this[dl(0x133)]['getAllLayers']();}['setLayerVisible'](c,d){this['guardDestroyed'](),this['layerManager']['setVisible'](c,d),this['requestRender']();}[aY(0xf8)](c,d){this['guardDestroyed'](),this['layerManager']['setColorOverride'](c,d),this['requestRender']();}[aY(0x162)](c){this['guardDestroyed'](),this['options']['theme']=c,this['requestRender']();}[aY(0x190)](){return this['options']['theme'];}['setBackgroundColor'](c){this['guardDestroyed'](),this['options']['backgroundColor']=c,this['requestRender']();}['setTool'](c){const dm=aY;this['guardDestroyed'](),this[dm(0x178)]==='measure'&&c!=='measure'&&this['measureTool']['deactivate'](),this[dm(0x178)]=c,this[dm(0xce)][dm(0x14d)]['cursor']=this['getCursorForTool'](c),c==='measure'&&this['measureTool']['activate'](),c!==dm(0x101)&&(this['selectedEntityIndex']=-0x1),this['requestRender']();}['getTool'](){return this['currentTool'];}['getCursorForTool'](c){switch(c){case'pan':return'grab';case'select':return'crosshair';case'measure':return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){const dn=aY;this['emitter'][dn(0x20b)](c,d);}['getDocument'](){return this['doc'];}[aY(0x215)](){const dp=aY;return this['doc']?.[dp(0x1f0)]??[];}[aY(0x19d)](){this['renderer']['updateSize'](),this['requestRender']();}['destroy'](){const dq=aY;this['destroyed']=!0x0,this[dq(0x19b)](),this['inputHandler']['destroy'](),this['resizeObserver']['disconnect'](),this['renderer']['destroy'](),this['emitter']['removeAllListeners'](),this['spatialIndex']['clear'](),ve(),this['layerManager'][dq(0x184)](),this['workerManager']?.['terminate'](),this[dq(0x116)]=null,this['doc']=null;}['requestRender'](){if(!this['destroyed']){if(this['debugRafId']){this['doRender']();return;}this['renderPending']||(this['renderPending']=!0x0,requestAnimationFrame(()=>{this['renderPending']=!0x1,!this['destroyed']&&this['doRender']();}));}}[aY(0x206)](){const dr=aY;if(!this['doc']){this[dr(0x108)]['renderEmpty'](this[dr(0x1b9)]['theme']);return;}const d=this['camera']['getTransform'](),f=this['renderer']['getWidth'](),g=this[dr(0x108)][dr(0x1d3)](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex'][dr(0xdc)](k['minX'],k['minY'],k[dr(0x1d4)],k['maxY']),p=new Set();for(let x=0x0;x<m['length'];x++)p[dr(0x1c3)](m[x]['entityIndex']);const u=performance['now'](),v=this['renderer']['render'](this['doc'],d,this[dr(0x1b9)]['theme'],this['layerManager']['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex']['getEntityBBoxes']());this['lastFrameTime']=performance['now']()-u,this[dr(0xfd)]=v;const w=performance['now']();for(w-this[dr(0x19f)]>=0x3&&this[dr(0x10b)][dr(0x1fb)](w),this[dr(0x19f)]=w;this['frameTimestamps'][dr(0x153)]>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this['frameTimestamps']['shift']();if(this[dr(0x178)]==='measure'&&this[dr(0x1c2)]['state']['phase']!=='idle'){const z=this['renderer']['getContext']();ka(z,this['camera']['getTransform'](),this['measureTool'],this['mouseScreenX'],this[dr(0x15f)],this['options']['theme']);}if(this['debugEnabled']){const A=this[dr(0x108)]['getContext'](),C=this['buildDebugStats']();this[dr(0xda)]=C,la(A,C,this['options']['theme'],this['debugOptions'],this['renderer']['getWidth'](),this[dr(0x108)]['getHeight']());}}['setDebug'](c){this['guardDestroyed'](),typeof c=='boolean'?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this['debugOptions']=ne(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this['requestRender']());}['startDebugLoop'](){if(this['debugRafId'])return;const c=()=>{const ds=b;if(!this['debugEnabled']||this['destroyed']){this[ds(0xdb)]=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this['debugRafId']=requestAnimationFrame(c);}['stopDebugLoop'](){const du=aY;this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this[du(0xdb)]=0x0);}[aY(0x1ee)](){const dv=aY;return this[dv(0x213)]?this['lastDebugStats']:null;}[aY(0xe5)](){const dw=aY,c=this[dw(0x18e)]['getTransform'](),d=this['renderer']['getWidth'](),f=this['renderer']['getHeight'](),g=this['computeViewportBounds'](c,d,f);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':this['lastRenderStats']??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.['entities']['length']??0x0,'layerCount':this['doc']?.[dw(0x1ef)]['size']??0x0,'visibleLayerCount':this[dw(0x133)]['getVisibleLayerNames']()['size'],'blockCount':this['doc']?.['blocks']['size']??0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this[dw(0x1ba)]+this['spatialIndexBuildTime'],'zoom':c['scale'],'pixelSize':c['scale']>0x0?0x1/c[dw(0x140)]:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this['loadedFileSize'],'dxfVersion':this[dw(0x1e4)]?.['header'][dw(0x1a5)]??null};}['computeViewportBounds'](c,d,f){const dx=aY,[g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math['min'](g,k),'minY':Math[dx(0x21a)](h,l),'maxX':Math['max'](g,k),'maxY':Math['max'](h,l)};}['handlePan'](c,d){const dy=aY;this['camera']['pan'](c,d),this['requestRender'](),this[dy(0x1ff)]['emit']('viewchange',this['camera'][dy(0x1fe)]());}[aY(0x1b8)](c,d,f){const dz=aY;this['camera']['zoom'](c,d,f),this[dz(0x1a6)](),this['emitter']['emit']('viewchange',this['camera'][dz(0x1fe)]());}['handleClick'](c,d){const dA=aY;if(!this['doc'])return;const f=this['camera'][dA(0x1fe)](),[g,h]=q(f,c,d);switch(this['currentTool']){case'select':this['handleSelect'](g,h,c,d);break;case'measure':{const k=ke(g,h,this[dA(0x1e4)]['entities'],this[dA(0x161)],f['scale']),l=k['length']>0x0?k[0x0]:null,m=this['measureTool']['handleClick'](g,h,l);this['requestRender'](),m&&this[dA(0x1ff)]['emit']('measure',m);break;}}}['handleMouseMove'](c,d){const dB=aY;if(this['mouseScreenX']=c,this[dB(0x15f)]=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera']['getTransform'](),[g,h]=q(f,c,d),i=ke(g,h,this['doc']['entities'],this['spatialIndex'],f['scale']);this['measureTool'][dB(0x20d)](i[0x0]??null),this['requestRender']();}}['handleSelect'](c,d,f,g){const dC=aY;if(!this[dC(0x1e4)])return;const h=pa(c,d,this['doc'][dC(0x1f0)],this['spatialIndex'],this[dC(0x133)]['getVisibleLayerNames'](),this[dC(0x18e)]['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){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 dD=aY;return this['doc']?this['doc']['header']['extMin']&&this['doc']['header']['extMax']?{'minX':this['doc']['header']['extMin']['x'],'minY':this['doc'][dD(0x187)]['extMin']['y'],'maxX':this[dD(0x1e4)]['header']['extMax']['x'],'maxY':this['doc']['header']['extMax']['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};
1
+ const b1=b;(function(c,d){const aS=b,e=c();while(!![]){try{const f=parseInt(aS(0x1d8))/0x1+parseInt(aS(0xc8))/0x2+-parseInt(aS(0xb2))/0x3+-parseInt(aS(0x1e4))/0x4+parseInt(aS(0x17b))/0x5+parseInt(aS(0x1df))/0x6*(parseInt(aS(0xdf))/0x7)+-parseInt(aS(0x167))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xa5580));function Pe(g,k,m=0x0,p=g['length']-0x1,v=De){const aT=b;for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math['log'](A),F=0.5*Math['exp'](0x2*D/0x3),I=0.5*Math[aT(0x103)](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math[aT(0x1c2)](m,Math['floor'](k-C*F/A+I)),M=Math['min'](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){const aU=b;this['_maxEntries']=Math['max'](0x4,c),this[aU(0x190)]=Math[aU(0x1c2)](0x2,Math['ceil'](this[aU(0x119)]*0.4)),this['clear']();}['all'](){const aV=b;return this[aV(0x121)](this['data'],[]);}['search'](d){const aW=b;let e=this[aW(0x13d)];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e[aW(0x132)]['length'];k++){const l=e['children'][k],m=e['leaf']?g(l):l;G(d,m)&&(e['leaf']?f[aW(0xef)](l):te(d,m)?this['_all'](l,f):h['push'](l));}e=h['pop']();}return f;}['collides'](c){let d=this['data'];if(!G(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['toBBox'](g):g;if(G(c,h)){if(d['leaf']||te(c,h))return!0x0;e['push'](g);}}d=e['pop']();}return!0x1;}['load'](c){const aX=b;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(0xde)](c['slice'](),0x0,c[aX(0xd8)]-0x1,0x0);if(!this['data'][aX(0x132)]['length'])this['data']=d;else{if(this['data'][aX(0x118)]===d[aX(0x118)])this['_splitRoot'](this['data'],d);else{if(this['data'][aX(0x118)]<d['height']){const f=this[aX(0x13d)];this['data']=d,d=f;}this['_insert'](d,this['data']['height']-d['height']-0x1,!0x0);}}return this;}['insert'](c){return c&&this['_insert'](c,this['data']['height']-0x1),this;}['clear'](){return this['data']=O([]),this;}['remove'](d,e){const aY=b;if(!d)return this;let f=this['data'];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k['length'];){if(f||(f=k['pop'](),u=k[k[aY(0xd8)]-0x1],p=m['pop'](),v=!0x0),f['leaf']){const w=Ne(d,f['children'],e);if(w!==-0x1)return f['children']['splice'](w,0x1),k['push'](f),this['_condense'](k),this;}!v&&!f['leaf']&&te(f,g)?(k['push'](f),m['push'](p),p=0x0,u=f,f=f['children'][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){return c['minX']-d['minX'];}['compareMinY'](c,d){return c['minY']-d['minY'];}['toJSON'](){return this['data'];}['fromJSON'](c){const aZ=b;return this[aZ(0x13d)]=c,this;}['_all'](c,d){const b0=b,e=[];for(;c;)c[b0(0xf6)]?d['push'](...c['children']):e['push'](...c['children']),c=e['pop']();return d;}[b1(0xde)](e,g,k,m){const b2=b1,p=k-g+0x1;let v=this['_maxEntries'],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math['ceil'](Math['log'](p)/Math['log'](v)),v=Math['ceil'](p/Math[b2(0x18b)](v,m-0x1))),w=O([]),w['leaf']=!0x1,w[b2(0x118)]=m;const x=Math['ceil'](p/v),z=x*Math['ceil'](Math['sqrt'](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math['min'](A+z-0x1,k);de(e,A,C,x,this['compareMinY']);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w[b2(0x132)][b2(0xef)](this[b2(0xde)](e,D,F,m-0x1));}}return R(w,this['toBBox']),w;}['_chooseSubtree'](d,e,f,g){for(;g['push'](e),!(e['leaf']||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children']['length'];v++){const w=e['children'][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e['children'][0x0];}return e;}['_insert'](c,d,e){const b3=b1,f=e?c:this['toBBox'](c),g=[],h=this['_chooseSubtree'](f,this[b3(0x13d)],d,g);for(h['children'][b3(0xef)](c),j(h,f);d>=0x0&&g[d]['children']['length']>this['_maxEntries'];)this['_split'](g,d),d--;this['_adjustParentBBoxes'](f,g,d);}['_split'](c,d){const b4=b1,e=c[d],f=e['children']['length'],g=this['_minEntries'];this['_chooseSplitAxis'](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e['children']['splice'](h,e['children']['length']-h));k['height']=e['height'],k['leaf']=e['leaf'],R(e,this['toBBox']),R(k,this['toBBox']),d?c[d-0x1][b4(0x132)]['push'](k):this['_splitRoot'](e,k);}[b1(0x1d5)](c,d){const b5=b1;this['data']=O([c,d]),this['data']['height']=c[b5(0x118)]+0x1,this['data'][b5(0xf6)]=!0x1,R(this['data'],this['toBBox']);}['_chooseSplitIndex'](d,e,f){const b6=b1;let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this[b6(0x18f)]),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b7=b1,f=c['leaf']?this['compareMinX']:Be,g=c[b7(0xf6)]?this['compareMinY']:Xe,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 b8=b1;d['children'][b8(0xf3)](g);const k=this['toBBox'],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d['children'][v];j(m,d['leaf']?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d['leaf']?k(z):z),u+=U(p);}return u;}[b1(0x166)](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}[b1(0xd7)](c){for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children']['length']===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(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 R(c,d){const b9=b1;$(c,0x0,c['children'][b9(0xd8)],d,c);}function $(c,d,f,g,h){h||(h=O(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h['maxX']=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c['leaf']?g(l):l);}return h;}function j(c,d){const bb=b1;return c['minX']=Math['min'](c[bb(0x134)],d[bb(0x134)]),c[bb(0x1db)]=Math['min'](c['minY'],d['minY']),c['maxX']=Math['max'](c['maxX'],d['maxX']),c['maxY']=Math['max'](c[bb(0x17d)],d['maxY']),c;}function Be(c,d){return c['minX']-d['minX'];}function Xe(c,d){return c['minY']-d['minY'];}function ee(c){return(c['maxX']-c['minX'])*(c['maxY']-c['minY']);}function U(c){const bc=b1;return c[bc(0x192)]-c['minX']+(c['maxY']-c['minY']);}function Ye(c,d){const bd=b1;return(Math['max'](d['maxX'],c['maxX'])-Math['min'](d[bd(0x134)],c['minX']))*(Math['max'](d[bd(0x17d)],c['maxY'])-Math['min'](d['minY'],c['minY']));}function ze(c,d){const bf=b1,f=Math[bf(0x1c2)](c['minX'],d['minX']),g=Math['max'](c['minY'],d['minY']),h=Math['min'](c['maxX'],d['maxX']),i=Math[bf(0xf7)](c['maxY'],d['maxY']);return Math[bf(0x1c2)](0x0,h-f)*Math['max'](0x0,i-g);}function te(c,d){const bg=b1;return c['minX']<=d['minX']&&c['minY']<=d[bg(0x1db)]&&d[bg(0x192)]<=c['maxX']&&d['maxY']<=c['maxY'];}function a(){const dC=['#132126','defPoint3','blobUrl','#808080','\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','cos','#4C2600','LINE','addEventListener','#000000','set','clientX','endAngle','radius','done','2801870rnWXTG','debugEnabled','maxY','onmessage','TEXT','VERTEX','lineType','code','name','entitiesSkipped','updateSize','#132600','toFixed','add','fitPoints','#172613','pow','onPointerMove','getWidth','Arial,\x20sans-serif','toBBox','_minEntries','handleSeed','maxX','from','rgba(255,255,255,0.9)','rotation','position','touchstart','debugRafId','handleTouchStart','handlePointerUp','theme','attachmentPoint','defPoint2','elevation','isPanning','#134C00','#39004C','dxfVersion','#A552A5','textBaseline','match','lastRenderStats','renderer','#7F005F','endTangent','worker','fill','color','trueColor','#A55252','map','textMidpoint','disconnect','firstPoint','ltScale','style','dark','arc','#FF00FF','ccw','state','attribs','fontName','isSeparator','contextmenu','vertices','controlPoints','associative','delete','max','getEntityBBox','\x20MB','size','requestRender','#5F3F7F','#A50029','entityBBoxes','atan2','entityIndex','parseWithOptionalWorker','windows-1255','touches','onPointerUp','defPoint4','zoom','#FF003F','getTransform','#42264C','_splitRoot','insertionPoint','destroyed','503372XueqgO','end','#00BFFF','minY','computeViewportBounds','layers','fillRect','104658QpEGBT','renderStats','idle','weights','monospace','3565956QrqnZA','parseTime','restore','devicePixelRatio','selectedEntityIndex','#A500A5','value','header','debug','isFrozen','loadFile','slice','textDirection','moveTo','polyline','entities','midpoint','isClosed','Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.','entitiesDrawn','ellipse','doc','#5F7F00','STYLE','start','runConverters','width','defaultEntityColor','Worker\x20terminated','bulges','setLayers','endpoint','#262113','#264C00','getDocument','build','#3F00FF','getContext','currentSnap','Layers:\x20','panTo','loadArrayBuffer','toLowerCase','#7F4F3F','#002600','lastX','pending','spatialIndexBuildTime','#A55291','knots','windows-1250','ENDBLK','onContextMenu','center','INSERT','removeEventListener','layerManager','hypot','now','1182726YuxRLO','camera','#7FBFFF','extrusion','HATCH','rowSpacing','bigFontName','#211326','lastY','#9F7FFF','#264C42','replace','parse','offsetX','measureTool','startTangent','DIMENSION','#7F007F','text','#004C26','layer','textAlign','1722372CKpgDE','#26264C','loadGeneration','\x20\x20Calls:\x20','setPointerCapture','edges','#092600','mouseScreenX','windows-1252','options','loadedFileSize','hAlign','columnCount','transform','columnSpacing','_condense','length','pointermove','left','#4C0013','#BFFF7F','setLineDash','_build','161ExkLMm','getHeight','trim','alignmentPoint','obliqueAngle','#7FDFFF','#0000FF','#132613','fillStyle','#4F7F3F','touchend','extMax','stroke','#00FFBF','get','Size:\x20','push','defPoint','#003F7F','constantWidth','sort','top','pointerdown','leaf','min','flags','first-point','pointerId','majorAxis','#3F6F7F','blocks','round','strokeStyle','#7FFF7F','BLOCKS','#4C3900','sqrt','secondPoint','onTouchEnd','startParam','guardDestroyed','select','degree','\x22Times\x20New\x20Roman\x22,\x20serif','isArray','scale','scaleX','offsetY','measureColor','#BF00FF','#BFFF00','#7F001F','byteLength','spatialIndex','preventDefault','distance','byType','height','_maxEntries','measureText','#4C4226','resizeObserver','renderEmpty','*Model_Space','handleZoom','CIRCLE','_all','#7C52A5','boundaryPaths','#ffaa00','solidFill','visibility','defPoint5','getEntityBBoxes','#A5527C','#261C00','onDocumentLoaded','ARC','emitter','rgba(0,\x200,\x200,\x200.15)','#7F3F5F','emit','#000026','children','point','minX','beginPath','sin','boolean','windows-1256','nextId','save','#A55267','layerCount','data','pan','currentTool','LWPOLYLINE','charCodeAt','buildDebugStats','fillText','onWheel','canvas','fileSize','\x20/\x20','closed','lastDebugStats','lineTo','CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.','alphabetic','\x22Courier\x20New\x22,\x20monospace','type','#1F7F00','frameTime','#004C4C','pointerup','#FF7F9F','fileName','has','lineWidth','onTouchMove','#00ff88','SPLINE','minorRatio','startAngle','POLYLINE','changedTouches','clientY','ENDSEC','entries','#394C26','closePath','colorOverrides','result','bottom-right','_adjustParentBBoxes','2905136NRMsEe','extMin','rowCount','11px\x20monospace','dimStyle'];a=function(){return dC;};return a();}function G(c,d){return d['minX']<=c['maxX']&&d['minY']<=c['maxY']&&d['maxX']>=c['minX']&&d['maxY']>=c['minY'];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const k=[d,f];for(;k['length'];){if(f=k['pop'](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k['push'](d,l,l,f);}}function Re(d){const bh=b1,f=d['replace'](/\r\n?/g,'\x0a'),g=[],h=f['length'];let k=0x0;for(;k<h;){for(;k<h&&f[bh(0x141)](k)===0xa;)k++;if(k>=h)break;let l=f['indexOf']('\x0a',k);l===-0x1&&(l=h);const m=f['substring'](k,l)['trim']();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f['indexOf']('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f['indexOf']('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)['replace'](/\s+$/,'');k=l+0x1,g[bh(0xef)]({'code':p,'value':u});}return g;}function Oe(c,d,f){const bi=b1;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x9){const h=g['value'];switch(d++,h){case'$ACADVER':d<c['length']&&(f['acadVersion']=c[d]['value'],d++);break;case'$EXTMIN':if(d<c['length']){const i=fe(c,d);f[bi(0x168)]=i['point'],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=fe(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[bi(0x1b3)]=parseFloat(c[d]['value']),d++);break;case'$DWGCODEPAGE':d<c['length']&&(f['dwgCodePage']=c[d]['value'],d++);break;case'$HANDSEED':d<c['length']&&(f[bi(0x191)]=c[d]['value'],d++);break;default:for(;d<c['length']&&c[d]['code']!==0x9&&c[d][bi(0x182)]!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const f={'x':0x0,'y':0x0,'z':0x0};for(;d<c['length'];){const g=c[d]['code'];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d]['value']),d++;else{if(g===0x1e)f['z']=parseFloat(c[d]['value']),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bj=b1;for(;d<c[bj(0xd8)];){const g=c[d];if(g[bj(0x182)]===0x0&&g[bj(0x1ea)]==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']==='TABLE'){if(d++,d>=c[bj(0xd8)])break;const h=c[d][bj(0x1ea)];switch(d++,h){case'LAYER':d=$e(c,d,f[bj(0x1dd)]);break;case'LTYPE':d=je(c,d,f['lineTypes']);break;case'STYLE':d=qe(c,d,f['styles']);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){const bk=b1;for(;d<c[bk(0xd8)];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bl=b1;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g[bl(0x1ea)]==='LAYER'){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c[bl(0xd8)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i[bl(0x1ea)];break;case 0x6:h[bl(0x181)]=i['value'];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h[bl(0xf8)]=parseInt(i[bl(0x1ea)],0xa);break;case 0x172:h['lineWeight']=parseInt(i[bl(0x1ea)],0xa);break;case 0x1a4:h['trueColor']=parseInt(i['value'],0xa);break;}d++;}f['set'](h[bl(0x183)],h);}else d++;}return d;}function je(c,d,f){const bm=b1;for(;d<c['length'];){const g=c[d];if(g[bm(0x182)]===0x0&&g['value']==='ENDTAB')return d+0x1;if(g[bm(0x182)]===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x3:h['description']=i['value'];break;case 0x28:h['totalLength']=parseFloat(i['value']);break;case 0x31:h['pattern']['push'](parseFloat(i[bm(0x1ea)]));break;}d++;}h['name']&&f['set'](h[bm(0x183)],h);}else d++;}return d;}function qe(c,d,f){const bn=b1;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g[bn(0x1ea)]==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']===bn(0x8e)){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c[bn(0xd8)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bn(0x183)]=i['value'];break;case 0x3:h[bn(0x1bb)]=i['value'];break;case 0x4:h[bn(0xb8)]=i['value'];break;case 0x28:h['height']=parseFloat(i[bn(0x1ea)]);break;case 0x29:h['widthFactor']=parseFloat(i['value']);break;case 0x32:h[bn(0xe3)]=parseFloat(i['value']);break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function P(c){const bo=b1,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f[bo(0x182)]){case 0x5:d['handle']=f['value'];break;case 0x8:d['layer']=f['value'];break;case 0x6:d['lineType']=f['value'];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d['visible']=f['value']==='0'||f['value']==='';break;case 0x3e:d['color']=parseInt(f[bo(0x1ea)],0xa);break;case 0x172:d['lineWeight']=parseInt(f['value'],0xa);break;case 0x1a4:d[bo(0x1ad)]=parseInt(f[bo(0x1ea)],0xa);break;case 0xd2:d[bo(0xb5)]['x']=parseFloat(f[bo(0x1ea)]);break;case 0xdc:d['extrusion']['y']=parseFloat(f['value']);break;case 0xe6:d[bo(0xb5)]['z']=parseFloat(f['value']);break;}return d;}function He(c){const d={...P(c),'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['start']['x']=parseFloat(f['value']);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d['start']['z']=parseFloat(f['value']);break;case 0xb:d['end']['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d['end']['z']=parseFloat(f['value']);break;}return d;}function Ve(c){const bp=b1,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f[bp(0x1ea)]);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d[bp(0xac)]['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;}return d;}function Ue(c){const bq=b1,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d[bq(0xac)]['y']=parseFloat(f['value']);break;case 0x1e:d[bq(0xac)]['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;case 0x32:d['startAngle']=parseFloat(f['value']);break;case 0x33:d['endAngle']=parseFloat(f[bq(0x1ea)]);break;}return d;}function Ge(c){const br=b1,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g['code']){case 0x46:d['closed']=(parseInt(g['value'],0xa)&0x1)!==0x0;break;case 0x26:d[br(0x19e)]=parseFloat(g['value']);break;case 0x2b:d[br(0xf2)]=parseFloat(g['value']);break;case 0xa:f&&d['vertices']['push'](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f['startWidth']=parseFloat(g['value']));break;case 0x29:f&&(f['endWidth']=parseFloat(g['value']));break;case 0x2a:f&&(f['bulge']=parseFloat(g['value']));break;}return f&&d['vertices'][br(0xef)](f),d;}function b(c,d){c=c-0x83;const e=a();let f=e[c];return f;}function Ze(c){const bs=b1,d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f[bs(0x182)]){case 0x46:{const g=parseInt(f['value'],0xa);d['closed']=(g&0x1)!==0x0,d['is3d']=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const bu=b1,d={...P(c),'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 f of c)switch(f['code']){case 0xa:d[bu(0xac)]['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0xb:d['majorAxis']['x']=parseFloat(f['value']);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f[bu(0x1ea)]);break;case 0x28:d['minorRatio']=parseFloat(f['value']);break;case 0x29:d['startParam']=parseFloat(f['value']);break;case 0x2a:d['endParam']=parseFloat(f[bu(0x1ea)]);break;}return d;}function Qe(c){const bv=b1,d={...P(c),'type':bv(0x159),'degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h[bv(0x182)]){case 0x46:d['flags']=parseInt(h[bv(0x1ea)],0xa);break;case 0x47:d['degree']=parseInt(h['value'],0xa);break;case 0x28:d['knots'][bv(0xef)](parseFloat(h[bv(0x1ea)]));break;case 0x29:d[bv(0x1e2)]['push'](parseFloat(h['value']));break;case 0xa:f&&d['controlPoints'][bv(0xef)](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h['value']));break;case 0xb:g&&d['fitPoints'][bv(0xef)](g),g={'x':parseFloat(h[bv(0x1ea)]),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h['value']));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d[bv(0xc1)]||(d['startTangent']={'x':0x0,'y':0x0,'z':0x0}),d['startTangent']['x']=parseFloat(h['value']);break;case 0x16:d['startTangent']&&(d['startTangent']['y']=parseFloat(h['value']));break;case 0x20:d['startTangent']&&(d[bv(0xc1)]['z']=parseFloat(h['value']));break;case 0xd:d['endTangent']||(d['endTangent']={'x':0x0,'y':0x0,'z':0x0}),d['endTangent']['x']=parseFloat(h['value']);break;case 0x17:d[bv(0x1a9)]&&(d['endTangent']['y']=parseFloat(h['value']));break;case 0x21:d['endTangent']&&(d['endTangent']['z']=parseFloat(h[bv(0x1ea)]));break;}return f&&d[bv(0x1bf)][bv(0xef)](f),g&&d[bv(0x189)][bv(0xef)](g),d;}function Je(c){const bw=b1,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':'STANDARD','hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f['code']){case 0x1:d['text']=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f[bw(0x1ea)]);break;case 0x14:d['insertionPoint']['y']=parseFloat(f[bw(0x1ea)]);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f[bw(0x1ea)]);break;case 0x15:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['y']=parseFloat(f['value']);break;case 0x1f:d['alignmentPoint']||(d[bw(0xe2)]={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d['height']=parseFloat(f['value']);break;case 0x29:d['widthFactor']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x33:d['obliqueAngle']=parseFloat(f['value']);break;case 0x7:d[bw(0x1b4)]=f[bw(0x1ea)];break;case 0x47:d['generationFlags']=parseInt(f['value'],0xa);break;case 0x48:d['hAlign']=parseInt(f['value'],0xa);break;case 0x49:d['vAlign']=parseInt(f['value'],0xa);break;}return d;}function et(c){const bx=b1,d={...P(c),'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},f=[];for(const g of c)switch(g['code']){case 0x1:f['push'](g['value']);break;case 0x3:f['push'](g['value']);break;case 0x7:d['style']=g['value'];break;case 0xa:d[bx(0x1d6)]['x']=parseFloat(g[bx(0x1ea)]);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:d[bx(0x83)]||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d[bx(0x83)]['x']=parseFloat(g['value']);break;case 0x15:d[bx(0x83)]||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['y']=parseFloat(g[bx(0x1ea)]);break;case 0x1f:d['textDirection']||(d[bx(0x83)]={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['z']=parseFloat(g['value']);break;case 0x28:d['height']=parseFloat(g[bx(0x1ea)]);break;case 0x29:d['width']=parseFloat(g['value']);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g['value']);break;case 0x32:d['rotation']=parseFloat(g['value']);break;case 0x47:d['attachmentPoint']=parseInt(g['value'],0xa);break;case 0x48:d['drawingDirection']=parseInt(g['value'],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g['value'],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d['text']=f['join'](''),d;}function tt(c){const by=b1,d={...P(c),'type':'INSERT','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 f of c)switch(f['code']){case 0x2:d['blockName']=f[by(0x1ea)];break;case 0xa:d['insertionPoint']['x']=parseFloat(f[by(0x1ea)]);break;case 0x14:d['insertionPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f['value']);break;case 0x2a:d['scaleY']=parseFloat(f['value']);break;case 0x2b:d['scaleZ']=parseFloat(f[by(0x1ea)]);break;case 0x2c:d['columnSpacing']=parseFloat(f['value']);break;case 0x2d:d['rowSpacing']=parseFloat(f[by(0x1ea)]);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x46:d['columnCount']=parseInt(f['value'],0xa)||0x1;break;case 0x47:d['rowCount']=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bz=b1,d={...P(c),'type':bz(0xc2),'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 f of c)switch(f['code']){case 0x1:d['textOverride']=f['value'];break;case 0x2:d['blockName']=f['value'];break;case 0x3:d[bz(0x16b)]=f['value'];break;case 0xa:d['defPoint']['x']=parseFloat(f['value']);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['defPoint']['z']=parseFloat(f[bz(0x1ea)]);break;case 0xb:d['textMidpoint']['x']=parseFloat(f['value']);break;case 0x15:d['textMidpoint']['y']=parseFloat(f['value']);break;case 0x1f:d[bz(0x1b0)]['z']=parseFloat(f['value']);break;case 0xd:d[bz(0x19d)]||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['x']=parseFloat(f['value']);break;case 0x17:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x19d)]['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d[bz(0x19d)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['z']=parseFloat(f['value']);break;case 0xe:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['x']=parseFloat(f['value']);break;case 0x18:d['defPoint3']||(d[bz(0x16d)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['y']=parseFloat(f['value']);break;case 0x22:d[bz(0x16d)]||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x16d)]['z']=parseFloat(f['value']);break;case 0xf:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['x']=parseFloat(f[bz(0x1ea)]);break;case 0x19:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['y']=parseFloat(f['value']);break;case 0x23:d['defPoint4']||(d[bz(0x1d0)]={'x':0x0,'y':0x0,'z':0x0}),d[bz(0x1d0)]['z']=parseFloat(f['value']);break;case 0x10:d[bz(0x127)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['y']=parseFloat(f[bz(0x1ea)]);break;case 0x24:d[bz(0x127)]||(d[bz(0x127)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['z']=parseFloat(f['value']);break;case 0x28:d['leaderLength']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x35:d['textRotation']=parseFloat(f[bz(0x1ea)]);break;case 0x46:d['dimType']=parseInt(f['value'],0xa);break;}return d;}function nt(c){const bA=b1,d={...P(c),'type':'HATCH','patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c['length'];){const g=c[f];switch(g['code']){case 0x2:d['patternName']=g['value'];break;case 0x29:d['patternScale']=parseFloat(g[bA(0x1ea)]);break;case 0x34:d['patternAngle']=parseFloat(g[bA(0x1ea)]);break;case 0x46:d[bA(0x125)]=g[bA(0x1ea)]==='1';break;case 0x47:d[bA(0x1c0)]=g['value']==='1';break;case 0x4b:d['hatchStyle']=parseInt(g['value'],0xa);break;case 0x4c:d['patternType']=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g['value'],0xa);f++;for(let k=0x0;k<h&&f<c['length'];k++){const l=rt(c,f);d['boundaryPaths']['push'](l['path']),f=l['nextIndex'];}continue;}}f++;}return d;}function rt(c,d){let f=0x0;return d<c['length']&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bB=b1,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['isClosed']=c[d]['value']==='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]['code']===0xa&&(m['x']=parseFloat(c[d][bB(0x1ea)]),d++),d<c[bB(0xd8)]&&c[d]['code']===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g[bB(0x1be)]['push'](m),h&&d<c['length']&&c[d]['code']===0x2a?(g[bB(0x94)]['push'](parseFloat(c[d]['value'])),d++):h&&g['bulges']['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d]['code']===0x14a);)if(c[d]['code']===0x61){const p=parseInt(c[d]['value'],0xa);d++;for(let u=0x0;u<p&&d<c[bB(0xd8)]&&c[d]['code']===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bC=b1,p={'type':'edges','edges':[],'flags':m};let v=0x0;k<g['length']&&g[k][bC(0x182)]===0x5d&&(v=parseInt(g[k]['value'],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k]['code']===0x48;w++){const x=parseInt(g[k]['value'],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g[bC(0xd8)]&&g[k]['code']===0xa&&(z['start']['x']=parseFloat(g[k][bC(0x1ea)]),k++),k<g[bC(0xd8)]&&g[k][bC(0x182)]===0x14&&(z['start']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z['end']['y']=parseFloat(g[k]['value']),k++),p['edges']['push'](z);break;}case 0x2:{const A={'type':'arc','center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(A['center']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(A['center']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(A['radius']=parseFloat(g[k]['value']),k++),k<g[bC(0xd8)]&&g[k]['code']===0x32&&(A['startAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x33&&(A[bC(0x178)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x49&&(A['ccw']=g[k]['value']==='1',k++),p['edges']['push'](A);break;}case 0x3:{const C={'type':bC(0x8b),'center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g['length']&&g[k][bC(0x182)]===0xa&&(C['center']['x']=parseFloat(g[k][bC(0x1ea)]),k++),k<g['length']&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k][bC(0x1ea)]),k++),k<g['length']&&g[k][bC(0x182)]===0xb&&(C['majorAxis']['x']=parseFloat(g[k]['value']),k++),k<g[bC(0xd8)]&&g[k]['code']===0x15&&(C['majorAxis']['y']=parseFloat(g[k][bC(0x1ea)]),k++),k<g['length']&&g[k]['code']===0x28&&(C[bC(0x15a)]=parseFloat(g[k][bC(0x1ea)]),k++),k<g[bC(0xd8)]&&g[k]['code']===0x32&&(C['startAngle']=parseFloat(g[k]['value']),k++),k<g[bC(0xd8)]&&g[k]['code']===0x33&&(C[bC(0x178)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x49&&(C[bC(0x1b8)]=g[k]['value']==='1',k++),p['edges']['push'](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k]['code']===0x5e&&(D=parseInt(g[k][bC(0x1ea)],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k]['code']===0x4a&&k++;let L=0x0;k<g['length']&&g[k]['code']===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g['length']&&g[k]['code']===0x60&&(M=parseInt(g[k][bC(0x1ea)],0xa),k++);for(let N=0x0;N<L&&k<g['length']&&g[k]['code']===0x28;N++)F['push'](parseFloat(g[k]['value'])),k++;for(let V=0x0;V<M&&k<g['length'];V++){const X={'x':0x0,'y':0x0};g[k][bC(0x182)]===0xa&&(X['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I['push'](X);}p[bC(0xcd)]['push']({'type':'spline','degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k][bC(0x182)]===0x61||g[k]['code']===0x14a);)if(g[k]['code']===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bD=b1,d={...P(c),'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f[bD(0x182)]){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d['position']['y']=parseFloat(f['value']);break;case 0x1e:d['position']['z']=parseFloat(f['value']);break;}return d;}function we(c,d,f){const bE=b1;for(;d<c['length'];){const g=c[d];if(g['code']!==0x0){d++;continue;}const h=g[bE(0x1ea)];if(h==='ENDSEC'||h==='ENDBLK')return d+0x1;d++;const k=[];for(;d<c[bE(0xd8)]&&c[d]['code']!==0x0;)k['push'](c[d]),d++;switch(h){case bE(0x173):f['push'](He(k));break;case'CIRCLE':f['push'](Ve(k));break;case'ARC':f['push'](Ue(k));break;case bE(0x140):f[bE(0xef)](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case'SPLINE':f['push'](Qe(k));break;case'TEXT':f['push'](Je(k));break;case'MTEXT':f[bE(0xef)](et(k));break;case'INSERT':{const l=tt(k);k['some'](m=>m['code']===0x42&&m['value']==='1')&&(d=ct(c,d,l[bE(0x1ba)])),f['push'](l);break;}case'DIMENSION':f['push'](at(k));break;case bE(0xb6):f['push'](nt(k));break;case'POINT':f[bE(0xef)](it(k));break;case bE(0x15c):{const m=Ze(k);d=lt(c,d,m['vertices']),f[bE(0xef)](m);break;}}}return d;}function lt(c,d,f){const bF=b1;for(;d<c[bF(0xd8)];){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===bF(0x180)){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[bF(0x182)]){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i[bF(0x1ea)]);break;case 0x2a:h['bulge']=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i['value']);break;case 0x29:h['endWidth']=parseFloat(i['value']);break;}d++;}f[bF(0xef)](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ct(c,d,f){const bG=b1;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===bG(0xaa))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['text']=i['value'];break;case 0x2:h['tag']=i['value'];break;case 0x7:h['style']=i['value'];break;case 0x8:h['layer']=i['value'];break;case 0xa:h['insertionPoint']['x']=parseFloat(i['value']);break;case 0x14:h['insertionPoint']['y']=parseFloat(i['value']);break;case 0x1e:h[bG(0x1d6)]['z']=parseFloat(i[bG(0x1ea)]);break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x32:h[bG(0x195)]=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]['code']!==0x0;)d++;}}return d;}function ht(c,d,f){const bH=b1;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g[bH(0x1ea)]==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c[bH(0xd8)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];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[bH(0x1ea)],0xa);break;}d++;}d=we(c,d,h['entities']),h['name']&&!h[bH(0x183)]['startsWith'](bH(0x11e))&&!h['name']['startsWith']('*Paper_Space')&&f['set'](h['name'],h);}else d++;}return d;}var pe='AutoCAD\x20Binary\x20DXF',ut={'ANSI_874':'windows-874','ANSI_932':'shift_jis','ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':'big5','ANSI_1250':b1(0xa9),'ANSI_1251':'windows-1251','ANSI_1252':'windows-1252','ANSI_1253':'windows-1253','ANSI_1254':'windows-1254','ANSI_1255':b1(0x1cd),'ANSI_1256':b1(0x138),'ANSI_1257':'windows-1257','ANSI_1258':'windows-1258'},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String['fromCodePoint'](parseInt(f,0x10)));}function pt(d){const bI=b1;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f['slice'](0x0,pe['length']))===pe)throw new T('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let g=new TextDecoder('utf-8')['decode'](d);const h=g['match'](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g[bI(0x1a5)](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??bI(0xd0);k!=='utf-8'&&(g=new TextDecoder(k)['decode'](d));}return be(g);}function bt(c,d){const bJ=b1;for(;d<c['length'];){if(c[d][bJ(0x182)]===0x0&&c[d][bJ(0x1ea)]===bJ(0x15f))return d+0x1;d++;}return d;}function mt(c){const bK=b1;c['layers']['has']('0')||c[bK(0x1dd)][bK(0x176)]('0',{'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function gt(c){const bL=b1;for(const [,d]of c['layers'])d['isOff']=d[bL(0x1ac)]<0x0,d['isOff']&&(d['color']=Math['abs'](d['color'])),d['isFrozen']=(d['flags']&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function ae(c){const bM=b1;if(typeof c=='string'){if(c[bM(0xd8)]===0x0)throw new T(bM(0x89));}else{if(c instanceof ArrayBuffer){if(c[bM(0x113)]===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Re(d);}catch(k){throw new T('Failed\x20to\x20tokenize\x20DXF\x20content.',k);}if(f['length']===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f[bM(0xd8)];){const m=f[l];if(m['code']===0x0&&m['value']==='SECTION'){if(l++,l>=f[bM(0xd8)])break;const o=f[l]['value'];switch(l++,o){case'HEADER':l=Oe(f,l,g['header']);break;case'TABLES':l=_e(f,l,g);break;case bM(0x101):l=ht(f,l,g[bM(0xfd)]);break;case'ENTITIES':l=we(f,l,g['entities']);break;default:l=bt(f,l);break;}}else{if(m[bM(0x182)]===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=['#000000','#FF0000','#FFFF00','#00FF00','#00FFFF','#0000FF','#FF00FF','#FFFFFF',b1(0x16f),'#C0C0C0','#FF0000','#FF7F7F','#A50000',b1(0x1ae),'#7F0000','#7F3F3F','#4C0000','#4C2626','#260000','#261313','#FF3F00','#FF9F7F','#A52900','#A56752','#7F1F00',b1(0xa2),'#4C1300','#4C2F26','#260900','#261713','#FF7F00','#FFBF7F','#A55200','#A57C52','#7F3F00','#7F5F3F',b1(0x172),'#4C3926','#261300','#261C13','#FFBF00','#FFDF7F','#A57C00','#A59152','#7F5F00','#7F6F3F',b1(0x102),b1(0x11b),b1(0x12a),b1(0x97),'#FFFF00','#FFFF7F','#A5A500','#A5A552','#7F7F00','#7F7F3F','#4C4C00','#4C4C26','#262600','#262613',b1(0x111),'#DFFF7F','#7CA500','#91A552',b1(0x8d),'#6F7F3F','#394C00','#424C26','#1C2600','#212613','#7FFF00',b1(0xdc),'#52A500','#7CA552','#3F7F00','#5F7F3F',b1(0x98),b1(0x161),b1(0x186),'#1C2613','#3FFF00','#9FFF7F','#29A500','#67A552',b1(0x14f),b1(0xe8),b1(0x1a0),'#2F4C26',b1(0xce),b1(0x18a),'#00FF00',b1(0x100),'#00A500','#52A552','#007F00','#3F7F3F','#004C00','#264C26',b1(0xa3),b1(0xe6),'#00FF3F','#7FFF9F','#00A529','#52A567','#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617','#00FF7F','#7FFFBF','#00A552','#52A57C','#007F3F','#3F7F5F',b1(0xc5),'#264C39','#002613','#13261C',b1(0xec),'#7FFFDF','#00A57C','#52A591','#007F5F','#3F7F6F','#004C39',b1(0xbc),'#00261C','#132621','#00FFFF','#7FFFFF','#00A5A5','#52A5A5','#007F7F','#3F7F7F',b1(0x151),'#264C4C','#002626','#132626',b1(0x1da),b1(0xe4),'#007CA5','#5291A5','#005F7F',b1(0xfc),'#00394C','#26424C','#001C26',b1(0x16c),'#007FFF',b1(0xb4),'#0052A5','#527CA5',b1(0xf1),'#3F5F7F','#00264C','#26394C','#001326','#131C26','#003FFF','#7F9FFF','#0029A5','#5267A5','#001F7F','#3F4F7F','#00134C','#262F4C','#000926','#131726',b1(0xe5),'#7F7FFF','#0000A5','#5252A5','#00007F','#3F3F7F','#00004C',b1(0xc9),b1(0x131),'#131326',b1(0x9b),b1(0xbb),'#2900A5','#6752A5','#1F007F','#4F3F7F','#13004C','#2F264C','#090026','#171326','#7F00FF','#BF7FFF','#5200A5',b1(0x122),'#3F007F',b1(0x1c7),'#26004C','#39264C','#130026','#1C1326',b1(0x110),'#DF7FFF','#7C00A5','#9152A5','#5F007F','#6F3F7F',b1(0x1a1),b1(0x1d4),'#1C0026',b1(0xb9),b1(0x1b7),'#FF7FFF',b1(0x1e9),b1(0x1a3),b1(0xc3),'#7F3F7F','#4C004C','#4C264C','#260026','#261326','#FF00BF','#FF7FDF','#A5007C',b1(0xa7),b1(0x1a8),'#7F3F6F','#4C0039','#4C2642','#26001C','#261321','#FF007F','#FF7FBF','#A50052',b1(0x129),'#7F003F',b1(0x12f),'#4C0026','#4C2639','#260013','#26131C',b1(0x1d2),b1(0x153),b1(0x1c8),b1(0x13b),b1(0x112),'#7F3F4F',b1(0xdb),'#4C262F','#260009','#261317','#333333','#505050','#696969','#828282','#BEBEBE','#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':b1(0x158),'measureColor':b1(0x124),'gridColor':'#333333','crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':b1(0x175),'selectionColor':'#0066ff','measureColor':'#ff6600','gridColor':'#dddddd','crosshairColor':'#cccccc'}};function W(c,d,f){return[d*c['scale']+c['offsetX'],-f*c['scale']+c['offsetY']];}function q(c,d,f){const bN=b1;return[(d-c['offsetX'])/c['scale'],-(f-c[bN(0x10e)])/c['scale']];}function me(c,d){const f=window['devicePixelRatio']||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d['scale']*f,d['offsetX']*f,d['offsetY']*f);}function xt(g,k,m,v,w,x,z=0.05){const bO=b1,A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math[bO(0xf7)](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(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 yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];['maxScale'];constructor(c){this['minScale']=c['minZoom'],this['maxScale']=c['maxZoom'];}['getTransform'](){return this['transform'];}['setTransform'](c){this['transform']=c;}['pan'](c,d){const bP=b1;this['transform']={...this[bP(0xd5)],'offsetX':this['transform']['offsetX']+c,'offsetY':this[bP(0xd5)]['offsetY']+d};}['zoom'](c,d,f){const bQ=b1;this['transform']=kt(this[bQ(0xd5)],c,d,f,this['minScale'],this['maxScale']);}};function ge(c,d){return c===0x7?d==='dark'?'#ffffff':'#000000':Ft(c)??'#ffffff';}function se(d,f,g,h){const bR=b1;if(d['trueColor']!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d['trueColor']>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g]['defaultEntityColor'];if(d['color']!==0x100)return ge(d['color'],g);const k=f['get'](d['layer']);if(k){if(k['trueColor']!==void 0x0){const v=k['trueColor']>>0x10&0xff,w=k[bR(0x1ad)]>>0x8&0xff,x=k['trueColor']&0xff;return'rgb('+v+','+w+','+x+')';}const u=Math['abs'](k['color']);return ge(u,g);}return E[g][bR(0x92)];}function Pt(c,d){const bS=b1;c['beginPath'](),c['moveTo'](d[bS(0x8f)]['x'],d[bS(0x8f)]['y']),c['lineTo'](d['end']['x'],d['end']['y']),c[bS(0xeb)]();}function wt(c,d){const bT=b1;d['radius']<=0x0||(c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2),c[bT(0xeb)]());}function It(c,d){const bU=b1;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d[bU(0x178)]*Math['PI']/0xb4;c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1),c['stroke']();}function Mt(k,w,z,A,C){const bV=b1,D=z-k,I=A-w,L=Math[bV(0x103)](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math['abs'](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math['atan2'](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const bW=b1,l=Mt(d,f,g,h,k);if(l['radius']<1e-10){c[bW(0x14a)](g,h);return;}c['arc'](l['cx'],l['cy'],l['radius'],l['startAngle'],l['endAngle'],l['anticlockwise']);}function Tt(c,d){const bX=b1,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d[bX(0x148)]?f[bX(0xd8)]:f[bX(0xd8)]-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c['stroke']();}function Et(c,d){const bY=b1,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),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 k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c[bY(0xeb)]();}function At(c,d){const bZ=b1,f=Math['sqrt'](d['majorAxis']['x']**0x2+d[bZ(0xfb)]['y']**0x2+d['majorAxis']['z']**0x2);if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d['majorAxis']['y'],d['majorAxis']['x']);c['beginPath'](),c[bZ(0x8b)](d['center']['x'],d['center']['y'],f,g,h,d[bZ(0x106)],d['endParam'],!0x1),c['stroke']();}function St(k,w,x,z,A){const C=w['length']-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F['push']({...w[M]}),I['push'](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math['abs'](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math['abs'](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){const c0=b1;if(g['length']<0x2)return g[c0(0x1af)](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g['length'],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math['max'](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math[c0(0xf7)](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c1=b1;if(d[c1(0x109)]===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d['controlPoints']['length']===0x0&&d['fitPoints']['length']>=0x2)return Ct(d[c1(0x189)]);if(d['controlPoints'][c1(0xd8)]<d['degree']+0x1)return[];if(d[c1(0xa8)][c1(0xd8)]<d[c1(0x1bf)][c1(0xd8)]+d['degree']+0x1)return[];const g=[],k=d['knots'][d['degree']],m=d['knots'][d[c1(0xa8)]['length']-d['degree']-0x1];if(m<=k)return[];const p=Math['max'](d['controlPoints']['length']*0xa,Math['ceil']((m-k)/f)),u=Math['min'](p,0x1388),v=d[c1(0x1e2)]['length']>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d[c1(0x109)],d['controlPoints'],d['knots'],x,v);g['push']({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const c2=b1,g=Ie(d,f);if(!(g['length']<0x2)){c['beginPath'](),c[c2(0x84)](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c[c2(0x162)](),c['stroke']();}}var Lt={'standard':'Arial,\x20sans-serif','arial':b1(0x18e),'arial.ttf':'Arial,\x20sans-serif','romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':b1(0x14d),'txt.shx':'monospace','monotxt.shx':b1(0x1e3),'isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':b1(0x14d),'times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':b1(0x10a),'gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Me(c){const c3=b1,d=c[c3(0xa1)]()[c3(0xe1)]();return Lt[d]||'sans-serif';}function Nt(d,f,g){const c4=b1;if(!f['text']||f['height']<g*0x4)return;const k=f['hAlign']!==0x0||f['vAlign']!==0x0,l=k&&f['alignmentPoint']?f['alignmentPoint']['x']:f['insertionPoint']['x'],m=k&&f['alignmentPoint']?f['alignmentPoint']['y']:f[c4(0x1d6)]['y'];if(d['save'](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d['rotate'](-f['rotation']*Math['PI']/0xb4),f['widthFactor']!==0x1&&d['scale'](f['widthFactor'],0x1),f['obliqueAngle']){const w=Math['tan'](f[c4(0xe3)]*Math['PI']/0xb4);d['transform'](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f['generationFlags']&0x4)!==0x0;p&&d['scale'](-0x1,0x1),u&&d[c4(0x10c)](0x1,-0x1);const v=Me(f['style']||'Standard');switch(d['font']=f['height']+'px\x20'+v,f[c4(0xd3)]){case 0x0:d['textAlign']='left';break;case 0x1:d['textAlign']='center';break;case 0x2:d[c4(0xc7)]='right';break;case 0x3:d['textAlign']='left';break;case 0x4:d['textAlign']='center';break;case 0x5:d['textAlign']='left';break;default:d['textAlign']='left';}switch(f['vAlign']){case 0x0:d[c4(0x1a4)]=c4(0x14c);break;case 0x1:d['textBaseline']='bottom';break;case 0x2:d['textBaseline']='middle';break;case 0x3:d['textBaseline']='top';break;default:d['textBaseline']=c4(0x14c);}d['fillText'](f['text'],0x0,0x0),d['restore']();}function Bt(c){const c5=b1;return c[c5(0xbd)](/\\P/g,'\x0a')[c5(0xbd)](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')['replace'](/\\~/g,'\u00a0')['replace'](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Xt(g,k,m){const c6=b1;if(!k[c6(0xc4)]||k[c6(0x118)]<m*0x4)return;g[c6(0x13a)](),g['translate'](k['insertionPoint']['x'],k[c6(0x1d6)]['y']),g['scale'](0x1,-0x1);const p=k['textDirection']?Math['atan2'](k[c6(0x83)]['y'],k[c6(0x83)]['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g['rotate'](-p);const r=Bt(k['text'])['split']('\x0a'),v=k['height']*(k['lineSpacingFactor']||1.4),w=Me(k['style']||'Standard');g['font']=k['height']+'px\x20'+w;const x=(k[c6(0x19c)]-0x1)%0x3,z=Math['floor']((k['attachmentPoint']-0x1)/0x3),A=['left','center','right'];g['textAlign']=A[x]??'left';let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k['height'];break;case 0x1:C=k[c6(0x118)]-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g['fillText'](r[F],0x0,C+F*v);g['restore']();}var Yt=0x64;function zt(f,g,k,m=0x0){const c7=b1;if(m>Yt)return null;if(k['has'](f))return k['get'](f);const p=g['blocks']['get'](f);if(!p)return k['set'](f,null),null;k['set'](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p['entities']){let F;D['type']==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math['min'](v,F['minX']),w=Math['min'](w,F['minY']),x=Math['max'](x,F['maxX']),z=Math['max'](z,F['maxY']));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k[c7(0x176)](f,C),C;}function Te(a0,a1,a2,a3=0x0){const c8=b1,a4=zt(a0['blockName'],a1,a2,a3);if(!a4)return null;const a5=a1['blocks'][c8(0xed)](a0['blockName']);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4[c8(0x134)]-a6,a9=a4['minY']-a7,ab=a4['maxX']-a6,ac=a4['maxY']-a7;const ad=a0[c8(0x10d)],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['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0['insertionPoint']['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math[c8(0x1c2)](0x1,a0['columnCount']),aG=Math['max'](0x1,a0[c8(0x169)]);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0[c8(0xd6)],aI=(aG-0x1)*a0['rowSpacing'];aB=Math['min'](aB,aB+aH),aD=Math[c8(0x1c2)](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['sin'](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0['insertionPoint']['x'],ap=a0[c8(0x1d6)]['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[c8(0x1c2)](as,aK),au=Math[c8(0x1c2)](au,aL);}const av=Math[c8(0x1c2)](0x1,a0[c8(0xd4)]),aw=Math['max'](0x1,a0['rowCount']);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[c8(0xf7)](aq,aq+aQ),ar=Math['min'](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 Rt(d,f){const c9=b1;let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w['minY']),l=Math[c9(0x1c2)](l,w['maxX']),m=Math['max'](m,w['maxY']));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){const cb=b1;return c['type']===cb(0xad)?Te(c,d,f):B(c);}var Q=null;function Ot(c){const cc=b1,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g['entities']['length']);for(let i=0x0;i<g['entities'][cc(0xd8)];i++)h[i]=B(g['entities'][i]);d['set'](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){const cd=b1;if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f[cd(0xd8)]))return f[d];}function B(c){const ce=b1;switch(c[ce(0x14e)]){case'LINE':return{'minX':Math[ce(0xf7)](c['start']['x'],c['end']['x']),'minY':Math['min'](c['start']['y'],c['end']['y']),'maxX':Math['max'](c[ce(0x8f)]['x'],c['end']['x']),'maxY':Math['max'](c['start']['y'],c['end']['y'])};case ce(0x120):return{'minX':c['center']['x']-c['radius'],'minY':c[ce(0xac)]['y']-c[ce(0x179)],'maxX':c[ce(0xac)]['x']+c['radius'],'maxY':c[ce(0xac)]['y']+c['radius']};case'ARC':return{'minX':c[ce(0xac)]['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c[ce(0xac)]['y']+c['radius']};case'LWPOLYLINE':case'POLYLINE':{if(c['vertices']['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c['vertices'])d=Math['min'](d,k['x']),f=Math['min'](f,k['y']),g=Math['max'](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math['sqrt'](c['majorAxis']['x']**0x2+c['majorAxis']['y']**0x2);return{'minX':c['center']['x']-l,'minY':c['center']['y']-l,'maxX':c[ce(0xac)]['x']+l,'maxY':c[ce(0xac)]['y']+l};}case'TEXT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x']+c['height']*c[ce(0xc4)]['length']*0.6,'maxY':c['insertionPoint']['y']+c['height']};case'MTEXT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y']-c['height'],'maxX':c['insertionPoint']['x']+(c['width']||c['height']*0xa),'maxY':c['insertionPoint']['y']+c['height']};case ce(0x159):{if(c['controlPoints']['length']===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math['min'](p,w['y']),u=Math['max'](u,w['x']),v=Math['max'](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c['position']['y'],'maxX':c[ce(0x196)]['x'],'maxY':c['position']['y']};case ce(0xad):return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x'],'maxY':c['insertionPoint']['y']};case'DIMENSION':return c['defPoint']?{'minX':Math[ce(0xf7)](c['defPoint']['x'],c[ce(0x19d)]?.['x']??c[ce(0xf0)]['x'],c[ce(0x16d)]?.['x']??c['defPoint']['x']),'minY':Math[ce(0xf7)](c['defPoint']['y'],c[ce(0x19d)]?.['y']??c[ce(0xf0)]['y'],c[ce(0x16d)]?.['y']??c['defPoint']['y']),'maxX':Math['max'](c['defPoint']['x'],c['defPoint2']?.['x']??c['defPoint']['x'],c[ce(0x16d)]?.['x']??c['defPoint']['x']),'maxY':Math['max'](c['defPoint']['y'],c[ce(0x19d)]?.['y']??c['defPoint']['y'],c[ce(0x16d)]?.['y']??c['defPoint']['y'])}:null;case ce(0xb6):{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c['boundaryPaths'])if(F[ce(0x1be)]){for(const I of F['vertices'])D=!0x0,x=Math['min'](x,I['x']),z=Math['min'](z,I['y']),A=Math['max'](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set(['LINE',b1(0x12c),'CIRCLE','LWPOLYLINE',b1(0x15c),'ELLIPSE','SPLINE']);function Ae(c){return $t['has'](c);}function jt(c,d){const cf=b1;c['moveTo'](d['start']['x'],d['start']['y']),c['lineTo'](d[cf(0x1d9)]['x'],d[cf(0x1d9)]['y']);}function qt(c,d){const cg=b1;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c[cg(0x84)](d['center']['x']+d[cg(0x179)]*Math['cos'](f),d['center']['y']+d['radius']*Math[cg(0x136)](f)),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1);}function Ht(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 Vt(c,d){const ch=b1,f=d['vertices'];if(f[ch(0xd8)]<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 k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function Ut(c,d){const ci=b1,f=d['vertices'];if(f[ci(0xd8)]<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 k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const cj=b1,g=Math[cj(0x103)](f['majorAxis']['x']**0x2+f['majorAxis']['y']**0x2+f['majorAxis']['z']**0x2);if(g<1e-10||f['minorRatio']<=0x0)return;const h=g*f['minorRatio'],k=Math[cj(0x1ca)](f[cj(0xfb)]['y'],f[cj(0xfb)]['x']),l=Math['cos'](k),m=Math[cj(0x136)](k),p=Math['cos'](f['startParam']),u=Math['sin'](f['startParam']);d['moveTo'](f[cj(0xac)]['x']+g*l*p-h*m*u,f[cj(0xac)]['y']+g*m*p+h*l*u),d['ellipse'](f['center']['x'],f['center']['y'],g,h,k,f['startParam'],f['endParam'],!0x1);}function Zt(c,d,f){const ck=b1,g=Ie(d,f);if(!(g['length']<0x2)){c[ck(0x84)](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g[ck(0xd8)];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Se(c,d,f){const cl=b1;switch(d['type']){case'LINE':jt(c,d);break;case'ARC':qt(c,d);break;case cl(0x120):Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case'ELLIPSE':Gt(c,d);break;case'SPLINE':Zt(c,d,f);break;}}var Kt=0x64,Qt=0.5;function Ce(k,z,A,I,L,M,N=0x0,X){const cm=b1;if(N>Kt)return;const Y=A[cm(0xfd)]['get'](z['blockName']);if(!Y)return;const a0=Math[cm(0x1c2)](0x1,z['columnCount']),a1=Math[cm(0x1c2)](0x1,z['rowCount']);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z['insertionPoint']['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z[cm(0xb7)];k['translate'](a4,a5),z[cm(0x195)]&&k['rotate'](z['rotation']*Math['PI']/0xb4),k['scale'](z['scaleX'],z['scaleY']),k['translate'](-Y['basePoint']['x'],-Y['basePoint']['y']);const a6=Math['max'](Math['abs'](z['scaleX']),Math['abs'](z['scaleY'])),a7=M/(a6||0x1);let a8=null;const a9=Y['entities'];for(let ab=0x0;ab<a9['length'];ab++){const ac=a9[ab];if(ac['type']!==cm(0xad)){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math['max'](ag['maxX']-ag[cm(0x134)],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A['layers'],L);ac['type']!=='INSERT'&&Ae(ac[cm(0x14e)])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k['beginPath'](),k['strokeStyle']=ad,k['lineWidth']=a7),Se(k,ac,a7),X&&(X['byType'][ac['type']]=(X['byType'][ac['type']]??0x0)+0x1)):(a8!==null&&(k['stroke'](),X&&X['drawCalls']++,a8=null),k['strokeStyle']=ad,k['fillStyle']=ad,k['lineWidth']=a7,ac[cm(0x14e)]===cm(0xad)?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k[cm(0x1e6)]();}}function Jt(d,f,g,k,l,m,p){const cn=b1;if(f['blockName']){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f['defPoint2']&&f['defPoint3']&&(d[cn(0x135)](),d['moveTo'](f['defPoint2']['x'],f[cn(0x19d)]['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d[cn(0xeb)](),d['beginPath'](),d['moveTo'](f['defPoint3']['x'],f['defPoint3']['y']),d[cn(0x14a)](f['defPoint']['x'],f['defPoint']['y']),d['stroke']());}function ea(c,d){const co=b1;if(d[co(0x123)]['length']!==0x0){c[co(0x135)]();for(const f of d[co(0x123)])if(f['type']===co(0x85)&&f['vertices']&&f[co(0x1be)]['length']>0x0){const g=f['vertices'][0x0];c[co(0x84)](g['x'],g['y']);for(let h=0x1;h<f['vertices'][co(0xd8)];h++){const k=f['vertices'][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f[co(0x88)]&&c['closePath']();}else{if(f[co(0x14e)]==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u['type']==='line')p===0x0&&c['moveTo'](u['start']['x'],u['start']['y']),c['lineTo'](u['end']['x'],u['end']['y']);else{if(u['type']==='arc'){if(p===0x0){const v=u['center']['x']+u['radius']*Math[co(0x171)](u['startAngle']*Math['PI']/0xb4),w=u['center']['y']+u['radius']*Math['sin'](u['startAngle']*Math['PI']/0xb4);c['moveTo'](v,w);}c[co(0x1b6)](u[co(0xac)]['x'],u['center']['y'],u['radius'],u['startAngle']*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u['ccw']);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c['fill']('evenodd'),c['globalAlpha']=0x1),c['stroke']();}}function ta(c,d,f){const cp=b1,g=f*0x3;c['beginPath'](),c[cp(0x1b6)](d[cp(0x196)]['x'],d[cp(0x196)]['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cq=b1;switch(l&&(l['drawCalls']++,l[cq(0x117)][d['type']]=(l['byType'][d['type']]??0x0)+0x1),d[cq(0x14e)]){case'LINE':Pt(c,d);break;case cq(0x120):wt(c,d);break;case'ARC':It(c,d);break;case'LWPOLYLINE':Tt(c,d);break;case'POLYLINE':Et(c,d);break;case'ELLIPSE':At(c,d);break;case'SPLINE':Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case'INSERT':Ce(c,d,f,g,h,k,0x0,l);break;case cq(0xc2):Jt(c,d,f,g,h,k,l);break;case'HATCH':ea(c,d);break;case'POINT':ta(c,d,k);break;}}var aa=0.5,na=class{constructor(c){this['canvas']=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new 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.');this['ctx']=d,this['updateSize']();}['ctx'];['width']=0x0;['height']=0x0;[b1(0x9c)](){return this['ctx'];}[b1(0x18d)](){return this['width'];}[b1(0xe0)](){return this['height'];}[b1(0x185)](){const cr=b1,c=window['devicePixelRatio']||0x1,d=this['canvas']['getBoundingClientRect']();this['width']=d['width'],this[cr(0x118)]=d['height'],this['canvas']['width']=d[cr(0x91)]*c,this['canvas']['height']=d['height']*c;}['render'](k,v,w,x,z,A,C){const cs=b1,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D['fillStyle']=E[w]['backgroundColor'],D[cs(0x1de)](0x0,0x0,this['width'],this[cs(0x118)]),me(D,v);const L=0x1/v['scale'];D['lineCap']='round',D['lineJoin']=cs(0xfe);let M=null;for(let N=0x0;N<k[cs(0x86)]['length'];N++){const V=k[cs(0x86)][N];if(!V['visible']){I['entitiesSkipped']++;continue;}if(!x['has'](V[cs(0xc6)])){I['entitiesSkipped']++;continue;}if(A&&!A[cs(0x155)](N)){I[cs(0x184)]++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v['scale'],a1=(Y['maxY']-Y['minY'])*v['scale'];if(Math['max'](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k[cs(0x1dd)],w);Ae(V['type'])?(X!==M&&(M!==null&&(D[cs(0xeb)](),I['drawCalls']++),M=X,D[cs(0x135)](),D['strokeStyle']=X,D[cs(0x156)]=L),Se(D,V,L),I['entitiesDrawn']++,I['byType'][V['type']]=(I['byType'][V['type']]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D[cs(0x156)]=L,I[cs(0x8a)]++,J(D,V,k,v,w,L,I));}if(M!==null&&(D['stroke'](),I['drawCalls']++),z>=0x0&&z<k['entities'][cs(0xd8)]){const a2=k['entities'][z];me(D,v),D['strokeStyle']=E[w]['selectionColor'],D['fillStyle']=E[w]['selectionColor'],D['lineWidth']=L*0x3,J(D,a2,k,v,w,L);}return I;}[b1(0x11d)](c){const cu=b1,d=this['ctx'],f=window[cu(0x1e7)]||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c]['backgroundColor'],d['fillRect'](0x0,0x0,this['width'],this['height']);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){const cv=b1;return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+'\x20KB':(c/(0x400*0x400))['toFixed'](0x1)+cv(0x1c4);}function oa(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var ia=b1(0x16a),Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cw=b1;k['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x['showFps']&&C['push'](['FPS:\x20'+v['fps']+'\x20\x20Frame:\x20'+v[cw(0x150)]['toFixed'](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v[cw(0x1e0)]['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats']['entitiesDrawn']+cw(0x147)+Y+cw(0xcb)+v['renderStats']['drawCalls']],a1=Object['entries'](v['renderStats']['byType'])['sort'](([,a2],[,a3])=>a3-a2)[cw(0x1ef)](0x0,0x6)['map'](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0[cw(0xef)](a1),C['push'](a0);}if(x['showDocumentInfo']){const a2=[cw(0x9e)+v['visibleLayerCount']+'\x20/\x20'+v[cw(0x13c)]+'\x20\x20Blocks:\x20'+v['blockCount']];v['dxfVersion']&&a2['push']('DXF:\x20'+v[cw(0x1a2)]),v['fileName']&&a2['push']('File:\x20'+v[cw(0x154)]),v[cw(0x146)]>0x0&&a2[cw(0xef)](cw(0xee)+sa(v['fileSize'])),C['push'](a2);}if(x['showTimings']){const a3=[];v['parseTime']>0x0&&a3['push']('Parse:\x20'+v[cw(0x1e5)]['toFixed'](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3['push']('Index:\x20'+v['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),v['totalLoadTime']>0x0&&a3['push']('Load:\x20'+v['totalLoadTime']['toFixed'](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v['viewportBounds'];C['push'](['Zoom:\x20'+oa(v['zoom'])+'\x20\x20Pixel:\x20'+v['pixelSize']['toFixed'](0x2),'View:\x20['+a4['minX']['toFixed'](0x0)+',\x20'+a4['minY']['toFixed'](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY']['toFixed'](0x0)+']']);}if(C[cw(0xd8)]===0x0)return;k['font']=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D['push']({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D['push']({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k[cw(0x11a)](a7[cw(0xc4)])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9[cw(0x1bc)]?xe:Fe;let M,N;switch(x[cw(0x196)]){case'top-left':M=S,N=S;break;case'top-right':M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case cw(0x165):M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w==='dark'?'rgba(0,\x200,\x200,\x200.75)':'rgba(255,\x20255,\x20255,\x200.85)',k['fillRect'](M,N,I,L),k[cw(0xff)]=w===cw(0x1b5)?'rgba(255,\x20255,\x20255,\x200.15)':cw(0x12e),k['lineWidth']=0x1,k['strokeRect'](M+0.5,N+0.5,I-0x1,L-0x1),k[cw(0xe7)]=w===cw(0x1b5)?V[cw(0x92)]:'rgba(0,\x200,\x200,\x200.85)',k['textAlign']='left',k['textBaseline']=cw(0xf4);let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab['text'],M+Z,X),X+=Fe);}var ca=class{['layers']=new Map();['visibility']=new Map();[b1(0x163)]=new Map();['visibleCache']=null;[b1(0x95)](c){const cx=b1;this['layers']=new Map(c),this[cx(0x126)]['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility'][cx(0x176)](d,!f['isOff']&&!f[cx(0x1ed)]);}['getAllLayers'](){return Array['from'](this['layers']['values']());}['setVisible'](c,d){const cy=b1;this['visibility'][cy(0x176)](c,d),this['visibleCache']=null;}['isVisible'](c){return this['visibility']['get'](c)??!0x0;}['setColorOverride'](c,d){this['colorOverrides']['set'](c,d);}['getColorOverride'](c){const cz=b1;return this[cz(0x163)]['get'](c);}['getVisibleLayerNames'](){if(this['visibleCache'])return this['visibleCache'];const c=new Set();for(const [d,f]of this['visibility'])f&&c['add'](d);return this['visibleCache']=c,c;}['clear'](){this['layers']['clear'](),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;}},ha=class{['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){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const cA=b1,f=this['listeners'][cA(0xed)](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){this['listeners']['clear']();}},ua=class{constructor(c,d){const cB=b1;this[cB(0x145)]=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this[cB(0x1cf)]=this[cB(0x19a)]['bind'](this),this['onWheel']=this['handleWheel']['bind'](this),this['onTouchStart']=this[cB(0x199)]['bind'](this),this['onTouchMove']=this['handleTouchMove']['bind'](this),this[cB(0x105)]=this['handleTouchEnd']['bind'](this),this['onContextMenu']=f=>f['preventDefault'](),c['addEventListener']('pointerdown',this['onPointerDown']),c['addEventListener']('pointermove',this[cB(0x18c)]),c['addEventListener'](cB(0x152),this[cB(0x1cf)]),c[cB(0x174)]('wheel',this[cB(0x144)],{'passive':!0x1}),c['addEventListener']('touchstart',this['onTouchStart'],{'passive':!0x1}),c['addEventListener']('touchmove',this['onTouchMove'],{'passive':!0x1}),c['addEventListener'](cB(0xe9),this['onTouchEnd']),c['addEventListener'](cB(0x1bd),this[cB(0xab)]);}[b1(0x19f)]=!0x1;['lastX']=0x0;['lastY']=0x0;[b1(0x1ce)]=new Map();['onPointerDown'];[b1(0x18c)];['onPointerUp'];['onWheel'];['onTouchStart'];[b1(0x157)];[b1(0x105)];[b1(0xab)];['destroy'](){const cC=b1;this['canvas']['removeEventListener'](cC(0xf5),this['onPointerDown']),this['canvas'][cC(0xae)](cC(0xd9),this['onPointerMove']),this[cC(0x145)]['removeEventListener'](cC(0x152),this['onPointerUp']),this['canvas']['removeEventListener']('wheel',this['onWheel']),this['canvas']['removeEventListener'](cC(0x197),this['onTouchStart']),this['canvas']['removeEventListener']('touchmove',this['onTouchMove']),this['canvas'][cC(0xae)]('touchend',this[cC(0x105)]),this['canvas']['removeEventListener']('contextmenu',this['onContextMenu']);}['handlePointerDown'](c){const cD=b1,d=this['viewer']['getTool'](),f=this[cD(0x145)]['getBoundingClientRect'](),g=c['clientX']-f['left'],h=c['clientY']-f['top'];c['button']===0x0&&d==='pan'?this['startPan'](c,g,h):c['button']===0x1?this['startPan'](c,g,h):c['button']===0x0&&(d==='select'||d==='measure')&&this['viewer']['handleClick'](g,h);}['startPan'](c,d,f){const cE=b1;this['isPanning']=!0x0,this['lastX']=d,this['lastY']=f,this['canvas'][cE(0xcc)](c[cE(0xfa)]),this['canvas']['style']['cursor']='grabbing';}['handlePointerMove'](c){const cF=b1,d=this['canvas']['getBoundingClientRect'](),f=c[cF(0x177)]-d['left'],g=c['clientY']-d['top'];if(this['isPanning']){const h=f-this[cF(0xa4)],i=g-this['lastY'];this[cF(0xa4)]=f,this[cF(0xba)]=g,this['viewer']['handlePan'](h,i);}else this['viewer']['handleMouseMove'](f,g);}['handlePointerUp'](c){const cG=b1;this['isPanning']&&(this['isPanning']=!0x1,this['canvas']['releasePointerCapture'](c[cG(0xfa)]),this['canvas'][cG(0x1b4)]['cursor']=this['viewer']['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cH=b1;c['preventDefault']();const d=this['canvas']['getBoundingClientRect'](),f=c['clientX']-d[cH(0xda)],g=c['clientY']-d[cH(0xf4)],h=-Math['sign'](c['deltaY']),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this['viewer']['handleZoom'](f,g,l);}['handleTouchStart'](c){const cI=b1;c[cI(0x115)]();for(const d of Array[cI(0x193)](c[cI(0x15d)]))this['touches']['set'](d['identifier'],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cJ=b1;if(d['preventDefault'](),this[cJ(0x1ce)][cJ(0x1c5)]===0x2&&d['touches']['length']===0x2){const f=d[cJ(0x1ce)][0x0],g=d['touches'][0x1],k=Array['from'](this['touches']['values']()),m=Math[cJ(0xb0)](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math['hypot'](f['clientX']-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const v=p/m,w=this[cJ(0x145)]['getBoundingClientRect'](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w['left'],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w['top'],A=(f['clientX']+g['clientX'])/0x2-w['left'],C=(f['clientY']+g[cJ(0x15e)])/0x2-w[cJ(0xf4)];this['viewer'][cJ(0x11f)](x,z,v),this['viewer']['handlePan'](A-x,C-z);}}else{if(this['touches']['size']===0x1&&d['touches'][cJ(0xd8)]===0x1){const D=d['touches'][0x0],F=this[cJ(0x1ce)]['get'](D['identifier']);F&&this['viewer']['handlePan'](D['clientX']-F['x'],D['clientY']-F['y']);}}for(const I of Array[cJ(0x193)](d['changedTouches']))this['touches'][cJ(0x176)](I['identifier'],{'x':I['clientX'],'y':I[cJ(0x15e)]});}['handleTouchEnd'](c){const cK=b1;for(const d of Array['from'](c[cK(0x15d)]))this['touches']['delete'](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];['entityBBoxes']=[];['build'](c,d){this['items']=[],this['entityBBoxes']=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this['entityBBoxes'][g]=i,i&&this['items']['push']({...i,'entityIndex':g});}this['tree']['clear'](),this['tree']['load'](this['items']);}['search'](c,d,f,g){return this['tree']['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}[b1(0x1c3)](c){return this['entityBBoxes'][c]??null;}['getEntityBBoxes'](){const cL=b1;return this[cL(0x1c9)];}['clear'](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function pa(g,k,m,p,v,w){const cM=b1,x=da/w,z=p['search'](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z['length']-0x1;D>=0x0;D--){const F=z[D],I=m[F['entityIndex']];if(!I||!v['has'](I[cM(0xc6)])||!I['visible'])continue;const L=ba(g,k,I);L<A&&(A=L,C=F['entityIndex']);}return C;}function ba(d,f,g){const cN=b1;switch(g['type']){case'LINE':return re(d,f,g['start']['x'],g['start']['y'],g['end']['x'],g['end']['y']);case'CIRCLE':return ma(d,f,g['center']['x'],g['center']['y'],g['radius']);case'ARC':return ga(d,f,g['center']['x'],g['center']['y'],g['radius'],g[cN(0x15b)]*Math['PI']/0xb4,g['endAngle']*Math['PI']/0xb4);case'LWPOLYLINE':case'POLYLINE':{let k=0x1/0x0;const l=g['vertices'],m=g['closed']?l[cN(0xd8)]:l['length']-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l['length']],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case'ELLIPSE':return Fa(d,f,g['center']['x'],g['center']['y'],g[cN(0xfb)],g['minorRatio']);case cN(0x17f):case'MTEXT':{const x=B(g);return x?va(d,f,x['minX'],x['minY'],x['maxX'],x['maxY']):0x1/0x0;}case'POINT':return Math['hypot'](d-g['position']['x'],f-g['position']['y']);case'SPLINE':{let z=0x1/0x0;const A=g['controlPoints'];for(let C=0x0;C<A['length']-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math['min'](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const cO=b1,v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math[cO(0xb0)](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math['max'](0x0,Math['min'](0x1,z));const A=g+z*v,C=k+z*w;return Math['hypot'](d-A,f-C);}function ma(c,d,f,g,h){return Math['abs'](Math['hypot'](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cP=b1,w=(Math['atan2'](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math['hypot'](g-m,k-o)-p);const A=Math['hypot'](g-(m+p*Math['cos'](u)),k-(o+p*Math['sin'](u))),C=Math[cP(0xb0)](g-(m+p*Math[cP(0x171)](v)),k-(o+p*Math['sin'](v)));return Math['min'](A,C);}function va(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 Fa(g,k,v,w,x,z){const cQ=b1,A=Math['atan2'](x['y'],x['x']),C=Math['cos'](-A),D=Math['sin'](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math['sqrt'](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math['hypot'](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math[cQ(0xb0)](F-X,I-Y);}var xa=class{[b1(0x1b9)]={'phase':'idle'};[b1(0x9d)]=null;['activate'](){this['state']={'phase':'first-point'},this['currentSnap']=null;}['deactivate'](){const cR=b1;this[cR(0x1b9)]={'phase':'idle'},this['currentSnap']=null;}['handleClick'](d,f,g){const cS=b1,k=g?g['point']:{'x':d,'y':f};switch(this['state']['phase']){case cS(0xf9):return this[cS(0x1b9)]={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case'second-point':{const l=this['state'][cS(0x1b2)],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math['atan2'](u,p)*0xb4/Math['PI'];return this[cS(0x1b9)]={'phase':cS(0x17a),'firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case'done':return this['state']={'phase':'second-point','firstPoint':k},null;default:return null;}}['handleMove'](c){this['currentSnap']=c;}};function ke(g,k,m,p,v,w=new Set(['endpoint',b1(0x87),b1(0xac)])){const cT=b1,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C['entityIndex']];if(!D)continue;const F=C['entityIndex'];switch(D[cT(0x14e)]){case'LINE':{if(w['has']('endpoint')&&(y(z,D['start']['x'],D['start']['y'],'endpoint',F,g,k,x),y(z,D['end']['x'],D['end']['y'],cT(0x96),F,g,k,x)),w['has']('midpoint')){const I=(D['start']['x']+D['end']['x'])/0x2,L=(D['start']['y']+D['end']['y'])/0x2;y(z,I,L,'midpoint',F,g,k,x);}break;}case'CIRCLE':{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w[cT(0x155)]('endpoint'))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math['cos'](M),V=D['center']['y']+D['radius']*Math['sin'](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has'](cT(0xac))&&y(z,D['center']['x'],D['center']['y'],cT(0xac),F,g,k,x),w['has']('endpoint')){const X=D[cT(0x15b)]*Math['PI']/0xb4,Y=D['endAngle']*Math['PI']/0xb4;y(z,D['center']['x']+D['radius']*Math['cos'](X),D['center']['y']+D['radius']*Math['sin'](X),'endpoint',F,g,k,x),y(z,D['center']['x']+D['radius']*Math['cos'](Y),D[cT(0xac)]['y']+D[cT(0x179)]*Math['sin'](Y),cT(0x96),F,g,k,x);}break;}case'LWPOLYLINE':case'POLYLINE':{if(w['has'](cT(0x96))){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],'endpoint',F,g,k,x);}if(w['has'](cT(0x87)))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D['vertices'][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,'midpoint',F,g,k,x);}break;}case'ELLIPSE':{w[cT(0x155)]('center')&&y(z,D['center']['x'],D[cT(0xac)]['y'],'center',F,g,k,x);break;}case cT(0x17f):{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}case'MTEXT':{w['has'](cT(0x96))&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}}}return z['sort']((a4,a5)=>Math['hypot'](a4[cT(0x133)]['x']-g,a4['point']['y']-k)-Math['hypot'](a5['point']['x']-g,a5['point']['y']-k)),z;}function y(c,d,f,g,h,k,l,m){Math['hypot'](d-k,f-l)<=m&&c['push']({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const cU=b1,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v['currentSnap']){const [D,F]=W(k,v[cU(0x9d)]['point']['x'],v['currentSnap']['point']['y']);ya(g,D,F,v['currentSnap']['type'],A['measureColor']);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v['currentSnap']){const [a0,a1]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);M=a0,N=a1;}else M=w,N=x;g['strokeStyle']=A['measureColor'],g['lineWidth']=1.5,g[cU(0xdd)]([0x6,0x3]),g['beginPath'](),g['moveTo'](I,L),g['lineTo'](M,N),g['stroke'](),g[cU(0xdd)]([]),K(g,I,L,A['measureColor']),K(g,M,N,A['measureColor']);let V,X;v['currentSnap']?(V=v[cU(0x9d)]['point']['x'],X=v['currentSnap']['point']['y']):[V,X]=q(k,w,x);const Y=Math[cU(0xb0)](V-C['firstPoint']['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C['phase']==='done'){const [a2,a3]=W(k,C[cU(0x1b2)]['x'],C['firstPoint']['y']),[a4,a5]=W(k,C['secondPoint']['x'],C[cU(0x104)]['y']);g['strokeStyle']=A['measureColor'],g['lineWidth']=0x2,g['beginPath'](),g['moveTo'](a2,a3),g['lineTo'](a4,a5),g[cU(0xeb)](),K(g,a2,a3,A[cU(0x10f)]),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C[cU(0x116)],z);}}function ya(c,d,f,g,h){const cV=b1;c['strokeStyle']=h,c[cV(0x156)]=0x2;const i=0x8;switch(g){case cV(0x96):c['strokeRect'](d-i/0x2,f-i/0x2,i,i);break;case'midpoint':c[cV(0x135)](),c['moveTo'](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c[cV(0x162)](),c['stroke']();break;case'center':c['beginPath'](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c['beginPath'](),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 K(c,d,f,g){const cW=b1;c['fillStyle']=g,c['beginPath'](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c[cW(0x1ab)]();}function ye(d,f,g,k,m){const cX=b1,p=k[cX(0x187)](0x4);d['font']='13px\x20monospace',d['textAlign']='center',d[cX(0x1a4)]='bottom';const v=d['measureText'](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v['width']+w*0x2,C=0x12;d['fillStyle']=m==='dark'?'rgba(0,0,0,0.8)':cX(0x194),d['fillRect'](x,z,A,C),d['fillStyle']=E[m]['measureColor'],d[cX(0x143)](p,f,g-0x6);}var Pa=class{['worker']=null;['blobUrl']=null;['nextId']=0x1;[b1(0xa5)]=new Map();['getWorker'](){const cY=b1;return this[cY(0x1aa)]?this[cY(0x1aa)]:(this[cY(0x16e)]=URL['createObjectURL'](new Blob([cY(0x170)],{'type':'text/javascript'})),this['worker']=new Worker(this[cY(0x16e)]),this['worker'][cY(0x17e)]=c=>{const cZ=cY,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending']['get'](f);i&&(this[cZ(0xa5)]['delete'](f),d===cZ(0x164)?i['resolve'](this['reviveDocument'](g)):d==='error'&&i['reject'](new Error(h??'Worker\x20parse\x20failed')));},this[cY(0x1aa)]['onerror']=c=>{const d=new Error(c['message']??'Worker\x20error');for(const [,f]of this['pending'])f['reject'](d);this['pending']['clear'](),this['destroyWorker']();},this['worker']);}[b1(0xbe)](c){return new Promise((d,f)=>{const d0=b,g=this[d0(0x139)]++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this['getWorker']();}catch(l){this['pending'][d0(0x1c1)](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this['pending']['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}['terminate'](){const d1=b1;this['destroyWorker']();const c=new Error(d1(0x93));for(const [,d]of this['pending'])d['reject'](c);this[d1(0xa5)]['clear']();}['destroyWorker'](){const d2=b1;this['worker']&&(this['worker']['terminate'](),this['worker']=null),this[d2(0x16e)]&&(URL['revokeObjectURL'](this['blobUrl']),this[d2(0x16e)]=null);}['reviveDocument'](c){return{...c,'layers':this['ensureMap'](c['layers']),'lineTypes':this['ensureMap'](c['lineTypes']),'styles':this['ensureMap'](c['styles']),'blocks':this['ensureMap'](c['blocks'])};}['ensureMap'](c){const d3=b1;return c instanceof Map?c:c&&typeof c=='object'?new Map(Object[d3(0x160)](c)):new Map();}},wa=class{[b1(0x145)];['renderer'];['camera'];['layerManager'];['emitter'];['spatialIndex'];['measureTool'];['doc']=null;['options'];[b1(0x13f)];['inputHandler'];['resizeObserver'];['formatConverters'];['workerManager']=null;[b1(0x1e8)]=-0x1;['renderPending']=!0x1;['destroyed']=!0x1;['loadGeneration']=0x0;[b1(0xcf)]=0x0;['mouseScreenY']=0x0;[b1(0x17c)]=!0x1;['debugOptions'];[b1(0x1a6)]=null;['lastDebugStats']=null;['frameTimestamps']=[];['lastDoRenderTime']=0x0;['lastFrameTime']=0x0;[b1(0x1e5)]=0x0;['spatialIndexBuildTime']=0x0;['loadedFileName']=null;['loadedFileSize']=0x0;[b1(0x198)]=0x0;constructor(c,d){const d4=b1;this[d4(0x145)]=c,this['options']={'theme':d?.['theme']??d4(0x1b5),'backgroundColor':d?.['backgroundColor'],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.['zoomSpeed']??1.1,'initialTool':d?.['initialTool']??d4(0x13e)},this['formatConverters']=d?.['formatConverters']??[],d?.['worker']&&(this['workerManager']=new Pa()),d?.[d4(0x1ec)]?(this['debugEnabled']=!0x0,this['debugOptions']=ne(typeof d['debug']==d4(0x137)?void 0x0:d['debug'])):this['debugOptions']=ne(),this['renderer']=new na(c),this[d4(0xb3)]=new yt(this['options']),this['layerManager']=new ca(),this['emitter']=new ha(),this['spatialIndex']=new fa(),this['measureTool']=new xa(),this['currentTool']=this['options']['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this[d4(0x11c)]['observe'](c),c['style']['cursor']=this['getCursorForTool'](this['currentTool']),this['requestRender'](),this['debugEnabled']&&this['startDebugLoop']();}['guardDestroyed'](){const d5=b1;if(this['destroyed'])throw new Error(d5(0x14b));}async['runConverters'](c){for(const d of this['formatConverters']){let f=!0x1;try{f=d['detect'](c);}catch{continue;}if(f)return d['convert'](c);}return null;}async[b1(0x1ee)](c){const d6=b1;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c['name'],this['loadedFileSize']=c[d6(0x1c5)];const f=await c['arrayBuffer']();if(this[d6(0x1d7)]||d!==this[d6(0xca)])return;const g=await this['runConverters'](f);if(this['destroyed']||d!==this['loadGeneration'])return;const h=performance['now'](),i=g??f;this['doc']=await this['parseWithOptionalWorker'](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance[d6(0xb1)]()-h,this['onDocumentLoaded']());}async['loadBuffer'](c){const d7=b1;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const f=await this[d7(0x90)](c);if(this['destroyed']||d!==this['loadGeneration'])return;const g=performance['now'](),h=f??c;this[d7(0x8c)]=await this[d7(0x1cc)](h,d),!(this[d7(0x1d7)]||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());}async[b1(0x1cc)](c,d){const d8=b1;if(!this['workerManager'])return ae(c);try{return await this['workerManager']['parse'](c);}catch(f){if(this[d8(0x1d7)]||d!==this['loadGeneration'])return null;throw f;}}['loadDocument'](c){const d9=b1;if(this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=0x0,this[d9(0x1e5)]=0x0,!c||!Array[d9(0x10b)](c['entities'])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this[d9(0x12b)]();}['loadString'](c){const db=b1;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['length'];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this[db(0x12b)]();}[b1(0xa0)](c){const dc=b1;this['guardDestroyed'](),++this[dc(0xca)],this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const d=performance['now']();this[dc(0x8c)]=ae(c),this['parseTime']=performance[dc(0xb1)]()-d,this['onDocumentLoaded']();}['clearDocument'](){const dd=b1;this['guardDestroyed'](),++this['loadGeneration'],this[dd(0x8c)]=null,this['selectedEntityIndex']=-0x1,this['spatialIndex']['clear'](),ve(),this[dd(0xaf)]['clear'](),this['measureTool']['deactivate'](),this['requestRender']();}['onDocumentLoaded'](){const df=b1;if(!this['doc'])return;this['layerManager']['setLayers'](this[df(0x8c)]['layers']);const c=performance[df(0xb1)]();this['spatialIndex'][df(0x9a)](this['doc']['entities'],this['doc']),_t(Ot(this['doc'])),this[df(0xa6)]=performance[df(0xb1)]()-c,this['selectedEntityIndex']=-0x1,this['measureTool']['deactivate'](),this['currentTool']==='measure'&&this['measureTool']['activate'](),this['fitToView']();}['fitToView'](){const dg=b1;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas']['getBoundingClientRect']();this[dg(0xb3)]['setTransform'](xt(d['width'],d['height'],c['minX'],c['minY'],c['maxX'],c['maxY'])),this['requestRender'](),this['emitter'][dg(0x130)]('viewchange',this['camera'][dg(0x1d3)]());}['zoomTo'](c){const dh=b1;this['guardDestroyed']();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d['height']/0x2,h=c/this[dh(0xb3)]['getTransform']()['scale'];this['camera']['zoom'](f,g,h),this[dh(0x1c6)](),this['emitter']['emit']('viewchange',this[dh(0xb3)]['getTransform']());}[b1(0x9f)](c,d){const di=b1;this[di(0x107)]();const f=this['canvas']['getBoundingClientRect'](),g=this['camera']['getTransform'](),h=c*g['scale']+g[di(0xbf)],k=-d*g['scale']+g['offsetY'],l=f[di(0x91)]/0x2-h,m=f['height']/0x2-k;this['camera']['pan'](l,m),this['requestRender'](),this['emitter'][di(0x130)]('viewchange',this['camera']['getTransform']());}['getViewTransform'](){const dj=b1;return{...this['camera'][dj(0x1d3)]()};}['getZoomSpeed'](){const dk=b1;return this[dk(0xd1)]['zoomSpeed'];}['getLayers'](){return this['layerManager']['getAllLayers']();}['setLayerVisible'](c,d){this['guardDestroyed'](),this['layerManager']['setVisible'](c,d),this['requestRender']();}['setLayerColor'](c,d){this['guardDestroyed'](),this['layerManager']['setColorOverride'](c,d),this['requestRender']();}['setTheme'](c){this['guardDestroyed'](),this['options']['theme']=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}['setBackgroundColor'](c){this['guardDestroyed'](),this['options']['backgroundColor']=c,this['requestRender']();}['setTool'](c){const dl=b1;this['guardDestroyed'](),this['currentTool']==='measure'&&c!=='measure'&&this['measureTool']['deactivate'](),this['currentTool']=c,this['canvas']['style']['cursor']=this['getCursorForTool'](c),c==='measure'&&this['measureTool']['activate'](),c!=='select'&&(this[dl(0x1e8)]=-0x1),this['requestRender']();}['getTool'](){return this['currentTool'];}['getCursorForTool'](c){switch(c){case'pan':return'grab';case'select':return'crosshair';case'measure':return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){const dm=b1;this[dm(0x12d)]['off'](c,d);}[b1(0x99)](){return this['doc'];}['getEntities'](){const dn=b1;return this[dn(0x8c)]?.['entities']??[];}['resize'](){this['renderer']['updateSize'](),this['requestRender']();}['destroy'](){const dp=b1;this['destroyed']=!0x0,this['stopDebugLoop'](),this['inputHandler']['destroy'](),this['resizeObserver'][dp(0x1b1)](),this[dp(0x1a7)]['destroy'](),this['emitter']['removeAllListeners'](),this['spatialIndex']['clear'](),ve(),this['layerManager']['clear'](),this['workerManager']?.['terminate'](),this['workerManager']=null,this['doc']=null;}['requestRender'](){const dq=b1;if(!this[dq(0x1d7)]){if(this['debugRafId']){this['doRender']();return;}this['renderPending']||(this['renderPending']=!0x0,requestAnimationFrame(()=>{this['renderPending']=!0x1,!this['destroyed']&&this['doRender']();}));}}['doRender'](){const dr=b1;if(!this['doc']){this['renderer']['renderEmpty'](this['options']['theme']);return;}const d=this['camera'][dr(0x1d3)](),f=this[dr(0x1a7)]['getWidth'](),g=this['renderer']['getHeight'](),k=this['computeViewportBounds'](d,f,g),m=this[dr(0x114)]['search'](k['minX'],k['minY'],k['maxX'],k['maxY']),p=new Set();for(let x=0x0;x<m['length'];x++)p[dr(0x188)](m[x][dr(0x1cb)]);const u=performance[dr(0xb1)](),v=this[dr(0x1a7)]['render'](this['doc'],d,this['options']['theme'],this['layerManager']['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex'][dr(0x128)]());this['lastFrameTime']=performance['now']()-u,this['lastRenderStats']=v;const w=performance['now']();for(w-this['lastDoRenderTime']>=0x3&&this['frameTimestamps']['push'](w),this['lastDoRenderTime']=w;this['frameTimestamps']['length']>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this['frameTimestamps']['shift']();if(this['currentTool']==='measure'&&this['measureTool']['state']['phase']!==dr(0x1e1)){const z=this['renderer']['getContext']();ka(z,this['camera']['getTransform'](),this['measureTool'],this[dr(0xcf)],this['mouseScreenY'],this[dr(0xd1)][dr(0x19b)]);}if(this['debugEnabled']){const A=this['renderer']['getContext'](),C=this[dr(0x142)]();this[dr(0x149)]=C,la(A,C,this['options']['theme'],this['debugOptions'],this['renderer']['getWidth'](),this['renderer'][dr(0xe0)]());}}['setDebug'](c){const ds=b1;this[ds(0x107)](),typeof c=='boolean'?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this['debugOptions']=ne(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this[ds(0x1c6)]());}['startDebugLoop'](){const du=b1;if(this[du(0x198)])return;const c=()=>{const dv=du;if(!this[dv(0x17c)]||this[dv(0x1d7)]){this['debugRafId']=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this['debugRafId']=requestAnimationFrame(c);}['stopDebugLoop'](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}['getDebugStats'](){return this['debugEnabled']?this['lastDebugStats']:null;}['buildDebugStats'](){const dw=b1,c=this[dw(0xb3)]['getTransform'](),d=this['renderer']['getWidth'](),f=this['renderer']['getHeight'](),g=this[dw(0x1dc)](c,d,f);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':this[dw(0x1a6)]??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.['entities'][dw(0xd8)]??0x0,'layerCount':this['doc']?.[dw(0x1dd)]['size']??0x0,'visibleLayerCount':this[dw(0xaf)]['getVisibleLayerNames']()['size'],'blockCount':this['doc']?.['blocks']['size']??0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this[dw(0x1e5)]+this['spatialIndexBuildTime'],'zoom':c[dw(0x10c)],'pixelSize':c['scale']>0x0?0x1/c['scale']:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this[dw(0xd2)],'dxfVersion':this['doc']?.['header']['acadVersion']??null};}['computeViewportBounds'](c,d,f){const [g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math['min'](g,k),'minY':Math['min'](h,l),'maxX':Math['max'](g,k),'maxY':Math['max'](h,l)};}['handlePan'](c,d){const dx=b1;this['camera']['pan'](c,d),this[dx(0x1c6)](),this['emitter'][dx(0x130)]('viewchange',this['camera'][dx(0x1d3)]());}['handleZoom'](c,d,f){const dy=b1;this[dy(0xb3)][dy(0x1d1)](c,d,f),this['requestRender'](),this['emitter']['emit']('viewchange',this[dy(0xb3)]['getTransform']());}['handleClick'](c,d){const dz=b1;if(!this['doc'])return;const f=this['camera']['getTransform'](),[g,h]=q(f,c,d);switch(this['currentTool']){case'select':this['handleSelect'](g,h,c,d);break;case'measure':{const k=ke(g,h,this['doc'][dz(0x86)],this[dz(0x114)],f['scale']),l=k['length']>0x0?k[0x0]:null,m=this[dz(0xc0)]['handleClick'](g,h,l);this['requestRender'](),m&&this['emitter']['emit']('measure',m);break;}}}['handleMouseMove'](c,d){if(this['mouseScreenX']=c,this['mouseScreenY']=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera']['getTransform'](),[g,h]=q(f,c,d),i=ke(g,h,this['doc']['entities'],this['spatialIndex'],f['scale']);this['measureTool']['handleMove'](i[0x0]??null),this['requestRender']();}}['handleSelect'](c,d,f,g){const dA=b1;if(!this['doc'])return;const h=pa(c,d,this['doc']['entities'],this['spatialIndex'],this[dA(0xaf)]['getVisibleLayerNames'](),this['camera']['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){const i=this['doc']['entities'][h];i&&this['emitter']['emit'](dA(0x108),{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){const dB=b1;return this['doc']?this['doc']['header']['extMin']&&this['doc'][dB(0x1eb)]['extMax']?{'minX':this['doc']['header'][dB(0x168)]['x'],'minY':this['doc']['header']['extMin']['y'],'maxX':this[dB(0x8c)][dB(0x1eb)][dB(0xea)]['x'],'maxY':this['doc']['header']['extMax']['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};