@esri/solutions-components 0.5.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +88 -92
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +131 -5
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +19 -17
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-9359e9ff.js} +135 -44
  21. package/dist/cjs/{index.es-98008aa0.js → index.es-9c0d0ed6.js} +3 -3
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-090f4d4d.js} +3 -3
  26. package/dist/cjs/public-notification.cjs.entry.js +173 -48
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +1 -1
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +4 -8
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +75 -15
  44. package/dist/collection/components/public-notification/public-notification.js +217 -25
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/queryUtils.js +2 -2
  58. package/dist/collection/utils/queryUtils.ts +2 -2
  59. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  60. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  61. package/dist/components/crowdsource-manager.js +293 -17
  62. package/dist/components/downloadUtils.js +133 -42
  63. package/dist/components/interfaces3.js +7 -1
  64. package/dist/components/layer-table.js +1 -443
  65. package/dist/components/layer-table2.js +429 -0
  66. package/dist/components/map-card.js +1 -339
  67. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  68. package/dist/components/map-draw-tools2.js +19 -23
  69. package/dist/components/map-layer-picker2.js +1 -1
  70. package/dist/components/map-select-tools2.js +21 -16
  71. package/dist/components/public-notification.js +209 -81
  72. package/dist/components/queryUtils.js +2 -2
  73. package/dist/components/refine-selection-tools2.js +3 -3
  74. package/dist/components/refine-selection2.js +1 -1
  75. package/dist/components/solution-resource-item2.js +1 -1
  76. package/dist/components/solution-store.js +1 -1
  77. package/dist/esm/buffer-tools_6.entry.js +79 -83
  78. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  79. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  80. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +134 -9
  81. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  82. package/dist/esm/calcite-input-message_5.entry.js +19 -17
  83. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  84. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  85. package/dist/esm/crowdsource-manager.entry.js +88 -14
  86. package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-a8f139c5.js} +135 -44
  87. package/dist/esm/{index.es-c736c805.js → index.es-a75412ff.js} +3 -3
  88. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  89. package/dist/esm/layer-table_2.entry.js +507 -0
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-8ffcd36d.js} +4 -4
  92. package/dist/esm/public-notification.entry.js +169 -44
  93. package/dist/esm/solution-configuration.entry.js +2 -2
  94. package/dist/esm/solution-contents_3.entry.js +2 -2
  95. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  96. package/dist/esm/solutions-components.js +1 -1
  97. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  98. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  99. package/dist/solutions-components/{p-4f5641b4.entry.js → p-1affd711.entry.js} +18 -18
  100. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  101. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  102. package/dist/solutions-components/{p-72117a18.js → p-765a27f3.js} +1 -1
  103. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  104. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  105. package/dist/solutions-components/p-8cece97f.js +21 -0
  106. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  107. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  108. package/dist/solutions-components/{p-6a657ff6.js → p-bb64bd47.js} +25 -9
  109. package/dist/solutions-components/p-c392dd95.entry.js +17 -0
  110. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  111. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  112. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  113. package/dist/solutions-components/p-dc53c9c1.js +36 -0
  114. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  115. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  116. package/dist/solutions-components/solutions-components.esm.js +6 -6
  117. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  118. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  119. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  120. package/dist/solutions-components/utils/interfaces.ts +6 -0
  121. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  122. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  123. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  124. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  125. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  126. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  127. package/dist/types/components/map-card/map-card.d.ts +10 -6
  128. package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
  129. package/dist/types/components/public-notification/public-notification.d.ts +86 -4
  130. package/dist/types/components.d.ts +68 -0
  131. package/dist/types/preact.d.ts +2 -1
  132. package/dist/types/utils/csvDownload.d.ts +24 -0
  133. package/dist/types/utils/csvUtils.d.ts +2 -1
  134. package/dist/types/utils/downloadUtils.d.ts +25 -0
  135. package/dist/types/utils/interfaces.d.ts +5 -0
  136. package/dist/types/utils/pdfUtils.d.ts +2 -1
  137. package/package.json +4 -4
  138. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  139. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  140. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  141. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  142. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  143. package/dist/cjs/map-card.cjs.entry.js +0 -252
  144. package/dist/esm/calcite-chip.entry.js +0 -138
  145. package/dist/esm/calcite-dropdown.entry.js +0 -477
  146. package/dist/esm/calcite-handle.entry.js +0 -95
  147. package/dist/esm/calcite-loader.entry.js +0 -91
  148. package/dist/esm/layer-table.entry.js +0 -313
  149. package/dist/solutions-components/p-11132485.entry.js +0 -11
  150. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  151. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  152. package/dist/solutions-components/p-5ee7b022.entry.js +0 -12
  153. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  154. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  155. package/dist/solutions-components/p-84bbaebf.entry.js +0 -6
  156. package/dist/solutions-components/p-88e28de2.js +0 -36
  157. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  158. package/dist/solutions-components/p-ac76d270.entry.js +0 -17
  159. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  160. package/dist/solutions-components/p-e162304e.entry.js +0 -6
  161. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  162. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{c as t,g as n}from"./p-e1a4994d.js";import{a as i}from"./p-c2f00d41.js";import{l as r}from"./p-4aa3ba60.js";import{b as e}from"./p-88e28de2.js";var s=t((function(t){function n(i){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));const o=n(s);var a=Uint8Array,u=Uint16Array,f=Uint32Array,c=new a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),h=new a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v=function(t,n){for(var i=new u(31),r=0;r<31;++r)i[r]=n+=1<<t[r-1];var e=new f(i[30]);for(r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)e[s]=s-i[r]<<5|r;return[i,e]},d=v(c,2),w=d[0],m=d[1];w[28]=258,m[258]=28;for(var b=v(h,0),p=b[0],N=b[1],L=new u(32768),g=0;g<32768;++g){var A=(43690&g)>>>1|(21845&g)<<1;L[g]=((65280&(A=(61680&(A=(52428&A)>>>2|(13107&A)<<2))>>>4|(3855&A)<<4))>>>8|(255&A)<<8)>>>1}var y=function(t,n,i){for(var r=t.length,e=0,s=new u(n);e<r;++e)++s[t[e]-1];var o,a=new u(n);for(e=0;e<n;++e)a[e]=a[e-1]+s[e-1]<<1;if(i){o=new u(1<<n);var f=15-n;for(e=0;e<r;++e)if(t[e])for(var c=e<<4|t[e],h=n-t[e],l=a[t[e]-1]++<<h,v=l|(1<<h)-1;l<=v;++l)o[L[l]>>>f]=c}else for(o=new u(r),e=0;e<r;++e)o[e]=L[a[t[e]-1]++]>>>15-t[e];return o},k=new a(288);for(g=0;g<144;++g)k[g]=8;for(g=144;g<256;++g)k[g]=9;for(g=256;g<280;++g)k[g]=7;for(g=280;g<288;++g)k[g]=8;var S=new a(32);for(g=0;g<32;++g)S[g]=5;var x=y(k,9,0),q=y(k,9,1),M=y(S,5,0),j=y(S,5,1),E=function(t){for(var n=t[0],i=1;i<t.length;++i)t[i]>n&&(n=t[i]);return n},P=function(t,n,i){var r=n/8>>0;return(t[r]|t[r+1]<<8)>>>(7&n)&i},O=function(t,n){var i=n/8>>0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>>(7&n)},I=function(t){return(t/8>>0)+(7&t&&1)},F=function(t,n,i){(null==n||n<0)&&(n=0),(null==i||i>t.length)&&(i=t.length);var r=new(t instanceof u?u:t instanceof f?f:a)(i-n);return r.set(t.subarray(n,i)),r},B=function(t,n,i){var r=n/8>>0;t[r]|=i<<=7&n,t[r+1]|=i>>>8},R=function(t,n,i){var r=n/8>>0;t[r]|=i<<=7&n,t[r+1]|=i>>>8,t[r+2]|=i>>>16},T=function(t,n){for(var i=[],r=0;r<t.length;++r)t[r]&&i.push({s:r,f:t[r]});var e=i.length,s=i.slice();if(!e)return[new a(0),0];if(1==e){var o=new a(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],c=i[1],h=0,l=1,v=2;for(i[0]={s:-1,f:f.f+c.f,l:f,r:c};l!=e-1;)f=i[i[h].f<i[v].f?h++:v++],c=i[h!=l&&i[h].f<i[v].f?h++:v++],i[l++]={s:-1,f:f.f+c.f,l:f,r:c};var d=s[0].s;for(r=1;r<e;++r)s[r].s>d&&(d=s[r].s);var w=new u(d+1),m=C(i[l-1],w,0);if(m>n){r=0;var b=0,p=m-n,N=1<<p;for(s.sort((function(t,n){return w[n.s]-w[t.s]||t.f-n.f}));r<e;++r){var L=s[r].s;if(!(w[L]>n))break;b+=N-(1<<m-w[L]),w[L]=n}for(b>>>=p;b>0;){var g=s[r].s;w[g]<n?b-=1<<n-w[g]++-1:++r}for(;r>=0&&b;--r){var A=s[r].s;w[A]==n&&(--w[A],++b)}m=n}return[new a(w),m]},C=function(t,n,i){return-1==t.s?Math.max(C(t.l,n,i+1),C(t.r,n,i+1)):n[t.s]=i},D=function(t){for(var n=t.length;n&&!t[--n];);for(var i=new u(++n),r=0,e=t[0],s=1,o=function(t){i[r++]=t},a=1;a<=n;++a)if(t[a]==e&&a!=n)++s;else{if(!e&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(e),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(e);s=1,e=t[a]}return[i.subarray(0,r),n]},z=function(t,n){for(var i=0,r=0;r<n.length;++r)i+=t[r]*n[r];return i},U=function(t,n,i){var r=i.length,e=I(n+2);t[e]=255&r,t[e+1]=r>>>8,t[e+2]=255^t[e],t[e+3]=255^t[e+1];for(var s=0;s<r;++s)t[e+s+4]=i[s];return 8*(e+4+r)},V=function(t,n,i,r,e,s,o,a,f,v,d){B(n,d++,i),++e[256];for(var w=T(e,15),m=w[0],b=w[1],p=T(s,15),N=p[0],L=p[1],g=D(m),A=g[0],q=g[1],j=D(N),E=j[0],P=j[1],O=new u(19),I=0;I<A.length;++I)O[31&A[I]]++;for(I=0;I<E.length;++I)O[31&E[I]]++;for(var F=T(O,7),C=F[0],V=F[1],W=19;W>4&&!C[l[W-1]];--W);var H,_,G,J,Y=v+5<<3,K=z(e,k)+z(s,S)+o,X=z(e,m)+z(s,N)+o+14+3*W+z(O,C)+(2*O[16]+3*O[17]+7*O[18]);if(Y<=K&&Y<=X)return U(n,d,t.subarray(f,f+v));if(B(n,d,1+(X<K)),d+=2,X<K){H=y(m,b,0),_=m,G=y(N,L,0),J=N;var $=y(C,V,0);for(B(n,d,q-257),B(n,d+5,P-1),B(n,d+10,W-4),d+=14,I=0;I<W;++I)B(n,d+3*I,C[l[I]]);d+=3*W;for(var Z=[A,E],Q=0;Q<2;++Q){var tt=Z[Q];for(I=0;I<tt.length;++I)B(n,d,$[nt=31&tt[I]]),d+=C[nt],nt>15&&(B(n,d,tt[I]>>>5&127),d+=tt[I]>>>12)}}else H=x,_=k,G=M,J=S;for(I=0;I<a;++I)if(r[I]>255){var nt;R(n,d,H[257+(nt=r[I]>>>18&31)]),d+=_[nt+257],nt>7&&(B(n,d,r[I]>>>23&31),d+=c[nt]);var it=31&r[I];R(n,d,G[it]),d+=J[it],it>3&&(R(n,d,r[I]>>>5&8191),d+=h[it])}else R(n,d,H[r[I]]),d+=_[r[I]];return R(n,d,H[256]),d+_[256]},W=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),H=new a(0);function _(t,n){void 0===n&&(n={});var i=function(){var t=1,n=0;return{p:function(i){for(var r=t,e=n,s=i.length,o=0;o!=s;){for(var a=Math.min(o+5552,s);o<a;++o)e+=r+=i[o];r%=65521,e%=65521}t=r,n=e},d:function(){return(t>>>8<<16|(255&n)<<8|n>>>8)+2*((255&t)<<23)}}}();i.p(t);var r=function(t,n,i,r,e){return function(t,n,i,r,e,s){var o=t.length,l=new a(r+o+5*(1+Math.floor(o/7e3))+e),v=l.subarray(r,l.length-e),d=0;if(!n||o<8)for(var w=0;w<=o;w+=65535){var b=w+65535;b<o?d=U(v,d,t.subarray(w,b)):(v[w]=s,d=U(v,d,t.subarray(w,o)))}else{for(var p=W[n-1],L=p>>>13,g=8191&p,A=(1<<i)-1,y=new u(32768),k=new u(A+1),S=Math.ceil(i/3),x=2*S,q=function(n){return(t[n]^t[n+1]<<S^t[n+2]<<x)&A},M=new f(25e3),j=new u(288),E=new u(32),P=0,O=0,B=(w=0,0),R=0,T=0;w<o;++w){var C=q(w),D=32767&w,z=k[C];if(y[D]=z,k[C]=D,R<=w){var _=o-w;if((P>7e3||B>24576)&&_>423){d=V(t,v,0,M,j,E,O,B,T,w-T,d),B=P=O=0,T=w;for(var G=0;G<286;++G)j[G]=0;for(G=0;G<30;++G)E[G]=0}var J=2,Y=0,K=g,X=D-z&32767;if(_>2&&C==q(w-X))for(var $=Math.min(L,_)-1,Z=Math.min(32767,w),Q=Math.min(258,_);X<=Z&&--K&&D!=z;){if(t[w+J]==t[w+J-X]){for(var tt=0;tt<Q&&t[w+tt]==t[w+tt-X];++tt);if(tt>J){if(J=tt,Y=X,tt>$)break;var nt=Math.min(X,tt-2),it=0;for(G=0;G<nt;++G){var rt=w-X+G+32768&32767,et=rt-y[rt]+32768&32767;et>it&&(it=et,z=rt)}}}X+=(D=z)-(z=y[D])+32768&32767}if(Y){M[B++]=268435456|m[J]<<18|N[Y];var st=31&m[J],ot=31&N[Y];O+=c[st]+h[ot],++j[257+st],++E[ot],R=w+J,++P}else M[B++]=t[w],++j[t[w]]}}d=V(t,v,s,M,j,E,O,B,T,w-T,d),s||(d=U(v,d,H))}return F(l,0,r+I(d)+e)}(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,i,r,!e)}(t,n,2,4);return function(t,n){var i=n.level,r=0==i?0:i<6?1:9==i?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)}(r,n),function(t,n,i){for(;i;++n)t[n]=i,i>>>=8}(r,r.length-4,i.d()),r}
6
+ import{c as t,g as n}from"./p-e1a4994d.js";import{a as i}from"./p-c2f00d41.js";import{l as r}from"./p-4aa3ba60.js";import{d as e}from"./p-dc53c9c1.js";var s=t((function(t){function n(i){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));const o=n(s);var a=Uint8Array,u=Uint16Array,f=Uint32Array,c=new a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),h=new a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v=function(t,n){for(var i=new u(31),r=0;r<31;++r)i[r]=n+=1<<t[r-1];var e=new f(i[30]);for(r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)e[s]=s-i[r]<<5|r;return[i,e]},d=v(c,2),w=d[0],m=d[1];w[28]=258,m[258]=28;for(var b=v(h,0),p=b[0],N=b[1],L=new u(32768),g=0;g<32768;++g){var A=(43690&g)>>>1|(21845&g)<<1;L[g]=((65280&(A=(61680&(A=(52428&A)>>>2|(13107&A)<<2))>>>4|(3855&A)<<4))>>>8|(255&A)<<8)>>>1}var y=function(t,n,i){for(var r=t.length,e=0,s=new u(n);e<r;++e)++s[t[e]-1];var o,a=new u(n);for(e=0;e<n;++e)a[e]=a[e-1]+s[e-1]<<1;if(i){o=new u(1<<n);var f=15-n;for(e=0;e<r;++e)if(t[e])for(var c=e<<4|t[e],h=n-t[e],l=a[t[e]-1]++<<h,v=l|(1<<h)-1;l<=v;++l)o[L[l]>>>f]=c}else for(o=new u(r),e=0;e<r;++e)o[e]=L[a[t[e]-1]++]>>>15-t[e];return o},k=new a(288);for(g=0;g<144;++g)k[g]=8;for(g=144;g<256;++g)k[g]=9;for(g=256;g<280;++g)k[g]=7;for(g=280;g<288;++g)k[g]=8;var S=new a(32);for(g=0;g<32;++g)S[g]=5;var x=y(k,9,0),q=y(k,9,1),M=y(S,5,0),j=y(S,5,1),E=function(t){for(var n=t[0],i=1;i<t.length;++i)t[i]>n&&(n=t[i]);return n},P=function(t,n,i){var r=n/8>>0;return(t[r]|t[r+1]<<8)>>>(7&n)&i},O=function(t,n){var i=n/8>>0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>>(7&n)},I=function(t){return(t/8>>0)+(7&t&&1)},F=function(t,n,i){(null==n||n<0)&&(n=0),(null==i||i>t.length)&&(i=t.length);var r=new(t instanceof u?u:t instanceof f?f:a)(i-n);return r.set(t.subarray(n,i)),r},B=function(t,n,i){var r=n/8>>0;t[r]|=i<<=7&n,t[r+1]|=i>>>8},R=function(t,n,i){var r=n/8>>0;t[r]|=i<<=7&n,t[r+1]|=i>>>8,t[r+2]|=i>>>16},T=function(t,n){for(var i=[],r=0;r<t.length;++r)t[r]&&i.push({s:r,f:t[r]});var e=i.length,s=i.slice();if(!e)return[new a(0),0];if(1==e){var o=new a(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],c=i[1],h=0,l=1,v=2;for(i[0]={s:-1,f:f.f+c.f,l:f,r:c};l!=e-1;)f=i[i[h].f<i[v].f?h++:v++],c=i[h!=l&&i[h].f<i[v].f?h++:v++],i[l++]={s:-1,f:f.f+c.f,l:f,r:c};var d=s[0].s;for(r=1;r<e;++r)s[r].s>d&&(d=s[r].s);var w=new u(d+1),m=C(i[l-1],w,0);if(m>n){r=0;var b=0,p=m-n,N=1<<p;for(s.sort((function(t,n){return w[n.s]-w[t.s]||t.f-n.f}));r<e;++r){var L=s[r].s;if(!(w[L]>n))break;b+=N-(1<<m-w[L]),w[L]=n}for(b>>>=p;b>0;){var g=s[r].s;w[g]<n?b-=1<<n-w[g]++-1:++r}for(;r>=0&&b;--r){var A=s[r].s;w[A]==n&&(--w[A],++b)}m=n}return[new a(w),m]},C=function(t,n,i){return-1==t.s?Math.max(C(t.l,n,i+1),C(t.r,n,i+1)):n[t.s]=i},D=function(t){for(var n=t.length;n&&!t[--n];);for(var i=new u(++n),r=0,e=t[0],s=1,o=function(t){i[r++]=t},a=1;a<=n;++a)if(t[a]==e&&a!=n)++s;else{if(!e&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(e),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(e);s=1,e=t[a]}return[i.subarray(0,r),n]},z=function(t,n){for(var i=0,r=0;r<n.length;++r)i+=t[r]*n[r];return i},U=function(t,n,i){var r=i.length,e=I(n+2);t[e]=255&r,t[e+1]=r>>>8,t[e+2]=255^t[e],t[e+3]=255^t[e+1];for(var s=0;s<r;++s)t[e+s+4]=i[s];return 8*(e+4+r)},V=function(t,n,i,r,e,s,o,a,f,v,d){B(n,d++,i),++e[256];for(var w=T(e,15),m=w[0],b=w[1],p=T(s,15),N=p[0],L=p[1],g=D(m),A=g[0],q=g[1],j=D(N),E=j[0],P=j[1],O=new u(19),I=0;I<A.length;++I)O[31&A[I]]++;for(I=0;I<E.length;++I)O[31&E[I]]++;for(var F=T(O,7),C=F[0],V=F[1],W=19;W>4&&!C[l[W-1]];--W);var H,_,G,J,Y=v+5<<3,K=z(e,k)+z(s,S)+o,X=z(e,m)+z(s,N)+o+14+3*W+z(O,C)+(2*O[16]+3*O[17]+7*O[18]);if(Y<=K&&Y<=X)return U(n,d,t.subarray(f,f+v));if(B(n,d,1+(X<K)),d+=2,X<K){H=y(m,b,0),_=m,G=y(N,L,0),J=N;var $=y(C,V,0);for(B(n,d,q-257),B(n,d+5,P-1),B(n,d+10,W-4),d+=14,I=0;I<W;++I)B(n,d+3*I,C[l[I]]);d+=3*W;for(var Z=[A,E],Q=0;Q<2;++Q){var tt=Z[Q];for(I=0;I<tt.length;++I)B(n,d,$[nt=31&tt[I]]),d+=C[nt],nt>15&&(B(n,d,tt[I]>>>5&127),d+=tt[I]>>>12)}}else H=x,_=k,G=M,J=S;for(I=0;I<a;++I)if(r[I]>255){var nt;R(n,d,H[257+(nt=r[I]>>>18&31)]),d+=_[nt+257],nt>7&&(B(n,d,r[I]>>>23&31),d+=c[nt]);var it=31&r[I];R(n,d,G[it]),d+=J[it],it>3&&(R(n,d,r[I]>>>5&8191),d+=h[it])}else R(n,d,H[r[I]]),d+=_[r[I]];return R(n,d,H[256]),d+_[256]},W=new f([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),H=new a(0);function _(t,n){void 0===n&&(n={});var i=function(){var t=1,n=0;return{p:function(i){for(var r=t,e=n,s=i.length,o=0;o!=s;){for(var a=Math.min(o+5552,s);o<a;++o)e+=r+=i[o];r%=65521,e%=65521}t=r,n=e},d:function(){return(t>>>8<<16|(255&n)<<8|n>>>8)+2*((255&t)<<23)}}}();i.p(t);var r=function(t,n,i,r,e){return function(t,n,i,r,e,s){var o=t.length,l=new a(r+o+5*(1+Math.floor(o/7e3))+e),v=l.subarray(r,l.length-e),d=0;if(!n||o<8)for(var w=0;w<=o;w+=65535){var b=w+65535;b<o?d=U(v,d,t.subarray(w,b)):(v[w]=s,d=U(v,d,t.subarray(w,o)))}else{for(var p=W[n-1],L=p>>>13,g=8191&p,A=(1<<i)-1,y=new u(32768),k=new u(A+1),S=Math.ceil(i/3),x=2*S,q=function(n){return(t[n]^t[n+1]<<S^t[n+2]<<x)&A},M=new f(25e3),j=new u(288),E=new u(32),P=0,O=0,B=(w=0,0),R=0,T=0;w<o;++w){var C=q(w),D=32767&w,z=k[C];if(y[D]=z,k[C]=D,R<=w){var _=o-w;if((P>7e3||B>24576)&&_>423){d=V(t,v,0,M,j,E,O,B,T,w-T,d),B=P=O=0,T=w;for(var G=0;G<286;++G)j[G]=0;for(G=0;G<30;++G)E[G]=0}var J=2,Y=0,K=g,X=D-z&32767;if(_>2&&C==q(w-X))for(var $=Math.min(L,_)-1,Z=Math.min(32767,w),Q=Math.min(258,_);X<=Z&&--K&&D!=z;){if(t[w+J]==t[w+J-X]){for(var tt=0;tt<Q&&t[w+tt]==t[w+tt-X];++tt);if(tt>J){if(J=tt,Y=X,tt>$)break;var nt=Math.min(X,tt-2),it=0;for(G=0;G<nt;++G){var rt=w-X+G+32768&32767,et=rt-y[rt]+32768&32767;et>it&&(it=et,z=rt)}}}X+=(D=z)-(z=y[D])+32768&32767}if(Y){M[B++]=268435456|m[J]<<18|N[Y];var st=31&m[J],ot=31&N[Y];O+=c[st]+h[ot],++j[257+st],++E[ot],R=w+J,++P}else M[B++]=t[w],++j[t[w]]}}d=V(t,v,s,M,j,E,O,B,T,w-T,d),s||(d=U(v,d,H))}return F(l,0,r+I(d)+e)}(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,i,r,!e)}(t,n,2,4);return function(t,n){var i=n.level,r=0==i?0:i<6?1:9==i?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)}(r,n),function(t,n,i){for(;i;++n)t[n]=i,i>>>=8}(r,r.length-4,i.d()),r}
7
7
  /** @license
8
8
  *
9
9
  * jsPDF - PDF Document creation from JavaScript
@@ -290,7 +290,7 @@ function(t){var n=function(t){for(var n=t.length,i=new Uint8Array(n),r=0;r<n;r++
290
290
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
291
291
  * ====================================================================
292
292
  */
293
- function(){function t(){return(G.canvg?Promise.resolve(G.canvg):import("./p-72117a18.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}St.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw Y.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw Y.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),St.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},St.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(a),f=[],c=0,h=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=u.length;for(l=0;l<d;l+=1)i[u[l]].value=i[u[l]].defaultValue,i[u[l]].explicitSet=!1}if("object"===o(t))for(e in t)if(s=t[e],v(u,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(c=0;c<s.length;c+=1)if(r=!0,1===s[c].length&&"number"==typeof s[c][0])f.push(String(s[c]-1));else if(s[c].length>1){for(h=0;h<s[c].length;h+=1)"number"!=typeof s[c][h]&&(r=!1);!0===r&&f.push([s[c][0]-1,s[c][1]-1].join(" "))}i[e].value="["+f.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
293
+ function(){function t(){return(G.canvg?Promise.resolve(G.canvg):import("./p-765a27f3.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}St.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw Y.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw Y.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),St.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},St.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(a),f=[],c=0,h=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=u.length;for(l=0;l<d;l+=1)i[u[l]].value=i[u[l]].defaultValue,i[u[l]].explicitSet=!1}if("object"===o(t))for(e in t)if(s=t[e],v(u,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(c=0;c<s.length;c+=1)if(r=!0,1===s[c].length&&"number"==typeof s[c][0])f.push(String(s[c]-1));else if(s[c].length>1){for(h=0;h<s[c].length;h+=1)"number"!=typeof s[c][h]&&(r=!1);!0===r&&f.push([s[c][0]-1,s[c][1]-1].join(" "))}i[e].value="["+f.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
294
294
  /** ====================================================================
295
295
  * @license
296
296
  * jsPDF XMP metadata plugin
@@ -329,10 +329,10 @@ function(t){var n=function(){return void 0===this.internal.vFS&&(this.internal.v
329
329
  * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
330
330
  * MIT License
331
331
  */
332
- function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,r,e,s,o,a,u,f=n,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],l={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,b=0;this.__bidiEngine__={};var p=function(t){var n=t.charCodeAt(),i=n>>8,r=v[i];return void 0!==r?f[256*r+(255&n)]:252===i||253===i?"AL":w.test(i)?"L":8===i?"R":"N"},N=function(t){for(var n,i=0;i<t.length;i++){if("L"===(n=p(t.charAt(i))))return!1;if("R"===n)return!0}return!1},L=function(t,n,o,a){var u,f,c,h,l=n[a];switch(l){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"N":case"AN":break;case"EN":m&&(l="AN");break;case"AL":m=!0,l="R";break;case"WS":case"BN":l="N";break;case"CS":a<1||a+1>=n.length||"EN"!==(u=o[a-1])&&"AN"!==u||"EN"!==(f=n[a+1])&&"AN"!==f?l="N":m&&(f="AN"),l=f===u?f:"N";break;case"ES":l="EN"===(u=a>0?o[a-1]:"B")&&a+1<n.length&&"EN"===n[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){l="EN";break}if(m){l="N";break}for(c=a+1,h=n.length;c<h&&"ET"===n[c];)c++;l=c<h&&"EN"===n[c]?"EN":"N";break;case"NSM":if(e&&!s){for(h=n.length,c=a+1;c<h&&"NSM"===n[c];)c++;if(c<h){var v=t[a];if(u=n[c],(v>=1425&&v<=2303||64286===v)&&("R"===u||"AL"===u)){l="R";break}}}l=a<1||"B"===(u=n[a-1])?"N":o[a-1];break;case"B":m=!1,i=!0,l=b;break;case"S":r=!0,l="N"}return l},g=function(t,n,i){var r=t.split("");return i&&A(r,i,{hiLevel:b}),r.reverse(),n&&n.reverse(),r.join("")},A=function(t,n,e){var s,o,a,u,f,v=-1,d=t.length,w=0,N=[],g=b?h:c,A=[];for(m=!1,i=!1,r=!1,o=0;o<d;o++)A[o]=p(t[o]);for(a=0;a<d;a++){if(f=w,N[a]=L(t,A,N,a),s=240&(w=g[f][l[N[a]]]),n[a]=u=g[w&=15][5],s>0)if(16===s){for(o=v;o<a;o++)n[o]=1;v=-1}else v=-1;if(g[w][6])-1===v&&(v=a);else if(v>-1){for(o=v;o<a;o++)n[o]=u;v=-1}"B"===A[a]&&(n[a]=0),e.hiLevel|=u}r&&function(t,n,i){for(var r=0;r<i;r++)if("S"===t[r]){n[r]=b;for(var e=r-1;e>=0&&"WS"===t[e];e--)n[e]=b}}(A,n,d)},y=function(t,n,r,e,s){if(!(s.hiLevel<t)){if(1===t&&1===b&&!i)return n.reverse(),void(r&&r.reverse());for(var o,a,u,f,c=n.length,h=0;h<c;){if(e[h]>=t){for(u=h+1;u<c&&e[u]>=t;)u++;for(f=h,a=u-1;f<a;f++,a--)o=n[f],n[f]=n[a],n[a]=o,r&&(o=r[f],r[f]=r[a],r[a]=o);h=u}h++}}},k=function(t,n,i){var r=t.split(""),e={hiLevel:b};return i||(i=[]),A(r,i,e),function(t,n,i){if(0!==i.hiLevel&&u)for(var r,e=0;e<t.length;e++)1===n[e]&&(r=d.indexOf(t[e]))>=0&&(t[e]=d[r+1])}(r,i,e),y(2,r,n,i,e),y(1,r,n,i,e),r.join("")};return this.__bidiEngine__.doBidiReorder=function(t,n,i){if(function(t,n){if(n)for(var i=0;i<t.length;i++)n[i]=i;void 0===s&&(s=N(t)),void 0===a&&(a=N(t))}(t,n),e||!o||a)if(e&&o&&s^a)b=s?1:0,t=g(t,n,i);else if(!e&&o&&a)b=s?1:0,t=k(t,n,i),t=g(t,n);else if(!e||s||o||a){if(e&&!o&&s^a)t=g(t,n),s?(b=0,t=k(t,n,i)):(b=1,t=k(t,n,i),t=g(t,n));else if(e&&s&&!o&&a)b=1,t=k(t,n,i),t=g(t,n);else if(!e&&!o&&s^a){var r=u;s?(b=1,t=k(t,n,i),b=0,u=!1,t=k(t,n,i),u=r):(b=0,t=k(t,n,i),t=g(t,n),b=1,u=!1,t=k(t,n,i),u=r,t=g(t,n))}}else b=0,t=k(t,n,i);else b=s?1:0,t=k(t,n,i);return t},this.__bidiEngine__.setOptions=function(t){t&&(e=t.isInputVisual,o=t.isOutputVisual,s=t.isInputRtl,a=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var n=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],i=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var n=t.text,r=t.options||{},e=[];if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,i.setOptions(r),"[object Array]"===Object.prototype.toString.call(n)){var s=0;for(e=[],s=0;s<n.length;s+=1)"[object Array]"===Object.prototype.toString.call(n[s])?e.push([i.doBidiReorder(n[s][0]),n[s][1],n[s][2]]):e.push([i.doBidiReorder(n[s])]);t.text=e}else t.text=i.doBidiReorder(n);i.setOptions({isInputVisual:!0})}])}(St),St.API.TTFFont=function(){function t(t){var n;if(this.rawData=t,n=this.contents=new _n(t),this.contents.pos=4,"ttcf"===n.readString(4))throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new hi(this),this.registerTTF()}return t.open=function(n){return new t(n)},t.prototype.parse=function(){return this.directory=new Gn(this.contents),this.head=new Xn(this),this.name=new ri(this),this.cmap=new Zn(this),this.toUnicode={},this.hhea=new Qn(this),this.maxp=new ei(this),this.hmtx=new si(this),this.post=new ni(this),this.os2=new ti(this),this.loca=new ci(this),this.glyf=new ai(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,n,i,r;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,i,r;for(r=[],t=0,n=(i=this.bbox).length;t<n;t++)r.push(Math.round(i[t]*this.scaleFactor));return r}.call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),0!=(32768&(t=i>>16))&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(r=this.familyClass)||2===r||3===r||4===r||5===r||7===r,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var n;return(null!=(n=this.cmap.unicode)?n.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},t.prototype.widthOfString=function(t,n,i){var r,e,s,o;for(s=0,e=0,o=(t=""+t).length;0<=o?e<o:e>o;e=0<=o?++e:--e)r=t.charCodeAt(e),s+=this.widthOfGlyph(this.characterToGlyph(r))+i*(1e3/n)||0;return s*(n/1e3)},t.prototype.lineHeight=function(t,n){return null==n&&(n=!1),(this.ascender+(n?this.lineGap:0)-this.decender)/1e3*t},t}();var Hn,_n=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var n,i;for(i=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)i[n]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(t){var n,i,r;for(r=[],n=0,i=t.length;0<=i?n<i:n>i;n=0<=i?++n:--n)r.push(this.writeByte(t.charCodeAt(n)));return r},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,n,i,r,e,s,o,a;return t=this.readByte(),n=this.readByte(),i=this.readByte(),r=this.readByte(),e=this.readByte(),s=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^i)+4294967296*(255^r)+16777216*(255^e)+65536*(255^s)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*n+1099511627776*i+4294967296*r+16777216*e+65536*s+256*o+a},t.prototype.writeLongLong=function(t){var n,i;return n=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var n,i;for(n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push(this.readByte());return n},t.prototype.write=function(t){var n,i,r;for(r=[],n=0,i=t.length;n<i;n++)r.push(this.writeByte(t[n]));return r},t}(),Gn=function(){var t;function n(t){var n,i,r;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,r=this.tableCount;0<=r?i<r:i>r;i=0<=r?++i:--i)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return n.prototype.encode=function(n){var i,r,e,s,o,a,u,f,c,h,l,v;for(v in h=Object.keys(n).length,o=Math.log(2),f=16*Math.floor(Math.log(h)/o),e=Math.floor(f/o),u=16*h-f,(r=new _n).writeInt(this.scalarType),r.writeShort(h),r.writeShort(f),r.writeShort(e),r.writeShort(u),a=r.pos+16*h,s=null,l=[],n)for(c=n[v],r.writeString(v),r.writeInt(t(c)),r.writeInt(a),r.writeInt(c.length),l=l.concat(c),"head"===v&&(s=a),a+=c.length;a%4;)l.push(0),a++;return r.write(l),i=2981146554-t(r.data),r.pos=s+8,r.writeUInt32(i),r.data},t=function(t){var n,i,r,e;for(t=oi.call(t);t.length%4;)t.push(0);for(r=new _n(t),i=0,n=0,e=t.length;n<e;n=n+=4)i+=r.readUInt32();return 4294967295&i},n}(),Jn={}.hasOwnProperty,Yn=function(t,n){for(var i in n)Jn.call(n,i)&&(t[i]=n[i]);function r(){this.constructor=t}return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Hn=function(){function t(t){var n;this.file=t,this.exists=!!(n=this.file.directory.tables[this.tag]),n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Kn,Xn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="head",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},t.prototype.encode=function(t){var n;return(n=new _n).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},t}(),$n=function(){function t(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(l=t.readUInt16(),h=l/2,t.pos+=6,e=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),t.pos+=2,d=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),u=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),f=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),r=(this.length-t.pos+this.offset)/2,o=function(){var n,i;for(i=[],a=n=0;0<=r?n<r:n>r;a=0<=r?++n:--n)i.push(t.readUInt16());return i}(),a=m=0,p=e.length;m<p;a=++m)for(w=e[a],i=b=v=d[a];v<=w?b<=w:b>=w;i=v<=w?++b:--b)0===f[a]?s=i+u[a]:0!==(s=o[f[a]/2+(i-v)-(h-a)]||0)&&(s+=u[a]),this.codeMap[i]=65535&s}t.pos=c}return t.encode=function(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N,L,g,A,y,k,S,x,q,M,j,E,P,O,I,F,B,R,T,C,D,z,U,V,W,H,_,G;switch(M=new _n,s=Object.keys(t).sort((function(t,n){return t-n})),n){case"macroman":for(d=0,w=function(){var t=[];for(v=0;v<256;++v)t.push(0);return t}(),b={0:0},e={},j=0,I=s.length;j<I;j++)null==b[W=t[r=s[j]]]&&(b[W]=++d),e[r]={old:t[r],new:b[t[r]]},w[r]=b[t[r]];return M.writeUInt16(1),M.writeUInt16(0),M.writeUInt32(12),M.writeUInt16(0),M.writeUInt16(262),M.writeUInt16(0),M.write(w),{charMap:e,subtable:M.data,maxGlyphID:d+1};case"unicode":for(x=[],c=[],p=0,b={},i={},m=u=null,E=0,F=s.length;E<F;E++)null==b[N=t[r=s[E]]]&&(b[N]=++p),i[r]={old:N,new:b[N]},o=b[N]-r,null!=m&&o===u||(m&&c.push(m),x.push(r),u=o),m=r;for(m&&c.push(m),c.push(65535),x.push(65535),k=2*(y=x.length),A=2*Math.pow(Math.log(y)/Math.LN2,2),h=Math.log(A/2)/Math.LN2,g=2*y-A,a=[],L=[],l=[],v=P=0,B=x.length;P<B;v=++P){if(f=c[v],65535===(S=x[v])){a.push(0),L.push(0);break}if(S-(q=i[S].new)>=32768)for(a.push(0),L.push(2*(l.length+y-v)),r=O=S;S<=f?O<=f:O>=f;r=S<=f?++O:--O)l.push(i[r].new);else a.push(q-S),L.push(0)}for(M.writeUInt16(3),M.writeUInt16(1),M.writeUInt32(12),M.writeUInt16(4),M.writeUInt16(16+8*y+2*l.length),M.writeUInt16(0),M.writeUInt16(k),M.writeUInt16(A),M.writeUInt16(h),M.writeUInt16(g),U=0,R=c.length;U<R;U++)M.writeUInt16(r=c[U]);for(M.writeUInt16(0),V=0,T=x.length;V<T;V++)M.writeUInt16(r=x[V]);for(H=0,C=a.length;H<C;H++)M.writeUInt16(o=a[H]);for(_=0,D=L.length;_<D;_++)M.writeUInt16(L[_]);for(G=0,z=l.length;G<z;G++)M.writeUInt16(d=l[G]);return{charMap:i,subtable:M.data,maxGlyphID:p+1}}},t}(),Zn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="cmap",t.prototype.parse=function(t){var n,i,r;for(t.pos=this.offset,this.version=t.readUInt16(),r=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n=new $n(t,this.offset),this.tables.push(n),n.isUnicode&&null==this.unicode&&(this.unicode=n);return!0},t.encode=function(t,n){var i,r;return null==n&&(n="macroman"),i=$n.encode(t,n),(r=new _n).writeUInt16(0),r.writeUInt16(1),i.table=r.data.concat(i.subtable),i},t}(),Qn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="hhea",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},t}(),ti=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(t.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),ni=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="post",t.prototype.parse=function(t){var n,i,r;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var e;for(i=t.readUInt16(),this.glyphNameIndex=[],e=0;0<=i?e<i:e>i;e=0<=i?++e:--e)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],r=[];t.pos<this.offset+this.length;)n=t.readByte(),r.push(this.names.push(t.readString(n)));return r;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 262144:return this.map=function(){var n,i,r;for(r=[],e=n=0,i=this.file.maxp.numGlyphs;0<=i?n<i:n>i;e=0<=i?++n:--n)r.push(t.readUInt32());return r}.call(this)}},t}(),ii=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},ri=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="name",t.prototype.parse=function(t){var n,i,r,e,s,o,a,u,f,c,h;for(t.pos=this.offset,t.readShort(),n=t.readShort(),o=t.readShort(),i=[],e=0;0<=n?e<n:e>n;e=0<=n?++e:--e)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},e=f=0,c=i.length;f<c;e=++f)t.pos=(r=i[e]).offset,u=t.readString(r.length),s=new ii(u,r),null==a[h=r.nameID]&&(a[h]=[]),a[r.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),ei=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="maxp",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},t}(),si=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="hmtx",t.prototype.parse=function(t){var n,i,r,e,s,o;for(t.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var i,e;for(e=[],n=i=0;0<=r?i<r:i>r;n=0<=r?++i:--i)e.push(t.readInt16());return e}(),this.widths=function(){var t,n,i,r;for(r=[],t=0,n=(i=this.metrics).length;t<n;t++)r.push(i[t].advance);return r}.call(this),i=this.widths[this.widths.length-1],o=[],n=e=0;0<=r?e<r:e>r;n=0<=r?++e:--e)o.push(this.widths.push(i));return o},t.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},t}(),oi=[].slice,ai=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var n,i,r,e,s,o,a,u,f,c;return t in this.cache?this.cache[t]:(n=this.file.contents,i=(e=this.file.loca).indexOf(t),0===(r=e.lengthOf(t))?this.cache[t]=null:(n.pos=this.offset+i,s=(o=new _n(n.read(r))).readShort(),u=o.readShort(),c=o.readShort(),a=o.readShort(),f=o.readShort(),this.cache[t]=-1===s?new fi(o,u,c,a,f):new ui(o,s,u,c,a,f),this.cache[t]))},t.prototype.encode=function(t,n,i){var r,e,s,o,a;for(s=[],e=[],o=0,a=n.length;o<a;o++)r=t[n[o]],e.push(s.length),r&&(s=s.concat(r.encode(i)));return e.push(s.length),{table:s,offsets:e}},t}(),ui=function(){function t(t,n,i,r,e,s){this.raw=t,this.numberOfContours=n,this.xMin=i,this.yMin=r,this.xMax=e,this.yMax=s,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),fi=function(){function t(t,n,i,r,e){var s,o;for(this.raw=t,this.xMin=n,this.yMin=i,this.xMax=r,this.yMax=e,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return t.prototype.encode=function(){var t,n,i;for(n=new _n(oi.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)n.pos=this.glyphOffsets[t];return n.data},t}(),ci=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="loca",t.prototype.parse=function(t){var n;return t.pos=this.offset,this.offsets=0===this.file.head.indexToLocFormat?function(){var i,r;for(r=[],n=0,i=this.length;n<i;n+=2)r.push(2*t.readUInt16());return r}.call(this):function(){var i,r;for(r=[],n=0,i=this.length;n<i;n+=4)r.push(t.readUInt32());return r}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,n){for(var i=new Uint32Array(this.offsets.length),r=0,e=0,s=0;s<i.length;++s)if(i[s]=r,e<n.length&&n[e]==s){++e,i[s]=r;var o=this.offsets[s+1]-this.offsets[s];o>0&&(r+=o)}for(var a=new Array(4*i.length),u=0;u<i.length;++u)a[4*u+3]=255&i[u],a[4*u+2]=(65280&i[u])>>8,a[4*u+1]=(16711680&i[u])>>16,a[4*u]=(4278190080&i[u])>>24;return a},t}(),hi=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,n,i,r;for(n in i=this.font.cmap.tables[0].codeMap,t={},r=this.subset)t[n]=i[r[n]];return t},t.prototype.glyphsFor=function(t){var n,i,r,e,s,o,a;for(r={},s=0,o=t.length;s<o;s++)r[e=t[s]]=this.font.glyf.glyphFor(e);for(e in n=[],r)(null!=(i=r[e])?i.compound:void 0)&&n.push.apply(n,i.glyphIDs);if(n.length>0)for(e in a=this.glyphsFor(n))r[e]=i=a[e];return r},t.prototype.encode=function(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w;for(r in i=Zn.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),h={0:0},w=i.charMap)h[(o=w[r]).old]=o.new;for(l in c=i.maxGlyphID,s)l in h||(h[l]=c++);return u=function(t){var n,i;for(n in i={},t)i[t[n]]=n;return i}(h),f=Object.keys(u).sort((function(t,n){return t-n})),v=function(){var t,n,i;for(i=[],t=0,n=f.length;t<n;t++)i.push(u[f[t]]);return i}(),e=this.font.glyf.encode(s,v,h),a=this.font.loca.encode(e.offsets,v),d={cmap:this.font.cmap.raw(),glyf:e.table,loca:a,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(d["OS/2"]=this.font.os2.raw()),this.font.directory.encode(d)},t}();St.API.PDFObject=function(){var t;function n(){}return t=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},n.convert=function(i){var r,e;if(Array.isArray(i))return"["+function(){var t,r,e;for(e=[],t=0,r=i.length;t<r;t++)e.push(n.convert(i[t]));return e}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i?i.isString:void 0)return"("+i+")";if(i instanceof Date)return"(D:"+t(i.getUTCFullYear(),4)+t(i.getUTCMonth(),2)+t(i.getUTCDate(),2)+t(i.getUTCHours(),2)+t(i.getUTCMinutes(),2)+t(i.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(i)){for(r in e=["<<"],i)e.push("/"+r+" "+n.convert(i[r]));return e.push(">>"),e.join("\n")}return""+i},n}(),function(t){t.A4="A4",t.ANSI_A="ANSI A"}(Kn||(Kn={}));class li{constructor(){this.dataPath="",this.lang="en",this.title="",this.fontProps={fontResolutionInchesPerPoint:1/72,fontFullHeightRatio:1.28},this.lineOptions={x1:0,y1:0,x2:0,y2:0,lineProperties:{thickness:.1,color:"000000",opacity:1}},this.pageOptions={pageType:Kn.ANSI_A,width:8.5,height:11,leftMargin:.25,rightMargin:.25,topMargin:.25,bottomMargin:.25,drawNeatline:!1},this.rectangleOptions={left:0,top:0,width:8.5,height:11,lineProperties:{thickness:.1,color:"000000",opacity:1},fillColor:"",fillOpacity:1},this.tableOptions={lineProperties:{thickness:.1,color:"",opacity:1},textProperties:{left:0,top:0,fontPoints:1,fontColor:"000000"}},this.textOptions={left:0,top:0,fontPoints:1,fontColor:"000000"}}static getPageSize(t){switch("string"==typeof t&&(t=t===Kn.A4?Kn.A4:Kn.ANSI_A),t){case Kn.A4:return{width:8.25,height:11.708333};case Kn.ANSI_A:return{width:8.5,height:11}}}addPage(){}applyOpacity(t,n){return t*n+1*(1-n)}drawLine(t){const n={...this.lineOptions,...t};n.lineProperties={...this.lineOptions.lineProperties,...t.lineProperties},this.updateLineProperties(n.lineProperties),this.lineOptions=n}drawNeatline(t={thickness:.005,color:"0000ff",opacity:.2}){this.drawRectangle({left:0,top:0,width:this.pageOptions.width-this.pageOptions.leftMargin-this.pageOptions.rightMargin,height:this.pageOptions.height-this.pageOptions.topMargin-this.pageOptions.bottomMargin,lineProperties:t})}drawRectangle(t){const n={...this.rectangleOptions,...t};n.lineProperties={...this.lineOptions.lineProperties,...t.lineProperties},this.updateLineProperties(n.lineProperties),this.rectangleOptions.fillColor===n.fillColor&&this.rectangleOptions.fillOpacity===n.fillOpacity||this.setFillColor(n.fillColor,n.fillOpacity),this.rectangleOptions=n}drawTable(t,n){const i={};i.lineProperties={...this.tableOptions.lineProperties,...n.lineProperties},i.textProperties={...this.tableOptions.textProperties,...n.textProperties},this.tableOptions.textProperties.fontPoints!==i.textProperties.fontPoints&&this.setFontSize(i.textProperties.fontPoints),this.tableOptions.textProperties.fontColor!==i.textProperties.fontColor&&this.setFontColor(i.textProperties.fontColor),this.updateLineProperties(i.lineProperties),this.tableOptions=i}drawText(t,n){const i={...this.textOptions,...n};this.textOptions.fontPoints!==i.fontPoints&&this.setFontSize(i.fontPoints),this.textOptions.fontColor!==i.fontColor&&this.setFontColor(i.fontColor),this.textOptions=i}fontAscenderBaselineHeight(t){return t*this.fontProps.fontResolutionInchesPerPoint}fontAscenderDescenderHeight(t){return this.fontProps.fontFullHeightRatio*this.fontAscenderBaselineHeight(t)}getFontFileName(t){let n="0b7681dc140844ee9f409bdac249fbf0-general";return"ja"===t?n="0b7681dc140844ee9f409bdac249fbf0-japanese":"ko"===t?n="0b7681dc140844ee9f409bdac249fbf0-korean":"zh-cn"===t?n="0b7681dc140844ee9f409bdac249fbf0-simplified-chinese":"zh-hk"!==t&&"zh-tw"!==t||(n="0b7681dc140844ee9f409bdac249fbf0-traditional-chinese"),n}getTextWidth(t,n){return t.length*n}hexToRGB(t,n=1){const i=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:this.applyOpacity(parseInt(i[1],16)/255,n),g:this.applyOpacity(parseInt(i[2],16)/255,n),b:this.applyOpacity(parseInt(i[3],16)/255,n)}:{r:0,g:0,b:0}}async initialize(t={},n="",i="en",r="",e=!1){if("{}"!==JSON.stringify(t)){this.pageOptions.pageType=t.pageType===Kn.A4?Kn.A4:Kn.ANSI_A;const n=li.getPageSize(this.pageOptions.pageType);this.pageOptions.width=n.width,this.pageOptions.height=n.height,this.pageOptions.leftMargin=t.leftMargin??this.pageOptions.leftMargin,this.pageOptions.rightMargin=t.rightMargin??this.pageOptions.rightMargin,this.pageOptions.topMargin=t.topMargin??this.pageOptions.topMargin,this.pageOptions.bottomMargin=t.bottomMargin??this.pageOptions.bottomMargin}return this.dataPath=n,this.lang=i,this.title=r||"PDF Document",this.pageOptions.drawNeatline=e,Promise.resolve()}save(){}setDrawColor(t,n=1){}setFillColor(t,n=1){}setFont(t){return Promise.resolve()}setFontColor(t){}setFontSize(t){}setLang(t){return this.lang!==t?(this.lang=t,this.setFont(t)):Promise.resolve()}setLineWidth(t){}updateLineProperties(t){this.lineOptions.lineProperties.thickness!==t.thickness&&this.setLineWidth(t.thickness),this.lineOptions.lineProperties.color===t.color&&this.lineOptions.lineProperties.opacity===t.opacity||this.setDrawColor(t.color,t.opacity),this.lineOptions.lineProperties=t}}
332
+ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,r,e,s,o,a,u,f=n,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],l={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,b=0;this.__bidiEngine__={};var p=function(t){var n=t.charCodeAt(),i=n>>8,r=v[i];return void 0!==r?f[256*r+(255&n)]:252===i||253===i?"AL":w.test(i)?"L":8===i?"R":"N"},N=function(t){for(var n,i=0;i<t.length;i++){if("L"===(n=p(t.charAt(i))))return!1;if("R"===n)return!0}return!1},L=function(t,n,o,a){var u,f,c,h,l=n[a];switch(l){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"N":case"AN":break;case"EN":m&&(l="AN");break;case"AL":m=!0,l="R";break;case"WS":case"BN":l="N";break;case"CS":a<1||a+1>=n.length||"EN"!==(u=o[a-1])&&"AN"!==u||"EN"!==(f=n[a+1])&&"AN"!==f?l="N":m&&(f="AN"),l=f===u?f:"N";break;case"ES":l="EN"===(u=a>0?o[a-1]:"B")&&a+1<n.length&&"EN"===n[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){l="EN";break}if(m){l="N";break}for(c=a+1,h=n.length;c<h&&"ET"===n[c];)c++;l=c<h&&"EN"===n[c]?"EN":"N";break;case"NSM":if(e&&!s){for(h=n.length,c=a+1;c<h&&"NSM"===n[c];)c++;if(c<h){var v=t[a];if(u=n[c],(v>=1425&&v<=2303||64286===v)&&("R"===u||"AL"===u)){l="R";break}}}l=a<1||"B"===(u=n[a-1])?"N":o[a-1];break;case"B":m=!1,i=!0,l=b;break;case"S":r=!0,l="N"}return l},g=function(t,n,i){var r=t.split("");return i&&A(r,i,{hiLevel:b}),r.reverse(),n&&n.reverse(),r.join("")},A=function(t,n,e){var s,o,a,u,f,v=-1,d=t.length,w=0,N=[],g=b?h:c,A=[];for(m=!1,i=!1,r=!1,o=0;o<d;o++)A[o]=p(t[o]);for(a=0;a<d;a++){if(f=w,N[a]=L(t,A,N,a),s=240&(w=g[f][l[N[a]]]),n[a]=u=g[w&=15][5],s>0)if(16===s){for(o=v;o<a;o++)n[o]=1;v=-1}else v=-1;if(g[w][6])-1===v&&(v=a);else if(v>-1){for(o=v;o<a;o++)n[o]=u;v=-1}"B"===A[a]&&(n[a]=0),e.hiLevel|=u}r&&function(t,n,i){for(var r=0;r<i;r++)if("S"===t[r]){n[r]=b;for(var e=r-1;e>=0&&"WS"===t[e];e--)n[e]=b}}(A,n,d)},y=function(t,n,r,e,s){if(!(s.hiLevel<t)){if(1===t&&1===b&&!i)return n.reverse(),void(r&&r.reverse());for(var o,a,u,f,c=n.length,h=0;h<c;){if(e[h]>=t){for(u=h+1;u<c&&e[u]>=t;)u++;for(f=h,a=u-1;f<a;f++,a--)o=n[f],n[f]=n[a],n[a]=o,r&&(o=r[f],r[f]=r[a],r[a]=o);h=u}h++}}},k=function(t,n,i){var r=t.split(""),e={hiLevel:b};return i||(i=[]),A(r,i,e),function(t,n,i){if(0!==i.hiLevel&&u)for(var r,e=0;e<t.length;e++)1===n[e]&&(r=d.indexOf(t[e]))>=0&&(t[e]=d[r+1])}(r,i,e),y(2,r,n,i,e),y(1,r,n,i,e),r.join("")};return this.__bidiEngine__.doBidiReorder=function(t,n,i){if(function(t,n){if(n)for(var i=0;i<t.length;i++)n[i]=i;void 0===s&&(s=N(t)),void 0===a&&(a=N(t))}(t,n),e||!o||a)if(e&&o&&s^a)b=s?1:0,t=g(t,n,i);else if(!e&&o&&a)b=s?1:0,t=k(t,n,i),t=g(t,n);else if(!e||s||o||a){if(e&&!o&&s^a)t=g(t,n),s?(b=0,t=k(t,n,i)):(b=1,t=k(t,n,i),t=g(t,n));else if(e&&s&&!o&&a)b=1,t=k(t,n,i),t=g(t,n);else if(!e&&!o&&s^a){var r=u;s?(b=1,t=k(t,n,i),b=0,u=!1,t=k(t,n,i),u=r):(b=0,t=k(t,n,i),t=g(t,n),b=1,u=!1,t=k(t,n,i),u=r,t=g(t,n))}}else b=0,t=k(t,n,i);else b=s?1:0,t=k(t,n,i);return t},this.__bidiEngine__.setOptions=function(t){t&&(e=t.isInputVisual,o=t.isOutputVisual,s=t.isInputRtl,a=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var n=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],i=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var n=t.text,r=t.options||{},e=[];if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,i.setOptions(r),"[object Array]"===Object.prototype.toString.call(n)){var s=0;for(e=[],s=0;s<n.length;s+=1)"[object Array]"===Object.prototype.toString.call(n[s])?e.push([i.doBidiReorder(n[s][0]),n[s][1],n[s][2]]):e.push([i.doBidiReorder(n[s])]);t.text=e}else t.text=i.doBidiReorder(n);i.setOptions({isInputVisual:!0})}])}(St),St.API.TTFFont=function(){function t(t){var n;if(this.rawData=t,n=this.contents=new _n(t),this.contents.pos=4,"ttcf"===n.readString(4))throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new hi(this),this.registerTTF()}return t.open=function(n){return new t(n)},t.prototype.parse=function(){return this.directory=new Gn(this.contents),this.head=new Xn(this),this.name=new ri(this),this.cmap=new Zn(this),this.toUnicode={},this.hhea=new Qn(this),this.maxp=new ei(this),this.hmtx=new si(this),this.post=new ni(this),this.os2=new ti(this),this.loca=new ci(this),this.glyf=new ai(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,n,i,r;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,i,r;for(r=[],t=0,n=(i=this.bbox).length;t<n;t++)r.push(Math.round(i[t]*this.scaleFactor));return r}.call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),0!=(32768&(t=i>>16))&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(r=this.familyClass)||2===r||3===r||4===r||5===r||7===r,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var n;return(null!=(n=this.cmap.unicode)?n.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},t.prototype.widthOfString=function(t,n,i){var r,e,s,o;for(s=0,e=0,o=(t=""+t).length;0<=o?e<o:e>o;e=0<=o?++e:--e)r=t.charCodeAt(e),s+=this.widthOfGlyph(this.characterToGlyph(r))+i*(1e3/n)||0;return s*(n/1e3)},t.prototype.lineHeight=function(t,n){return null==n&&(n=!1),(this.ascender+(n?this.lineGap:0)-this.decender)/1e3*t},t}();var Hn,_n=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var n,i;for(i=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)i[n]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(t){var n,i,r;for(r=[],n=0,i=t.length;0<=i?n<i:n>i;n=0<=i?++n:--n)r.push(this.writeByte(t.charCodeAt(n)));return r},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,n,i,r,e,s,o,a;return t=this.readByte(),n=this.readByte(),i=this.readByte(),r=this.readByte(),e=this.readByte(),s=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^i)+4294967296*(255^r)+16777216*(255^e)+65536*(255^s)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*n+1099511627776*i+4294967296*r+16777216*e+65536*s+256*o+a},t.prototype.writeLongLong=function(t){var n,i;return n=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var n,i;for(n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push(this.readByte());return n},t.prototype.write=function(t){var n,i,r;for(r=[],n=0,i=t.length;n<i;n++)r.push(this.writeByte(t[n]));return r},t}(),Gn=function(){var t;function n(t){var n,i,r;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,r=this.tableCount;0<=r?i<r:i>r;i=0<=r?++i:--i)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return n.prototype.encode=function(n){var i,r,e,s,o,a,u,f,c,h,l,v;for(v in h=Object.keys(n).length,o=Math.log(2),f=16*Math.floor(Math.log(h)/o),e=Math.floor(f/o),u=16*h-f,(r=new _n).writeInt(this.scalarType),r.writeShort(h),r.writeShort(f),r.writeShort(e),r.writeShort(u),a=r.pos+16*h,s=null,l=[],n)for(c=n[v],r.writeString(v),r.writeInt(t(c)),r.writeInt(a),r.writeInt(c.length),l=l.concat(c),"head"===v&&(s=a),a+=c.length;a%4;)l.push(0),a++;return r.write(l),i=2981146554-t(r.data),r.pos=s+8,r.writeUInt32(i),r.data},t=function(t){var n,i,r,e;for(t=oi.call(t);t.length%4;)t.push(0);for(r=new _n(t),i=0,n=0,e=t.length;n<e;n=n+=4)i+=r.readUInt32();return 4294967295&i},n}(),Jn={}.hasOwnProperty,Yn=function(t,n){for(var i in n)Jn.call(n,i)&&(t[i]=n[i]);function r(){this.constructor=t}return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Hn=function(){function t(t){var n;this.file=t,this.exists=!!(n=this.file.directory.tables[this.tag]),n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Kn,Xn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="head",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},t.prototype.encode=function(t){var n;return(n=new _n).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},t}(),$n=function(){function t(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(l=t.readUInt16(),h=l/2,t.pos+=6,e=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),t.pos+=2,d=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),u=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),f=function(){var n,i;for(i=[],a=n=0;0<=h?n<h:n>h;a=0<=h?++n:--n)i.push(t.readUInt16());return i}(),r=(this.length-t.pos+this.offset)/2,o=function(){var n,i;for(i=[],a=n=0;0<=r?n<r:n>r;a=0<=r?++n:--n)i.push(t.readUInt16());return i}(),a=m=0,p=e.length;m<p;a=++m)for(w=e[a],i=b=v=d[a];v<=w?b<=w:b>=w;i=v<=w?++b:--b)0===f[a]?s=i+u[a]:0!==(s=o[f[a]/2+(i-v)-(h-a)]||0)&&(s+=u[a]),this.codeMap[i]=65535&s}t.pos=c}return t.encode=function(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N,L,g,A,y,k,S,x,q,M,j,E,P,O,I,F,B,R,T,C,D,z,U,V,W,H,_,G;switch(M=new _n,s=Object.keys(t).sort((function(t,n){return t-n})),n){case"macroman":for(d=0,w=function(){var t=[];for(v=0;v<256;++v)t.push(0);return t}(),b={0:0},e={},j=0,I=s.length;j<I;j++)null==b[W=t[r=s[j]]]&&(b[W]=++d),e[r]={old:t[r],new:b[t[r]]},w[r]=b[t[r]];return M.writeUInt16(1),M.writeUInt16(0),M.writeUInt32(12),M.writeUInt16(0),M.writeUInt16(262),M.writeUInt16(0),M.write(w),{charMap:e,subtable:M.data,maxGlyphID:d+1};case"unicode":for(x=[],c=[],p=0,b={},i={},m=u=null,E=0,F=s.length;E<F;E++)null==b[N=t[r=s[E]]]&&(b[N]=++p),i[r]={old:N,new:b[N]},o=b[N]-r,null!=m&&o===u||(m&&c.push(m),x.push(r),u=o),m=r;for(m&&c.push(m),c.push(65535),x.push(65535),k=2*(y=x.length),A=2*Math.pow(Math.log(y)/Math.LN2,2),h=Math.log(A/2)/Math.LN2,g=2*y-A,a=[],L=[],l=[],v=P=0,B=x.length;P<B;v=++P){if(f=c[v],65535===(S=x[v])){a.push(0),L.push(0);break}if(S-(q=i[S].new)>=32768)for(a.push(0),L.push(2*(l.length+y-v)),r=O=S;S<=f?O<=f:O>=f;r=S<=f?++O:--O)l.push(i[r].new);else a.push(q-S),L.push(0)}for(M.writeUInt16(3),M.writeUInt16(1),M.writeUInt32(12),M.writeUInt16(4),M.writeUInt16(16+8*y+2*l.length),M.writeUInt16(0),M.writeUInt16(k),M.writeUInt16(A),M.writeUInt16(h),M.writeUInt16(g),U=0,R=c.length;U<R;U++)M.writeUInt16(r=c[U]);for(M.writeUInt16(0),V=0,T=x.length;V<T;V++)M.writeUInt16(r=x[V]);for(H=0,C=a.length;H<C;H++)M.writeUInt16(o=a[H]);for(_=0,D=L.length;_<D;_++)M.writeUInt16(L[_]);for(G=0,z=l.length;G<z;G++)M.writeUInt16(d=l[G]);return{charMap:i,subtable:M.data,maxGlyphID:p+1}}},t}(),Zn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="cmap",t.prototype.parse=function(t){var n,i,r;for(t.pos=this.offset,this.version=t.readUInt16(),r=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n=new $n(t,this.offset),this.tables.push(n),n.isUnicode&&null==this.unicode&&(this.unicode=n);return!0},t.encode=function(t,n){var i,r;return null==n&&(n="macroman"),i=$n.encode(t,n),(r=new _n).writeUInt16(0),r.writeUInt16(1),i.table=r.data.concat(i.subtable),i},t}(),Qn=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="hhea",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},t}(),ti=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(t.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),ni=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="post",t.prototype.parse=function(t){var n,i,r;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var e;for(i=t.readUInt16(),this.glyphNameIndex=[],e=0;0<=i?e<i:e>i;e=0<=i?++e:--e)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],r=[];t.pos<this.offset+this.length;)n=t.readByte(),r.push(this.names.push(t.readString(n)));return r;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 262144:return this.map=function(){var n,i,r;for(r=[],e=n=0,i=this.file.maxp.numGlyphs;0<=i?n<i:n>i;e=0<=i?++n:--n)r.push(t.readUInt32());return r}.call(this)}},t}(),ii=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},ri=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="name",t.prototype.parse=function(t){var n,i,r,e,s,o,a,u,f,c,h;for(t.pos=this.offset,t.readShort(),n=t.readShort(),o=t.readShort(),i=[],e=0;0<=n?e<n:e>n;e=0<=n?++e:--e)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},e=f=0,c=i.length;f<c;e=++f)t.pos=(r=i[e]).offset,u=t.readString(r.length),s=new ii(u,r),null==a[h=r.nameID]&&(a[h]=[]),a[r.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),ei=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="maxp",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},t}(),si=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="hmtx",t.prototype.parse=function(t){var n,i,r,e,s,o;for(t.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var i,e;for(e=[],n=i=0;0<=r?i<r:i>r;n=0<=r?++i:--i)e.push(t.readInt16());return e}(),this.widths=function(){var t,n,i,r;for(r=[],t=0,n=(i=this.metrics).length;t<n;t++)r.push(i[t].advance);return r}.call(this),i=this.widths[this.widths.length-1],o=[],n=e=0;0<=r?e<r:e>r;n=0<=r?++e:--e)o.push(this.widths.push(i));return o},t.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},t}(),oi=[].slice,ai=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var n,i,r,e,s,o,a,u,f,c;return t in this.cache?this.cache[t]:(n=this.file.contents,i=(e=this.file.loca).indexOf(t),0===(r=e.lengthOf(t))?this.cache[t]=null:(n.pos=this.offset+i,s=(o=new _n(n.read(r))).readShort(),u=o.readShort(),c=o.readShort(),a=o.readShort(),f=o.readShort(),this.cache[t]=-1===s?new fi(o,u,c,a,f):new ui(o,s,u,c,a,f),this.cache[t]))},t.prototype.encode=function(t,n,i){var r,e,s,o,a;for(s=[],e=[],o=0,a=n.length;o<a;o++)r=t[n[o]],e.push(s.length),r&&(s=s.concat(r.encode(i)));return e.push(s.length),{table:s,offsets:e}},t}(),ui=function(){function t(t,n,i,r,e,s){this.raw=t,this.numberOfContours=n,this.xMin=i,this.yMin=r,this.xMax=e,this.yMax=s,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),fi=function(){function t(t,n,i,r,e){var s,o;for(this.raw=t,this.xMin=n,this.yMin=i,this.xMax=r,this.yMax=e,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return t.prototype.encode=function(){var t,n,i;for(n=new _n(oi.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)n.pos=this.glyphOffsets[t];return n.data},t}(),ci=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return Yn(t,Hn),t.prototype.tag="loca",t.prototype.parse=function(t){var n;return t.pos=this.offset,this.offsets=0===this.file.head.indexToLocFormat?function(){var i,r;for(r=[],n=0,i=this.length;n<i;n+=2)r.push(2*t.readUInt16());return r}.call(this):function(){var i,r;for(r=[],n=0,i=this.length;n<i;n+=4)r.push(t.readUInt32());return r}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,n){for(var i=new Uint32Array(this.offsets.length),r=0,e=0,s=0;s<i.length;++s)if(i[s]=r,e<n.length&&n[e]==s){++e,i[s]=r;var o=this.offsets[s+1]-this.offsets[s];o>0&&(r+=o)}for(var a=new Array(4*i.length),u=0;u<i.length;++u)a[4*u+3]=255&i[u],a[4*u+2]=(65280&i[u])>>8,a[4*u+1]=(16711680&i[u])>>16,a[4*u]=(4278190080&i[u])>>24;return a},t}(),hi=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,n,i,r;for(n in i=this.font.cmap.tables[0].codeMap,t={},r=this.subset)t[n]=i[r[n]];return t},t.prototype.glyphsFor=function(t){var n,i,r,e,s,o,a;for(r={},s=0,o=t.length;s<o;s++)r[e=t[s]]=this.font.glyf.glyphFor(e);for(e in n=[],r)(null!=(i=r[e])?i.compound:void 0)&&n.push.apply(n,i.glyphIDs);if(n.length>0)for(e in a=this.glyphsFor(n))r[e]=i=a[e];return r},t.prototype.encode=function(t,n){var i,r,e,s,o,a,u,f,c,h,l,v,d,w;for(r in i=Zn.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),h={0:0},w=i.charMap)h[(o=w[r]).old]=o.new;for(l in c=i.maxGlyphID,s)l in h||(h[l]=c++);return u=function(t){var n,i;for(n in i={},t)i[t[n]]=n;return i}(h),f=Object.keys(u).sort((function(t,n){return t-n})),v=function(){var t,n,i;for(i=[],t=0,n=f.length;t<n;t++)i.push(u[f[t]]);return i}(),e=this.font.glyf.encode(s,v,h),a=this.font.loca.encode(e.offsets,v),d={cmap:this.font.cmap.raw(),glyf:e.table,loca:a,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(d["OS/2"]=this.font.os2.raw()),this.font.directory.encode(d)},t}();St.API.PDFObject=function(){var t;function n(){}return t=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},n.convert=function(i){var r,e;if(Array.isArray(i))return"["+function(){var t,r,e;for(e=[],t=0,r=i.length;t<r;t++)e.push(n.convert(i[t]));return e}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i?i.isString:void 0)return"("+i+")";if(i instanceof Date)return"(D:"+t(i.getUTCFullYear(),4)+t(i.getUTCMonth(),2)+t(i.getUTCDate(),2)+t(i.getUTCHours(),2)+t(i.getUTCMinutes(),2)+t(i.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(i)){for(r in e=["<<"],i)e.push("/"+r+" "+n.convert(i[r]));return e.push(">>"),e.join("\n")}return""+i},n}(),function(t){t.A4="A4",t.ANSI_A="ANSI A"}(Kn||(Kn={}));class li{constructor(){this.dataPath="",this.lang="en",this.title="",this.fontProps={fontResolutionInchesPerPoint:1/72,fontFullHeightRatio:1.28},this.lineOptions={x1:0,y1:0,x2:0,y2:0,lineProperties:{thickness:.1,color:"000000",opacity:1}},this.pageOptions={pageType:Kn.ANSI_A,width:8.5,height:11,leftMargin:.25,rightMargin:.25,topMargin:.25,bottomMargin:.25,drawNeatline:!1},this.rectangleOptions={left:0,top:0,width:8.5,height:11,lineProperties:{thickness:.1,color:"000000",opacity:1},fillColor:"",fillOpacity:1},this.tableOptions={lineProperties:{thickness:.1,color:"",opacity:1},textProperties:{left:0,top:0,fontPoints:1,fontColor:"000000"}},this.textOptions={left:0,top:0,fontPoints:1,fontColor:"000000"}}static getPageSize(t){switch("string"==typeof t&&(t=t===Kn.A4?Kn.A4:Kn.ANSI_A),t){case Kn.A4:return{width:8.25,height:11.708333};case Kn.ANSI_A:return{width:8.5,height:11}}}addPage(){}applyOpacity(t,n){return t*n+1*(1-n)}drawLine(t){const n={...this.lineOptions,...t};n.lineProperties={...this.lineOptions.lineProperties,...t.lineProperties},this.updateLineProperties(n.lineProperties),this.lineOptions=n}drawNeatline(t={thickness:.005,color:"0000ff",opacity:.2}){this.drawRectangle({left:0,top:0,width:this.pageOptions.width-this.pageOptions.leftMargin-this.pageOptions.rightMargin,height:this.pageOptions.height-this.pageOptions.topMargin-this.pageOptions.bottomMargin,lineProperties:t})}drawRectangle(t){const n={...this.rectangleOptions,...t};n.lineProperties={...this.lineOptions.lineProperties,...t.lineProperties},this.updateLineProperties(n.lineProperties),this.rectangleOptions.fillColor===n.fillColor&&this.rectangleOptions.fillOpacity===n.fillOpacity||this.setFillColor(n.fillColor,n.fillOpacity),this.rectangleOptions=n}drawTable(t,n){const i={};i.lineProperties={...this.tableOptions.lineProperties,...n.lineProperties},i.textProperties={...this.tableOptions.textProperties,...n.textProperties},this.tableOptions.textProperties.fontPoints!==i.textProperties.fontPoints&&this.setFontSize(i.textProperties.fontPoints),this.tableOptions.textProperties.fontColor!==i.textProperties.fontColor&&this.setFontColor(i.textProperties.fontColor),this.updateLineProperties(i.lineProperties),this.tableOptions=i}drawText(t,n){const i={...this.textOptions,...n};this.textOptions.fontPoints!==i.fontPoints&&this.setFontSize(i.fontPoints),this.textOptions.fontColor!==i.fontColor&&this.setFontColor(i.fontColor),this.textOptions=i}fontAscenderBaselineHeight(t){return t*this.fontProps.fontResolutionInchesPerPoint}fontAscenderDescenderHeight(t){return this.fontProps.fontFullHeightRatio*this.fontAscenderBaselineHeight(t)}getFontFileName(t){let n="0b7681dc140844ee9f409bdac249fbf0-general";return"ja"===t?n="0b7681dc140844ee9f409bdac249fbf0-japanese":"ko"===t?n="0b7681dc140844ee9f409bdac249fbf0-korean":"zh-cn"===t?n="0b7681dc140844ee9f409bdac249fbf0-simplified-chinese":"zh-hk"!==t&&"zh-tw"!==t||(n="0b7681dc140844ee9f409bdac249fbf0-traditional-chinese"),n}getTextWidth(t,n){return t.length*n*this.fontProps.fontResolutionInchesPerPoint*.6}hexToRGB(t,n=1){const i=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:this.applyOpacity(parseInt(i[1],16)/255,n),g:this.applyOpacity(parseInt(i[2],16)/255,n),b:this.applyOpacity(parseInt(i[3],16)/255,n)}:{r:0,g:0,b:0}}async initialize(t={},n="",i="en",r="",e=!1){if("{}"!==JSON.stringify(t)){this.pageOptions.pageType=t.pageType===Kn.A4?Kn.A4:Kn.ANSI_A;const n=li.getPageSize(this.pageOptions.pageType);this.pageOptions.width=n.width,this.pageOptions.height=n.height,this.pageOptions.leftMargin=t.leftMargin??this.pageOptions.leftMargin,this.pageOptions.rightMargin=t.rightMargin??this.pageOptions.rightMargin,this.pageOptions.topMargin=t.topMargin??this.pageOptions.topMargin,this.pageOptions.bottomMargin=t.bottomMargin??this.pageOptions.bottomMargin}return this.dataPath=n,this.lang=i,this.title=r||"PDF Document",this.pageOptions.drawNeatline=e,Promise.resolve()}save(){}setDrawColor(t,n=1){}setFillColor(t,n=1){}setFont(t){return Promise.resolve()}setFontColor(t){}setFontSize(t){}setLang(t){return this.lang!==t?(this.lang=t,this.setFont(t)):Promise.resolve()}setLineWidth(t){}updateLineProperties(t){this.lineOptions.lineProperties.thickness!==t.thickness&&this.setLineWidth(t.thickness),this.lineOptions.lineProperties.color===t.color&&this.lineOptions.lineProperties.opacity===t.opacity||this.setDrawColor(t.color,t.opacity),this.lineOptions.lineProperties=t}}
333
333
  /* @preserve
334
334
  * arcgis-pdf-creator v0.0.1
335
- * Fri Feb 03 2023 09:47:02 GMT-0800 (Pacific Standard Time)
335
+ * Tue Mar 21 2023 10:44:29 GMT-0700 (Pacific Daylight Time)
336
336
  */
337
337
  /** @license
338
338
  * Copyright 2022 Esri
@@ -351,7 +351,7 @@ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,r,e,s,
351
351
  */class vi extends li{constructor(t=null){super(),this.jsDoc=t}addPage(){super.addPage(),this.jsDoc.addPage(),this.pageOptions.drawNeatline&&this.drawNeatline()}convertLocaleToJsPDFLanguageCode(t){let n;if("it-it"===t)n="it";else if("pt-pt"===t)n="pt";else{const i=t.split("-");n=1===i.length?t:i[0]+"-"+i[1].toUpperCase()}return n}drawLine(t){super.drawLine(t),this.jsDoc.line(this.pageOptions.leftMargin+this.lineOptions.x1,this.pageOptions.topMargin+this.lineOptions.y1,this.pageOptions.leftMargin+this.lineOptions.x2,this.pageOptions.topMargin+this.lineOptions.y2,this.lineOptions.lineProperties.color?"S":"")}drawRectangle(t){super.drawRectangle(t),this.jsDoc.rect(this.pageOptions.leftMargin+this.rectangleOptions.left,this.pageOptions.topMargin+this.rectangleOptions.top,this.rectangleOptions.width,this.rectangleOptions.height,this.rectangleOptions.lineProperties.color?this.rectangleOptions.fillColor?"FD":"S":this.rectangleOptions.fillColor?"F":"")}drawTable(t,n){super.drawTable(t,n),this.jsDoc.text(t[0][0],this.pageOptions.leftMargin+this.textOptions.left,this.pageOptions.topMargin+this.textOptions.top)}drawText(t,n){super.drawText(t,n);let i=this.pageOptions.leftMargin+this.textOptions.left;if("ar"===this.lang||"he"===this.lang){const n=this.jsDoc.context2d.measureText(t).width*this.fontProps.fontResolutionInchesPerPoint;i=this.pageOptions.width-this.pageOptions.leftMargin-n-this.textOptions.left}const r=this.pageOptions.topMargin+this.textOptions.top+this.fontAscenderBaselineHeight(this.textOptions.fontPoints);this.jsDoc.text(t,i,r)}getTextWidth(t,n){return this.jsDoc.getStringUnitWidth(t)*n/this.jsDoc.internal.scaleFactor}async initialize(t={},n="",i="en",r="",e=!1){await super.initialize(t,n,i,r,e),this.jsDoc||(this.jsDoc=new St({format:t.pageType===Kn.A4?"a4":"letter",orientation:"portrait",putOnlyUsedFonts:!0,unit:"in"})),this.jsDoc.setDocumentProperties({title:this.title,keywords:"Created with ArcGIS Online"}),this.pageOptions.drawNeatline&&this.drawNeatline(),await this.setFont(i)}save(){this.jsDoc.save(this.title+".pdf")}setDrawColor(t,n=1){const i=this.hexToRGB(t,n);this.jsDoc.setDrawColor(i.r.toString(),i.g.toString(),i.b.toString())}setFillColor(t,n=1){const i=this.hexToRGB(t,n);this.jsDoc.setFillColor(i.r.toString(),i.g.toString(),i.b.toString())}setFont(t){this.jsDoc.setLanguage(this.convertLocaleToJsPDFLanguageCode(t));const n=this.getFontFileName(t);return this.jsDoc.existsFileInVFS(n+".ttf")?(this.jsDoc.setFont(n,"normal","normal"),Promise.resolve()):fetch(this.dataPath+n+".txt").then((t=>t.text())).then((t=>(this.jsDoc.addFileToVFS(n+".ttf",t),this.jsDoc.addFont(n+".ttf",n,"normal","normal"),this.jsDoc.setFont(n,"normal","normal"),Promise.resolve())))}setFontColor(t){const n=this.hexToRGB(t);this.jsDoc.setTextColor(n.r.toString(),n.g.toString(),n.b.toString())}setFontSize(t){this.jsDoc.setFontSize(t)}setLineWidth(t){this.jsDoc.setLineWidth(t)}}
352
352
  /* @preserve
353
353
  * arcgis-pdf-creator v0.0.1
354
- * Fri Feb 03 2023 09:47:02 GMT-0800 (Pacific Standard Time)
354
+ * Tue Mar 21 2023 10:44:29 GMT-0700 (Pacific Daylight Time)
355
355
  */
356
356
  /** @license
357
357
  * Copyright 2022 Esri
@@ -370,7 +370,7 @@ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,r,e,s,
370
370
  */
371
371
  /* @preserve
372
372
  * arcgis-pdf-creator v0.0.1
373
- * Fri Feb 03 2023 09:47:02 GMT-0800 (Pacific Standard Time)
373
+ * Tue Mar 21 2023 10:44:29 GMT-0700 (Pacific Daylight Time)
374
374
  */
375
375
  /** @license
376
376
  * Copyright 2022 Esri
@@ -387,7 +387,7 @@ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,r,e,s,
387
387
  * See the License for the specific language governing permissions and
388
388
  * limitations under the License.
389
389
  */
390
- class di{addLabelsToDoc(t,n,i,r){return new Promise((e=>{const s=n.numLabelsAcross*n.numLabelsDown;let o,a,u,f;const c=n.labelWidth-2*n.labelPadding;let h=i;const l=n.pageProperties.topMargin-this.PDFCreator.pageOptions.topMargin;for(let i=0,e=0;i<t.length;i++){r&&r(Math.round(i/t.length*100));let v=t[i].map((t=>t.trim())).filter((t=>t.length>0));if(0===v.length)continue;e%s==0?(e>0&&(this.PDFCreator.addPage(),++h),o=0,u=0,a=0):e%n.numLabelsDown==0&&(u=++o*(n.labelWidth+n.horizGapIn),a=0);let d=n.fontSizePx;n.maxNumLabelLines<v.length&&(d=Math.floor(n.maxNumLabelLines/v.length*n.fontSizePx)),v=this._clipOverlongLines(v,c,d);const w=this.PDFCreator.fontAscenderDescenderHeight(d);f=l+a++*(n.labelHeight+n.vertGapIn),v.forEach((t=>{this.PDFCreator.drawText(t,{left:u+n.labelPadding,top:f+n.labelPadding,fontPoints:d,fontColor:"000000"}),f+=w})),++e}r&&r(100),e(h)}))}drawLabelGuidelines(t,n=null){null!==n&&function(t,n={numAcross:1,numDown:1,x0:0,y0:0,width:1,height:1,horizGap:0,vertGap:0,lineProperties:{thickness:0,color:"",opacity:1}}){for(let i=0;i<n.numDown;++i)for(let r=0;r<n.numAcross;++r)t.drawRectangle({left:n.x0+r*(n.width+n.horizGap),top:n.y0+i*(n.height+n.vertGap),width:n.width,height:n.height,lineProperties:n.lineProperties})}(this.PDFCreator,{x0:t.pageProperties.leftMargin-this.PDFCreator.pageOptions.leftMargin,y0:t.pageProperties.topMargin-this.PDFCreator.pageOptions.topMargin,numAcross:t.numLabelsAcross,numDown:t.numLabelsDown,width:t.labelWidth,height:t.labelHeight,horizGap:t.horizGapIn,vertGap:t.vertGapIn,lineProperties:n})}getAvailableLabelFormats(){return this.labelFormats.length>0?this.labelFormats.map((t=>t.descriptionPDF)):[]}getLabelFormat(t){if(this.labelFormats.length>0){const n=this.labelFormats.filter((n=>t===n.descriptionPDF.averyPartNumber));return n.length>0?n[0]:null}return null}initialize(t){return this.PDFCreator=t,this._loadLabelFormats(t.dataPath).then((t=>(this.labelFormats=t,Promise.resolve())))}removeDuplicates(t){const n=t.filter((t=>Array.isArray(t)&&t.length>0)).map((t=>t.map((t=>t.trim())).join("?"))),i={};return n.forEach((t=>i[t]=!0)),Object.keys(i).sort().map((t=>t.split("?")))}_calculateLabelFirstLineBase(t,n,i,r,e){return t+n/2+(2-i)/2*r+(1-i)/2*e}_clipOverlongLines(t,n,i){const r=[];return t.forEach((t=>{if(t=t.trim(),this.PDFCreator.getTextWidth(t,i)>n){do{t=t.slice(0,-1)}while(this.PDFCreator.getTextWidth(t,i)>n);t+="..."}r.push(t)})),r}async _loadLabelFormats(t){const n=await fetch(t+"labelFormats.json");return await n.json()}}
390
+ class di{addLabelsToDoc(t,n,i,r,e){return new Promise((s=>{const o=n.numLabelsAcross*n.numLabelsDown;let a,u,f,c;const h=n.labelWidth-2*n.labelPadding;let l=i;const v=n.pageProperties.topMargin-this.PDFCreator.pageOptions.topMargin;r&&this._drawSupplementalText(r,0,-.1);for(let i=0,s=0;i<t.length;i++){e&&e(Math.round(i/t.length*100));let d=t[i].map((t=>t.trim())).filter((t=>t.length>0));if(0===d.length)continue;s%o==0?(s>0&&(this.PDFCreator.addPage(),++l,r&&this._drawSupplementalText(r,0,-.1)),a=0,f=0,u=0):s%n.numLabelsDown==0&&(f=++a*(n.labelWidth+n.horizGapIn),u=0);const w=4;let m=n.fontSizePx;n.maxNumLabelLines<d.length&&(m=Math.max(Math.floor(n.maxNumLabelLines/d.length*n.fontSizePx),w)),m=this._getFontSizeForOverlongLines(d,h,m,w),d=this._clipOverlongLines(d,h,m);const b=this.PDFCreator.fontAscenderDescenderHeight(m);c=v+u++*(n.labelHeight+n.vertGapIn),d.forEach((t=>{this.PDFCreator.drawText(t,{left:f+n.labelPadding,top:c+n.labelPadding,fontPoints:m,fontColor:"000000"}),c+=b})),++s}e&&e(100),s(l)}))}drawLabelGuidelines(t,n=null){null!==n&&function(t,n={numAcross:1,numDown:1,x0:0,y0:0,width:1,height:1,horizGap:0,vertGap:0,lineProperties:{thickness:0,color:"",opacity:1}}){for(let i=0;i<n.numDown;++i)for(let r=0;r<n.numAcross;++r)t.drawRectangle({left:n.x0+r*(n.width+n.horizGap),top:n.y0+i*(n.height+n.vertGap),width:n.width,height:n.height,lineProperties:n.lineProperties})}(this.PDFCreator,{x0:t.pageProperties.leftMargin-this.PDFCreator.pageOptions.leftMargin,y0:t.pageProperties.topMargin-this.PDFCreator.pageOptions.topMargin,numAcross:t.numLabelsAcross,numDown:t.numLabelsDown,width:t.labelWidth,height:t.labelHeight,horizGap:t.horizGapIn,vertGap:t.vertGapIn,lineProperties:n})}getAvailableLabelFormats(){return this.labelFormats.length>0?this.labelFormats.map((t=>t.descriptionPDF)):[]}getLabelFormat(t){if(this.labelFormats.length>0){const n=this.labelFormats.filter((n=>t===n.descriptionPDF.averyPartNumber));return n.length>0?n[0]:null}return null}initialize(t){return this.PDFCreator=t,this._loadLabelFormats(t.dataPath).then((t=>(this.labelFormats=t,Promise.resolve())))}removeDuplicates(t){const n=t.filter((t=>Array.isArray(t)&&t.length>0)).map((t=>t.map((t=>t.trim())).join("?"))),i={};return n.forEach((t=>i[t]=!0)),Object.keys(i).sort().map((t=>t.split("?")))}_calculateLabelFirstLineBase(t,n,i,r,e){return t+n/2+(2-i)/2*r+(1-i)/2*e}_clipOverlongLines(t,n,i){const r=[];return t.forEach((t=>{if(t=t.trim(),this.PDFCreator.getTextWidth(t,i)>n){do{t=t.slice(0,-1)}while(this.PDFCreator.getTextWidth(t,i)>n);t+="..."}r.push(t)})),r}_drawSupplementalText(t,n,i){this.PDFCreator.drawText(t,{left:n,top:i,fontPoints:6,fontColor:"000000"})}_getFontSizeForOverlongLines(t,n,i,r){let e=i;return t.forEach((t=>{if(t=t.trim(),this.PDFCreator.getTextWidth(t,e)>n)do{--e}while(this.PDFCreator.getTextWidth(t,e)>n&&e>r)})),e}async _loadLabelFormats(t){const n=await fetch(t+"labelFormats.json");return await n.json()}}
391
391
  /** @license
392
392
  * Copyright 2022 Esri
393
393
  *
@@ -418,7 +418,7 @@ class di{addLabelsToDoc(t,n,i,r){return new Promise((e=>{const s=n.numLabelsAcro
418
418
  * See the License for the specific language governing permissions and
419
419
  * limitations under the License.
420
420
  */
421
- const wi="|";async function mi(t,n,i,r,e=!1,s=!1){return console.log("downloadCSV using selectionSetNames "+JSON.stringify(t)),console.log("downloadCSV removeDuplicates",e),
421
+ const wi="|";async function mi(t,n,i,r,e=!1,s=!1){const o=await gi(n,i,e,r,s);
422
422
  /** @license
423
423
  * Copyright 2022 Esri
424
424
  *
@@ -434,4 +434,20 @@ const wi="|";async function mi(t,n,i,r,e=!1,s=!1){return console.log("downloadCS
434
434
  * See the License for the specific language governing permissions and
435
435
  * limitations under the License.
436
436
  */
437
- function(t){const n=t.map((t=>Object.values(t).map((t=>`"${t}"`)).join(",")+"\r\n"));!function(t,n){const i=document.createElement("a");void 0!==i.download&&(i.href=URL.createObjectURL(new Blob(t,{type:"text/csv;charset=utf-8;"})),i.download=`${n}.csv`||"export.csv",i.style.visibility="hidden",document.body.appendChild(i),i.click(),document.body.removeChild(i))}(n,`notify-${Date.now().toString()}`)}(await Li(n,i,e,r,s)),Promise.resolve()}async function bi(t,n,r,e,s){console.log("downloadPDF using selectionSetNames "+JSON.stringify(t)),console.log("downloadPDF removeDuplicates",e);let o=await Li(n,r,e);return o=o.map((t=>t.filter((t=>t.length>0)))).filter((t=>t.length>0)),function(t,n){!function(t,n,r){const e=new vi;e.initialize({pageType:"ANSI_A"},i("../assets/arcgis-pdf-creator/"),"en",r,!1).then((()=>{const i=new di;i.initialize(e).then((async()=>{await i.addLabelsToDoc(t,n.labelSpec,1),e.save()}))}))}(t,n,`notify-${Date.now().toString()}`)}(o,s),Promise.resolve()}function pi(t,n=!1){const i=[];return t.forEach((t=>{(t.visible||n)&&i.push(`{${t.fieldName}}`)})),i.join(wi)}function Ni(t,n,i,r,e){if(i&&"coded-value"===i.type)return i.getName(t);{let i=t;switch(n){case"date":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDate(i,t)}else i=e.formatDate(i);i=i.replace(/\xe2\x80\xaf/g,"");break;case"double":case"integer":case"long":case"small-integer":if(r){const t=e.convertNumberFormatToIntlOptions(r);i=e.formatNumber(i,t)}else i=e.formatNumber(i)}return i}}async function Li(t,n,i=!0,s=!0,o=!1){var a,u,f,c;const[h]=await r(["esri/intl"]),l=await e(n,t),v={},d={};t.fields.forEach((t=>{v[t.name]=t.type,d[t.name]=t.domain}));const w={};let m,b,p={};if(t.popupEnabled&&(t.popupTemplate.fieldInfos.forEach((t=>{t.format&&(w[t.fieldName]=t.format)})),s&&"fields"===(null===(u=null===(a=t.popupTemplate)||void 0===a?void 0:a.content[0])||void 0===u?void 0:u.type)?(m=pi(t.popupTemplate.fieldInfos),0===m.length&&(m="string"==typeof t.popupTemplate.title?t.popupTemplate.title:pi(t.popupTemplate.fieldInfos,!0))):s&&"text"===(null===(c=null===(f=t.popupTemplate)||void 0===f?void 0:f.content[0])||void 0===c?void 0:c.type)&&(m=t.popupTemplate.content[0].text.replace(/<br\s*\/?>/gi,wi).replace(/<p[^>]*>/gi,wi).trim().replace(/^\|/,"").replace(/<\/p>/gi,"").replace(/\n/gi,"").replace(/<[\s.]*[^<>]*\/?>/gi,"").replace(/\xA0/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," "),p=await async function(t,n){const i={};if(!Array.isArray(n.popupTemplate.expressionInfos)||0===n.popupTemplate.expressionInfos.length)return Promise.resolve(i);const e=t.match(/\{expression\/\w+\}/g);if(!e)return Promise.resolve(i);const[s]=await r(["esri/arcade"]),o={variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]},a={};e.forEach((t=>{const i=t.substring(t.indexOf("/")+1,t.length-1);(n.popupTemplate.expressionInfos||[]).forEach((t=>{t.name===i&&(a[i]=s.createArcadeExecutor(t.expression,o))}))}));const u=Object.values(a);return Promise.all(u).then((t=>{const n=Object.keys(a);for(let r=0;r<n.length;++r)i[n[r]]=t[r].valueOf();return i}))}(m,t))),m){const t=/\{\w+\}/g,n=m.match(/\{expression\/\w+\}/g),i=m.match(t);b=l.features.map((t=>{let r=m;n&&n.forEach((n=>{const i=n.substring(n.indexOf("/")+1,n.length-1),e=p[i].execute({$feature:t});r=r.replace(n,e)})),i&&i.forEach((n=>{const i=n.substring(1,n.length-1),e=Ni(t.attributes[i],v[i],d[i],w[i],h);r=r.replace(n,e)}));let e=r.split(wi);return e=e.map((t=>t.trim())),e}))}else b=l.features.map((t=>Object.keys(t.attributes).map((n=>`${Ni(t.attributes[n],v[n],d[n],null,h)}`))));if(i){const t=b.map((t=>JSON.stringify(t))),n=new Set(t);b=Array.from(n,(t=>JSON.parse(t)))}if(o){let t=[];m?t=m.replace(/\{/g,"").replace(/\}/g,"").split(wi):Object.keys(l.features[0].attributes).forEach((n=>{t.push(n)})),b.unshift(t)}return Promise.resolve(b)}export{s as _,bi as a,mi as d}
437
+ return function(t,n){const i=n.map((t=>Object.values(t).map((t=>`"${t}"`)).join(",")+"\r\n"));!
438
+ /** @license
439
+ * Copyright 2022 Esri
440
+ *
441
+ * Licensed under the Apache License, Version 2.0 (the "License");
442
+ * you may not use this file except in compliance with the License.
443
+ * You may obtain a copy of the License at
444
+ *
445
+ * http://www.apache.org/licenses/LICENSE-2.0
446
+ *
447
+ * Unless required by applicable law or agreed to in writing, software
448
+ * distributed under the License is distributed on an "AS IS" BASIS,
449
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
450
+ * See the License for the specific language governing permissions and
451
+ * limitations under the License.
452
+ */
453
+ function(t,n){const i=document.createElement("a");void 0!==i.download&&(i.href=URL.createObjectURL(new Blob(n,{type:"text/csv;charset=utf-8;"})),i.download=`${t}.csv`||"export.csv",i.style.visibility="hidden",document.body.appendChild(i),i.click(),document.body.removeChild(i))}(t,i)}(Ni(t),o),Promise.resolve()}async function bi(t,n,r,e,s){let o=await gi(n,r,e);return o=o.map((t=>t.filter((t=>t.length>0)))).filter((t=>t.length>0)),function(t,n,r){!function(t,n,r){const e=new vi;e.initialize({pageType:"ANSI_A"},i("../assets/arcgis-pdf-creator/"),"en",t).then((()=>{const i=new di;i.initialize(e).then((async()=>{await i.addLabelsToDoc(n,r.labelSpec,1,t),e.save()}))}))}(t,n,r)}(Ni(t),o,s),Promise.resolve()}function pi(t,n=!1){const i=[];return t.forEach((t=>{(t.visible||n)&&i.push(`{${t.fieldName}}`)})),i.join(wi)}function Ni(t){return t.length>0?t.join(", "):"download"}function Li(t,n,i,r,e){if(i&&"coded-value"===i.type)return i.getName(t);{let i=t;switch(n){case"date":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDate(i,t)}else i=e.formatDate(i);i=i.replace(/\xe2\x80\xaf/g,"");break;case"double":case"integer":case"long":case"small-integer":if(r){const t=e.convertNumberFormatToIntlOptions(r);i=e.formatNumber(i,t)}else i=e.formatNumber(i)}return i}}async function gi(t,n,i=!0,s=!0,o=!1){var a,u,f,c;const[h]=await r(["esri/intl"]),l=await e(n,t),v={},d={};t.fields.forEach((t=>{v[t.name]=t.type,d[t.name]=t.domain}));const w={};let m,b,p={};if(t.popupEnabled&&(t.popupTemplate.fieldInfos.forEach((t=>{t.format&&(w[t.fieldName]=t.format)})),s&&"fields"===(null===(u=null===(a=t.popupTemplate)||void 0===a?void 0:a.content[0])||void 0===u?void 0:u.type)?(m=pi(t.popupTemplate.fieldInfos),0===m.length&&(m="string"==typeof t.popupTemplate.title?t.popupTemplate.title:pi(t.popupTemplate.fieldInfos,!0))):s&&"text"===(null===(c=null===(f=t.popupTemplate)||void 0===f?void 0:f.content[0])||void 0===c?void 0:c.type)&&(m=function(t){let n=(t=(t=(t=(t=t.replace(/<br\s*\/?>/gi,wi)).replace(/<p[^>]*>/gi,wi).trim().replace(/^\|/,"")).replace(/<\/p>/gi,"")).replace(/\n/gi,"|")).replace(/<[\s.]*[^<>]*\/?>/gi,"").replace(/\xA0/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ");for(n=n.replace(/\s*\|\s*/g,"|");n.match(/\|\|/);)n=n.replace(/\|\|/,"|");return n=n.replace(/^\|/,""),n=n.replace(/\|$/,""),n.trim()}(t.popupTemplate.content[0].text),p=await async function(t,n){const i={};if(!Array.isArray(n.popupTemplate.expressionInfos)||0===n.popupTemplate.expressionInfos.length)return Promise.resolve(i);const e=t.match(/\{expression\/\w+\}/g);if(!e)return Promise.resolve(i);const[s]=await r(["esri/arcade"]),o={variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]},a={};e.forEach((t=>{const i=t.substring(t.indexOf("/")+1,t.length-1);(n.popupTemplate.expressionInfos||[]).forEach((t=>{t.name===i&&(a[i]=s.createArcadeExecutor(t.expression,o))}))}));const u=Object.values(a);return Promise.all(u).then((t=>{const n=Object.keys(a);for(let r=0;r<n.length;++r)i[n[r]]=t[r].valueOf();return i}))}(m,t))),m){const t=/\{\w+\}/g,n=m.match(/\{expression\/\w+\}/g),i=m.match(t);b=l.features.map((t=>{let r=m;n&&n.forEach((n=>{const i=n.substring(n.indexOf("/")+1,n.length-1),e=p[i].execute({$feature:t});r=r.replace(n,e)})),i&&i.forEach((n=>{const i=n.substring(1,n.length-1),e=Li(t.attributes[i],v[i],d[i],w[i],h);r=r.replace(n,e)}));let e=r.split(wi);return e=e.map((t=>t.trim())),e}))}else b=l.features.map((t=>Object.keys(t.attributes).map((n=>`${Li(t.attributes[n],v[n],d[n],null,h)}`))));if(i){const t=b.map((t=>JSON.stringify(t))),n=new Set(t);b=Array.from(n,(t=>JSON.parse(t)))}if(o){let t=[];m?t=m.replace(/\{/g,"").replace(/\}/g,"").split(wi):Object.keys(l.features[0].attributes).forEach((n=>{t.push(n)})),b.unshift(t)}return Promise.resolve(b)}export{s as _,bi as a,mi as d}
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as i,h as t,H as e,g as a,c as s}from"./p-c2f00d41.js";import{s as n,g as o,a as l}from"./p-83166522.js";import{S as c}from"./p-6fe17794.js";import{c as r,d as h}from"./p-1c247f54.js";import{l as d}from"./p-4aa3ba60.js";import{b as m,h as p,q as g,c as u}from"./p-dc53c9c1.js";import{c as v,f as b,g as f,b as y}from"./p-8cece97f.js";import{s as w}from"./p-4557d5a8.js";import{g as k}from"./p-829e6d4f.js";import{d as x,a as S}from"./p-bb64bd47.js";import{a as _,g as D}from"./p-fc884dd6.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";import"./p-00444009.js";import"./p-e1a4994d.js";
7
+ /*!
8
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
+ * v1.0.0-beta.97
11
+ */var z;!function(i){i.valid="check-circle",i.invalid="exclamation-mark-triangle",i.idle="information"}(z||(z={}));const P=class{constructor(t){i(this,t),this.active=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=n(z,this.icon,this.status)}connectedCallback(){this.status=o(this.el,"status",this.status),this.scale=o(this.el,"scale",this.scale),this.requestedIcon=n(z,this.icon,this.status)}render(){return t(e,{"calcite-hydrated-hidden":!this.active},this.renderIcon(this.requestedIcon),t("slot",null))}renderIcon(i){if(i)return t("calcite-icon",{class:"calcite-input-message-icon",icon:i,scale:"s"})}get el(){return a(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};P.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([active][scale=m]),:host([active][scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{visibility:hidden;box-sizing:border-box;display:flex;block-size:0px;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active]){visibility:visible;block-size:auto;opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active][scale=m]),:host([active][scale=l]){-webkit-margin-before:var(--calcite-input-message-spacing-value);margin-block-start:var(--calcite-input-message-spacing-value)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-ui-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-ui-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-ui-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-ui-brand)}:host([status][active]){color:var(--calcite-ui-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}";
12
+ /*!
13
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
14
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
15
+ * v1.0.0-beta.97
16
+ */
17
+ const L="actions-end",I=class{constructor(t){i(this,t),this.calciteNoticeClose=s(this,"calciteNoticeClose",6),this.calciteNoticeOpen=s(this,"calciteNoticeOpen",6),this.active=!1,this.open=!1,this.color="blue",this.dismissible=!1,this.closable=!1,this.intlClose="Close",this.scale="m",this.width="auto",this.close=()=>{this.open=!1,this.calciteNoticeClose.emit()}}activeHandler(i){this.open=i}openHandler(i){this.active=i}handleDismissible(i){this.closable=i}handleClosable(i){this.dismissible=i}updateRequestedIcon(){this.requestedIcon=n(c,this.icon,this.color)}connectedCallback(){r(this);const i=this.active||this.open;i&&(this.activeHandler(i),this.openHandler(i)),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){h(this)}componentWillLoad(){this.requestedIcon=n(c,this.icon,this.color)}render(){const{el:i}=this,e=t("button",{"aria-label":this.intlClose,class:"notice-close",onClick:this.close,ref:i=>this.closeButton=i},t("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),a=l(i,L);return t("div",{class:"container"},this.requestedIcon?t("div",{class:"notice-icon"},t("calcite-icon",{icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"})):null,t("div",{class:"notice-content"},t("slot",{name:"title"}),t("slot",{name:"message"}),t("slot",{name:"link"})),a?t("div",{class:"actions-end"},t("slot",{name:L})):null,this.closable?e:null)}async setFocus(){const i=this.el.querySelector("calcite-link");(this.closeButton||i)&&(i?i.setFocus():this.closeButton&&this.closeButton.focus())}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],dismissible:["handleDismissible"],closable:["handleClosable"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"]}}};I.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";const C=class{constructor(t){i(this,t),this.selectionLoadingChange=s(this,"selectionLoadingChange",7),this.selectionSetChange=s(this,"selectionSetChange",7),this.sketchTypeChange=s(this,"sketchTypeChange",7),this.workflowTypeChange=s(this,"workflowTypeChange",7),this._selectedIds=[],this._selectionLabel="",this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.mapView=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectLayerView=void 0,this.showBufferTools=!0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._layerSelectChecked=void 0,this._searchTerm=void 0,this._translations=void 0,this._workflowType=void 0}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async workflowTypeHandler(i,t){i!==t&&(this.mapView.popup.autoOpenEnabled=["SELECT","SKETCH","REFINE","SEARCH"].indexOf(i)<0,this.workflowTypeChange.emit(i))}async clearSelection(){return this._clearResults()}async getSelection(){/\S+/gm.test(this._selectionLabel)||(this._selectionLabel=this._getSelectionBaseLabel());const i=this._selectionLabel===this._getSelectionBaseLabel();return{id:this.isUpdate?this.selectionSet.id:Date.now(),workflowType:this._workflowType,searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel&&!i?this._selectionLabel:`${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,refineSelectLayers:this._refineTools.layerViews,skipGeomOIDs:this._skipGeomOIDs}}labelChange(i){this._selectionLabel=i.detail}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}sketchGraphicsChange(i){this._updateSelection(v.SKETCH,i.detail,this._selectionLabel||this._translations.sketch,!1)}refineSelectionGraphicsChange(i){const t=i.detail.graphics,e=Array.isArray(t)?t.map((i=>i.attributes[i.layer.objectIdField])):[];return this._updateSelection(v.SELECT,t,this._selectionLabel||this._translations.select,i.detail.useOIDs,e),this._highlightFeatures(e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){var i,a;const s=this._workflowType===v.SEARCH,n=s?" div-visible-search":" div-not-visible",o=this._workflowType===v.SKETCH||this._workflowType===v.SELECT,l=this.showBufferTools?"search-distance":"div-not-visible",c=this._layerSelectChecked&&!s?" div-visible":" div-not-visible",r=this._layerSelectChecked||s?" div-not-visible":" div-visible",h=s?"div-not-visible":"div-visible",d="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return t(e,null,t("div",{class:"padding-bottom-1"},t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._workflowChange(i)},t("calcite-radio-group-item",{checked:s,class:"w-50 end-border",value:v.SEARCH},this._translations.search),t("calcite-radio-group-item",{checked:o,class:"w-50",value:v.SKETCH},this._translations.sketch))),t("div",{class:n},t("div",{class:"search-widget",ref:i=>{this._searchElement=i}})),t("div",{class:h},t("calcite-label",{layout:"inline"},t("calcite-checkbox",{checked:this._layerSelectChecked,onCalciteCheckboxChange:()=>this._layerSelectChanged(),ref:i=>this._selectFromLayerElement=i}),"Use layer features")),t("div",{class:r},t("map-draw-tools",{active:!0,border:!0,mapView:this.mapView,pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),t("div",{class:c},t("refine-selection-tools",{active:!0,border:!0,enabledLayerIds:this.enabledLayerIds,layerView:this.selectLayerView,layerViews:this._refineSelectLayers,mapView:this.mapView,mode:b.ADD,ref:i=>{this._refineTools=i},refineMode:f.SUBSET})),t("calcite-label",{class:l},this._translations.searchDistance,t("buffer-tools",{distance:d,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(a=this.selectionSet)||void 0===a?void 0:a.unit)||this.defaultBufferUnit})),t("slot",null))}async _initModules(){const[i,t,e,a,s]=await d(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=e,this._geometryEngine=a,this.FeatureLayer=s}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,e,a,s,n,o,l,c,r;this.selectionSet?(this._searchTerm=null===(t=null===(i=this.selectionSet)||void 0===i?void 0:i.searchResult)||void 0===t?void 0:t.name,this._workflowType=null===(e=this.selectionSet)||void 0===e?void 0:e.workflowType,this._searchResult=null===(a=this.selectionSet)||void 0===a?void 0:a.searchResult,this._refineSelectLayers=null===(s=this.selectionSet)||void 0===s?void 0:s.refineSelectLayers,this._selectedIds=null===(n=this.selectionSet)||void 0===n?void 0:n.selectedIds,this._skipGeomOIDs=null===(o=this.selectionSet)||void 0===o?void 0:o.skipGeomOIDs,this._layerSelectChecked=(null===(l=this.selectionSet)||void 0===l?void 0:l.workflowType)===v.SELECT,this.geometries=[...(null===(c=this.selectionSet)||void 0===c?void 0:c.geometries)||[]],this._selectionLabel=(null===(r=this.selectionSet)||void 0===r?void 0:r.label)||this._getSelectionBaseLabel(),await m(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1)):(this._workflowType=v.SEARCH,this.mapView.popup.autoOpenEnabled=!1)}_getSelectionBaseLabel(){var i,t;return this._workflowType===v.SKETCH?this._translations.sketch:this._workflowType===v.SELECT?this._translations.select:this._workflowType===v.SEARCH&&this._searchResult?null===(i=this._searchResult)||void 0===i?void 0:i.name:null===(t=this.selectionSet)||void 0===t?void 0:t.label}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.on("search-clear",(()=>{this._clearResults(!1)})),this._searchWidget.on("select-result",(i=>{var t,e,a;if(i.result){this._searchResult=i.result;const s=(null===(e=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===e?void 0:e.id)&&i.source.layer.id===this.selectLayerView.layer.id,n=s?[i.result.feature.getObjectId()]:void 0;this._updateSelection(v.SEARCH,[i.result.feature],null===(a=null==i?void 0:i.result)||void 0===a?void 0:a.name,s,n)}else this._clearResults(!1)}))}}_getSearchConfig(i,t){const e=null==i?void 0:i.sources;return(null==e?void 0:e.length)>0?(i.includeDefaultSources=!1,e.forEach((i=>{var e,a;if(i.hasOwnProperty("layer")){const s=i,n=null===(e=s.layer)||void 0===e?void 0:e.id,o=n?t.map.findLayerById(n):null,l=null===(a=null==s?void 0:s.layer)||void 0===a?void 0:a.url;o?s.layer=o:l&&(s.layer=new this.FeatureLayer(l))}})),null==e||e.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),w.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}_layerSelectChanged(){this._layerSelectChecked=this._selectFromLayerElement.checked,this.sketchTypeChange.emit(this._layerSelectChecked?y.LAYER:y.INTERACTIVE)}_workflowChange(i){this._workflowType=i.detail}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){var t;null===(t=w.highlightHandle)||void 0===t||t.remove(),i.length>0&&(w.highlightHandle=await p(i,this.selectLayerView,this.mapView)),this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this.selectionLoadingChange.emit(!0),this._selectedIds=await g(i,this.selectLayerView.layer),this.selectionLoadingChange.emit(!1),this._drawTools.graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:"polygon"===i.type?this.sketchPolygonSymbol:void 0}))),await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){if(this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail,!this._bufferGeometry)return this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),this._highlightWithOIDsOrGeoms();{const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent)}}_geomQuery(i){const t=u(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!0){var e,a;this._selectedIds=[],t&&(this._selectionLabel=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._searchWidget.clear(),null===(e=w.highlightHandle)||void 0===e||e.remove(),(null===(a=this._drawTools)||void 0===a?void 0:a.clear)&&await this._drawTools.clear(),this.selectionSetChange.emit(this._selectedIds.length)}_updateSelection(i,t,e,a,s){this._selectedIds=a&&s?s:this._selectedIds,this._skipGeomOIDs=a?s:void 0,this.geometries=Array.isArray(t)?t.map((i=>i.geometry)):this.geometries,this._workflowType=i,this._selectionLabel=e}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"],_workflowType:["workflowTypeHandler"]}}};C.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}';const A=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),M=class{constructor(t){i(this,t),this.disabled=!1,this.layerView=void 0,this._translations=void 0}async downloadCSV(i,t,e,a=!0){return x(i,this.layerView.layer,t,!0,e,a)}async downloadPDF(i,t,e){return S(i,this.layerView.layer,t,e,this._labelInfoElement.selectedOption.value)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return t(e,null,t("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}},this._renderItems()))}async _initModules(){const[i]=await d(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t=`${i.descriptionPDF.labelWidthDisplay} x ${i.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}_renderItems(){return(A.default||A).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<a?-1:e>a?1:0})).map((i=>t("calcite-option",{value:i},this._getLabelSizeText(i))))}get el(){return a(this)}};M.style=":host{display:block}";const H=class{constructor(t){i(this,t),this.selectionSetsChanged=s(this,"selectionSetsChanged",7),this._addEnabled=!0,this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.GraphicsLayer=void 0,this.SketchViewModel=void 0,this._translations=void 0}addresseeLayerWatchHandler(){const i=this.selectionSets.filter((i=>i.workflowType!==v.REFINE));this.selectionSets=this._initRefineSelectionSet(i)}refineSelectionIdsChange(i){var t,e;const a=(null===(t=i.detail)||void 0===t?void 0:t.addIds)||[],s=(null===(e=i.detail)||void 0===e?void 0:e.removeIds)||[];this._updateSelectionSets(s),this._updateRefineSelectionSet(a,s)}async componentWillLoad(){await this._getTranslations(),this._getRefineSelectionSet(this.selectionSets)||(this.selectionSets=this._initRefineSelectionSet(this.selectionSets))}render(){return t(e,null,t("div",{class:"padding-1"},t("div",null,t("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:i=>this._modeChanged(i)},t("calcite-radio-group-item",{checked:this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(b.ADD),value:b.ADD},this._translations.add),t("calcite-radio-group-item",{checked:!this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(b.REMOVE),value:b.REMOVE},this._translations.remove)),t("refine-selection-tools",{border:!0,enabledLayerIds:this.enabledLayerIds,ids:_(this.selectionSets),layerViews:[this.addresseeLayer],mapView:this.mapView,mode:this._addEnabled?b.ADD:b.REMOVE,ref:i=>{this._refineTools=i},refineMode:f.ALL,refineSelectionSet:this._getRefineSelectionSet(this.selectionSets),useLayerPicker:!1})),t("br",null),t("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_modeChanged(i){this._addEnabled=i.detail===b.ADD}_setSelectionMode(i){this._refineTools.mode=i}_getRefineSelectionSetList(){const i=D(this.selectionSets),e=this._getRefineSelectionSet(this.selectionSets),a=(null==e?void 0:e.refineIds.removeIds.length)||0;return[t("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",((null==e?void 0:e.refineIds.addIds.length)||0).toString()),"non-interactive":!0}),t("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),t("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getRefineSelectionSet(i){let t;return i.some((i=>{if(i.workflowType===v.REFINE)return t=i,!0})),t}_updateSelectionSets(i){i.length>0&&(this.selectionSets=this.selectionSets.reduce(((t,e)=>(e.selectedIds=e.selectedIds.filter((t=>i.indexOf(t)<0)),(e.selectedIds.length>0||e.workflowType===v.REFINE)&&t.push(e),t)),[]),this.selectionSetsChanged.emit(this.selectionSets))}_updateRefineSelectionSet(i,t){const e=this._getRefineSelectionSet(this.selectionSets);this._updateRefineIds(e,i,t),this.selectionSetsChanged.emit(this.selectionSets)}_updateRefineIds(i,t,e){i.refineIds.addIds=i.refineIds.addIds.filter((i=>e.indexOf(i)<0)),i.refineIds.removeIds=i.refineIds.removeIds.filter((i=>t.indexOf(i)<0));const a=[...new Set(i.refineIds.addIds.concat(t))],s=[...new Set(i.refineIds.removeIds.concat(e))];return i.refineIds={addIds:a.filter((i=>s.indexOf(i)<0)),removeIds:s.filter((i=>a.indexOf(i)<0))},i.selectedIds=i.refineIds.addIds.length>0?[...new Set(i.selectedIds.concat(i.refineIds.addIds))]:i.selectedIds.filter((t=>i.refineIds.removeIds.indexOf(t)<0)),this.selectionSets.map((t=>t.workflowType===v.REFINE?i:t))}_initRefineSelectionSet(i){return[...i,{buffer:void 0,distance:0,download:!0,geometries:[],id:Date.now(),label:"Refine",layerView:this.addresseeLayer,refineSelectLayers:[],searchResult:void 0,selectedIds:[],unit:"feet",workflowType:v.REFINE,refineIds:{addIds:[],removeIds:[]},redoStack:[],undoStack:[]}]}async _getTranslations(){const i=await k(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_modeChanged":return this._modeChanged(t);case"_setSelectionMode":return this._setSelectionMode(t)}return null}get el(){return a(this)}static get watchers(){return{addresseeLayer:["addresseeLayerWatchHandler"]}}};H.style=":host{display:block}";export{P as calcite_input_message,I as calcite_notice,C as map_select_tools,M as pdf_download,H as refine_selection}