18s 0.1.5 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/-3Uh.woff2 +0 -0
  2. package/-XyM.woff2 +0 -0
  3. package/-cMN.woff2 +0 -0
  4. package/-cdB.woff2 +0 -0
  5. package/0T_u.woff2 +0 -0
  6. package/0iJj.woff2 +0 -0
  7. package/0ztE.woff2 +0 -0
  8. package/15pB.woff2 +0 -0
  9. package/18RQ.woff2 +0 -0
  10. package/1EtS.woff2 +0 -0
  11. package/1pzg.woff2 +0 -0
  12. package/2EmK.woff2 +0 -0
  13. package/2_ZR.woff2 +0 -0
  14. package/2iUm.woff2 +0 -0
  15. package/33Hv.woff2 +0 -0
  16. package/3bVl.woff2 +0 -0
  17. package/46Sm.woff2 +0 -0
  18. package/46TS.woff2 +0 -0
  19. package/4l5w.woff2 +0 -0
  20. package/58Db.woff2 +0 -0
  21. package/5Dkj.woff2 +0 -0
  22. package/5JBo.woff2 +0 -0
  23. package/5SiX.woff2 +0 -0
  24. package/5TIG.woff2 +0 -0
  25. package/5nIn.woff2 +0 -0
  26. package/6CEg.woff2 +0 -0
  27. package/6Gnc.woff2 +0 -0
  28. package/6kAt.woff2 +0 -0
  29. package/7LPF.woff2 +0 -0
  30. package/7_8i.woff2 +0 -0
  31. package/8Ppr.woff2 +0 -0
  32. package/8QJX.woff2 +0 -0
  33. package/8X-F.woff2 +0 -0
  34. package/8iHl.woff2 +0 -0
  35. package/8kLc.woff2 +0 -0
  36. package/8xAn.woff2 +0 -0
  37. package/8xnu.woff2 +0 -0
  38. package/8yhR.woff2 +0 -0
  39. package/9Gj4.woff2 +0 -0
  40. package/9MPt.woff2 +0 -0
  41. package/9XT7.woff2 +0 -0
  42. package/9dxL.woff2 +0 -0
  43. package/9xYe.woff2 +0 -0
  44. package/A5sX.woff2 +0 -0
  45. package/AOae.woff2 +0 -0
  46. package/AnL6.woff2 +0 -0
  47. package/B7XM.woff2 +0 -0
  48. package/BAum.woff2 +0 -0
  49. package/BNuK.woff2 +0 -0
  50. package/BQVW.woff2 +0 -0
  51. package/BVL8.woff2 +0 -0
  52. package/BWvz.woff2 +0 -0
  53. package/B_Ks.woff2 +0 -0
  54. package/BbU7.woff2 +0 -0
  55. package/CZfI.woff2 +0 -0
  56. package/Cjb5.woff2 +0 -0
  57. package/CmJA.woff2 +0 -0
  58. package/CsUQ.woff2 +0 -0
  59. package/Cyzz.woff2 +0 -0
  60. package/DDOv.woff2 +0 -0
  61. package/DMt7.woff2 +0 -0
  62. package/DNLy.woff2 +0 -0
  63. package/DR27.woff2 +0 -0
  64. package/DZ7Q.woff2 +0 -0
  65. package/DnzW.woff2 +0 -0
  66. package/E4sy.woff2 +0 -0
  67. package/EUtD.woff2 +0 -0
  68. package/Eboz.woff2 +0 -0
  69. package/EmoS.woff2 +0 -0
  70. package/ExsS.woff2 +0 -0
  71. package/F175.woff2 +0 -0
  72. package/F7SA.woff2 +0 -0
  73. package/FaFd.woff2 +0 -0
  74. package/FsCw.woff2 +0 -0
  75. package/G3Kg.woff2 +0 -0
  76. package/G6Pj.woff2 +0 -0
  77. package/G8EN.woff2 +0 -0
  78. package/GMIu.woff2 +0 -0
  79. package/GOEl.woff2 +0 -0
  80. package/GrzI.woff2 +0 -0
  81. package/Gz2v.woff2 +0 -0
  82. package/HCa9.woff2 +0 -0
  83. package/HRGc.woff2 +0 -0
  84. package/Hant.woff2 +0 -0
  85. package/HcYk.woff2 +0 -0
  86. package/IUKD.woff2 +0 -0
  87. package/J-rp.woff2 +0 -0
  88. package/J2_Z.woff2 +0 -0
  89. package/JBr8.woff2 +0 -0
  90. package/JzDj.woff2 +0 -0
  91. package/KBhF.woff2 +0 -0
  92. package/KCyu.woff2 +0 -0
  93. package/KH3S.woff2 +0 -0
  94. package/KUfc.woff2 +0 -0
  95. package/KWeL.woff2 +0 -0
  96. package/KbZ1.woff2 +0 -0
  97. package/KhUK.woff2 +0 -0
  98. package/LC3T.woff2 +0 -0
  99. package/LI5G.woff2 +0 -0
  100. package/LSlb.woff2 +0 -0
  101. package/LfwY.woff2 +0 -0
  102. package/Lj__.woff2 +0 -0
  103. package/M0BG.woff2 +0 -0
  104. package/MGzp.woff2 +0 -0
  105. package/MO_W.woff2 +0 -0
  106. package/MQdW.woff2 +0 -0
  107. package/MY7O.woff2 +0 -0
  108. package/Mbb7.woff2 +0 -0
  109. package/NDjQ.woff2 +0 -0
  110. package/NLeq.woff2 +0 -0
  111. package/NMlK.woff2 +0 -0
  112. package/NWxh.woff2 +0 -0
  113. package/Nf88.woff2 +0 -0
  114. package/Nx68.woff2 +0 -0
  115. package/Nxcy.woff2 +0 -0
  116. package/Ny-z.woff2 +0 -0
  117. package/OiPo.woff2 +0 -0
  118. package/OlDi.woff2 +0 -0
  119. package/Or-w.woff2 +0 -0
  120. package/OsBq.woff2 +0 -0
  121. package/PCtq.woff2 +0 -0
  122. package/PDd_.woff2 +0 -0
  123. package/Pe_P.woff2 +0 -0
  124. package/Pf-f.woff2 +0 -0
  125. package/PqJg.woff2 +0 -0
  126. package/QAxi.woff2 +0 -0
  127. package/QQlP.woff2 +0 -0
  128. package/QUNT.woff2 +0 -0
  129. package/QVyZ.woff2 +0 -0
  130. package/Qjcg.woff2 +0 -0
  131. package/Qo6Y.woff2 +0 -0
  132. package/RCbC.woff2 +0 -0
  133. package/README.md +225 -3
  134. package/RLNy.woff2 +0 -0
  135. package/RPwS.woff2 +0 -0
  136. package/RdOM.woff2 +0 -0
  137. package/RiLH.woff2 +0 -0
  138. package/RmLy.woff2 +0 -0
  139. package/Slgl.woff2 +0 -0
  140. package/SmUX.woff2 +0 -0
  141. package/T4Oo.woff2 +0 -0
  142. package/TR3D.woff2 +0 -0
  143. package/U0dX.woff2 +0 -0
  144. package/U1td.woff2 +0 -0
  145. package/U4KI.woff2 +0 -0
  146. package/UBEX.woff2 +0 -0
  147. package/UZOR.woff2 +0 -0
  148. package/UnJd.woff2 +0 -0
  149. package/V3y3.woff2 +0 -0
  150. package/V6v-.woff2 +0 -0
  151. package/VILN.woff2 +0 -0
  152. package/VPQT.woff2 +0 -0
  153. package/VWrT.woff2 +0 -0
  154. package/WQtc.woff2 +0 -0
  155. package/WwNi.woff2 +0 -0
  156. package/X0EV.woff2 +0 -0
  157. package/XLH2.woff2 +0 -0
  158. package/XO3j.woff2 +0 -0
  159. package/XcYc.woff2 +0 -0
  160. package/Xrko.woff2 +0 -0
  161. package/XsTQ.woff2 +0 -0
  162. package/Y0Aq.woff2 +0 -0
  163. package/YM8k.woff2 +0 -0
  164. package/YS7S.woff2 +0 -0
  165. package/YWWb.woff2 +0 -0
  166. package/YgHp.woff2 +0 -0
  167. package/YjQg.woff2 +0 -0
  168. package/Yxa9.woff2 +0 -0
  169. package/Z8iw.woff2 +0 -0
  170. package/ZJqm.woff2 +0 -0
  171. package/ZK_d.woff2 +0 -0
  172. package/ZX1B.woff2 +0 -0
  173. package/ZaAT.woff2 +0 -0
  174. package/Zpnf.woff2 +0 -0
  175. package/_.css +2 -0
  176. package/_EKX.woff2 +0 -0
  177. package/_MND.woff2 +0 -0
  178. package/_YMO.woff2 +0 -0
  179. package/a6CQ.woff2 +0 -0
  180. package/ajo4.woff2 +0 -0
  181. package/azpT.woff2 +0 -0
  182. package/b-Pf.woff2 +0 -0
  183. package/bFGB.woff2 +0 -0
  184. package/bGIE.woff2 +0 -0
  185. package/bKcl.woff2 +0 -0
  186. package/bsyu.woff2 +0 -0
  187. package/bzA-.woff2 +0 -0
  188. package/c-gP.woff2 +0 -0
  189. package/c.css +1 -0
  190. package/c0t0.woff2 +0 -0
  191. package/c0vP.woff2 +0 -0
  192. package/c978.woff2 +0 -0
  193. package/cOnJ.woff2 +0 -0
  194. package/cR5u.woff2 +0 -0
  195. package/c_zx.woff2 +0 -0
  196. package/cvXG.woff2 +0 -0
  197. package/d7D5.woff2 +0 -0
  198. package/dsMI.woff2 +0 -0
  199. package/dtyD.woff2 +0 -0
  200. package/e-1b.woff2 +0 -0
  201. package/eDmS.woff2 +0 -0
  202. package/eivr.woff2 +0 -0
  203. package/eySP.woff2 +0 -0
  204. package/f1mD.woff2 +0 -0
  205. package/fEE1.woff2 +0 -0
  206. package/fQyD.woff2 +0 -0
  207. package/fSg2.woff2 +0 -0
  208. package/fleI.woff2 +0 -0
  209. package/ftah.woff2 +0 -0
  210. package/gCUE.woff2 +0 -0
  211. package/gNVS.woff2 +0 -0
  212. package/gbx7.woff2 +0 -0
  213. package/gjfn.woff2 +0 -0
  214. package/gnEg.woff2 +0 -0
  215. package/gwUy.woff2 +0 -0
  216. package/h9gv.woff2 +0 -0
  217. package/hWwS.woff2 +0 -0
  218. package/hh-l.woff2 +0 -0
  219. package/hhR6.woff2 +0 -0
  220. package/hwE7.woff2 +0 -0
  221. package/iP-U.woff2 +0 -0
  222. package/idYt.woff2 +0 -0
  223. package/ie2e.woff2 +0 -0
  224. package/istW.woff2 +0 -0
  225. package/iySI.woff2 +0 -0
  226. package/j2Ix.woff2 +0 -0
  227. package/j9It.woff2 +0 -0
  228. package/jC_7.woff2 +0 -0
  229. package/jNTq.woff2 +0 -0
  230. package/jqLk.woff2 +0 -0
  231. package/k0-i.woff2 +0 -0
  232. package/k8cB.woff2 +0 -0
  233. package/kNq4.woff2 +0 -0
  234. package/kc0f.woff2 +0 -0
  235. package/ks3H.woff2 +0 -0
  236. package/kvtB.woff2 +0 -0
  237. package/l096.woff2 +0 -0
  238. package/l6xJ.woff2 +0 -0
  239. package/l9Sk.woff2 +0 -0
  240. package/lMaK.woff2 +0 -0
  241. package/lPzz.woff2 +0 -0
  242. package/lZ7T.woff2 +0 -0
  243. package/lfc_.woff2 +0 -0
  244. package/lkAp.woff2 +0 -0
  245. package/lqz_.woff2 +0 -0
  246. package/m8fe.woff2 +0 -0
  247. package/mThg.woff2 +0 -0
  248. package/mmow.woff2 +0 -0
  249. package/mv3H.woff2 +0 -0
  250. package/n-Hs.woff2 +0 -0
  251. package/nBhF.woff2 +0 -0
  252. package/nH_q.woff2 +0 -0
  253. package/nOaG.woff2 +0 -0
  254. package/nUkR.woff2 +0 -0
  255. package/nYed.woff2 +0 -0
  256. package/nu5b.woff2 +0 -0
  257. package/oq9D.woff2 +0 -0
  258. package/p5EI.woff2 +0 -0
  259. package/pCBa.woff2 +0 -0
  260. package/pZwL.woff2 +0 -0
  261. package/package.json +24 -1
  262. package/pdlV.woff2 +0 -0
  263. package/q0a9.woff2 +0 -0
  264. package/q7FU.woff2 +0 -0
  265. package/q7zs.woff2 +0 -0
  266. package/qCOQ.woff2 +0 -0
  267. package/qFqQ.woff2 +0 -0
  268. package/qOem.woff2 +0 -0
  269. package/qWlm.woff2 +0 -0
  270. package/qn7_.woff2 +0 -0
  271. package/qwhx.woff2 +0 -0
  272. package/r-OT.woff2 +0 -0
  273. package/rDsB.woff2 +0 -0
  274. package/rFOk.woff2 +0 -0
  275. package/rLiZ.woff2 +0 -0
  276. package/rMMd.woff2 +0 -0
  277. package/rSp-.woff2 +0 -0
  278. package/rcpk.woff2 +0 -0
  279. package/rd6A.woff2 +0 -0
  280. package/rlvg.woff2 +0 -0
  281. package/s0qq.woff2 +0 -0
  282. package/sH1v.woff2 +0 -0
  283. package/sLHc.woff2 +0 -0
  284. package/suuy.woff2 +0 -0
  285. package/syw0.woff2 +0 -0
  286. package/szA5.woff2 +0 -0
  287. package/t.css +1 -0
  288. package/t0U3.woff2 +0 -0
  289. package/t612.woff2 +0 -0
  290. package/tE5M.woff2 +0 -0
  291. package/tdmZ.woff2 +0 -0
  292. package/u5Sv.woff2 +0 -0
  293. package/ugvG.woff2 +0 -0
  294. package/ulKx.woff2 +0 -0
  295. package/uqrW.woff2 +0 -0
  296. package/vqlJ.woff2 +0 -0
  297. package/vus4.woff2 +0 -0
  298. package/wMTF.woff2 +0 -0
  299. package/wTua.woff2 +0 -0
  300. package/wYch.woff2 +0 -0
  301. package/wg6F.woff2 +0 -0
  302. package/wkD_.woff2 +0 -0
  303. package/x9_w.woff2 +0 -0
  304. package/xQaz.woff2 +0 -0
  305. package/yV2w.woff2 +0 -0
  306. package/yYCf.woff2 +0 -0
  307. package/yYYx.woff2 +0 -0
  308. package/ydvJ.woff2 +0 -0
  309. package/ytVL.woff2 +0 -0
  310. package/zZdA.woff2 +0 -0
  311. package/0.css +0 -1
  312. package/0.js +0 -1
  313. package/1.css +0 -1
  314. package/1.js +0 -16
  315. package/2.js +0 -1
  316. package/3.js +0 -16
  317. package/4.js +0 -1
  318. package/_.js +0 -1
package/3.js DELETED
@@ -1,16 +0,0 @@
1
- import{S as Gu,i as Wu,s as ju,e as Ws,a as Bn,b as qn,c as js,n as Un,d as Zs,o as Zu,f as Xs,N as Xu}from"./1.js";import{d as Yu,i as Ku}from"./2.js";import"x/a.js";import"x/bintxt.js";import"x/langHook.js";import"x/f.js";import"x/On.js";import"x/_.js";import"x/setUrl.js";import"x/selfA.js";import"x/xBox.js";import"x/pbox.js";import"x/fBinPrefix.js";import"x/Box.js";import"x/htmBox.js";import"x/lang.js";import"x/BC.js";import"x/share.js";import"x/Match.js";import"x/utf8d.js";import"x/goto.js";import"x/forceGoto.js";import"x/langSite.js";import"x/route.js";function Ii(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function _a(z,n){z.prototype=Object.create(n.prototype),z.prototype.constructor=z,z.__proto__=n}var ai={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Tr={duration:.5,overwrite:!1,delay:0},ds,Ue,ge,li=1e8,fe=1/li,Jn=Math.PI*2,Qu=Jn/4,Ju=0,ga=Math.sqrt,$u=Math.cos,to=Math.sin,Re=function(n){return typeof n=="string"},Ce=function(n){return typeof n=="function"},Ei=function(n){return typeof n=="number"},ps=function(n){return typeof n>"u"},wi=function(n){return typeof n=="object"},Ze=function(n){return n!==!1},_s=function(){return typeof window<"u"},dn=function(n){return Ce(n)||Re(n)},va=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},He=Array.isArray,$n=/(?:-?\.?\d|\.)+/gi,ma=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,wr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Hn=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,xa=/[+-]=-?[.\d]+/,ya=/[^,'"\[\]\s]+/gi,eo=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,be,mi,ts,gs,ui={},mn={},ba,wa=function(n){return(mn=cr(n,ui))&&Qe},vs=function(n,a){return console.warn("Invalid property",n,"set to",a,"Missing plugin? gsap.registerPlugin()")},Qr=function(n,a){return!a&&console.warn(n)},Sa=function(n,a){return n&&(ui[n]=a)&&mn&&(mn[n]=a)||ui},Jr=function(){return 0},io={suppressEvents:!0,isStart:!0,kill:!1},_n={suppressEvents:!0,kill:!1},ro={suppressEvents:!0},ms={},Bi=[],es={},Ca,ri={},Gn={},Ys=30,gn=[],xs="",ys=function(n){var a=n[0],o,f;if(wi(a)||Ce(a)||(n=[n]),!(o=(a._gsap||{}).harness)){for(f=gn.length;f--&&!gn[f].targetTest(a););o=gn[f]}for(f=n.length;f--;)n[f]&&(n[f]._gsap||(n[f]._gsap=new Xa(n[f],o)))||n.splice(f,1);return n},or=function(n){return n._gsap||ys(fi(n))[0]._gsap},ka=function(n,a,o){return(o=n[a])&&Ce(o)?n[a]():ps(o)&&n.getAttribute&&n.getAttribute(a)||o},Xe=function(n,a){return(n=n.split(",")).forEach(a)||n},Te=function(n){return Math.round(n*1e5)/1e5||0},Ne=function(n){return Math.round(n*1e7)/1e7||0},Cr=function(n,a){var o=a.charAt(0),f=parseFloat(a.substr(2));return n=parseFloat(n),o==="+"?n+f:o==="-"?n-f:o==="*"?n*f:n/f},no=function(n,a){for(var o=a.length,f=0;n.indexOf(a[f])<0&&++f<o;);return f<o},xn=function(){var n=Bi.length,a=Bi.slice(0),o,f;for(es={},Bi.length=0,o=0;o<n;o++)f=a[o],f&&f._lazy&&(f.render(f._lazy[0],f._lazy[1],!0)._lazy=0)},Pa=function(n,a,o,f){Bi.length&&!Ue&&xn(),n.render(a,o,Ue&&a<0&&(n._initted||n._startAt)),Bi.length&&!Ue&&xn()},Ta=function(n){var a=parseFloat(n);return(a||a===0)&&(n+"").match(ya).length<2?a:Re(n)?n.trim():n},Ia=function(n){return n},ci=function(n,a){for(var o in a)o in n||(n[o]=a[o]);return n},so=function(n){return function(a,o){for(var f in o)f in a||f==="duration"&&n||f==="ease"||(a[f]=o[f])}},cr=function(n,a){for(var o in a)n[o]=a[o];return n},Ks=function z(n,a){for(var o in a)o!=="__proto__"&&o!=="constructor"&&o!=="prototype"&&(n[o]=wi(a[o])?z(n[o]||(n[o]={}),a[o]):a[o]);return n},yn=function(n,a){var o={},f;for(f in n)f in a||(o[f]=n[f]);return o},Xr=function(n){var a=n.parent||be,o=n.keyframes?so(He(n.keyframes)):ci;if(Ze(n.inherit))for(;a;)o(n,a.vars.defaults),a=a.parent||a._dp;return n},ao=function(n,a){for(var o=n.length,f=o===a.length;f&&o--&&n[o]===a[o];);return o<0},Aa=function(n,a,o,f,c){var P=n[f],O;if(c)for(O=a[c];P&&P[c]>O;)P=P._prev;return P?(a._next=P._next,P._next=a):(a._next=n[o],n[o]=a),a._next?a._next._prev=a:n[f]=a,a._prev=P,a.parent=a._dp=n,a},kn=function(n,a,o,f){o===void 0&&(o="_first"),f===void 0&&(f="_last");var c=a._prev,P=a._next;c?c._next=P:n[o]===a&&(n[o]=P),P?P._prev=c:n[f]===a&&(n[f]=c),a._next=a._prev=a.parent=null},Ui=function(n,a){n.parent&&(!a||n.parent.autoRemoveChildren)&&n.parent.remove&&n.parent.remove(n),n._act=0},hr=function(n,a){if(n&&(!a||a._end>n._dur||a._start<0))for(var o=n;o;)o._dirty=1,o=o.parent;return n},uo=function(n){for(var a=n.parent;a&&a.parent;)a._dirty=1,a.totalDuration(),a=a.parent;return n},is=function(n,a,o,f){return n._startAt&&(Ue?n._startAt.revert(_n):n.vars.immediateRender&&!n.vars.autoRevert||n._startAt.render(a,!0,f))},oo=function z(n){return!n||n._ts&&z(n.parent)},Qs=function(n){return n._repeat?Ir(n._tTime,n=n.duration()+n._rDelay)*n:0},Ir=function(n,a){var o=Math.floor(n/=a);return n&&o===n?o-1:o},bn=function(n,a){return(n-a._start)*a._ts+(a._ts>=0?0:a._dirty?a.totalDuration():a._tDur)},Pn=function(n){return n._end=Ne(n._start+(n._tDur/Math.abs(n._ts||n._rts||fe)||0))},Tn=function(n,a){var o=n._dp;return o&&o.smoothChildTiming&&n._ts&&(n._start=Ne(o._time-(n._ts>0?a/n._ts:((n._dirty?n.totalDuration():n._tDur)-a)/-n._ts)),Pn(n),o._dirty||hr(o,n)),n},Ea=function(n,a){var o;if((a._time||!a._dur&&a._initted||a._start<n._time&&(a._dur||!a.add))&&(o=bn(n.rawTime(),a),(!a._dur||sn(0,a.totalDuration(),o)-a._tTime>fe)&&a.render(o,!0)),hr(n,a)._dp&&n._initted&&n._time>=n._dur&&n._ts){if(n._dur<n.duration())for(o=n;o._dp;)o.rawTime()>=0&&o.totalTime(o._tTime),o=o._dp;n._zTime=-fe}},xi=function(n,a,o,f){return a.parent&&Ui(a),a._start=Ne((Ei(o)?o:o||n!==be?hi(n,o,a):n._time)+a._delay),a._end=Ne(a._start+(a.totalDuration()/Math.abs(a.timeScale())||0)),Aa(n,a,"_first","_last",n._sort?"_start":0),rs(a)||(n._recent=a),f||Ea(n,a),n._ts<0&&Tn(n,n._tTime),n},Oa=function(n,a){return(ui.ScrollTrigger||vs("scrollTrigger",a))&&ui.ScrollTrigger.create(a,n)},Ma=function(n,a,o,f,c){if(ws(n,a,c),!n._initted)return 1;if(!o&&n._pt&&!Ue&&(n._dur&&n.vars.lazy!==!1||!n._dur&&n.vars.lazy)&&Ca!==ni.frame)return Bi.push(n),n._lazy=[c,f],1},ho=function z(n){var a=n.parent;return a&&a._ts&&a._initted&&!a._lock&&(a.rawTime()<0||z(a))},rs=function(n){var a=n.data;return a==="isFromStart"||a==="isStart"},lo=function(n,a,o,f){var c=n.ratio,P=a<0||!a&&(!n._start&&ho(n)&&!(!n._initted&&rs(n))||(n._ts<0||n._dp._ts<0)&&!rs(n))?0:1,O=n._rDelay,D=0,B,q,K;if(O&&n._repeat&&(D=sn(0,n._tDur,a),q=Ir(D,O),n._yoyo&&q&1&&(P=1-P),q!==Ir(n._tTime,O)&&(c=1-P,n.vars.repeatRefresh&&n._initted&&n.invalidate())),P!==c||Ue||f||n._zTime===fe||!a&&n._zTime){if(!n._initted&&Ma(n,a,f,o,D))return;for(K=n._zTime,n._zTime=a||(o?fe:0),o||(o=a&&!K),n.ratio=P,n._from&&(P=1-P),n._time=0,n._tTime=D,B=n._pt;B;)B.r(P,B.d),B=B._next;a<0&&is(n,a,o,!0),n._onUpdate&&!o&&si(n,"onUpdate"),D&&n._repeat&&!o&&n.parent&&si(n,"onRepeat"),(a>=n._tDur||a<0)&&n.ratio===P&&(P&&Ui(n,1),!o&&!Ue&&(si(n,P?"onComplete":"onReverseComplete",!0),n._prom&&n._prom()))}else n._zTime||(n._zTime=a)},fo=function(n,a,o){var f;if(o>a)for(f=n._first;f&&f._start<=o;){if(f.data==="isPause"&&f._start>a)return f;f=f._next}else for(f=n._last;f&&f._start>=o;){if(f.data==="isPause"&&f._start<a)return f;f=f._prev}},Ar=function(n,a,o,f){var c=n._repeat,P=Ne(a)||0,O=n._tTime/n._tDur;return O&&!f&&(n._time*=P/n._dur),n._dur=P,n._tDur=c?c<0?1e10:Ne(P*(c+1)+n._rDelay*c):P,O>0&&!f&&Tn(n,n._tTime=n._tDur*O),n.parent&&Pn(n),o||hr(n.parent,n),n},Js=function(n){return n instanceof je?hr(n):Ar(n,n._dur)},co={_start:0,endTime:Jr,totalDuration:Jr},hi=function z(n,a,o){var f=n.labels,c=n._recent||co,P=n.duration()>=li?c.endTime(!1):n._dur,O,D,B;return Re(a)&&(isNaN(a)||a in f)?(D=a.charAt(0),B=a.substr(-1)==="%",O=a.indexOf("="),D==="<"||D===">"?(O>=0&&(a=a.replace(/=/,"")),(D==="<"?c._start:c.endTime(c._repeat>=0))+(parseFloat(a.substr(1))||0)*(B?(O<0?c:o).totalDuration()/100:1)):O<0?(a in f||(f[a]=P),f[a]):(D=parseFloat(a.charAt(O-1)+a.substr(O+1)),B&&o&&(D=D/100*(He(o)?o[0]:o).totalDuration()),O>1?z(n,a.substr(0,O-1),o)+D:P+D)):a==null?P:+a},Yr=function(n,a,o){var f=Ei(a[1]),c=(f?2:1)+(n<2?0:1),P=a[c],O,D;if(f&&(P.duration=a[1]),P.parent=o,n){for(O=P,D=o;D&&!("immediateRender"in O);)O=D.vars.defaults||{},D=Ze(D.vars.inherit)&&D.parent;P.immediateRender=Ze(O.immediateRender),n<2?P.runBackwards=1:P.startAt=a[c-1]}return new Ae(a[0],P,a[c+1])},Gi=function(n,a){return n||n===0?a(n):a},sn=function(n,a,o){return o<n?n:o>a?a:o},qe=function(n,a){return!Re(n)||!(a=eo.exec(n))?"":a[1]},po=function(n,a,o){return Gi(o,function(f){return sn(n,a,f)})},ns=[].slice,La=function(n,a){return n&&wi(n)&&"length"in n&&(!a&&!n.length||n.length-1 in n&&wi(n[0]))&&!n.nodeType&&n!==mi},_o=function(n,a,o){return o===void 0&&(o=[]),n.forEach(function(f){var c;return Re(f)&&!a||La(f,1)?(c=o).push.apply(c,fi(f)):o.push(f)})||o},fi=function(n,a,o){return ge&&!a&&ge.selector?ge.selector(n):Re(n)&&!o&&(ts||!Er())?ns.call((a||gs).querySelectorAll(n),0):He(n)?_o(n,o):La(n)?ns.call(n,0):n?[n]:[]},ss=function(n){return n=fi(n)[0]||Qr("Invalid scope")||{},function(a){var o=n.current||n.nativeElement||n;return fi(a,o.querySelectorAll?o:o===n?Qr("Invalid scope")||gs.createElement("div"):n)}},Na=function(n){return n.sort(function(){return .5-Math.random()})},Ra=function(n){if(Ce(n))return n;var a=wi(n)?n:{each:n},o=lr(a.ease),f=a.from||0,c=parseFloat(a.base)||0,P={},O=f>0&&f<1,D=isNaN(f)||O,B=a.axis,q=f,K=f;return Re(f)?q=K={center:.5,edges:.5,end:1}[f]||0:!O&&D&&(q=f[0],K=f[1]),function(it,F,at){var G=(at||a).length,et=P[G],nt,pt,ft,gt,ot,T,xt,kt,vt;if(!et){if(vt=a.grid==="auto"?0:(a.grid||[1,li])[1],!vt){for(xt=-li;xt<(xt=at[vt++].getBoundingClientRect().left)&&vt<G;);vt<G&&vt--}for(et=P[G]=[],nt=D?Math.min(vt,G)*q-.5:f%vt,pt=vt===li?0:D?G*K/vt-.5:f/vt|0,xt=0,kt=li,T=0;T<G;T++)ft=T%vt-nt,gt=pt-(T/vt|0),et[T]=ot=B?Math.abs(B==="y"?gt:ft):ga(ft*ft+gt*gt),ot>xt&&(xt=ot),ot<kt&&(kt=ot);f==="random"&&Na(et),et.max=xt-kt,et.min=kt,et.v=G=(parseFloat(a.amount)||parseFloat(a.each)*(vt>G?G-1:B?B==="y"?G/vt:vt:Math.max(vt,G/vt))||0)*(f==="edges"?-1:1),et.b=G<0?c-G:c,et.u=qe(a.amount||a.each)||0,o=o&&G<0?Wa(o):o}return G=(et[it]-et.min)/et.max||0,Ne(et.b+(o?o(G):G)*et.v)+et.u}},as=function(n){var a=Math.pow(10,((n+"").split(".")[1]||"").length);return function(o){var f=Ne(Math.round(parseFloat(o)/n)*n*a);return(f-f%1)/a+(Ei(o)?0:qe(o))}},Fa=function(n,a){var o=He(n),f,c;return!o&&wi(n)&&(f=o=n.radius||li,n.values?(n=fi(n.values),(c=!Ei(n[0]))&&(f*=f)):n=as(n.increment)),Gi(a,o?Ce(n)?function(P){return c=n(P),Math.abs(c-P)<=f?c:P}:function(P){for(var O=parseFloat(c?P.x:P),D=parseFloat(c?P.y:0),B=li,q=0,K=n.length,it,F;K--;)c?(it=n[K].x-O,F=n[K].y-D,it=it*it+F*F):it=Math.abs(n[K]-O),it<B&&(B=it,q=K);return q=!f||B<=f?n[q]:P,c||q===P||Ei(P)?q:q+qe(P)}:as(n))},za=function(n,a,o,f){return Gi(He(n)?!a:o===!0?!!(o=0):!f,function(){return He(n)?n[~~(Math.random()*n.length)]:(o=o||1e-5)&&(f=o<1?Math.pow(10,(o+"").length-2):1)&&Math.floor(Math.round((n-o/2+Math.random()*(a-n+o*.99))/o)*o*f)/f})},go=function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return function(f){return a.reduce(function(c,P){return P(c)},f)}},vo=function(n,a){return function(o){return n(parseFloat(o))+(a||qe(o))}},mo=function(n,a,o){return Va(n,a,0,1,o)},Da=function(n,a,o){return Gi(o,function(f){return n[~~a(f)]})},xo=function z(n,a,o){var f=a-n;return He(n)?Da(n,z(0,n.length),a):Gi(o,function(c){return(f+(c-n)%f)%f+n})},yo=function z(n,a,o){var f=a-n,c=f*2;return He(n)?Da(n,z(0,n.length-1),a):Gi(o,function(P){return P=(c+(P-n)%c)%c||0,n+(P>f?c-P:P)})},$r=function(n){for(var a=0,o="",f,c,P,O;~(f=n.indexOf("random(",a));)P=n.indexOf(")",f),O=n.charAt(f+7)==="[",c=n.substr(f+7,P-f-7).match(O?ya:$n),o+=n.substr(a,f-a)+za(O?c:+c[0],O?0:+c[1],+c[2]||1e-5),a=P+1;return o+n.substr(a,n.length-a)},Va=function(n,a,o,f,c){var P=a-n,O=f-o;return Gi(c,function(D){return o+((D-n)/P*O||0)})},bo=function z(n,a,o,f){var c=isNaN(n+a)?0:function(F){return(1-F)*n+F*a};if(!c){var P=Re(n),O={},D,B,q,K,it;if(o===!0&&(f=1)&&(o=null),P)n={p:n},a={p:a};else if(He(n)&&!He(a)){for(q=[],K=n.length,it=K-2,B=1;B<K;B++)q.push(z(n[B-1],n[B]));K--,c=function(at){at*=K;var G=Math.min(it,~~at);return q[G](at-G)},o=a}else f||(n=cr(He(n)?[]:{},n));if(!q){for(D in a)bs.call(O,n,D,"get",a[D]);c=function(at){return ks(at,O)||(P?n.p:n)}}}return Gi(o,c)},$s=function(n,a,o){var f=n.labels,c=li,P,O,D;for(P in f)O=f[P]-a,O<0==!!o&&O&&c>(O=Math.abs(O))&&(D=P,c=O);return D},si=function(n,a,o){var f=n.vars,c=f[a],P=ge,O=n._ctx,D,B,q;if(c)return D=f[a+"Params"],B=f.callbackScope||n,o&&Bi.length&&xn(),O&&(ge=O),q=D?c.apply(B,D):c.call(B),ge=P,q},jr=function(n){return Ui(n),n.scrollTrigger&&n.scrollTrigger.kill(!!Ue),n.progress()<1&&si(n,"onInterrupt"),n},Sr,Ba=[],qa=function(n){if(n)if(n=!n.name&&n.default||n,_s()||n.headless){var a=n.name,o=Ce(n),f=a&&!o&&n.init?function(){this._props=[]}:n,c={init:Jr,render:ks,add:bs,kill:zo,modifier:Fo,rawVars:0},P={targetTest:0,get:0,getSetter:Cs,aliases:{},register:0};if(Er(),n!==f){if(ri[a])return;ci(f,ci(yn(n,c),P)),cr(f.prototype,cr(c,yn(n,P))),ri[f.prop=a]=f,n.targetTest&&(gn.push(f),ms[a]=1),a=(a==="css"?"CSS":a.charAt(0).toUpperCase()+a.substr(1))+"Plugin"}Sa(a,f),n.register&&n.register(Qe,f,Ye)}else Ba.push(n)},le=255,Zr={aqua:[0,le,le],lime:[0,le,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,le],navy:[0,0,128],white:[le,le,le],olive:[128,128,0],yellow:[le,le,0],orange:[le,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[le,0,0],pink:[le,192,203],cyan:[0,le,le],transparent:[le,le,le,0]},Wn=function(n,a,o){return n+=n<0?1:n>1?-1:0,(n*6<1?a+(o-a)*n*6:n<.5?o:n*3<2?a+(o-a)*(2/3-n)*6:a)*le+.5|0},Ua=function(n,a,o){var f=n?Ei(n)?[n>>16,n>>8&le,n&le]:0:Zr.black,c,P,O,D,B,q,K,it,F,at;if(!f){if(n.substr(-1)===","&&(n=n.substr(0,n.length-1)),Zr[n])f=Zr[n];else if(n.charAt(0)==="#"){if(n.length<6&&(c=n.charAt(1),P=n.charAt(2),O=n.charAt(3),n="#"+c+c+P+P+O+O+(n.length===5?n.charAt(4)+n.charAt(4):"")),n.length===9)return f=parseInt(n.substr(1,6),16),[f>>16,f>>8&le,f&le,parseInt(n.substr(7),16)/255];n=parseInt(n.substr(1),16),f=[n>>16,n>>8&le,n&le]}else if(n.substr(0,3)==="hsl"){if(f=at=n.match($n),!a)D=+f[0]%360/360,B=+f[1]/100,q=+f[2]/100,P=q<=.5?q*(B+1):q+B-q*B,c=q*2-P,f.length>3&&(f[3]*=1),f[0]=Wn(D+1/3,c,P),f[1]=Wn(D,c,P),f[2]=Wn(D-1/3,c,P);else if(~n.indexOf("="))return f=n.match(ma),o&&f.length<4&&(f[3]=1),f}else f=n.match($n)||Zr.transparent;f=f.map(Number)}return a&&!at&&(c=f[0]/le,P=f[1]/le,O=f[2]/le,K=Math.max(c,P,O),it=Math.min(c,P,O),q=(K+it)/2,K===it?D=B=0:(F=K-it,B=q>.5?F/(2-K-it):F/(K+it),D=K===c?(P-O)/F+(P<O?6:0):K===P?(O-c)/F+2:(c-P)/F+4,D*=60),f[0]=~~(D+.5),f[1]=~~(B*100+.5),f[2]=~~(q*100+.5)),o&&f.length<4&&(f[3]=1),f},Ha=function(n){var a=[],o=[],f=-1;return n.split(qi).forEach(function(c){var P=c.match(wr)||[];a.push.apply(a,P),o.push(f+=P.length+1)}),a.c=o,a},ta=function(n,a,o){var f="",c=(n+f).match(qi),P=a?"hsla(":"rgba(",O=0,D,B,q,K;if(!c)return n;if(c=c.map(function(it){return(it=Ua(it,a,1))&&P+(a?it[0]+","+it[1]+"%,"+it[2]+"%,"+it[3]:it.join(","))+")"}),o&&(q=Ha(n),D=o.c,D.join(f)!==q.c.join(f)))for(B=n.replace(qi,"1").split(wr),K=B.length-1;O<K;O++)f+=B[O]+(~D.indexOf(O)?c.shift()||P+"0,0,0,0)":(q.length?q:c.length?c:o).shift());if(!B)for(B=n.split(qi),K=B.length-1;O<K;O++)f+=B[O]+c[O];return f+B[K]},qi=function(){var z="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",n;for(n in Zr)z+="|"+n+"\\b";return new RegExp(z+")","gi")}(),wo=/hsl[a]?\(/,Ga=function(n){var a=n.join(" "),o;if(qi.lastIndex=0,qi.test(a))return o=wo.test(a),n[1]=ta(n[1],o),n[0]=ta(n[0],o,Ha(n[1])),!0},tn,ni=function(){var z=Date.now,n=500,a=33,o=z(),f=o,c=1e3/240,P=c,O=[],D,B,q,K,it,F,at=function G(et){var nt=z()-f,pt=et===!0,ft,gt,ot,T;if((nt>n||nt<0)&&(o+=nt-a),f+=nt,ot=f-o,ft=ot-P,(ft>0||pt)&&(T=++K.frame,it=ot-K.time*1e3,K.time=ot=ot/1e3,P+=ft+(ft>=c?4:c-ft),gt=1),pt||(D=B(G)),gt)for(F=0;F<O.length;F++)O[F](ot,it,T,et)};return K={time:0,frame:0,tick:function(){at(!0)},deltaRatio:function(et){return it/(1e3/(et||60))},wake:function(){ba&&(!ts&&_s()&&(mi=ts=window,gs=mi.document||{},ui.gsap=Qe,(mi.gsapVersions||(mi.gsapVersions=[])).push(Qe.version),wa(mn||mi.GreenSockGlobals||!mi.gsap&&mi||{}),Ba.forEach(qa)),q=typeof requestAnimationFrame<"u"&&requestAnimationFrame,D&&K.sleep(),B=q||function(et){return setTimeout(et,P-K.time*1e3+1|0)},tn=1,at(2))},sleep:function(){(q?cancelAnimationFrame:clearTimeout)(D),tn=0,B=Jr},lagSmoothing:function(et,nt){n=et||1/0,a=Math.min(nt||33,n)},fps:function(et){c=1e3/(et||240),P=K.time*1e3+c},add:function(et,nt,pt){var ft=nt?function(gt,ot,T,xt){et(gt,ot,T,xt),K.remove(ft)}:et;return K.remove(et),O[pt?"unshift":"push"](ft),Er(),ft},remove:function(et,nt){~(nt=O.indexOf(et))&&O.splice(nt,1)&&F>=nt&&F--},_listeners:O},K}(),Er=function(){return!tn&&ni.wake()},$t={},So=/^[\d.\-M][\d.\-,\s]/,Co=/["']/g,ko=function(n){for(var a={},o=n.substr(1,n.length-3).split(":"),f=o[0],c=1,P=o.length,O,D,B;c<P;c++)D=o[c],O=c!==P-1?D.lastIndexOf(","):D.length,B=D.substr(0,O),a[f]=isNaN(B)?B.replace(Co,"").trim():+B,f=D.substr(O+1).trim();return a},Po=function(n){var a=n.indexOf("(")+1,o=n.indexOf(")"),f=n.indexOf("(",a);return n.substring(a,~f&&f<o?n.indexOf(")",o+1):o)},To=function(n){var a=(n+"").split("("),o=$t[a[0]];return o&&a.length>1&&o.config?o.config.apply(null,~n.indexOf("{")?[ko(a[1])]:Po(n).split(",").map(Ta)):$t._CE&&So.test(n)?$t._CE("",n):o},Wa=function(n){return function(a){return 1-n(1-a)}},ja=function z(n,a){for(var o=n._first,f;o;)o instanceof je?z(o,a):o.vars.yoyoEase&&(!o._yoyo||!o._repeat)&&o._yoyo!==a&&(o.timeline?z(o.timeline,a):(f=o._ease,o._ease=o._yEase,o._yEase=f,o._yoyo=a)),o=o._next},lr=function(n,a){return n&&(Ce(n)?n:$t[n]||To(n))||a},pr=function(n,a,o,f){o===void 0&&(o=function(D){return 1-a(1-D)}),f===void 0&&(f=function(D){return D<.5?a(D*2)/2:1-a((1-D)*2)/2});var c={easeIn:a,easeOut:o,easeInOut:f},P;return Xe(n,function(O){$t[O]=ui[O]=c,$t[P=O.toLowerCase()]=o;for(var D in c)$t[P+(D==="easeIn"?".in":D==="easeOut"?".out":".inOut")]=$t[O+"."+D]=c[D]}),c},Za=function(n){return function(a){return a<.5?(1-n(1-a*2))/2:.5+n((a-.5)*2)/2}},jn=function z(n,a,o){var f=a>=1?a:1,c=(o||(n?.3:.45))/(a<1?a:1),P=c/Jn*(Math.asin(1/f)||0),O=function(q){return q===1?1:f*Math.pow(2,-10*q)*to((q-P)*c)+1},D=n==="out"?O:n==="in"?function(B){return 1-O(1-B)}:Za(O);return c=Jn/c,D.config=function(B,q){return z(n,B,q)},D},Zn=function z(n,a){a===void 0&&(a=1.70158);var o=function(P){return P?--P*P*((a+1)*P+a)+1:0},f=n==="out"?o:n==="in"?function(c){return 1-o(1-c)}:Za(o);return f.config=function(c){return z(n,c)},f};Xe("Linear,Quad,Cubic,Quart,Quint,Strong",function(z,n){var a=n<5?n+1:n;pr(z+",Power"+(a-1),n?function(o){return Math.pow(o,a)}:function(o){return o},function(o){return 1-Math.pow(1-o,a)},function(o){return o<.5?Math.pow(o*2,a)/2:1-Math.pow((1-o)*2,a)/2})});$t.Linear.easeNone=$t.none=$t.Linear.easeIn;pr("Elastic",jn("in"),jn("out"),jn());(function(z,n){var a=1/n,o=2*a,f=2.5*a,c=function(O){return O<a?z*O*O:O<o?z*Math.pow(O-1.5/n,2)+.75:O<f?z*(O-=2.25/n)*O+.9375:z*Math.pow(O-2.625/n,2)+.984375};pr("Bounce",function(P){return 1-c(1-P)},c)})(7.5625,2.75);pr("Expo",function(z){return z?Math.pow(2,10*(z-1)):0});pr("Circ",function(z){return-(ga(1-z*z)-1)});pr("Sine",function(z){return z===1?1:-$u(z*Qu)+1});pr("Back",Zn("in"),Zn("out"),Zn());$t.SteppedEase=$t.steps=ui.SteppedEase={config:function(n,a){n===void 0&&(n=1);var o=1/n,f=n+(a?0:1),c=a?1:0,P=1-fe;return function(O){return((f*sn(0,P,O)|0)+c)*o}}};Tr.ease=$t["quad.out"];Xe("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(z){return xs+=z+","+z+"Params,"});var Xa=function(n,a){this.id=Ju++,n._gsap=this,this.target=n,this.harness=a,this.get=a?a.get:ka,this.set=a?a.getSetter:Cs},en=function(){function z(a){this.vars=a,this._delay=+a.delay||0,(this._repeat=a.repeat===1/0?-2:a.repeat||0)&&(this._rDelay=a.repeatDelay||0,this._yoyo=!!a.yoyo||!!a.yoyoEase),this._ts=1,Ar(this,+a.duration,1,1),this.data=a.data,ge&&(this._ctx=ge,ge.data.push(this)),tn||ni.wake()}var n=z.prototype;return n.delay=function(o){return o||o===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+o-this._delay),this._delay=o,this):this._delay},n.duration=function(o){return arguments.length?this.totalDuration(this._repeat>0?o+(o+this._rDelay)*this._repeat:o):this.totalDuration()&&this._dur},n.totalDuration=function(o){return arguments.length?(this._dirty=0,Ar(this,this._repeat<0?o:(o-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},n.totalTime=function(o,f){if(Er(),!arguments.length)return this._tTime;var c=this._dp;if(c&&c.smoothChildTiming&&this._ts){for(Tn(this,o),!c._dp||c.parent||Ea(c,this);c&&c.parent;)c.parent._time!==c._start+(c._ts>=0?c._tTime/c._ts:(c.totalDuration()-c._tTime)/-c._ts)&&c.totalTime(c._tTime,!0),c=c.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&o<this._tDur||this._ts<0&&o>0||!this._tDur&&!o)&&xi(this._dp,this,this._start-this._delay)}return(this._tTime!==o||!this._dur&&!f||this._initted&&Math.abs(this._zTime)===fe||!o&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=o),Pa(this,o,f)),this},n.time=function(o,f){return arguments.length?this.totalTime(Math.min(this.totalDuration(),o+Qs(this))%(this._dur+this._rDelay)||(o?this._dur:0),f):this._time},n.totalProgress=function(o,f){return arguments.length?this.totalTime(this.totalDuration()*o,f):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},n.progress=function(o,f){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-o:o)+Qs(this),f):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},n.iteration=function(o,f){var c=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(o-1)*c,f):this._repeat?Ir(this._tTime,c)+1:1},n.timeScale=function(o,f){if(!arguments.length)return this._rts===-fe?0:this._rts;if(this._rts===o)return this;var c=this.parent&&this._ts?bn(this.parent._time,this):this._tTime;return this._rts=+o||0,this._ts=this._ps||o===-fe?0:this._rts,this.totalTime(sn(-Math.abs(this._delay),this._tDur,c),f!==!1),Pn(this),uo(this)},n.paused=function(o){return arguments.length?(this._ps!==o&&(this._ps=o,o?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Er(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},n.startTime=function(o){if(arguments.length){this._start=o;var f=this.parent||this._dp;return f&&(f._sort||!this.parent)&&xi(f,this,o-this._delay),this}return this._start},n.endTime=function(o){return this._start+(Ze(o)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},n.rawTime=function(o){var f=this.parent||this._dp;return f?o&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?bn(f.rawTime(o),this):this._tTime:this._tTime},n.revert=function(o){o===void 0&&(o=ro);var f=Ue;return Ue=o,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(o),this.totalTime(-.01,o.suppressEvents)),this.data!=="nested"&&o.kill!==!1&&this.kill(),Ue=f,this},n.globalTime=function(o){for(var f=this,c=arguments.length?o:f.rawTime();f;)c=f._start+c/(Math.abs(f._ts)||1),f=f._dp;return!this.parent&&this._sat?this._sat.globalTime(o):c},n.repeat=function(o){return arguments.length?(this._repeat=o===1/0?-2:o,Js(this)):this._repeat===-2?1/0:this._repeat},n.repeatDelay=function(o){if(arguments.length){var f=this._time;return this._rDelay=o,Js(this),f?this.time(f):this}return this._rDelay},n.yoyo=function(o){return arguments.length?(this._yoyo=o,this):this._yoyo},n.seek=function(o,f){return this.totalTime(hi(this,o),Ze(f))},n.restart=function(o,f){return this.play().totalTime(o?-this._delay:0,Ze(f))},n.play=function(o,f){return o!=null&&this.seek(o,f),this.reversed(!1).paused(!1)},n.reverse=function(o,f){return o!=null&&this.seek(o||this.totalDuration(),f),this.reversed(!0).paused(!1)},n.pause=function(o,f){return o!=null&&this.seek(o,f),this.paused(!0)},n.resume=function(){return this.paused(!1)},n.reversed=function(o){return arguments.length?(!!o!==this.reversed()&&this.timeScale(-this._rts||(o?-fe:0)),this):this._rts<0},n.invalidate=function(){return this._initted=this._act=0,this._zTime=-fe,this},n.isActive=function(){var o=this.parent||this._dp,f=this._start,c;return!!(!o||this._ts&&this._initted&&o.isActive()&&(c=o.rawTime(!0))>=f&&c<this.endTime(!0)-fe)},n.eventCallback=function(o,f,c){var P=this.vars;return arguments.length>1?(f?(P[o]=f,c&&(P[o+"Params"]=c),o==="onUpdate"&&(this._onUpdate=f)):delete P[o],this):P[o]},n.then=function(o){var f=this;return new Promise(function(c){var P=Ce(o)?o:Ia,O=function(){var B=f.then;f.then=null,Ce(P)&&(P=P(f))&&(P.then||P===f)&&(f.then=B),c(P),f.then=B};f._initted&&f.totalProgress()===1&&f._ts>=0||!f._tTime&&f._ts<0?O():f._prom=O})},n.kill=function(){jr(this)},z}();ci(en.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-fe,_prom:0,_ps:!1,_rts:1});var je=function(z){_a(n,z);function n(o,f){var c;return o===void 0&&(o={}),c=z.call(this,o)||this,c.labels={},c.smoothChildTiming=!!o.smoothChildTiming,c.autoRemoveChildren=!!o.autoRemoveChildren,c._sort=Ze(o.sortChildren),be&&xi(o.parent||be,Ii(c),f),o.reversed&&c.reverse(),o.paused&&c.paused(!0),o.scrollTrigger&&Oa(Ii(c),o.scrollTrigger),c}var a=n.prototype;return a.to=function(f,c,P){return Yr(0,arguments,this),this},a.from=function(f,c,P){return Yr(1,arguments,this),this},a.fromTo=function(f,c,P,O){return Yr(2,arguments,this),this},a.set=function(f,c,P){return c.duration=0,c.parent=this,Xr(c).repeatDelay||(c.repeat=0),c.immediateRender=!!c.immediateRender,new Ae(f,c,hi(this,P),1),this},a.call=function(f,c,P){return xi(this,Ae.delayedCall(0,f,c),P)},a.staggerTo=function(f,c,P,O,D,B,q){return P.duration=c,P.stagger=P.stagger||O,P.onComplete=B,P.onCompleteParams=q,P.parent=this,new Ae(f,P,hi(this,D)),this},a.staggerFrom=function(f,c,P,O,D,B,q){return P.runBackwards=1,Xr(P).immediateRender=Ze(P.immediateRender),this.staggerTo(f,c,P,O,D,B,q)},a.staggerFromTo=function(f,c,P,O,D,B,q,K){return O.startAt=P,Xr(O).immediateRender=Ze(O.immediateRender),this.staggerTo(f,c,O,D,B,q,K)},a.render=function(f,c,P){var O=this._time,D=this._dirty?this.totalDuration():this._tDur,B=this._dur,q=f<=0?0:Ne(f),K=this._zTime<0!=f<0&&(this._initted||!B),it,F,at,G,et,nt,pt,ft,gt,ot,T,xt;if(this!==be&&q>D&&f>=0&&(q=D),q!==this._tTime||P||K){if(O!==this._time&&B&&(q+=this._time-O,f+=this._time-O),it=q,gt=this._start,ft=this._ts,nt=!ft,K&&(B||(O=this._zTime),(f||!c)&&(this._zTime=f)),this._repeat){if(T=this._yoyo,et=B+this._rDelay,this._repeat<-1&&f<0)return this.totalTime(et*100+f,c,P);if(it=Ne(q%et),q===D?(G=this._repeat,it=B):(G=~~(q/et),G&&G===q/et&&(it=B,G--),it>B&&(it=B)),ot=Ir(this._tTime,et),!O&&this._tTime&&ot!==G&&this._tTime-ot*et-this._dur<=0&&(ot=G),T&&G&1&&(it=B-it,xt=1),G!==ot&&!this._lock){var kt=T&&ot&1,vt=kt===(T&&G&1);if(G<ot&&(kt=!kt),O=kt?0:q%B?B:q,this._lock=1,this.render(O||(xt?0:Ne(G*et)),c,!B)._lock=0,this._tTime=q,!c&&this.parent&&si(this,"onRepeat"),this.vars.repeatRefresh&&!xt&&(this.invalidate()._lock=1),O&&O!==this._time||nt!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(B=this._dur,D=this._tDur,vt&&(this._lock=2,O=kt?B:-1e-4,this.render(O,!0),this.vars.repeatRefresh&&!xt&&this.invalidate()),this._lock=0,!this._ts&&!nt)return this;ja(this,xt)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(pt=fo(this,Ne(O),Ne(it)),pt&&(q-=it-(it=pt._start))),this._tTime=q,this._time=it,this._act=!ft,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=f,O=0),!O&&it&&!c&&!G&&(si(this,"onStart"),this._tTime!==q))return this;if(it>=O&&f>=0)for(F=this._first;F;){if(at=F._next,(F._act||it>=F._start)&&F._ts&&pt!==F){if(F.parent!==this)return this.render(f,c,P);if(F.render(F._ts>0?(it-F._start)*F._ts:(F._dirty?F.totalDuration():F._tDur)+(it-F._start)*F._ts,c,P),it!==this._time||!this._ts&&!nt){pt=0,at&&(q+=this._zTime=-fe);break}}F=at}else{F=this._last;for(var Ft=f<0?f:it;F;){if(at=F._prev,(F._act||Ft<=F._end)&&F._ts&&pt!==F){if(F.parent!==this)return this.render(f,c,P);if(F.render(F._ts>0?(Ft-F._start)*F._ts:(F._dirty?F.totalDuration():F._tDur)+(Ft-F._start)*F._ts,c,P||Ue&&(F._initted||F._startAt)),it!==this._time||!this._ts&&!nt){pt=0,at&&(q+=this._zTime=Ft?-fe:fe);break}}F=at}}if(pt&&!c&&(this.pause(),pt.render(it>=O?0:-fe)._zTime=it>=O?1:-1,this._ts))return this._start=gt,Pn(this),this.render(f,c,P);this._onUpdate&&!c&&si(this,"onUpdate",!0),(q===D&&this._tTime>=this.totalDuration()||!q&&O)&&(gt===this._start||Math.abs(ft)!==Math.abs(this._ts))&&(this._lock||((f||!B)&&(q===D&&this._ts>0||!q&&this._ts<0)&&Ui(this,1),!c&&!(f<0&&!O)&&(q||O||!D)&&(si(this,q===D&&f>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(q<D&&this.timeScale()>0)&&this._prom())))}return this},a.add=function(f,c){var P=this;if(Ei(c)||(c=hi(this,c,f)),!(f instanceof en)){if(He(f))return f.forEach(function(O){return P.add(O,c)}),this;if(Re(f))return this.addLabel(f,c);if(Ce(f))f=Ae.delayedCall(0,f);else return this}return this!==f?xi(this,f,c):this},a.getChildren=function(f,c,P,O){f===void 0&&(f=!0),c===void 0&&(c=!0),P===void 0&&(P=!0),O===void 0&&(O=-li);for(var D=[],B=this._first;B;)B._start>=O&&(B instanceof Ae?c&&D.push(B):(P&&D.push(B),f&&D.push.apply(D,B.getChildren(!0,c,P)))),B=B._next;return D},a.getById=function(f){for(var c=this.getChildren(1,1,1),P=c.length;P--;)if(c[P].vars.id===f)return c[P]},a.remove=function(f){return Re(f)?this.removeLabel(f):Ce(f)?this.killTweensOf(f):(kn(this,f),f===this._recent&&(this._recent=this._last),hr(this))},a.totalTime=function(f,c){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ne(ni.time-(this._ts>0?f/this._ts:(this.totalDuration()-f)/-this._ts))),z.prototype.totalTime.call(this,f,c),this._forcing=0,this):this._tTime},a.addLabel=function(f,c){return this.labels[f]=hi(this,c),this},a.removeLabel=function(f){return delete this.labels[f],this},a.addPause=function(f,c,P){var O=Ae.delayedCall(0,c||Jr,P);return O.data="isPause",this._hasPause=1,xi(this,O,hi(this,f))},a.removePause=function(f){var c=this._first;for(f=hi(this,f);c;)c._start===f&&c.data==="isPause"&&Ui(c),c=c._next},a.killTweensOf=function(f,c,P){for(var O=this.getTweensOf(f,P),D=O.length;D--;)zi!==O[D]&&O[D].kill(f,c);return this},a.getTweensOf=function(f,c){for(var P=[],O=fi(f),D=this._first,B=Ei(c),q;D;)D instanceof Ae?no(D._targets,O)&&(B?(!zi||D._initted&&D._ts)&&D.globalTime(0)<=c&&D.globalTime(D.totalDuration())>c:!c||D.isActive())&&P.push(D):(q=D.getTweensOf(O,c)).length&&P.push.apply(P,q),D=D._next;return P},a.tweenTo=function(f,c){c=c||{};var P=this,O=hi(P,f),D=c,B=D.startAt,q=D.onStart,K=D.onStartParams,it=D.immediateRender,F,at=Ae.to(P,ci({ease:c.ease||"none",lazy:!1,immediateRender:!1,time:O,overwrite:"auto",duration:c.duration||Math.abs((O-(B&&"time"in B?B.time:P._time))/P.timeScale())||fe,onStart:function(){if(P.pause(),!F){var et=c.duration||Math.abs((O-(B&&"time"in B?B.time:P._time))/P.timeScale());at._dur!==et&&Ar(at,et,0,1).render(at._time,!0,!0),F=1}q&&q.apply(at,K||[])}},c));return it?at.render(0):at},a.tweenFromTo=function(f,c,P){return this.tweenTo(c,ci({startAt:{time:hi(this,f)}},P))},a.recent=function(){return this._recent},a.nextLabel=function(f){return f===void 0&&(f=this._time),$s(this,hi(this,f))},a.previousLabel=function(f){return f===void 0&&(f=this._time),$s(this,hi(this,f),1)},a.currentLabel=function(f){return arguments.length?this.seek(f,!0):this.previousLabel(this._time+fe)},a.shiftChildren=function(f,c,P){P===void 0&&(P=0);for(var O=this._first,D=this.labels,B;O;)O._start>=P&&(O._start+=f,O._end+=f),O=O._next;if(c)for(B in D)D[B]>=P&&(D[B]+=f);return hr(this)},a.invalidate=function(f){var c=this._first;for(this._lock=0;c;)c.invalidate(f),c=c._next;return z.prototype.invalidate.call(this,f)},a.clear=function(f){f===void 0&&(f=!0);for(var c=this._first,P;c;)P=c._next,this.remove(c),c=P;return this._dp&&(this._time=this._tTime=this._pTime=0),f&&(this.labels={}),hr(this)},a.totalDuration=function(f){var c=0,P=this,O=P._last,D=li,B,q,K;if(arguments.length)return P.timeScale((P._repeat<0?P.duration():P.totalDuration())/(P.reversed()?-f:f));if(P._dirty){for(K=P.parent;O;)B=O._prev,O._dirty&&O.totalDuration(),q=O._start,q>D&&P._sort&&O._ts&&!P._lock?(P._lock=1,xi(P,O,q-O._delay,1)._lock=0):D=q,q<0&&O._ts&&(c-=q,(!K&&!P._dp||K&&K.smoothChildTiming)&&(P._start+=q/P._ts,P._time-=q,P._tTime-=q),P.shiftChildren(-q,!1,-1/0),D=0),O._end>c&&O._ts&&(c=O._end),O=B;Ar(P,P===be&&P._time>c?P._time:c,1,1),P._dirty=0}return P._tDur},n.updateRoot=function(f){if(be._ts&&(Pa(be,bn(f,be)),Ca=ni.frame),ni.frame>=Ys){Ys+=ai.autoSleep||120;var c=be._first;if((!c||!c._ts)&&ai.autoSleep&&ni._listeners.length<2){for(;c&&!c._ts;)c=c._next;c||ni.sleep()}}},n}(en);ci(je.prototype,{_lock:0,_hasPause:0,_forcing:0});var Io=function(n,a,o,f,c,P,O){var D=new Ye(this._pt,n,a,0,1,tu,null,c),B=0,q=0,K,it,F,at,G,et,nt,pt;for(D.b=o,D.e=f,o+="",f+="",(nt=~f.indexOf("random("))&&(f=$r(f)),P&&(pt=[o,f],P(pt,n,a),o=pt[0],f=pt[1]),it=o.match(Hn)||[];K=Hn.exec(f);)at=K[0],G=f.substring(B,K.index),F?F=(F+1)%5:G.substr(-5)==="rgba("&&(F=1),at!==it[q++]&&(et=parseFloat(it[q-1])||0,D._pt={_next:D._pt,p:G||q===1?G:",",s:et,c:at.charAt(1)==="="?Cr(et,at)-et:parseFloat(at)-et,m:F&&F<4?Math.round:0},B=Hn.lastIndex);return D.c=B<f.length?f.substring(B,f.length):"",D.fp=O,(xa.test(f)||nt)&&(D.e=0),this._pt=D,D},bs=function(n,a,o,f,c,P,O,D,B,q){Ce(f)&&(f=f(c||0,n,P));var K=n[a],it=o!=="get"?o:Ce(K)?B?n[a.indexOf("set")||!Ce(n["get"+a.substr(3)])?a:"get"+a.substr(3)](B):n[a]():K,F=Ce(K)?B?Lo:Ja:Ss,at;if(Re(f)&&(~f.indexOf("random(")&&(f=$r(f)),f.charAt(1)==="="&&(at=Cr(it,f)+(qe(it)||0),(at||at===0)&&(f=at))),!q||it!==f||us)return!isNaN(it*f)&&f!==""?(at=new Ye(this._pt,n,a,+it||0,f-(it||0),typeof K=="boolean"?Ro:$a,0,F),B&&(at.fp=B),O&&at.modifier(O,this,n),this._pt=at):(!K&&!(a in n)&&vs(a,f),Io.call(this,n,a,it,f,F,D||ai.stringFilter,B))},Ao=function(n,a,o,f,c){if(Ce(n)&&(n=Kr(n,c,a,o,f)),!wi(n)||n.style&&n.nodeType||He(n)||va(n))return Re(n)?Kr(n,c,a,o,f):n;var P={},O;for(O in n)P[O]=Kr(n[O],c,a,o,f);return P},Ya=function(n,a,o,f,c,P){var O,D,B,q;if(ri[n]&&(O=new ri[n]).init(c,O.rawVars?a[n]:Ao(a[n],f,c,P,o),o,f,P)!==!1&&(o._pt=D=new Ye(o._pt,c,n,0,1,O.render,O,0,O.priority),o!==Sr))for(B=o._ptLookup[o._targets.indexOf(c)],q=O._props.length;q--;)B[O._props[q]]=D;return O},zi,us,ws=function z(n,a,o){var f=n.vars,c=f.ease,P=f.startAt,O=f.immediateRender,D=f.lazy,B=f.onUpdate,q=f.runBackwards,K=f.yoyoEase,it=f.keyframes,F=f.autoRevert,at=n._dur,G=n._startAt,et=n._targets,nt=n.parent,pt=nt&&nt.data==="nested"?nt.vars.targets:et,ft=n._overwrite==="auto"&&!ds,gt=n.timeline,ot,T,xt,kt,vt,Ft,Wt,Ot,Rt,wt,te,_t,Qt;if(gt&&(!it||!c)&&(c="none"),n._ease=lr(c,Tr.ease),n._yEase=K?Wa(lr(K===!0?c:K,Tr.ease)):0,K&&n._yoyo&&!n._repeat&&(K=n._yEase,n._yEase=n._ease,n._ease=K),n._from=!gt&&!!f.runBackwards,!gt||it&&!f.stagger){if(Ot=et[0]?or(et[0]).harness:0,_t=Ot&&f[Ot.prop],ot=yn(f,ms),G&&(G._zTime<0&&G.progress(1),a<0&&q&&O&&!F?G.render(-1,!0):G.revert(q&&at?_n:io),G._lazy=0),P){if(Ui(n._startAt=Ae.set(et,ci({data:"isStart",overwrite:!1,parent:nt,immediateRender:!0,lazy:!G&&Ze(D),startAt:null,delay:0,onUpdate:B&&function(){return si(n,"onUpdate")},stagger:0},P))),n._startAt._dp=0,n._startAt._sat=n,a<0&&(Ue||!O&&!F)&&n._startAt.revert(_n),O&&at&&a<=0&&o<=0){a&&(n._zTime=a);return}}else if(q&&at&&!G){if(a&&(O=!1),xt=ci({overwrite:!1,data:"isFromStart",lazy:O&&!G&&Ze(D),immediateRender:O,stagger:0,parent:nt},ot),_t&&(xt[Ot.prop]=_t),Ui(n._startAt=Ae.set(et,xt)),n._startAt._dp=0,n._startAt._sat=n,a<0&&(Ue?n._startAt.revert(_n):n._startAt.render(-1,!0)),n._zTime=a,!O)z(n._startAt,fe,fe);else if(!a)return}for(n._pt=n._ptCache=0,D=at&&Ze(D)||D&&!at,T=0;T<et.length;T++){if(vt=et[T],Wt=vt._gsap||ys(et)[T]._gsap,n._ptLookup[T]=wt={},es[Wt.id]&&Bi.length&&xn(),te=pt===et?T:pt.indexOf(vt),Ot&&(Rt=new Ot).init(vt,_t||ot,n,te,pt)!==!1&&(n._pt=kt=new Ye(n._pt,vt,Rt.name,0,1,Rt.render,Rt,0,Rt.priority),Rt._props.forEach(function(ue){wt[ue]=kt}),Rt.priority&&(Ft=1)),!Ot||_t)for(xt in ot)ri[xt]&&(Rt=Ya(xt,ot,n,te,vt,pt))?Rt.priority&&(Ft=1):wt[xt]=kt=bs.call(n,vt,xt,"get",ot[xt],te,pt,0,f.stringFilter);n._op&&n._op[T]&&n.kill(vt,n._op[T]),ft&&n._pt&&(zi=n,be.killTweensOf(vt,wt,n.globalTime(a)),Qt=!n.parent,zi=0),n._pt&&D&&(es[Wt.id]=1)}Ft&&eu(n),n._onInit&&n._onInit(n)}n._onUpdate=B,n._initted=(!n._op||n._pt)&&!Qt,it&&a<=0&&gt.render(li,!0,!0)},Eo=function(n,a,o,f,c,P,O,D){var B=(n._pt&&n._ptCache||(n._ptCache={}))[a],q,K,it,F;if(!B)for(B=n._ptCache[a]=[],it=n._ptLookup,F=n._targets.length;F--;){if(q=it[F][a],q&&q.d&&q.d._pt)for(q=q.d._pt;q&&q.p!==a&&q.fp!==a;)q=q._next;if(!q)return us=1,n.vars[a]="+=0",ws(n,O),us=0,D?Qr(a+" not eligible for reset"):1;B.push(q)}for(F=B.length;F--;)K=B[F],q=K._pt||K,q.s=(f||f===0)&&!c?f:q.s+(f||0)+P*q.c,q.c=o-q.s,K.e&&(K.e=Te(o)+qe(K.e)),K.b&&(K.b=q.s+qe(K.b))},Oo=function(n,a){var o=n[0]?or(n[0]).harness:0,f=o&&o.aliases,c,P,O,D;if(!f)return a;c=cr({},a);for(P in f)if(P in c)for(D=f[P].split(","),O=D.length;O--;)c[D[O]]=c[P];return c},Mo=function(n,a,o,f){var c=a.ease||f||"power1.inOut",P,O;if(He(a))O=o[n]||(o[n]=[]),a.forEach(function(D,B){return O.push({t:B/(a.length-1)*100,v:D,e:c})});else for(P in a)O=o[P]||(o[P]=[]),P==="ease"||O.push({t:parseFloat(n),v:a[P],e:c})},Kr=function(n,a,o,f,c){return Ce(n)?n.call(a,o,f,c):Re(n)&&~n.indexOf("random(")?$r(n):n},Ka=xs+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Qa={};Xe(Ka+",id,stagger,delay,duration,paused,scrollTrigger",function(z){return Qa[z]=1});var Ae=function(z){_a(n,z);function n(o,f,c,P){var O;typeof f=="number"&&(c.duration=f,f=c,c=null),O=z.call(this,P?f:Xr(f))||this;var D=O.vars,B=D.duration,q=D.delay,K=D.immediateRender,it=D.stagger,F=D.overwrite,at=D.keyframes,G=D.defaults,et=D.scrollTrigger,nt=D.yoyoEase,pt=f.parent||be,ft=(He(o)||va(o)?Ei(o[0]):"length"in f)?[o]:fi(o),gt,ot,T,xt,kt,vt,Ft,Wt;if(O._targets=ft.length?ys(ft):Qr("GSAP target "+o+" not found. https://gsap.com",!ai.nullTargetWarn)||[],O._ptLookup=[],O._overwrite=F,at||it||dn(B)||dn(q)){if(f=O.vars,gt=O.timeline=new je({data:"nested",defaults:G||{},targets:pt&&pt.data==="nested"?pt.vars.targets:ft}),gt.kill(),gt.parent=gt._dp=Ii(O),gt._start=0,it||dn(B)||dn(q)){if(xt=ft.length,Ft=it&&Ra(it),wi(it))for(kt in it)~Ka.indexOf(kt)&&(Wt||(Wt={}),Wt[kt]=it[kt]);for(ot=0;ot<xt;ot++)T=yn(f,Qa),T.stagger=0,nt&&(T.yoyoEase=nt),Wt&&cr(T,Wt),vt=ft[ot],T.duration=+Kr(B,Ii(O),ot,vt,ft),T.delay=(+Kr(q,Ii(O),ot,vt,ft)||0)-O._delay,!it&&xt===1&&T.delay&&(O._delay=q=T.delay,O._start+=q,T.delay=0),gt.to(vt,T,Ft?Ft(ot,vt,ft):0),gt._ease=$t.none;gt.duration()?B=q=0:O.timeline=0}else if(at){Xr(ci(gt.vars.defaults,{ease:"none"})),gt._ease=lr(at.ease||f.ease||"none");var Ot=0,Rt,wt,te;if(He(at))at.forEach(function(_t){return gt.to(ft,_t,">")}),gt.duration();else{T={};for(kt in at)kt==="ease"||kt==="easeEach"||Mo(kt,at[kt],T,at.easeEach);for(kt in T)for(Rt=T[kt].sort(function(_t,Qt){return _t.t-Qt.t}),Ot=0,ot=0;ot<Rt.length;ot++)wt=Rt[ot],te={ease:wt.e,duration:(wt.t-(ot?Rt[ot-1].t:0))/100*B},te[kt]=wt.v,gt.to(ft,te,Ot),Ot+=te.duration;gt.duration()<B&&gt.to({},{duration:B-gt.duration()})}}B||O.duration(B=gt.duration())}else O.timeline=0;return F===!0&&!ds&&(zi=Ii(O),be.killTweensOf(ft),zi=0),xi(pt,Ii(O),c),f.reversed&&O.reverse(),f.paused&&O.paused(!0),(K||!B&&!at&&O._start===Ne(pt._time)&&Ze(K)&&oo(Ii(O))&&pt.data!=="nested")&&(O._tTime=-fe,O.render(Math.max(0,-q)||0)),et&&Oa(Ii(O),et),O}var a=n.prototype;return a.render=function(f,c,P){var O=this._time,D=this._tDur,B=this._dur,q=f<0,K=f>D-fe&&!q?D:f<fe?0:f,it,F,at,G,et,nt,pt,ft,gt;if(!B)lo(this,f,c,P);else if(K!==this._tTime||!f||P||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==q){if(it=K,ft=this.timeline,this._repeat){if(G=B+this._rDelay,this._repeat<-1&&q)return this.totalTime(G*100+f,c,P);if(it=Ne(K%G),K===D?(at=this._repeat,it=B):(at=~~(K/G),at&&at===Ne(K/G)&&(it=B,at--),it>B&&(it=B)),nt=this._yoyo&&at&1,nt&&(gt=this._yEase,it=B-it),et=Ir(this._tTime,G),it===O&&!P&&this._initted&&at===et)return this._tTime=K,this;at!==et&&(ft&&this._yEase&&ja(ft,nt),this.vars.repeatRefresh&&!nt&&!this._lock&&this._time!==G&&this._initted&&(this._lock=P=1,this.render(Ne(G*at),!0).invalidate()._lock=0))}if(!this._initted){if(Ma(this,q?f:it,P,c,K))return this._tTime=0,this;if(O!==this._time&&!(P&&this.vars.repeatRefresh&&at!==et))return this;if(B!==this._dur)return this.render(f,c,P)}if(this._tTime=K,this._time=it,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=pt=(gt||this._ease)(it/B),this._from&&(this.ratio=pt=1-pt),it&&!O&&!c&&!at&&(si(this,"onStart"),this._tTime!==K))return this;for(F=this._pt;F;)F.r(pt,F.d),F=F._next;ft&&ft.render(f<0?f:ft._dur*ft._ease(it/this._dur),c,P)||this._startAt&&(this._zTime=f),this._onUpdate&&!c&&(q&&is(this,f,c,P),si(this,"onUpdate")),this._repeat&&at!==et&&this.vars.onRepeat&&!c&&this.parent&&si(this,"onRepeat"),(K===this._tDur||!K)&&this._tTime===K&&(q&&!this._onUpdate&&is(this,f,!0,!0),(f||!B)&&(K===this._tDur&&this._ts>0||!K&&this._ts<0)&&Ui(this,1),!c&&!(q&&!O)&&(K||O||nt)&&(si(this,K===D?"onComplete":"onReverseComplete",!0),this._prom&&!(K<D&&this.timeScale()>0)&&this._prom()))}return this},a.targets=function(){return this._targets},a.invalidate=function(f){return(!f||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(f),z.prototype.invalidate.call(this,f)},a.resetTo=function(f,c,P,O,D){tn||ni.wake(),this._ts||this.play();var B=Math.min(this._dur,(this._dp._time-this._start)*this._ts),q;return this._initted||ws(this,B),q=this._ease(B/this._dur),Eo(this,f,c,P,O,q,B,D)?this.resetTo(f,c,P,O,1):(Tn(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},a.kill=function(f,c){if(c===void 0&&(c="all"),!f&&(!c||c==="all"))return this._lazy=this._pt=0,this.parent?jr(this):this;if(this.timeline){var P=this.timeline.totalDuration();return this.timeline.killTweensOf(f,c,zi&&zi.vars.overwrite!==!0)._first||jr(this),this.parent&&P!==this.timeline.totalDuration()&&Ar(this,this._dur*this.timeline._tDur/P,0,1),this}var O=this._targets,D=f?fi(f):O,B=this._ptLookup,q=this._pt,K,it,F,at,G,et,nt;if((!c||c==="all")&&ao(O,D))return c==="all"&&(this._pt=0),jr(this);for(K=this._op=this._op||[],c!=="all"&&(Re(c)&&(G={},Xe(c,function(pt){return G[pt]=1}),c=G),c=Oo(O,c)),nt=O.length;nt--;)if(~D.indexOf(O[nt])){it=B[nt],c==="all"?(K[nt]=c,at=it,F={}):(F=K[nt]=K[nt]||{},at=c);for(G in at)et=it&&it[G],et&&((!("kill"in et.d)||et.d.kill(G)===!0)&&kn(this,et,"_pt"),delete it[G]),F!=="all"&&(F[G]=1)}return this._initted&&!this._pt&&q&&jr(this),this},n.to=function(f,c){return new n(f,c,arguments[2])},n.from=function(f,c){return Yr(1,arguments)},n.delayedCall=function(f,c,P,O){return new n(c,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:f,onComplete:c,onReverseComplete:c,onCompleteParams:P,onReverseCompleteParams:P,callbackScope:O})},n.fromTo=function(f,c,P){return Yr(2,arguments)},n.set=function(f,c){return c.duration=0,c.repeatDelay||(c.repeat=0),new n(f,c)},n.killTweensOf=function(f,c,P){return be.killTweensOf(f,c,P)},n}(en);ci(Ae.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Xe("staggerTo,staggerFrom,staggerFromTo",function(z){Ae[z]=function(){var n=new je,a=ns.call(arguments,0);return a.splice(z==="staggerFromTo"?5:4,0,0),n[z].apply(n,a)}});var Ss=function(n,a,o){return n[a]=o},Ja=function(n,a,o){return n[a](o)},Lo=function(n,a,o,f){return n[a](f.fp,o)},No=function(n,a,o){return n.setAttribute(a,o)},Cs=function(n,a){return Ce(n[a])?Ja:ps(n[a])&&n.setAttribute?No:Ss},$a=function(n,a){return a.set(a.t,a.p,Math.round((a.s+a.c*n)*1e6)/1e6,a)},Ro=function(n,a){return a.set(a.t,a.p,!!(a.s+a.c*n),a)},tu=function(n,a){var o=a._pt,f="";if(!n&&a.b)f=a.b;else if(n===1&&a.e)f=a.e;else{for(;o;)f=o.p+(o.m?o.m(o.s+o.c*n):Math.round((o.s+o.c*n)*1e4)/1e4)+f,o=o._next;f+=a.c}a.set(a.t,a.p,f,a)},ks=function(n,a){for(var o=a._pt;o;)o.r(n,o.d),o=o._next},Fo=function(n,a,o,f){for(var c=this._pt,P;c;)P=c._next,c.p===f&&c.modifier(n,a,o),c=P},zo=function(n){for(var a=this._pt,o,f;a;)f=a._next,a.p===n&&!a.op||a.op===n?kn(this,a,"_pt"):a.dep||(o=1),a=f;return!o},Do=function(n,a,o,f){f.mSet(n,a,f.m.call(f.tween,o,f.mt),f)},eu=function(n){for(var a=n._pt,o,f,c,P;a;){for(o=a._next,f=c;f&&f.pr>a.pr;)f=f._next;(a._prev=f?f._prev:P)?a._prev._next=a:c=a,(a._next=f)?f._prev=a:P=a,a=o}n._pt=c},Ye=function(){function z(a,o,f,c,P,O,D,B,q){this.t=o,this.s=c,this.c=P,this.p=f,this.r=O||$a,this.d=D||this,this.set=B||Ss,this.pr=q||0,this._next=a,a&&(a._prev=this)}var n=z.prototype;return n.modifier=function(o,f,c){this.mSet=this.mSet||this.set,this.set=Do,this.m=o,this.mt=c,this.tween=f},z}();Xe(xs+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(z){return ms[z]=1});ui.TweenMax=ui.TweenLite=Ae;ui.TimelineLite=ui.TimelineMax=je;be=new je({sortChildren:!1,defaults:Tr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});ai.stringFilter=Ga;var fr=[],vn={},Vo=[],ea=0,Bo=0,Xn=function(n){return(vn[n]||Vo).map(function(a){return a()})},os=function(){var n=Date.now(),a=[];n-ea>2&&(Xn("matchMediaInit"),fr.forEach(function(o){var f=o.queries,c=o.conditions,P,O,D,B;for(O in f)P=mi.matchMedia(f[O]).matches,P&&(D=1),P!==c[O]&&(c[O]=P,B=1);B&&(o.revert(),D&&a.push(o))}),Xn("matchMediaRevert"),a.forEach(function(o){return o.onMatch(o,function(f){return o.add(null,f)})}),ea=n,Xn("matchMedia"))},iu=function(){function z(a,o){this.selector=o&&ss(o),this.data=[],this._r=[],this.isReverted=!1,this.id=Bo++,a&&this.add(a)}var n=z.prototype;return n.add=function(o,f,c){Ce(o)&&(c=f,f=o,o=Ce);var P=this,O=function(){var B=ge,q=P.selector,K;return B&&B!==P&&B.data.push(P),c&&(P.selector=ss(c)),ge=P,K=f.apply(P,arguments),Ce(K)&&P._r.push(K),ge=B,P.selector=q,P.isReverted=!1,K};return P.last=O,o===Ce?O(P,function(D){return P.add(null,D)}):o?P[o]=O:O},n.ignore=function(o){var f=ge;ge=null,o(this),ge=f},n.getTweens=function(){var o=[];return this.data.forEach(function(f){return f instanceof z?o.push.apply(o,f.getTweens()):f instanceof Ae&&!(f.parent&&f.parent.data==="nested")&&o.push(f)}),o},n.clear=function(){this._r.length=this.data.length=0},n.kill=function(o,f){var c=this;if(o?function(){for(var O=c.getTweens(),D=c.data.length,B;D--;)B=c.data[D],B.data==="isFlip"&&(B.revert(),B.getChildren(!0,!0,!1).forEach(function(q){return O.splice(O.indexOf(q),1)}));for(O.map(function(q){return{g:q._dur||q._delay||q._sat&&!q._sat.vars.immediateRender?q.globalTime(0):-1/0,t:q}}).sort(function(q,K){return K.g-q.g||-1/0}).forEach(function(q){return q.t.revert(o)}),D=c.data.length;D--;)B=c.data[D],B instanceof je?B.data!=="nested"&&(B.scrollTrigger&&B.scrollTrigger.revert(),B.kill()):!(B instanceof Ae)&&B.revert&&B.revert(o);c._r.forEach(function(q){return q(o,c)}),c.isReverted=!0}():this.data.forEach(function(O){return O.kill&&O.kill()}),this.clear(),f)for(var P=fr.length;P--;)fr[P].id===this.id&&fr.splice(P,1)},n.revert=function(o){this.kill(o||{})},z}(),qo=function(){function z(a){this.contexts=[],this.scope=a,ge&&ge.data.push(this)}var n=z.prototype;return n.add=function(o,f,c){wi(o)||(o={matches:o});var P=new iu(0,c||this.scope),O=P.conditions={},D,B,q;ge&&!P.selector&&(P.selector=ge.selector),this.contexts.push(P),f=P.add("onMatch",f),P.queries=o;for(B in o)B==="all"?q=1:(D=mi.matchMedia(o[B]),D&&(fr.indexOf(P)<0&&fr.push(P),(O[B]=D.matches)&&(q=1),D.addListener?D.addListener(os):D.addEventListener("change",os)));return q&&f(P,function(K){return P.add(null,K)}),this},n.revert=function(o){this.kill(o||{})},n.kill=function(o){this.contexts.forEach(function(f){return f.kill(o,!0)})},z}(),wn={registerPlugin:function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];a.forEach(function(f){return qa(f)})},timeline:function(n){return new je(n)},getTweensOf:function(n,a){return be.getTweensOf(n,a)},getProperty:function(n,a,o,f){Re(n)&&(n=fi(n)[0]);var c=or(n||{}).get,P=o?Ia:Ta;return o==="native"&&(o=""),n&&(a?P((ri[a]&&ri[a].get||c)(n,a,o,f)):function(O,D,B){return P((ri[O]&&ri[O].get||c)(n,O,D,B))})},quickSetter:function(n,a,o){if(n=fi(n),n.length>1){var f=n.map(function(q){return Qe.quickSetter(q,a,o)}),c=f.length;return function(q){for(var K=c;K--;)f[K](q)}}n=n[0]||{};var P=ri[a],O=or(n),D=O.harness&&(O.harness.aliases||{})[a]||a,B=P?function(q){var K=new P;Sr._pt=0,K.init(n,o?q+o:q,Sr,0,[n]),K.render(1,K),Sr._pt&&ks(1,Sr)}:O.set(n,D);return P?B:function(q){return B(n,D,o?q+o:q,O,1)}},quickTo:function(n,a,o){var f,c=Qe.to(n,cr((f={},f[a]="+=0.1",f.paused=!0,f),o||{})),P=function(D,B,q){return c.resetTo(a,D,B,q)};return P.tween=c,P},isTweening:function(n){return be.getTweensOf(n,!0).length>0},defaults:function(n){return n&&n.ease&&(n.ease=lr(n.ease,Tr.ease)),Ks(Tr,n||{})},config:function(n){return Ks(ai,n||{})},registerEffect:function(n){var a=n.name,o=n.effect,f=n.plugins,c=n.defaults,P=n.extendTimeline;(f||"").split(",").forEach(function(O){return O&&!ri[O]&&!ui[O]&&Qr(a+" effect requires "+O+" plugin.")}),Gn[a]=function(O,D,B){return o(fi(O),ci(D||{},c),B)},P&&(je.prototype[a]=function(O,D,B){return this.add(Gn[a](O,wi(D)?D:(B=D)&&{},this),B)})},registerEase:function(n,a){$t[n]=lr(a)},parseEase:function(n,a){return arguments.length?lr(n,a):$t},getById:function(n){return be.getById(n)},exportRoot:function(n,a){n===void 0&&(n={});var o=new je(n),f,c;for(o.smoothChildTiming=Ze(n.smoothChildTiming),be.remove(o),o._dp=0,o._time=o._tTime=be._time,f=be._first;f;)c=f._next,(a||!(!f._dur&&f instanceof Ae&&f.vars.onComplete===f._targets[0]))&&xi(o,f,f._start-f._delay),f=c;return xi(be,o,0),o},context:function(n,a){return n?new iu(n,a):ge},matchMedia:function(n){return new qo(n)},matchMediaRefresh:function(){return fr.forEach(function(n){var a=n.conditions,o,f;for(f in a)a[f]&&(a[f]=!1,o=1);o&&n.revert()})||os()},addEventListener:function(n,a){var o=vn[n]||(vn[n]=[]);~o.indexOf(a)||o.push(a)},removeEventListener:function(n,a){var o=vn[n],f=o&&o.indexOf(a);f>=0&&o.splice(f,1)},utils:{wrap:xo,wrapYoyo:yo,distribute:Ra,random:za,snap:Fa,normalize:mo,getUnit:qe,clamp:po,splitColor:Ua,toArray:fi,selector:ss,mapRange:Va,pipe:go,unitize:vo,interpolate:bo,shuffle:Na},install:wa,effects:Gn,ticker:ni,updateRoot:je.updateRoot,plugins:ri,globalTimeline:be,core:{PropTween:Ye,globals:Sa,Tween:Ae,Timeline:je,Animation:en,getCache:or,_removeLinkedListItem:kn,reverting:function(){return Ue},context:function(n){return n&&ge&&(ge.data.push(n),n._ctx=ge),ge},suppressOverwrites:function(n){return ds=n}}};Xe("to,from,fromTo,delayedCall,set,killTweensOf",function(z){return wn[z]=Ae[z]});ni.add(je.updateRoot);Sr=wn.to({},{duration:0});var Uo=function(n,a){for(var o=n._pt;o&&o.p!==a&&o.op!==a&&o.fp!==a;)o=o._next;return o},Ho=function(n,a){var o=n._targets,f,c,P;for(f in a)for(c=o.length;c--;)P=n._ptLookup[c][f],P&&(P=P.d)&&(P._pt&&(P=Uo(P,f)),P&&P.modifier&&P.modifier(a[f],n,o[c],f))},Yn=function(n,a){return{name:n,rawVars:1,init:function(f,c,P){P._onInit=function(O){var D,B;if(Re(c)&&(D={},Xe(c,function(q){return D[q]=1}),c=D),a){D={};for(B in c)D[B]=a(c[B]);c=D}Ho(O,c)}}}},Qe=wn.registerPlugin({name:"attr",init:function(n,a,o,f,c){var P,O,D;this.tween=o;for(P in a)D=n.getAttribute(P)||"",O=this.add(n,"setAttribute",(D||0)+"",a[P],f,c,0,0,P),O.op=P,O.b=D,this._props.push(P)},render:function(n,a){for(var o=a._pt;o;)Ue?o.set(o.t,o.p,o.b,o):o.r(n,o.d),o=o._next}},{name:"endArray",init:function(n,a){for(var o=a.length;o--;)this.add(n,o,n[o]||0,a[o],0,0,0,0,0,1)}},Yn("roundProps",as),Yn("modifiers"),Yn("snap",Fa))||wn;Ae.version=je.version=Qe.version="3.12.5";ba=1;_s()&&Er();$t.Power0;$t.Power1;$t.Power2;$t.Power3;$t.Power4;$t.Linear;$t.Quad;$t.Cubic;$t.Quart;$t.Quint;$t.Strong;$t.Elastic;$t.Back;$t.SteppedEase;$t.Bounce;$t.Sine;$t.Expo;$t.Circ;var ia,Di,kr,Ps,ur,ra,Ts,Go=function(){return typeof window<"u"},Oi={},ar=180/Math.PI,Pr=Math.PI/180,yr=Math.atan2,na=1e8,Is=/([A-Z])/g,Wo=/(left|right|width|margin|padding|x)/i,jo=/[\s,\(]\S/,yi={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},hs=function(n,a){return a.set(a.t,a.p,Math.round((a.s+a.c*n)*1e4)/1e4+a.u,a)},Zo=function(n,a){return a.set(a.t,a.p,n===1?a.e:Math.round((a.s+a.c*n)*1e4)/1e4+a.u,a)},Xo=function(n,a){return a.set(a.t,a.p,n?Math.round((a.s+a.c*n)*1e4)/1e4+a.u:a.b,a)},Yo=function(n,a){var o=a.s+a.c*n;a.set(a.t,a.p,~~(o+(o<0?-.5:.5))+a.u,a)},ru=function(n,a){return a.set(a.t,a.p,n?a.e:a.b,a)},nu=function(n,a){return a.set(a.t,a.p,n!==1?a.b:a.e,a)},Ko=function(n,a,o){return n.style[a]=o},Qo=function(n,a,o){return n.style.setProperty(a,o)},Jo=function(n,a,o){return n._gsap[a]=o},$o=function(n,a,o){return n._gsap.scaleX=n._gsap.scaleY=o},th=function(n,a,o,f,c){var P=n._gsap;P.scaleX=P.scaleY=o,P.renderTransform(c,P)},eh=function(n,a,o,f,c){var P=n._gsap;P[a]=o,P.renderTransform(c,P)},we="transform",Ke=we+"Origin",ih=function z(n,a){var o=this,f=this.target,c=f.style,P=f._gsap;if(n in Oi&&c){if(this.tfm=this.tfm||{},n!=="transform")n=yi[n]||n,~n.indexOf(",")?n.split(",").forEach(function(O){return o.tfm[O]=Ai(f,O)}):this.tfm[n]=P.x?P[n]:Ai(f,n),n===Ke&&(this.tfm.zOrigin=P.zOrigin);else return yi.transform.split(",").forEach(function(O){return z.call(o,O,a)});if(this.props.indexOf(we)>=0)return;P.svg&&(this.svgo=f.getAttribute("data-svg-origin"),this.props.push(Ke,a,"")),n=we}(c||a)&&this.props.push(n,a,c[n])},su=function(n){n.translate&&(n.removeProperty("translate"),n.removeProperty("scale"),n.removeProperty("rotate"))},rh=function(){var n=this.props,a=this.target,o=a.style,f=a._gsap,c,P;for(c=0;c<n.length;c+=3)n[c+1]?a[n[c]]=n[c+2]:n[c+2]?o[n[c]]=n[c+2]:o.removeProperty(n[c].substr(0,2)==="--"?n[c]:n[c].replace(Is,"-$1").toLowerCase());if(this.tfm){for(P in this.tfm)f[P]=this.tfm[P];f.svg&&(f.renderTransform(),a.setAttribute("data-svg-origin",this.svgo||"")),c=Ts(),(!c||!c.isStart)&&!o[we]&&(su(o),f.zOrigin&&o[Ke]&&(o[Ke]+=" "+f.zOrigin+"px",f.zOrigin=0,f.renderTransform()),f.uncache=1)}},au=function(n,a){var o={target:n,props:[],revert:rh,save:ih};return n._gsap||Qe.core.getCache(n),a&&a.split(",").forEach(function(f){return o.save(f)}),o},uu,ls=function(n,a){var o=Di.createElementNS?Di.createElementNS((a||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),n):Di.createElement(n);return o&&o.style?o:Di.createElement(n)},bi=function z(n,a,o){var f=getComputedStyle(n);return f[a]||f.getPropertyValue(a.replace(Is,"-$1").toLowerCase())||f.getPropertyValue(a)||!o&&z(n,Or(a)||a,1)||""},sa="O,Moz,ms,Ms,Webkit".split(","),Or=function(n,a,o){var f=a||ur,c=f.style,P=5;if(n in c&&!o)return n;for(n=n.charAt(0).toUpperCase()+n.substr(1);P--&&!(sa[P]+n in c););return P<0?null:(P===3?"ms":P>=0?sa[P]:"")+n},fs=function(){Go()&&window.document&&(ia=window,Di=ia.document,kr=Di.documentElement,ur=ls("div")||{style:{}},ls("div"),we=Or(we),Ke=we+"Origin",ur.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",uu=!!Or("perspective"),Ts=Qe.core.reverting,Ps=1)},Kn=function z(n){var a=ls("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),o=this.parentNode,f=this.nextSibling,c=this.style.cssText,P;if(kr.appendChild(a),a.appendChild(this),this.style.display="block",n)try{P=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=z}catch{}else this._gsapBBox&&(P=this._gsapBBox());return o&&(f?o.insertBefore(this,f):o.appendChild(this)),kr.removeChild(a),this.style.cssText=c,P},aa=function(n,a){for(var o=a.length;o--;)if(n.hasAttribute(a[o]))return n.getAttribute(a[o])},ou=function(n){var a;try{a=n.getBBox()}catch{a=Kn.call(n,!0)}return a&&(a.width||a.height)||n.getBBox===Kn||(a=Kn.call(n,!0)),a&&!a.width&&!a.x&&!a.y?{x:+aa(n,["x","cx","x1"])||0,y:+aa(n,["y","cy","y1"])||0,width:0,height:0}:a},hu=function(n){return!!(n.getCTM&&(!n.parentNode||n.ownerSVGElement)&&ou(n))},dr=function(n,a){if(a){var o=n.style,f;a in Oi&&a!==Ke&&(a=we),o.removeProperty?(f=a.substr(0,2),(f==="ms"||a.substr(0,6)==="webkit")&&(a="-"+a),o.removeProperty(f==="--"?a:a.replace(Is,"-$1").toLowerCase())):o.removeAttribute(a)}},Vi=function(n,a,o,f,c,P){var O=new Ye(n._pt,a,o,0,1,P?nu:ru);return n._pt=O,O.b=f,O.e=c,n._props.push(o),O},ua={deg:1,rad:1,turn:1},nh={grid:1,flex:1},Hi=function z(n,a,o,f){var c=parseFloat(o)||0,P=(o+"").trim().substr((c+"").length)||"px",O=ur.style,D=Wo.test(a),B=n.tagName.toLowerCase()==="svg",q=(B?"client":"offset")+(D?"Width":"Height"),K=100,it=f==="px",F=f==="%",at,G,et,nt;if(f===P||!c||ua[f]||ua[P])return c;if(P!=="px"&&!it&&(c=z(n,a,o,"px")),nt=n.getCTM&&hu(n),(F||P==="%")&&(Oi[a]||~a.indexOf("adius")))return at=nt?n.getBBox()[D?"width":"height"]:n[q],Te(F?c/at*K:c/100*at);if(O[D?"width":"height"]=K+(it?P:f),G=~a.indexOf("adius")||f==="em"&&n.appendChild&&!B?n:n.parentNode,nt&&(G=(n.ownerSVGElement||{}).parentNode),(!G||G===Di||!G.appendChild)&&(G=Di.body),et=G._gsap,et&&F&&et.width&&D&&et.time===ni.time&&!et.uncache)return Te(c/et.width*K);if(F&&(a==="height"||a==="width")){var pt=n.style[a];n.style[a]=K+f,at=n[q],pt?n.style[a]=pt:dr(n,a)}else(F||P==="%")&&!nh[bi(G,"display")]&&(O.position=bi(n,"position")),G===n&&(O.position="static"),G.appendChild(ur),at=ur[q],G.removeChild(ur),O.position="absolute";return D&&F&&(et=or(G),et.time=ni.time,et.width=G[q]),Te(it?at*c/K:at&&c?K/at*c:0)},Ai=function(n,a,o,f){var c;return Ps||fs(),a in yi&&a!=="transform"&&(a=yi[a],~a.indexOf(",")&&(a=a.split(",")[0])),Oi[a]&&a!=="transform"?(c=nn(n,f),c=a!=="transformOrigin"?c[a]:c.svg?c.origin:Cn(bi(n,Ke))+" "+c.zOrigin+"px"):(c=n.style[a],(!c||c==="auto"||f||~(c+"").indexOf("calc("))&&(c=Sn[a]&&Sn[a](n,a,o)||bi(n,a)||ka(n,a)||(a==="opacity"?1:0))),o&&!~(c+"").trim().indexOf(" ")?Hi(n,a,c,o)+o:c},sh=function(n,a,o,f){if(!o||o==="none"){var c=Or(a,n,1),P=c&&bi(n,c,1);P&&P!==o?(a=c,o=P):a==="borderColor"&&(o=bi(n,"borderTopColor"))}var O=new Ye(this._pt,n.style,a,0,1,tu),D=0,B=0,q,K,it,F,at,G,et,nt,pt,ft,gt,ot;if(O.b=o,O.e=f,o+="",f+="",f==="auto"&&(G=n.style[a],n.style[a]=f,f=bi(n,a)||f,G?n.style[a]=G:dr(n,a)),q=[o,f],Ga(q),o=q[0],f=q[1],it=o.match(wr)||[],ot=f.match(wr)||[],ot.length){for(;K=wr.exec(f);)et=K[0],pt=f.substring(D,K.index),at?at=(at+1)%5:(pt.substr(-5)==="rgba("||pt.substr(-5)==="hsla(")&&(at=1),et!==(G=it[B++]||"")&&(F=parseFloat(G)||0,gt=G.substr((F+"").length),et.charAt(1)==="="&&(et=Cr(F,et)+gt),nt=parseFloat(et),ft=et.substr((nt+"").length),D=wr.lastIndex-ft.length,ft||(ft=ft||ai.units[a]||gt,D===f.length&&(f+=ft,O.e+=ft)),gt!==ft&&(F=Hi(n,a,G,ft)||0),O._pt={_next:O._pt,p:pt||B===1?pt:",",s:F,c:nt-F,m:at&&at<4||a==="zIndex"?Math.round:0});O.c=D<f.length?f.substring(D,f.length):""}else O.r=a==="display"&&f==="none"?nu:ru;return xa.test(f)&&(O.e=0),this._pt=O,O},oa={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ah=function(n){var a=n.split(" "),o=a[0],f=a[1]||"50%";return(o==="top"||o==="bottom"||f==="left"||f==="right")&&(n=o,o=f,f=n),a[0]=oa[o]||o,a[1]=oa[f]||f,a.join(" ")},uh=function(n,a){if(a.tween&&a.tween._time===a.tween._dur){var o=a.t,f=o.style,c=a.u,P=o._gsap,O,D,B;if(c==="all"||c===!0)f.cssText="",D=1;else for(c=c.split(","),B=c.length;--B>-1;)O=c[B],Oi[O]&&(D=1,O=O==="transformOrigin"?Ke:we),dr(o,O);D&&(dr(o,we),P&&(P.svg&&o.removeAttribute("transform"),nn(o,1),P.uncache=1,su(f)))}},Sn={clearProps:function(n,a,o,f,c){if(c.data!=="isFromStart"){var P=n._pt=new Ye(n._pt,a,o,0,0,uh);return P.u=f,P.pr=-10,P.tween=c,n._props.push(o),1}}},rn=[1,0,0,1,0,0],lu={},fu=function(n){return n==="matrix(1, 0, 0, 1, 0, 0)"||n==="none"||!n},ha=function(n){var a=bi(n,we);return fu(a)?rn:a.substr(7).match(ma).map(Te)},As=function(n,a){var o=n._gsap||or(n),f=n.style,c=ha(n),P,O,D,B;return o.svg&&n.getAttribute("transform")?(D=n.transform.baseVal.consolidate().matrix,c=[D.a,D.b,D.c,D.d,D.e,D.f],c.join(",")==="1,0,0,1,0,0"?rn:c):(c===rn&&!n.offsetParent&&n!==kr&&!o.svg&&(D=f.display,f.display="block",P=n.parentNode,(!P||!n.offsetParent)&&(B=1,O=n.nextElementSibling,kr.appendChild(n)),c=ha(n),D?f.display=D:dr(n,"display"),B&&(O?P.insertBefore(n,O):P?P.appendChild(n):kr.removeChild(n))),a&&c.length>6?[c[0],c[1],c[4],c[5],c[12],c[13]]:c)},cs=function(n,a,o,f,c,P){var O=n._gsap,D=c||As(n,!0),B=O.xOrigin||0,q=O.yOrigin||0,K=O.xOffset||0,it=O.yOffset||0,F=D[0],at=D[1],G=D[2],et=D[3],nt=D[4],pt=D[5],ft=a.split(" "),gt=parseFloat(ft[0])||0,ot=parseFloat(ft[1])||0,T,xt,kt,vt;o?D!==rn&&(xt=F*et-at*G)&&(kt=gt*(et/xt)+ot*(-G/xt)+(G*pt-et*nt)/xt,vt=gt*(-at/xt)+ot*(F/xt)-(F*pt-at*nt)/xt,gt=kt,ot=vt):(T=ou(n),gt=T.x+(~ft[0].indexOf("%")?gt/100*T.width:gt),ot=T.y+(~(ft[1]||ft[0]).indexOf("%")?ot/100*T.height:ot)),f||f!==!1&&O.smooth?(nt=gt-B,pt=ot-q,O.xOffset=K+(nt*F+pt*G)-nt,O.yOffset=it+(nt*at+pt*et)-pt):O.xOffset=O.yOffset=0,O.xOrigin=gt,O.yOrigin=ot,O.smooth=!!f,O.origin=a,O.originIsAbsolute=!!o,n.style[Ke]="0px 0px",P&&(Vi(P,O,"xOrigin",B,gt),Vi(P,O,"yOrigin",q,ot),Vi(P,O,"xOffset",K,O.xOffset),Vi(P,O,"yOffset",it,O.yOffset)),n.setAttribute("data-svg-origin",gt+" "+ot)},nn=function(n,a){var o=n._gsap||new Xa(n);if("x"in o&&!a&&!o.uncache)return o;var f=n.style,c=o.scaleX<0,P="px",O="deg",D=getComputedStyle(n),B=bi(n,Ke)||"0",q,K,it,F,at,G,et,nt,pt,ft,gt,ot,T,xt,kt,vt,Ft,Wt,Ot,Rt,wt,te,_t,Qt,ue,zt,se,Je,Ee,Ve,Jt,Mt;return q=K=it=G=et=nt=pt=ft=gt=0,F=at=1,o.svg=!!(n.getCTM&&hu(n)),D.translate&&((D.translate!=="none"||D.scale!=="none"||D.rotate!=="none")&&(f[we]=(D.translate!=="none"?"translate3d("+(D.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(D.rotate!=="none"?"rotate("+D.rotate+") ":"")+(D.scale!=="none"?"scale("+D.scale.split(" ").join(",")+") ":"")+(D[we]!=="none"?D[we]:"")),f.scale=f.rotate=f.translate="none"),xt=As(n,o.svg),o.svg&&(o.uncache?(ue=n.getBBox(),B=o.xOrigin-ue.x+"px "+(o.yOrigin-ue.y)+"px",Qt=""):Qt=!a&&n.getAttribute("data-svg-origin"),cs(n,Qt||B,!!Qt||o.originIsAbsolute,o.smooth!==!1,xt)),ot=o.xOrigin||0,T=o.yOrigin||0,xt!==rn&&(Wt=xt[0],Ot=xt[1],Rt=xt[2],wt=xt[3],q=te=xt[4],K=_t=xt[5],xt.length===6?(F=Math.sqrt(Wt*Wt+Ot*Ot),at=Math.sqrt(wt*wt+Rt*Rt),G=Wt||Ot?yr(Ot,Wt)*ar:0,pt=Rt||wt?yr(Rt,wt)*ar+G:0,pt&&(at*=Math.abs(Math.cos(pt*Pr))),o.svg&&(q-=ot-(ot*Wt+T*Rt),K-=T-(ot*Ot+T*wt))):(Mt=xt[6],Ve=xt[7],se=xt[8],Je=xt[9],Ee=xt[10],Jt=xt[11],q=xt[12],K=xt[13],it=xt[14],kt=yr(Mt,Ee),et=kt*ar,kt&&(vt=Math.cos(-kt),Ft=Math.sin(-kt),Qt=te*vt+se*Ft,ue=_t*vt+Je*Ft,zt=Mt*vt+Ee*Ft,se=te*-Ft+se*vt,Je=_t*-Ft+Je*vt,Ee=Mt*-Ft+Ee*vt,Jt=Ve*-Ft+Jt*vt,te=Qt,_t=ue,Mt=zt),kt=yr(-Rt,Ee),nt=kt*ar,kt&&(vt=Math.cos(-kt),Ft=Math.sin(-kt),Qt=Wt*vt-se*Ft,ue=Ot*vt-Je*Ft,zt=Rt*vt-Ee*Ft,Jt=wt*Ft+Jt*vt,Wt=Qt,Ot=ue,Rt=zt),kt=yr(Ot,Wt),G=kt*ar,kt&&(vt=Math.cos(kt),Ft=Math.sin(kt),Qt=Wt*vt+Ot*Ft,ue=te*vt+_t*Ft,Ot=Ot*vt-Wt*Ft,_t=_t*vt-te*Ft,Wt=Qt,te=ue),et&&Math.abs(et)+Math.abs(G)>359.9&&(et=G=0,nt=180-nt),F=Te(Math.sqrt(Wt*Wt+Ot*Ot+Rt*Rt)),at=Te(Math.sqrt(_t*_t+Mt*Mt)),kt=yr(te,_t),pt=Math.abs(kt)>2e-4?kt*ar:0,gt=Jt?1/(Jt<0?-Jt:Jt):0),o.svg&&(Qt=n.getAttribute("transform"),o.forceCSS=n.setAttribute("transform","")||!fu(bi(n,we)),Qt&&n.setAttribute("transform",Qt))),Math.abs(pt)>90&&Math.abs(pt)<270&&(c?(F*=-1,pt+=G<=0?180:-180,G+=G<=0?180:-180):(at*=-1,pt+=pt<=0?180:-180)),a=a||o.uncache,o.x=q-((o.xPercent=q&&(!a&&o.xPercent||(Math.round(n.offsetWidth/2)===Math.round(-q)?-50:0)))?n.offsetWidth*o.xPercent/100:0)+P,o.y=K-((o.yPercent=K&&(!a&&o.yPercent||(Math.round(n.offsetHeight/2)===Math.round(-K)?-50:0)))?n.offsetHeight*o.yPercent/100:0)+P,o.z=it+P,o.scaleX=Te(F),o.scaleY=Te(at),o.rotation=Te(G)+O,o.rotationX=Te(et)+O,o.rotationY=Te(nt)+O,o.skewX=pt+O,o.skewY=ft+O,o.transformPerspective=gt+P,(o.zOrigin=parseFloat(B.split(" ")[2])||!a&&o.zOrigin||0)&&(f[Ke]=Cn(B)),o.xOffset=o.yOffset=0,o.force3D=ai.force3D,o.renderTransform=o.svg?hh:uu?cu:oh,o.uncache=0,o},Cn=function(n){return(n=n.split(" "))[0]+" "+n[1]},Qn=function(n,a,o){var f=qe(a);return Te(parseFloat(a)+parseFloat(Hi(n,"x",o+"px",f)))+f},oh=function(n,a){a.z="0px",a.rotationY=a.rotationX="0deg",a.force3D=0,cu(n,a)},nr="0deg",Gr="0px",sr=") ",cu=function(n,a){var o=a||this,f=o.xPercent,c=o.yPercent,P=o.x,O=o.y,D=o.z,B=o.rotation,q=o.rotationY,K=o.rotationX,it=o.skewX,F=o.skewY,at=o.scaleX,G=o.scaleY,et=o.transformPerspective,nt=o.force3D,pt=o.target,ft=o.zOrigin,gt="",ot=nt==="auto"&&n&&n!==1||nt===!0;if(ft&&(K!==nr||q!==nr)){var T=parseFloat(q)*Pr,xt=Math.sin(T),kt=Math.cos(T),vt;T=parseFloat(K)*Pr,vt=Math.cos(T),P=Qn(pt,P,xt*vt*-ft),O=Qn(pt,O,-Math.sin(T)*-ft),D=Qn(pt,D,kt*vt*-ft+ft)}et!==Gr&&(gt+="perspective("+et+sr),(f||c)&&(gt+="translate("+f+"%, "+c+"%) "),(ot||P!==Gr||O!==Gr||D!==Gr)&&(gt+=D!==Gr||ot?"translate3d("+P+", "+O+", "+D+") ":"translate("+P+", "+O+sr),B!==nr&&(gt+="rotate("+B+sr),q!==nr&&(gt+="rotateY("+q+sr),K!==nr&&(gt+="rotateX("+K+sr),(it!==nr||F!==nr)&&(gt+="skew("+it+", "+F+sr),(at!==1||G!==1)&&(gt+="scale("+at+", "+G+sr),pt.style[we]=gt||"translate(0, 0)"},hh=function(n,a){var o=a||this,f=o.xPercent,c=o.yPercent,P=o.x,O=o.y,D=o.rotation,B=o.skewX,q=o.skewY,K=o.scaleX,it=o.scaleY,F=o.target,at=o.xOrigin,G=o.yOrigin,et=o.xOffset,nt=o.yOffset,pt=o.forceCSS,ft=parseFloat(P),gt=parseFloat(O),ot,T,xt,kt,vt;D=parseFloat(D),B=parseFloat(B),q=parseFloat(q),q&&(q=parseFloat(q),B+=q,D+=q),D||B?(D*=Pr,B*=Pr,ot=Math.cos(D)*K,T=Math.sin(D)*K,xt=Math.sin(D-B)*-it,kt=Math.cos(D-B)*it,B&&(q*=Pr,vt=Math.tan(B-q),vt=Math.sqrt(1+vt*vt),xt*=vt,kt*=vt,q&&(vt=Math.tan(q),vt=Math.sqrt(1+vt*vt),ot*=vt,T*=vt)),ot=Te(ot),T=Te(T),xt=Te(xt),kt=Te(kt)):(ot=K,kt=it,T=xt=0),(ft&&!~(P+"").indexOf("px")||gt&&!~(O+"").indexOf("px"))&&(ft=Hi(F,"x",P,"px"),gt=Hi(F,"y",O,"px")),(at||G||et||nt)&&(ft=Te(ft+at-(at*ot+G*xt)+et),gt=Te(gt+G-(at*T+G*kt)+nt)),(f||c)&&(vt=F.getBBox(),ft=Te(ft+f/100*vt.width),gt=Te(gt+c/100*vt.height)),vt="matrix("+ot+","+T+","+xt+","+kt+","+ft+","+gt+")",F.setAttribute("transform",vt),pt&&(F.style[we]=vt)},lh=function(n,a,o,f,c){var P=360,O=Re(c),D=parseFloat(c)*(O&&~c.indexOf("rad")?ar:1),B=D-f,q=f+B+"deg",K,it;return O&&(K=c.split("_")[1],K==="short"&&(B%=P,B!==B%(P/2)&&(B+=B<0?P:-P)),K==="cw"&&B<0?B=(B+P*na)%P-~~(B/P)*P:K==="ccw"&&B>0&&(B=(B-P*na)%P-~~(B/P)*P)),n._pt=it=new Ye(n._pt,a,o,f,B,Zo),it.e=q,it.u="deg",n._props.push(o),it},la=function(n,a){for(var o in a)n[o]=a[o];return n},fh=function(n,a,o){var f=la({},o._gsap),c="perspective,force3D,transformOrigin,svgOrigin",P=o.style,O,D,B,q,K,it,F,at;f.svg?(B=o.getAttribute("transform"),o.setAttribute("transform",""),P[we]=a,O=nn(o,1),dr(o,we),o.setAttribute("transform",B)):(B=getComputedStyle(o)[we],P[we]=a,O=nn(o,1),P[we]=B);for(D in Oi)B=f[D],q=O[D],B!==q&&c.indexOf(D)<0&&(F=qe(B),at=qe(q),K=F!==at?Hi(o,D,B,at):parseFloat(B),it=parseFloat(q),n._pt=new Ye(n._pt,O,D,K,it-K,hs),n._pt.u=at||0,n._props.push(D));la(O,f)};Xe("padding,margin,Width,Radius",function(z,n){var a="Top",o="Right",f="Bottom",c="Left",P=(n<3?[a,o,f,c]:[a+c,a+o,f+o,f+c]).map(function(O){return n<2?z+O:"border"+O+z});Sn[n>1?"border"+z:z]=function(O,D,B,q,K){var it,F;if(arguments.length<4)return it=P.map(function(at){return Ai(O,at,B)}),F=it.join(" "),F.split(it[0]).length===5?it[0]:F;it=(q+"").split(" "),F={},P.forEach(function(at,G){return F[at]=it[G]=it[G]||it[(G-1)/2|0]}),O.init(D,F,K)}});var du={name:"css",register:fs,targetTest:function(n){return n.style&&n.nodeType},init:function(n,a,o,f,c){var P=this._props,O=n.style,D=o.vars.startAt,B,q,K,it,F,at,G,et,nt,pt,ft,gt,ot,T,xt,kt;Ps||fs(),this.styles=this.styles||au(n),kt=this.styles.props,this.tween=o;for(G in a)if(G!=="autoRound"&&(q=a[G],!(ri[G]&&Ya(G,a,o,f,n,c)))){if(F=typeof q,at=Sn[G],F==="function"&&(q=q.call(o,f,n,c),F=typeof q),F==="string"&&~q.indexOf("random(")&&(q=$r(q)),at)at(this,n,G,q,o)&&(xt=1);else if(G.substr(0,2)==="--")B=(getComputedStyle(n).getPropertyValue(G)+"").trim(),q+="",qi.lastIndex=0,qi.test(B)||(et=qe(B),nt=qe(q)),nt?et!==nt&&(B=Hi(n,G,B,nt)+nt):et&&(q+=et),this.add(O,"setProperty",B,q,f,c,0,0,G),P.push(G),kt.push(G,0,O[G]);else if(F!=="undefined"){if(D&&G in D?(B=typeof D[G]=="function"?D[G].call(o,f,n,c):D[G],Re(B)&&~B.indexOf("random(")&&(B=$r(B)),qe(B+"")||B==="auto"||(B+=ai.units[G]||qe(Ai(n,G))||""),(B+"").charAt(1)==="="&&(B=Ai(n,G))):B=Ai(n,G),it=parseFloat(B),pt=F==="string"&&q.charAt(1)==="="&&q.substr(0,2),pt&&(q=q.substr(2)),K=parseFloat(q),G in yi&&(G==="autoAlpha"&&(it===1&&Ai(n,"visibility")==="hidden"&&K&&(it=0),kt.push("visibility",0,O.visibility),Vi(this,O,"visibility",it?"inherit":"hidden",K?"inherit":"hidden",!K)),G!=="scale"&&G!=="transform"&&(G=yi[G],~G.indexOf(",")&&(G=G.split(",")[0]))),ft=G in Oi,ft){if(this.styles.save(G),gt||(ot=n._gsap,ot.renderTransform&&!a.parseTransform||nn(n,a.parseTransform),T=a.smoothOrigin!==!1&&ot.smooth,gt=this._pt=new Ye(this._pt,O,we,0,1,ot.renderTransform,ot,0,-1),gt.dep=1),G==="scale")this._pt=new Ye(this._pt,ot,"scaleY",ot.scaleY,(pt?Cr(ot.scaleY,pt+K):K)-ot.scaleY||0,hs),this._pt.u=0,P.push("scaleY",G),G+="X";else if(G==="transformOrigin"){kt.push(Ke,0,O[Ke]),q=ah(q),ot.svg?cs(n,q,0,T,0,this):(nt=parseFloat(q.split(" ")[2])||0,nt!==ot.zOrigin&&Vi(this,ot,"zOrigin",ot.zOrigin,nt),Vi(this,O,G,Cn(B),Cn(q)));continue}else if(G==="svgOrigin"){cs(n,q,1,T,0,this);continue}else if(G in lu){lh(this,ot,G,it,pt?Cr(it,pt+q):q);continue}else if(G==="smoothOrigin"){Vi(this,ot,"smooth",ot.smooth,q);continue}else if(G==="force3D"){ot[G]=q;continue}else if(G==="transform"){fh(this,q,n);continue}}else G in O||(G=Or(G)||G);if(ft||(K||K===0)&&(it||it===0)&&!jo.test(q)&&G in O)et=(B+"").substr((it+"").length),K||(K=0),nt=qe(q)||(G in ai.units?ai.units[G]:et),et!==nt&&(it=Hi(n,G,B,nt)),this._pt=new Ye(this._pt,ft?ot:O,G,it,(pt?Cr(it,pt+K):K)-it,!ft&&(nt==="px"||G==="zIndex")&&a.autoRound!==!1?Yo:hs),this._pt.u=nt||0,et!==nt&&nt!=="%"&&(this._pt.b=B,this._pt.r=Xo);else if(G in O)sh.call(this,n,G,B,pt?pt+q:q);else if(G in n)this.add(n,G,B||n[G],pt?pt+q:q,f,c);else if(G!=="parseTransform"){vs(G,q);continue}ft||(G in O?kt.push(G,0,O[G]):kt.push(G,1,B||n[G])),P.push(G)}}xt&&eu(this)},render:function(n,a){if(a.tween._time||!Ts())for(var o=a._pt;o;)o.r(n,o.d),o=o._next;else a.styles.revert()},get:Ai,aliases:yi,getSetter:function(n,a,o){var f=yi[a];return f&&f.indexOf(",")<0&&(a=f),a in Oi&&a!==Ke&&(n._gsap.x||Ai(n,"x"))?o&&ra===o?a==="scale"?$o:Jo:(ra=o||{})&&(a==="scale"?th:eh):n.style&&!ps(n.style[a])?Ko:~a.indexOf("-")?Qo:Cs(n,a)},core:{_removeProperty:dr,_getMatrix:As}};Qe.utils.checkPrefix=Or;Qe.core.getStyleSaver=au;(function(z,n,a,o){var f=Xe(z+","+n+","+a,function(c){Oi[c]=1});Xe(n,function(c){ai.units[c]="deg",lu[c]=1}),yi[f[13]]=z+","+n,Xe(o,function(c){var P=c.split(":");yi[P[1]]=f[P[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Xe("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(z){ai.units[z]="px"});Qe.registerPlugin(du);var ch=Qe.registerPlugin(du)||Qe,dh=ch.core.Tween;const ph=.5*(Math.sqrt(3)-1),Wr=(3-Math.sqrt(3))/6,fa=z=>Math.floor(z)|0,ca=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]);function _h(z=Math.random){const n=gh(z),a=new Float64Array(n).map(f=>ca[f%12*2]),o=new Float64Array(n).map(f=>ca[f%12*2+1]);return function(c,P){let O=0,D=0,B=0;const q=(c+P)*ph,K=fa(c+q),it=fa(P+q),F=(K+it)*Wr,at=K-F,G=it-F,et=c-at,nt=P-G;let pt,ft;et>nt?(pt=1,ft=0):(pt=0,ft=1);const gt=et-pt+Wr,ot=nt-ft+Wr,T=et-1+2*Wr,xt=nt-1+2*Wr,kt=K&255,vt=it&255;let Ft=.5-et*et-nt*nt;if(Ft>=0){const Rt=kt+n[vt],wt=a[Rt],te=o[Rt];Ft*=Ft,O=Ft*Ft*(wt*et+te*nt)}let Wt=.5-gt*gt-ot*ot;if(Wt>=0){const Rt=kt+pt+n[vt+ft],wt=a[Rt],te=o[Rt];Wt*=Wt,D=Wt*Wt*(wt*gt+te*ot)}let Ot=.5-T*T-xt*xt;if(Ot>=0){const Rt=kt+1+n[vt+1],wt=a[Rt],te=o[Rt];Ot*=Ot,B=Ot*Ot*(wt*T+te*xt)}return 70*(O+D+B)}}function gh(z){const a=new Uint8Array(512);for(let o=0;o<512/2;o++)a[o]=o;for(let o=0;o<512/2-1;o++){const f=o+~~(z()*(256-o)),c=a[o];a[o]=a[f],a[f]=c}for(let o=256;o<512;o++)a[o]=a[o-256];return a}var vh="Expected a function";function mh(z,n,a){var o=!0,f=!0;if(typeof z!="function")throw new TypeError(vh);return Ku(a)&&(o="leading"in a?!!a.leading:o,f="trailing"in a?!!a.trailing:f),Yu(z,n,{leading:o,maxWait:n,trailing:f})}var pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(z){return z&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z}function yh(z){if(z.__esModule)return z;var n=z.default;if(typeof n=="function"){var a=function o(){return this instanceof o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(z).forEach(function(o){var f=Object.getOwnPropertyDescriptor(z,o);Object.defineProperty(a,o,f.get?f:{enumerable:!0,get:function(){return z[o]}})}),a}function bh(z){throw new Error('Could not dynamically require "'+z+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _u={exports:{}};const wh={},Sh=Object.freeze(Object.defineProperty({__proto__:null,default:wh},Symbol.toStringTag,{value:"Module"})),da=yh(Sh);var pn={exports:{}},pa;function Ch(){return pa||(pa=1,function(z,n){(function(a,o){o(n)})(pu,function(a){var o=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],f=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],c="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",P="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",O={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},D="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",B={5:D,"5module":D+" export import",6:D+" const class extends export import super"},q=/^in(stanceof)?$/,K=new RegExp("["+P+"]"),it=new RegExp("["+P+c+"]");function F(i,l){for(var S=65536,N=0;N<l.length;N+=2){if(S+=l[N],S>i)return!1;if(S+=l[N+1],S>=i)return!0}return!1}function at(i,l){return i<65?i===36:i<91?!0:i<97?i===95:i<123?!0:i<=65535?i>=170&&K.test(String.fromCharCode(i)):l===!1?!1:F(i,f)}function G(i,l){return i<48?i===36:i<58?!0:i<65?!1:i<91?!0:i<97?i===95:i<123?!0:i<=65535?i>=170&&it.test(String.fromCharCode(i)):l===!1?!1:F(i,f)||F(i,o)}var et=function(l,S){S===void 0&&(S={}),this.label=l,this.keyword=S.keyword,this.beforeExpr=!!S.beforeExpr,this.startsExpr=!!S.startsExpr,this.isLoop=!!S.isLoop,this.isAssign=!!S.isAssign,this.prefix=!!S.prefix,this.postfix=!!S.postfix,this.binop=S.binop||null,this.updateContext=null};function nt(i,l){return new et(i,{beforeExpr:!0,binop:l})}var pt={beforeExpr:!0},ft={startsExpr:!0},gt={};function ot(i,l){return l===void 0&&(l={}),l.keyword=i,gt[i]=new et(i,l)}var T={num:new et("num",ft),regexp:new et("regexp",ft),string:new et("string",ft),name:new et("name",ft),privateId:new et("privateId",ft),eof:new et("eof"),bracketL:new et("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new et("]"),braceL:new et("{",{beforeExpr:!0,startsExpr:!0}),braceR:new et("}"),parenL:new et("(",{beforeExpr:!0,startsExpr:!0}),parenR:new et(")"),comma:new et(",",pt),semi:new et(";",pt),colon:new et(":",pt),dot:new et("."),question:new et("?",pt),questionDot:new et("?."),arrow:new et("=>",pt),template:new et("template"),invalidTemplate:new et("invalidTemplate"),ellipsis:new et("...",pt),backQuote:new et("`",ft),dollarBraceL:new et("${",{beforeExpr:!0,startsExpr:!0}),eq:new et("=",{beforeExpr:!0,isAssign:!0}),assign:new et("_=",{beforeExpr:!0,isAssign:!0}),incDec:new et("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new et("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:nt("||",1),logicalAND:nt("&&",2),bitwiseOR:nt("|",3),bitwiseXOR:nt("^",4),bitwiseAND:nt("&",5),equality:nt("==/!=/===/!==",6),relational:nt("</>/<=/>=",7),bitShift:nt("<</>>/>>>",8),plusMin:new et("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:nt("%",10),star:nt("*",10),slash:nt("/",10),starstar:new et("**",{beforeExpr:!0}),coalesce:nt("??",1),_break:ot("break"),_case:ot("case",pt),_catch:ot("catch"),_continue:ot("continue"),_debugger:ot("debugger"),_default:ot("default",pt),_do:ot("do",{isLoop:!0,beforeExpr:!0}),_else:ot("else",pt),_finally:ot("finally"),_for:ot("for",{isLoop:!0}),_function:ot("function",ft),_if:ot("if"),_return:ot("return",pt),_switch:ot("switch"),_throw:ot("throw",pt),_try:ot("try"),_var:ot("var"),_const:ot("const"),_while:ot("while",{isLoop:!0}),_with:ot("with"),_new:ot("new",{beforeExpr:!0,startsExpr:!0}),_this:ot("this",ft),_super:ot("super",ft),_class:ot("class",ft),_extends:ot("extends",pt),_export:ot("export"),_import:ot("import",ft),_null:ot("null",ft),_true:ot("true",ft),_false:ot("false",ft),_in:ot("in",{beforeExpr:!0,binop:7}),_instanceof:ot("instanceof",{beforeExpr:!0,binop:7}),_typeof:ot("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ot("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ot("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},xt=/\r\n?|\n|\u2028|\u2029/,kt=new RegExp(xt.source,"g");function vt(i){return i===10||i===13||i===8232||i===8233}function Ft(i,l,S){S===void 0&&(S=i.length);for(var N=l;N<S;N++){var W=i.charCodeAt(N);if(vt(W))return N<S-1&&W===13&&i.charCodeAt(N+1)===10?N+2:N+1}return-1}var Wt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ot=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Rt=Object.prototype,wt=Rt.hasOwnProperty,te=Rt.toString,_t=Object.hasOwn||function(i,l){return wt.call(i,l)},Qt=Array.isArray||function(i){return te.call(i)==="[object Array]"},ue=Object.create(null);function zt(i){return ue[i]||(ue[i]=new RegExp("^(?:"+i.replace(/ /g,"|")+")$"))}function se(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}var Je=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ee=function(l,S){this.line=l,this.column=S};Ee.prototype.offset=function(l){return new Ee(this.line,this.column+l)};var Ve=function(l,S,N){this.start=S,this.end=N,l.sourceFile!==null&&(this.source=l.sourceFile)};function Jt(i,l){for(var S=1,N=0;;){var W=Ft(i,N,l);if(W<0)return new Ee(S,l-N);++S,N=W}}var Mt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},he=!1;function ve(i){var l={};for(var S in Mt)l[S]=i&&_t(i,S)?i[S]:Mt[S];if(l.ecmaVersion==="latest"?l.ecmaVersion=1e8:l.ecmaVersion==null?(!he&&typeof console=="object"&&console.warn&&(he=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
2
- Defaulting to 2020, but this will stop working in the future.`)),l.ecmaVersion=11):l.ecmaVersion>=2015&&(l.ecmaVersion-=2009),l.allowReserved==null&&(l.allowReserved=l.ecmaVersion<5),(!i||i.allowHashBang==null)&&(l.allowHashBang=l.ecmaVersion>=14),Qt(l.onToken)){var N=l.onToken;l.onToken=function(W){return N.push(W)}}return Qt(l.onComment)&&(l.onComment=ce(l,l.onComment)),l}function ce(i,l){return function(S,N,W,rt,ut,bt){var Tt={type:S?"Block":"Line",value:N,start:W,end:rt};i.locations&&(Tt.loc=new Ve(this,ut,bt)),i.ranges&&(Tt.range=[W,rt]),l.push(Tt)}}var Kt=1,ee=2,ae=4,Wi=8,_i=16,ji=32,Si=64,Zi=128,gi=256,Mr=Kt|ee|gi;function Lr(i,l){return ee|(i?ae:0)|(l?Wi:0)}var Xi=0,me=1,$e=2,de=3,Nr=4,jt=5,t=function(l,S,N){this.options=l=ve(l),this.sourceFile=l.sourceFile,this.keywords=zt(B[l.ecmaVersion>=6?6:l.sourceType==="module"?"5module":5]);var W="";l.allowReserved!==!0&&(W=O[l.ecmaVersion>=6?6:l.ecmaVersion===5?5:3],l.sourceType==="module"&&(W+=" await")),this.reservedWords=zt(W);var rt=(W?W+" ":"")+O.strict;this.reservedWordsStrict=zt(rt),this.reservedWordsStrictBind=zt(rt+" "+O.strictBind),this.input=String(S),this.containsEsc=!1,N?(this.pos=N,this.lineStart=this.input.lastIndexOf(`
3
- `,N-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(xt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=l.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&l.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Kt),this.regexpState=null,this.privateNameStack=[]},e={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};t.prototype.parse=function(){var l=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(l)},e.inFunction.get=function(){return(this.currentVarScope().flags&ee)>0},e.inGenerator.get=function(){return(this.currentVarScope().flags&Wi)>0&&!this.currentVarScope().inClassFieldInit},e.inAsync.get=function(){return(this.currentVarScope().flags&ae)>0&&!this.currentVarScope().inClassFieldInit},e.canAwait.get=function(){for(var i=this.scopeStack.length-1;i>=0;i--){var l=this.scopeStack[i];if(l.inClassFieldInit||l.flags&gi)return!1;if(l.flags&ee)return(l.flags&ae)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},e.allowSuper.get=function(){var i=this.currentThisScope(),l=i.flags,S=i.inClassFieldInit;return(l&Si)>0||S||this.options.allowSuperOutsideMethod},e.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Zi)>0},e.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},e.allowNewDotTarget.get=function(){var i=this.currentThisScope(),l=i.flags,S=i.inClassFieldInit;return(l&(ee|gi))>0||S},e.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&gi)>0},t.extend=function(){for(var l=[],S=arguments.length;S--;)l[S]=arguments[S];for(var N=this,W=0;W<l.length;W++)N=l[W](N);return N},t.parse=function(l,S){return new this(S,l).parse()},t.parseExpressionAt=function(l,S,N){var W=new this(N,l,S);return W.nextToken(),W.parseExpression()},t.tokenizer=function(l,S){return new this(S,l)},Object.defineProperties(t.prototype,e);var r=t.prototype,s=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;r.strictDirective=function(i){if(this.options.ecmaVersion<5)return!1;for(;;){Ot.lastIndex=i,i+=Ot.exec(this.input)[0].length;var l=s.exec(this.input.slice(i));if(!l)return!1;if((l[1]||l[2])==="use strict"){Ot.lastIndex=i+l[0].length;var S=Ot.exec(this.input),N=S.index+S[0].length,W=this.input.charAt(N);return W===";"||W==="}"||xt.test(S[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(W)||W==="!"&&this.input.charAt(N+1)==="=")}i+=l[0].length,Ot.lastIndex=i,i+=Ot.exec(this.input)[0].length,this.input[i]===";"&&i++}},r.eat=function(i){return this.type===i?(this.next(),!0):!1},r.isContextual=function(i){return this.type===T.name&&this.value===i&&!this.containsEsc},r.eatContextual=function(i){return this.isContextual(i)?(this.next(),!0):!1},r.expectContextual=function(i){this.eatContextual(i)||this.unexpected()},r.canInsertSemicolon=function(){return this.type===T.eof||this.type===T.braceR||xt.test(this.input.slice(this.lastTokEnd,this.start))},r.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},r.semicolon=function(){!this.eat(T.semi)&&!this.insertSemicolon()&&this.unexpected()},r.afterTrailingComma=function(i,l){if(this.type===i)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),l||this.next(),!0},r.expect=function(i){this.eat(i)||this.unexpected()},r.unexpected=function(i){this.raise(i??this.start,"Unexpected token")};var u=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};r.checkPatternErrors=function(i,l){if(i){i.trailingComma>-1&&this.raiseRecoverable(i.trailingComma,"Comma is not permitted after the rest element");var S=l?i.parenthesizedAssign:i.parenthesizedBind;S>-1&&this.raiseRecoverable(S,l?"Assigning to rvalue":"Parenthesized pattern")}},r.checkExpressionErrors=function(i,l){if(!i)return!1;var S=i.shorthandAssign,N=i.doubleProto;if(!l)return S>=0||N>=0;S>=0&&this.raise(S,"Shorthand property assignments are valid only in destructuring patterns"),N>=0&&this.raiseRecoverable(N,"Redefinition of __proto__ property")},r.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},r.isSimpleAssignTarget=function(i){return i.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(i.expression):i.type==="Identifier"||i.type==="MemberExpression"};var h=t.prototype;h.parseTopLevel=function(i){var l=Object.create(null);for(i.body||(i.body=[]);this.type!==T.eof;){var S=this.parseStatement(null,!0,l);i.body.push(S)}if(this.inModule)for(var N=0,W=Object.keys(this.undefinedExports);N<W.length;N+=1){var rt=W[N];this.raiseRecoverable(this.undefinedExports[rt].start,"Export '"+rt+"' is not defined")}return this.adaptDirectivePrologue(i.body),this.next(),i.sourceType=this.options.sourceType,this.finishNode(i,"Program")};var p={kind:"loop"},d={kind:"switch"};h.isLet=function(i){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Ot.lastIndex=this.pos;var l=Ot.exec(this.input),S=this.pos+l[0].length,N=this.input.charCodeAt(S);if(N===91||N===92)return!0;if(i)return!1;if(N===123||N>55295&&N<56320)return!0;if(at(N,!0)){for(var W=S+1;G(N=this.input.charCodeAt(W),!0);)++W;if(N===92||N>55295&&N<56320)return!0;var rt=this.input.slice(S,W);if(!q.test(rt))return!0}return!1},h.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Ot.lastIndex=this.pos;var i=Ot.exec(this.input),l=this.pos+i[0].length,S;return!xt.test(this.input.slice(this.pos,l))&&this.input.slice(l,l+8)==="function"&&(l+8===this.input.length||!(G(S=this.input.charCodeAt(l+8))||S>55295&&S<56320))},h.parseStatement=function(i,l,S){var N=this.type,W=this.startNode(),rt;switch(this.isLet(i)&&(N=T._var,rt="let"),N){case T._break:case T._continue:return this.parseBreakContinueStatement(W,N.keyword);case T._debugger:return this.parseDebuggerStatement(W);case T._do:return this.parseDoStatement(W);case T._for:return this.parseForStatement(W);case T._function:return i&&(this.strict||i!=="if"&&i!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(W,!1,!i);case T._class:return i&&this.unexpected(),this.parseClass(W,!0);case T._if:return this.parseIfStatement(W);case T._return:return this.parseReturnStatement(W);case T._switch:return this.parseSwitchStatement(W);case T._throw:return this.parseThrowStatement(W);case T._try:return this.parseTryStatement(W);case T._const:case T._var:return rt=rt||this.value,i&&rt!=="var"&&this.unexpected(),this.parseVarStatement(W,rt);case T._while:return this.parseWhileStatement(W);case T._with:return this.parseWithStatement(W);case T.braceL:return this.parseBlock(!0,W);case T.semi:return this.parseEmptyStatement(W);case T._export:case T._import:if(this.options.ecmaVersion>10&&N===T._import){Ot.lastIndex=this.pos;var ut=Ot.exec(this.input),bt=this.pos+ut[0].length,Tt=this.input.charCodeAt(bt);if(Tt===40||Tt===46)return this.parseExpressionStatement(W,this.parseExpression())}return this.options.allowImportExportEverywhere||(l||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),N===T._import?this.parseImport(W):this.parseExport(W,S);default:if(this.isAsyncFunction())return i&&this.unexpected(),this.next(),this.parseFunctionStatement(W,!0,!i);var Gt=this.value,Xt=this.parseExpression();return N===T.name&&Xt.type==="Identifier"&&this.eat(T.colon)?this.parseLabeledStatement(W,Gt,Xt,i):this.parseExpressionStatement(W,Xt)}},h.parseBreakContinueStatement=function(i,l){var S=l==="break";this.next(),this.eat(T.semi)||this.insertSemicolon()?i.label=null:this.type!==T.name?this.unexpected():(i.label=this.parseIdent(),this.semicolon());for(var N=0;N<this.labels.length;++N){var W=this.labels[N];if((i.label==null||W.name===i.label.name)&&(W.kind!=null&&(S||W.kind==="loop")||i.label&&S))break}return N===this.labels.length&&this.raise(i.start,"Unsyntactic "+l),this.finishNode(i,S?"BreakStatement":"ContinueStatement")},h.parseDebuggerStatement=function(i){return this.next(),this.semicolon(),this.finishNode(i,"DebuggerStatement")},h.parseDoStatement=function(i){return this.next(),this.labels.push(p),i.body=this.parseStatement("do"),this.labels.pop(),this.expect(T._while),i.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(T.semi):this.semicolon(),this.finishNode(i,"DoWhileStatement")},h.parseForStatement=function(i){this.next();var l=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(p),this.enterScope(0),this.expect(T.parenL),this.type===T.semi)return l>-1&&this.unexpected(l),this.parseFor(i,null);var S=this.isLet();if(this.type===T._var||this.type===T._const||S){var N=this.startNode(),W=S?"let":this.value;return this.next(),this.parseVar(N,!0,W),this.finishNode(N,"VariableDeclaration"),(this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&N.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===T._in?l>-1&&this.unexpected(l):i.await=l>-1),this.parseForIn(i,N)):(l>-1&&this.unexpected(l),this.parseFor(i,N))}var rt=this.isContextual("let"),ut=!1,bt=new u,Tt=this.parseExpression(l>-1?"await":!0,bt);return this.type===T._in||(ut=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===T._in?l>-1&&this.unexpected(l):i.await=l>-1),rt&&ut&&this.raise(Tt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Tt,!1,bt),this.checkLValPattern(Tt),this.parseForIn(i,Tt)):(this.checkExpressionErrors(bt,!0),l>-1&&this.unexpected(l),this.parseFor(i,Tt))},h.parseFunctionStatement=function(i,l,S){return this.next(),this.parseFunction(i,g|(S?0:y),!1,l)},h.parseIfStatement=function(i){return this.next(),i.test=this.parseParenExpression(),i.consequent=this.parseStatement("if"),i.alternate=this.eat(T._else)?this.parseStatement("if"):null,this.finishNode(i,"IfStatement")},h.parseReturnStatement=function(i){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(T.semi)||this.insertSemicolon()?i.argument=null:(i.argument=this.parseExpression(),this.semicolon()),this.finishNode(i,"ReturnStatement")},h.parseSwitchStatement=function(i){this.next(),i.discriminant=this.parseParenExpression(),i.cases=[],this.expect(T.braceL),this.labels.push(d),this.enterScope(0);for(var l,S=!1;this.type!==T.braceR;)if(this.type===T._case||this.type===T._default){var N=this.type===T._case;l&&this.finishNode(l,"SwitchCase"),i.cases.push(l=this.startNode()),l.consequent=[],this.next(),N?l.test=this.parseExpression():(S&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),S=!0,l.test=null),this.expect(T.colon)}else l||this.unexpected(),l.consequent.push(this.parseStatement(null));return this.exitScope(),l&&this.finishNode(l,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(i,"SwitchStatement")},h.parseThrowStatement=function(i){return this.next(),xt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),i.argument=this.parseExpression(),this.semicolon(),this.finishNode(i,"ThrowStatement")};var _=[];h.parseCatchClauseParam=function(){var i=this.parseBindingAtom(),l=i.type==="Identifier";return this.enterScope(l?ji:0),this.checkLValPattern(i,l?Nr:$e),this.expect(T.parenR),i},h.parseTryStatement=function(i){if(this.next(),i.block=this.parseBlock(),i.handler=null,this.type===T._catch){var l=this.startNode();this.next(),this.eat(T.parenL)?l.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),l.param=null,this.enterScope(0)),l.body=this.parseBlock(!1),this.exitScope(),i.handler=this.finishNode(l,"CatchClause")}return i.finalizer=this.eat(T._finally)?this.parseBlock():null,!i.handler&&!i.finalizer&&this.raise(i.start,"Missing catch or finally clause"),this.finishNode(i,"TryStatement")},h.parseVarStatement=function(i,l,S){return this.next(),this.parseVar(i,!1,l,S),this.semicolon(),this.finishNode(i,"VariableDeclaration")},h.parseWhileStatement=function(i){return this.next(),i.test=this.parseParenExpression(),this.labels.push(p),i.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(i,"WhileStatement")},h.parseWithStatement=function(i){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),i.object=this.parseParenExpression(),i.body=this.parseStatement("with"),this.finishNode(i,"WithStatement")},h.parseEmptyStatement=function(i){return this.next(),this.finishNode(i,"EmptyStatement")},h.parseLabeledStatement=function(i,l,S,N){for(var W=0,rt=this.labels;W<rt.length;W+=1){var ut=rt[W];ut.name===l&&this.raise(S.start,"Label '"+l+"' is already declared")}for(var bt=this.type.isLoop?"loop":this.type===T._switch?"switch":null,Tt=this.labels.length-1;Tt>=0;Tt--){var Gt=this.labels[Tt];if(Gt.statementStart===i.start)Gt.statementStart=this.start,Gt.kind=bt;else break}return this.labels.push({name:l,kind:bt,statementStart:this.start}),i.body=this.parseStatement(N?N.indexOf("label")===-1?N+"label":N:"label"),this.labels.pop(),i.label=S,this.finishNode(i,"LabeledStatement")},h.parseExpressionStatement=function(i,l){return i.expression=l,this.semicolon(),this.finishNode(i,"ExpressionStatement")},h.parseBlock=function(i,l,S){for(i===void 0&&(i=!0),l===void 0&&(l=this.startNode()),l.body=[],this.expect(T.braceL),i&&this.enterScope(0);this.type!==T.braceR;){var N=this.parseStatement(null);l.body.push(N)}return S&&(this.strict=!1),this.next(),i&&this.exitScope(),this.finishNode(l,"BlockStatement")},h.parseFor=function(i,l){return i.init=l,this.expect(T.semi),i.test=this.type===T.semi?null:this.parseExpression(),this.expect(T.semi),i.update=this.type===T.parenR?null:this.parseExpression(),this.expect(T.parenR),i.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(i,"ForStatement")},h.parseForIn=function(i,l){var S=this.type===T._in;return this.next(),l.type==="VariableDeclaration"&&l.declarations[0].init!=null&&(!S||this.options.ecmaVersion<8||this.strict||l.kind!=="var"||l.declarations[0].id.type!=="Identifier")&&this.raise(l.start,(S?"for-in":"for-of")+" loop variable declaration may not have an initializer"),i.left=l,i.right=S?this.parseExpression():this.parseMaybeAssign(),this.expect(T.parenR),i.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(i,S?"ForInStatement":"ForOfStatement")},h.parseVar=function(i,l,S,N){for(i.declarations=[],i.kind=S;;){var W=this.startNode();if(this.parseVarId(W,S),this.eat(T.eq)?W.init=this.parseMaybeAssign(l):!N&&S==="const"&&!(this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!N&&W.id.type!=="Identifier"&&!(l&&(this.type===T._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):W.init=null,i.declarations.push(this.finishNode(W,"VariableDeclarator")),!this.eat(T.comma))break}return i},h.parseVarId=function(i,l){i.id=this.parseBindingAtom(),this.checkLValPattern(i.id,l==="var"?me:$e,!1)};var g=1,y=2,w=4;h.parseFunction=function(i,l,S,N,W){this.initFunction(i),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!N)&&(this.type===T.star&&l&y&&this.unexpected(),i.generator=this.eat(T.star)),this.options.ecmaVersion>=8&&(i.async=!!N),l&g&&(i.id=l&w&&this.type!==T.name?null:this.parseIdent(),i.id&&!(l&y)&&this.checkLValSimple(i.id,this.strict||i.generator||i.async?this.treatFunctionsAsVar?me:$e:de));var rt=this.yieldPos,ut=this.awaitPos,bt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lr(i.async,i.generator)),l&g||(i.id=this.type===T.name?this.parseIdent():null),this.parseFunctionParams(i),this.parseFunctionBody(i,S,!1,W),this.yieldPos=rt,this.awaitPos=ut,this.awaitIdentPos=bt,this.finishNode(i,l&g?"FunctionDeclaration":"FunctionExpression")},h.parseFunctionParams=function(i){this.expect(T.parenL),i.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},h.parseClass=function(i,l){this.next();var S=this.strict;this.strict=!0,this.parseClassId(i,l),this.parseClassSuper(i);var N=this.enterClassBody(),W=this.startNode(),rt=!1;for(W.body=[],this.expect(T.braceL);this.type!==T.braceR;){var ut=this.parseClassElement(i.superClass!==null);ut&&(W.body.push(ut),ut.type==="MethodDefinition"&&ut.kind==="constructor"?(rt&&this.raiseRecoverable(ut.start,"Duplicate constructor in the same class"),rt=!0):ut.key&&ut.key.type==="PrivateIdentifier"&&x(N,ut)&&this.raiseRecoverable(ut.key.start,"Identifier '#"+ut.key.name+"' has already been declared"))}return this.strict=S,this.next(),i.body=this.finishNode(W,"ClassBody"),this.exitClassBody(),this.finishNode(i,l?"ClassDeclaration":"ClassExpression")},h.parseClassElement=function(i){if(this.eat(T.semi))return null;var l=this.options.ecmaVersion,S=this.startNode(),N="",W=!1,rt=!1,ut="method",bt=!1;if(this.eatContextual("static")){if(l>=13&&this.eat(T.braceL))return this.parseClassStaticBlock(S),S;this.isClassElementNameStart()||this.type===T.star?bt=!0:N="static"}if(S.static=bt,!N&&l>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===T.star)&&!this.canInsertSemicolon()?rt=!0:N="async"),!N&&(l>=9||!rt)&&this.eat(T.star)&&(W=!0),!N&&!rt&&!W){var Tt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?ut=Tt:N=Tt)}if(N?(S.computed=!1,S.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),S.key.name=N,this.finishNode(S.key,"Identifier")):this.parseClassElementName(S),l<13||this.type===T.parenL||ut!=="method"||W||rt){var Gt=!S.static&&m(S,"constructor"),Xt=Gt&&i;Gt&&ut!=="method"&&this.raise(S.key.start,"Constructor can't have get/set modifier"),S.kind=Gt?"constructor":ut,this.parseClassMethod(S,W,rt,Xt)}else this.parseClassField(S);return S},h.isClassElementNameStart=function(){return this.type===T.name||this.type===T.privateId||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword},h.parseClassElementName=function(i){this.type===T.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),i.computed=!1,i.key=this.parsePrivateIdent()):this.parsePropertyName(i)},h.parseClassMethod=function(i,l,S,N){var W=i.key;i.kind==="constructor"?(l&&this.raise(W.start,"Constructor can't be a generator"),S&&this.raise(W.start,"Constructor can't be an async method")):i.static&&m(i,"prototype")&&this.raise(W.start,"Classes may not have a static property named prototype");var rt=i.value=this.parseMethod(l,S,N);return i.kind==="get"&&rt.params.length!==0&&this.raiseRecoverable(rt.start,"getter should have no params"),i.kind==="set"&&rt.params.length!==1&&this.raiseRecoverable(rt.start,"setter should have exactly one param"),i.kind==="set"&&rt.params[0].type==="RestElement"&&this.raiseRecoverable(rt.params[0].start,"Setter cannot use rest params"),this.finishNode(i,"MethodDefinition")},h.parseClassField=function(i){if(m(i,"constructor")?this.raise(i.key.start,"Classes can't have a field named 'constructor'"):i.static&&m(i,"prototype")&&this.raise(i.key.start,"Classes can't have a static field named 'prototype'"),this.eat(T.eq)){var l=this.currentThisScope(),S=l.inClassFieldInit;l.inClassFieldInit=!0,i.value=this.parseMaybeAssign(),l.inClassFieldInit=S}else i.value=null;return this.semicolon(),this.finishNode(i,"PropertyDefinition")},h.parseClassStaticBlock=function(i){i.body=[];var l=this.labels;for(this.labels=[],this.enterScope(gi|Si);this.type!==T.braceR;){var S=this.parseStatement(null);i.body.push(S)}return this.next(),this.exitScope(),this.labels=l,this.finishNode(i,"StaticBlock")},h.parseClassId=function(i,l){this.type===T.name?(i.id=this.parseIdent(),l&&this.checkLValSimple(i.id,$e,!1)):(l===!0&&this.unexpected(),i.id=null)},h.parseClassSuper=function(i){i.superClass=this.eat(T._extends)?this.parseExprSubscripts(null,!1):null},h.enterClassBody=function(){var i={declared:Object.create(null),used:[]};return this.privateNameStack.push(i),i.declared},h.exitClassBody=function(){var i=this.privateNameStack.pop(),l=i.declared,S=i.used;if(this.options.checkPrivateFields)for(var N=this.privateNameStack.length,W=N===0?null:this.privateNameStack[N-1],rt=0;rt<S.length;++rt){var ut=S[rt];_t(l,ut.name)||(W?W.used.push(ut):this.raiseRecoverable(ut.start,"Private field '#"+ut.name+"' must be declared in an enclosing class"))}};function x(i,l){var S=l.key.name,N=i[S],W="true";return l.type==="MethodDefinition"&&(l.kind==="get"||l.kind==="set")&&(W=(l.static?"s":"i")+l.kind),N==="iget"&&W==="iset"||N==="iset"&&W==="iget"||N==="sget"&&W==="sset"||N==="sset"&&W==="sget"?(i[S]="true",!1):N?!0:(i[S]=W,!1)}function m(i,l){var S=i.computed,N=i.key;return!S&&(N.type==="Identifier"&&N.name===l||N.type==="Literal"&&N.value===l)}h.parseExportAllDeclaration=function(i,l){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(i.exported=this.parseModuleExportName(),this.checkExport(l,i.exported,this.lastTokStart)):i.exported=null),this.expectContextual("from"),this.type!==T.string&&this.unexpected(),i.source=this.parseExprAtom(),this.semicolon(),this.finishNode(i,"ExportAllDeclaration")},h.parseExport=function(i,l){if(this.next(),this.eat(T.star))return this.parseExportAllDeclaration(i,l);if(this.eat(T._default))return this.checkExport(l,"default",this.lastTokStart),i.declaration=this.parseExportDefaultDeclaration(),this.finishNode(i,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())i.declaration=this.parseExportDeclaration(i),i.declaration.type==="VariableDeclaration"?this.checkVariableExport(l,i.declaration.declarations):this.checkExport(l,i.declaration.id,i.declaration.id.start),i.specifiers=[],i.source=null;else{if(i.declaration=null,i.specifiers=this.parseExportSpecifiers(l),this.eatContextual("from"))this.type!==T.string&&this.unexpected(),i.source=this.parseExprAtom();else{for(var S=0,N=i.specifiers;S<N.length;S+=1){var W=N[S];this.checkUnreserved(W.local),this.checkLocalExport(W.local),W.local.type==="Literal"&&this.raise(W.local.start,"A string literal cannot be used as an exported binding without `from`.")}i.source=null}this.semicolon()}return this.finishNode(i,"ExportNamedDeclaration")},h.parseExportDeclaration=function(i){return this.parseStatement(null)},h.parseExportDefaultDeclaration=function(){var i;if(this.type===T._function||(i=this.isAsyncFunction())){var l=this.startNode();return this.next(),i&&this.next(),this.parseFunction(l,g|w,!1,i)}else if(this.type===T._class){var S=this.startNode();return this.parseClass(S,"nullableID")}else{var N=this.parseMaybeAssign();return this.semicolon(),N}},h.checkExport=function(i,l,S){i&&(typeof l!="string"&&(l=l.type==="Identifier"?l.name:l.value),_t(i,l)&&this.raiseRecoverable(S,"Duplicate export '"+l+"'"),i[l]=!0)},h.checkPatternExport=function(i,l){var S=l.type;if(S==="Identifier")this.checkExport(i,l,l.start);else if(S==="ObjectPattern")for(var N=0,W=l.properties;N<W.length;N+=1){var rt=W[N];this.checkPatternExport(i,rt)}else if(S==="ArrayPattern")for(var ut=0,bt=l.elements;ut<bt.length;ut+=1){var Tt=bt[ut];Tt&&this.checkPatternExport(i,Tt)}else S==="Property"?this.checkPatternExport(i,l.value):S==="AssignmentPattern"?this.checkPatternExport(i,l.left):S==="RestElement"&&this.checkPatternExport(i,l.argument)},h.checkVariableExport=function(i,l){if(i)for(var S=0,N=l;S<N.length;S+=1){var W=N[S];this.checkPatternExport(i,W.id)}},h.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},h.parseExportSpecifier=function(i){var l=this.startNode();return l.local=this.parseModuleExportName(),l.exported=this.eatContextual("as")?this.parseModuleExportName():l.local,this.checkExport(i,l.exported,l.exported.start),this.finishNode(l,"ExportSpecifier")},h.parseExportSpecifiers=function(i){var l=[],S=!0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(S)S=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;l.push(this.parseExportSpecifier(i))}return l},h.parseImport=function(i){return this.next(),this.type===T.string?(i.specifiers=_,i.source=this.parseExprAtom()):(i.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),i.source=this.type===T.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(i,"ImportDeclaration")},h.parseImportSpecifier=function(){var i=this.startNode();return i.imported=this.parseModuleExportName(),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLValSimple(i.local,$e),this.finishNode(i,"ImportSpecifier")},h.parseImportDefaultSpecifier=function(){var i=this.startNode();return i.local=this.parseIdent(),this.checkLValSimple(i.local,$e),this.finishNode(i,"ImportDefaultSpecifier")},h.parseImportNamespaceSpecifier=function(){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,$e),this.finishNode(i,"ImportNamespaceSpecifier")},h.parseImportSpecifiers=function(){var i=[],l=!0;if(this.type===T.name&&(i.push(this.parseImportDefaultSpecifier()),!this.eat(T.comma)))return i;if(this.type===T.star)return i.push(this.parseImportNamespaceSpecifier()),i;for(this.expect(T.braceL);!this.eat(T.braceR);){if(l)l=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;i.push(this.parseImportSpecifier())}return i},h.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===T.string){var i=this.parseLiteral(this.value);return Je.test(i.value)&&this.raise(i.start,"An export name cannot include a lone surrogate."),i}return this.parseIdent(!0)},h.adaptDirectivePrologue=function(i){for(var l=0;l<i.length&&this.isDirectiveCandidate(i[l]);++l)i[l].directive=i[l].expression.raw.slice(1,-1)},h.isDirectiveCandidate=function(i){return this.options.ecmaVersion>=5&&i.type==="ExpressionStatement"&&i.expression.type==="Literal"&&typeof i.expression.value=="string"&&(this.input[i.start]==='"'||this.input[i.start]==="'")};var E=t.prototype;E.toAssignable=function(i,l,S){if(this.options.ecmaVersion>=6&&i)switch(i.type){case"Identifier":this.inAsync&&i.name==="await"&&this.raise(i.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":i.type="ObjectPattern",S&&this.checkPatternErrors(S,!0);for(var N=0,W=i.properties;N<W.length;N+=1){var rt=W[N];this.toAssignable(rt,l),rt.type==="RestElement"&&(rt.argument.type==="ArrayPattern"||rt.argument.type==="ObjectPattern")&&this.raise(rt.argument.start,"Unexpected token")}break;case"Property":i.kind!=="init"&&this.raise(i.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(i.value,l);break;case"ArrayExpression":i.type="ArrayPattern",S&&this.checkPatternErrors(S,!0),this.toAssignableList(i.elements,l);break;case"SpreadElement":i.type="RestElement",this.toAssignable(i.argument,l),i.argument.type==="AssignmentPattern"&&this.raise(i.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":i.operator!=="="&&this.raise(i.left.end,"Only '=' operator can be used for specifying default value."),i.type="AssignmentPattern",delete i.operator,this.toAssignable(i.left,l);break;case"ParenthesizedExpression":this.toAssignable(i.expression,l,S);break;case"ChainExpression":this.raiseRecoverable(i.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!l)break;default:this.raise(i.start,"Assigning to rvalue")}else S&&this.checkPatternErrors(S,!0);return i},E.toAssignableList=function(i,l){for(var S=i.length,N=0;N<S;N++){var W=i[N];W&&this.toAssignable(W,l)}if(S){var rt=i[S-1];this.options.ecmaVersion===6&&l&&rt&&rt.type==="RestElement"&&rt.argument.type!=="Identifier"&&this.unexpected(rt.argument.start)}return i},E.parseSpread=function(i){var l=this.startNode();return this.next(),l.argument=this.parseMaybeAssign(!1,i),this.finishNode(l,"SpreadElement")},E.parseRestBinding=function(){var i=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==T.name&&this.unexpected(),i.argument=this.parseBindingAtom(),this.finishNode(i,"RestElement")},E.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case T.bracketL:var i=this.startNode();return this.next(),i.elements=this.parseBindingList(T.bracketR,!0,!0),this.finishNode(i,"ArrayPattern");case T.braceL:return this.parseObj(!0)}return this.parseIdent()},E.parseBindingList=function(i,l,S,N){for(var W=[],rt=!0;!this.eat(i);)if(rt?rt=!1:this.expect(T.comma),l&&this.type===T.comma)W.push(null);else{if(S&&this.afterTrailingComma(i))break;if(this.type===T.ellipsis){var ut=this.parseRestBinding();this.parseBindingListItem(ut),W.push(ut),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(i);break}else W.push(this.parseAssignableListItem(N))}return W},E.parseAssignableListItem=function(i){var l=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(l),l},E.parseBindingListItem=function(i){return i},E.parseMaybeDefault=function(i,l,S){if(S=S||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(T.eq))return S;var N=this.startNodeAt(i,l);return N.left=S,N.right=this.parseMaybeAssign(),this.finishNode(N,"AssignmentPattern")},E.checkLValSimple=function(i,l,S){l===void 0&&(l=Xi);var N=l!==Xi;switch(i.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(i.name)&&this.raiseRecoverable(i.start,(N?"Binding ":"Assigning to ")+i.name+" in strict mode"),N&&(l===$e&&i.name==="let"&&this.raiseRecoverable(i.start,"let is disallowed as a lexically bound name"),S&&(_t(S,i.name)&&this.raiseRecoverable(i.start,"Argument name clash"),S[i.name]=!0),l!==jt&&this.declareName(i.name,l,i.start));break;case"ChainExpression":this.raiseRecoverable(i.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":N&&this.raiseRecoverable(i.start,"Binding member expression");break;case"ParenthesizedExpression":return N&&this.raiseRecoverable(i.start,"Binding parenthesized expression"),this.checkLValSimple(i.expression,l,S);default:this.raise(i.start,(N?"Binding":"Assigning to")+" rvalue")}},E.checkLValPattern=function(i,l,S){switch(l===void 0&&(l=Xi),i.type){case"ObjectPattern":for(var N=0,W=i.properties;N<W.length;N+=1){var rt=W[N];this.checkLValInnerPattern(rt,l,S)}break;case"ArrayPattern":for(var ut=0,bt=i.elements;ut<bt.length;ut+=1){var Tt=bt[ut];Tt&&this.checkLValInnerPattern(Tt,l,S)}break;default:this.checkLValSimple(i,l,S)}},E.checkLValInnerPattern=function(i,l,S){switch(l===void 0&&(l=Xi),i.type){case"Property":this.checkLValInnerPattern(i.value,l,S);break;case"AssignmentPattern":this.checkLValPattern(i.left,l,S);break;case"RestElement":this.checkLValPattern(i.argument,l,S);break;default:this.checkLValPattern(i,l,S)}};var k=function(l,S,N,W,rt){this.token=l,this.isExpr=!!S,this.preserveSpace=!!N,this.override=W,this.generator=!!rt},A={b_stat:new k("{",!1),b_expr:new k("{",!0),b_tmpl:new k("${",!1),p_stat:new k("(",!1),p_expr:new k("(",!0),q_tmpl:new k("`",!0,!0,function(i){return i.tryReadTemplateToken()}),f_stat:new k("function",!1),f_expr:new k("function",!0),f_expr_gen:new k("function",!0,!1,null,!0),f_gen:new k("function",!1,!1,null,!0)},b=t.prototype;b.initialContext=function(){return[A.b_stat]},b.curContext=function(){return this.context[this.context.length-1]},b.braceIsBlock=function(i){var l=this.curContext();return l===A.f_expr||l===A.f_stat?!0:i===T.colon&&(l===A.b_stat||l===A.b_expr)?!l.isExpr:i===T._return||i===T.name&&this.exprAllowed?xt.test(this.input.slice(this.lastTokEnd,this.start)):i===T._else||i===T.semi||i===T.eof||i===T.parenR||i===T.arrow?!0:i===T.braceL?l===A.b_stat:i===T._var||i===T._const||i===T.name?!1:!this.exprAllowed},b.inGeneratorContext=function(){for(var i=this.context.length-1;i>=1;i--){var l=this.context[i];if(l.token==="function")return l.generator}return!1},b.updateContext=function(i){var l,S=this.type;S.keyword&&i===T.dot?this.exprAllowed=!1:(l=S.updateContext)?l.call(this,i):this.exprAllowed=S.beforeExpr},b.overrideContext=function(i){this.curContext()!==i&&(this.context[this.context.length-1]=i)},T.parenR.updateContext=T.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var i=this.context.pop();i===A.b_stat&&this.curContext().token==="function"&&(i=this.context.pop()),this.exprAllowed=!i.isExpr},T.braceL.updateContext=function(i){this.context.push(this.braceIsBlock(i)?A.b_stat:A.b_expr),this.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.context.push(A.b_tmpl),this.exprAllowed=!0},T.parenL.updateContext=function(i){var l=i===T._if||i===T._for||i===T._with||i===T._while;this.context.push(l?A.p_stat:A.p_expr),this.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=T._class.updateContext=function(i){i.beforeExpr&&i!==T._else&&!(i===T.semi&&this.curContext()!==A.p_stat)&&!(i===T._return&&xt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((i===T.colon||i===T.braceL)&&this.curContext()===A.b_stat)?this.context.push(A.f_expr):this.context.push(A.f_stat),this.exprAllowed=!1},T.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},T.backQuote.updateContext=function(){this.curContext()===A.q_tmpl?this.context.pop():this.context.push(A.q_tmpl),this.exprAllowed=!1},T.star.updateContext=function(i){if(i===T._function){var l=this.context.length-1;this.context[l]===A.f_expr?this.context[l]=A.f_expr_gen:this.context[l]=A.f_gen}this.exprAllowed=!0},T.name.updateContext=function(i){var l=!1;this.options.ecmaVersion>=6&&i!==T.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(l=!0),this.exprAllowed=l};var C=t.prototype;C.checkPropClash=function(i,l,S){if(!(this.options.ecmaVersion>=9&&i.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(i.computed||i.method||i.shorthand))){var N=i.key,W;switch(N.type){case"Identifier":W=N.name;break;case"Literal":W=String(N.value);break;default:return}var rt=i.kind;if(this.options.ecmaVersion>=6){W==="__proto__"&&rt==="init"&&(l.proto&&(S?S.doubleProto<0&&(S.doubleProto=N.start):this.raiseRecoverable(N.start,"Redefinition of __proto__ property")),l.proto=!0);return}W="$"+W;var ut=l[W];if(ut){var bt;rt==="init"?bt=this.strict&&ut.init||ut.get||ut.set:bt=ut.init||ut[rt],bt&&this.raiseRecoverable(N.start,"Redefinition of property")}else ut=l[W]={init:!1,get:!1,set:!1};ut[rt]=!0}},C.parseExpression=function(i,l){var S=this.start,N=this.startLoc,W=this.parseMaybeAssign(i,l);if(this.type===T.comma){var rt=this.startNodeAt(S,N);for(rt.expressions=[W];this.eat(T.comma);)rt.expressions.push(this.parseMaybeAssign(i,l));return this.finishNode(rt,"SequenceExpression")}return W},C.parseMaybeAssign=function(i,l,S){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(i);this.exprAllowed=!1}var N=!1,W=-1,rt=-1,ut=-1;l?(W=l.parenthesizedAssign,rt=l.trailingComma,ut=l.doubleProto,l.parenthesizedAssign=l.trailingComma=-1):(l=new u,N=!0);var bt=this.start,Tt=this.startLoc;(this.type===T.parenL||this.type===T.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=i==="await");var Gt=this.parseMaybeConditional(i,l);if(S&&(Gt=S.call(this,Gt,bt,Tt)),this.type.isAssign){var Xt=this.startNodeAt(bt,Tt);return Xt.operator=this.value,this.type===T.eq&&(Gt=this.toAssignable(Gt,!1,l)),N||(l.parenthesizedAssign=l.trailingComma=l.doubleProto=-1),l.shorthandAssign>=Gt.start&&(l.shorthandAssign=-1),this.type===T.eq?this.checkLValPattern(Gt):this.checkLValSimple(Gt),Xt.left=Gt,this.next(),Xt.right=this.parseMaybeAssign(i),ut>-1&&(l.doubleProto=ut),this.finishNode(Xt,"AssignmentExpression")}else N&&this.checkExpressionErrors(l,!0);return W>-1&&(l.parenthesizedAssign=W),rt>-1&&(l.trailingComma=rt),Gt},C.parseMaybeConditional=function(i,l){var S=this.start,N=this.startLoc,W=this.parseExprOps(i,l);if(this.checkExpressionErrors(l))return W;if(this.eat(T.question)){var rt=this.startNodeAt(S,N);return rt.test=W,rt.consequent=this.parseMaybeAssign(),this.expect(T.colon),rt.alternate=this.parseMaybeAssign(i),this.finishNode(rt,"ConditionalExpression")}return W},C.parseExprOps=function(i,l){var S=this.start,N=this.startLoc,W=this.parseMaybeUnary(l,!1,!1,i);return this.checkExpressionErrors(l)||W.start===S&&W.type==="ArrowFunctionExpression"?W:this.parseExprOp(W,S,N,-1,i)},C.parseExprOp=function(i,l,S,N,W){var rt=this.type.binop;if(rt!=null&&(!W||this.type!==T._in)&&rt>N){var ut=this.type===T.logicalOR||this.type===T.logicalAND,bt=this.type===T.coalesce;bt&&(rt=T.logicalAND.binop);var Tt=this.value;this.next();var Gt=this.start,Xt=this.startLoc,Se=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,W),Gt,Xt,rt,W),Pi=this.buildBinary(l,S,i,Se,Tt,ut||bt);return(ut&&this.type===T.coalesce||bt&&(this.type===T.logicalOR||this.type===T.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Pi,l,S,N,W)}return i},C.buildBinary=function(i,l,S,N,W,rt){N.type==="PrivateIdentifier"&&this.raise(N.start,"Private identifier can only be left side of binary expression");var ut=this.startNodeAt(i,l);return ut.left=S,ut.operator=W,ut.right=N,this.finishNode(ut,rt?"LogicalExpression":"BinaryExpression")},C.parseMaybeUnary=function(i,l,S,N){var W=this.start,rt=this.startLoc,ut;if(this.isContextual("await")&&this.canAwait)ut=this.parseAwait(N),l=!0;else if(this.type.prefix){var bt=this.startNode(),Tt=this.type===T.incDec;bt.operator=this.value,bt.prefix=!0,this.next(),bt.argument=this.parseMaybeUnary(null,!0,Tt,N),this.checkExpressionErrors(i,!0),Tt?this.checkLValSimple(bt.argument):this.strict&&bt.operator==="delete"&&bt.argument.type==="Identifier"?this.raiseRecoverable(bt.start,"Deleting local variable in strict mode"):bt.operator==="delete"&&v(bt.argument)?this.raiseRecoverable(bt.start,"Private fields can not be deleted"):l=!0,ut=this.finishNode(bt,Tt?"UpdateExpression":"UnaryExpression")}else if(!l&&this.type===T.privateId)(N||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),ut=this.parsePrivateIdent(),this.type!==T._in&&this.unexpected();else{if(ut=this.parseExprSubscripts(i,N),this.checkExpressionErrors(i))return ut;for(;this.type.postfix&&!this.canInsertSemicolon();){var Gt=this.startNodeAt(W,rt);Gt.operator=this.value,Gt.prefix=!1,Gt.argument=ut,this.checkLValSimple(ut),this.next(),ut=this.finishNode(Gt,"UpdateExpression")}}if(!S&&this.eat(T.starstar))if(l)this.unexpected(this.lastTokStart);else return this.buildBinary(W,rt,ut,this.parseMaybeUnary(null,!1,!1,N),"**",!1);else return ut};function v(i){return i.type==="MemberExpression"&&i.property.type==="PrivateIdentifier"||i.type==="ChainExpression"&&v(i.expression)}C.parseExprSubscripts=function(i,l){var S=this.start,N=this.startLoc,W=this.parseExprAtom(i,l);if(W.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return W;var rt=this.parseSubscripts(W,S,N,!1,l);return i&&rt.type==="MemberExpression"&&(i.parenthesizedAssign>=rt.start&&(i.parenthesizedAssign=-1),i.parenthesizedBind>=rt.start&&(i.parenthesizedBind=-1),i.trailingComma>=rt.start&&(i.trailingComma=-1)),rt},C.parseSubscripts=function(i,l,S,N,W){for(var rt=this.options.ecmaVersion>=8&&i.type==="Identifier"&&i.name==="async"&&this.lastTokEnd===i.end&&!this.canInsertSemicolon()&&i.end-i.start===5&&this.potentialArrowAt===i.start,ut=!1;;){var bt=this.parseSubscript(i,l,S,N,rt,ut,W);if(bt.optional&&(ut=!0),bt===i||bt.type==="ArrowFunctionExpression"){if(ut){var Tt=this.startNodeAt(l,S);Tt.expression=bt,bt=this.finishNode(Tt,"ChainExpression")}return bt}i=bt}},C.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(T.arrow)},C.parseSubscriptAsyncArrow=function(i,l,S,N){return this.parseArrowExpression(this.startNodeAt(i,l),S,!0,N)},C.parseSubscript=function(i,l,S,N,W,rt,ut){var bt=this.options.ecmaVersion>=11,Tt=bt&&this.eat(T.questionDot);N&&Tt&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Gt=this.eat(T.bracketL);if(Gt||Tt&&this.type!==T.parenL&&this.type!==T.backQuote||this.eat(T.dot)){var Xt=this.startNodeAt(l,S);Xt.object=i,Gt?(Xt.property=this.parseExpression(),this.expect(T.bracketR)):this.type===T.privateId&&i.type!=="Super"?Xt.property=this.parsePrivateIdent():Xt.property=this.parseIdent(this.options.allowReserved!=="never"),Xt.computed=!!Gt,bt&&(Xt.optional=Tt),i=this.finishNode(Xt,"MemberExpression")}else if(!N&&this.eat(T.parenL)){var Se=new u,Pi=this.yieldPos,$i=this.awaitPos,Mi=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var gr=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1,Se);if(W&&!Tt&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Se,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Pi,this.awaitPos=$i,this.awaitIdentPos=Mi,this.parseSubscriptAsyncArrow(l,S,gr,ut);this.checkExpressionErrors(Se,!0),this.yieldPos=Pi||this.yieldPos,this.awaitPos=$i||this.awaitPos,this.awaitIdentPos=Mi||this.awaitIdentPos;var Li=this.startNodeAt(l,S);Li.callee=i,Li.arguments=gr,bt&&(Li.optional=Tt),i=this.finishNode(Li,"CallExpression")}else if(this.type===T.backQuote){(Tt||rt)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ni=this.startNodeAt(l,S);Ni.tag=i,Ni.quasi=this.parseTemplate({isTagged:!0}),i=this.finishNode(Ni,"TaggedTemplateExpression")}return i},C.parseExprAtom=function(i,l,S){this.type===T.slash&&this.readRegexp();var N,W=this.potentialArrowAt===this.start;switch(this.type){case T._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),N=this.startNode(),this.next(),this.type===T.parenL&&!this.allowDirectSuper&&this.raise(N.start,"super() call outside constructor of a subclass"),this.type!==T.dot&&this.type!==T.bracketL&&this.type!==T.parenL&&this.unexpected(),this.finishNode(N,"Super");case T._this:return N=this.startNode(),this.next(),this.finishNode(N,"ThisExpression");case T.name:var rt=this.start,ut=this.startLoc,bt=this.containsEsc,Tt=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!bt&&Tt.name==="async"&&!this.canInsertSemicolon()&&this.eat(T._function))return this.overrideContext(A.f_expr),this.parseFunction(this.startNodeAt(rt,ut),0,!1,!0,l);if(W&&!this.canInsertSemicolon()){if(this.eat(T.arrow))return this.parseArrowExpression(this.startNodeAt(rt,ut),[Tt],!1,l);if(this.options.ecmaVersion>=8&&Tt.name==="async"&&this.type===T.name&&!bt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Tt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(T.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(rt,ut),[Tt],!0,l)}return Tt;case T.regexp:var Gt=this.value;return N=this.parseLiteral(Gt.value),N.regex={pattern:Gt.pattern,flags:Gt.flags},N;case T.num:case T.string:return this.parseLiteral(this.value);case T._null:case T._true:case T._false:return N=this.startNode(),N.value=this.type===T._null?null:this.type===T._true,N.raw=this.type.keyword,this.next(),this.finishNode(N,"Literal");case T.parenL:var Xt=this.start,Se=this.parseParenAndDistinguishExpression(W,l);return i&&(i.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Se)&&(i.parenthesizedAssign=Xt),i.parenthesizedBind<0&&(i.parenthesizedBind=Xt)),Se;case T.bracketL:return N=this.startNode(),this.next(),N.elements=this.parseExprList(T.bracketR,!0,!0,i),this.finishNode(N,"ArrayExpression");case T.braceL:return this.overrideContext(A.b_expr),this.parseObj(!1,i);case T._function:return N=this.startNode(),this.next(),this.parseFunction(N,0);case T._class:return this.parseClass(this.startNode(),!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate();case T._import:return this.options.ecmaVersion>=11?this.parseExprImport(S):this.unexpected();default:return this.parseExprAtomDefault()}},C.parseExprAtomDefault=function(){this.unexpected()},C.parseExprImport=function(i){var l=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===T.parenL&&!i)return this.parseDynamicImport(l);if(this.type===T.dot){var S=this.startNodeAt(l.start,l.loc&&l.loc.start);return S.name="import",l.meta=this.finishNode(S,"Identifier"),this.parseImportMeta(l)}else this.unexpected()},C.parseDynamicImport=function(i){if(this.next(),i.source=this.parseMaybeAssign(),!this.eat(T.parenR)){var l=this.start;this.eat(T.comma)&&this.eat(T.parenR)?this.raiseRecoverable(l,"Trailing comma is not allowed in import()"):this.unexpected(l)}return this.finishNode(i,"ImportExpression")},C.parseImportMeta=function(i){this.next();var l=this.containsEsc;return i.property=this.parseIdent(!0),i.property.name!=="meta"&&this.raiseRecoverable(i.property.start,"The only valid meta property for import is 'import.meta'"),l&&this.raiseRecoverable(i.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(i.start,"Cannot use 'import.meta' outside a module"),this.finishNode(i,"MetaProperty")},C.parseLiteral=function(i){var l=this.startNode();return l.value=i,l.raw=this.input.slice(this.start,this.end),l.raw.charCodeAt(l.raw.length-1)===110&&(l.bigint=l.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(l,"Literal")},C.parseParenExpression=function(){this.expect(T.parenL);var i=this.parseExpression();return this.expect(T.parenR),i},C.shouldParseArrow=function(i){return!this.canInsertSemicolon()},C.parseParenAndDistinguishExpression=function(i,l){var S=this.start,N=this.startLoc,W,rt=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ut=this.start,bt=this.startLoc,Tt=[],Gt=!0,Xt=!1,Se=new u,Pi=this.yieldPos,$i=this.awaitPos,Mi;for(this.yieldPos=0,this.awaitPos=0;this.type!==T.parenR;)if(Gt?Gt=!1:this.expect(T.comma),rt&&this.afterTrailingComma(T.parenR,!0)){Xt=!0;break}else if(this.type===T.ellipsis){Mi=this.start,Tt.push(this.parseParenItem(this.parseRestBinding())),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Tt.push(this.parseMaybeAssign(!1,Se,this.parseParenItem));var gr=this.lastTokEnd,Li=this.lastTokEndLoc;if(this.expect(T.parenR),i&&this.shouldParseArrow(Tt)&&this.eat(T.arrow))return this.checkPatternErrors(Se,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Pi,this.awaitPos=$i,this.parseParenArrowList(S,N,Tt,l);(!Tt.length||Xt)&&this.unexpected(this.lastTokStart),Mi&&this.unexpected(Mi),this.checkExpressionErrors(Se,!0),this.yieldPos=Pi||this.yieldPos,this.awaitPos=$i||this.awaitPos,Tt.length>1?(W=this.startNodeAt(ut,bt),W.expressions=Tt,this.finishNodeAt(W,"SequenceExpression",gr,Li)):W=Tt[0]}else W=this.parseParenExpression();if(this.options.preserveParens){var Ni=this.startNodeAt(S,N);return Ni.expression=W,this.finishNode(Ni,"ParenthesizedExpression")}else return W},C.parseParenItem=function(i){return i},C.parseParenArrowList=function(i,l,S,N){return this.parseArrowExpression(this.startNodeAt(i,l),S,!1,N)};var I=[];C.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var i=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===T.dot){var l=this.startNodeAt(i.start,i.loc&&i.loc.start);l.name="new",i.meta=this.finishNode(l,"Identifier"),this.next();var S=this.containsEsc;return i.property=this.parseIdent(!0),i.property.name!=="target"&&this.raiseRecoverable(i.property.start,"The only valid meta property for new is 'new.target'"),S&&this.raiseRecoverable(i.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(i.start,"'new.target' can only be used in functions and class static block"),this.finishNode(i,"MetaProperty")}var N=this.start,W=this.startLoc;return i.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),N,W,!0,!1),this.eat(T.parenL)?i.arguments=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1):i.arguments=I,this.finishNode(i,"NewExpression")},C.parseTemplateElement=function(i){var l=i.isTagged,S=this.startNode();return this.type===T.invalidTemplate?(l||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),S.value={raw:this.value,cooked:null}):S.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
4
- `),cooked:this.value},this.next(),S.tail=this.type===T.backQuote,this.finishNode(S,"TemplateElement")},C.parseTemplate=function(i){i===void 0&&(i={});var l=i.isTagged;l===void 0&&(l=!1);var S=this.startNode();this.next(),S.expressions=[];var N=this.parseTemplateElement({isTagged:l});for(S.quasis=[N];!N.tail;)this.type===T.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(T.dollarBraceL),S.expressions.push(this.parseExpression()),this.expect(T.braceR),S.quasis.push(N=this.parseTemplateElement({isTagged:l}));return this.next(),this.finishNode(S,"TemplateLiteral")},C.isAsyncProp=function(i){return!i.computed&&i.key.type==="Identifier"&&i.key.name==="async"&&(this.type===T.name||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===T.star)&&!xt.test(this.input.slice(this.lastTokEnd,this.start))},C.parseObj=function(i,l){var S=this.startNode(),N=!0,W={};for(S.properties=[],this.next();!this.eat(T.braceR);){if(N)N=!1;else if(this.expect(T.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(T.braceR))break;var rt=this.parseProperty(i,l);i||this.checkPropClash(rt,W,l),S.properties.push(rt)}return this.finishNode(S,i?"ObjectPattern":"ObjectExpression")},C.parseProperty=function(i,l){var S=this.startNode(),N,W,rt,ut;if(this.options.ecmaVersion>=9&&this.eat(T.ellipsis))return i?(S.argument=this.parseIdent(!1),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(S,"RestElement")):(S.argument=this.parseMaybeAssign(!1,l),this.type===T.comma&&l&&l.trailingComma<0&&(l.trailingComma=this.start),this.finishNode(S,"SpreadElement"));this.options.ecmaVersion>=6&&(S.method=!1,S.shorthand=!1,(i||l)&&(rt=this.start,ut=this.startLoc),i||(N=this.eat(T.star)));var bt=this.containsEsc;return this.parsePropertyName(S),!i&&!bt&&this.options.ecmaVersion>=8&&!N&&this.isAsyncProp(S)?(W=!0,N=this.options.ecmaVersion>=9&&this.eat(T.star),this.parsePropertyName(S)):W=!1,this.parsePropertyValue(S,i,N,W,rt,ut,l,bt),this.finishNode(S,"Property")},C.parseGetterSetter=function(i){i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);var l=i.kind==="get"?0:1;if(i.value.params.length!==l){var S=i.value.start;i.kind==="get"?this.raiseRecoverable(S,"getter should have no params"):this.raiseRecoverable(S,"setter should have exactly one param")}else i.kind==="set"&&i.value.params[0].type==="RestElement"&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")},C.parsePropertyValue=function(i,l,S,N,W,rt,ut,bt){(S||N)&&this.type===T.colon&&this.unexpected(),this.eat(T.colon)?(i.value=l?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ut),i.kind="init"):this.options.ecmaVersion>=6&&this.type===T.parenL?(l&&this.unexpected(),i.kind="init",i.method=!0,i.value=this.parseMethod(S,N)):!l&&!bt&&this.options.ecmaVersion>=5&&!i.computed&&i.key.type==="Identifier"&&(i.key.name==="get"||i.key.name==="set")&&this.type!==T.comma&&this.type!==T.braceR&&this.type!==T.eq?((S||N)&&this.unexpected(),this.parseGetterSetter(i)):this.options.ecmaVersion>=6&&!i.computed&&i.key.type==="Identifier"?((S||N)&&this.unexpected(),this.checkUnreserved(i.key),i.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=W),i.kind="init",l?i.value=this.parseMaybeDefault(W,rt,this.copyNode(i.key)):this.type===T.eq&&ut?(ut.shorthandAssign<0&&(ut.shorthandAssign=this.start),i.value=this.parseMaybeDefault(W,rt,this.copyNode(i.key))):i.value=this.copyNode(i.key),i.shorthand=!0):this.unexpected()},C.parsePropertyName=function(i){if(this.options.ecmaVersion>=6){if(this.eat(T.bracketL))return i.computed=!0,i.key=this.parseMaybeAssign(),this.expect(T.bracketR),i.key;i.computed=!1}return i.key=this.type===T.num||this.type===T.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},C.initFunction=function(i){i.id=null,this.options.ecmaVersion>=6&&(i.generator=i.expression=!1),this.options.ecmaVersion>=8&&(i.async=!1)},C.parseMethod=function(i,l,S){var N=this.startNode(),W=this.yieldPos,rt=this.awaitPos,ut=this.awaitIdentPos;return this.initFunction(N),this.options.ecmaVersion>=6&&(N.generator=i),this.options.ecmaVersion>=8&&(N.async=!!l),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Lr(l,N.generator)|Si|(S?Zi:0)),this.expect(T.parenL),N.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(N,!1,!0,!1),this.yieldPos=W,this.awaitPos=rt,this.awaitIdentPos=ut,this.finishNode(N,"FunctionExpression")},C.parseArrowExpression=function(i,l,S,N){var W=this.yieldPos,rt=this.awaitPos,ut=this.awaitIdentPos;return this.enterScope(Lr(S,!1)|_i),this.initFunction(i),this.options.ecmaVersion>=8&&(i.async=!!S),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,i.params=this.toAssignableList(l,!0),this.parseFunctionBody(i,!0,!1,N),this.yieldPos=W,this.awaitPos=rt,this.awaitIdentPos=ut,this.finishNode(i,"ArrowFunctionExpression")},C.parseFunctionBody=function(i,l,S,N){var W=l&&this.type!==T.braceL,rt=this.strict,ut=!1;if(W)i.body=this.parseMaybeAssign(N),i.expression=!0,this.checkParams(i,!1);else{var bt=this.options.ecmaVersion>=7&&!this.isSimpleParamList(i.params);(!rt||bt)&&(ut=this.strictDirective(this.end),ut&&bt&&this.raiseRecoverable(i.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Tt=this.labels;this.labels=[],ut&&(this.strict=!0),this.checkParams(i,!rt&&!ut&&!l&&!S&&this.isSimpleParamList(i.params)),this.strict&&i.id&&this.checkLValSimple(i.id,jt),i.body=this.parseBlock(!1,void 0,ut&&!rt),i.expression=!1,this.adaptDirectivePrologue(i.body.body),this.labels=Tt}this.exitScope()},C.isSimpleParamList=function(i){for(var l=0,S=i;l<S.length;l+=1){var N=S[l];if(N.type!=="Identifier")return!1}return!0},C.checkParams=function(i,l){for(var S=Object.create(null),N=0,W=i.params;N<W.length;N+=1){var rt=W[N];this.checkLValInnerPattern(rt,me,l?null:S)}},C.parseExprList=function(i,l,S,N){for(var W=[],rt=!0;!this.eat(i);){if(rt)rt=!1;else if(this.expect(T.comma),l&&this.afterTrailingComma(i))break;var ut=void 0;S&&this.type===T.comma?ut=null:this.type===T.ellipsis?(ut=this.parseSpread(N),N&&this.type===T.comma&&N.trailingComma<0&&(N.trailingComma=this.start)):ut=this.parseMaybeAssign(!1,N),W.push(ut)}return W},C.checkUnreserved=function(i){var l=i.start,S=i.end,N=i.name;if(this.inGenerator&&N==="yield"&&this.raiseRecoverable(l,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&N==="await"&&this.raiseRecoverable(l,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&N==="arguments"&&this.raiseRecoverable(l,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(N==="arguments"||N==="await")&&this.raise(l,"Cannot use "+N+" in class static initialization block"),this.keywords.test(N)&&this.raise(l,"Unexpected keyword '"+N+"'"),!(this.options.ecmaVersion<6&&this.input.slice(l,S).indexOf("\\")!==-1)){var W=this.strict?this.reservedWordsStrict:this.reservedWords;W.test(N)&&(!this.inAsync&&N==="await"&&this.raiseRecoverable(l,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(l,"The keyword '"+N+"' is reserved"))}},C.parseIdent=function(i){var l=this.parseIdentNode();return this.next(!!i),this.finishNode(l,"Identifier"),i||(this.checkUnreserved(l),l.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=l.start)),l},C.parseIdentNode=function(){var i=this.startNode();return this.type===T.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,(i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=T.name):this.unexpected(),i},C.parsePrivateIdent=function(){var i=this.startNode();return this.type===T.privateId?i.name=this.value:this.unexpected(),this.next(),this.finishNode(i,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(i.start,"Private field '#"+i.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(i)),i},C.parseYield=function(i){this.yieldPos||(this.yieldPos=this.start);var l=this.startNode();return this.next(),this.type===T.semi||this.canInsertSemicolon()||this.type!==T.star&&!this.type.startsExpr?(l.delegate=!1,l.argument=null):(l.delegate=this.eat(T.star),l.argument=this.parseMaybeAssign(i)),this.finishNode(l,"YieldExpression")},C.parseAwait=function(i){this.awaitPos||(this.awaitPos=this.start);var l=this.startNode();return this.next(),l.argument=this.parseMaybeUnary(null,!0,!1,i),this.finishNode(l,"AwaitExpression")};var L=t.prototype;L.raise=function(i,l){var S=Jt(this.input,i);l+=" ("+S.line+":"+S.column+")";var N=new SyntaxError(l);throw N.pos=i,N.loc=S,N.raisedAt=this.pos,N},L.raiseRecoverable=L.raise,L.curPosition=function(){if(this.options.locations)return new Ee(this.curLine,this.pos-this.lineStart)};var R=t.prototype,M=function(l){this.flags=l,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};R.enterScope=function(i){this.scopeStack.push(new M(i))},R.exitScope=function(){this.scopeStack.pop()},R.treatFunctionsAsVarInScope=function(i){return i.flags&ee||!this.inModule&&i.flags&Kt},R.declareName=function(i,l,S){var N=!1;if(l===$e){var W=this.currentScope();N=W.lexical.indexOf(i)>-1||W.functions.indexOf(i)>-1||W.var.indexOf(i)>-1,W.lexical.push(i),this.inModule&&W.flags&Kt&&delete this.undefinedExports[i]}else if(l===Nr){var rt=this.currentScope();rt.lexical.push(i)}else if(l===de){var ut=this.currentScope();this.treatFunctionsAsVar?N=ut.lexical.indexOf(i)>-1:N=ut.lexical.indexOf(i)>-1||ut.var.indexOf(i)>-1,ut.functions.push(i)}else for(var bt=this.scopeStack.length-1;bt>=0;--bt){var Tt=this.scopeStack[bt];if(Tt.lexical.indexOf(i)>-1&&!(Tt.flags&ji&&Tt.lexical[0]===i)||!this.treatFunctionsAsVarInScope(Tt)&&Tt.functions.indexOf(i)>-1){N=!0;break}if(Tt.var.push(i),this.inModule&&Tt.flags&Kt&&delete this.undefinedExports[i],Tt.flags&Mr)break}N&&this.raiseRecoverable(S,"Identifier '"+i+"' has already been declared")},R.checkLocalExport=function(i){this.scopeStack[0].lexical.indexOf(i.name)===-1&&this.scopeStack[0].var.indexOf(i.name)===-1&&(this.undefinedExports[i.name]=i)},R.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},R.currentVarScope=function(){for(var i=this.scopeStack.length-1;;i--){var l=this.scopeStack[i];if(l.flags&Mr)return l}},R.currentThisScope=function(){for(var i=this.scopeStack.length-1;;i--){var l=this.scopeStack[i];if(l.flags&Mr&&!(l.flags&_i))return l}};var V=function(l,S,N){this.type="",this.start=S,this.end=0,l.options.locations&&(this.loc=new Ve(l,N)),l.options.directSourceFile&&(this.sourceFile=l.options.directSourceFile),l.options.ranges&&(this.range=[S,0])},U=t.prototype;U.startNode=function(){return new V(this,this.start,this.startLoc)},U.startNodeAt=function(i,l){return new V(this,i,l)};function j(i,l,S,N){return i.type=l,i.end=S,this.options.locations&&(i.loc.end=N),this.options.ranges&&(i.range[1]=S),i}U.finishNode=function(i,l){return j.call(this,i,l,this.lastTokEnd,this.lastTokEndLoc)},U.finishNodeAt=function(i,l,S,N){return j.call(this,i,l,S,N)},U.copyNode=function(i){var l=new V(this,i.start,this.startLoc);for(var S in i)l[S]=i[S];return l};var Y="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",H=Y+" Extended_Pictographic",X=H,Q=X+" EBase EComp EMod EPres ExtPict",$=Q,tt=$,st={9:Y,10:H,11:X,12:Q,13:$,14:tt},mt="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",yt={9:"",10:"",11:"",12:"",13:"",14:mt},St="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",It="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",lt=It+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ct=lt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ct=ct+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",At=Ct+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Et=At+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Nt={9:It,10:lt,11:ct,12:Ct,13:At,14:Et},Lt={};function Bt(i){var l=Lt[i]={binary:zt(st[i]+" "+St),binaryOfStrings:zt(yt[i]),nonBinary:{General_Category:zt(St),Script:zt(Nt[i])}};l.nonBinary.Script_Extensions=l.nonBinary.Script,l.nonBinary.gc=l.nonBinary.General_Category,l.nonBinary.sc=l.nonBinary.Script,l.nonBinary.scx=l.nonBinary.Script_Extensions}for(var Ut=0,Dt=[9,10,11,12,13,14];Ut<Dt.length;Ut+=1){var ke=Dt[Ut];Bt(ke)}var Pt=t.prototype,oe=function(l){this.parser=l,this.validFlags="gim"+(l.options.ecmaVersion>=6?"uy":"")+(l.options.ecmaVersion>=9?"s":"")+(l.options.ecmaVersion>=13?"d":"")+(l.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lt[l.options.ecmaVersion>=14?14:l.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};oe.prototype.reset=function(l,S,N){var W=N.indexOf("v")!==-1,rt=N.indexOf("u")!==-1;this.start=l|0,this.source=S+"",this.flags=N,W&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=rt&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=rt&&this.parser.options.ecmaVersion>=9)},oe.prototype.raise=function(l){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+l)},oe.prototype.at=function(l,S){S===void 0&&(S=!1);var N=this.source,W=N.length;if(l>=W)return-1;var rt=N.charCodeAt(l);if(!(S||this.switchU)||rt<=55295||rt>=57344||l+1>=W)return rt;var ut=N.charCodeAt(l+1);return ut>=56320&&ut<=57343?(rt<<10)+ut-56613888:rt},oe.prototype.nextIndex=function(l,S){S===void 0&&(S=!1);var N=this.source,W=N.length;if(l>=W)return W;var rt=N.charCodeAt(l),ut;return!(S||this.switchU)||rt<=55295||rt>=57344||l+1>=W||(ut=N.charCodeAt(l+1))<56320||ut>57343?l+1:l+2},oe.prototype.current=function(l){return l===void 0&&(l=!1),this.at(this.pos,l)},oe.prototype.lookahead=function(l){return l===void 0&&(l=!1),this.at(this.nextIndex(this.pos,l),l)},oe.prototype.advance=function(l){l===void 0&&(l=!1),this.pos=this.nextIndex(this.pos,l)},oe.prototype.eat=function(l,S){return S===void 0&&(S=!1),this.current(S)===l?(this.advance(S),!0):!1},oe.prototype.eatChars=function(l,S){S===void 0&&(S=!1);for(var N=this.pos,W=0,rt=l;W<rt.length;W+=1){var ut=rt[W],bt=this.at(N,S);if(bt===-1||bt!==ut)return!1;N=this.nextIndex(N,S)}return this.pos=N,!0},Pt.validateRegExpFlags=function(i){for(var l=i.validFlags,S=i.flags,N=!1,W=!1,rt=0;rt<S.length;rt++){var ut=S.charAt(rt);l.indexOf(ut)===-1&&this.raise(i.start,"Invalid regular expression flag"),S.indexOf(ut,rt+1)>-1&&this.raise(i.start,"Duplicate regular expression flag"),ut==="u"&&(N=!0),ut==="v"&&(W=!0)}this.options.ecmaVersion>=15&&N&&W&&this.raise(i.start,"Invalid regular expression flag")},Pt.validateRegExpPattern=function(i){this.regexp_pattern(i),!i.switchN&&this.options.ecmaVersion>=9&&i.groupNames.length>0&&(i.switchN=!0,this.regexp_pattern(i))},Pt.regexp_pattern=function(i){i.pos=0,i.lastIntValue=0,i.lastStringValue="",i.lastAssertionIsQuantifiable=!1,i.numCapturingParens=0,i.maxBackReference=0,i.groupNames.length=0,i.backReferenceNames.length=0,this.regexp_disjunction(i),i.pos!==i.source.length&&(i.eat(41)&&i.raise("Unmatched ')'"),(i.eat(93)||i.eat(125))&&i.raise("Lone quantifier brackets")),i.maxBackReference>i.numCapturingParens&&i.raise("Invalid escape");for(var l=0,S=i.backReferenceNames;l<S.length;l+=1){var N=S[l];i.groupNames.indexOf(N)===-1&&i.raise("Invalid named capture referenced")}},Pt.regexp_disjunction=function(i){for(this.regexp_alternative(i);i.eat(124);)this.regexp_alternative(i);this.regexp_eatQuantifier(i,!0)&&i.raise("Nothing to repeat"),i.eat(123)&&i.raise("Lone quantifier brackets")},Pt.regexp_alternative=function(i){for(;i.pos<i.source.length&&this.regexp_eatTerm(i););},Pt.regexp_eatTerm=function(i){return this.regexp_eatAssertion(i)?(i.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(i)&&i.switchU&&i.raise("Invalid quantifier"),!0):(i.switchU?this.regexp_eatAtom(i):this.regexp_eatExtendedAtom(i))?(this.regexp_eatQuantifier(i),!0):!1},Pt.regexp_eatAssertion=function(i){var l=i.pos;if(i.lastAssertionIsQuantifiable=!1,i.eat(94)||i.eat(36))return!0;if(i.eat(92)){if(i.eat(66)||i.eat(98))return!0;i.pos=l}if(i.eat(40)&&i.eat(63)){var S=!1;if(this.options.ecmaVersion>=9&&(S=i.eat(60)),i.eat(61)||i.eat(33))return this.regexp_disjunction(i),i.eat(41)||i.raise("Unterminated group"),i.lastAssertionIsQuantifiable=!S,!0}return i.pos=l,!1},Pt.regexp_eatQuantifier=function(i,l){return l===void 0&&(l=!1),this.regexp_eatQuantifierPrefix(i,l)?(i.eat(63),!0):!1},Pt.regexp_eatQuantifierPrefix=function(i,l){return i.eat(42)||i.eat(43)||i.eat(63)||this.regexp_eatBracedQuantifier(i,l)},Pt.regexp_eatBracedQuantifier=function(i,l){var S=i.pos;if(i.eat(123)){var N=0,W=-1;if(this.regexp_eatDecimalDigits(i)&&(N=i.lastIntValue,i.eat(44)&&this.regexp_eatDecimalDigits(i)&&(W=i.lastIntValue),i.eat(125)))return W!==-1&&W<N&&!l&&i.raise("numbers out of order in {} quantifier"),!0;i.switchU&&!l&&i.raise("Incomplete quantifier"),i.pos=S}return!1},Pt.regexp_eatAtom=function(i){return this.regexp_eatPatternCharacters(i)||i.eat(46)||this.regexp_eatReverseSolidusAtomEscape(i)||this.regexp_eatCharacterClass(i)||this.regexp_eatUncapturingGroup(i)||this.regexp_eatCapturingGroup(i)},Pt.regexp_eatReverseSolidusAtomEscape=function(i){var l=i.pos;if(i.eat(92)){if(this.regexp_eatAtomEscape(i))return!0;i.pos=l}return!1},Pt.regexp_eatUncapturingGroup=function(i){var l=i.pos;if(i.eat(40)){if(i.eat(63)&&i.eat(58)){if(this.regexp_disjunction(i),i.eat(41))return!0;i.raise("Unterminated group")}i.pos=l}return!1},Pt.regexp_eatCapturingGroup=function(i){if(i.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(i):i.current()===63&&i.raise("Invalid group"),this.regexp_disjunction(i),i.eat(41))return i.numCapturingParens+=1,!0;i.raise("Unterminated group")}return!1},Pt.regexp_eatExtendedAtom=function(i){return i.eat(46)||this.regexp_eatReverseSolidusAtomEscape(i)||this.regexp_eatCharacterClass(i)||this.regexp_eatUncapturingGroup(i)||this.regexp_eatCapturingGroup(i)||this.regexp_eatInvalidBracedQuantifier(i)||this.regexp_eatExtendedPatternCharacter(i)},Pt.regexp_eatInvalidBracedQuantifier=function(i){return this.regexp_eatBracedQuantifier(i,!0)&&i.raise("Nothing to repeat"),!1},Pt.regexp_eatSyntaxCharacter=function(i){var l=i.current();return pe(l)?(i.lastIntValue=l,i.advance(),!0):!1};function pe(i){return i===36||i>=40&&i<=43||i===46||i===63||i>=91&&i<=94||i>=123&&i<=125}Pt.regexp_eatPatternCharacters=function(i){for(var l=i.pos,S=0;(S=i.current())!==-1&&!pe(S);)i.advance();return i.pos!==l},Pt.regexp_eatExtendedPatternCharacter=function(i){var l=i.current();return l!==-1&&l!==36&&!(l>=40&&l<=43)&&l!==46&&l!==63&&l!==91&&l!==94&&l!==124?(i.advance(),!0):!1},Pt.regexp_groupSpecifier=function(i){if(i.eat(63)){if(this.regexp_eatGroupName(i)){i.groupNames.indexOf(i.lastStringValue)!==-1&&i.raise("Duplicate capture group name"),i.groupNames.push(i.lastStringValue);return}i.raise("Invalid group")}},Pt.regexp_eatGroupName=function(i){if(i.lastStringValue="",i.eat(60)){if(this.regexp_eatRegExpIdentifierName(i)&&i.eat(62))return!0;i.raise("Invalid capture group name")}return!1},Pt.regexp_eatRegExpIdentifierName=function(i){if(i.lastStringValue="",this.regexp_eatRegExpIdentifierStart(i)){for(i.lastStringValue+=se(i.lastIntValue);this.regexp_eatRegExpIdentifierPart(i);)i.lastStringValue+=se(i.lastIntValue);return!0}return!1},Pt.regexp_eatRegExpIdentifierStart=function(i){var l=i.pos,S=this.options.ecmaVersion>=11,N=i.current(S);return i.advance(S),N===92&&this.regexp_eatRegExpUnicodeEscapeSequence(i,S)&&(N=i.lastIntValue),re(N)?(i.lastIntValue=N,!0):(i.pos=l,!1)};function re(i){return at(i,!0)||i===36||i===95}Pt.regexp_eatRegExpIdentifierPart=function(i){var l=i.pos,S=this.options.ecmaVersion>=11,N=i.current(S);return i.advance(S),N===92&&this.regexp_eatRegExpUnicodeEscapeSequence(i,S)&&(N=i.lastIntValue),xe(N)?(i.lastIntValue=N,!0):(i.pos=l,!1)};function xe(i){return G(i,!0)||i===36||i===95||i===8204||i===8205}Pt.regexp_eatAtomEscape=function(i){return this.regexp_eatBackReference(i)||this.regexp_eatCharacterClassEscape(i)||this.regexp_eatCharacterEscape(i)||i.switchN&&this.regexp_eatKGroupName(i)?!0:(i.switchU&&(i.current()===99&&i.raise("Invalid unicode escape"),i.raise("Invalid escape")),!1)},Pt.regexp_eatBackReference=function(i){var l=i.pos;if(this.regexp_eatDecimalEscape(i)){var S=i.lastIntValue;if(i.switchU)return S>i.maxBackReference&&(i.maxBackReference=S),!0;if(S<=i.numCapturingParens)return!0;i.pos=l}return!1},Pt.regexp_eatKGroupName=function(i){if(i.eat(107)){if(this.regexp_eatGroupName(i))return i.backReferenceNames.push(i.lastStringValue),!0;i.raise("Invalid named reference")}return!1},Pt.regexp_eatCharacterEscape=function(i){return this.regexp_eatControlEscape(i)||this.regexp_eatCControlLetter(i)||this.regexp_eatZero(i)||this.regexp_eatHexEscapeSequence(i)||this.regexp_eatRegExpUnicodeEscapeSequence(i,!1)||!i.switchU&&this.regexp_eatLegacyOctalEscapeSequence(i)||this.regexp_eatIdentityEscape(i)},Pt.regexp_eatCControlLetter=function(i){var l=i.pos;if(i.eat(99)){if(this.regexp_eatControlLetter(i))return!0;i.pos=l}return!1},Pt.regexp_eatZero=function(i){return i.current()===48&&!Yi(i.lookahead())?(i.lastIntValue=0,i.advance(),!0):!1},Pt.regexp_eatControlEscape=function(i){var l=i.current();return l===116?(i.lastIntValue=9,i.advance(),!0):l===110?(i.lastIntValue=10,i.advance(),!0):l===118?(i.lastIntValue=11,i.advance(),!0):l===102?(i.lastIntValue=12,i.advance(),!0):l===114?(i.lastIntValue=13,i.advance(),!0):!1},Pt.regexp_eatControlLetter=function(i){var l=i.current();return Fe(l)?(i.lastIntValue=l%32,i.advance(),!0):!1};function Fe(i){return i>=65&&i<=90||i>=97&&i<=122}Pt.regexp_eatRegExpUnicodeEscapeSequence=function(i,l){l===void 0&&(l=!1);var S=i.pos,N=l||i.switchU;if(i.eat(117)){if(this.regexp_eatFixedHexDigits(i,4)){var W=i.lastIntValue;if(N&&W>=55296&&W<=56319){var rt=i.pos;if(i.eat(92)&&i.eat(117)&&this.regexp_eatFixedHexDigits(i,4)){var ut=i.lastIntValue;if(ut>=56320&&ut<=57343)return i.lastIntValue=(W-55296)*1024+(ut-56320)+65536,!0}i.pos=rt,i.lastIntValue=W}return!0}if(N&&i.eat(123)&&this.regexp_eatHexDigits(i)&&i.eat(125)&&Pe(i.lastIntValue))return!0;N&&i.raise("Invalid unicode escape"),i.pos=S}return!1};function Pe(i){return i>=0&&i<=1114111}Pt.regexp_eatIdentityEscape=function(i){if(i.switchU)return this.regexp_eatSyntaxCharacter(i)?!0:i.eat(47)?(i.lastIntValue=47,!0):!1;var l=i.current();return l!==99&&(!i.switchN||l!==107)?(i.lastIntValue=l,i.advance(),!0):!1},Pt.regexp_eatDecimalEscape=function(i){i.lastIntValue=0;var l=i.current();if(l>=49&&l<=57){do i.lastIntValue=10*i.lastIntValue+(l-48),i.advance();while((l=i.current())>=48&&l<=57);return!0}return!1};var Ge=0,Oe=1,_e=2;Pt.regexp_eatCharacterClassEscape=function(i){var l=i.current();if(ti(l))return i.lastIntValue=-1,i.advance(),Oe;var S=!1;if(i.switchU&&this.options.ecmaVersion>=9&&((S=l===80)||l===112)){i.lastIntValue=-1,i.advance();var N;if(i.eat(123)&&(N=this.regexp_eatUnicodePropertyValueExpression(i))&&i.eat(125))return S&&N===_e&&i.raise("Invalid property name"),N;i.raise("Invalid property name")}return Ge};function ti(i){return i===100||i===68||i===115||i===83||i===119||i===87}Pt.regexp_eatUnicodePropertyValueExpression=function(i){var l=i.pos;if(this.regexp_eatUnicodePropertyName(i)&&i.eat(61)){var S=i.lastStringValue;if(this.regexp_eatUnicodePropertyValue(i)){var N=i.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(i,S,N),Oe}}if(i.pos=l,this.regexp_eatLoneUnicodePropertyNameOrValue(i)){var W=i.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(i,W)}return Ge},Pt.regexp_validateUnicodePropertyNameAndValue=function(i,l,S){_t(i.unicodeProperties.nonBinary,l)||i.raise("Invalid property name"),i.unicodeProperties.nonBinary[l].test(S)||i.raise("Invalid property value")},Pt.regexp_validateUnicodePropertyNameOrValue=function(i,l){if(i.unicodeProperties.binary.test(l))return Oe;if(i.switchV&&i.unicodeProperties.binaryOfStrings.test(l))return _e;i.raise("Invalid property name")},Pt.regexp_eatUnicodePropertyName=function(i){var l=0;for(i.lastStringValue="";ze(l=i.current());)i.lastStringValue+=se(l),i.advance();return i.lastStringValue!==""};function ze(i){return Fe(i)||i===95}Pt.regexp_eatUnicodePropertyValue=function(i){var l=0;for(i.lastStringValue="";We(l=i.current());)i.lastStringValue+=se(l),i.advance();return i.lastStringValue!==""};function We(i){return ze(i)||Yi(i)}Pt.regexp_eatLoneUnicodePropertyNameOrValue=function(i){return this.regexp_eatUnicodePropertyValue(i)},Pt.regexp_eatCharacterClass=function(i){if(i.eat(91)){var l=i.eat(94),S=this.regexp_classContents(i);return i.eat(93)||i.raise("Unterminated character class"),l&&S===_e&&i.raise("Negated character class may contain strings"),!0}return!1},Pt.regexp_classContents=function(i){return i.current()===93?Oe:i.switchV?this.regexp_classSetExpression(i):(this.regexp_nonEmptyClassRanges(i),Oe)},Pt.regexp_nonEmptyClassRanges=function(i){for(;this.regexp_eatClassAtom(i);){var l=i.lastIntValue;if(i.eat(45)&&this.regexp_eatClassAtom(i)){var S=i.lastIntValue;i.switchU&&(l===-1||S===-1)&&i.raise("Invalid character class"),l!==-1&&S!==-1&&l>S&&i.raise("Range out of order in character class")}}},Pt.regexp_eatClassAtom=function(i){var l=i.pos;if(i.eat(92)){if(this.regexp_eatClassEscape(i))return!0;if(i.switchU){var S=i.current();(S===99||zr(S))&&i.raise("Invalid class escape"),i.raise("Invalid escape")}i.pos=l}var N=i.current();return N!==93?(i.lastIntValue=N,i.advance(),!0):!1},Pt.regexp_eatClassEscape=function(i){var l=i.pos;if(i.eat(98))return i.lastIntValue=8,!0;if(i.switchU&&i.eat(45))return i.lastIntValue=45,!0;if(!i.switchU&&i.eat(99)){if(this.regexp_eatClassControlLetter(i))return!0;i.pos=l}return this.regexp_eatCharacterClassEscape(i)||this.regexp_eatCharacterEscape(i)},Pt.regexp_classSetExpression=function(i){var l=Oe,S;if(!this.regexp_eatClassSetRange(i))if(S=this.regexp_eatClassSetOperand(i)){S===_e&&(l=_e);for(var N=i.pos;i.eatChars([38,38]);){if(i.current()!==38&&(S=this.regexp_eatClassSetOperand(i))){S!==_e&&(l=Oe);continue}i.raise("Invalid character in character class")}if(N!==i.pos)return l;for(;i.eatChars([45,45]);)this.regexp_eatClassSetOperand(i)||i.raise("Invalid character in character class");if(N!==i.pos)return l}else i.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(i)){if(S=this.regexp_eatClassSetOperand(i),!S)return l;S===_e&&(l=_e)}},Pt.regexp_eatClassSetRange=function(i){var l=i.pos;if(this.regexp_eatClassSetCharacter(i)){var S=i.lastIntValue;if(i.eat(45)&&this.regexp_eatClassSetCharacter(i)){var N=i.lastIntValue;return S!==-1&&N!==-1&&S>N&&i.raise("Range out of order in character class"),!0}i.pos=l}return!1},Pt.regexp_eatClassSetOperand=function(i){return this.regexp_eatClassSetCharacter(i)?Oe:this.regexp_eatClassStringDisjunction(i)||this.regexp_eatNestedClass(i)},Pt.regexp_eatNestedClass=function(i){var l=i.pos;if(i.eat(91)){var S=i.eat(94),N=this.regexp_classContents(i);if(i.eat(93))return S&&N===_e&&i.raise("Negated character class may contain strings"),N;i.pos=l}if(i.eat(92)){var W=this.regexp_eatCharacterClassEscape(i);if(W)return W;i.pos=l}return null},Pt.regexp_eatClassStringDisjunction=function(i){var l=i.pos;if(i.eatChars([92,113])){if(i.eat(123)){var S=this.regexp_classStringDisjunctionContents(i);if(i.eat(125))return S}else i.raise("Invalid escape");i.pos=l}return null},Pt.regexp_classStringDisjunctionContents=function(i){for(var l=this.regexp_classString(i);i.eat(124);)this.regexp_classString(i)===_e&&(l=_e);return l},Pt.regexp_classString=function(i){for(var l=0;this.regexp_eatClassSetCharacter(i);)l++;return l===1?Oe:_e},Pt.regexp_eatClassSetCharacter=function(i){var l=i.pos;if(i.eat(92))return this.regexp_eatCharacterEscape(i)||this.regexp_eatClassSetReservedPunctuator(i)?!0:i.eat(98)?(i.lastIntValue=8,!0):(i.pos=l,!1);var S=i.current();return S<0||S===i.lookahead()&&vi(S)||ei(S)?!1:(i.advance(),i.lastIntValue=S,!0)};function vi(i){return i===33||i>=35&&i<=38||i>=42&&i<=44||i===46||i>=58&&i<=64||i===94||i===96||i===126}function ei(i){return i===40||i===41||i===45||i===47||i>=91&&i<=93||i>=123&&i<=125}Pt.regexp_eatClassSetReservedPunctuator=function(i){var l=i.current();return _r(l)?(i.lastIntValue=l,i.advance(),!0):!1};function _r(i){return i===33||i===35||i===37||i===38||i===44||i===45||i>=58&&i<=62||i===64||i===96||i===126}Pt.regexp_eatClassControlLetter=function(i){var l=i.current();return Yi(l)||l===95?(i.lastIntValue=l%32,i.advance(),!0):!1},Pt.regexp_eatHexEscapeSequence=function(i){var l=i.pos;if(i.eat(120)){if(this.regexp_eatFixedHexDigits(i,2))return!0;i.switchU&&i.raise("Invalid escape"),i.pos=l}return!1},Pt.regexp_eatDecimalDigits=function(i){var l=i.pos,S=0;for(i.lastIntValue=0;Yi(S=i.current());)i.lastIntValue=10*i.lastIntValue+(S-48),i.advance();return i.pos!==l};function Yi(i){return i>=48&&i<=57}Pt.regexp_eatHexDigits=function(i){var l=i.pos,S=0;for(i.lastIntValue=0;Rr(S=i.current());)i.lastIntValue=16*i.lastIntValue+Fr(S),i.advance();return i.pos!==l};function Rr(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102}function Fr(i){return i>=65&&i<=70?10+(i-65):i>=97&&i<=102?10+(i-97):i-48}Pt.regexp_eatLegacyOctalEscapeSequence=function(i){if(this.regexp_eatOctalDigit(i)){var l=i.lastIntValue;if(this.regexp_eatOctalDigit(i)){var S=i.lastIntValue;l<=3&&this.regexp_eatOctalDigit(i)?i.lastIntValue=l*64+S*8+i.lastIntValue:i.lastIntValue=l*8+S}else i.lastIntValue=l;return!0}return!1},Pt.regexp_eatOctalDigit=function(i){var l=i.current();return zr(l)?(i.lastIntValue=l-48,i.advance(),!0):(i.lastIntValue=0,!1)};function zr(i){return i>=48&&i<=55}Pt.regexp_eatFixedHexDigits=function(i,l){var S=i.pos;i.lastIntValue=0;for(var N=0;N<l;++N){var W=i.current();if(!Rr(W))return i.pos=S,!1;i.lastIntValue=16*i.lastIntValue+Fr(W),i.advance()}return!0};var Ki=function(l){this.type=l.type,this.value=l.value,this.start=l.start,this.end=l.end,l.options.locations&&(this.loc=new Ve(l,l.startLoc,l.endLoc)),l.options.ranges&&(this.range=[l.start,l.end])},Zt=t.prototype;Zt.next=function(i){!i&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ki(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Zt.getToken=function(){return this.next(),new Ki(this)},typeof Symbol<"u"&&(Zt[Symbol.iterator]=function(){var i=this;return{next:function(){var l=i.getToken();return{done:l.type===T.eof,value:l}}}}),Zt.nextToken=function(){var i=this.curContext();if((!i||!i.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(T.eof);if(i.override)return i.override(this);this.readToken(this.fullCharCodeAtPos())},Zt.readToken=function(i){return at(i,this.options.ecmaVersion>=6)||i===92?this.readWord():this.getTokenFromCode(i)},Zt.fullCharCodeAtPos=function(){var i=this.input.charCodeAt(this.pos);if(i<=55295||i>=56320)return i;var l=this.input.charCodeAt(this.pos+1);return l<=56319||l>=57344?i:(i<<10)+l-56613888},Zt.skipBlockComment=function(){var i=this.options.onComment&&this.curPosition(),l=this.pos,S=this.input.indexOf("*/",this.pos+=2);if(S===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=S+2,this.options.locations)for(var N=void 0,W=l;(N=Ft(this.input,W,this.pos))>-1;)++this.curLine,W=this.lineStart=N;this.options.onComment&&this.options.onComment(!0,this.input.slice(l+2,S),l,this.pos,i,this.curPosition())},Zt.skipLineComment=function(i){for(var l=this.pos,S=this.options.onComment&&this.curPosition(),N=this.input.charCodeAt(this.pos+=i);this.pos<this.input.length&&!vt(N);)N=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(l+i,this.pos),l,this.pos,S,this.curPosition())},Zt.skipSpace=function(){t:for(;this.pos<this.input.length;){var i=this.input.charCodeAt(this.pos);switch(i){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(i>8&&i<14||i>=5760&&Wt.test(String.fromCharCode(i)))++this.pos;else break t}}},Zt.finishToken=function(i,l){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var S=this.type;this.type=i,this.value=l,this.updateContext(S)},Zt.readToken_dot=function(){var i=this.input.charCodeAt(this.pos+1);if(i>=48&&i<=57)return this.readNumber(!0);var l=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&i===46&&l===46?(this.pos+=3,this.finishToken(T.ellipsis)):(++this.pos,this.finishToken(T.dot))},Zt.readToken_slash=function(){var i=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):i===61?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},Zt.readToken_mult_modulo_exp=function(i){var l=this.input.charCodeAt(this.pos+1),S=1,N=i===42?T.star:T.modulo;return this.options.ecmaVersion>=7&&i===42&&l===42&&(++S,N=T.starstar,l=this.input.charCodeAt(this.pos+2)),l===61?this.finishOp(T.assign,S+1):this.finishOp(N,S)},Zt.readToken_pipe_amp=function(i){var l=this.input.charCodeAt(this.pos+1);if(l===i){if(this.options.ecmaVersion>=12){var S=this.input.charCodeAt(this.pos+2);if(S===61)return this.finishOp(T.assign,3)}return this.finishOp(i===124?T.logicalOR:T.logicalAND,2)}return l===61?this.finishOp(T.assign,2):this.finishOp(i===124?T.bitwiseOR:T.bitwiseAND,1)},Zt.readToken_caret=function(){var i=this.input.charCodeAt(this.pos+1);return i===61?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},Zt.readToken_plus_min=function(i){var l=this.input.charCodeAt(this.pos+1);return l===i?l===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||xt.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(T.incDec,2):l===61?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},Zt.readToken_lt_gt=function(i){var l=this.input.charCodeAt(this.pos+1),S=1;return l===i?(S=i===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+S)===61?this.finishOp(T.assign,S+1):this.finishOp(T.bitShift,S)):l===33&&i===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(l===61&&(S=2),this.finishOp(T.relational,S))},Zt.readToken_eq_excl=function(i){var l=this.input.charCodeAt(this.pos+1);return l===61?this.finishOp(T.equality,this.input.charCodeAt(this.pos+2)===61?3:2):i===61&&l===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(T.arrow)):this.finishOp(i===61?T.eq:T.prefix,1)},Zt.readToken_question=function(){var i=this.options.ecmaVersion;if(i>=11){var l=this.input.charCodeAt(this.pos+1);if(l===46){var S=this.input.charCodeAt(this.pos+2);if(S<48||S>57)return this.finishOp(T.questionDot,2)}if(l===63){if(i>=12){var N=this.input.charCodeAt(this.pos+2);if(N===61)return this.finishOp(T.assign,3)}return this.finishOp(T.coalesce,2)}}return this.finishOp(T.question,1)},Zt.readToken_numberSign=function(){var i=this.options.ecmaVersion,l=35;if(i>=13&&(++this.pos,l=this.fullCharCodeAtPos(),at(l,!0)||l===92))return this.finishToken(T.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+se(l)+"'")},Zt.getTokenFromCode=function(i){switch(i){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(T.parenL);case 41:return++this.pos,this.finishToken(T.parenR);case 59:return++this.pos,this.finishToken(T.semi);case 44:return++this.pos,this.finishToken(T.comma);case 91:return++this.pos,this.finishToken(T.bracketL);case 93:return++this.pos,this.finishToken(T.bracketR);case 123:return++this.pos,this.finishToken(T.braceL);case 125:return++this.pos,this.finishToken(T.braceR);case 58:return++this.pos,this.finishToken(T.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(T.backQuote);case 48:var l=this.input.charCodeAt(this.pos+1);if(l===120||l===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(l===111||l===79)return this.readRadixNumber(8);if(l===98||l===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(i);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(i);case 124:case 38:return this.readToken_pipe_amp(i);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(i);case 60:case 62:return this.readToken_lt_gt(i);case 61:case 33:return this.readToken_eq_excl(i);case 63:return this.readToken_question();case 126:return this.finishOp(T.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+se(i)+"'")},Zt.finishOp=function(i,l){var S=this.input.slice(this.pos,this.pos+l);return this.pos+=l,this.finishToken(i,S)},Zt.readRegexp=function(){for(var i,l,S=this.pos;;){this.pos>=this.input.length&&this.raise(S,"Unterminated regular expression");var N=this.input.charAt(this.pos);if(xt.test(N)&&this.raise(S,"Unterminated regular expression"),i)i=!1;else{if(N==="[")l=!0;else if(N==="]"&&l)l=!1;else if(N==="/"&&!l)break;i=N==="\\"}++this.pos}var W=this.input.slice(S,this.pos);++this.pos;var rt=this.pos,ut=this.readWord1();this.containsEsc&&this.unexpected(rt);var bt=this.regexpState||(this.regexpState=new oe(this));bt.reset(S,W,ut),this.validateRegExpFlags(bt),this.validateRegExpPattern(bt);var Tt=null;try{Tt=new RegExp(W,ut)}catch{}return this.finishToken(T.regexp,{pattern:W,flags:ut,value:Tt})},Zt.readInt=function(i,l,S){for(var N=this.options.ecmaVersion>=12&&l===void 0,W=S&&this.input.charCodeAt(this.pos)===48,rt=this.pos,ut=0,bt=0,Tt=0,Gt=l??1/0;Tt<Gt;++Tt,++this.pos){var Xt=this.input.charCodeAt(this.pos),Se=void 0;if(N&&Xt===95){W&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),bt===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),Tt===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),bt=Xt;continue}if(Xt>=97?Se=Xt-97+10:Xt>=65?Se=Xt-65+10:Xt>=48&&Xt<=57?Se=Xt-48:Se=1/0,Se>=i)break;bt=Xt,ut=ut*i+Se}return N&&bt===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===rt||l!=null&&this.pos-rt!==l?null:ut};function Dr(i,l){return l?parseInt(i,8):parseFloat(i.replace(/_/g,""))}function Qi(i){return typeof BigInt!="function"?null:BigInt(i.replace(/_/g,""))}Zt.readRadixNumber=function(i){var l=this.pos;this.pos+=2;var S=this.readInt(i);return S==null&&this.raise(this.start+2,"Expected number in radix "+i),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(S=Qi(this.input.slice(l,this.pos)),++this.pos):at(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(T.num,S)},Zt.readNumber=function(i){var l=this.pos;!i&&this.readInt(10,void 0,!0)===null&&this.raise(l,"Invalid number");var S=this.pos-l>=2&&this.input.charCodeAt(l)===48;S&&this.strict&&this.raise(l,"Invalid number");var N=this.input.charCodeAt(this.pos);if(!S&&!i&&this.options.ecmaVersion>=11&&N===110){var W=Qi(this.input.slice(l,this.pos));return++this.pos,at(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(T.num,W)}S&&/[89]/.test(this.input.slice(l,this.pos))&&(S=!1),N===46&&!S&&(++this.pos,this.readInt(10),N=this.input.charCodeAt(this.pos)),(N===69||N===101)&&!S&&(N=this.input.charCodeAt(++this.pos),(N===43||N===45)&&++this.pos,this.readInt(10)===null&&this.raise(l,"Invalid number")),at(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var rt=Dr(this.input.slice(l,this.pos),S);return this.finishToken(T.num,rt)},Zt.readCodePoint=function(){var i=this.input.charCodeAt(this.pos),l;if(i===123){this.options.ecmaVersion<6&&this.unexpected();var S=++this.pos;l=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,l>1114111&&this.invalidStringToken(S,"Code point out of bounds")}else l=this.readHexChar(4);return l},Zt.readString=function(i){for(var l="",S=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var N=this.input.charCodeAt(this.pos);if(N===i)break;N===92?(l+=this.input.slice(S,this.pos),l+=this.readEscapedChar(!1),S=this.pos):N===8232||N===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(vt(N)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return l+=this.input.slice(S,this.pos++),this.finishToken(T.string,l)};var Ji={};Zt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(i){if(i===Ji)this.readInvalidTemplateToken();else throw i}this.inTemplateElement=!1},Zt.invalidStringToken=function(i,l){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ji;this.raise(i,l)},Zt.readTmplToken=function(){for(var i="",l=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var S=this.input.charCodeAt(this.pos);if(S===96||S===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===T.template||this.type===T.invalidTemplate)?S===36?(this.pos+=2,this.finishToken(T.dollarBraceL)):(++this.pos,this.finishToken(T.backQuote)):(i+=this.input.slice(l,this.pos),this.finishToken(T.template,i));if(S===92)i+=this.input.slice(l,this.pos),i+=this.readEscapedChar(!0),l=this.pos;else if(vt(S)){switch(i+=this.input.slice(l,this.pos),++this.pos,S){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:i+=`
5
- `;break;default:i+=String.fromCharCode(S);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),l=this.pos}else++this.pos}},Zt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(T.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Zt.readEscapedChar=function(i){var l=this.input.charCodeAt(++this.pos);switch(++this.pos,l){case 110:return`
6
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return se(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),i){var S=this.pos-1;this.invalidStringToken(S,"Invalid escape sequence in template string")}default:if(l>=48&&l<=55){var N=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],W=parseInt(N,8);return W>255&&(N=N.slice(0,-1),W=parseInt(N,8)),this.pos+=N.length-1,l=this.input.charCodeAt(this.pos),(N!=="0"||l===56||l===57)&&(this.strict||i)&&this.invalidStringToken(this.pos-1-N.length,i?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(W)}return vt(l)?"":String.fromCharCode(l)}},Zt.readHexChar=function(i){var l=this.pos,S=this.readInt(16,i);return S===null&&this.invalidStringToken(l,"Bad character escape sequence"),S},Zt.readWord1=function(){this.containsEsc=!1;for(var i="",l=!0,S=this.pos,N=this.options.ecmaVersion>=6;this.pos<this.input.length;){var W=this.fullCharCodeAtPos();if(G(W,N))this.pos+=W<=65535?1:2;else if(W===92){this.containsEsc=!0,i+=this.input.slice(S,this.pos);var rt=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var ut=this.readCodePoint();(l?at:G)(ut,N)||this.invalidStringToken(rt,"Invalid Unicode escape"),i+=se(ut),S=this.pos}else break;l=!1}return i+this.input.slice(S,this.pos)},Zt.readWord=function(){var i=this.readWord1(),l=T.name;return this.keywords.test(i)&&(l=gt[i]),this.finishToken(l,i)};var Ci="8.11.3";t.acorn={Parser:t,version:Ci,defaultOptions:Mt,Position:Ee,SourceLocation:Ve,getLineInfo:Jt,Node:V,TokenType:et,tokTypes:T,keywordTypes:gt,TokContext:k,tokContexts:A,isIdentifierChar:G,isIdentifierStart:at,Token:Ki,isNewLine:vt,lineBreak:xt,lineBreakG:kt,nonASCIIwhitespace:Wt};function ki(i,l){return t.parse(i,l)}function oi(i,l,S){return t.parseExpressionAt(i,l,S)}function ii(i,l){return t.tokenizer(i,l)}a.Node=V,a.Parser=t,a.Position=Ee,a.SourceLocation=Ve,a.TokContext=k,a.Token=Ki,a.TokenType=et,a.defaultOptions=Mt,a.getLineInfo=Jt,a.isIdentifierChar=G,a.isIdentifierStart=at,a.isNewLine=vt,a.keywordTypes=gt,a.lineBreak=xt,a.lineBreakG=kt,a.nonASCIIwhitespace=Wt,a.parse=ki,a.parseExpressionAt=oi,a.tokContexts=A,a.tokTypes=T,a.tokenizer=ii,a.version=Ci})}(pn,pn.exports)),pn.exports}(function(z){(function(n,a){n=n||da;var o=n.window,f=n.document,c=new function(){var t=/^(statics|enumerable|beans|preserve)$/,e=[],r=e.slice,s=Object.create,u=Object.getOwnPropertyDescriptor,h=Object.defineProperty,p=e.forEach||function(x,m){for(var E=0,k=this.length;E<k;E++)x.call(m,this[E],E,this)},d=function(x,m){for(var E in this)this.hasOwnProperty(E)&&x.call(m,this[E],E,this)},_=Object.assign||function(x){for(var m=1,E=arguments.length;m<E;m++){var k=arguments[m];for(var A in k)k.hasOwnProperty(A)&&(x[A]=k[A])}return x},g=function(x,m,E){if(x){var k=u(x,"length");(k&&typeof k.value=="number"?p:d).call(x,m,E=E||x)}return E};function y(x,m,E,k,A){var b={};function C(M,V){V=V||(V=u(m,M))&&(V.get?V:V.value),typeof V=="string"&&V[0]==="#"&&(V=x[V.substring(1)]||V);var U=typeof V=="function",j=V,Y=A||U&&!V.base?V&&V.get?M in x:x[M]:null,H;(!A||!Y)&&(U&&Y&&(V.base=Y),U&&k!==!1&&(H=M.match(/^([gs]et|is)(([A-Z])(.*))$/))&&(b[H[3].toLowerCase()+H[4]]=H[2]),(!j||U||!j.get||typeof j.get!="function"||!w.isPlainObject(j))&&(j={value:j,writable:!0}),(u(x,M)||{configurable:!0}).configurable&&(j.configurable=!0,j.enumerable=E??!H),h(x,M,j))}if(m){for(var v in m)m.hasOwnProperty(v)&&!t.test(v)&&C(v);for(var v in b){var I=b[v],L=x["set"+I],R=x["get"+I]||L&&x["is"+I];R&&(k===!0||R.length===0)&&C(v,{get:R,set:L})}}return x}function w(){for(var x=0,m=arguments.length;x<m;x++){var E=arguments[x];E&&_(this,E)}return this}return y(w,{inject:function(x){if(x){var m=x.statics===!0?x:x.statics,E=x.beans,k=x.preserve;m!==x&&y(this.prototype,x,x.enumerable,E,k),y(this,m,null,E,k)}for(var A=1,b=arguments.length;A<b;A++)this.inject(arguments[A]);return this},extend:function(){for(var x=this,m,E,k=0,A,b=arguments.length;k<b&&!(m&&E);k++)A=arguments[k],m=m||A.initialize,E=E||A.prototype;return m=m||function(){x.apply(this,arguments)},E=m.prototype=E||s(this.prototype),h(E,"constructor",{value:m,writable:!0,configurable:!0}),y(m,this),arguments.length&&this.inject.apply(m,arguments),m.base=x,m}}).inject({enumerable:!1,initialize:w,set:w,inject:function(){for(var x=0,m=arguments.length;x<m;x++){var E=arguments[x];E&&y(this,E,E.enumerable,E.beans,E.preserve)}return this},extend:function(){var x=s(this);return x.inject.apply(x,arguments)},each:function(x,m){return g(this,x,m)},clone:function(){return new this.constructor(this)},statics:{set:_,each:g,create:s,define:h,describe:u,clone:function(x){return _(new x.constructor,x)},isPlainObject:function(x){var m=x!=null&&x.constructor;return m&&(m===Object||m===w||m.name==="Object")},pick:function(x,m){return x!==a?x:m},slice:function(x,m,E){return r.call(x,m,E)}}})};z.exports=c,c.inject({enumerable:!1,toString:function(){return this._id!=null?(this._class||"Object")+(this._name?" '"+this._name+"'":" @"+this._id):"{ "+c.each(this,function(t,e){if(!/^_/.test(e)){var r=typeof t;this.push(e+": "+(r==="number"?q.instance.number(t):r==="string"?"'"+t+"'":t))}},[]).join(", ")+" }"},getClassName:function(){return this._class||""},importJSON:function(t){return c.importJSON(t,this)},exportJSON:function(t){return c.exportJSON(this,t)},toJSON:function(){return c.serialize(this)},set:function(t,e){return t&&c.filter(this,t,e,this._prioritize),this}},{beans:!1,statics:{exports:{},extend:function t(){var e=t.base.apply(this,arguments),r=e.prototype._class;return r&&!c.exports[r]&&(c.exports[r]=e),e},equals:function(t,e){if(t===e)return!0;if(t&&t.equals)return t.equals(e);if(e&&e.equals)return e.equals(t);if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){var r=t.length;if(r!==e.length)return!1;for(;r--;)if(!c.equals(t[r],e[r]))return!1}else{var s=Object.keys(t),r=s.length;if(r!==Object.keys(e).length)return!1;for(;r--;){var u=s[r];if(!(e.hasOwnProperty(u)&&c.equals(t[u],e[u])))return!1}}return!0}return!1},read:function(t,e,r,s){if(this===c){var u=this.peek(t,e);return t.__index++,u}var h=this.prototype,p=h._readIndex,d=e||p&&t.__index||0,_=t.length,g=t[d];if(s=s||_-d,g instanceof this||r&&r.readNull&&g==null&&s<=1)return p&&(t.__index=d+1),g&&r&&r.clone?g.clone():g;if(g=c.create(h),p&&(g.__read=!0),g=g.initialize.apply(g,d>0||d+s<_?c.slice(t,d,d+s):t)||g,p){t.__index=d+g.__read;var y=g.__filtered;y&&(t.__filtered=y,g.__filtered=a),g.__read=a}return g},peek:function(t,e){return t[t.__index=e||t.__index||0]},remain:function(t){return t.length-(t.__index||0)},readList:function(t,e,r,s){for(var u=[],h,p=e||0,d=s?p+s:t.length,_=p;_<d;_++)u.push(Array.isArray(h=t[_])?this.read(h,0,r):this.read(t,_,r,1));return u},readNamed:function(t,e,r,s,u){var h=this.getNamed(t,e),p=h!==a;if(p){var d=t.__filtered;if(!d){var _=this.getSource(t);d=t.__filtered=c.create(_),d.__unfiltered=_}d[e]=a}return this.read(p?[h]:t,r,s,u)},readSupported:function(t,e){var r=this.getSource(t),s=this,u=!1;return r&&Object.keys(r).forEach(function(h){if(h in e){var p=s.readNamed(t,h);p!==a&&(e[h]=p),u=!0}}),u},getSource:function(t){var e=t.__source;if(e===a){var r=t.length===1&&t[0];e=t.__source=r&&c.isPlainObject(r)?r:null}return e},getNamed:function(t,e){var r=this.getSource(t);if(r)return e?r[e]:t.__filtered||r},hasNamed:function(t,e){return!!this.getNamed(t,e)},filter:function(t,e,r,s){var u;function h(y){if(!(r&&y in r)&&!(u&&y in u)){var w=e[y];w!==a&&(t[y]=w)}}if(s){for(var p={},d=0,_,g=s.length;d<g;d++)(_=s[d])in e&&(h(_),p[_]=!0);u=p}return Object.keys(e.__unfiltered||e).forEach(h),t},isPlainValue:function(t,e){return c.isPlainObject(t)||Array.isArray(t)||e&&typeof t=="string"},serialize:function(t,e,r,s){e=e||{};var u=!s,h;if(u&&(e.formatter=new q(e.precision),s={length:0,definitions:{},references:{},add:function(w,x){var m="#"+w._id,E=this.references[m];if(!E){this.length++;var k=x.call(w),A=w._class;A&&k[0]!==A&&k.unshift(A),this.definitions[m]=k,E=this.references[m]=[m]}return E}}),t&&t._serialize){h=t._serialize(e,s);var p=t._class;p&&!t._compactSerialize&&(u||!r)&&h[0]!==p&&h.unshift(p)}else if(Array.isArray(t)){h=[];for(var d=0,_=t.length;d<_;d++)h[d]=c.serialize(t[d],e,r,s)}else if(c.isPlainObject(t)){h={};for(var g=Object.keys(t),d=0,_=g.length;d<_;d++){var y=g[d];h[y]=c.serialize(t[y],e,r,s)}}else typeof t=="number"?h=e.formatter.number(t,e.precision):h=t;return u&&s.length>0?[["dictionary",s.definitions],h]:h},deserialize:function(t,e,r,s,u){var h=t,p=!r,d=p&&t&&t.length&&t[0][0]==="dictionary";if(r=r||{},Array.isArray(t)){var _=t[0],g=_==="dictionary";if(t.length==1&&/^#/.test(_))return r.dictionary[_];_=c.exports[_],h=[];for(var y=_?1:0,w=t.length;y<w;y++)h.push(c.deserialize(t[y],e,r,g,d));if(_){var x=h;e?h=e(_,x,p||u):h=new _(x)}}else if(c.isPlainObject(t)){h={},s&&(r.dictionary=h);for(var m in t)h[m]=c.deserialize(t[m],e,r)}return d?h[1]:h},exportJSON:function(t,e){var r=c.serialize(t,e);return e&&e.asString==!1?r:JSON.stringify(r)},importJSON:function(t,e){return c.deserialize(typeof t=="string"?JSON.parse(t):t,function(r,s,u){var h=u&&e&&e.constructor===r,p=h?e:c.create(r.prototype);if(s.length===1&&p instanceof T&&(h||!(p instanceof kt))){var d=s[0];c.isPlainObject(d)&&(d.insert=!1,h&&(s=s.concat([T.INSERT])))}return(h?p.set:r).apply(p,s),h&&(e=null),p})},push:function(t,e){var r=e.length;if(r<4096)t.push.apply(t,e);else{var s=t.length;t.length+=r;for(var u=0;u<r;u++)t[s+u]=e[u]}return t},splice:function(t,e,r,s){var u=e&&e.length,h=r===a;r=h?t.length:r,r>t.length&&(r=t.length);for(var p=0;p<u;p++)e[p]._index=r+p;if(h)return c.push(t,e),[];var d=[r,s];e&&c.push(d,e);for(var _=t.splice.apply(t,d),p=0,g=_.length;p<g;p++)_[p]._index=a;for(var p=r+u,g=t.length;p<g;p++)t[p]._index=p;return _},capitalize:function(t){return t.replace(/\b[a-z]/g,function(e){return e.toUpperCase()})},camelize:function(t){return t.replace(/-(.)/g,function(e,r){return r.toUpperCase()})},hyphenate:function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}});var P={on:function(t,e){if(typeof t!="string")c.each(t,function(h,p){this.on(p,h)},this);else{var r=this._eventTypes,s=r&&r[t],u=this._callbacks=this._callbacks||{};u=u[t]=u[t]||[],u.indexOf(e)===-1&&(u.push(e),s&&s.install&&u.length===1&&s.install.call(this,t))}return this},off:function(t,e){if(typeof t!="string"){c.each(t,function(p,d){this.off(d,p)},this);return}var r=this._eventTypes,s=r&&r[t],u=this._callbacks&&this._callbacks[t],h;return u&&(!e||(h=u.indexOf(e))!==-1&&u.length===1?(s&&s.uninstall&&s.uninstall.call(this,t),delete this._callbacks[t]):h!==-1&&u.splice(h,1)),this},once:function(t,e){return this.on(t,function r(){e.apply(this,arguments),this.off(t,r)})},emit:function(t,e){var r=this._callbacks&&this._callbacks[t];if(!r)return!1;var s=c.slice(arguments,1),u=e&&e.target&&!e.currentTarget;r=r.slice(),u&&(e.currentTarget=this);for(var h=0,p=r.length;h<p;h++)if(r[h].apply(this,s)==!1){e&&e.stop&&e.stop();break}return u&&delete e.currentTarget,!0},responds:function(t){return!!(this._callbacks&&this._callbacks[t])},attach:"#on",detach:"#off",fire:"#emit",_installEvents:function(t){var e=this._eventTypes,r=this._callbacks,s=t?"install":"uninstall";if(e){for(var u in r)if(r[u].length>0){var h=e[u],p=h&&h[s];p&&p.call(this,u)}}},statics:{inject:function t(e){var r=e._events;if(r){var s={};c.each(r,function(u,h){var p=typeof u=="string",d=p?u:h,_=c.capitalize(d),g=d.substring(2).toLowerCase();s[g]=p?{}:u,d="_"+d,e["get"+_]=function(){return this[d]},e["set"+_]=function(y){var w=this[d];w&&this.off(g,w),y&&this.on(g,y),this[d]=y}}),e._eventTypes=s}return t.base.apply(this,arguments)}}},O=c.extend({_class:"PaperScope",initialize:function t(){jt=this,this.settings=new c({applyMatrix:!0,insertItems:!0,handleSize:4,hitTolerance:0}),this.project=null,this.projects=[],this.tools=[],this._id=t._id++,t._scopes[this._id]=this;var e=t.prototype;if(!this.support){var r=me.getContext(1,1)||{};e.support={nativeDash:"setLineDash"in r||"mozDash"in r,nativeBlendModes:$e.nativeModes},me.release(r)}if(!this.agent){var s=n.navigator.userAgent.toLowerCase(),u=(/(darwin|win|mac|linux|freebsd|sunos)/.exec(s)||[])[0],h=u==="darwin"?"mac":u,p=e.agent=e.browser={platform:h};h&&(p[h]=!0),s.replace(/(opera|chrome|safari|webkit|firefox|msie|trident|atom|node|jsdom)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv\:v?([.\d]+))?/g,function(d,_,g,y,w){if(!p.chrome){var x=_==="opera"?y:/^(node|trident)$/.test(_)?w:g;p.version=x,p.versionNumber=parseFloat(x),_={trident:"msie",jsdom:"node"}[_]||_,p.name=_,p[_]=!0}}),p.chrome&&delete p.webkit,p.atom&&delete p.chrome}},version:"0.12.17",getView:function(){var t=this.project;return t&&t._view},getPaper:function(){return this},execute:function(t,e){var r=jt.PaperScript.execute(t,this,e);return ae.updateFocus(),r},install:function(t){var e=this;c.each(["project","view","tool"],function(s){c.define(t,s,{configurable:!0,get:function(){return e[s]}})});for(var r in this)!/^_/.test(r)&&this[r]&&(t[r]=this[r])},setup:function(t){return jt=this,this.project=new ot(t),this},createCanvas:function(t,e){return me.getCanvas(t,e)},activate:function(){jt=this},clear:function(){for(var t=this.projects,e=this.tools,r=t.length-1;r>=0;r--)t[r].remove();for(var r=e.length-1;r>=0;r--)e[r].remove()},remove:function(){this.clear(),delete O._scopes[this._id]},statics:new function(){function t(e){return e+="Attribute",function(r,s){return r[e](s)||r[e]("data-paper-"+s)}}return{_scopes:{},_id:0,get:function(e){return this._scopes[e]||null},getAttribute:t("get"),hasAttribute:t("has")}}}),D=c.extend(P,{initialize:function(t){this._scope=jt,this._index=this._scope[this._list].push(this)-1,(t||!this._scope[this._reference])&&this.activate()},activate:function(){if(!this._scope)return!1;var t=this._scope[this._reference];return t&&t!==this&&t.emit("deactivate"),this._scope[this._reference]=this,this.emit("activate",t),!0},isActive:function(){return this._scope[this._reference]===this},remove:function(){return this._index==null?!1:(c.splice(this._scope[this._list],null,this._index,1),this._scope[this._reference]==this&&(this._scope[this._reference]=null),this._scope=null,!0)},getView:function(){return this._scope.getView()}}),B={findItemBoundsCollisions:function(t,e,r){function s(p){for(var d=new Array(p.length),_=0;_<p.length;_++){var g=p[_].getBounds();d[_]=[g.left,g.top,g.right,g.bottom]}return d}var u=s(t),h=!e||e===t?u:s(e);return this.findBoundsCollisions(u,h,r||0)},findCurveBoundsCollisions:function(t,e,r,s){function u(x){for(var m=Math.min,E=Math.max,k=new Array(x.length),A=0;A<x.length;A++){var b=x[A];k[A]=[m(b[0],b[2],b[4],b[6]),m(b[1],b[3],b[5],b[7]),E(b[0],b[2],b[4],b[6]),E(b[1],b[3],b[5],b[7])]}return k}var h=u(t),p=!e||e===t?h:u(e);if(s){for(var d=this.findBoundsCollisions(h,p,r||0,!1,!0),_=this.findBoundsCollisions(h,p,r||0,!0,!0),g=[],y=0,w=d.length;y<w;y++)g[y]={hor:d[y],ver:_[y]};return g}return this.findBoundsCollisions(h,p,r||0)},findBoundsCollisions:function(t,e,r,s,u){var h=!e||t===e,p=h?t:t.concat(e),d=t.length,_=p.length;function g(yt,St,It){for(var lt=0,ct=yt.length;lt<ct;){var Ct=ct+lt>>>1;p[yt[Ct]][St]<It?lt=Ct+1:ct=Ct}return lt-1}for(var y=s?1:0,w=y+2,x=s?0:1,m=x+2,E=new Array(_),k=0;k<_;k++)E[k]=k;E.sort(function(yt,St){return p[yt][y]-p[St][y]});for(var A=[],b=new Array(d),k=0;k<_;k++){var C=E[k],v=p[C],I=h?C:C-d,L=C<d,R=h||!L,M=L?[]:null;if(A.length){var V=g(A,w,v[y]-r)+1;if(A.splice(0,V),h&&u){M=M.concat(A);for(var U=0;U<A.length;U++){var j=A[U];b[j].push(I)}}else for(var Y=v[m],H=v[x],U=0;U<A.length;U++){var j=A[U],X=p[j],Q=j<d,$=h||j>=d;(u||(L&&$||R&&Q)&&Y>=X[x]-r&&H<=X[m]+r)&&(L&&$&&M.push(h?j:j-d),R&&Q&&b[j].push(I))}}if(L&&(t===e&&M.push(C),b[C]=M),A.length){var tt=v[w],st=g(A,w,tt);A.splice(st+1,0,C)}else A.push(C)}for(var k=0;k<b.length;k++){var mt=b[k];mt&&mt.sort(function(St,It){return St-It})}return b}},q=c.extend({initialize:function(t){this.precision=c.pick(t,5),this.multiplier=Math.pow(10,this.precision)},number:function(t){return this.precision<16?Math.round(t*this.multiplier)/this.multiplier:t},pair:function(t,e,r){return this.number(t)+(r||",")+this.number(e)},point:function(t,e){return this.number(t.x)+(e||",")+this.number(t.y)},size:function(t,e){return this.number(t.width)+(e||",")+this.number(t.height)},rectangle:function(t,e){return this.point(t,e)+(e||",")+this.size(t,e)}});q.instance=new q;var K=new function(){var t=[[.5773502691896257],[0,.7745966692414834],[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],e=[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.09212149983772845,.04048400476531588],[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]],r=Math.abs,s=Math.sqrt,u=Math.pow,h=Math.log2||function(w){return Math.log(w)*Math.LOG2E},p=1e-12,d=112e-18;function _(w,x,m){return w<x?x:w>m?m:w}function g(w,x,m){function E(V){var U=V*134217729,j=V-U,Y=j+U,H=V-Y;return[Y,H]}var k=x*x-w*m,A=x*x+w*m;if(r(k)*3<A){var b=E(w),C=E(x),v=E(m),I=x*x,L=C[0]*C[0]-I+2*C[0]*C[1]+C[1]*C[1],R=w*m,M=b[0]*v[0]-R+b[0]*v[1]+b[1]*v[0]+b[1]*v[1];k=I-R+(L-M)}return k}function y(){var w=Math.max.apply(Math,arguments);return w&&(w<1e-8||w>1e8)?u(2,-Math.round(h(w))):0}return{EPSILON:p,MACHINE_EPSILON:d,CURVETIME_EPSILON:1e-8,GEOMETRIC_EPSILON:1e-7,TRIGONOMETRIC_EPSILON:1e-8,ANGULAR_EPSILON:1e-5,KAPPA:4*(s(2)-1)/3,isZero:function(w){return w>=-p&&w<=p},isMachineZero:function(w){return w>=-d&&w<=d},clamp:_,integrate:function(w,x,m,E){for(var k=t[E-2],A=e[E-2],b=(m-x)*.5,C=b+x,v=0,I=E+1>>1,L=E&1?A[v++]*w(C):0;v<I;){var R=b*k[v];L+=A[v++]*(w(C+R)+w(C-R))}return b*L},findRoot:function(w,x,m,E,k,A,b){for(var C=0;C<A;C++){var v=w(m),I=v/x(m),L=m-I;if(r(I)<b){m=L;break}v>0?(k=m,m=L<=E?(E+k)*.5:L):(E=m,m=L>=k?(E+k)*.5:L)}return _(m,E,k)},solveQuadratic:function(w,x,m,E,k,A){var b,C=1/0;if(r(w)<p){if(r(x)<p)return r(m)<p?-1:0;b=-m/x}else{x*=-.5;var v=g(w,x,m);if(v&&r(v)<d){var I=y(r(w),r(x),r(m));I&&(w*=I,x*=I,m*=I,v=g(w,x,m))}if(v>=-d){var L=v<0?0:s(v),R=x+(x<0?-L:L);R===0?(b=m/w,C=-b):(b=R/w,C=m/R)}}var M=0,V=k==null,U=k-p,j=A+p;return isFinite(b)&&(V||b>U&&b<j)&&(E[M++]=V?b:_(b,k,A)),C!==b&&isFinite(C)&&(V||C>U&&C<j)&&(E[M++]=V?C:_(C,k,A)),M},solveCubic:function(w,x,m,E,k,A,b){var C=y(r(w),r(x),r(m),r(E)),v,I,L,R,M;C&&(w*=C,x*=C,m*=C,E*=C);function V(st){v=st;var mt=w*v;I=mt+x,L=I*v+m,R=(mt+I)*v+L,M=L*v+E}if(r(w)<p)w=x,I=m,L=E,v=1/0;else if(r(E)<p)I=x,L=m,v=0;else{V(-(x/w)/3);var U=M/w,j=u(r(U),1/3),Y=U<0?-1:1,H=-R/w,X=H>0?1.324717957244746*Math.max(j,s(H)):j,Q=v-Y*X;if(Q!==v){do V(Q),Q=R===0?v:v-M/R/(1+d);while(Y*Q>Y*v);r(w)*v*v>r(E/v)&&(L=-E/v,I=(L-m)/v)}}var $=K.solveQuadratic(w,I,L,k,A,b),tt=A==null;return isFinite(v)&&($===0||$>0&&v!==k[0]&&v!==k[1])&&(tt||v>A-p&&v<b+p)&&(k[$++]=tt?v:_(v,A,b)),$}}},it={_id:1,_pools:{},get:function(t){if(t){var e=this._pools[t];return e||(e=this._pools[t]={_id:1}),e._id++}else return this._id++}},F=c.extend({_class:"Point",_readIndex:!0,initialize:function(e,r){var s=typeof e,u=this.__read,h=0;if(s==="number"){var p=typeof r=="number";this._set(e,p?r:e),u&&(h=p?2:1)}else if(s==="undefined"||e===null)this._set(0,0),u&&(h=e===null?1:0);else{var d=s==="string"?e.split(/[\s,]+/)||[]:e;h=1,Array.isArray(d)?this._set(+d[0],+(d.length>1?d[1]:d[0])):"x"in d?this._set(d.x||0,d.y||0):"width"in d?this._set(d.width||0,d.height||0):"angle"in d?(this._set(d.length||0,0),this.setAngle(d.angle||0)):(this._set(0,0),h=0)}return u&&(this.__read=h),this},set:"#initialize",_set:function(t,e){return this.x=t,this.y=e,this},equals:function(t){return this===t||t&&(this.x===t.x&&this.y===t.y||Array.isArray(t)&&this.x===t[0]&&this.y===t[1])||!1},clone:function(){return new F(this.x,this.y)},toString:function(){var t=q.instance;return"{ x: "+t.number(this.x)+", y: "+t.number(this.y)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.x),e.number(this.y)]},getLength:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},setLength:function(t){if(this.isZero()){var e=this._angle||0;this._set(Math.cos(e)*t,Math.sin(e)*t)}else{var r=t/this.getLength();K.isZero(r)&&this.getAngle(),this._set(this.x*r,this.y*r)}},getAngle:function(){return this.getAngleInRadians.apply(this,arguments)*180/Math.PI},setAngle:function(t){this.setAngleInRadians.call(this,t*Math.PI/180)},getAngleInDegrees:"#getAngle",setAngleInDegrees:"#setAngle",getAngleInRadians:function(){if(arguments.length){var t=F.read(arguments),e=this.getLength()*t.getLength();if(K.isZero(e))return NaN;var r=this.dot(t)/e;return Math.acos(r<-1?-1:r>1?1:r)}else return this.isZero()?this._angle||0:this._angle=Math.atan2(this.y,this.x)},setAngleInRadians:function(t){if(this._angle=t,!this.isZero()){var e=this.getLength();this._set(Math.cos(t)*e,Math.sin(t)*e)}},getQuadrant:function(){return this.x>=0?this.y>=0?1:4:this.y>=0?2:3}},{beans:!1,getDirectedAngle:function(){var t=F.read(arguments);return Math.atan2(this.cross(t),this.dot(t))*180/Math.PI},getDistance:function(){var t=arguments,e=F.read(t),r=e.x-this.x,s=e.y-this.y,u=r*r+s*s,h=c.read(t);return h?u:Math.sqrt(u)},normalize:function(t){t===a&&(t=1);var e=this.getLength(),r=e!==0?t/e:0,s=new F(this.x*r,this.y*r);return r>=0&&(s._angle=this._angle),s},rotate:function(t,e){if(t===0)return this.clone();t=t*Math.PI/180;var r=e?this.subtract(e):this,s=Math.sin(t),u=Math.cos(t);return r=new F(r.x*u-r.y*s,r.x*s+r.y*u),e?r.add(e):r},transform:function(t){return t?t._transformPoint(this):this},add:function(){var t=F.read(arguments);return new F(this.x+t.x,this.y+t.y)},subtract:function(){var t=F.read(arguments);return new F(this.x-t.x,this.y-t.y)},multiply:function(){var t=F.read(arguments);return new F(this.x*t.x,this.y*t.y)},divide:function(){var t=F.read(arguments);return new F(this.x/t.x,this.y/t.y)},modulo:function(){var t=F.read(arguments);return new F(this.x%t.x,this.y%t.y)},negate:function(){return new F(-this.x,-this.y)},isInside:function(){return nt.read(arguments).contains(this)},isClose:function(){var t=arguments,e=F.read(t),r=c.read(t);return this.getDistance(e)<=r},isCollinear:function(){var t=F.read(arguments);return F.isCollinear(this.x,this.y,t.x,t.y)},isColinear:"#isCollinear",isOrthogonal:function(){var t=F.read(arguments);return F.isOrthogonal(this.x,this.y,t.x,t.y)},isZero:function(){var t=K.isZero;return t(this.x)&&t(this.y)},isNaN:function(){return isNaN(this.x)||isNaN(this.y)},isInQuadrant:function(t){return this.x*(t>1&&t<4?-1:1)>=0&&this.y*(t>2?-1:1)>=0},dot:function(){var t=F.read(arguments);return this.x*t.x+this.y*t.y},cross:function(){var t=F.read(arguments);return this.x*t.y-this.y*t.x},project:function(){var t=F.read(arguments),e=t.isZero()?0:this.dot(t)/t.dot(t);return new F(t.x*e,t.y*e)},statics:{min:function(){var t=arguments,e=F.read(t),r=F.read(t);return new F(Math.min(e.x,r.x),Math.min(e.y,r.y))},max:function(){var t=arguments,e=F.read(t),r=F.read(t);return new F(Math.max(e.x,r.x),Math.max(e.y,r.y))},random:function(){return new F(Math.random(),Math.random())},isCollinear:function(t,e,r,s){return Math.abs(t*s-e*r)<=Math.sqrt((t*t+e*e)*(r*r+s*s))*1e-8},isOrthogonal:function(t,e,r,s){return Math.abs(t*r+e*s)<=Math.sqrt((t*t+e*e)*(r*r+s*s))*1e-8}}},c.each(["round","ceil","floor","abs"],function(t){var e=Math[t];this[t]=function(){return new F(e(this.x),e(this.y))}},{})),at=F.extend({initialize:function(e,r,s,u){this._x=e,this._y=r,this._owner=s,this._setter=u},_set:function(t,e,r){return this._x=t,this._y=e,r||this._owner[this._setter](this),this},getX:function(){return this._x},setX:function(t){this._x=t,this._owner[this._setter](this)},getY:function(){return this._y},setY:function(t){this._y=t,this._owner[this._setter](this)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(t){this._owner._changeSelection(this._getSelection(),t)},_getSelection:function(){return this._setter==="setPosition"?4:0}}),G=c.extend({_class:"Size",_readIndex:!0,initialize:function(e,r){var s=typeof e,u=this.__read,h=0;if(s==="number"){var p=typeof r=="number";this._set(e,p?r:e),u&&(h=p?2:1)}else if(s==="undefined"||e===null)this._set(0,0),u&&(h=e===null?1:0);else{var d=s==="string"?e.split(/[\s,]+/)||[]:e;h=1,Array.isArray(d)?this._set(+d[0],+(d.length>1?d[1]:d[0])):"width"in d?this._set(d.width||0,d.height||0):"x"in d?this._set(d.x||0,d.y||0):(this._set(0,0),h=0)}return u&&(this.__read=h),this},set:"#initialize",_set:function(t,e){return this.width=t,this.height=e,this},equals:function(t){return t===this||t&&(this.width===t.width&&this.height===t.height||Array.isArray(t)&&this.width===t[0]&&this.height===t[1])||!1},clone:function(){return new G(this.width,this.height)},toString:function(){var t=q.instance;return"{ width: "+t.number(this.width)+", height: "+t.number(this.height)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.width),e.number(this.height)]},add:function(){var t=G.read(arguments);return new G(this.width+t.width,this.height+t.height)},subtract:function(){var t=G.read(arguments);return new G(this.width-t.width,this.height-t.height)},multiply:function(){var t=G.read(arguments);return new G(this.width*t.width,this.height*t.height)},divide:function(){var t=G.read(arguments);return new G(this.width/t.width,this.height/t.height)},modulo:function(){var t=G.read(arguments);return new G(this.width%t.width,this.height%t.height)},negate:function(){return new G(-this.width,-this.height)},isZero:function(){var t=K.isZero;return t(this.width)&&t(this.height)},isNaN:function(){return isNaN(this.width)||isNaN(this.height)},statics:{min:function(t,e){return new G(Math.min(t.width,e.width),Math.min(t.height,e.height))},max:function(t,e){return new G(Math.max(t.width,e.width),Math.max(t.height,e.height))},random:function(){return new G(Math.random(),Math.random())}}},c.each(["round","ceil","floor","abs"],function(t){var e=Math[t];this[t]=function(){return new G(e(this.width),e(this.height))}},{})),et=G.extend({initialize:function(e,r,s,u){this._width=e,this._height=r,this._owner=s,this._setter=u},_set:function(t,e,r){return this._width=t,this._height=e,r||this._owner[this._setter](this),this},getWidth:function(){return this._width},setWidth:function(t){this._width=t,this._owner[this._setter](this)},getHeight:function(){return this._height},setHeight:function(t){this._height=t,this._owner[this._setter](this)}}),nt=c.extend({_class:"Rectangle",_readIndex:!0,beans:!0,initialize:function(e,r,s,u){var h=arguments,p=typeof e,d;if(p==="number"?(this._set(e,r,s,u),d=4):p==="undefined"||e===null?(this._set(0,0,0,0),d=e===null?1:0):h.length===1&&(Array.isArray(e)?(this._set.apply(this,e),d=1):e.x!==a||e.width!==a?(this._set(e.x||0,e.y||0,e.width||0,e.height||0),d=1):e.from===a&&e.to===a&&(this._set(0,0,0,0),c.readSupported(h,this)&&(d=1))),d===a){var _=F.readNamed(h,"from"),g=c.peek(h),y=_.x,w=_.y,x,m;if(g&&g.x!==a||c.hasNamed(h,"to")){var E=F.readNamed(h,"to");x=E.x-y,m=E.y-w,x<0&&(y=E.x,x=-x),m<0&&(w=E.y,m=-m)}else{var k=G.read(h);x=k.width,m=k.height}this._set(y,w,x,m),d=h.__index}var A=h.__filtered;return A&&(this.__filtered=A),this.__read&&(this.__read=d),this},set:"#initialize",_set:function(t,e,r,s){return this.x=t,this.y=e,this.width=r,this.height=s,this},clone:function(){return new nt(this.x,this.y,this.width,this.height)},equals:function(t){var e=c.isPlainValue(t)?nt.read(arguments):t;return e===this||e&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height||!1},toString:function(){var t=q.instance;return"{ x: "+t.number(this.x)+", y: "+t.number(this.y)+", width: "+t.number(this.width)+", height: "+t.number(this.height)+" }"},_serialize:function(t){var e=t.formatter;return[e.number(this.x),e.number(this.y),e.number(this.width),e.number(this.height)]},getPoint:function(t){var e=t?F:at;return new e(this.x,this.y,this,"setPoint")},setPoint:function(){var t=F.read(arguments);this.x=t.x,this.y=t.y},getSize:function(t){var e=t?G:et;return new e(this.width,this.height,this,"setSize")},_fw:1,_fh:1,setSize:function(){var t=G.read(arguments),e=this._sx,r=this._sy,s=t.width,u=t.height;e&&(this.x+=(this.width-s)*e),r&&(this.y+=(this.height-u)*r),this.width=s,this.height=u,this._fw=this._fh=1},getLeft:function(){return this.x},setLeft:function(t){if(!this._fw){var e=t-this.x;this.width-=this._sx===.5?e*2:e}this.x=t,this._sx=this._fw=0},getTop:function(){return this.y},setTop:function(t){if(!this._fh){var e=t-this.y;this.height-=this._sy===.5?e*2:e}this.y=t,this._sy=this._fh=0},getRight:function(){return this.x+this.width},setRight:function(t){if(!this._fw){var e=t-this.x;this.width=this._sx===.5?e*2:e}this.x=t-this.width,this._sx=1,this._fw=0},getBottom:function(){return this.y+this.height},setBottom:function(t){if(!this._fh){var e=t-this.y;this.height=this._sy===.5?e*2:e}this.y=t-this.height,this._sy=1,this._fh=0},getCenterX:function(){return this.x+this.width/2},setCenterX:function(t){this._fw||this._sx===.5?this.x=t-this.width/2:(this._sx&&(this.x+=(t-this.x)*2*this._sx),this.width=(t-this.x)*2),this._sx=.5,this._fw=0},getCenterY:function(){return this.y+this.height/2},setCenterY:function(t){this._fh||this._sy===.5?this.y=t-this.height/2:(this._sy&&(this.y+=(t-this.y)*2*this._sy),this.height=(t-this.y)*2),this._sy=.5,this._fh=0},getCenter:function(t){var e=t?F:at;return new e(this.getCenterX(),this.getCenterY(),this,"setCenter")},setCenter:function(){var t=F.read(arguments);return this.setCenterX(t.x),this.setCenterY(t.y),this},getArea:function(){return this.width*this.height},isEmpty:function(){return this.width===0||this.height===0},contains:function(t){return t&&t.width!==a||(Array.isArray(t)?t:arguments).length===4?this._containsRectangle(nt.read(arguments)):this._containsPoint(F.read(arguments))},_containsPoint:function(t){var e=t.x,r=t.y;return e>=this.x&&r>=this.y&&e<=this.x+this.width&&r<=this.y+this.height},_containsRectangle:function(t){var e=t.x,r=t.y;return e>=this.x&&r>=this.y&&e+t.width<=this.x+this.width&&r+t.height<=this.y+this.height},intersects:function(){var t=nt.read(arguments),e=c.read(arguments)||0;return t.x+t.width>this.x-e&&t.y+t.height>this.y-e&&t.x<this.x+this.width+e&&t.y<this.y+this.height+e},intersect:function(){var t=nt.read(arguments),e=Math.max(this.x,t.x),r=Math.max(this.y,t.y),s=Math.min(this.x+this.width,t.x+t.width),u=Math.min(this.y+this.height,t.y+t.height);return new nt(e,r,s-e,u-r)},unite:function(){var t=nt.read(arguments),e=Math.min(this.x,t.x),r=Math.min(this.y,t.y),s=Math.max(this.x+this.width,t.x+t.width),u=Math.max(this.y+this.height,t.y+t.height);return new nt(e,r,s-e,u-r)},include:function(){var t=F.read(arguments),e=Math.min(this.x,t.x),r=Math.min(this.y,t.y),s=Math.max(this.x+this.width,t.x),u=Math.max(this.y+this.height,t.y);return new nt(e,r,s-e,u-r)},expand:function(){var t=G.read(arguments),e=t.width,r=t.height;return new nt(this.x-e/2,this.y-r/2,this.width+e,this.height+r)},scale:function(t,e){return this.expand(this.width*t-this.width,this.height*(e===a?t:e)-this.height)}},c.each([["Top","Left"],["Top","Right"],["Bottom","Left"],["Bottom","Right"],["Left","Center"],["Top","Center"],["Right","Center"],["Bottom","Center"]],function(t,e){var r=t.join(""),s=/^[RL]/.test(r);e>=4&&(t[1]+=s?"Y":"X");var u=t[s?0:1],h=t[s?1:0],p="get"+u,d="get"+h,_="set"+u,g="set"+h,y="get"+r,w="set"+r;this[y]=function(x){var m=x?F:at;return new m(this[p](),this[d](),this,w)},this[w]=function(){var x=F.read(arguments);this[_](x.x),this[g](x.y)}},{beans:!0})),pt=nt.extend({initialize:function(e,r,s,u,h,p){this._set(e,r,s,u,!0),this._owner=h,this._setter=p},_set:function(t,e,r,s,u){return this._x=t,this._y=e,this._width=r,this._height=s,u||this._owner[this._setter](this),this}},new function(){var t=nt.prototype;return c.each(["x","y","width","height"],function(e){var r=c.capitalize(e),s="_"+e;this["get"+r]=function(){return this[s]},this["set"+r]=function(u){this[s]=u,this._dontNotify||this._owner[this._setter](this)}},c.each(["Point","Size","Center","Left","Top","Right","Bottom","CenterX","CenterY","TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],function(e){var r="set"+e;this[r]=function(){this._dontNotify=!0,t[r].apply(this,arguments),this._dontNotify=!1,this._owner[this._setter](this)}},{isSelected:function(){return!!(this._owner._selection&2)},setSelected:function(e){var r=this._owner;r._changeSelection&&r._changeSelection(2,e)}}))}),ft=c.extend({_class:"Matrix",initialize:function t(e,r){var s=arguments,u=s.length,h=!0;if(u>=6?this._set.apply(this,s):u===1||u===2?e instanceof t?this._set(e._a,e._b,e._c,e._d,e._tx,e._ty,r):Array.isArray(e)?this._set.apply(this,r?e.concat([r]):e):h=!1:u?h=!1:this.reset(),!h)throw new Error("Unsupported matrix parameters");return this},set:"#initialize",_set:function(t,e,r,s,u,h,p){return this._a=t,this._b=e,this._c=r,this._d=s,this._tx=u,this._ty=h,p||this._changed(),this},_serialize:function(t,e){return c.serialize(this.getValues(),t,!0,e)},_changed:function(){var t=this._owner;t&&(t._applyMatrix?t.transform(null,!0):t._changed(25))},clone:function(){return new ft(this._a,this._b,this._c,this._d,this._tx,this._ty)},equals:function(t){return t===this||t&&this._a===t._a&&this._b===t._b&&this._c===t._c&&this._d===t._d&&this._tx===t._tx&&this._ty===t._ty},toString:function(){var t=q.instance;return"[["+[t.number(this._a),t.number(this._c),t.number(this._tx)].join(", ")+"], ["+[t.number(this._b),t.number(this._d),t.number(this._ty)].join(", ")+"]]"},reset:function(t){return this._a=this._d=1,this._b=this._c=this._tx=this._ty=0,t||this._changed(),this},apply:function(t,e){var r=this._owner;return r?(r.transform(null,c.pick(t,!0),e),this.isIdentity()):!1},translate:function(){var t=F.read(arguments),e=t.x,r=t.y;return this._tx+=e*this._a+r*this._c,this._ty+=e*this._b+r*this._d,this._changed(),this},scale:function(){var t=arguments,e=F.read(t),r=F.read(t,0,{readNull:!0});return r&&this.translate(r),this._a*=e.x,this._b*=e.x,this._c*=e.y,this._d*=e.y,r&&this.translate(r.negate()),this._changed(),this},rotate:function(t){t*=Math.PI/180;var e=F.read(arguments,1),r=e.x,s=e.y,u=Math.cos(t),h=Math.sin(t),p=r-r*u+s*h,d=s-r*h-s*u,_=this._a,g=this._b,y=this._c,w=this._d;return this._a=u*_+h*y,this._b=u*g+h*w,this._c=-h*_+u*y,this._d=-h*g+u*w,this._tx+=p*_+d*y,this._ty+=p*g+d*w,this._changed(),this},shear:function(){var t=arguments,e=F.read(t),r=F.read(t,0,{readNull:!0});r&&this.translate(r);var s=this._a,u=this._b;return this._a+=e.y*this._c,this._b+=e.y*this._d,this._c+=e.x*s,this._d+=e.x*u,r&&this.translate(r.negate()),this._changed(),this},skew:function(){var t=arguments,e=F.read(t),r=F.read(t,0,{readNull:!0}),s=Math.PI/180,u=new F(Math.tan(e.x*s),Math.tan(e.y*s));return this.shear(u,r)},append:function(t,e){if(t){var r=this._a,s=this._b,u=this._c,h=this._d,p=t._a,d=t._c,_=t._b,g=t._d,y=t._tx,w=t._ty;this._a=p*r+_*u,this._c=d*r+g*u,this._b=p*s+_*h,this._d=d*s+g*h,this._tx+=y*r+w*u,this._ty+=y*s+w*h,e||this._changed()}return this},prepend:function(t,e){if(t){var r=this._a,s=this._b,u=this._c,h=this._d,p=this._tx,d=this._ty,_=t._a,g=t._c,y=t._b,w=t._d,x=t._tx,m=t._ty;this._a=_*r+g*s,this._c=_*u+g*h,this._b=y*r+w*s,this._d=y*u+w*h,this._tx=_*p+g*d+x,this._ty=y*p+w*d+m,e||this._changed()}return this},appended:function(t){return this.clone().append(t)},prepended:function(t){return this.clone().prepend(t)},invert:function(){var t=this._a,e=this._b,r=this._c,s=this._d,u=this._tx,h=this._ty,p=t*s-e*r,d=null;return p&&!isNaN(p)&&isFinite(u)&&isFinite(h)&&(this._a=s/p,this._b=-e/p,this._c=-r/p,this._d=t/p,this._tx=(r*h-s*u)/p,this._ty=(e*u-t*h)/p,d=this),d},inverted:function(){return this.clone().invert()},concatenate:"#append",preConcatenate:"#prepend",chain:"#appended",_shiftless:function(){return new ft(this._a,this._b,this._c,this._d,0,0)},_orNullIfIdentity:function(){return this.isIdentity()?null:this},isIdentity:function(){return this._a===1&&this._b===0&&this._c===0&&this._d===1&&this._tx===0&&this._ty===0},isInvertible:function(){var t=this._a*this._d-this._c*this._b;return t&&!isNaN(t)&&isFinite(this._tx)&&isFinite(this._ty)},isSingular:function(){return!this.isInvertible()},transform:function(t,e,r){return arguments.length<3?this._transformPoint(F.read(arguments)):this._transformCoordinates(t,e,r)},_transformPoint:function(t,e,r){var s=t.x,u=t.y;return e||(e=new F),e._set(s*this._a+u*this._c+this._tx,s*this._b+u*this._d+this._ty,r)},_transformCoordinates:function(t,e,r){for(var s=0,u=2*r;s<u;s+=2){var h=t[s],p=t[s+1];e[s]=h*this._a+p*this._c+this._tx,e[s+1]=h*this._b+p*this._d+this._ty}return e},_transformCorners:function(t){var e=t.x,r=t.y,s=e+t.width,u=r+t.height,h=[e,r,s,r,s,u,e,u];return this._transformCoordinates(h,h,4)},_transformBounds:function(t,e,r){for(var s=this._transformCorners(t),u=s.slice(0,2),h=u.slice(),p=2;p<8;p++){var d=s[p],_=p&1;d<u[_]?u[_]=d:d>h[_]&&(h[_]=d)}return e||(e=new nt),e._set(u[0],u[1],h[0]-u[0],h[1]-u[1],r)},inverseTransform:function(){return this._inverseTransform(F.read(arguments))},_inverseTransform:function(t,e,r){var s=this._a,u=this._b,h=this._c,p=this._d,d=this._tx,_=this._ty,g=s*p-u*h,y=null;if(g&&!isNaN(g)&&isFinite(d)&&isFinite(_)){var w=t.x-this._tx,x=t.y-this._ty;e||(e=new F),y=e._set((w*p-x*h)/g,(x*s-w*u)/g,r)}return y},decompose:function(){var t=this._a,e=this._b,r=this._c,s=this._d,u=t*s-e*r,h=Math.sqrt,p=Math.atan2,d=180/Math.PI,_,g,y;if(t!==0||e!==0){var w=h(t*t+e*e);_=Math.acos(t/w)*(e>0?1:-1),g=[w,u/w],y=[p(t*r+e*s,w*w),0]}else if(r!==0||s!==0){var x=h(r*r+s*s);_=Math.asin(r/x)*(s>0?1:-1),g=[u/x,x],y=[0,p(t*r+e*s,x*x)]}else _=0,y=g=[0,0];return{translation:this.getTranslation(),rotation:_*d,scaling:new F(g),skewing:new F(y[0]*d,y[1]*d)}},getValues:function(){return[this._a,this._b,this._c,this._d,this._tx,this._ty]},getTranslation:function(){return new F(this._tx,this._ty)},getScaling:function(){return this.decompose().scaling},getRotation:function(){return this.decompose().rotation},applyToContext:function(t){this.isIdentity()||t.transform(this._a,this._b,this._c,this._d,this._tx,this._ty)}},c.each(["a","b","c","d","tx","ty"],function(t){var e=c.capitalize(t),r="_"+t;this["get"+e]=function(){return this[r]},this["set"+e]=function(s){this[r]=s,this._changed()}},{})),gt=c.extend({_class:"Line",initialize:function(e,r,s,u,h){var p=!1;arguments.length>=4?(this._px=e,this._py=r,this._vx=s,this._vy=u,p=h):(this._px=e.x,this._py=e.y,this._vx=r.x,this._vy=r.y,p=s),p||(this._vx-=this._px,this._vy-=this._py)},getPoint:function(){return new F(this._px,this._py)},getVector:function(){return new F(this._vx,this._vy)},getLength:function(){return this.getVector().getLength()},intersect:function(t,e){return gt.intersect(this._px,this._py,this._vx,this._vy,t._px,t._py,t._vx,t._vy,!0,e)},getSide:function(t,e){return gt.getSide(this._px,this._py,this._vx,this._vy,t.x,t.y,!0,e)},getDistance:function(t){return Math.abs(this.getSignedDistance(t))},getSignedDistance:function(t){return gt.getSignedDistance(this._px,this._py,this._vx,this._vy,t.x,t.y,!0)},isCollinear:function(t){return F.isCollinear(this._vx,this._vy,t._vx,t._vy)},isOrthogonal:function(t){return F.isOrthogonal(this._vx,this._vy,t._vx,t._vy)},statics:{intersect:function(t,e,r,s,u,h,p,d,_,g){_||(r-=t,s-=e,p-=u,d-=h);var y=r*d-s*p;if(!K.isMachineZero(y)){var w=t-u,x=e-h,m=(p*x-d*w)/y,E=(r*x-s*w)/y,k=1e-12,A=-k,b=1+k;if(g||A<m&&m<b&&A<E&&E<b)return g||(m=m<=0?0:m>=1?1:m),new F(t+m*r,e+m*s)}},getSide:function(t,e,r,s,u,h,p,d){p||(r-=t,s-=e);var _=u-t,g=h-e,y=_*s-g*r;return!d&&K.isMachineZero(y)&&(y=(_*r+_*r)/(r*r+s*s),y>=0&&y<=1&&(y=0)),y<0?-1:y>0?1:0},getSignedDistance:function(t,e,r,s,u,h,p){return p||(r-=t,s-=e),r===0?s>0?u-t:t-u:s===0?r<0?h-e:e-h:((u-t)*s-(h-e)*r)/(s>r?s*Math.sqrt(1+r*r/(s*s)):r*Math.sqrt(1+s*s/(r*r)))},getDistance:function(t,e,r,s,u,h,p){return Math.abs(gt.getSignedDistance(t,e,r,s,u,h,p))}}}),ot=D.extend({_class:"Project",_list:"projects",_reference:"project",_compactSerialize:!0,initialize:function(e){D.call(this,!0),this._children=[],this._namedChildren={},this._activeLayer=null,this._currentStyle=new ce(null,null,this),this._view=ae.create(this,e||me.getCanvas(1,1)),this._selectionItems={},this._selectionCount=0,this._updateVersion=0},_serialize:function(t,e){return c.serialize(this._children,t,!0,e)},_changed:function(t,e){if(t&1){var r=this._view;r&&(r._needsUpdate=!0,!r._requested&&r._autoUpdate&&r.requestUpdate())}var s=this._changes;if(s&&e){var u=this._changesById,h=e._id,p=u[h];p?p.flags|=t:s.push(u[h]={item:e,flags:t})}},clear:function(){for(var t=this._children,e=t.length-1;e>=0;e--)t[e].remove()},isEmpty:function(){return!this._children.length},remove:function t(){return t.base.call(this)?(this._view&&this._view.remove(),!0):!1},getView:function(){return this._view},getCurrentStyle:function(){return this._currentStyle},setCurrentStyle:function(t){this._currentStyle.set(t)},getIndex:function(){return this._index},getOptions:function(){return this._scope.settings},getLayers:function(){return this._children},getActiveLayer:function(){return this._activeLayer||new kt({project:this,insert:!0})},getSymbolDefinitions:function(){var t=[],e={};return this.getItems({class:Wt,match:function(r){var s=r._definition,u=s._id;return e[u]||(e[u]=!0,t.push(s)),!1}}),t},getSymbols:"getSymbolDefinitions",getSelectedItems:function(){var t=this._selectionItems,e=[];for(var r in t){var s=t[r],u=s._selection;u&1&&s.isInserted()?e.push(s):u||this._updateSelection(s)}return e},_updateSelection:function(t){var e=t._id,r=this._selectionItems;t._selection?r[e]!==t&&(this._selectionCount++,r[e]=t):r[e]===t&&(this._selectionCount--,delete r[e])},selectAll:function(){for(var t=this._children,e=0,r=t.length;e<r;e++)t[e].setFullySelected(!0)},deselectAll:function(){var t=this._selectionItems;for(var e in t)t[e].setFullySelected(!1)},addLayer:function(t){return this.insertLayer(a,t)},insertLayer:function(t,e){if(e instanceof kt){e._remove(!1,!0),c.splice(this._children,[e],t,0),e._setProject(this,!0);var r=e._name;r&&e.setName(r),this._changes&&e._changed(5),this._activeLayer||(this._activeLayer=e)}else e=null;return e},_insertItem:function(t,e,r){return e=this.insertLayer(t,e)||(this._activeLayer||this._insertItem(a,new kt(T.NO_INSERT),!0)).insertChild(t,e),r&&e.activate&&e.activate(),e},getItems:function(t){return T._getItems(this,t)},getItem:function(t){return T._getItems(this,t,null,null,!0)[0]||null},importJSON:function(t){this.activate();var e=this._activeLayer;return c.importJSON(t,e&&e.isEmpty()&&e)},removeOn:function(t){var e=this._removeSets;if(e){t==="mouseup"&&(e.mousedrag=null);var r=e[t];if(r){for(var s in r){var u=r[s];for(var h in e){var p=e[h];p&&p!=r&&delete p[u._id]}u.remove()}e[t]=null}}},draw:function(t,e,r){this._updateVersion++,t.save(),e.applyToContext(t);for(var s=this._children,u=new c({offset:new F(0,0),pixelRatio:r,viewMatrix:e.isIdentity()?null:e,matrices:[new ft],updateMatrix:!0}),h=0,p=s.length;h<p;h++)s[h].draw(t,u);if(t.restore(),this._selectionCount>0){t.save(),t.strokeWidth=1;var d=this._selectionItems,_=this._scope.settings.handleSize,g=this._updateVersion;for(var y in d)d[y]._drawSelection(t,e,_,d,g);t.restore()}}}),T=c.extend(P,{statics:{extend:function t(e){return e._serializeFields&&(e._serializeFields=c.set({},this.prototype._serializeFields,e._serializeFields)),t.base.apply(this,arguments)},INSERT:{insert:!0},NO_INSERT:{insert:!1}},_class:"Item",_name:null,_applyMatrix:!0,_canApplyMatrix:!0,_canScaleStroke:!1,_pivot:null,_visible:!0,_blendMode:"normal",_opacity:1,_locked:!1,_guide:!1,_clipMask:!1,_selection:0,_selectBounds:!0,_selectChildren:!1,_serializeFields:{name:null,applyMatrix:null,matrix:new ft,pivot:null,visible:!0,blendMode:"normal",opacity:1,locked:!1,guide:!1,clipMask:!1,selected:!1,data:{}},_prioritize:["applyMatrix"]},new function(){var t=["onMouseDown","onMouseUp","onMouseDrag","onClick","onDoubleClick","onMouseMove","onMouseEnter","onMouseLeave"];return c.each(t,function(e){this._events[e]={install:function(r){this.getView()._countItemEvent(r,1)},uninstall:function(r){this.getView()._countItemEvent(r,-1)}}},{_events:{onFrame:{install:function(){this.getView()._animateItem(this,!0)},uninstall:function(){this.getView()._animateItem(this,!1)}},onLoad:{},onError:{}},statics:{_itemHandlers:t}})},{initialize:function(){},_initialize:function(t,e){var r=t&&c.isPlainObject(t),s=r&&t.internal===!0,u=this._matrix=new ft,h=r&&t.project||jt.project,p=jt.settings;return this._id=s?null:it.get(),this._parent=this._index=null,this._applyMatrix=this._canApplyMatrix&&p.applyMatrix,e&&u.translate(e),u._owner=this,this._style=new ce(h._currentStyle,this,h),s||r&&t.insert==!1||!p.insertItems&&!(r&&t.insert==!0)?this._setProject(h):(r&&t.parent||h)._insertItem(a,this,!0),r&&t!==T.NO_INSERT&&t!==T.INSERT&&this.set(t,{internal:!0,insert:!0,project:!0,parent:!0}),r},_serialize:function(t,e){var r={},s=this;function u(h){for(var p in h){var d=s[p];c.equals(d,p==="leading"?h.fontSize*1.2:h[p])||(r[p]=c.serialize(d,t,p!=="data",e))}}return u(this._serializeFields),this instanceof xt||u(this._style._defaults),[this._class,r]},_changed:function(t){var e=this._symbol,r=this._parent||e,s=this._project;t&8&&(this._bounds=this._position=this._decomposed=a),t&16&&(this._globalMatrix=a),r&&t&72&&T._clearBoundsCache(r),t&2&&T._clearBoundsCache(this),s&&s._changed(t,this),e&&e._changed(t)},getId:function(){return this._id},getName:function(){return this._name},setName:function(t){if(this._name&&this._removeNamed(),t===+t+"")throw new Error("Names consisting only of numbers are not supported.");var e=this._getOwner();if(t&&e){var r=e._children,s=e._namedChildren;(s[t]=s[t]||[]).push(this),t in r||(r[t]=this)}this._name=t||a,this._changed(256)},getStyle:function(){return this._style},setStyle:function(t){this.getStyle().set(t)}},c.each(["locked","visible","blendMode","opacity","guide"],function(t){var e=c.capitalize(t),r="_"+t,s={locked:256,visible:265};this["get"+e]=function(){return this[r]},this["set"+e]=function(u){u!=this[r]&&(this[r]=u,this._changed(s[t]||257))}},{}),{beans:!0,getSelection:function(){return this._selection},setSelection:function(t){if(t!==this._selection){this._selection=t;var e=this._project;e&&(e._updateSelection(this),this._changed(257))}},_changeSelection:function(t,e){var r=this._selection;this.setSelection(e?r|t:r&~t)},isSelected:function(){if(this._selectChildren){for(var t=this._children,e=0,r=t.length;e<r;e++)if(t[e].isSelected())return!0}return!!(this._selection&1)},setSelected:function(t){if(this._selectChildren)for(var e=this._children,r=0,s=e.length;r<s;r++)e[r].setSelected(t);this._changeSelection(1,t)},isFullySelected:function(){var t=this._children,e=!!(this._selection&1);if(t&&e){for(var r=0,s=t.length;r<s;r++)if(!t[r].isFullySelected())return!1;return!0}return e},setFullySelected:function(t){var e=this._children;if(e)for(var r=0,s=e.length;r<s;r++)e[r].setFullySelected(t);this._changeSelection(1,t)},isClipMask:function(){return this._clipMask},setClipMask:function(t){this._clipMask!=(t=!!t)&&(this._clipMask=t,t&&(this.setFillColor(null),this.setStrokeColor(null)),this._changed(257),this._parent&&this._parent._changed(2048))},getData:function(){return this._data||(this._data={}),this._data},setData:function(t){this._data=t},getPosition:function(t){var e=t?F:at,r=this._position||(this._position=this._getPositionFromBounds());return new e(r.x,r.y,this,"setPosition")},setPosition:function(){this.translate(F.read(arguments).subtract(this.getPosition(!0)))},_getPositionFromBounds:function(t){return this._pivot?this._matrix._transformPoint(this._pivot):(t||this.getBounds()).getCenter(!0)},getPivot:function(){var t=this._pivot;return t?new at(t.x,t.y,this,"setPivot"):null},setPivot:function(){this._pivot=F.read(arguments,0,{clone:!0,readNull:!0}),this._position=a}},c.each({getStrokeBounds:{stroke:!0},getHandleBounds:{handle:!0},getInternalBounds:{internal:!0}},function(t,e){this[e]=function(r){return this.getBounds(r,t)}},{beans:!0,getBounds:function(t,e){var r=e||t instanceof ft,s=c.set({},r?e:t,this._boundsOptions);(!s.stroke||this.getStrokeScaling())&&(s.cacheItem=this);var u=this._getCachedBounds(r&&t,s).rect;return arguments.length?u:new pt(u.x,u.y,u.width,u.height,this,"setBounds")},setBounds:function(){var t=nt.read(arguments),e=this.getBounds(),r=this._matrix,s=new ft,u=t.getCenter();s.translate(u),(t.width!=e.width||t.height!=e.height)&&(r.isInvertible()||(r.set(r._backup||new ft().translate(r.getTranslation())),e=this.getBounds()),s.scale(e.width!==0?t.width/e.width:0,e.height!==0?t.height/e.height:0)),u=e.getCenter(),s.translate(-u.x,-u.y),this.transform(s)},_getBounds:function(t,e){var r=this._children;return!r||!r.length?new nt:(T._updateBoundsCache(this,e.cacheItem),T._getBounds(r,t,e))},_getBoundsCacheKey:function(t,e){return[t.stroke?1:0,t.handle?1:0,e?1:0].join("")},_getCachedBounds:function(t,e,r){t=t&&t._orNullIfIdentity();var s=e.internal&&!r,u=e.cacheItem,h=s?null:this._matrix._orNullIfIdentity(),p=u&&(!t||t.equals(h))&&this._getBoundsCacheKey(e,s),d=this._bounds;if(T._updateBoundsCache(this._parent||this._symbol,u),p&&d&&p in d){var _=d[p];return{rect:_.rect.clone(),nonscaling:_.nonscaling}}var g=this._getBounds(t||h,e),y=g.rect||g,w=this._style,x=g.nonscaling||w.hasStroke()&&!w.getStrokeScaling();if(p){d||(this._bounds=d={});var _=d[p]={rect:y.clone(),nonscaling:x,internal:s}}return{rect:y,nonscaling:x}},_getStrokeMatrix:function(t,e){var r=this.getStrokeScaling()?null:e&&e.internal?this:this._parent||this._symbol&&this._symbol._item,s=r?r.getViewMatrix().invert():t;return s&&s._shiftless()},statics:{_updateBoundsCache:function(t,e){if(t&&e){var r=e._id,s=t._boundsCache=t._boundsCache||{ids:{},list:[]};s.ids[r]||(s.list.push(e),s.ids[r]=e)}},_clearBoundsCache:function(t){var e=t._boundsCache;if(e){t._bounds=t._position=t._boundsCache=a;for(var r=0,s=e.list,u=s.length;r<u;r++){var h=s[r];h!==t&&(h._bounds=h._position=a,h._boundsCache&&T._clearBoundsCache(h))}}},_getBounds:function(t,e,r){var s=1/0,u=-s,h=s,p=u,d=!1;r=r||{};for(var _=0,g=t.length;_<g;_++){var y=t[_];if(y._visible&&!y.isEmpty(!0)){var w=y._getCachedBounds(e&&e.appended(y._matrix),r,!0),x=w.rect;s=Math.min(x.x,s),h=Math.min(x.y,h),u=Math.max(x.x+x.width,u),p=Math.max(x.y+x.height,p),w.nonscaling&&(d=!0)}}return{rect:isFinite(s)?new nt(s,h,u-s,p-h):new nt,nonscaling:d}}}}),{beans:!0,_decompose:function(){return this._applyMatrix?null:this._decomposed||(this._decomposed=this._matrix.decompose())},getRotation:function(){var t=this._decompose();return t?t.rotation:0},setRotation:function(t){var e=this.getRotation();if(e!=null&&t!=null){var r=this._decomposed;this.rotate(t-e),r&&(r.rotation=t,this._decomposed=r)}},getScaling:function(){var t=this._decompose(),e=t&&t.scaling;return new at(e?e.x:1,e?e.y:1,this,"setScaling")},setScaling:function(){var t=this.getScaling(),e=F.read(arguments,0,{clone:!0,readNull:!0});if(t&&e&&!t.equals(e)){var r=this.getRotation(),s=this._decomposed,u=new ft,h=K.isZero;if(h(t.x)||h(t.y))u.translate(s.translation),r&&u.rotate(r),u.scale(e.x,e.y),this._matrix.set(u);else{var p=this.getPosition(!0);u.translate(p),r&&u.rotate(r),u.scale(e.x/t.x,e.y/t.y),r&&u.rotate(-r),u.translate(p.negate()),this.transform(u)}s&&(s.scaling=e,this._decomposed=s)}},getMatrix:function(){return this._matrix},setMatrix:function(){var t=this._matrix;t.set.apply(t,arguments)},getGlobalMatrix:function(t){var e=this._globalMatrix;if(e)for(var r=this._parent,s=[];r;){if(!r._globalMatrix){e=null;for(var u=0,h=s.length;u<h;u++)s[u]._globalMatrix=null;break}s.push(r),r=r._parent}if(!e){e=this._globalMatrix=this._matrix.clone();var r=this._parent;r&&e.prepend(r.getGlobalMatrix(!0))}return t?e:e.clone()},getViewMatrix:function(){return this.getGlobalMatrix().prepend(this.getView()._matrix)},getApplyMatrix:function(){return this._applyMatrix},setApplyMatrix:function(t){(this._applyMatrix=this._canApplyMatrix&&!!t)&&this.transform(null,!0)},getTransformContent:"#getApplyMatrix",setTransformContent:"#setApplyMatrix"},{getProject:function(){return this._project},_setProject:function(t,e){if(this._project!==t){this._project&&this._installEvents(!1),this._project=t;for(var r=this._children,s=0,u=r&&r.length;s<u;s++)r[s]._setProject(t);e=!0}e&&this._installEvents(!0)},getView:function(){return this._project._view},_installEvents:function t(e){t.base.call(this,e);for(var r=this._children,s=0,u=r&&r.length;s<u;s++)r[s]._installEvents(e)},getLayer:function(){for(var t=this;t=t._parent;)if(t instanceof kt)return t;return null},getParent:function(){return this._parent},setParent:function(t){return t.addChild(this)},_getOwner:"#getParent",getChildren:function(){return this._children},setChildren:function(t){this.removeChildren(),this.addChildren(t)},getFirstChild:function(){return this._children&&this._children[0]||null},getLastChild:function(){return this._children&&this._children[this._children.length-1]||null},getNextSibling:function(){var t=this._getOwner();return t&&t._children[this._index+1]||null},getPreviousSibling:function(){var t=this._getOwner();return t&&t._children[this._index-1]||null},getIndex:function(){return this._index},equals:function(t){return t===this||t&&this._class===t._class&&this._style.equals(t._style)&&this._matrix.equals(t._matrix)&&this._locked===t._locked&&this._visible===t._visible&&this._blendMode===t._blendMode&&this._opacity===t._opacity&&this._clipMask===t._clipMask&&this._guide===t._guide&&this._equals(t)||!1},_equals:function(t){return c.equals(this._children,t._children)},clone:function(t){var e=new this.constructor(T.NO_INSERT),r=this._children,s=c.pick(t?t.insert:a,t===a||t===!0),u=c.pick(t?t.deep:a,!0);r&&e.copyAttributes(this),(!r||u)&&e.copyContent(this),r||e.copyAttributes(this),s&&e.insertAbove(this);var h=this._name,p=this._parent;if(h&&p){for(var r=p._children,d=h,_=1;r[h];)h=d+" "+_++;h!==d&&e.setName(h)}return e},copyContent:function(t){for(var e=t._children,r=0,s=e&&e.length;r<s;r++)this.addChild(e[r].clone(!1),!0)},copyAttributes:function(t,e){this.setStyle(t._style);for(var r=["_locked","_visible","_blendMode","_opacity","_clipMask","_guide"],s=0,u=r.length;s<u;s++){var h=r[s];t.hasOwnProperty(h)&&(this[h]=t[h])}e||this._matrix.set(t._matrix,!0),this.setApplyMatrix(t._applyMatrix),this.setPivot(t._pivot),this.setSelection(t._selection);var p=t._data,d=t._name;this._data=p?c.clone(p):null,d&&this.setName(d)},rasterize:function(t,e){var r,s,u;c.isPlainObject(t)?(r=t.resolution,s=t.insert,u=t.raster):(r=t,s=e),u||(u=new Ft(T.NO_INSERT));var h=this.getStrokeBounds(),p=(r||this.getView().getResolution())/72,d=h.getTopLeft().floor(),_=h.getBottomRight().ceil(),g=new G(_.subtract(d)),y=g.multiply(p);if(u.setSize(y,!0),!y.isZero()){var w=u.getContext(!0),x=new ft().scale(p).translate(d.negate());w.save(),x.applyToContext(w),this.draw(w,new c({matrices:[x]})),w.restore()}return u._matrix.set(new ft().translate(d.add(g.divide(2))).scale(1/p)),(s===a||s)&&u.insertAbove(this),u},contains:function(){var t=this._matrix;return t.isInvertible()&&!!this._contains(t._inverseTransform(F.read(arguments)))},_contains:function(t){var e=this._children;if(e){for(var r=e.length-1;r>=0;r--)if(e[r].contains(t))return!0;return!1}return t.isInside(this.getInternalBounds())},isInside:function(){return nt.read(arguments).contains(this.getBounds())},_asPathItem:function(){return new zt.Rectangle({rectangle:this.getInternalBounds(),matrix:this._matrix,insert:!1})},intersects:function(t,e){return t instanceof T?this._asPathItem().getIntersections(t._asPathItem(),null,e,!0).length>0:!1}},new function(){function t(){var s=arguments;return this._hitTest(F.read(s),Rt.getOptions(s))}function e(){var s=arguments,u=F.read(s),h=Rt.getOptions(s),p=[];return this._hitTest(u,new c({all:p},h)),p}function r(s,u,h,p){var d=this._children;if(d)for(var _=d.length-1;_>=0;_--){var g=d[_],y=g!==p&&g._hitTest(s,u,h);if(y&&!u.all)return y}return null}return ot.inject({hitTest:t,hitTestAll:e,_hitTest:r}),{hitTest:t,hitTestAll:e,_hitTestChildren:r}},{_hitTest:function(t,e,r){if(this._locked||!this._visible||this._guide&&!e.guides||this.isEmpty())return null;var s=this._matrix,u=r?r.appended(s):this.getGlobalMatrix().prepend(this.getView()._matrix),h=Math.max(e.tolerance,1e-12),p=e._tolerancePadding=new G(zt._getStrokePadding(h,s._shiftless().invert()));if(t=s._inverseTransform(t),!t||!this._children&&!this.getBounds({internal:!0,stroke:!0,handle:!0}).expand(p.multiply(2))._containsPoint(t))return null;var d=!(e.guides&&!this._guide||e.selected&&!this.isSelected()||e.type&&e.type!==c.hyphenate(this._class)||e.class&&!(this instanceof e.class)),_=e.match,g=this,y,w;function x(v){return v&&_&&!_(v)&&(v=null),v&&e.all&&e.all.push(v),v}function m(v,I){var L=I?y["get"+I]():g.getPosition();if(t.subtract(L).divide(p).length<=1)return new Rt(v,g,{name:I?c.hyphenate(I):v,point:L})}var E=e.position,k=e.center,A=e.bounds;if(d&&this._parent&&(E||k||A)){if((k||A)&&(y=this.getInternalBounds()),w=E&&m("position")||k&&m("center","Center"),!w&&A)for(var b=["TopLeft","TopRight","BottomLeft","BottomRight","LeftCenter","TopCenter","RightCenter","BottomCenter"],C=0;C<8&&!w;C++)w=m("bounds",b[C]);w=x(w)}return w||(w=this._hitTestChildren(t,e,u)||d&&x(this._hitTestSelf(t,e,u,this.getStrokeScaling()?null:u._shiftless().invert()))||null),w&&w.point&&(w.point=s.transform(w.point)),w},_hitTestSelf:function(t,e){if(e.fill&&this.hasFill()&&this._contains(t))return new Rt("fill",this)},matches:function(t,e){function r(p,d){for(var _ in p)if(p.hasOwnProperty(_)){var g=p[_],y=d[_];if(c.isPlainObject(g)&&c.isPlainObject(y)){if(!r(g,y))return!1}else if(!c.equals(g,y))return!1}return!0}var s=typeof t;if(s==="object"){for(var u in t)if(t.hasOwnProperty(u)&&!this.matches(u,t[u]))return!1;return!0}else{if(s==="function")return t(this);if(t==="match")return e(this);var h=/^(empty|editable)$/.test(t)?this["is"+c.capitalize(t)]():t==="type"?c.hyphenate(this._class):this[t];if(t==="class"){if(typeof e=="function")return this instanceof e;h=this._class}if(typeof e=="function")return!!e(h);if(e){if(e.test)return e.test(h);if(c.isPlainObject(e))return r(e,h)}return c.equals(h,e)}},getItems:function(t){return T._getItems(this,t,this._matrix)},getItem:function(t){return T._getItems(this,t,this._matrix,null,!0)[0]||null},statics:{_getItems:function t(e,r,s,u,h){if(!u){var p=typeof r=="object"&&r,d=p&&p.overlapping,_=p&&p.inside,g=d||_,x=g&&nt.read([g]);u={items:[],recursive:p&&p.recursive!==!1,inside:!!_,overlapping:!!d,rect:x,path:d&&new zt.Rectangle({rectangle:x,insert:!1})},p&&(r=c.filter({},r,{recursive:!0,inside:!0,overlapping:!0}))}var y=e._children,w=u.items,x=u.rect;s=x&&(s||new ft);for(var m=0,E=y&&y.length;m<E;m++){var k=y[m],A=s&&s.appended(k._matrix),b=!0;if(x){var g=k.getBounds(A);if(!x.intersects(g))continue;x.contains(g)||u.overlapping&&(g.contains(x)||u.path.intersects(k,A))||(b=!1)}if(b&&k.matches(r)&&(w.push(k),h)||(u.recursive!==!1&&t(k,r,A,u,h),h&&w.length>0))break}return w}}},{importJSON:function(t){var e=c.importJSON(t,this);return e!==this?this.addChild(e):e},addChild:function(t){return this.insertChild(a,t)},insertChild:function(t,e){var r=e?this.insertChildren(t,[e]):null;return r&&r[0]},addChildren:function(t){return this.insertChildren(this._children.length,t)},insertChildren:function(t,e){var r=this._children;if(r&&e&&e.length>0){e=c.slice(e);for(var s={},u=e.length-1;u>=0;u--){var h=e[u],p=h&&h._id;!h||s[p]?e.splice(u,1):(h._remove(!1,!0),s[p]=!0)}c.splice(r,e,t,0);for(var d=this._project,_=d._changes,u=0,g=e.length;u<g;u++){var h=e[u],y=h._name;h._parent=this,h._setProject(d,!0),y&&h.setName(y),_&&h._changed(5)}this._changed(11)}else e=null;return e},_insertItem:"#insertChild",_insertAt:function(t,e){var r=t&&t._getOwner(),s=t!==this&&r?this:null;return s&&(s._remove(!1,!0),r._insertItem(t._index+e,s)),s},insertAbove:function(t){return this._insertAt(t,1)},insertBelow:function(t){return this._insertAt(t,0)},sendToBack:function(){var t=this._getOwner();return t?t._insertItem(0,this):null},bringToFront:function(){var t=this._getOwner();return t?t._insertItem(a,this):null},appendTop:"#addChild",appendBottom:function(t){return this.insertChild(0,t)},moveAbove:"#insertAbove",moveBelow:"#insertBelow",addTo:function(t){return t._insertItem(a,this)},copyTo:function(t){return this.clone(!1).addTo(t)},reduce:function(t){var e=this._children;if(e&&e.length===1){var r=e[0].reduce(t);return this._parent?(r.insertAbove(this),this.remove()):r.remove(),r}return this},_removeNamed:function(){var t=this._getOwner();if(t){var e=t._children,r=t._namedChildren,s=this._name,u=r[s],h=u?u.indexOf(this):-1;h!==-1&&(e[s]==this&&delete e[s],u.splice(h,1),u.length?e[s]=u[0]:delete r[s])}},_remove:function(t,e){var r=this._getOwner(),s=this._project,u=this._index;return this._style&&this._style._dispose(),r?(this._name&&this._removeNamed(),u!=null&&(s._activeLayer===this&&(s._activeLayer=this.getNextSibling()||this.getPreviousSibling()),c.splice(r._children,null,u,1)),this._installEvents(!1),t&&s._changes&&this._changed(5),e&&r._changed(11,this),this._parent=null,!0):!1},remove:function(){return this._remove(!0,!0)},replaceWith:function(t){var e=t&&t.insertBelow(this);return e&&this.remove(),e},removeChildren:function(t,e){if(!this._children)return null;t=t||0,e=c.pick(e,this._children.length);for(var r=c.splice(this._children,null,t,e-t),s=r.length-1;s>=0;s--)r[s]._remove(!0,!1);return r.length>0&&this._changed(11),r},clear:"#removeChildren",reverseChildren:function(){if(this._children){this._children.reverse();for(var t=0,e=this._children.length;t<e;t++)this._children[t]._index=t;this._changed(11)}},isEmpty:function(t){var e=this._children,r=e?e.length:0;if(t){for(var s=0;s<r;s++)if(!e[s].isEmpty(t))return!1;return!0}return!r},isEditable:function(){for(var t=this;t;){if(!t._visible||t._locked)return!1;t=t._parent}return!0},hasFill:function(){return this.getStyle().hasFill()},hasStroke:function(){return this.getStyle().hasStroke()},hasShadow:function(){return this.getStyle().hasShadow()},_getOrder:function(t){function e(p){var d=[];do d.unshift(p);while(p=p._parent);return d}for(var r=e(this),s=e(t),u=0,h=Math.min(r.length,s.length);u<h;u++)if(r[u]!=s[u])return r[u]._index<s[u]._index?1:-1;return 0},hasChildren:function(){return this._children&&this._children.length>0},isInserted:function(){return this._parent?this._parent.isInserted():!1},isAbove:function(t){return this._getOrder(t)===-1},isBelow:function(t){return this._getOrder(t)===1},isParent:function(t){return this._parent===t},isChild:function(t){return t&&t._parent===this},isDescendant:function(t){for(var e=this;e=e._parent;)if(e===t)return!0;return!1},isAncestor:function(t){return t?t.isDescendant(this):!1},isSibling:function(t){return this._parent===t._parent},isGroupedWith:function(t){for(var e=this._parent;e;){if(e._parent&&/^(Group|Layer|CompoundPath)$/.test(e._class)&&t.isDescendant(e))return!0;e=e._parent}return!1}},c.each(["rotate","scale","shear","skew"],function(t){var e=t==="rotate";this[t]=function(){var r=arguments,s=(e?c:F).read(r),u=F.read(r,0,{readNull:!0});return this.transform(new ft()[t](s,u||this.getPosition(!0)))}},{translate:function(){var t=new ft;return this.transform(t.translate.apply(t,arguments))},transform:function(t,e,r){var s=this._matrix,u=t&&!t.isIdentity(),h=r&&this._canApplyMatrix||this._applyMatrix&&(u||!s.isIdentity()||e&&this._children);if(!u&&!h)return this;if(u){!t.isInvertible()&&s.isInvertible()&&(s._backup=s.getValues()),s.prepend(t,!0);var p=this._style,d=p.getFillColor(!0),_=p.getStrokeColor(!0);d&&d.transform(t),_&&_.transform(t)}if(h&&(h=this._transformContent(s,e,r))){var g=this._pivot;g&&s._transformPoint(g,g,!0),s.reset(!0),r&&this._canApplyMatrix&&(this._applyMatrix=!0)}var y=this._bounds,w=this._position;(u||h)&&this._changed(25);var x=u&&y&&t.decompose();if(x&&x.skewing.isZero()&&x.rotation%90===0){for(var m in y){var E=y[m];if(E.nonscaling)delete y[m];else if(h||!E.internal){var k=E.rect;t._transformBounds(k,k)}}this._bounds=y;var A=y[this._getBoundsCacheKey(this._boundsOptions||{})];A&&(this._position=this._getPositionFromBounds(A.rect))}else u&&w&&this._pivot&&(this._position=t._transformPoint(w,w));return this},_transformContent:function(t,e,r){var s=this._children;if(s){for(var u=0,h=s.length;u<h;u++)s[u].transform(t,e,r);return!0}},globalToLocal:function(){return this.getGlobalMatrix(!0)._inverseTransform(F.read(arguments))},localToGlobal:function(){return this.getGlobalMatrix(!0)._transformPoint(F.read(arguments))},parentToLocal:function(){return this._matrix._inverseTransform(F.read(arguments))},localToParent:function(){return this._matrix._transformPoint(F.read(arguments))},fitBounds:function(t,e){t=nt.read(arguments);var r=this.getBounds(),s=r.height/r.width,u=t.height/t.width,h=(e?s>u:s<u)?t.width/r.width:t.height/r.height,p=new nt(new F,new G(r.width*h,r.height*h));p.setCenter(t.getCenter()),this.setBounds(p)}}),{_setStyles:function(t,e,r){var s=this._style,u=this._matrix;if(s.hasFill()&&(t.fillStyle=s.getFillColor().toCanvasStyle(t,u)),s.hasStroke()){t.strokeStyle=s.getStrokeColor().toCanvasStyle(t,u),t.lineWidth=s.getStrokeWidth();var h=s.getStrokeJoin(),p=s.getStrokeCap(),d=s.getMiterLimit();if(h&&(t.lineJoin=h),p&&(t.lineCap=p),d&&(t.miterLimit=d),jt.support.nativeDash){var _=s.getDashArray(),g=s.getDashOffset();_&&_.length&&("setLineDash"in t?(t.setLineDash(_),t.lineDashOffset=g):(t.mozDash=_,t.mozDashOffset=g))}}if(s.hasShadow()){var y=e.pixelRatio||1,w=r._shiftless().prepend(new ft().scale(y,y)),x=w.transform(new F(s.getShadowBlur(),0)),m=w.transform(this.getShadowOffset());t.shadowColor=s.getShadowColor().toCanvasStyle(t),t.shadowBlur=x.getLength(),t.shadowOffsetX=m.x,t.shadowOffsetY=m.y}},draw:function(t,e,r){if(this._updateVersion=this._project._updateVersion,!(!this._visible||this._opacity===0)){var s=e.matrices,u=e.viewMatrix,h=this._matrix,p=s[s.length-1].appended(h);if(p.isInvertible()){u=u?u.appended(p):p,s.push(p),e.updateMatrix&&(this._globalMatrix=p);var d=this._blendMode,_=K.clamp(this._opacity,0,1),g=d==="normal",y=$e.nativeModes[d],w=g&&_===1||e.dontStart||e.clip||(y||g&&_<1)&&this._canComposite(),x=e.pixelRatio||1,m,E,k;if(!w){var A=this.getStrokeBounds(u);if(!A.width||!A.height){s.pop();return}k=e.offset,E=e.offset=A.getTopLeft().floor(),m=t,t=me.getContext(A.getSize().ceil().add(1).multiply(x)),x!==1&&t.scale(x,x)}t.save();var b=r?r.appended(h):this._canScaleStroke&&!this.getStrokeScaling(!0)&&u,C=!w&&e.clipItem,v=!b||C;if(w?(t.globalAlpha=_,y&&(t.globalCompositeOperation=d)):v&&t.translate(-E.x,-E.y),v&&(w?h:u).applyToContext(t),C&&e.clipItem.draw(t,e.extend({clip:!0})),b){t.setTransform(x,0,0,x,0,0);var I=e.offset;I&&t.translate(-I.x,-I.y)}this._draw(t,e,u,b),t.restore(),s.pop(),e.clip&&!e.dontFinish&&t.clip(this.getFillRule()),w||($e.process(d,t,m,_,E.subtract(k).multiply(x)),me.release(t),e.offset=k)}}},_isUpdated:function(t){var e=this._parent;if(e instanceof se)return e._isUpdated(t);var r=this._updateVersion===t;return!r&&e&&e._visible&&e._isUpdated(t)&&(this._updateVersion=t,r=!0),r},_drawSelection:function(t,e,r,s,u){var h=this._selection,p=h&1,d=h&2||p&&this._selectBounds,_=h&4;if(this._drawSelected||(p=!1),(p||d||_)&&this._isUpdated(u)){var g,y=this.getSelectedColor(!0)||(g=this.getLayer())&&g.getSelectedColor(!0),w=e.appended(this.getGlobalMatrix(!0)),x=r/2;if(t.strokeStyle=t.fillStyle=y?y.toCanvasStyle(t):"#009dec",p&&this._drawSelected(t,w,s),_){var m=this.getPosition(!0),E=this._parent,k=E?E.localToGlobal(m):m,A=k.x,b=k.y;t.beginPath(),t.arc(A,b,x,0,Math.PI*2,!0),t.stroke();for(var C=[[0,-1],[1,0],[0,1],[-1,0]],v=x,I=r+1,L=0;L<4;L++){var R=C[L],M=R[0],V=R[1];t.moveTo(A+M*v,b+V*v),t.lineTo(A+M*I,b+V*I),t.stroke()}}if(d){var U=w._transformCorners(this.getInternalBounds());t.beginPath();for(var L=0;L<8;L++)t[L?"lineTo":"moveTo"](U[L],U[++L]);t.closePath(),t.stroke();for(var L=0;L<8;L++)t.fillRect(U[L]-x,U[++L]-x,r,r)}}},_canComposite:function(){return!1}},c.each(["down","drag","up","move"],function(t){this["removeOn"+c.capitalize(t)]=function(){var e={};return e[t]=!0,this.removeOn(e)}},{removeOn:function(t){for(var e in t)if(t[e]){var r="mouse"+e,s=this._project,u=s._removeSets=s._removeSets||{};u[r]=u[r]||{},u[r][this._id]=this}return this}}),{tween:function(t,e,r){r||(r=e,e=t,t=null,r||(r=e,e=null));var s=r&&r.easing,u=r&&r.start,h=r!=null&&(typeof r=="number"?r:r.duration),p=new Lr(this,t,e,h,s,u);function d(_){p._handleFrame(_.time*1e3),p.running||this.off("frame",d)}return h&&this.on("frame",d),p},tweenTo:function(t,e){return this.tween(null,t,e)},tweenFrom:function(t,e){return this.tween(t,null,e)}}),xt=T.extend({_class:"Group",_selectBounds:!1,_selectChildren:!0,_serializeFields:{children:[]},initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||this.addChildren(Array.isArray(e)?e:arguments)},_changed:function t(e){t.base.call(this,e),e&2050&&(this._clipItem=a)},_getClipItem:function(){var t=this._clipItem;if(t===a){t=null;for(var e=this._children,r=0,s=e.length;r<s;r++)if(e[r]._clipMask){t=e[r];break}this._clipItem=t}return t},isClipped:function(){return!!this._getClipItem()},setClipped:function(t){var e=this.getFirstChild();e&&e.setClipMask(t)},_getBounds:function t(e,r){var s=this._getClipItem();return s?s._getCachedBounds(s._matrix.prepended(e),c.set({},r,{stroke:!1})):t.base.call(this,e,r)},_hitTestChildren:function t(e,r,s){var u=this._getClipItem();return(!u||u.contains(e))&&t.base.call(this,e,r,s,u)},_draw:function(t,e){var r=e.clip,s=!r&&this._getClipItem();e=e.extend({clipItem:s,clip:!1}),r?(t.beginPath(),e.dontStart=e.dontFinish=!0):s&&s.draw(t,e.extend({clip:!0}));for(var u=this._children,h=0,p=u.length;h<p;h++){var d=u[h];d!==s&&d.draw(t,e)}}}),kt=xt.extend({_class:"Layer",initialize:function(){xt.apply(this,arguments)},_getOwner:function(){return this._parent||this._index!=null&&this._project},isInserted:function t(){return this._parent?t.base.call(this):this._index!=null},activate:function(){this._project._activeLayer=this},_hitTestSelf:function(){}}),vt=T.extend({_class:"Shape",_applyMatrix:!1,_canApplyMatrix:!1,_canScaleStroke:!0,_serializeFields:{type:null,size:null,radius:null},initialize:function(e,r){this._initialize(e,r)},_equals:function(t){return this._type===t._type&&this._size.equals(t._size)&&c.equals(this._radius,t._radius)},copyContent:function(t){this.setType(t._type),this.setSize(t._size),this.setRadius(t._radius)},getType:function(){return this._type},setType:function(t){this._type=t},getShape:"#getType",setShape:"#setType",getSize:function(){var t=this._size;return new et(t.width,t.height,this,"setSize")},setSize:function(){var t=G.read(arguments);if(!this._size)this._size=t.clone();else if(!this._size.equals(t)){var e=this._type,r=t.width,s=t.height;e==="rectangle"?this._radius.set(G.min(this._radius,t.divide(2).abs())):e==="circle"?(r=s=(r+s)/2,this._radius=r/2):e==="ellipse"&&this._radius._set(r/2,s/2),this._size._set(r,s),this._changed(9)}},getRadius:function(){var t=this._radius;return this._type==="circle"?t:new et(t.width,t.height,this,"setRadius")},setRadius:function(t){var e=this._type;if(e==="circle"){if(t===this._radius)return;var r=t*2;this._radius=t,this._size._set(r,r)}else if(t=G.read(arguments),!this._radius)this._radius=t.clone();else{if(this._radius.equals(t))return;if(this._radius.set(t),e==="rectangle"){var r=G.max(this._size,t.multiply(2));this._size.set(r)}else e==="ellipse"&&this._size._set(t.width*2,t.height*2)}this._changed(9)},isEmpty:function(){return!1},toPath:function(t){var e=new zt[c.capitalize(this._type)]({center:new F,size:this._size,radius:this._radius,insert:!1});return e.copyAttributes(this),jt.settings.applyMatrix&&e.setApplyMatrix(!0),(t===a||t)&&e.insertAbove(this),e},toShape:"#clone",_asPathItem:function(){return this.toPath(!1)},_draw:function(t,e,r,s){var u=this._style,h=u.hasFill(),p=u.hasStroke(),d=e.dontFinish||e.clip,_=!s;if(h||p||d){var g=this._type,y=this._radius,w=g==="circle";if(e.dontStart||t.beginPath(),_&&w)t.arc(0,0,y,0,Math.PI*2,!0);else{var x=w?y:y.width,m=w?y:y.height,E=this._size,k=E.width,A=E.height;if(_&&g==="rectangle"&&x===0&&m===0)t.rect(-k/2,-A/2,k,A);else{var b=k/2,C=A/2,v=1-.5522847498307936,I=x*v,L=m*v,R=[-b,-C+m,-b,-C+L,-b+I,-C,-b+x,-C,b-x,-C,b-I,-C,b,-C+L,b,-C+m,b,C-m,b,C-L,b-I,C,b-x,C,-b+x,C,-b+I,C,-b,C-L,-b,C-m];s&&s.transform(R,R,32),t.moveTo(R[0],R[1]),t.bezierCurveTo(R[2],R[3],R[4],R[5],R[6],R[7]),b!==x&&t.lineTo(R[8],R[9]),t.bezierCurveTo(R[10],R[11],R[12],R[13],R[14],R[15]),C!==m&&t.lineTo(R[16],R[17]),t.bezierCurveTo(R[18],R[19],R[20],R[21],R[22],R[23]),b!==x&&t.lineTo(R[24],R[25]),t.bezierCurveTo(R[26],R[27],R[28],R[29],R[30],R[31])}}t.closePath()}!d&&(h||p)&&(this._setStyles(t,e,r),h&&(t.fill(u.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),p&&t.stroke())},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_getBounds:function(t,e){var r=new nt(this._size).setCenter(0,0),s=this._style,u=e.stroke&&s.hasStroke()&&s.getStrokeWidth();return t&&(r=t._transformBounds(r)),u?r.expand(zt._getStrokePadding(u,this._getStrokeMatrix(t,e))):r}},new function(){function t(r,s,u){var h=r._radius;if(!h.isZero())for(var p=r._size.divide(2),d=1;d<=4;d++){var _=new F(d>1&&d<4?-1:1,d>2?-1:1),g=_.multiply(p),y=g.subtract(_.multiply(h)),w=new nt(u?g.add(_.multiply(u)):g,y);if(w.contains(s))return{point:y,quadrant:d}}}function e(r,s,u,h){var p=r.divide(s);return(!h||p.isInQuadrant(h))&&p.subtract(p.normalize()).multiply(s).divide(u).length<=1}return{_contains:function r(s){if(this._type==="rectangle"){var u=t(this,s);return u?s.subtract(u.point).divide(this._radius).getLength()<=1:r.base.call(this,s)}else return s.divide(this.size).getLength()<=.5},_hitTestSelf:function r(s,u,h,p){var d=!1,_=this._style,g=u.stroke&&_.hasStroke(),y=u.fill&&_.hasFill();if(g||y){var w=this._type,x=this._radius,m=g?_.getStrokeWidth()/2:0,E=u._tolerancePadding.add(zt._getStrokePadding(m,!_.getStrokeScaling()&&p));if(w==="rectangle"){var k=E.multiply(2),A=t(this,s,k);if(A)d=e(s.subtract(A.point),x,E,A.quadrant);else{var b=new nt(this._size).setCenter(0,0),C=b.expand(k),v=b.expand(k.negate());d=C._containsPoint(s)&&!v._containsPoint(s)}}else d=e(s,x,E)}return d?new Rt(g?"stroke":"fill",this):r.base.apply(this,arguments)}}},{statics:new function(){function t(e,r,s,u,h){var p=c.create(vt.prototype);return p._type=e,p._size=s,p._radius=u,p._initialize(c.getNamed(h),r),p}return{Circle:function(){var e=arguments,r=F.readNamed(e,"center"),s=c.readNamed(e,"radius");return t("circle",r,new G(s*2),s,e)},Rectangle:function(){var e=arguments,r=nt.readNamed(e,"rectangle"),s=G.min(G.readNamed(e,"radius"),r.getSize(!0).divide(2));return t("rectangle",r.getCenter(!0),r.getSize(!0),s,e)},Ellipse:function(){var e=arguments,r=vt._readEllipse(e),s=r.radius;return t("ellipse",r.center,s.multiply(2),s,e)},_readEllipse:function(e){var r,s;if(c.hasNamed(e,"radius"))r=F.readNamed(e,"center"),s=G.readNamed(e,"radius");else{var u=nt.readNamed(e,"rectangle");r=u.getCenter(!0),s=u.getSize(!0).divide(2)}return{center:r,radius:s}}}}}),Ft=T.extend({_class:"Raster",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!1,handle:!1},_serializeFields:{crossOrigin:null,source:null},_prioritize:["crossOrigin"],_smoothing:"low",beans:!0,initialize:function(e,r){if(!this._initialize(e,r!==a&&F.read(arguments))){var s,u=typeof e,h=u==="string"?f.getElementById(e):u==="object"?e:null;if(h&&h!==T.NO_INSERT){if(h.getContext||h.naturalHeight!=null)s=h;else if(h){var p=G.read(arguments);p.isZero()||(s=me.getCanvas(p))}}s?this.setImage(s):this.setSource(e)}this._size||(this._size=new G,this._loaded=!1)},_equals:function(t){return this.getSource()===t.getSource()},copyContent:function(t){var e=t._image,r=t._canvas;if(e)this._setImage(e);else if(r){var s=me.getCanvas(t._size);s.getContext("2d").drawImage(r,0,0),this._setImage(s)}this._crossOrigin=t._crossOrigin},getSize:function(){var t=this._size;return new et(t?t.width:0,t?t.height:0,this,"setSize")},setSize:function(t,e){var r=G.read(arguments);if(r.equals(this._size))e&&this.clear();else if(r.width>0&&r.height>0){var s=!e&&this.getElement();this._setImage(me.getCanvas(r)),s&&this.getContext(!0).drawImage(s,0,0,r.width,r.height)}else this._canvas&&me.release(this._canvas),this._size=r.clone()},getWidth:function(){return this._size?this._size.width:0},setWidth:function(t){this.setSize(t,this.getHeight())},getHeight:function(){return this._size?this._size.height:0},setHeight:function(t){this.setSize(this.getWidth(),t)},getLoaded:function(){return this._loaded},isEmpty:function(){var t=this._size;return!t||t.width===0&&t.height===0},getResolution:function(){var t=this._matrix,e=new F(0,0).transform(t),r=new F(1,0).transform(t).subtract(e),s=new F(0,1).transform(t).subtract(e);return new G(72/r.getLength(),72/s.getLength())},getPpi:"#getResolution",getImage:function(){return this._image},setImage:function(t){var e=this;function r(s){var u=e.getView(),h=s&&s.type||"load";u&&e.responds(h)&&(jt=u._scope,e.emit(h,new _i(s)))}this._setImage(t),this._loaded?setTimeout(r,0):t&&ee.add(t,{load:function(s){e._setImage(t),r(s)},error:r})},_setImage:function(t){this._canvas&&me.release(this._canvas),t&&t.getContext?(this._image=null,this._canvas=t,this._loaded=!0):(this._image=t,this._canvas=null,this._loaded=!!(t&&t.src&&t.complete)),this._size=new G(t?t.naturalWidth||t.width:0,t?t.naturalHeight||t.height:0),this._context=null,this._changed(1033)},getCanvas:function(){if(!this._canvas){var t=me.getContext(this._size);try{this._image&&t.drawImage(this._image,0,0),this._canvas=t.canvas}catch{me.release(t)}}return this._canvas},setCanvas:"#setImage",getContext:function(t){return this._context||(this._context=this.getCanvas().getContext("2d")),t&&(this._image=null,this._changed(1025)),this._context},setContext:function(t){this._context=t},getSource:function(){var t=this._image;return t&&t.src||this.toDataURL()},setSource:function(t){var e=new n.Image,r=this._crossOrigin;r&&(e.crossOrigin=r),t&&(e.src=t),this.setImage(e)},getCrossOrigin:function(){var t=this._image;return t&&t.crossOrigin||this._crossOrigin||""},setCrossOrigin:function(t){this._crossOrigin=t;var e=this._image;e&&(e.crossOrigin=t)},getSmoothing:function(){return this._smoothing},setSmoothing:function(t){this._smoothing=typeof t=="string"?t:t?"low":"off",this._changed(257)},getElement:function(){return this._canvas||this._loaded&&this._image}},{beans:!1,getSubCanvas:function(){var t=nt.read(arguments),e=me.getContext(t.getSize());return e.drawImage(this.getCanvas(),t.x,t.y,t.width,t.height,0,0,t.width,t.height),e.canvas},getSubRaster:function(){var t=nt.read(arguments),e=new Ft(T.NO_INSERT);return e._setImage(this.getSubCanvas(t)),e.translate(t.getCenter().subtract(this.getSize().divide(2))),e._matrix.prepend(this._matrix),e.insertAbove(this),e},toDataURL:function(){var t=this._image,e=t&&t.src;if(/^data:/.test(e))return e;var r=this.getCanvas();return r?r.toDataURL.apply(r,arguments):null},drawImage:function(t){var e=F.read(arguments,1);this.getContext(!0).drawImage(t,e.x,e.y)},getAverageColor:function(t){var e,r;if(t?t instanceof ue?(r=t,e=t.getBounds()):typeof t=="object"&&("width"in t?e=new nt(t):"x"in t&&(e=new nt(t.x-.5,t.y-.5,1,1))):e=this.getBounds(),!e)return null;var s=32,u=Math.min(e.width,s),h=Math.min(e.height,s),p=Ft._sampleContext;p?p.clearRect(0,0,s+1,s+1):p=Ft._sampleContext=me.getContext(new G(s)),p.save();var d=new ft().scale(u/e.width,h/e.height).translate(-e.x,-e.y);d.applyToContext(p),r&&r.draw(p,new c({clip:!0,matrices:[d]})),this._matrix.applyToContext(p);var _=this.getElement(),g=this._size;_&&p.drawImage(_,-g.width/2,-g.height/2),p.restore();for(var y=p.getImageData(.5,.5,Math.ceil(u),Math.ceil(h)).data,w=[0,0,0],x=0,m=0,E=y.length;m<E;m+=4){var k=y[m+3];x+=k,k/=255,w[0]+=y[m]*k,w[1]+=y[m+1]*k,w[2]+=y[m+2]*k}for(var m=0;m<3;m++)w[m]/=x;return x?Mt.read(w):null},getPixel:function(){var t=F.read(arguments),e=this.getContext().getImageData(t.x,t.y,1,1).data;return new Mt("rgb",[e[0]/255,e[1]/255,e[2]/255],e[3]/255)},setPixel:function(){var t=arguments,e=F.read(t),r=Mt.read(t),s=r._convert("rgb"),u=r._alpha,h=this.getContext(!0),p=h.createImageData(1,1),d=p.data;d[0]=s[0]*255,d[1]=s[1]*255,d[2]=s[2]*255,d[3]=u!=null?u*255:255,h.putImageData(p,e.x,e.y)},clear:function(){var t=this._size;this.getContext(!0).clearRect(0,0,t.width+1,t.height+1)},createImageData:function(){var t=G.read(arguments);return this.getContext().createImageData(t.width,t.height)},getImageData:function(){var t=nt.read(arguments);return t.isEmpty()&&(t=new nt(this._size)),this.getContext().getImageData(t.x,t.y,t.width,t.height)},putImageData:function(t){var e=F.read(arguments,1);this.getContext(!0).putImageData(t,e.x,e.y)},setImageData:function(t){this.setSize(t),this.getContext(!0).putImageData(t,0,0)},_getBounds:function(t,e){var r=new nt(this._size).setCenter(0,0);return t?t._transformBounds(r):r},_hitTestSelf:function(t){if(this._contains(t)){var e=this;return new Rt("pixel",e,{offset:t.add(e._size.divide(2)).round(),color:{get:function(){return e.getPixel(this.offset)}}})}},_draw:function(t,e,r){var s=this.getElement();if(s&&s.width>0&&s.height>0){t.globalAlpha=K.clamp(this._opacity,0,1),this._setStyles(t,e,r);var u=this._smoothing,h=u==="off";Kt.setPrefixed(t,h?"imageSmoothingEnabled":"imageSmoothingQuality",h?!1:u),t.drawImage(s,-this._size.width/2,-this._size.height/2)}},_canComposite:function(){return!0}}),Wt=T.extend({_class:"SymbolItem",_applyMatrix:!1,_canApplyMatrix:!1,_boundsOptions:{stroke:!0},_serializeFields:{symbol:null},initialize:function(e,r){this._initialize(e,r!==a&&F.read(arguments,1))||this.setDefinition(e instanceof Ot?e:new Ot(e))},_equals:function(t){return this._definition===t._definition},copyContent:function(t){this.setDefinition(t._definition)},getDefinition:function(){return this._definition},setDefinition:function(t){this._definition=t,this._changed(9)},getSymbol:"#getDefinition",setSymbol:"#setDefinition",isEmpty:function(){return this._definition._item.isEmpty()},_getBounds:function(t,e){var r=this._definition._item;return r._getCachedBounds(r._matrix.prepended(t),e)},_hitTestSelf:function(t,e,r){var s=e.extend({all:!1}),u=this._definition._item._hitTest(t,s,r);return u&&(u.item=this),u},_draw:function(t,e){this._definition._item.draw(t,e)}}),Ot=c.extend({_class:"SymbolDefinition",initialize:function(e,r){this._id=it.get(),this.project=jt.project,e&&this.setItem(e,r)},_serialize:function(t,e){return e.add(this,function(){return c.serialize([this._class,this._item],t,!1,e)})},_changed:function(t){t&8&&T._clearBoundsCache(this),t&1&&this.project._changed(t)},getItem:function(){return this._item},setItem:function(t,e){t._symbol&&(t=t.clone()),this._item&&(this._item._symbol=null),this._item=t,t.remove(),t.setSelected(!1),e||t.setPosition(new F),t._symbol=this,this._changed(9)},getDefinition:"#getItem",setDefinition:"#setItem",place:function(t){return new Wt(this,t)},clone:function(){return new Ot(this._item.clone(!1))},equals:function(t){return t===this||t&&this._item.equals(t._item)||!1}}),Rt=c.extend({_class:"HitResult",initialize:function(e,r,s){this.type=e,this.item=r,s&&this.inject(s)},statics:{getOptions:function(t){var e=t&&c.read(t);return new c({type:null,tolerance:jt.settings.hitTolerance,fill:!e,stroke:!e,segments:!e,handles:!1,ends:!1,position:!1,center:!1,bounds:!1,guides:!1,selected:!1},e)}}}),wt=c.extend({_class:"Segment",beans:!0,_selection:0,initialize:function(e,r,s,u,h,p){var d=arguments.length,_,g,y,w;d>0&&(e==null||typeof e=="object"?d===1&&e&&"point"in e?(_=e.point,g=e.handleIn,y=e.handleOut,w=e.selection):(_=e,g=r,y=s,w=u):(_=[e,r],g=s!==a?[s,u]:null,y=h!==a?[h,p]:null)),new te(_,this,"_point"),new te(g,this,"_handleIn"),new te(y,this,"_handleOut"),w&&this.setSelection(w)},_serialize:function(t,e){var r=this._point,s=this._selection,u=s||this.hasHandles()?[r,this._handleIn,this._handleOut]:r;return s&&u.push(s),c.serialize(u,t,!0,e)},_changed:function(t){var e=this._path;if(e){var r=e._curves,s=this._index,u;r&&((!t||t===this._point||t===this._handleIn)&&(u=s>0?r[s-1]:e._closed?r[r.length-1]:null)&&u._changed(),(!t||t===this._point||t===this._handleOut)&&(u=r[s])&&u._changed()),e._changed(41)}},getPoint:function(){return this._point},setPoint:function(){this._point.set(F.read(arguments))},getHandleIn:function(){return this._handleIn},setHandleIn:function(){this._handleIn.set(F.read(arguments))},getHandleOut:function(){return this._handleOut},setHandleOut:function(){this._handleOut.set(F.read(arguments))},hasHandles:function(){return!this._handleIn.isZero()||!this._handleOut.isZero()},isSmooth:function(){var t=this._handleIn,e=this._handleOut;return!t.isZero()&&!e.isZero()&&t.isCollinear(e)},clearHandles:function(){this._handleIn._set(0,0),this._handleOut._set(0,0)},getSelection:function(){return this._selection},setSelection:function(t){var e=this._selection,r=this._path;this._selection=t=t||0,r&&t!==e&&(r._updateSelection(this,e,t),r._changed(257))},_changeSelection:function(t,e){var r=this._selection;this.setSelection(e?r|t:r&~t)},isSelected:function(){return!!(this._selection&7)},setSelected:function(t){this._changeSelection(7,t)},getIndex:function(){return this._index!==a?this._index:null},getPath:function(){return this._path||null},getCurve:function(){var t=this._path,e=this._index;return t?(e>0&&!t._closed&&e===t._segments.length-1&&e--,t.getCurves()[e]||null):null},getLocation:function(){var t=this.getCurve();return t?new Qt(t,this===t._segment1?0:1):null},getNext:function(){var t=this._path&&this._path._segments;return t&&(t[this._index+1]||this._path._closed&&t[0])||null},smooth:function(t,e,r){var s=t||{},u=s.type,h=s.factor,p=this.getPrevious(),d=this.getNext(),_=(p||this)._point,g=this._point,y=(d||this)._point,w=_.getDistance(g),x=g.getDistance(y);if(!u||u==="catmull-rom"){var m=h===a?.5:h,E=Math.pow(w,m),k=E*E,A=Math.pow(x,m),b=A*A;if(!e&&p){var C=2*b+3*A*E+k,v=3*A*(A+E);this.setHandleIn(v!==0?new F((b*_._x+C*g._x-k*y._x)/v-g._x,(b*_._y+C*g._y-k*y._y)/v-g._y):new F)}if(!r&&d){var C=2*k+3*E*A+b,v=3*E*(E+A);this.setHandleOut(v!==0?new F((k*y._x+C*g._x-b*_._x)/v-g._x,(k*y._y+C*g._y-b*_._y)/v-g._y):new F)}}else if(u==="geometric"){if(p&&d){var I=_.subtract(y),L=h===a?.4:h,R=L*w/(w+x);e||this.setHandleIn(I.multiply(R)),r||this.setHandleOut(I.multiply(R-L))}}else throw new Error("Smoothing method '"+u+"' not supported.")},getPrevious:function(){var t=this._path&&this._path._segments;return t&&(t[this._index-1]||this._path._closed&&t[t.length-1])||null},isFirst:function(){return!this._index},isLast:function(){var t=this._path;return t&&this._index===t._segments.length-1||!1},reverse:function(){var t=this._handleIn,e=this._handleOut,r=t.clone();t.set(e),e.set(r)},reversed:function(){return new wt(this._point,this._handleOut,this._handleIn)},remove:function(){return this._path?!!this._path.removeSegment(this._index):!1},clone:function(){return new wt(this._point,this._handleIn,this._handleOut)},equals:function(t){return t===this||t&&this._class===t._class&&this._point.equals(t._point)&&this._handleIn.equals(t._handleIn)&&this._handleOut.equals(t._handleOut)||!1},toString:function(){var t=["point: "+this._point];return this._handleIn.isZero()||t.push("handleIn: "+this._handleIn),this._handleOut.isZero()||t.push("handleOut: "+this._handleOut),"{ "+t.join(", ")+" }"},transform:function(t){this._transformCoordinates(t,new Array(6),!0),this._changed()},interpolate:function(t,e,r){var s=1-r,u=r,h=t._point,p=e._point,d=t._handleIn,_=e._handleIn,g=e._handleOut,y=t._handleOut;this._point._set(s*h._x+u*p._x,s*h._y+u*p._y,!0),this._handleIn._set(s*d._x+u*_._x,s*d._y+u*_._y,!0),this._handleOut._set(s*y._x+u*g._x,s*y._y+u*g._y,!0),this._changed()},_transformCoordinates:function(t,e,r){var s=this._point,u=!r||!this._handleIn.isZero()?this._handleIn:null,h=!r||!this._handleOut.isZero()?this._handleOut:null,p=s._x,d=s._y,_=2;return e[0]=p,e[1]=d,u&&(e[_++]=u._x+p,e[_++]=u._y+d),h&&(e[_++]=h._x+p,e[_++]=h._y+d),t&&(t._transformCoordinates(e,e,_/2),p=e[0],d=e[1],r?(s._x=p,s._y=d,_=2,u&&(u._x=e[_++]-p,u._y=e[_++]-d),h&&(h._x=e[_++]-p,h._y=e[_++]-d)):(u||(e[_++]=p,e[_++]=d),h||(e[_++]=p,e[_++]=d))),e}}),te=F.extend({initialize:function(e,r,s){var u,h,p;if(!e)u=h=0;else if((u=e[0])!==a)h=e[1];else{var d=e;(u=d.x)===a&&(d=F.read(arguments),u=d.x),h=d.y,p=d.selected}this._x=u,this._y=h,this._owner=r,r[s]=this,p&&this.setSelected(!0)},_set:function(t,e){return this._x=t,this._y=e,this._owner._changed(this),this},getX:function(){return this._x},setX:function(t){this._x=t,this._owner._changed(this)},getY:function(){return this._y},setY:function(t){this._y=t,this._owner._changed(this)},isZero:function(){var t=K.isZero;return t(this._x)&&t(this._y)},isSelected:function(){return!!(this._owner._selection&this._getSelection())},setSelected:function(t){this._owner._changeSelection(this._getSelection(),t)},_getSelection:function(){var t=this._owner;return this===t._point?1:this===t._handleIn?2:this===t._handleOut?4:0}}),_t=c.extend({_class:"Curve",beans:!0,initialize:function(e,r,s,u,h,p,d,_){var g=arguments.length,y,w,x,m,E,k;g===3?(this._path=e,y=r,w=s):g?g===1?"segment1"in e?(y=new wt(e.segment1),w=new wt(e.segment2)):"point1"in e?(x=e.point1,E=e.handle1,k=e.handle2,m=e.point2):Array.isArray(e)&&(x=[e[0],e[1]],m=[e[6],e[7]],E=[e[2]-e[0],e[3]-e[1]],k=[e[4]-e[6],e[5]-e[7]]):g===2?(y=new wt(e),w=new wt(r)):g===4?(x=e,E=r,k=s,m=u):g===8&&(x=[e,r],m=[d,_],E=[s-e,u-r],k=[h-d,p-_]):(y=new wt,w=new wt),this._segment1=y||new wt(x,null,E),this._segment2=w||new wt(m,k,null)},_serialize:function(t,e){return c.serialize(this.hasHandles()?[this.getPoint1(),this.getHandle1(),this.getHandle2(),this.getPoint2()]:[this.getPoint1(),this.getPoint2()],t,!0,e)},_changed:function(){this._length=this._bounds=a},clone:function(){return new _t(this._segment1,this._segment2)},toString:function(){var t=["point1: "+this._segment1._point];return this._segment1._handleOut.isZero()||t.push("handle1: "+this._segment1._handleOut),this._segment2._handleIn.isZero()||t.push("handle2: "+this._segment2._handleIn),t.push("point2: "+this._segment2._point),"{ "+t.join(", ")+" }"},classify:function(){return _t.classify(this.getValues())},remove:function(){var t=!1;if(this._path){var e=this._segment2,r=e._handleOut;t=e.remove(),t&&this._segment1._handleOut.set(r)}return t},getPoint1:function(){return this._segment1._point},setPoint1:function(){this._segment1._point.set(F.read(arguments))},getPoint2:function(){return this._segment2._point},setPoint2:function(){this._segment2._point.set(F.read(arguments))},getHandle1:function(){return this._segment1._handleOut},setHandle1:function(){this._segment1._handleOut.set(F.read(arguments))},getHandle2:function(){return this._segment2._handleIn},setHandle2:function(){this._segment2._handleIn.set(F.read(arguments))},getSegment1:function(){return this._segment1},getSegment2:function(){return this._segment2},getPath:function(){return this._path},getIndex:function(){return this._segment1._index},getNext:function(){var t=this._path&&this._path._curves;return t&&(t[this._segment1._index+1]||this._path._closed&&t[0])||null},getPrevious:function(){var t=this._path&&this._path._curves;return t&&(t[this._segment1._index-1]||this._path._closed&&t[t.length-1])||null},isFirst:function(){return!this._segment1._index},isLast:function(){var t=this._path;return t&&this._segment1._index===t._curves.length-1||!1},isSelected:function(){return this.getPoint1().isSelected()&&this.getHandle1().isSelected()&&this.getHandle2().isSelected()&&this.getPoint2().isSelected()},setSelected:function(t){this.getPoint1().setSelected(t),this.getHandle1().setSelected(t),this.getHandle2().setSelected(t),this.getPoint2().setSelected(t)},getValues:function(t){return _t.getValues(this._segment1,this._segment2,t)},getPoints:function(){for(var t=this.getValues(),e=[],r=0;r<8;r+=2)e.push(new F(t[r],t[r+1]));return e}},{getLength:function(){return this._length==null&&(this._length=_t.getLength(this.getValues(),0,1)),this._length},getArea:function(){return _t.getArea(this.getValues())},getLine:function(){return new gt(this._segment1._point,this._segment2._point)},getPart:function(t,e){return new _t(_t.getPart(this.getValues(),t,e))},getPartLength:function(t,e){return _t.getLength(this.getValues(),t,e)},divideAt:function(t){return this.divideAtTime(t&&t.curve===this?t.time:this.getTimeAt(t))},divideAtTime:function(t,e){var r=1e-8,s=1-r,u=null;if(t>=r&&t<=s){var h=_t.subdivide(this.getValues(),t),p=h[0],d=h[1],_=e||this.hasHandles(),g=this._segment1,y=this._segment2,w=this._path;_&&(g._handleOut._set(p[2]-p[0],p[3]-p[1]),y._handleIn._set(d[4]-d[6],d[5]-d[7]));var x=p[6],m=p[7],E=new wt(new F(x,m),_&&new F(p[4]-x,p[5]-m),_&&new F(d[2]-x,d[3]-m));w?(w.insert(g._index+1,E),u=this.getNext()):(this._segment2=E,this._changed(),u=new _t(E,y))}return u},splitAt:function(t){var e=this._path;return e?e.splitAt(t):null},splitAtTime:function(t){return this.splitAt(this.getLocationAtTime(t))},divide:function(t,e){return this.divideAtTime(t===a?.5:e?t:this.getTimeAt(t))},split:function(t,e){return this.splitAtTime(t===a?.5:e?t:this.getTimeAt(t))},reversed:function(){return new _t(this._segment2.reversed(),this._segment1.reversed())},clearHandles:function(){this._segment1._handleOut._set(0,0),this._segment2._handleIn._set(0,0)},statics:{getValues:function(t,e,r,s){var u=t._point,h=t._handleOut,p=e._handleIn,d=e._point,_=u.x,g=u.y,y=d.x,w=d.y,x=s?[_,g,_,g,y,w,y,w]:[_,g,_+h._x,g+h._y,y+p._x,w+p._y,y,w];return r&&r._transformCoordinates(x,x,4),x},subdivide:function(t,e){var r=t[0],s=t[1],u=t[2],h=t[3],p=t[4],d=t[5],_=t[6],g=t[7];e===a&&(e=.5);var y=1-e,w=y*r+e*u,x=y*s+e*h,m=y*u+e*p,E=y*h+e*d,k=y*p+e*_,A=y*d+e*g,b=y*w+e*m,C=y*x+e*E,v=y*m+e*k,I=y*E+e*A,L=y*b+e*v,R=y*C+e*I;return[[r,s,w,x,b,C,L,R],[L,R,v,I,k,A,_,g]]},getMonoCurves:function(t,e){var r=[],s=e?0:1,u=t[s+0],h=t[s+2],p=t[s+4],d=t[s+6];if(u>=h==h>=p&&h>=p==p>=d||_t.isStraight(t))r.push(t);else{var _=3*(h-p)-u+d,g=2*(u+p)-4*h,y=h-u,w=1e-8,x=1-w,m=[],E=K.solveQuadratic(_,g,y,m,w,x);if(!E)r.push(t);else{m.sort();var k=m[0],A=_t.subdivide(t,k);r.push(A[0]),E>1&&(k=(m[1]-k)/(1-k),A=_t.subdivide(A[1],k),r.push(A[0])),r.push(A[1])}}return r},solveCubic:function(t,e,r,s,u,h){var p=t[e],d=t[e+2],_=t[e+4],g=t[e+6],y=0;if(!(p<r&&g<r&&d<r&&_<r||p>r&&g>r&&d>r&&_>r)){var w=3*(d-p),x=3*(_-d)-w,m=g-p-w-x;y=K.solveCubic(m,x,w,p-r,s,u,h)}return y},getTimeOf:function(t,e){var r=new F(t[0],t[1]),s=new F(t[6],t[7]),u=1e-12,h=1e-7,p=e.isClose(r,u)?0:e.isClose(s,u)?1:null;if(p===null)for(var d=[e.x,e.y],_=[],g=0;g<2;g++)for(var y=_t.solveCubic(t,g,d[g],_,0,1),w=0;w<y;w++){var x=_[w];if(e.isClose(_t.getPoint(t,x),h))return x}return e.isClose(r,h)?0:e.isClose(s,h)?1:null},getNearestTime:function(t,e){if(_t.isStraight(t)){var r=t[0],s=t[1],u=t[6],h=t[7],p=u-r,d=h-s,_=p*p+d*d;if(_===0)return 0;var g=((e.x-r)*p+(e.y-s)*d)/_;return g<1e-12?0:g>.999999999999?1:_t.getTimeOf(t,new F(r+g*p,s+g*d))}var y=100,w=1/0,x=0;function m(A){if(A>=0&&A<=1){var b=e.getDistance(_t.getPoint(t,A),!0);if(b<w)return w=b,x=A,!0}}for(var E=0;E<=y;E++)m(E/y);for(var k=1/(y*2);k>1e-8;)!m(x-k)&&!m(x+k)&&(k/=2);return x},getPart:function(t,e,r){var s=e>r;if(s){var u=e;e=r,r=u}return e>0&&(t=_t.subdivide(t,e)[1]),r<1&&(t=_t.subdivide(t,(r-e)/(1-e))[0]),s?[t[6],t[7],t[4],t[5],t[2],t[3],t[0],t[1]]:t},isFlatEnough:function(t,e){var r=t[0],s=t[1],u=t[2],h=t[3],p=t[4],d=t[5],_=t[6],g=t[7],y=3*u-2*r-_,w=3*h-2*s-g,x=3*p-2*_-r,m=3*d-2*g-s;return Math.max(y*y,x*x)+Math.max(w*w,m*m)<=16*e*e},getArea:function(t){var e=t[0],r=t[1],s=t[2],u=t[3],h=t[4],p=t[5],d=t[6],_=t[7];return 3*((_-r)*(s+h)-(d-e)*(u+p)+u*(e-h)-s*(r-p)+_*(h+e/3)-d*(p+r/3))/20},getBounds:function(t){for(var e=t.slice(0,2),r=e.slice(),s=[0,0],u=0;u<2;u++)_t._addBounds(t[u],t[u+2],t[u+4],t[u+6],u,0,e,r,s);return new nt(e[0],e[1],r[0]-e[0],r[1]-e[1])},_addBounds:function(t,e,r,s,u,h,p,d,_){function g(L,R){var M=L-R,V=L+R;M<p[u]&&(p[u]=M),V>d[u]&&(d[u]=V)}h/=2;var y=p[u]+h,w=d[u]-h;if(t<y||e<y||r<y||s<y||t>w||e>w||r>w||s>w)if(e<t!=e<s&&r<t!=r<s)g(t,0),g(s,0);else{var x=3*(e-r)-t+s,m=2*(t+r)-4*e,E=e-t,k=K.solveQuadratic(x,m,E,_),A=1e-8,b=1-A;g(s,0);for(var C=0;C<k;C++){var v=_[C],I=1-v;A<=v&&v<=b&&g(I*I*I*t+3*I*I*v*e+3*I*v*v*r+v*v*v*s,h)}}}}},c.each(["getBounds","getStrokeBounds","getHandleBounds"],function(t){this[t]=function(){this._bounds||(this._bounds={});var e=this._bounds[t];return e||(e=this._bounds[t]=zt[t]([this._segment1,this._segment2],!1,this._path)),e.clone()}},{}),c.each({isStraight:function(t,e,r,s){if(e.isZero()&&r.isZero())return!0;var u=s.subtract(t);if(u.isZero())return!1;if(u.isCollinear(e)&&u.isCollinear(r)){var h=new gt(t,s),p=1e-7;if(h.getDistance(t.add(e))<p&&h.getDistance(s.add(r))<p){var d=u.dot(u),_=u.dot(e)/d,g=u.dot(r)/d;return _>=0&&_<=1&&g<=0&&g>=-1}}return!1},isLinear:function(t,e,r,s){var u=s.subtract(t).divide(3);return e.equals(u)&&r.negate().equals(u)}},function(t,e){this[e]=function(r){var s=this._segment1,u=this._segment2;return t(s._point,s._handleOut,u._handleIn,u._point,r)},this.statics[e]=function(r,s){var u=r[0],h=r[1],p=r[6],d=r[7];return t(new F(u,h),new F(r[2]-u,r[3]-h),new F(r[4]-p,r[5]-d),new F(p,d),s)}},{statics:{},hasHandles:function(){return!this._segment1._handleOut.isZero()||!this._segment2._handleIn.isZero()},hasLength:function(t){return(!this.getPoint1().equals(this.getPoint2())||this.hasHandles())&&this.getLength()>(t||0)},isCollinear:function(t){return t&&this.isStraight()&&t.isStraight()&&this.getLine().isCollinear(t.getLine())},isHorizontal:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).y)<1e-8},isVertical:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).x)<1e-8}}),{beans:!1,getLocationAt:function(t,e){return this.getLocationAtTime(e?t:this.getTimeAt(t))},getLocationAtTime:function(t){return t!=null&&t>=0&&t<=1?new Qt(this,t):null},getTimeAt:function(t,e){return _t.getTimeAt(this.getValues(),t,e)},getParameterAt:"#getTimeAt",getTimesWithTangent:function(){var t=F.read(arguments);return t.isZero()?[]:_t.getTimesWithTangent(this.getValues(),t)},getOffsetAtTime:function(t){return this.getPartLength(0,t)},getLocationOf:function(){return this.getLocationAtTime(this.getTimeOf(F.read(arguments)))},getOffsetOf:function(){var t=this.getLocationOf.apply(this,arguments);return t?t.getOffset():null},getTimeOf:function(){return _t.getTimeOf(this.getValues(),F.read(arguments))},getParameterOf:"#getTimeOf",getNearestLocation:function(){var t=F.read(arguments),e=this.getValues(),r=_t.getNearestTime(e,t),s=_t.getPoint(e,r);return new Qt(this,r,s,null,t.getDistance(s))},getNearestPoint:function(){var t=this.getNearestLocation.apply(this,arguments);return t&&t.getPoint()}},new function(){var t=["getPoint","getTangent","getNormal","getWeightedTangent","getWeightedNormal","getCurvature"];return c.each(t,function(e){this[e+"At"]=function(r,s){var u=this.getValues();return _t[e](u,s?r:_t.getTimeAt(u,r))},this[e+"AtTime"]=function(r){return _t[e](this.getValues(),r)}},{statics:{_evaluateMethods:t}})},new function(){function t(s){var u=s[0],h=s[1],p=s[2],d=s[3],_=s[4],g=s[5],y=s[6],w=s[7],x=9*(p-_)+3*(y-u),m=6*(u+_)-12*p,E=3*(p-u),k=9*(d-g)+3*(w-h),A=6*(h+g)-12*d,b=3*(d-h);return function(C){var v=(x*C+m)*C+E,I=(k*C+A)*C+b;return Math.sqrt(v*v+I*I)}}function e(s,u){return Math.max(2,Math.min(16,Math.ceil(Math.abs(u-s)*32)))}function r(s,u,h,p){if(u==null||u<0||u>1)return null;var d=s[0],_=s[1],g=s[2],y=s[3],w=s[4],x=s[5],m=s[6],E=s[7],k=K.isZero;k(g-d)&&k(y-_)&&(g=d,y=_),k(w-m)&&k(x-E)&&(w=m,x=E);var A=3*(g-d),b=3*(w-g)-A,C=m-d-A-b,v=3*(y-_),I=3*(x-y)-v,L=E-_-v-I,R,M;if(h===0)R=u===0?d:u===1?m:((C*u+b)*u+A)*u+d,M=u===0?_:u===1?E:((L*u+I)*u+v)*u+_;else{var V=1e-8,U=1-V;if(u<V?(R=A,M=v):u>U?(R=3*(m-w),M=3*(E-x)):(R=(3*C*u+2*b)*u+A,M=(3*L*u+2*I)*u+v),p){R===0&&M===0&&(u<V||u>U)&&(R=w-g,M=x-y);var j=Math.sqrt(R*R+M*M);j&&(R/=j,M/=j)}if(h===3){var w=6*C*u+2*b,x=6*L*u+2*I,Y=Math.pow(R*R+M*M,3/2);R=Y!==0?(R*x-M*w)/Y:0,M=0}}return h===2?new F(M,-R):new F(R,M)}return{statics:{classify:function(s){var u=s[0],h=s[1],p=s[2],d=s[3],_=s[4],g=s[5],y=s[6],w=s[7],x=u*(w-g)+h*(_-y)+y*g-w*_,m=p*(h-w)+d*(y-u)+u*w-h*y,E=_*(d-h)+g*(u-p)+p*h-d*u,k=3*E,A=k-m,b=A-m+x,C=Math.sqrt(b*b+A*A+k*k),v=C!==0?1/C:0,I=K.isZero,L="serpentine";b*=v,A*=v,k*=v;function R(j,Y,H){var X=Y!==a,Q=X&&Y>0&&Y<1,$=X&&H>0&&H<1;return X&&(!(Q||$)||j==="loop"&&!(Q&&$))&&(j="arch",Q=$=!1),{type:j,roots:Q||$?Q&&$?Y<H?[Y,H]:[H,Y]:[Q?Y:H]:null}}if(I(b))return I(A)?R(I(k)?"line":"quadratic"):R(L,k/(3*A));var M=3*A*A-4*b*k;if(I(M))return R("cusp",A/(2*b));var V=M>0?Math.sqrt(M/3):Math.sqrt(-M),U=2*b;return R(M>0?L:"loop",(A+V)/U,(A-V)/U)},getLength:function(s,u,h,p){if(u===a&&(u=0),h===a&&(h=1),_t.isStraight(s)){var d=s;h<1&&(d=_t.subdivide(d,h)[0],u/=h),u>0&&(d=_t.subdivide(d,u)[1]);var _=d[6]-d[0],g=d[7]-d[1];return Math.sqrt(_*_+g*g)}return K.integrate(p||t(s),u,h,e(u,h))},getTimeAt:function(s,u,h){if(h===a&&(h=u<0?1:0),u===0)return h;var p=Math.abs,d=1e-12,_=u>0,g=_?h:0,y=_?1:h,w=t(s),x=_t.getLength(s,g,y,w),m=p(u)-x;if(p(m)<d)return _?y:g;if(m>d)return null;var E=u/x,k=0;function A(b){return k+=K.integrate(w,h,b,e(h,b)),h=b,k-u}return K.findRoot(A,w,h+E,g,y,32,1e-12)},getPoint:function(s,u){return r(s,u,0,!1)},getTangent:function(s,u){return r(s,u,1,!0)},getWeightedTangent:function(s,u){return r(s,u,1,!1)},getNormal:function(s,u){return r(s,u,2,!0)},getWeightedNormal:function(s,u){return r(s,u,2,!1)},getCurvature:function(s,u){return r(s,u,3,!1).x},getPeaks:function(s){var u=s[0],h=s[1],p=s[2],d=s[3],_=s[4],g=s[5],y=s[6],w=s[7],x=-u+3*p-3*_+y,m=3*u-6*p+3*_,E=-3*u+3*p,k=-h+3*d-3*g+w,A=3*h-6*d+3*g,b=-3*h+3*d,C=1e-8,v=1-C,I=[];return K.solveCubic(9*(x*x+k*k),9*(x*m+A*k),2*(m*m+A*A)+3*(E*x+b*k),E*m+A*b,I,C,v),I.sort()}}}},new function(){function t(m,E,k,A,b,C,v){var I=!v&&k.getPrevious()===b,L=!v&&k!==b&&k.getNext()===b,R=1e-8,M=1-R;if(A!==null&&A>=(I?R:0)&&A<=(L?M:1)&&C!==null&&C>=(L?R:0)&&C<=(I?M:1)){var V=new Qt(k,A,null,v),U=new Qt(b,C,null,v);V._intersection=U,U._intersection=V,(!E||E(V))&&Qt.insert(m,V,!0)}}function e(m,E,k,A,b,C,v,I,L,R,M,V,U){if(++L>=4096||++I>=40)return L;var j=1e-9,Y=E[0],H=E[1],X=E[6],Q=E[7],$=gt.getSignedDistance,tt=$(Y,H,X,Q,E[2],E[3]),st=$(Y,H,X,Q,E[4],E[5]),mt=tt*st>0?3/4:4/9,yt=mt*Math.min(0,tt,st),St=mt*Math.max(0,tt,st),It=$(Y,H,X,Q,m[0],m[1]),lt=$(Y,H,X,Q,m[2],m[3]),ct=$(Y,H,X,Q,m[4],m[5]),Ct=$(Y,H,X,Q,m[6],m[7]),At=r(It,lt,ct,Ct),Et=At[0],Nt=At[1],Lt,Bt;if(tt===0&&st===0&&It===0&&lt===0&&ct===0&&Ct===0||(Lt=s(Et,Nt,yt,St))==null||(Bt=s(Et.reverse(),Nt.reverse(),yt,St))==null)return L;var Ut=R+(M-R)*Lt,Dt=R+(M-R)*Bt;if(Math.max(U-V,Dt-Ut)<j){var ke=(Ut+Dt)/2,Pt=(V+U)/2;t(b,C,v?A:k,v?Pt:ke,v?k:A,v?ke:Pt)}else{m=_t.getPart(m,Lt,Bt);var oe=U-V;if(Bt-Lt>.8)if(Dt-Ut>oe){var pe=_t.subdivide(m,.5),ke=(Ut+Dt)/2;L=e(E,pe[0],A,k,b,C,!v,I,L,V,U,Ut,ke),L=e(E,pe[1],A,k,b,C,!v,I,L,V,U,ke,Dt)}else{var pe=_t.subdivide(E,.5),Pt=(V+U)/2;L=e(pe[0],m,A,k,b,C,!v,I,L,V,Pt,Ut,Dt),L=e(pe[1],m,A,k,b,C,!v,I,L,Pt,U,Ut,Dt)}else oe===0||oe>=j?L=e(E,m,A,k,b,C,!v,I,L,V,U,Ut,Dt):L=e(m,E,k,A,b,C,v,I,L,Ut,Dt,V,U)}return L}function r(m,E,k,A){var b=[0,m],C=[1/3,E],v=[2/3,k],I=[1,A],L=E-(2*m+A)/3,R=k-(m+2*A)/3,M;if(L*R<0)M=[[b,C,I],[b,v,I]];else{var V=L/R;M=[V>=2?[b,C,I]:V<=.5?[b,v,I]:[b,C,v,I],[b,I]]}return(L||R)<0?M.reverse():M}function s(m,E,k,A){return m[0][1]<k?u(m,!0,k):E[0][1]>A?u(E,!1,A):m[0][0]}function u(m,E,k){for(var A=m[0][0],b=m[0][1],C=1,v=m.length;C<v;C++){var I=m[C][0],L=m[C][1];if(E?L>=k:L<=k)return L===k?I:A+(k-b)*(I-A)/(L-b);A=I,b=L}return null}function h(m,E,k,A,b){var C=K.isZero;if(C(A)&&C(b)){var v=_t.getTimeOf(m,new F(E,k));return v===null?[]:[v]}for(var I=Math.atan2(-b,A),L=Math.sin(I),R=Math.cos(I),M=[],V=[],U=0;U<8;U+=2){var j=m[U]-E,Y=m[U+1]-k;M.push(j*R-Y*L,j*L+Y*R)}return _t.solveCubic(M,1,0,V,0,1),V}function p(m,E,k,A,b,C,v){for(var I=E[0],L=E[1],R=E[6],M=E[7],V=h(m,I,L,R-I,M-L),U=0,j=V.length;U<j;U++){var Y=V[U],H=_t.getPoint(m,Y),X=_t.getTimeOf(E,H);X!==null&&t(b,C,v?A:k,v?X:Y,v?k:A,v?Y:X)}}function d(m,E,k,A,b,C){var v=gt.intersect(m[0],m[1],m[6],m[7],E[0],E[1],E[6],E[7]);v&&t(b,C,k,_t.getTimeOf(m,v),A,_t.getTimeOf(E,v))}function _(m,E,k,A,b,C){var v=1e-12,I=Math.min,L=Math.max;if(L(m[0],m[2],m[4],m[6])+v>I(E[0],E[2],E[4],E[6])&&I(m[0],m[2],m[4],m[6])-v<L(E[0],E[2],E[4],E[6])&&L(m[1],m[3],m[5],m[7])+v>I(E[1],E[3],E[5],E[7])&&I(m[1],m[3],m[5],m[7])-v<L(E[1],E[3],E[5],E[7])){var R=w(m,E);if(R)for(var M=0;M<2;M++){var V=R[M];t(b,C,k,V[0],A,V[1],!0)}else{var U=_t.isStraight(m),j=_t.isStraight(E),Y=U&&j,H=U&&!j,X=b.length;if((Y?d:U||j?p:e)(H?E:m,H?m:E,H?A:k,H?k:A,b,C,H,0,0,0,1,0,1),!Y||b.length===X)for(var M=0;M<4;M++){var Q=M>>1,$=M&1,tt=Q*6,st=$*6,mt=new F(m[tt],m[tt+1]),yt=new F(E[st],E[st+1]);mt.isClose(yt,v)&&t(b,C,k,Q,A,$)}}}return b}function g(m,E,k,A){var b=_t.classify(m);if(b.type==="loop"){var C=b.roots;t(k,A,E,C[0],E,C[1])}return k}function y(m,E,k,A,b,C){var v=1e-7,I=!E;I&&(E=m);for(var L=m.length,R=E.length,M=new Array(L),V=I?M:new Array(R),U=[],j=0;j<L;j++)M[j]=m[j].getValues(A);if(!I)for(var j=0;j<R;j++)V[j]=E[j].getValues(b);for(var Y=B.findCurveBoundsCollisions(M,V,v),H=0;H<L;H++){var X=m[H],Q=M[H];I&&g(Q,X,U,k);var $=Y[H];if($)for(var tt=0;tt<$.length;tt++){if(C&&U.length)return U;var st=$[tt];if(!I||st>H){var mt=E[st],yt=V[st];_(Q,yt,X,mt,U,k)}}}return U}function w(m,E){function k(Ct){var At=Ct[6]-Ct[0],Et=Ct[7]-Ct[1];return At*At+Et*Et}var A=Math.abs,b=gt.getDistance,C=1e-8,v=1e-7,I=_t.isStraight(m),L=_t.isStraight(E),R=I&&L,M=k(m)<k(E),V=M?E:m,U=M?m:E,j=V[0],Y=V[1],H=V[6]-j,X=V[7]-Y;if(b(j,Y,H,X,U[0],U[1],!0)<v&&b(j,Y,H,X,U[6],U[7],!0)<v)!R&&b(j,Y,H,X,V[2],V[3],!0)<v&&b(j,Y,H,X,V[4],V[5],!0)<v&&b(j,Y,H,X,U[2],U[3],!0)<v&&b(j,Y,H,X,U[4],U[5],!0)<v&&(I=L=R=!0);else if(R)return null;if(I^L)return null;for(var Q=[m,E],$=[],tt=0;tt<4&&$.length<2;tt++){var st=tt&1,mt=st^1,yt=tt>>1,St=_t.getTimeOf(Q[st],new F(Q[mt][yt?6:0],Q[mt][yt?7:1]));if(St!=null){var It=st?[yt,St]:[St,yt];(!$.length||A(It[0]-$[0][0])>C&&A(It[1]-$[0][1])>C)&&$.push(It)}if(tt>2&&!$.length)break}if($.length!==2)$=null;else if(!R){var lt=_t.getPart(m,$[0][0],$[1][0]),ct=_t.getPart(E,$[0][1],$[1][1]);(A(ct[2]-lt[2])>v||A(ct[3]-lt[3])>v||A(ct[4]-lt[4])>v||A(ct[5]-lt[5])>v)&&($=null)}return $}function x(m,E){var k=m[0],A=m[1],b=m[2],C=m[3],v=m[4],I=m[5],L=m[6],R=m[7],M=E.normalize(),V=M.x,U=M.y,j=3*L-9*v+9*b-3*k,Y=3*R-9*I+9*C-3*A,H=6*v-12*b+6*k,X=6*I-12*C+6*A,Q=3*b-3*k,$=3*C-3*A,tt=2*j*U-2*Y*V,st=[];if(Math.abs(tt)<K.CURVETIME_EPSILON){var mt=j*$-Y*Q,tt=j*X-Y*H;if(tt!=0){var yt=-mt/tt;yt>=0&&yt<=1&&st.push(yt)}}else{var St=(H*H-4*j*Q)*U*U+(-2*H*X+4*Y*Q+4*j*$)*V*U+(X*X-4*Y*$)*V*V,It=H*U-X*V;if(St>=0&&tt!=0){var lt=Math.sqrt(St),ct=-(It+lt)/tt,Ct=(-It+lt)/tt;ct>=0&&ct<=1&&st.push(ct),Ct>=0&&Ct<=1&&st.push(Ct)}}return st}return{getIntersections:function(m){var E=this.getValues(),k=m&&m!==this&&m.getValues();return k?_(E,k,this,m,[]):g(E,this,[])},statics:{getOverlaps:w,getIntersections:y,getCurveLineIntersections:h,getTimesWithTangent:x}}}),Qt=c.extend({_class:"CurveLocation",initialize:function(e,r,s,u,h){if(r>=.99999999){var p=e.getNext();p&&(r=0,e=p)}this._setCurve(e),this._time=r,this._point=s||e.getPointAtTime(r),this._overlap=u,this._distance=h,this._intersection=this._next=this._previous=null},_setPath:function(t){this._path=t,this._version=t?t._version:0},_setCurve:function(t){this._setPath(t._path),this._curve=t,this._segment=null,this._segment1=t._segment1,this._segment2=t._segment2},_setSegment:function(t){var e=t.getCurve();e?this._setCurve(e):(this._setPath(t._path),this._segment1=t,this._segment2=null),this._segment=t,this._time=t===this._segment1?0:1,this._point=t._point.clone()},getSegment:function(){var t=this._segment;if(!t){var e=this.getCurve(),r=this.getTime();r===0?t=e._segment1:r===1?t=e._segment2:r!=null&&(t=e.getPartLength(0,r)<e.getPartLength(r,1)?e._segment1:e._segment2),this._segment=t}return t},getCurve:function(){var t=this._path,e=this;t&&t._version!==this._version&&(this._time=this._offset=this._curveOffset=this._curve=null);function r(s){var u=s&&s.getCurve();if(u&&(e._time=u.getTimeOf(e._point))!=null)return e._setCurve(u),u}return this._curve||r(this._segment)||r(this._segment1)||r(this._segment2.getPrevious())},getPath:function(){var t=this.getCurve();return t&&t._path},getIndex:function(){var t=this.getCurve();return t&&t.getIndex()},getTime:function(){var t=this.getCurve(),e=this._time;return t&&e==null?this._time=t.getTimeOf(this._point):e},getParameter:"#getTime",getPoint:function(){return this._point},getOffset:function(){var t=this._offset;if(t==null){t=0;var e=this.getPath(),r=this.getIndex();if(e&&r!=null)for(var s=e.getCurves(),u=0;u<r;u++)t+=s[u].getLength();this._offset=t+=this.getCurveOffset()}return t},getCurveOffset:function(){var t=this._curveOffset;if(t==null){var e=this.getCurve(),r=this.getTime();this._curveOffset=t=r!=null&&e&&e.getPartLength(0,r)}return t},getIntersection:function(){return this._intersection},getDistance:function(){return this._distance},divide:function(){var t=this.getCurve(),e=t&&t.divideAtTime(this.getTime());return e&&this._setSegment(e._segment1),e},split:function(){var t=this.getCurve(),e=t._path,r=t&&t.splitAtTime(this.getTime());return r&&this._setSegment(e.getLastSegment()),r},equals:function(t,e){var r=this===t;if(!r&&t instanceof Qt){var s=this.getCurve(),u=t.getCurve(),h=s._path,p=u._path;if(h===p){var d=Math.abs,_=1e-7,g=d(this.getOffset()-t.getOffset()),y=!e&&this._intersection,w=!e&&t._intersection;r=(g<_||h&&d(h.getLength()-g)<_)&&(!y&&!w||y&&w&&y.equals(w,!0))}}return r},toString:function(){var t=[],e=this.getPoint(),r=q.instance;e&&t.push("point: "+e);var s=this.getIndex();s!=null&&t.push("index: "+s);var u=this.getTime();return u!=null&&t.push("time: "+r.number(u)),this._distance!=null&&t.push("distance: "+r.number(this._distance)),"{ "+t.join(", ")+" }"},isTouching:function(){var t=this._intersection;if(t&&this.getTangent().isCollinear(t.getTangent())){var e=this.getCurve(),r=t.getCurve();return!(e.isStraight()&&r.isStraight()&&e.getLine().intersect(r.getLine()))}return!1},isCrossing:function(){var t=this._intersection;if(!t)return!1;var e=this.getTime(),r=t.getTime(),s=1e-8,u=1-s,h=e>=s&&e<=u,p=r>=s&&r<=u;if(h&&p)return!this.isTouching();var d=this.getCurve(),_=d&&e<s?d.getPrevious():d,g=t.getCurve(),y=g&&r<s?g.getPrevious():g;if(e>u&&(d=d.getNext()),r>u&&(g=g.getNext()),!_||!d||!y||!g)return!1;var w=[];function x(V,U){var j=V.getValues(),Y=_t.classify(j).roots||_t.getPeaks(j),H=Y.length,X=_t.getLength(j,U&&H?Y[H-1]:0,!U&&H?Y[0]:1);w.push(H?X:X/32)}function m(V,U,j){return U<j?V>U&&V<j:V>U||V<j}h||(x(_,!0),x(d,!1)),p||(x(y,!0),x(g,!1));var E=this.getPoint(),k=Math.min.apply(Math,w),A=h?d.getTangentAtTime(e):d.getPointAt(k).subtract(E),b=h?A.negate():_.getPointAt(-k).subtract(E),C=p?g.getTangentAtTime(r):g.getPointAt(k).subtract(E),v=p?C.negate():y.getPointAt(-k).subtract(E),I=b.getAngle(),L=A.getAngle(),R=v.getAngle(),M=C.getAngle();return!!(h?m(I,R,M)^m(L,R,M)&&m(I,M,R)^m(L,M,R):m(R,I,L)^m(M,I,L)&&m(R,L,I)^m(M,L,I))},hasOverlap:function(){return!!this._overlap}},c.each(_t._evaluateMethods,function(t){var e=t+"At";this[t]=function(){var r=this.getCurve(),s=this.getTime();return s!=null&&r&&r[e](s,!0)}},{preserve:!0}),new function(){function t(e,r,s){var u=e.length,h=0,p=u-1;function d(E,k){for(var A=E+k;A>=-1&&A<=u;A+=k){var b=e[(A%u+u)%u];if(!r.getPoint().isClose(b.getPoint(),1e-7))break;if(r.equals(b))return b}return null}for(;h<=p;){var _=h+p>>>1,g=e[_],y;if(s&&(y=r.equals(g)?g:d(_,-1)||d(_,1)))return r._overlap&&(y._overlap=y._intersection._overlap=!0),y;var w=r.getPath(),x=g.getPath(),m=w!==x?w._id-x._id:r.getIndex()+r.getTime()-(g.getIndex()+g.getTime());m<0?p=_-1:h=_+1}return e.splice(h,0,r),r}return{statics:{insert:t,expand:function(e){for(var r=e.slice(),s=e.length-1;s>=0;s--)t(r,e[s]._intersection,!1);return r}}}}),ue=T.extend({_class:"PathItem",_selectBounds:!1,_canScaleStroke:!0,beans:!0,initialize:function(){},statics:{create:function(t){var e,r,s;if(c.isPlainObject(t)?(r=t.segments,e=t.pathData):Array.isArray(t)?r=t:typeof t=="string"&&(e=t),r){var u=r[0];s=u&&Array.isArray(u[0])}else e&&(s=(e.match(/m/gi)||[]).length>1||/z\s*\S+/i.test(e));var h=s?se:zt;return new h(t)}},_asPathItem:function(){return this},isClockwise:function(){return this.getArea()>=0},setClockwise:function(t){this.isClockwise()!=(t=!!t)&&this.reverse()},setPathData:function(t){var e=t&&t.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/ig),r,s=!1,u,h,p=new F,d=new F;function _(v,I){var L=+r[v];return s&&(L+=p[I]),L}function g(v){return new F(_(v,"x"),_(v+1,"y"))}this.clear();for(var y=0,w=e&&e.length;y<w;y++){var x=e[y],m=x[0],E=m.toLowerCase();r=x.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g);var k=r&&r.length;switch(s=m===E,u==="z"&&!/[mz]/.test(E)&&this.moveTo(p),E){case"m":case"l":for(var A=E==="m",b=0;b<k;b+=2)this[A?"moveTo":"lineTo"](p=g(b)),A&&(d=p,A=!1);h=p;break;case"h":case"v":var C=E==="h"?"x":"y";p=p.clone();for(var b=0;b<k;b++)p[C]=_(b,C),this.lineTo(p);h=p;break;case"c":for(var b=0;b<k;b+=6)this.cubicCurveTo(g(b),h=g(b+2),p=g(b+4));break;case"s":for(var b=0;b<k;b+=4)this.cubicCurveTo(/[cs]/.test(u)?p.multiply(2).subtract(h):p,h=g(b),p=g(b+2)),u=E;break;case"q":for(var b=0;b<k;b+=4)this.quadraticCurveTo(h=g(b),p=g(b+2));break;case"t":for(var b=0;b<k;b+=2)this.quadraticCurveTo(h=/[qt]/.test(u)?p.multiply(2).subtract(h):p,p=g(b)),u=E;break;case"a":for(var b=0;b<k;b+=7)this.arcTo(p=g(b+5),new G(+r[b],+r[b+1]),+r[b+2],+r[b+4],+r[b+3]);break;case"z":this.closePath(1e-12),p=d;break}u=E}},_canComposite:function(){return!(this.hasFill()&&this.hasStroke())},_contains:function(t){var e=t.isInside(this.getBounds({internal:!0,handle:!0}))?this._getWinding(t):{};return e.onPath||!!(this.getFillRule()==="evenodd"?e.windingL&1||e.windingR&1:e.winding)},getIntersections:function(t,e,r,s){var u=this===t||!t,h=this._matrix._orNullIfIdentity(),p=u?h:(r||t._matrix)._orNullIfIdentity();return u||this.getBounds(h).intersects(t.getBounds(p),1e-12)?_t.getIntersections(this.getCurves(),!u&&t.getCurves(),e,h,p,s):[]},getCrossings:function(t){return this.getIntersections(t,function(e){return e.isCrossing()})},getNearestLocation:function(){for(var t=F.read(arguments),e=this.getCurves(),r=1/0,s=null,u=0,h=e.length;u<h;u++){var p=e[u].getNearestLocation(t);p._distance<r&&(r=p._distance,s=p)}return s},getNearestPoint:function(){var t=this.getNearestLocation.apply(this,arguments);return t&&t.getPoint()},interpolate:function(t,e,r){var s=!this._children,u=s?"_segments":"_children",h=t[u],p=e[u],d=this[u];if(!h||!p||h.length!==p.length)throw new Error("Invalid operands in interpolate() call: "+t+", "+e);var _=d.length,g=p.length;if(_<g)for(var y=s?wt:zt,w=_;w<g;w++)this.add(new y);else _>g&&this[s?"removeSegments":"removeChildren"](g,_);for(var w=0;w<g;w++)d[w].interpolate(h[w],p[w],r);s&&(this.setClosed(t._closed),this._changed(9))},compare:function(t){var e=!1;if(t){var r=this._children||[this],s=t._children?t._children.slice():[t],u=r.length,h=s.length,p=[],d=0;e=!0;for(var _=B.findItemBoundsCollisions(r,s,K.GEOMETRIC_EPSILON),g=u-1;g>=0&&e;g--){var y=r[g];e=!1;var w=_[g];if(w)for(var x=w.length-1;x>=0&&!e;x--)y.compare(s[w[x]])&&(p[w[x]]||(p[w[x]]=!0,d++),e=!0)}e=e&&d===h}return e}}),zt=ue.extend({_class:"Path",_serializeFields:{segments:[],closed:!1},initialize:function(e){this._closed=!1,this._segments=[],this._version=0;var r=arguments,s=Array.isArray(e)?typeof e[0]=="object"?e:r:e&&e.size===a&&(e.x!==a||e.point!==a)?r:null;s&&s.length>0?this.setSegments(s):(this._curves=a,this._segmentSelection=0,!s&&typeof e=="string"&&(this.setPathData(e),e=null)),this._initialize(!s&&e)},_equals:function(t){return this._closed===t._closed&&c.equals(this._segments,t._segments)},copyContent:function(t){this.setSegments(t._segments),this._closed=t._closed},_changed:function t(e){if(t.base.call(this,e),e&8){if(this._length=this._area=a,e&32)this._version++;else if(this._curves)for(var r=0,s=this._curves.length;r<s;r++)this._curves[r]._changed()}else e&64&&(this._bounds=a)},getStyle:function(){var t=this._parent;return(t instanceof se?t:this)._style},getSegments:function(){return this._segments},setSegments:function(t){var e=this.isFullySelected(),r=t&&t.length;if(this._segments.length=0,this._segmentSelection=0,this._curves=a,r){var s=t[r-1];typeof s=="boolean"&&(this.setClosed(s),r--),this._add(wt.readList(t,0,{},r))}e&&this.setFullySelected(!0)},getFirstSegment:function(){return this._segments[0]},getLastSegment:function(){return this._segments[this._segments.length-1]},getCurves:function(){var t=this._curves,e=this._segments;if(!t){var r=this._countCurves();t=this._curves=new Array(r);for(var s=0;s<r;s++)t[s]=new _t(this,e[s],e[s+1]||e[0])}return t},getFirstCurve:function(){return this.getCurves()[0]},getLastCurve:function(){var t=this.getCurves();return t[t.length-1]},isClosed:function(){return this._closed},setClosed:function(t){if(this._closed!=(t=!!t)){if(this._closed=t,this._curves){var e=this._curves.length=this._countCurves();t&&(this._curves[e-1]=new _t(this,this._segments[e-1],this._segments[0]))}this._changed(41)}}},{beans:!0,getPathData:function(t,e){var r=this._segments,s=r.length,u=new q(e),h=new Array(6),p=!0,d,_,g,y,w,x,m,E,k=[];function A(C,v){if(C._transformCoordinates(t,h),d=h[0],_=h[1],p)k.push("M"+u.pair(d,_)),p=!1;else if(w=h[2],x=h[3],w===d&&x===_&&m===g&&E===y){if(!v){var I=d-g,L=_-y;k.push(I===0?"v"+u.number(L):L===0?"h"+u.number(I):"l"+u.pair(I,L))}}else k.push("c"+u.pair(m-g,E-y)+" "+u.pair(w-g,x-y)+" "+u.pair(d-g,_-y));g=d,y=_,m=h[4],E=h[5]}if(!s)return"";for(var b=0;b<s;b++)A(r[b]);return this._closed&&s>0&&(A(r[0],!0),k.push("z")),k.join("")},isEmpty:function(){return!this._segments.length},_transformContent:function(t){for(var e=this._segments,r=new Array(6),s=0,u=e.length;s<u;s++)e[s]._transformCoordinates(t,r,!0);return!0},_add:function(t,p){for(var r=this._segments,s=this._curves,u=t.length,h=p==null,p=h?r.length:p,d=0;d<u;d++){var _=t[d];_._path&&(_=t[d]=_.clone()),_._path=this,_._index=p+d,_._selection&&this._updateSelection(_,0,_._selection)}if(h)c.push(r,t);else{r.splice.apply(r,[p,0].concat(t));for(var d=p+u,g=r.length;d<g;d++)r[d]._index=d}if(s){var y=this._countCurves(),w=p>0&&p+u-1===y?p-1:p,x=w,m=Math.min(w+u,y);t._curves&&(s.splice.apply(s,[w,0].concat(t._curves)),x+=t._curves.length);for(var d=x;d<m;d++)s.splice(d,0,new _t(this,null,null));this._adjustCurves(w,m)}return this._changed(41),t},_adjustCurves:function(t,e){for(var r=this._segments,s=this._curves,u,h=t;h<e;h++)u=s[h],u._path=this,u._segment1=r[h],u._segment2=r[h+1]||r[0],u._changed();(u=s[this._closed&&!t?r.length-1:t-1])&&(u._segment2=r[t]||r[0],u._changed()),(u=s[e])&&(u._segment1=r[e],u._changed())},_countCurves:function(){var t=this._segments.length;return!this._closed&&t>0?t-1:t},add:function(t){var e=arguments;return e.length>1&&typeof t!="number"?this._add(wt.readList(e)):this._add([wt.read(e)])[0]},insert:function(t,e){var r=arguments;return r.length>2&&typeof e!="number"?this._add(wt.readList(r,1),t):this._add([wt.read(r,1)],t)[0]},addSegment:function(){return this._add([wt.read(arguments)])[0]},insertSegment:function(t){return this._add([wt.read(arguments,1)],t)[0]},addSegments:function(t){return this._add(wt.readList(t))},insertSegments:function(t,e){return this._add(wt.readList(e),t)},removeSegment:function(t){return this.removeSegments(t,t+1)[0]||null},removeSegments:function(t,e,r){t=t||0,e=c.pick(e,this._segments.length);var s=this._segments,u=this._curves,h=s.length,p=s.splice(t,e-t),d=p.length;if(!d)return p;for(var _=0;_<d;_++){var g=p[_];g._selection&&this._updateSelection(g,g._selection,0),g._index=g._path=null}for(var _=t,y=s.length;_<y;_++)s[_]._index=_;if(u){for(var w=t>0&&e===h+(this._closed?1:0)?t-1:t,u=u.splice(w,d),_=u.length-1;_>=0;_--)u[_]._path=null;r&&(p._curves=u.slice(1)),this._adjustCurves(w,w)}return this._changed(41),p},clear:"#removeSegments",hasHandles:function(){for(var t=this._segments,e=0,r=t.length;e<r;e++)if(t[e].hasHandles())return!0;return!1},clearHandles:function(){for(var t=this._segments,e=0,r=t.length;e<r;e++)t[e].clearHandles()},getLength:function(){if(this._length==null){for(var t=this.getCurves(),e=0,r=0,s=t.length;r<s;r++)e+=t[r].getLength();this._length=e}return this._length},getArea:function(){var t=this._area;if(t==null){var e=this._segments,r=this._closed;t=0;for(var s=0,u=e.length;s<u;s++){var h=s+1===u;t+=_t.getArea(_t.getValues(e[s],e[h?0:s+1],null,h&&!r))}this._area=t}return t},isFullySelected:function(){var t=this._segments.length;return this.isSelected()&&t>0&&this._segmentSelection===t*7},setFullySelected:function(t){t&&this._selectSegments(!0),this.setSelected(t)},setSelection:function t(e){e&1||this._selectSegments(!1),t.base.call(this,e)},_selectSegments:function(t){var e=this._segments,r=e.length,s=t?7:0;this._segmentSelection=s*r;for(var u=0;u<r;u++)e[u]._selection=s},_updateSelection:function(t,e,r){t._selection=r;var s=this._segmentSelection+=r-e;s>0&&this.setSelected(!0)},divideAt:function(t){var e=this.getLocationAt(t),r;return e&&(r=e.getCurve().divideAt(e.getCurveOffset()))?r._segment1:null},splitAt:function(t){var e=this.getLocationAt(t),r=e&&e.index,s=e&&e.time,u=1e-8,h=1-u;s>h&&(r++,s=0);var p=this.getCurves();if(r>=0&&r<p.length){s>=u&&p[r++].divideAtTime(s);var d=this.removeSegments(r,this._segments.length,!0),_;return this._closed?(this.setClosed(!1),_=this):(_=new zt(T.NO_INSERT),_.insertAbove(this),_.copyAttributes(this)),_._add(d,0),this.addSegment(d[0]),_}return null},split:function(t,e){var r,s=e===a?t:(r=this.getCurves()[t])&&r.getLocationAtTime(e);return s!=null?this.splitAt(s):null},join:function(t,e){var r=e||0;if(t&&t!==this){var s=t._segments,u=this.getLastSegment(),h=t.getLastSegment();if(!h)return this;u&&u._point.isClose(h._point,r)&&t.reverse();var p=t.getFirstSegment();if(u&&u._point.isClose(p._point,r))u.setHandleOut(p._handleOut),this._add(s.slice(1));else{var d=this.getFirstSegment();d&&d._point.isClose(p._point,r)&&t.reverse(),h=t.getLastSegment(),d&&d._point.isClose(h._point,r)?(d.setHandleIn(h._handleIn),this._add(s.slice(0,s.length-1),0)):this._add(s.slice())}t._closed&&this._add([s[0]]),t.remove()}var _=this.getFirstSegment(),g=this.getLastSegment();return _!==g&&_._point.isClose(g._point,r)&&(_.setHandleIn(g._handleIn),g.remove(),this.setClosed(!0)),this},reduce:function(t){for(var e=this.getCurves(),r=t&&t.simplify,s=r?1e-7:0,u=e.length-1;u>=0;u--){var h=e[u];!h.hasHandles()&&(!h.hasLength(s)||r&&h.isCollinear(h.getNext()))&&h.remove()}return this},reverse:function(){this._segments.reverse();for(var t=0,e=this._segments.length;t<e;t++){var r=this._segments[t],s=r._handleIn;r._handleIn=r._handleOut,r._handleOut=s,r._index=t}this._curves=null,this._changed(9)},flatten:function(t){for(var e=new Je(this,t||.25,256,!0),r=e.parts,s=r.length,u=[],h=0;h<s;h++)u.push(new wt(r[h].curve.slice(0,2)));!this._closed&&s>0&&u.push(new wt(r[s-1].curve.slice(6))),this.setSegments(u)},simplify:function(t){var e=new Ee(this).fit(t||2.5);return e&&this.setSegments(e),!!e},smooth:function(t){var e=this,r=t||{},s=r.type||"asymmetric",u=this._segments,h=u.length,p=this._closed;function d(Et,Nt){var Lt=Et&&Et.index;if(Lt!=null){var Bt=Et.path;if(Bt&&Bt!==e)throw new Error(Et._class+" "+Lt+" of "+Bt+" is not part of "+e);Nt&&Et instanceof _t&&Lt++}else Lt=typeof Et=="number"?Et:Nt;return Math.min(Lt<0&&p?Lt%h:Lt<0?Lt+h:Lt,h-1)}var _=p&&r.from===a&&r.to===a,g=d(r.from,0),y=d(r.to,h-1);if(g>y)if(p)g-=h;else{var w=g;g=y,y=w}if(/^(?:asymmetric|continuous)$/.test(s)){var x=s==="asymmetric",m=Math.min,E=y-g+1,k=E-1,A=_?m(E,4):1,b=A,C=A,v=[];if(p||(b=m(1,g),C=m(1,h-y-1)),k+=b+C,k<=1)return;for(var I=0,L=g-b;I<=k;I++,L++)v[I]=u[(L<0?L+h:L)%h]._point;for(var R=v[0]._x+2*v[1]._x,M=v[0]._y+2*v[1]._y,V=2,U=k-1,j=[R],Y=[M],H=[V],X=[],Q=[],I=1;I<k;I++){var $=I<U,tt=$||x?1:2,st=$?4:x?2:7,mt=$?4:x?3:8,yt=$?2:x?0:1,St=tt/V;V=H[I]=st-St,R=j[I]=mt*v[I]._x+yt*v[I+1]._x-St*R,M=Y[I]=mt*v[I]._y+yt*v[I+1]._y-St*M}X[U]=j[U]/H[U],Q[U]=Y[U]/H[U];for(var I=k-2;I>=0;I--)X[I]=(j[I]-X[I+1])/H[I],Q[I]=(Y[I]-Q[I+1])/H[I];X[k]=(3*v[k]._x-X[U])/2,Q[k]=(3*v[k]._y-Q[U])/2;for(var I=b,It=k-C,L=g;I<=It;I++,L++){var lt=u[L<0?L+h:L],ct=lt._point,Ct=X[I]-ct._x,At=Q[I]-ct._y;(_||I<It)&&lt.setHandleOut(Ct,At),(_||I>b)&&lt.setHandleIn(-Ct,-At)}}else for(var I=g;I<=y;I++)u[I<0?I+h:I].smooth(r,!_&&I===g,!_&&I===y)},toShape:function(t){if(!this._closed)return null;var e=this._segments,r,s,u,h;function p(x,m){var E=e[x],k=E.getNext(),A=e[m],b=A.getNext();return E._handleOut.isZero()&&k._handleIn.isZero()&&A._handleOut.isZero()&&b._handleIn.isZero()&&k._point.subtract(E._point).isCollinear(b._point.subtract(A._point))}function d(x){var m=e[x],E=m.getPrevious(),k=m.getNext();return E._handleOut.isZero()&&m._handleIn.isZero()&&m._handleOut.isZero()&&k._handleIn.isZero()&&m._point.subtract(E._point).isOrthogonal(k._point.subtract(m._point))}function _(x){var m=e[x],E=m.getNext(),k=m._handleOut,A=E._handleIn,b=.5522847498307936;if(k.isOrthogonal(A)){var C=m._point,v=E._point,I=new gt(C,k,!0).intersect(new gt(v,A,!0),!0);return I&&K.isZero(k.getLength()/I.subtract(C).getLength()-b)&&K.isZero(A.getLength()/I.subtract(v).getLength()-b)}return!1}function g(x,m){return e[x]._point.getDistance(e[m]._point)}if(!this.hasHandles()&&e.length===4&&p(0,2)&&p(1,3)&&d(1)?(r=vt.Rectangle,s=new G(g(0,3),g(0,1)),h=e[1]._point.add(e[2]._point).divide(2)):e.length===8&&_(0)&&_(2)&&_(4)&&_(6)&&p(1,5)&&p(3,7)?(r=vt.Rectangle,s=new G(g(1,6),g(0,3)),u=s.subtract(new G(g(0,7),g(1,2))).divide(2),h=e[3]._point.add(e[4]._point).divide(2)):e.length===4&&_(0)&&_(1)&&_(2)&&_(3)&&(K.isZero(g(0,2)-g(1,3))?(r=vt.Circle,u=g(0,2)/2):(r=vt.Ellipse,u=new G(g(2,0)/2,g(3,1)/2)),h=e[1]._point),r){var y=this.getPosition(!0),w=new r({center:y,size:s,radius:u,insert:!1});return w.copyAttributes(this,!0),w._matrix.prepend(this._matrix),w.rotate(h.subtract(y).getAngle()+90),(t===a||t)&&w.insertAbove(this),w}return null},toPath:"#clone",compare:function t(e){if(!e||e instanceof se)return t.base.call(this,e);var r=this.getCurves(),s=e.getCurves(),u=r.length,h=s.length;if(!u||!h)return u==h;for(var p=r[0].getValues(),d=[],_=0,g,y=0,w,x=0;x<h;x++){var A=s[x].getValues();d.push(A);var m=_t.getOverlaps(p,A);if(m){g=!x&&m[0][0]>0?h-1:x,w=m[0][1];break}}for(var E=Math.abs,k=1e-8,A=d[g],b;p&&A;){var m=_t.getOverlaps(p,A);if(m){var C=m[0][0];if(E(C-y)<k){y=m[1][0],y===1&&(p=++_<u?r[_].getValues():null,y=0);var v=m[0][1];if(E(v-w)<k){if(b||(b=[g,v]),w=m[1][1],w===1&&(++g>=h&&(g=0),A=d[g]||s[g].getValues(),w=0),!p)return b[0]===g&&b[1]===w;continue}}}break}return!1},_hitTestSelf:function(t,e,r,s){var u=this,h=this.getStyle(),p=this._segments,d=p.length,_=this._closed,g=e._tolerancePadding,y=g,w,x,m,E,k,A,b=e.stroke&&h.hasStroke(),C=e.fill&&h.hasFill(),v=e.curves,I=b?h.getStrokeWidth()/2:C&&e.tolerance>0||v?0:null;I!==null&&(I>0?(w=h.getStrokeJoin(),x=h.getStrokeCap(),m=h.getMiterLimit(),y=y.add(zt._getStrokePadding(I,s))):w=x="round");function L(X,Q){return t.subtract(X).divide(Q).length<=1}function R(X,Q,$){if(!e.selected||Q.isSelected()){var tt=X._point;if(Q!==tt&&(Q=Q.add(tt)),L(Q,y))return new Rt($,u,{segment:X,point:Q})}}function M(X,Q){return(Q||e.segments)&&R(X,X._point,"segment")||!Q&&e.handles&&(R(X,X._handleIn,"handle-in")||R(X,X._handleOut,"handle-out"))}function V(X){E.add(X)}function U(X){var Q=_||X._index>0&&X._index<d-1;if((Q?w:x)==="round")return L(X._point,y);if(E=new zt({internal:!0,closed:!0}),Q?X.isSmooth()||zt._addBevelJoin(X,w,I,m,null,s,V,!0):x==="square"&&zt._addSquareCap(X,x,I,null,s,V,!0),!E.isEmpty()){var $;return E.contains(t)||($=E.getNearestLocation(t))&&L($.getPoint(),g)}}if(e.ends&&!e.segments&&!_){if(A=M(p[0],!0)||M(p[d-1],!0))return A}else if(e.segments||e.handles){for(var j=0;j<d;j++)if(A=M(p[j]))return A}if(I!==null){if(k=this.getNearestLocation(t),k){var Y=k.getTime();Y===0||Y===1&&d>1?U(k.getSegment())||(k=null):L(k.getPoint(),y)||(k=null)}if(!k&&w==="miter"&&d>1)for(var j=0;j<d;j++){var H=p[j];if(t.getDistance(H._point)<=m*I&&U(H)){k=H.getLocation();break}}}return!k&&C&&this._contains(t)||k&&!b&&!v?new Rt("fill",this):k?new Rt(b?"stroke":"curve",this,{location:k,point:k.getPoint()}):null}},c.each(_t._evaluateMethods,function(t){this[t+"At"]=function(e){var r=this.getLocationAt(e);return r&&r[t]()}},{beans:!1,getLocationOf:function(){for(var t=F.read(arguments),e=this.getCurves(),r=0,s=e.length;r<s;r++){var u=e[r].getLocationOf(t);if(u)return u}return null},getOffsetOf:function(){var t=this.getLocationOf.apply(this,arguments);return t?t.getOffset():null},getLocationAt:function(t){if(typeof t=="number"){for(var e=this.getCurves(),r=0,s=0,u=e.length;s<u;s++){var h=r,p=e[s];if(r+=p.getLength(),r>t)return p.getLocationAt(t-h)}if(e.length>0&&t<=this.getLength())return new Qt(e[e.length-1],1)}else if(t&&t.getPath&&t.getPath()===this)return t;return null},getOffsetsWithTangent:function(){var t=F.read(arguments);if(t.isZero())return[];for(var e=[],r=0,s=this.getCurves(),u=0,h=s.length;u<h;u++){for(var p=s[u],d=p.getTimesWithTangent(t),_=0,g=d.length;_<g;_++){var y=r+p.getOffsetAtTime(d[_]);e.indexOf(y)<0&&e.push(y)}r+=p.length}return e}}),new function(){function t(r,s,u,h){if(h<=0)return;var p=h/2,d=h-2,_=p-1,g=new Array(6),y,w;function x(C){var v=g[C],I=g[C+1];(y!=v||w!=I)&&(r.beginPath(),r.moveTo(y,w),r.lineTo(v,I),r.stroke(),r.beginPath(),r.arc(v,I,p,0,Math.PI*2,!0),r.fill())}for(var m=0,E=s.length;m<E;m++){var k=s[m],A=k._selection;if(k._transformCoordinates(u,g),y=g[0],w=g[1],A&2&&x(2),A&4&&x(4),r.fillRect(y-p,w-p,h,h),d>0&&!(A&1)){var b=r.fillStyle;r.fillStyle="#ffffff",r.fillRect(y-_,w-_,d,d),r.fillStyle=b}}}function e(r,s,u){var h=s._segments,p=h.length,d=new Array(6),_=!0,g,y,w,x,m,E,k,A;function b(v){if(u)v._transformCoordinates(u,d),g=d[0],y=d[1];else{var I=v._point;g=I._x,y=I._y}if(_)r.moveTo(g,y),_=!1;else{if(u)m=d[2],E=d[3];else{var L=v._handleIn;m=g+L._x,E=y+L._y}m===g&&E===y&&k===w&&A===x?r.lineTo(g,y):r.bezierCurveTo(k,A,m,E,g,y)}if(w=g,x=y,u)k=d[4],A=d[5];else{var L=v._handleOut;k=w+L._x,A=x+L._y}}for(var C=0;C<p;C++)b(h[C]);s._closed&&p>0&&b(h[0])}return{_draw:function(r,s,u,h){var p=s.dontStart,d=s.dontFinish||s.clip,_=this.getStyle(),g=_.hasFill(),y=_.hasStroke(),w=_.getDashArray(),x=!jt.support.nativeDash&&y&&w&&w.length;p||r.beginPath(),(g||y&&!x||d)&&(e(r,this,h),this._closed&&r.closePath());function m(v){return w[(v%x+x)%x]}if(!d&&(g||y)&&(this._setStyles(r,s,u),g&&(r.fill(_.getFillRule()),r.shadowColor="rgba(0,0,0,0)"),y)){if(x){p||r.beginPath();for(var E=new Je(this,.25,32,!1,h),k=E.length,A=-_.getDashOffset(),b,C=0;A>0;)A-=m(C--)+m(C--);for(;A<k;)b=A+m(C++),(A>0||b>0)&&E.drawPart(r,Math.max(A,0),Math.max(b,0)),A=b+m(C++)}r.stroke()}},_drawSelected:function(r,s){r.beginPath(),e(r,this,s),r.stroke(),t(r,this._segments,s,jt.settings.handleSize)}}},new function(){function t(e){var r=e._segments;if(!r.length)throw new Error("Use a moveTo() command first");return r[r.length-1]}return{moveTo:function(){var e=this._segments;e.length===1&&this.removeSegment(0),e.length||this._add([new wt(F.read(arguments))])},moveBy:function(){throw new Error("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([new wt(F.read(arguments))])},cubicCurveTo:function(){var e=arguments,r=F.read(e),s=F.read(e),u=F.read(e),h=t(this);h.setHandleOut(r.subtract(h._point)),this._add([new wt(u,s.subtract(u))])},quadraticCurveTo:function(){var e=arguments,r=F.read(e),s=F.read(e),u=t(this)._point;this.cubicCurveTo(r.add(u.subtract(r).multiply(1/3)),r.add(s.subtract(r).multiply(1/3)),s)},curveTo:function(){var e=arguments,r=F.read(e),s=F.read(e),u=c.pick(c.read(e),.5),h=1-u,p=t(this)._point,d=r.subtract(p.multiply(h*h)).subtract(s.multiply(u*u)).divide(2*u*h);if(d.isNaN())throw new Error("Cannot put a curve through points with parameter = "+u);this.quadraticCurveTo(d,s)},arcTo:function(){var e=arguments,r=Math.abs,s=Math.sqrt,u=t(this),h=u._point,p=F.read(e),d,_=c.peek(e),g=c.pick(_,!0),y,w,x,m;if(typeof g=="boolean")var E=h.add(p).divide(2),d=E.add(E.subtract(h).rotate(g?-90:90));else if(c.remain(e)<=2)d=p,p=F.read(e);else if(!h.equals(p)){var k=G.read(e),A=K.isZero;if(A(k.width)||A(k.height))return this.lineTo(p);var b=c.read(e),g=!!c.read(e),C=!!c.read(e),E=h.add(p).divide(2),v=h.subtract(E).rotate(-b),I=v.x,L=v.y,R=r(k.width),M=r(k.height),V=R*R,U=M*M,j=I*I,Y=L*L,H=s(j/V+Y/U);if(H>1&&(R*=H,M*=H,V=R*R,U=M*M),H=(V*U-V*Y-U*j)/(V*Y+U*j),r(H)<1e-12&&(H=0),H<0)throw new Error("Cannot create an arc with the given arguments");y=new F(R*L/M,-M*I/R).multiply((C===g?-1:1)*s(H)).rotate(b).add(E),m=new ft().translate(y).rotate(b).scale(R,M),x=m._inverseTransform(h),w=x.getDirectedAngle(m._inverseTransform(p)),!g&&w>0?w-=360:g&&w<0&&(w+=360)}if(d){var X=new gt(h.add(d).divide(2),d.subtract(h).rotate(90),!0),Q=new gt(d.add(p).divide(2),p.subtract(d).rotate(90),!0),$=new gt(h,p),tt=$.getSide(d);if(y=X.intersect(Q,!0),!y){if(!tt)return this.lineTo(p);throw new Error("Cannot create an arc with the given arguments")}x=h.subtract(y),w=x.getDirectedAngle(p.subtract(y));var st=$.getSide(y,!0);st===0?w=tt*r(w):tt===st&&(w+=w<0?360:-360)}if(w){for(var mt=1e-5,yt=r(w),St=yt>=360?4:Math.ceil((yt-mt)/90),It=w/St,lt=It*Math.PI/360,ct=4/3*Math.sin(lt)/(1+Math.cos(lt)),Ct=[],At=0;At<=St;At++){var v=p,Et=null;if(At<St&&(Et=x.rotate(90).multiply(ct),m?(v=m._transformPoint(x),Et=m._transformPoint(x.add(Et)).subtract(v)):v=y.add(x)),!At)u.setHandleOut(Et);else{var Nt=x.rotate(-90).multiply(ct);m&&(Nt=m._transformPoint(x.add(Nt)).subtract(v)),Ct.push(new wt(v,Nt,Et))}x=x.rotate(It)}this._add(Ct)}},lineBy:function(){var e=F.read(arguments),r=t(this)._point;this.lineTo(r.add(e))},curveBy:function(){var e=arguments,r=F.read(e),s=F.read(e),u=c.read(e),h=t(this)._point;this.curveTo(h.add(r),h.add(s),u)},cubicCurveBy:function(){var e=arguments,r=F.read(e),s=F.read(e),u=F.read(e),h=t(this)._point;this.cubicCurveTo(h.add(r),h.add(s),h.add(u))},quadraticCurveBy:function(){var e=arguments,r=F.read(e),s=F.read(e),u=t(this)._point;this.quadraticCurveTo(u.add(r),u.add(s))},arcBy:function(){var e=arguments,r=t(this)._point,s=r.add(F.read(e)),u=c.pick(c.peek(e),!0);typeof u=="boolean"?this.arcTo(s,u):this.arcTo(s,r.add(F.read(e)))},closePath:function(e){this.setClosed(!0),this.join(this,e)}}},{_getBounds:function(t,e){var r=e.handle?"getHandleBounds":e.stroke?"getStrokeBounds":"getBounds";return zt[r](this._segments,this._closed,this,t,e)},statics:{getBounds:function(t,e,r,s,u,h){var p=t[0];if(!p)return new nt;var d=new Array(6),_=p._transformCoordinates(s,new Array(6)),g=_.slice(0,2),y=g.slice(),w=new Array(2);function x(k){k._transformCoordinates(s,d);for(var A=0;A<2;A++)_t._addBounds(_[A],_[A+4],d[A+2],d[A],A,h?h[A]:0,g,y,w);var b=_;_=d,d=b}for(var m=1,E=t.length;m<E;m++)x(t[m]);return e&&x(p),new nt(g[0],g[1],y[0]-g[0],y[1]-g[1])},getStrokeBounds:function(t,e,r,s,u){var h=r.getStyle(),p=h.hasStroke(),d=h.getStrokeWidth(),_=p&&r._getStrokeMatrix(s,u),g=p&&zt._getStrokePadding(d,_),y=zt.getBounds(t,e,r,s,u,g);if(!p)return y;var w=d/2,x=h.getStrokeJoin(),m=h.getStrokeCap(),E=h.getMiterLimit(),k=new nt(new G(g));function A(R){y=y.include(R)}function b(R){y=y.unite(k.setCenter(R._point.transform(s)))}function C(R,M){M==="round"||R.isSmooth()?b(R):zt._addBevelJoin(R,M,w,E,s,_,A)}function v(R,M){M==="round"?b(R):zt._addSquareCap(R,M,w,s,_,A)}var I=t.length-(e?0:1);if(I>0){for(var L=1;L<I;L++)C(t[L],x);e?C(t[0],x):(v(t[0],m),v(t[t.length-1],m))}return y},_getStrokePadding:function(t,e){if(!e)return[t,t];var r=new F(t,0).transform(e),s=new F(0,t).transform(e),u=r.getAngleInRadians(),h=r.getLength(),p=s.getLength(),d=Math.sin(u),_=Math.cos(u),g=Math.tan(u),y=Math.atan2(p*g,h),w=Math.atan2(p,g*h);return[Math.abs(h*Math.cos(y)*_+p*Math.sin(y)*d),Math.abs(p*Math.sin(w)*_+h*Math.cos(w)*d)]},_addBevelJoin:function(t,e,r,s,u,h,p,d){var _=t.getCurve(),g=_.getPrevious(),y=_.getPoint1().transform(u),w=g.getNormalAtTime(1).multiply(r).transform(h),x=_.getNormalAtTime(0).multiply(r).transform(h),m=w.getDirectedAngle(x);if((m<0||m>=180)&&(w=w.negate(),x=x.negate()),d&&p(y),p(y.add(w)),e==="miter"){var E=new gt(y.add(w),new F(-w.y,w.x),!0).intersect(new gt(y.add(x),new F(-x.y,x.x),!0),!0);E&&y.getDistance(E)<=s*r&&p(E)}p(y.add(x))},_addSquareCap:function(t,e,r,s,u,h,p){var d=t._point.transform(s),_=t.getLocation(),g=_.getNormal().multiply(_.getTime()===0?r:-r).transform(u);e==="square"&&(p&&(h(d.subtract(g)),h(d.add(g))),d=d.add(g.rotate(-90))),h(d.add(g)),h(d.subtract(g))},getHandleBounds:function(t,e,r,s,u){var h=r.getStyle(),p=u.stroke&&h.hasStroke(),d,_;if(p){var g=r._getStrokeMatrix(s,u),y=h.getStrokeWidth()/2,w=y;h.getStrokeJoin()==="miter"&&(w=y*h.getMiterLimit()),h.getStrokeCap()==="square"&&(w=Math.max(w,y*Math.SQRT2)),d=zt._getStrokePadding(y,g),_=zt._getStrokePadding(w,g)}for(var x=new Array(6),m=1/0,E=-m,k=m,A=E,b=0,C=t.length;b<C;b++){var v=t[b];v._transformCoordinates(s,x);for(var I=0;I<6;I+=2){var L=I?d:_,R=L?L[0]:0,M=L?L[1]:0,V=x[I],U=x[I+1],j=V-R,Y=V+R,H=U-M,X=U+M;j<m&&(m=j),Y>E&&(E=Y),H<k&&(k=H),X>A&&(A=X)}}return new nt(m,k,E-m,A-k)}}});zt.inject({statics:new function(){var t=.5522847498307936,e=[new wt([-1,0],[0,t],[0,-t]),new wt([0,-1],[-t,0],[t,0]),new wt([1,0],[0,-t],[0,t]),new wt([0,1],[t,0],[-t,0])];function r(u,h,p){var d=c.getNamed(p),_=new zt(d&&(d.insert==!0?T.INSERT:d.insert==!1?T.NO_INSERT:null));return _._add(u),_._closed=h,_.set(d,T.INSERT)}function s(u,h,p){for(var d=new Array(4),_=0;_<4;_++){var g=e[_];d[_]=new wt(g._point.multiply(h).add(u),g._handleIn.multiply(h),g._handleOut.multiply(h))}return r(d,!0,p)}return{Line:function(){var u=arguments;return r([new wt(F.readNamed(u,"from")),new wt(F.readNamed(u,"to"))],!1,u)},Circle:function(){var u=arguments,h=F.readNamed(u,"center"),p=c.readNamed(u,"radius");return s(h,new G(p),u)},Rectangle:function(){var u=arguments,h=nt.readNamed(u,"rectangle"),p=G.readNamed(u,"radius",0,{readNull:!0}),d=h.getBottomLeft(!0),_=h.getTopLeft(!0),g=h.getTopRight(!0),y=h.getBottomRight(!0),w;if(!p||p.isZero())w=[new wt(d),new wt(_),new wt(g),new wt(y)];else{p=G.min(p,h.getSize(!0).divide(2));var x=p.width,m=p.height,E=x*t,k=m*t;w=[new wt(d.add(x,0),null,[-E,0]),new wt(d.subtract(0,m),[0,k]),new wt(_.add(0,m),null,[0,-k]),new wt(_.add(x,0),[-E,0],null),new wt(g.subtract(x,0),null,[E,0]),new wt(g.add(0,m),[0,-k],null),new wt(y.subtract(0,m),null,[0,k]),new wt(y.subtract(x,0),[E,0])]}return r(w,!0,u)},RoundRectangle:"#Rectangle",Ellipse:function(){var u=arguments,h=vt._readEllipse(u);return s(h.center,h.radius,u)},Oval:"#Ellipse",Arc:function(){var u=arguments,h=F.readNamed(u,"from"),p=F.readNamed(u,"through"),d=F.readNamed(u,"to"),_=c.getNamed(u),g=new zt(_&&_.insert==!1&&T.NO_INSERT);return g.moveTo(h),g.arcTo(p,d),g.set(_)},RegularPolygon:function(){for(var u=arguments,h=F.readNamed(u,"center"),p=c.readNamed(u,"sides"),d=c.readNamed(u,"radius"),_=360/p,g=p%3===0,y=new F(0,g?-d:d),w=g?-1:.5,x=new Array(p),m=0;m<p;m++)x[m]=new wt(h.add(y.rotate((m+w)*_)));return r(x,!0,u)},Star:function(){for(var u=arguments,h=F.readNamed(u,"center"),p=c.readNamed(u,"points")*2,d=c.readNamed(u,"radius1"),_=c.readNamed(u,"radius2"),g=360/p,y=new F(0,-1),w=new Array(p),x=0;x<p;x++)w[x]=new wt(h.add(y.rotate(g*x).multiply(x%2?_:d)));return r(w,!0,u)}}}});var se=ue.extend({_class:"CompoundPath",_serializeFields:{children:[]},beans:!0,initialize:function(e){this._children=[],this._namedChildren={},this._initialize(e)||(typeof e=="string"?this.setPathData(e):this.addChildren(Array.isArray(e)?e:arguments))},insertChildren:function t(e,r){var s=r,u=s[0];u&&typeof u[0]=="number"&&(s=[s]);for(var h=r.length-1;h>=0;h--){var p=s[h];s===r&&!(p instanceof zt)&&(s=c.slice(s)),Array.isArray(p)?s[h]=new zt({segments:p,insert:!1}):p instanceof se&&(s.splice.apply(s,[h,1].concat(p.removeChildren())),p.remove())}return t.base.call(this,e,s)},reduce:function t(e){for(var r=this._children,s=r.length-1;s>=0;s--){var u=r[s].reduce(e);u.isEmpty()&&u.remove()}if(!r.length){var u=new zt(T.NO_INSERT);return u.copyAttributes(this),u.insertAbove(this),this.remove(),u}return t.base.call(this)},isClosed:function(){for(var t=this._children,e=0,r=t.length;e<r;e++)if(!t[e]._closed)return!1;return!0},setClosed:function(t){for(var e=this._children,r=0,s=e.length;r<s;r++)e[r].setClosed(t)},getFirstSegment:function(){var t=this.getFirstChild();return t&&t.getFirstSegment()},getLastSegment:function(){var t=this.getLastChild();return t&&t.getLastSegment()},getCurves:function(){for(var t=this._children,e=[],r=0,s=t.length;r<s;r++)c.push(e,t[r].getCurves());return e},getFirstCurve:function(){var t=this.getFirstChild();return t&&t.getFirstCurve()},getLastCurve:function(){var t=this.getLastChild();return t&&t.getLastCurve()},getArea:function(){for(var t=this._children,e=0,r=0,s=t.length;r<s;r++)e+=t[r].getArea();return e},getLength:function(){for(var t=this._children,e=0,r=0,s=t.length;r<s;r++)e+=t[r].getLength();return e},getPathData:function(t,e){for(var r=this._children,s=[],u=0,h=r.length;u<h;u++){var p=r[u],d=p._matrix;s.push(p.getPathData(t&&!d.isIdentity()?t.appended(d):t,e))}return s.join("")},_hitTestChildren:function t(e,r,s){return t.base.call(this,e,r.class===zt||r.type==="path"?r:c.set({},r,{fill:!1}),s)},_draw:function(t,e,r,s){var u=this._children;if(u.length){e=e.extend({dontStart:!0,dontFinish:!0}),t.beginPath();for(var h=0,p=u.length;h<p;h++)u[h].draw(t,e,s);if(!e.clip){this._setStyles(t,e,r);var d=this._style;d.hasFill()&&(t.fill(d.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),d.hasStroke()&&t.stroke()}}},_drawSelected:function(t,e,r){for(var s=this._children,u=0,h=s.length;u<h;u++){var p=s[u],d=p._matrix;r[p._id]||p._drawSelected(t,d.isIdentity()?e:e.appended(d))}}},new function(){function t(e,r){var s=e._children;if(r&&!s.length)throw new Error("Use a moveTo() command first");return s[s.length-1]}return c.each(["lineTo","cubicCurveTo","quadraticCurveTo","curveTo","arcTo","lineBy","cubicCurveBy","quadraticCurveBy","curveBy","arcBy"],function(e){this[e]=function(){var r=t(this,!0);r[e].apply(r,arguments)}},{moveTo:function(){var e=t(this),r=e&&e.isEmpty()?e:new zt(T.NO_INSERT);r!==e&&this.addChild(r),r.moveTo.apply(r,arguments)},moveBy:function(){var e=t(this,!0),r=e&&e.getLastSegment(),s=F.read(arguments);this.moveTo(r?s.add(r._point):s)},closePath:function(e){t(this,!0).closePath(e)}})},c.each(["reverse","flatten","simplify","smooth"],function(t){this[t]=function(e){for(var r=this._children,s,u=0,h=r.length;u<h;u++)s=r[u][t](e)||s;return s}},{}));ue.inject(new function(){var t=Math.min,e=Math.max,r=Math.abs,s={unite:{1:!0,2:!0},intersect:{2:!0},subtract:{1:!0},exclude:{1:!0,"-1":!0}};function u(b){return b._children||[b]}function h(b,C){var v=b.clone(!1).reduce({simplify:!0}).transform(null,!0,!0);if(C){for(var I=u(v),L=0,R=I.length;L<R;L++){var b=I[L];!b._closed&&!b.isEmpty()&&(b.closePath(1e-12),b.getFirstSegment().setHandleIn(0,0),b.getLastSegment().setHandleOut(0,0))}v=v.resolveCrossings().reorient(v.getFillRule()==="nonzero",!0)}return v}function p(b,C,v,I,L){var R=new se(T.NO_INSERT);return R.addChildren(b,!0),R=R.reduce({simplify:C}),L&&L.insert==!1||R.insertAbove(I&&v.isSibling(I)&&v.getIndex()<I.getIndex()?I:v),R.copyAttributes(v,!0),R}function d(b){return b.hasOverlap()||b.isCrossing()}function _(b,C,v,I){if(I&&(I.trace==!1||I.stroke)&&/^(subtract|intersect)$/.test(v))return g(b,C,v);var L=h(b,!0),R=C&&b!==C&&h(C,!0),M=s[v];M[v]=!0,R&&(M.subtract||M.exclude)^(R.isClockwise()^L.isClockwise())&&R.reverse();var V=m(Qt.expand(L.getIntersections(R,d))),U=u(L),j=R&&u(R),Y=[],H=[],X;function Q(Et){for(var Nt=0,Lt=Et.length;Nt<Lt;Nt++){var Bt=Et[Nt];c.push(Y,Bt._segments),c.push(H,Bt.getCurves()),Bt._overlapsOnly=!0}}function $(Et){for(var Nt=[],Lt=0,Bt=Et&&Et.length;Lt<Bt;Lt++)Nt.push(H[Et[Lt]]);return Nt}if(V.length){Q(U),j&&Q(j);for(var tt=new Array(H.length),st=0,mt=H.length;st<mt;st++)tt[st]=H[st].getValues();for(var yt=B.findCurveBoundsCollisions(tt,tt,0,!0),St={},st=0;st<H.length;st++){var It=H[st],lt=It._path._id,ct=St[lt]=St[lt]||{};ct[It.getIndex()]={hor:$(yt[st].hor),ver:$(yt[st].ver)}}for(var st=0,mt=V.length;st<mt;st++)k(V[st]._segment,L,R,St,M);for(var st=0,mt=Y.length;st<mt;st++){var Ct=Y[st],At=Ct._intersection;Ct._winding||k(Ct,L,R,St,M),At&&At._overlap||(Ct._path._overlapsOnly=!1)}X=A(Y,M)}else X=x(j?U.concat(j):U.slice(),function(Et){return!!M[Et]});return p(X,!0,b,C,I)}function g(b,C,v){var I=h(b),L=h(C),R=I.getIntersections(L,d),M=v==="subtract",V=v==="divide",U={},j=[];function Y(Q){if(!U[Q._id]&&(V||L.contains(Q.getPointAt(Q.getLength()/2))^M))return j.unshift(Q),U[Q._id]=!0}for(var H=R.length-1;H>=0;H--){var X=R[H].split();X&&(Y(X)&&X.getFirstSegment().setHandleIn(0,0),I.getLastSegment().setHandleOut(0,0))}return Y(I),p(j,!1,b,C)}function y(b,C){for(var v=b;v;){if(v===C)return;v=v._previous}for(;b._next&&b._next!==C;)b=b._next;if(!b._next){for(;C._previous;)C=C._previous;b._next=C,C._previous=b}}function w(b){for(var C=b.length-1;C>=0;C--)b[C].clearHandles()}function x(b,C,v){var I=b&&b.length;if(I){var L=c.each(b,function(yt,St){this[yt._id]={container:null,winding:yt.isClockwise()?1:-1,index:St}},{}),R=b.slice().sort(function(yt,St){return r(St.getArea())-r(yt.getArea())}),M=R[0],V=B.findItemBoundsCollisions(R,null,K.GEOMETRIC_EPSILON);v==null&&(v=M.isClockwise());for(var U=0;U<I;U++){var j=R[U],Y=L[j._id],H=0,X=V[U];if(X){for(var Q=null,$=X.length-1;$>=0;$--)if(X[$]<U){Q=Q||j.getInteriorPoint();var tt=R[X[$]];if(tt.contains(Q)){var st=L[tt._id];H=st.winding,Y.winding+=H,Y.container=st.exclude?st.container:tt;break}}}if(C(Y.winding)===C(H))Y.exclude=!0,b[Y.index]=null;else{var mt=Y.container;j.setClockwise(mt?!mt.isClockwise():v)}}}return b}function m(b,C,v){var I=C&&[],L=1e-8,R=1-L,M=!1,V=v||[],U=v&&{},j,Y,H;function X(Nt){return Nt._path._id+"."+Nt._segment1._index}for(var Q=(v&&v.length)-1;Q>=0;Q--){var $=v[Q];$._path&&(U[X($)]=!0)}for(var Q=b.length-1;Q>=0;Q--){var tt=b[Q],st=tt._time,mt=st,yt=C&&!C(tt),$=tt._curve,St;if($&&($!==Y?(M=!$.hasHandles()||U&&U[X($)],j=[],H=null,Y=$):H>=L&&(st/=H)),yt){j&&j.push(tt);continue}else C&&I.unshift(tt);if(H=mt,st<L)St=$._segment1;else if(st>R)St=$._segment2;else{var It=$.divideAtTime(st,!0);M&&V.push($,It),St=It._segment1;for(var lt=j.length-1;lt>=0;lt--){var ct=j[lt];ct._time=(ct._time-st)/(1-st)}}tt._setSegment(St);var Ct=St._intersection,At=tt._intersection;if(Ct){y(Ct,At);for(var Et=Ct;Et;)y(Et._intersection,Ct),Et=Et._next}else St._intersection=At}return v||w(V),I||b}function E(b,C,v,I,L){var R=Array.isArray(C)?C:C[v?"hor":"ver"],M=v?1:0,V=M^1,U=[b.x,b.y],j=U[M],Y=U[V],H=1e-9,X=1e-6,Q=j-H,$=j+H,tt=0,st=0,mt=0,yt=0,St=!1,It=!1,lt=1,ct=[],Ct,At;function Et(re){var xe=re[V+0],Fe=re[V+6];if(!(Y<t(xe,Fe)||Y>e(xe,Fe))){var Pe=re[M+0],Ge=re[M+2],Oe=re[M+4],_e=re[M+6];if(xe===Fe){(Pe<$&&_e>Q||_e<$&&Pe>Q)&&(St=!0);return}var ti=Y===xe?0:Y===Fe||Q>e(Pe,Ge,Oe,_e)||$<t(Pe,Ge,Oe,_e)?1:_t.solveCubic(re,V,Y,ct,0,1)>0?ct[0]:1,ze=ti===0?Pe:ti===1?_e:_t.getPoint(re,ti)[v?"y":"x"],We=xe>Fe?1:-1,vi=Ct[V]>Ct[V+6]?1:-1,ei=Ct[M+6];return Y!==xe?(ze<Q?mt+=We:ze>$?yt+=We:St=!0,ze>j-X&&ze<j+X&&(lt/=2)):(We!==vi?Pe<Q?mt+=We:Pe>$&&(yt+=We):Pe!=ei&&(ei<$&&ze>$?(yt+=We,St=!0):ei>Q&&ze<Q&&(mt+=We,St=!0)),lt/=4),Ct=re,!L&&ze>Q&&ze<$&&_t.getTangent(re,ti)[v?"x":"y"]===0&&E(b,C,!v,I,!0)}}function Nt(re){var xe=re[V+0],Fe=re[V+2],Pe=re[V+4],Ge=re[V+6];if(Y<=e(xe,Fe,Pe,Ge)&&Y>=t(xe,Fe,Pe,Ge)){for(var Oe=re[M+0],_e=re[M+2],ti=re[M+4],ze=re[M+6],We=Q>e(Oe,_e,ti,ze)||$<t(Oe,_e,ti,ze)?[re]:_t.getMonoCurves(re,v),vi,ei=0,_r=We.length;ei<_r;ei++)if(vi=Et(We[ei]))return vi}}for(var Lt=0,Bt=R.length;Lt<Bt;Lt++){var Ut=R[Lt],Dt=Ut._path,ke=Ut.getValues(),Pt;if((!Lt||R[Lt-1]._path!==Dt)&&(Ct=null,Dt._closed||(At=_t.getValues(Dt.getLastCurve().getSegment2(),Ut.getSegment1(),null,!I),At[V]!==At[V+6]&&(Ct=At)),!Ct)){Ct=ke;for(var oe=Dt.getLastCurve();oe&&oe!==Ut;){var pe=oe.getValues();if(pe[V]!==pe[V+6]){Ct=pe;break}oe=oe.getPrevious()}}if(Pt=Nt(ke))return Pt;if(Lt+1===Bt||R[Lt+1]._path!==Dt){if(At&&(Pt=Nt(At)))return Pt;St&&!mt&&!yt&&(mt=yt=Dt.isClockwise(I)^v?1:-1),tt+=mt,st+=yt,mt=yt=0,St&&(It=!0,St=!1),At=null}}return tt=r(tt),st=r(st),{winding:e(tt,st),windingL:tt,windingR:st,quality:lt,onPath:It}}function k(b,C,v,I,L){var R=[],M=b,V=0,H;do{var U=b.getCurve();if(U){var j=U.getLength();R.push({segment:b,curve:U,length:j}),V+=j}b=b.getNext()}while(b&&!b._intersection&&b!==M);for(var Y=[.5,.25,.75],H={winding:0,quality:-1},X=.001,Q=1-X,$=0;$<Y.length&&H.quality<.5;$++)for(var j=V*Y[$],tt=0,st=R.length;tt<st;tt++){var mt=R[tt],yt=mt.length;if(j<=yt){var U=mt.curve,St=U._path,It=St._parent,lt=It instanceof se?It:St,ct=K.clamp(U.getTimeAt(j),X,Q),Ct=U.getPointAtTime(ct),At=r(U.getTangentAtTime(ct).y)<Math.SQRT1_2,Et=null;if(L.subtract&&v){var Nt=lt===C?v:C,Lt=Nt._getWinding(Ct,At,!0);if(lt===C&&Lt.winding||lt===v&&!Lt.winding){if(Lt.quality<1)continue;Et={winding:0,quality:1}}}Et=Et||E(Ct,I[St._id][U.getIndex()],At,!0),Et.quality>H.quality&&(H=Et);break}j-=yt}for(var tt=R.length-1;tt>=0;tt--)R[tt].segment._winding=H}function A(b,C){var v=[],I;function L(Bt){var Ut;return!!(Bt&&!Bt._visited&&(!C||C[(Ut=Bt._winding||{}).winding]&&!(C.unite&&Ut.winding===2&&Ut.windingL&&Ut.windingR)))}function R(Bt){if(Bt){for(var Ut=0,Dt=I.length;Ut<Dt;Ut++)if(Bt===I[Ut])return!0}return!1}function M(Bt){for(var Ut=Bt._segments,Dt=0,ke=Ut.length;Dt<ke;Dt++)Ut[Dt]._visited=!0}function V(Bt,Ut){var Dt=Bt._intersection,ke=Dt,Pt=[];Ut&&(I=[Bt]);function oe(pe,re){for(;pe&&pe!==re;){var xe=pe._segment,Fe=xe&&xe._path;if(Fe){var Pe=xe.getNext()||Fe.getFirstSegment(),Ge=Pe._intersection;xe!==Bt&&(R(xe)||R(Pe)||Pe&&L(xe)&&(L(Pe)||Ge&&L(Ge._segment)))&&Pt.push(xe),Ut&&I.push(xe)}pe=pe._next}}if(Dt){for(oe(Dt);Dt&&Dt._previous;)Dt=Dt._previous;oe(Dt,ke)}return Pt}b.sort(function(Bt,Ut){var Dt=Bt._intersection,ke=Ut._intersection,Pt=!!(Dt&&Dt._overlap),oe=!!(ke&&ke._overlap),pe=Bt._path,re=Ut._path;return Pt^oe?Pt?1:-1:!Dt^!ke?Dt?1:-1:pe!==re?pe._id-re._id:Bt._index-Ut._index});for(var U=0,j=b.length;U<j;U++){var Y=b[U],H=L(Y),X=null,Q=!1,$=!0,tt=[],st,mt,yt;if(H&&Y._path._overlapsOnly){var St=Y._path,It=Y._intersection._segment._path;St.compare(It)&&(St.getArea()&&v.push(St.clone(!1)),M(St),M(It),H=!1)}for(;H;){var lt=!X,ct=V(Y,lt),Ct=ct.shift(),Q=!lt&&(R(Y)||R(Ct)),At=!Q&&Ct;if(lt&&(X=new zt(T.NO_INSERT),st=null),Q){(Y.isFirst()||Y.isLast())&&($=Y._path._closed),Y._visited=!0;break}if(At&&st&&(tt.push(st),st=null),st||(At&&ct.push(Y),st={start:X._segments.length,crossings:ct,visited:mt=[],handleIn:yt}),At&&(Y=Ct),!L(Y)){X.removeSegments(st.start);for(var Et=0,Nt=mt.length;Et<Nt;Et++)mt[Et]._visited=!1;mt.length=0;do Y=st&&st.crossings.shift(),(!Y||!Y._path)&&(Y=null,st=tt.pop(),st&&(mt=st.visited,yt=st.handleIn));while(st&&!L(Y));if(!Y)break}var Lt=Y.getNext();X.add(new wt(Y._point,yt,Lt&&Y._handleOut)),Y._visited=!0,mt.push(Y),Y=Lt||Y._path.getFirstSegment(),yt=Lt&&Lt._handleIn}Q&&($&&(X.getFirstSegment().setHandleIn(yt),X.setClosed($)),X.getArea()!==0&&v.push(X))}return v}return{_getWinding:function(b,C,v){return E(b,this.getCurves(),C,v)},unite:function(b,C){return _(this,b,"unite",C)},intersect:function(b,C){return _(this,b,"intersect",C)},subtract:function(b,C){return _(this,b,"subtract",C)},exclude:function(b,C){return _(this,b,"exclude",C)},divide:function(b,C){return C&&(C.trace==!1||C.stroke)?g(this,b,"divide"):p([this.subtract(b,C),this.intersect(b,C)],!0,this,b,C)},resolveCrossings:function(){var b=this._children,C=b||[this];function v(st,mt){var yt=st&&st._intersection;return yt&&yt._overlap&&yt._path===mt}var I=!1,L=!1,R=this.getIntersections(null,function(st){return st.hasOverlap()&&(I=!0)||st.isCrossing()&&(L=!0)}),M=I&&L&&[];if(R=Qt.expand(R),I)for(var V=m(R,function(st){return st.hasOverlap()},M),U=V.length-1;U>=0;U--){var j=V[U],Y=j._path,H=j._segment,X=H.getPrevious(),Q=H.getNext();v(X,Y)&&v(Q,Y)&&(H.remove(),X._handleOut._set(0,0),Q._handleIn._set(0,0),X!==H&&!X.getCurve().hasLength()&&(Q._handleIn.set(X._handleIn),X.remove()))}L&&(m(R,I&&function(st){var mt=st.getCurve(),yt=st.getSegment(),St=st._intersection,It=St._curve,lt=St._segment;if(mt&&It&&mt._path&&It._path)return!0;yt&&(yt._intersection=null),lt&&(lt._intersection=null)},M),M&&w(M),C=A(c.each(C,function(st){c.push(this,st._segments)},[])));var $=C.length,tt;return $>1&&b?(C!==b&&this.setChildren(C),tt=this):$===1&&!b&&(C[0]!==this&&this.setSegments(C[0].removeSegments()),tt=this),tt||(tt=new se(T.NO_INSERT),tt.addChildren(C),tt=tt.reduce(),tt.copyAttributes(this),this.replaceWith(tt)),tt},reorient:function(b,C){var v=this._children;return v&&v.length?this.setChildren(x(this.removeChildren(),function(I){return!!(b?I:I&1)},C)):C!==a&&this.setClockwise(C),this},getInteriorPoint:function(){var b=this.getBounds(),C=b.getCenter(!0);if(!this.contains(C)){for(var v=this.getCurves(),I=C.y,L=[],R=[],M=0,V=v.length;M<V;M++){var U=v[M].getValues(),j=U[1],Y=U[3],H=U[5],X=U[7];if(I>=t(j,Y,H,X)&&I<=e(j,Y,H,X))for(var Q=_t.getMonoCurves(U),$=0,tt=Q.length;$<tt;$++){var st=Q[$],mt=st[1],yt=st[7];if(mt!==yt&&(I>=mt&&I<=yt||I>=yt&&I<=mt)){var St=I===mt?st[0]:I===yt?st[6]:_t.solveCubic(st,1,I,R,0,1)===1?_t.getPoint(st,R[0]).x:(st[0]+st[6])/2;L.push(St)}}}L.length>1&&(L.sort(function(It,lt){return It-lt}),C.x=(L[0]+L[1])/2)}return C}}});var Je=c.extend({_class:"PathFlattener",initialize:function(t,e,r,s,u){var h=[],p=[],d=0,_=1/(r||32),g=t._segments,y=g[0],w;function x(A,b){var C=_t.getValues(A,b,u);h.push(C),m(C,A._index,0,1)}function m(A,b,C,v){if(v-C>_&&!(s&&_t.isStraight(A))&&!_t.isFlatEnough(A,e||.25)){var I=_t.subdivide(A,.5),L=(C+v)/2;m(I[0],b,C,L),m(I[1],b,L,v)}else{var R=A[6]-A[0],M=A[7]-A[1],V=Math.sqrt(R*R+M*M);V>0&&(d+=V,p.push({offset:d,curve:A,index:b,time:v}))}}for(var E=1,k=g.length;E<k;E++)w=g[E],x(y,w),y=w;t._closed&&x(w||y,g[0]),this.curves=h,this.parts=p,this.length=d,this.index=0},_get:function(t){for(var e=this.parts,r=e.length,s,u=this.index;s=u,!(!u||e[--u].offset<t););for(;s<r;s++){var h=e[s];if(h.offset>=t){this.index=s;var p=e[s-1],d=p&&p.index===h.index?p.time:0,_=p?p.offset:0;return{index:h.index,time:d+(h.time-d)*(t-_)/(h.offset-_)}}}return{index:e[r-1].index,time:1}},drawPart:function(t,e,r){for(var s=this._get(e),u=this._get(r),h=s.index,p=u.index;h<=p;h++){var d=_t.getPart(this.curves[h],h===s.index?s.time:0,h===u.index?u.time:1);h===s.index&&t.moveTo(d[0],d[1]),t.bezierCurveTo.apply(t,d.slice(2))}}},c.each(_t._evaluateMethods,function(t){this[t+"At"]=function(e){var r=this._get(e);return _t[t](this.curves[r.index],r.time)}},{})),Ee=c.extend({initialize:function(t){for(var e=this.points=[],r=t._segments,s=t._closed,u=0,h,p=r.length;u<p;u++){var d=r[u].point;(!h||!h.equals(d))&&e.push(h=d.clone())}s&&(e.unshift(e[e.length-1]),e.push(e[1])),this.closed=s},fit:function(t){var e=this.points,r=e.length,s=null;return r>0&&(s=[new wt(e[0])],r>1&&(this.fitCubic(s,t,0,r-1,e[1].subtract(e[0]),e[r-2].subtract(e[r-1])),this.closed&&(s.shift(),s.pop()))),s},fitCubic:function(t,e,r,s,u,h){var p=this.points;if(s-r===1){var d=p[r],_=p[s],g=d.getDistance(_)/3;this.addCurve(t,[d,d.add(u.normalize(g)),_.add(h.normalize(g)),_]);return}for(var y=this.chordLengthParameterize(r,s),w=Math.max(e,e*e),x,m=!0,E=0;E<=4;E++){var k=this.generateBezier(r,s,y,u,h),A=this.findMaxError(r,s,k,y);if(A.error<e&&m){this.addCurve(t,k);return}if(x=A.index,A.error>=w)break;m=this.reparameterize(r,s,y,k),w=A.error}var b=p[x-1].subtract(p[x+1]);this.fitCubic(t,e,r,x,u,b),this.fitCubic(t,e,x,s,b.negate(),h)},addCurve:function(t,e){var r=t[t.length-1];r.setHandleOut(e[1].subtract(e[0])),t.push(new wt(e[3],e[2].subtract(e[3])))},generateBezier:function(t,e,r,s,u){for(var h=1e-12,p=Math.abs,d=this.points,_=d[t],g=d[e],y=[[0,0],[0,0]],w=[0,0],x=0,m=e-t+1;x<m;x++){var E=r[x],k=1-E,A=3*E*k,b=k*k*k,C=A*k,v=A*E,I=E*E*E,L=s.normalize(C),R=u.normalize(v),M=d[t+x].subtract(_.multiply(b+C)).subtract(g.multiply(v+I));y[0][0]+=L.dot(L),y[0][1]+=L.dot(R),y[1][0]=y[0][1],y[1][1]+=R.dot(R),w[0]+=L.dot(M),w[1]+=R.dot(M)}var V=y[0][0]*y[1][1]-y[1][0]*y[0][1],U,j;if(p(V)>h){var Y=y[0][0]*w[1]-y[1][0]*w[0],H=w[0]*y[1][1]-w[1]*y[0][1];U=H/V,j=Y/V}else{var X=y[0][0]+y[0][1],Q=y[1][0]+y[1][1];U=j=p(X)>h?w[0]/X:p(Q)>h?w[1]/Q:0}var $=g.getDistance(_),tt=h*$,st,mt;if(U<tt||j<tt)U=j=$/3;else{var yt=g.subtract(_);st=s.normalize(U),mt=u.normalize(j),st.dot(yt)-mt.dot(yt)>$*$&&(U=j=$/3,st=mt=null)}return[_,_.add(st||s.normalize(U)),g.add(mt||u.normalize(j)),g]},reparameterize:function(t,e,r,s){for(var u=t;u<=e;u++)r[u-t]=this.findRoot(s,this.points[u],r[u-t]);for(var u=1,h=r.length;u<h;u++)if(r[u]<=r[u-1])return!1;return!0},findRoot:function(t,e,r){for(var s=[],u=[],h=0;h<=2;h++)s[h]=t[h+1].subtract(t[h]).multiply(3);for(var h=0;h<=1;h++)u[h]=s[h+1].subtract(s[h]).multiply(2);var p=this.evaluate(3,t,r),d=this.evaluate(2,s,r),_=this.evaluate(1,u,r),g=p.subtract(e),y=d.dot(d)+g.dot(_);return K.isMachineZero(y)?r:r-g.dot(d)/y},evaluate:function(t,e,r){for(var s=e.slice(),u=1;u<=t;u++)for(var h=0;h<=t-u;h++)s[h]=s[h].multiply(1-r).add(s[h+1].multiply(r));return s[0]},chordLengthParameterize:function(t,e){for(var r=[0],s=t+1;s<=e;s++)r[s-t]=r[s-t-1]+this.points[s].getDistance(this.points[s-1]);for(var s=1,u=e-t;s<=u;s++)r[s]/=r[u];return r},findMaxError:function(t,e,r,s){for(var u=Math.floor((e-t+1)/2),h=0,p=t+1;p<e;p++){var d=this.evaluate(3,r,s[p-t]),_=d.subtract(this.points[p]),g=_.x*_.x+_.y*_.y;g>=h&&(h=g,u=p)}return{error:h,index:u}}}),Ve=T.extend({_class:"TextItem",_applyMatrix:!1,_canApplyMatrix:!1,_serializeFields:{content:null},_boundsOptions:{stroke:!1,handle:!1},initialize:function(e){this._content="",this._lines=[];var r=e&&c.isPlainObject(e)&&e.x===a&&e.y===a;this._initialize(r&&e,!r&&F.read(arguments))},_equals:function(t){return this._content===t._content},copyContent:function(t){this.setContent(t._content)},getContent:function(){return this._content},setContent:function(t){this._content=""+t,this._lines=this._content.split(/\r\n|\n|\r/mg),this._changed(521)},isEmpty:function(){return!this._content},getCharacterStyle:"#getStyle",setCharacterStyle:"#setStyle",getParagraphStyle:"#getStyle",setParagraphStyle:"#setStyle"}),Jt=Ve.extend({_class:"PointText",initialize:function(){Ve.apply(this,arguments)},getPoint:function(){var t=this._matrix.getTranslation();return new at(t.x,t.y,this,"setPoint")},setPoint:function(){var t=F.read(arguments);this.translate(t.subtract(this._matrix.getTranslation()))},_draw:function(t,e,r){if(this._content){this._setStyles(t,e,r);var s=this._lines,u=this._style,h=u.hasFill(),p=u.hasStroke(),d=u.getLeading(),_=t.shadowColor;t.font=u.getFontStyle(),t.textAlign=u.getJustification();for(var g=0,y=s.length;g<y;g++){t.shadowColor=_;var w=s[g];h&&(t.fillText(w,0,0),t.shadowColor="rgba(0,0,0,0)"),p&&t.strokeText(w,0,0),t.translate(0,d)}}},_getBounds:function(t,e){var r=this._style,s=this._lines,u=s.length,h=r.getJustification(),p=r.getLeading(),d=this.getView().getTextWidth(r.getFontStyle(),s),_=0;h!=="left"&&(_-=d/(h==="center"?2:1));var g=new nt(_,u?-.75*p:0,d,u*p);return t?t._transformBounds(g,g):g}}),Mt=c.extend(new function(){var t={gray:["gray"],rgb:["red","green","blue"],hsb:["hue","saturation","brightness"],hsl:["hue","saturation","lightness"],gradient:["gradient","origin","destination","highlight"]},e={},r={transparent:[0,0,0,0]},s;function u(d){var _=d.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i)||d.match(/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i),g="rgb",y;if(_){var w=_[4]?4:3;y=new Array(w);for(var x=0;x<w;x++){var m=_[x+1];y[x]=parseInt(m.length==1?m+m:m,16)/255}}else if(_=d.match(/^(rgb|hsl)a?\((.*)\)$/)){g=_[1],y=_[2].trim().split(/[,\s]+/g);for(var E=g==="hsl",x=0,k=Math.min(y.length,4);x<k;x++){var A=y[x],m=parseFloat(A);if(E)if(x===0){var b=A.match(/([a-z]*)$/)[1];m*={turn:360,rad:180/Math.PI,grad:.9}[b]||1}else x<3&&(m/=100);else x<3&&(m/=/%$/.test(A)?100:255);y[x]=m}}else{var C=r[d];if(!C)if(o){s||(s=me.getContext(1,1,{willReadFrequently:!0}),s.globalCompositeOperation="copy"),s.fillStyle="rgba(0,0,0,0)",s.fillStyle=d,s.fillRect(0,0,1,1);var v=s.getImageData(0,0,1,1).data;C=r[d]=[v[0]/255,v[1]/255,v[2]/255]}else C=[0,0,0];y=C.slice()}return[g,y]}var h=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]],p={"rgb-hsb":function(d,_,g){var y=Math.max(d,_,g),w=Math.min(d,_,g),x=y-w,m=x===0?0:(y==d?(_-g)/x+(_<g?6:0):y==_?(g-d)/x+2:(d-_)/x+4)*60;return[m,y===0?0:x/y,y]},"hsb-rgb":function(d,_,g){d=(d/60%6+6)%6;var w=Math.floor(d),y=d-w,w=h[w],x=[g,g*(1-_),g*(1-_*y),g*(1-_*(1-y))];return[x[w[0]],x[w[1]],x[w[2]]]},"rgb-hsl":function(d,_,g){var y=Math.max(d,_,g),w=Math.min(d,_,g),x=y-w,m=x===0,E=m?0:(y==d?(_-g)/x+(_<g?6:0):y==_?(g-d)/x+2:(d-_)/x+4)*60,k=(y+w)/2,A=m?0:k<.5?x/(y+w):x/(2-y-w);return[E,A,k]},"hsl-rgb":function(d,_,g){if(d=(d/360%1+1)%1,_===0)return[g,g,g];for(var y=[d+1/3,d,d-1/3],w=g<.5?g*(1+_):g+_-g*_,x=2*g-w,m=[],E=0;E<3;E++){var k=y[E];k<0&&(k+=1),k>1&&(k-=1),m[E]=6*k<1?x+(w-x)*6*k:2*k<1?w:3*k<2?x+(w-x)*(2/3-k)*6:x}return m},"rgb-gray":function(d,_,g){return[d*.2989+_*.587+g*.114]},"gray-rgb":function(d){return[d,d,d]},"gray-hsb":function(d){return[0,0,d]},"gray-hsl":function(d){return[0,0,d]},"gradient-rgb":function(){return[]},"rgb-gradient":function(){return[]}};return c.each(t,function(d,_){e[_]=[],c.each(d,function(g,y){var w=c.capitalize(g),x=/^(hue|saturation)$/.test(g),m=e[_][y]=_==="gradient"?g==="gradient"?function(E){var k=this._components[0];return E=he.read(Array.isArray(E)?E:arguments,0,{readNull:!0}),k!==E&&(k&&k._removeOwner(this),E&&E._addOwner(this)),E}:function(){return F.read(arguments,0,{readNull:g==="highlight",clone:!0})}:function(E){return E==null||isNaN(E)?0:+E};this["get"+w]=function(){return this._type===_||x&&/^hs[bl]$/.test(this._type)?this._components[y]:this._convert(_)[y]},this["set"+w]=function(E){this._type!==_&&!(x&&/^hs[bl]$/.test(this._type))&&(this._components=this._convert(_),this._properties=t[_],this._type=_),this._components[y]=m.call(this,E),this._changed()}},this)},{_class:"Color",_readIndex:!0,initialize:function d(_){var g=arguments,y=this.__read,w=0,x,m,E,k;Array.isArray(_)&&(g=_,_=g[0]);var A=_!=null&&typeof _;if(A==="string"&&_ in t&&(x=_,_=g[1],Array.isArray(_)?(m=_,E=g[2]):(y&&(w=1),g=c.slice(g,1),A=typeof _)),!m){if(k=A==="number"?g:A==="object"&&_.length!=null?_:null,k){x||(x=k.length>=3?"rgb":"gray");var b=t[x].length;E=k[b],y&&(w+=k===arguments?b+(E!=null?1:0):1),k.length>b&&(k=c.slice(k,0,b))}else if(A==="string"){var C=u(_);x=C[0],m=C[1],m.length===4&&(E=m[3],m.length--)}else if(A==="object")if(_.constructor===d){if(x=_._type,m=_._components.slice(),E=_._alpha,x==="gradient")for(var v=1,I=m.length;v<I;v++){var L=m[v];L&&(m[v]=L.clone())}}else if(_.constructor===he)x="gradient",k=g;else{x="hue"in _?"lightness"in _?"hsl":"hsb":"gradient"in _||"stops"in _||"radial"in _?"gradient":"gray"in _?"gray":"rgb";var R=t[x],M=e[x];this._components=m=[];for(var v=0,I=R.length;v<I;v++){var V=_[R[v]];V==null&&!v&&x==="gradient"&&"stops"in _&&(V={stops:_.stops,radial:_.radial}),V=M[v].call(this,V),V!=null&&(m[v]=V)}E=_.alpha}y&&x&&(w=1)}if(this._type=x||"rgb",!m){this._components=m=[];for(var M=e[this._type],v=0,I=M.length;v<I;v++){var V=M[v].call(this,k&&k[v]);V!=null&&(m[v]=V)}}return this._components=m,this._properties=t[this._type],this._alpha=E,y&&(this.__read=w),this},set:"#initialize",_serialize:function(d,_){var g=this.getComponents();return c.serialize(/^(gray|rgb)$/.test(this._type)?g:[this._type].concat(g),d,!0,_)},_changed:function(){this._canvasStyle=null,this._owner&&(this._setter?this._owner[this._setter](this):this._owner._changed(129))},_convert:function(d){var _;return this._type===d?this._components.slice():(_=p[this._type+"-"+d])?_.apply(this,this._components):p["rgb-"+d].apply(this,p[this._type+"-rgb"].apply(this,this._components))},convert:function(d){return new Mt(d,this._convert(d),this._alpha)},getType:function(){return this._type},setType:function(d){this._components=this._convert(d),this._properties=t[d],this._type=d},getComponents:function(){var d=this._components.slice();return this._alpha!=null&&d.push(this._alpha),d},getAlpha:function(){return this._alpha!=null?this._alpha:1},setAlpha:function(d){this._alpha=d==null?null:Math.min(Math.max(d,0),1),this._changed()},hasAlpha:function(){return this._alpha!=null},equals:function(d){var _=c.isPlainValue(d,!0)?Mt.read(arguments):d;return _===this||_&&this._class===_._class&&this._type===_._type&&this.getAlpha()===_.getAlpha()&&c.equals(this._components,_._components)||!1},toString:function(){for(var d=this._properties,_=[],g=this._type==="gradient",y=q.instance,w=0,x=d.length;w<x;w++){var m=this._components[w];m!=null&&_.push(d[w]+": "+(g?m:y.number(m)))}return this._alpha!=null&&_.push("alpha: "+y.number(this._alpha)),"{ "+_.join(", ")+" }"},toCSS:function(d){var _=this._convert("rgb"),g=d||this._alpha==null?1:this._alpha;function y(w){return Math.round((w<0?0:w>1?1:w)*255)}return _=[y(_[0]),y(_[1]),y(_[2])],g<1&&_.push(g<0?0:g),d?"#"+((1<<24)+(_[0]<<16)+(_[1]<<8)+_[2]).toString(16).slice(1):(_.length==4?"rgba(":"rgb(")+_.join(",")+")"},toCanvasStyle:function(d,_){if(this._canvasStyle)return this._canvasStyle;if(this._type!=="gradient")return this._canvasStyle=this.toCSS();var g=this._components,y=g[0],w=y._stops,x=g[1],m=g[2],E=g[3],k=_&&_.inverted(),A;if(k&&(x=k._transformPoint(x),m=k._transformPoint(m),E&&(E=k._transformPoint(E))),y._radial){var b=m.getDistance(x);if(E){var C=E.subtract(x);C.getLength()>b&&(E=x.add(C.normalize(b-.1)))}var v=E||x;A=d.createRadialGradient(v.x,v.y,0,x.x,x.y,b)}else A=d.createLinearGradient(x.x,x.y,m.x,m.y);for(var I=0,L=w.length;I<L;I++){var R=w[I],M=R._offset;A.addColorStop(M??I/(L-1),R._color.toCanvasStyle())}return this._canvasStyle=A},transform:function(d){if(this._type==="gradient"){for(var _=this._components,g=1,y=_.length;g<y;g++){var w=_[g];d._transformPoint(w,w,!0)}this._changed()}},statics:{_types:t,random:function(){var d=Math.random;return new Mt(d(),d(),d())},_setOwner:function(d,_,g){return d&&(d._owner&&_&&d._owner!==_&&(d=d.clone()),!d._owner^!_&&(d._owner=_||null,d._setter=g||null)),d}}})},new function(){var t={add:function(e,r){return e+r},subtract:function(e,r){return e-r},multiply:function(e,r){return e*r},divide:function(e,r){return e/r}};return c.each(t,function(e,r){this[r]=function(s){s=Mt.read(arguments);for(var u=this._type,h=this._components,p=s._convert(u),d=0,_=h.length;d<_;d++)p[d]=e(h[d],p[d]);return new Mt(u,p,this._alpha!=null?e(this._alpha,s.getAlpha()):null)}},{})}),he=c.extend({_class:"Gradient",initialize:function(e,r){this._id=it.get(),e&&c.isPlainObject(e)&&(this.set(e),e=r=null),this._stops==null&&this.setStops(e||["white","black"]),this._radial==null&&this.setRadial(typeof r=="string"&&r==="radial"||r||!1)},_serialize:function(t,e){return e.add(this,function(){return c.serialize([this._stops,this._radial],t,!0,e)})},_changed:function(){for(var t=0,e=this._owners&&this._owners.length;t<e;t++)this._owners[t]._changed()},_addOwner:function(t){this._owners||(this._owners=[]),this._owners.push(t)},_removeOwner:function(t){var e=this._owners?this._owners.indexOf(t):-1;e!=-1&&(this._owners.splice(e,1),this._owners.length||(this._owners=a))},clone:function(){for(var t=[],e=0,r=this._stops.length;e<r;e++)t[e]=this._stops[e].clone();return new he(t,this._radial)},getStops:function(){return this._stops},setStops:function(t){if(t.length<2)throw new Error("Gradient stop list needs to contain at least two stops.");var e=this._stops;if(e)for(var r=0,s=e.length;r<s;r++)e[r]._owner=a;e=this._stops=ve.readList(t,0,{clone:!0});for(var r=0,s=e.length;r<s;r++)e[r]._owner=this;this._changed()},getRadial:function(){return this._radial},setRadial:function(t){this._radial=t,this._changed()},equals:function(t){if(t===this)return!0;if(t&&this._class===t._class){var e=this._stops,r=t._stops,s=e.length;if(s===r.length){for(var u=0;u<s;u++)if(!e[u].equals(r[u]))return!1;return!0}}return!1}}),ve=c.extend({_class:"GradientStop",initialize:function(e,r){var s=e,u=r;typeof e=="object"&&r===a&&(Array.isArray(e)&&typeof e[0]!="number"?(s=e[0],u=e[1]):("color"in e||"offset"in e||"rampPoint"in e)&&(s=e.color,u=e.offset||e.rampPoint||0)),this.setColor(s),this.setOffset(u)},clone:function(){return new ve(this._color.clone(),this._offset)},_serialize:function(t,e){var r=this._color,s=this._offset;return c.serialize(s==null?[r]:[r,s],t,!0,e)},_changed:function(){this._owner&&this._owner._changed(129)},getOffset:function(){return this._offset},setOffset:function(t){this._offset=t,this._changed()},getRampPoint:"#getOffset",setRampPoint:"#setOffset",getColor:function(){return this._color},setColor:function(){Mt._setOwner(this._color,null),this._color=Mt._setOwner(Mt.read(arguments,0),this,"setColor"),this._changed()},equals:function(t){return t===this||t&&this._class===t._class&&this._color.equals(t._color)&&this._offset==t._offset||!1}}),ce=c.extend(new function(){var t={fillColor:null,fillRule:"nonzero",strokeColor:null,strokeWidth:1,strokeCap:"butt",strokeJoin:"miter",strokeScaling:!0,miterLimit:10,dashOffset:0,dashArray:[],shadowColor:null,shadowBlur:0,shadowOffset:new F,selectedColor:null},e=c.set({},t,{fontFamily:"sans-serif",fontWeight:"normal",fontSize:12,leading:null,justification:"left"}),r=c.set({},e,{fillColor:new Mt}),s={strokeWidth:193,strokeCap:193,strokeJoin:193,strokeScaling:201,miterLimit:193,fontFamily:9,fontWeight:9,fontSize:9,font:9,leading:9,justification:9},u={beans:!0},h={_class:"Style",beans:!0,initialize:function(d,_,g){this._values={},this._owner=_,this._project=_&&_._project||g||jt.project,this._defaults=!_||_ instanceof xt?e:_ instanceof Ve?r:t,d&&this.set(d)}};return c.each(e,function(p,d){var _=/Color$/.test(d),g=d==="shadowOffset",y=c.capitalize(d),w=s[d],x="set"+y,m="get"+y;h[x]=function(E){var k=this._owner,A=k&&k._children,b=A&&A.length>0&&!(k instanceof se);if(b)for(var C=0,v=A.length;C<v;C++)A[C]._style[x](E);if((d==="selectedColor"||!b)&&d in this._defaults){var I=this._values[d];I!==E&&(_&&(I&&(Mt._setOwner(I,null),I._canvasStyle=null),E&&E.constructor===Mt&&(E=Mt._setOwner(E,k,b&&x))),this._values[d]=E,k&&k._changed(w||129))}},h[m]=function(E){var k=this._owner,A=k&&k._children,b=A&&A.length>0&&!(k instanceof se),C;if(b&&!E)for(var v=0,I=A.length;v<I;v++){var L=A[v]._style[m]();if(!v)C=L;else if(!c.equals(C,L))return a}else if(d in this._defaults){var C=this._values[d];if(C===a)C=this._defaults[d],C&&C.clone&&(C=C.clone());else{var R=_?Mt:g?F:null;R&&!(C&&C.constructor===R)&&(this._values[d]=C=R.read([C],0,{readNull:!0,clone:!0}))}}return C&&_&&(C=Mt._setOwner(C,k,b&&x)),C},u[m]=function(E){return this._style[m](E)},u[x]=function(E){this._style[x](E)}}),c.each({Font:"FontFamily",WindingRule:"FillRule"},function(p,d){var _="get"+d,g="set"+d;h[_]=u[_]="#get"+p,h[g]=u[g]="#set"+p}),T.inject(u),h},{set:function(t){var e=t instanceof ce,r=e?t._values:t;if(r){for(var s in r)if(s in this._defaults){var u=r[s];this[s]=u&&e&&u.clone?u.clone():u}}},equals:function(t){function e(r,s,u){var h=r._values,p=s._values,d=s._defaults;for(var _ in h){var g=h[_],y=p[_];if(!(u&&_ in p)&&!c.equals(g,y===a?d[_]:y))return!1}return!0}return t===this||t&&this._class===t._class&&e(this,t)&&e(t,this,!0)||!1},_dispose:function(){var t;t=this.getFillColor(),t&&(t._canvasStyle=null),t=this.getStrokeColor(),t&&(t._canvasStyle=null),t=this.getShadowColor(),t&&(t._canvasStyle=null)},hasFill:function(){var t=this.getFillColor();return!!t&&t.alpha>0},hasStroke:function(){var t=this.getStrokeColor();return!!t&&t.alpha>0&&this.getStrokeWidth()>0},hasShadow:function(){var t=this.getShadowColor();return!!t&&t.alpha>0&&(this.getShadowBlur()>0||!this.getShadowOffset().isZero())},getView:function(){return this._project._view},getFontStyle:function(){var t=this.getFontSize();return this.getFontWeight()+" "+t+(/[a-z]/i.test(t+"")?" ":"px ")+this.getFontFamily()},getFont:"#getFontFamily",setFont:"#setFontFamily",getLeading:function t(){var e=t.base.call(this),r=this.getFontSize();return/pt|em|%|px/.test(r)&&(r=this.getView().getPixelSize(r)),e??r*1.2}}),Kt=new function(){function t(e,r,s,u){for(var h=["","webkit","moz","Moz","ms","o"],p=r[0].toUpperCase()+r.substring(1),d=0;d<6;d++){var _=h[d],g=_?_+p:r;if(g in e){if(s)e[g]=u;else return e[g];break}}}return{getStyles:function(e){var r=e&&e.nodeType!==9?e.ownerDocument:e,s=r&&r.defaultView;return s&&s.getComputedStyle(e,"")},getBounds:function(e,r){var s=e.ownerDocument,u=s.body,h=s.documentElement,p;try{p=e.getBoundingClientRect()}catch{p={left:0,top:0,width:0,height:0}}var d=p.left-(h.clientLeft||u.clientLeft||0),_=p.top-(h.clientTop||u.clientTop||0);if(!r){var g=s.defaultView;d+=g.pageXOffset||h.scrollLeft||u.scrollLeft,_+=g.pageYOffset||h.scrollTop||u.scrollTop}return new nt(d,_,p.width,p.height)},getViewportBounds:function(e){var r=e.ownerDocument,s=r.defaultView,u=r.documentElement;return new nt(0,0,s.innerWidth||u.clientWidth,s.innerHeight||u.clientHeight)},getOffset:function(e,r){return Kt.getBounds(e,r).getPoint()},getSize:function(e){return Kt.getBounds(e,!0).getSize()},isInvisible:function(e){return Kt.getSize(e).equals(new G(0,0))},isInView:function(e){return!Kt.isInvisible(e)&&Kt.getViewportBounds(e).intersects(Kt.getBounds(e,!0))},isInserted:function(e){return f.body.contains(e)},getPrefixed:function(e,r){return e&&t(e,r)},setPrefixed:function(e,r,s){if(typeof r=="object")for(var u in r)t(e,u,!0,r[u]);else t(e,r,!0,s)}}},ee={add:function(t,e){if(t)for(var r in e)for(var s=e[r],u=r.split(/[\s,]+/g),h=0,p=u.length;h<p;h++){var d=u[h],_=t===f&&(d==="touchstart"||d==="touchmove")?{passive:!1}:!1;t.addEventListener(d,s,_)}},remove:function(t,e){if(t)for(var r in e)for(var s=e[r],u=r.split(/[\s,]+/g),h=0,p=u.length;h<p;h++)t.removeEventListener(u[h],s,!1)},getPoint:function(t){var e=t.targetTouches?t.targetTouches.length?t.targetTouches[0]:t.changedTouches[0]:t;return new F(e.pageX||e.clientX+f.documentElement.scrollLeft,e.pageY||e.clientY+f.documentElement.scrollTop)},getTarget:function(t){return t.target||t.srcElement},getRelatedTarget:function(t){return t.relatedTarget||t.toElement},getOffset:function(t,e){return ee.getPoint(t).subtract(Kt.getOffset(e||ee.getTarget(t)))}};ee.requestAnimationFrame=new function(){var t=Kt.getPrefixed(o,"requestAnimationFrame"),e=!1,r=[],s;function u(){var h=r;r=[];for(var p=0,d=h.length;p<d;p++)h[p]();e=t&&r.length,e&&t(u)}return function(h){r.push(h),t?e||(t(u),e=!0):s||(s=setInterval(u,1e3/60))}};var ae=c.extend(P,{_class:"View",initialize:function t(e,r){function s(w){return r[w]||parseInt(r.getAttribute(w),10)}function u(){var w=Kt.getSize(r);return w.isNaN()||w.isZero()?new G(s("width"),s("height")):w}var h;if(o&&r){this._id=r.getAttribute("id"),this._id==null&&r.setAttribute("id",this._id="paper-view-"+t._id++),ee.add(r,this._viewEvents);var p="none";if(Kt.setPrefixed(r.style,{userDrag:p,userSelect:p,touchCallout:p,contentZooming:p,tapHighlightColor:"rgba(0,0,0,0)"}),O.hasAttribute(r,"resize")){var d=this;ee.add(o,this._windowEvents={resize:function(){d.setViewSize(u())}})}if(h=u(),O.hasAttribute(r,"stats")&&typeof Stats<"u"){this._stats=new Stats;var _=this._stats.domElement,g=_.style,y=Kt.getOffset(r);g.position="absolute",g.left=y.x+"px",g.top=y.y+"px",f.body.appendChild(_)}}else h=new G(r),r=null;this._project=e,this._scope=e._scope,this._element=r,this._pixelRatio||(this._pixelRatio=o&&o.devicePixelRatio||1),this._setElementSize(h.width,h.height),this._viewSize=h,t._views.push(this),t._viewsById[this._id]=this,(this._matrix=new ft)._owner=this,t._focused||(t._focused=this),this._frameItems={},this._frameItemCount=0,this._itemEvents={native:{},virtual:{}},this._autoUpdate=!jt.agent.node,this._needsUpdate=!1},remove:function(){if(!this._project)return!1;ae._focused===this&&(ae._focused=null),ae._views.splice(ae._views.indexOf(this),1),delete ae._viewsById[this._id];var t=this._project;return t._view===this&&(t._view=null),ee.remove(this._element,this._viewEvents),ee.remove(o,this._windowEvents),this._element=this._project=null,this.off("frame"),this._animate=!1,this._frameItems={},!0},_events:c.each(T._itemHandlers.concat(["onResize","onKeyDown","onKeyUp"]),function(t){this[t]={}},{onFrame:{install:function(){this.play()},uninstall:function(){this.pause()}}}),_animate:!1,_time:0,_count:0,getAutoUpdate:function(){return this._autoUpdate},setAutoUpdate:function(t){this._autoUpdate=t,t&&this.requestUpdate()},update:function(){},draw:function(){this.update()},requestUpdate:function(){if(!this._requested){var t=this;ee.requestAnimationFrame(function(){if(t._requested=!1,t._animate){t.requestUpdate();var e=t._element;(!Kt.getPrefixed(f,"hidden")||O.getAttribute(e,"keepalive")==="true")&&Kt.isInView(e)&&t._handleFrame()}t._autoUpdate&&t.update()}),this._requested=!0}},play:function(){this._animate=!0,this.requestUpdate()},pause:function(){this._animate=!1},_handleFrame:function(){jt=this._scope;var t=Date.now()/1e3,e=this._last?t-this._last:0;this._last=t,this.emit("frame",new c({delta:e,time:this._time+=e,count:this._count++})),this._stats&&this._stats.update()},_animateItem:function(t,e){var r=this._frameItems;e?(r[t._id]={item:t,time:0,count:0},++this._frameItemCount===1&&this.on("frame",this._handleFrameItems)):(delete r[t._id],--this._frameItemCount===0&&this.off("frame",this._handleFrameItems))},_handleFrameItems:function(t){for(var e in this._frameItems){var r=this._frameItems[e];r.item.emit("frame",new c(t,{time:r.time+=t.delta,count:r.count++}))}},_changed:function(){this._project._changed(4097),this._bounds=this._decomposed=a},getElement:function(){return this._element},getPixelRatio:function(){return this._pixelRatio},getResolution:function(){return this._pixelRatio*72},getViewSize:function(){var t=this._viewSize;return new et(t.width,t.height,this,"setViewSize")},setViewSize:function(){var t=G.read(arguments),e=t.subtract(this._viewSize);e.isZero()||(this._setElementSize(t.width,t.height),this._viewSize.set(t),this._changed(),this.emit("resize",{size:t,delta:e}),this._autoUpdate&&this.update())},_setElementSize:function(t,e){var r=this._element;r&&(r.width!==t&&(r.width=t),r.height!==e&&(r.height=e))},getBounds:function(){return this._bounds||(this._bounds=this._matrix.inverted()._transformBounds(new nt(new F,this._viewSize))),this._bounds},getSize:function(){return this.getBounds().getSize()},isVisible:function(){return Kt.isInView(this._element)},isInserted:function(){return Kt.isInserted(this._element)},getPixelSize:function(t){var e=this._element,r;if(e){var s=e.parentNode,u=f.createElement("div");u.style.fontSize=t,s.appendChild(u),r=parseFloat(Kt.getStyles(u).fontSize),s.removeChild(u)}else r=parseFloat(r);return r},getTextWidth:function(t,e){return 0}},c.each(["rotate","scale","shear","skew"],function(t){var e=t==="rotate";this[t]=function(){var r=arguments,s=(e?c:F).read(r),u=F.read(r,0,{readNull:!0});return this.transform(new ft()[t](s,u||this.getCenter(!0)))}},{_decompose:function(){return this._decomposed||(this._decomposed=this._matrix.decompose())},translate:function(){var t=new ft;return this.transform(t.translate.apply(t,arguments))},getCenter:function(){return this.getBounds().getCenter()},setCenter:function(){var t=F.read(arguments);this.translate(this.getCenter().subtract(t))},getZoom:function(){var t=this._decompose().scaling;return(t.x+t.y)/2},setZoom:function(t){this.transform(new ft().scale(t/this.getZoom(),this.getCenter()))},getRotation:function(){return this._decompose().rotation},setRotation:function(t){var e=this.getRotation();e!=null&&t!=null&&this.rotate(t-e)},getScaling:function(){var t=this._decompose().scaling;return new at(t.x,t.y,this,"setScaling")},setScaling:function(){var t=this.getScaling(),e=F.read(arguments,0,{clone:!0,readNull:!0});t&&e&&this.scale(e.x/t.x,e.y/t.y)},getMatrix:function(){return this._matrix},setMatrix:function(){var t=this._matrix;t.set.apply(t,arguments)},transform:function(t){this._matrix.append(t)},scrollBy:function(){this.translate(F.read(arguments).negate())}}),{projectToView:function(){return this._matrix._transformPoint(F.read(arguments))},viewToProject:function(){return this._matrix._inverseTransform(F.read(arguments))},getEventPoint:function(t){return this.viewToProject(ee.getOffset(t,this._element))}},{statics:{_views:[],_viewsById:{},_id:0,create:function(t,e){f&&typeof e=="string"&&(e=f.getElementById(e));var r=o?Wi:ae;return new r(t,e)}}},new function(){if(!o)return;var t,e,r=!1,s=!1;function u(H){var X=ee.getTarget(H);return X.getAttribute&&ae._viewsById[X.getAttribute("id")]}function h(){var H=ae._focused;if(!H||!H.isVisible()){for(var X=0,Q=ae._views.length;X<Q;X++)if((H=ae._views[X]).isVisible()){ae._focused=e=H;break}}}function p(H,X,Q){H._handleMouseEvent("mousemove",X,Q)}var d=o.navigator,_,g,y;d.pointerEnabled||d.msPointerEnabled?(_="pointerdown MSPointerDown",g="pointermove MSPointerMove",y="pointerup pointercancel MSPointerUp MSPointerCancel"):(_="touchstart",g="touchmove",y="touchend touchcancel","ontouchstart"in o&&d.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android|silk/i)||(_+=" mousedown",g+=" mousemove",y+=" mouseup"));var w={},x={mouseout:function(H){var X=ae._focused,Q=ee.getRelatedTarget(H);if(X&&(!Q||Q.nodeName==="HTML")){var $=ee.getOffset(H,X._element),tt=$.x,st=Math.abs,mt=st(tt),yt=1<<25,St=mt-yt;$.x=st(St)<mt?St*(tt<0?-1:1):tt,p(X,H,X.viewToProject($))}},scroll:h};w[_]=function(H){var X=ae._focused=u(H);r||(r=!0,X._handleMouseEvent("mousedown",H))},x[g]=function(H){var X=ae._focused;if(!s){var Q=u(H);Q?X!==Q&&(X&&p(X,H),t||(t=X),X=ae._focused=e=Q):e&&e===X&&(t&&!t.isInserted()&&(t=null),X=ae._focused=t,t=null,h())}X&&p(X,H)},x[_]=function(){s=!0},x[y]=function(H){var X=ae._focused;X&&r&&X._handleMouseEvent("mouseup",H),s=r=!1},ee.add(f,x),ee.add(o,{load:h});var m=!1,E=!1,k={doubleclick:"click",mousedrag:"mousemove"},A=!1,b,C,v,I,L,R,M,V;function U(H,X,Q,$,tt,st,mt){var yt=!1,St;function It(lt,ct){if(lt.responds(ct)){if(St||(St=new Zi(ct,$,tt,X||lt,st?tt.subtract(st):null)),lt.emit(ct,St)&&(m=!0,St.prevented&&(E=!0),St.stopped))return yt=!0}else{var Ct=k[ct];if(Ct)return It(lt,Ct)}}for(;H&&H!==mt&&!It(H,Q);)H=H._parent;return yt}function j(H,X,Q,$,tt,st){return H._project.removeOn(Q),E=m=!1,L&&U(L,null,Q,$,tt,st)||X&&X!==L&&!X.isDescendant(L)&&U(X,null,Q==="mousedrag"?"mousemove":Q,$,tt,st,L)||U(H,L||X||H,Q,$,tt,st)}var Y={mousedown:{mousedown:1,mousedrag:1,click:1,doubleclick:1},mouseup:{mouseup:1,mousedrag:1,click:1,doubleclick:1},mousemove:{mousedrag:1,mousemove:1,mouseenter:1,mouseleave:1}};return{_viewEvents:w,_handleMouseEvent:function(H,X,Q){var $=this._itemEvents,tt=$.native[H],st=H==="mousemove",mt=this._scope.tool,yt=this;function St(Nt){return $.virtual[Nt]||yt.responds(Nt)||mt&&mt.responds(Nt)}st&&r&&St("mousedrag")&&(H="mousedrag"),Q||(Q=this.getEventPoint(X));var It=this.getBounds().contains(Q),lt=tt&&It&&yt._project.hitTest(Q,{tolerance:0,fill:!0,stroke:!0}),ct=lt&&lt.item||null,Ct=!1,At={};if(At[H.substr(5)]=!0,tt&&ct!==I&&(I&&U(I,null,"mouseleave",X,Q),ct&&U(ct,null,"mouseenter",X,Q),I=ct),A^It&&(U(this,null,It?"mouseenter":"mouseleave",X,Q),Ct=!0),(It||At.drag)&&!Q.equals(C)&&(j(this,ct,st?H:"mousemove",X,Q,C),Ct=!0),A=It,At.down&&It||At.up&&b){if(j(this,ct,H,X,Q,b),At.down){if(V=ct===R&&Date.now()-M<300,v=R=ct,!E&&ct){for(var Et=ct;Et&&!Et.responds("mousedrag");)Et=Et._parent;Et&&(L=ct)}b=Q}else At.up&&(!E&&ct===v&&(M=Date.now(),j(this,ct,V?"doubleclick":"click",X,Q,b),V=!1),v=L=null);A=!1,Ct=!0}C=Q,Ct&&mt&&(m=mt._handleMouseEvent(H,X,Q,At)||m),X.cancelable!==!1&&(m&&!At.move||At.down&&St("mouseup"))&&X.preventDefault()},_handleKeyEvent:function(H,X,Q,$){var tt=this._scope,st=tt.tool,mt;function yt(St){St.responds(H)&&(jt=tt,St.emit(H,mt=mt||new ji(H,X,Q,$)))}this.isVisible()&&(yt(this),st&&st.responds(H)&&yt(st))},_countItemEvent:function(H,X){var Q=this._itemEvents,$=Q.native,tt=Q.virtual;for(var st in Y)$[st]=($[st]||0)+(Y[st][H]||0)*X;tt[H]=(tt[H]||0)+X},statics:{updateFocus:h,_resetState:function(){r=s=m=A=!1,t=e=b=C=v=I=L=R=M=V=null}}}}),Wi=ae.extend({_class:"CanvasView",initialize:function(e,r){if(!(r instanceof o.HTMLCanvasElement)){var s=G.read(arguments,1);if(s.isZero())throw new Error("Cannot create CanvasView with the provided argument: "+c.slice(arguments,1));r=me.getCanvas(s)}var u=this._context=r.getContext("2d");if(u.save(),this._pixelRatio=1,!/^off|false$/.test(O.getAttribute(r,"hidpi"))){var h=o.devicePixelRatio||1,p=Kt.getPrefixed(u,"backingStorePixelRatio")||1;this._pixelRatio=h/p}ae.call(this,e,r),this._needsUpdate=!0},remove:function t(){return this._context.restore(),t.base.call(this)},_setElementSize:function t(e,r){var s=this._pixelRatio;if(t.base.call(this,e*s,r*s),s!==1){var u=this._element,h=this._context;if(!O.hasAttribute(u,"resize")){var p=u.style;p.width=e+"px",p.height=r+"px"}h.restore(),h.save(),h.scale(s,s)}},getContext:function(){return this._context},getPixelSize:function t(e){var r=jt.agent,s;if(r&&r.firefox)s=t.base.call(this,e);else{var u=this._context,h=u.font;u.font=e+" serif",s=parseFloat(u.font),u.font=h}return s},getTextWidth:function(t,e){var r=this._context,s=r.font,u=0;r.font=t;for(var h=0,p=e.length;h<p;h++)u=Math.max(u,r.measureText(e[h]).width);return r.font=s,u},update:function(){if(!this._needsUpdate)return!1;var t=this._project,e=this._context,r=this._viewSize;return e.clearRect(0,0,r.width+1,r.height+1),t&&t.draw(e,this._matrix,this._pixelRatio),this._needsUpdate=!1,!0}}),_i=c.extend({_class:"Event",initialize:function(e){this.event=e,this.type=e&&e.type},prevented:!1,stopped:!1,preventDefault:function(){this.prevented=!0,this.event.preventDefault()},stopPropagation:function(){this.stopped=!0,this.event.stopPropagation()},stop:function(){this.stopPropagation(),this.preventDefault()},getTimeStamp:function(){return this.event.timeStamp},getModifiers:function(){return Si.modifiers}}),ji=_i.extend({_class:"KeyEvent",initialize:function(e,r,s,u){this.type=e,this.event=r,this.key=s,this.character=u},toString:function(){return"{ type: '"+this.type+"', key: '"+this.key+"', character: '"+this.character+"', modifiers: "+this.getModifiers()+" }"}}),Si=new function(){var t={" ":"tab"," ":"space","\b":"backspace","":"delete",Spacebar:"space",Del:"delete",Win:"meta",Esc:"escape"},e={tab:" ",space:" ",enter:"\r"},r={},s={},u,h,p=new c({shift:!1,control:!1,alt:!1,meta:!1,capsLock:!1,space:!1}).inject({option:{get:function(){return this.alt}},command:{get:function(){var g=jt&&jt.agent;return g&&g.mac?this.meta:this.control}}});function d(g){var y=g.key||g.keyIdentifier;return y=/^U\+/.test(y)?String.fromCharCode(parseInt(y.substr(2),16)):/^Arrow[A-Z]/.test(y)?y.substr(5):y==="Unidentified"||y===a?String.fromCharCode(g.keyCode):y,t[y]||(y.length>1?c.hyphenate(y):y.toLowerCase())}function _(g,y,w,x){var m=ae._focused,E;if(r[y]=g,g?s[y]=w:delete s[y],y.length>1&&(E=c.camelize(y))in p){p[E]=g;var k=jt&&jt.agent;if(E==="meta"&&k&&k.mac)if(g)u={};else{for(var A in u)A in s&&_(!1,A,u[A],x);u=null}}else g&&u&&(u[y]=w);m&&m._handleKeyEvent(g?"keydown":"keyup",x,y,w)}return ee.add(f,{keydown:function(g){var y=d(g),w=jt&&jt.agent;y.length>1||w&&w.chrome&&(g.altKey||w.mac&&g.metaKey||!w.mac&&g.ctrlKey)?_(!0,y,e[y]||(y.length>1?"":y),g):h=y},keypress:function(g){if(h){var y=d(g),w=g.charCode,x=w>=32?String.fromCharCode(w):y.length>1?"":y;y!==h&&(y=x.toLowerCase()),_(!0,y,x,g),h=null}},keyup:function(g){var y=d(g);y in s&&_(!1,y,s[y],g)}}),ee.add(o,{blur:function(g){for(var y in s)_(!1,y,s[y],g)}}),{modifiers:p,isDown:function(g){return!!r[g]}}},Zi=_i.extend({_class:"MouseEvent",initialize:function(e,r,s,u,h){this.type=e,this.event=r,this.point=s,this.target=u,this.delta=h},toString:function(){return"{ type: '"+this.type+"', point: "+this.point+", target: "+this.target+(this.delta?", delta: "+this.delta:"")+", modifiers: "+this.getModifiers()+" }"}}),gi=_i.extend({_class:"ToolEvent",_item:null,initialize:function(e,r,s){this.tool=e,this.type=r,this.event=s},_choosePoint:function(t,e){return t||(e?e.clone():null)},getPoint:function(){return this._choosePoint(this._point,this.tool._point)},setPoint:function(t){this._point=t},getLastPoint:function(){return this._choosePoint(this._lastPoint,this.tool._lastPoint)},setLastPoint:function(t){this._lastPoint=t},getDownPoint:function(){return this._choosePoint(this._downPoint,this.tool._downPoint)},setDownPoint:function(t){this._downPoint=t},getMiddlePoint:function(){return!this._middlePoint&&this.tool._lastPoint?this.tool._point.add(this.tool._lastPoint).divide(2):this._middlePoint},setMiddlePoint:function(t){this._middlePoint=t},getDelta:function(){return!this._delta&&this.tool._lastPoint?this.tool._point.subtract(this.tool._lastPoint):this._delta},setDelta:function(t){this._delta=t},getCount:function(){return this.tool[/^mouse(down|up)$/.test(this.type)?"_downCount":"_moveCount"]},setCount:function(t){this.tool[/^mouse(down|up)$/.test(this.type)?"downCount":"count"]=t},getItem:function(){if(!this._item){var t=this.tool._scope.project.hitTest(this.getPoint());if(t){for(var e=t.item,r=e._parent;/^(Group|CompoundPath)$/.test(r._class);)e=r,r=r._parent;this._item=e}}return this._item},setItem:function(t){this._item=t},toString:function(){return"{ type: "+this.type+", point: "+this.getPoint()+", count: "+this.getCount()+", modifiers: "+this.getModifiers()+" }"}}),Mr=D.extend({_class:"Tool",_list:"tools",_reference:"tool",_events:["onMouseDown","onMouseUp","onMouseDrag","onMouseMove","onActivate","onDeactivate","onEditOptions","onKeyDown","onKeyUp"],initialize:function(e){D.call(this),this._moveCount=-1,this._downCount=-1,this.set(e)},getMinDistance:function(){return this._minDistance},setMinDistance:function(t){this._minDistance=t,t!=null&&this._maxDistance!=null&&t>this._maxDistance&&(this._maxDistance=t)},getMaxDistance:function(){return this._maxDistance},setMaxDistance:function(t){this._maxDistance=t,this._minDistance!=null&&t!=null&&t<this._minDistance&&(this._minDistance=t)},getFixedDistance:function(){return this._minDistance==this._maxDistance?this._minDistance:null},setFixedDistance:function(t){this._minDistance=this._maxDistance=t},_handleMouseEvent:function(t,e,r,s){jt=this._scope,s.drag&&!this.responds(t)&&(t="mousemove");var u=s.move||s.drag,h=this.responds(t),p=this.minDistance,d=this.maxDistance,_=!1,g=this;function y(x,m){var E=r,k=u?g._point:g._downPoint||E;if(u){if(g._moveCount>=0&&E.equals(k))return!1;if(k&&(x!=null||m!=null)){var A=E.subtract(k),b=A.getLength();if(b<(x||0))return!1;m&&(E=k.add(A.normalize(Math.min(b,m))))}g._moveCount++}return g._point=E,g._lastPoint=k||E,s.down&&(g._moveCount=-1,g._downPoint=E,g._downCount++),!0}function w(){h&&(_=g.emit(t,new gi(g,t,e))||_)}if(s.down)y(),w();else if(s.up)y(null,d),w();else if(h)for(;y(p,d);)w();return _}}),Lr=c.extend(P,{_class:"Tween",statics:{easings:new c({linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+2*(2-t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}})},initialize:function t(e,r,s,u,h,p){this.object=e;var d=typeof h,_=d==="function";this.type=_?d:d==="string"?h:"linear",this.easing=_?h:t.easings[this.type],this.duration=u,this.running=!1,this._then=null,this._startTime=null;var g=r||s;this._keys=g?Object.keys(g):[],this._parsedKeys=this._parseKeys(this._keys),this._from=g&&this._getState(r),this._to=g&&this._getState(s),p!==!1&&this.start()},then:function(t){return this._then=t,this},start:function(){return this._startTime=null,this.running=!0,this},stop:function(){return this.running=!1,this},update:function(t){if(this.running){t>=1&&(t=1,this.running=!1);for(var e=this.easing(t),r=this._keys,s=function(y){return typeof y=="function"?y(e,t):y},u=0,h=r&&r.length;u<h;u++){var p=r[u],d=s(this._from[p]),_=s(this._to[p]),g=d&&_&&d.__add&&_.__add?_.__subtract(d).__multiply(e).__add(d):(_-d)*e+d;this._setProperty(this._parsedKeys[p],g)}this.responds("update")&&this.emit("update",new c({progress:t,factor:e})),!this.running&&this._then&&this._then(this.object)}return this},_events:{onUpdate:{}},_handleFrame:function(t){var e=this._startTime,r=e?(t-e)/this.duration:0;e||(this._startTime=t),this.update(r)},_getState:function(t){for(var e=this._keys,r={},s=0,u=e.length;s<u;s++){var h=e[s],p=this._parsedKeys[h],d=this._getProperty(p),_;if(t){var g=this._resolveValue(d,t[h]);this._setProperty(p,g),_=this._getProperty(p),_=_&&_.clone?_.clone():_,this._setProperty(p,d)}else _=d&&d.clone?d.clone():d;r[h]=_}return r},_resolveValue:function(t,e){if(e){if(Array.isArray(e)&&e.length===2){var r=e[0];return r&&r.match&&r.match(/^[+\-\*\/]=/)?this._calculate(t,r[0],e[1]):e}else if(typeof e=="string"){var s=e.match(/^[+\-*/]=(.*)/);if(s){var u=JSON.parse(s[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));return this._calculate(t,e[0],u)}}}return e},_calculate:function(t,e,r){return jt.PaperScript.calculateBinary(t,e,r)},_parseKeys:function(t){for(var e={},r=0,s=t.length;r<s;r++){var u=t[r],h=u.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");e[u]=h.split("/")}return e},_getProperty:function(t,e){for(var r=this.object,s=0,u=t.length-(e||0);s<u&&r;s++)r=r[t[s]];return r},_setProperty:function(t,e){var r=this._getProperty(t,1);r&&(r[t[t.length-1]]=e)}}),Xi={request:function(t){var e=new n.XMLHttpRequest;return e.open((t.method||"get").toUpperCase(),t.url,c.pick(t.async,!0)),t.mimeType&&e.overrideMimeType(t.mimeType),e.onload=function(){var r=e.status;r===0||r===200?t.onLoad&&t.onLoad.call(e,e.responseText):e.onerror()},e.onerror=function(){var r=e.status,s='Could not load "'+t.url+'" (Status: '+r+")";if(t.onError)t.onError(s,r);else throw new Error(s)},e.send(null)}},me=c.exports.CanvasProvider={canvases:[],getCanvas:function(t,e,r){if(!o)return null;var s,u=!0;typeof t=="object"&&(e=t.height,t=t.width),this.canvases.length?s=this.canvases.pop():(s=f.createElement("canvas"),u=!1);var h=s.getContext("2d",r||{});if(!h)throw new Error("Canvas "+s+" is unable to provide a 2D context.");return s.width===t&&s.height===e?u&&h.clearRect(0,0,t+1,e+1):(s.width=t,s.height=e),h.save(),s},getContext:function(t,e,r){var s=this.getCanvas(t,e,r);return s?s.getContext("2d",r||{}):null},release:function(t){var e=t&&t.canvas?t.canvas:t;e&&e.getContext&&(e.getContext("2d").restore(),this.canvases.push(e))}},$e=new function(){var t=Math.min,e=Math.max,r=Math.abs,s,u,h,p,d,_,g,y,w,x,m;function E(L,R,M){return .2989*L+.587*R+.114*M}function k(L,R,M,j){var U=j-E(L,R,M);w=L+U,x=R+U,m=M+U;var j=E(w,x,m),Y=t(w,x,m),H=e(w,x,m);if(Y<0){var X=j-Y;w=j+(w-j)*j/X,x=j+(x-j)*j/X,m=j+(m-j)*j/X}if(H>255){var Q=255-j,$=H-j;w=j+(w-j)*Q/$,x=j+(x-j)*Q/$,m=j+(m-j)*Q/$}}function A(L,R,M){return e(L,R,M)-t(L,R,M)}function b(L,R,M,V){var U=[L,R,M],j=e(L,R,M),Y=t(L,R,M),H;Y=Y===L?0:Y===R?1:2,j=j===L?0:j===R?1:2,H=t(Y,j)===0?e(Y,j)===1?2:1:0,U[j]>U[Y]?(U[H]=(U[H]-U[Y])*V/(U[j]-U[Y]),U[j]=V):U[H]=U[j]=0,U[Y]=0,w=U[0],x=U[1],m=U[2]}var C={multiply:function(){w=d*s/255,x=_*u/255,m=g*h/255},screen:function(){w=d+s-d*s/255,x=_+u-_*u/255,m=g+h-g*h/255},overlay:function(){w=d<128?2*d*s/255:255-2*(255-d)*(255-s)/255,x=_<128?2*_*u/255:255-2*(255-_)*(255-u)/255,m=g<128?2*g*h/255:255-2*(255-g)*(255-h)/255},"soft-light":function(){var L=s*d/255;w=L+d*(255-(255-d)*(255-s)/255-L)/255,L=u*_/255,x=L+_*(255-(255-_)*(255-u)/255-L)/255,L=h*g/255,m=L+g*(255-(255-g)*(255-h)/255-L)/255},"hard-light":function(){w=s<128?2*s*d/255:255-2*(255-s)*(255-d)/255,x=u<128?2*u*_/255:255-2*(255-u)*(255-_)/255,m=h<128?2*h*g/255:255-2*(255-h)*(255-g)/255},"color-dodge":function(){w=d===0?0:s===255?255:t(255,255*d/(255-s)),x=_===0?0:u===255?255:t(255,255*_/(255-u)),m=g===0?0:h===255?255:t(255,255*g/(255-h))},"color-burn":function(){w=d===255?255:s===0?0:e(0,255-(255-d)*255/s),x=_===255?255:u===0?0:e(0,255-(255-_)*255/u),m=g===255?255:h===0?0:e(0,255-(255-g)*255/h)},darken:function(){w=d<s?d:s,x=_<u?_:u,m=g<h?g:h},lighten:function(){w=d>s?d:s,x=_>u?_:u,m=g>h?g:h},difference:function(){w=d-s,w<0&&(w=-w),x=_-u,x<0&&(x=-x),m=g-h,m<0&&(m=-m)},exclusion:function(){w=d+s*(255-d-d)/255,x=_+u*(255-_-_)/255,m=g+h*(255-g-g)/255},hue:function(){b(s,u,h,A(d,_,g)),k(w,x,m,E(d,_,g))},saturation:function(){b(d,_,g,A(s,u,h)),k(w,x,m,E(d,_,g))},luminosity:function(){k(d,_,g,E(s,u,h))},color:function(){k(s,u,h,E(d,_,g))},add:function(){w=t(d+s,255),x=t(_+u,255),m=t(g+h,255)},subtract:function(){w=e(d-s,0),x=e(_-u,0),m=e(g-h,0)},average:function(){w=(d+s)/2,x=(_+u)/2,m=(g+h)/2},negation:function(){w=255-r(255-s-d),x=255-r(255-u-_),m=255-r(255-h-g)}},v=this.nativeModes=c.each(["source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","lighter","darker","copy","xor"],function(L){this[L]=!0},{}),I=me.getContext(1,1,{willReadFrequently:!0});I&&(c.each(C,function(L,R){var M=R==="darken",V=!1;I.save();try{I.fillStyle=M?"#300":"#a00",I.fillRect(0,0,1,1),I.globalCompositeOperation=R,I.globalCompositeOperation===R&&(I.fillStyle=M?"#a00":"#300",I.fillRect(0,0,1,1),V=I.getImageData(0,0,1,1).data[0]!==M?170:51)}catch{}I.restore(),v[R]=V}),me.release(I)),this.process=function(L,R,M,V,U){var j=R.canvas,Y=L==="normal";if(Y||v[L])M.save(),M.setTransform(1,0,0,1,0,0),M.globalAlpha=V,Y||(M.globalCompositeOperation=L),M.drawImage(j,U.x,U.y),M.restore();else{var H=C[L];if(!H)return;for(var X=M.getImageData(U.x,U.y,j.width,j.height),Q=X.data,$=R.getImageData(0,0,j.width,j.height).data,tt=0,st=Q.length;tt<st;tt+=4){s=$[tt],d=Q[tt],u=$[tt+1],_=Q[tt+1],h=$[tt+2],g=Q[tt+2],p=$[tt+3],y=Q[tt+3],H();var mt=p*V/255,yt=1-mt;Q[tt]=mt*w+yt*d,Q[tt+1]=mt*x+yt*_,Q[tt+2]=mt*m+yt*g,Q[tt+3]=p*V+yt*y}M.putImageData(X,U.x,U.y)}}},de=new function(){var t="http://www.w3.org/2000/svg",e="http://www.w3.org/2000/xmlns",r="http://www.w3.org/1999/xlink",s={href:r,xlink:e,xmlns:e+"/","xmlns:xlink":e+"/"};function u(d,_,g){return p(f.createElementNS(t,d),_,g)}function h(d,_){var g=s[_],y=g?d.getAttributeNS(g,_):d.getAttribute(_);return y==="null"?null:y}function p(d,_,g){for(var y in _){var w=_[y],x=s[y];typeof w=="number"&&g&&(w=g.number(w)),x?d.setAttributeNS(x,y,w):d.setAttribute(y,w)}return d}return{svg:t,xmlns:e,xlink:r,create:u,get:h,set:p}},Nr=c.each({fillColor:["fill","color"],fillRule:["fill-rule","string"],strokeColor:["stroke","color"],strokeWidth:["stroke-width","number"],strokeCap:["stroke-linecap","string"],strokeJoin:["stroke-linejoin","string"],strokeScaling:["vector-effect","lookup",{true:"none",false:"non-scaling-stroke"},function(t,e){return!e&&(t instanceof ue||t instanceof vt||t instanceof Ve)}],miterLimit:["stroke-miterlimit","number"],dashArray:["stroke-dasharray","array"],dashOffset:["stroke-dashoffset","number"],fontFamily:["font-family","string"],fontWeight:["font-weight","string"],fontSize:["font-size","number"],justification:["text-anchor","lookup",{left:"start",center:"middle",right:"end"}],opacity:["opacity","number"],blendMode:["mix-blend-mode","style"]},function(t,e){var r=c.capitalize(e),s=t[2];this[e]={type:t[1],property:e,attribute:t[0],toSVG:s,fromSVG:s&&c.each(s,function(u,h){this[u]=h},{}),exportFilter:t[3],get:"get"+r,set:"set"+r}},{});new function(){var t;function e(C,v,I){var L=new c,R=C.getTranslation();if(v){var M;C.isInvertible()?(C=C._shiftless(),M=C._inverseTransform(R),R=null):M=new F,L[I?"cx":"x"]=M.x,L[I?"cy":"y"]=M.y}if(!C.isIdentity()){var V=C.decompose();if(V){var U=[],j=V.rotation,Y=V.scaling,H=V.skewing;R&&!R.isZero()&&U.push("translate("+t.point(R)+")"),j&&U.push("rotate("+t.number(j)+")"),(!K.isZero(Y.x-1)||!K.isZero(Y.y-1))&&U.push("scale("+t.point(Y)+")"),H.x&&U.push("skewX("+t.number(H.x)+")"),H.y&&U.push("skewY("+t.number(H.y)+")"),L.transform=U.join(" ")}else L.transform="matrix("+C.getValues().join(",")+")"}return L}function r(C,v){for(var I=e(C._matrix),L=C._children,R=de.create("g",I,t),M=0,V=L.length;M<V;M++){var U=L[M],j=A(U,v);if(j)if(U.isClipMask()){var Y=de.create("clipPath");Y.appendChild(j),E(U,Y,"clip"),de.set(R,{"clip-path":"url(#"+Y.id+")"})}else R.appendChild(j)}return R}function s(C,v){var I=e(C._matrix,!0),L=C.getSize(),R=C.getImage();return I.x-=L.width/2,I.y-=L.height/2,I.width=L.width,I.height=L.height,I.href=v.embedImages==!1&&R&&R.src||C.toDataURL(),de.create("image",I,t)}function u(C,v){var I=v.matchShapes;if(I){var L=C.toShape(!1);if(L)return h(L)}var R=C._segments,M=R.length,V,U=e(C._matrix);if(I&&M>=2&&!C.hasHandles())if(M>2){V=C._closed?"polygon":"polyline";for(var j=[],Y=0;Y<M;Y++)j.push(t.point(R[Y]._point));U.points=j.join(" ")}else{V="line";var H=R[0]._point,X=R[1]._point;U.set({x1:H.x,y1:H.y,x2:X.x,y2:X.y})}else V="path",U.d=C.getPathData(null,v.precision);return de.create(V,U,t)}function h(C){var v=C._type,I=C._radius,L=e(C._matrix,!0,v!=="rectangle");if(v==="rectangle"){v="rect";var R=C._size,M=R.width,V=R.height;L.x-=M/2,L.y-=V/2,L.width=M,L.height=V,I.isZero()&&(I=null)}return I&&(v==="circle"?L.r=I:(L.rx=I.width,L.ry=I.height)),de.create(v,L,t)}function p(C,v){var I=e(C._matrix),L=C.getPathData(null,v.precision);return L&&(I.d=L),de.create("path",I,t)}function d(C,v){var I=e(C._matrix,!0),L=C._definition,R=m(L,"symbol"),M=L._item,V=M.getStrokeBounds();return R||(R=de.create("symbol",{viewBox:t.rectangle(V)}),R.appendChild(A(M,v)),E(L,R,"symbol")),I.href="#"+R.id,I.x+=V.x,I.y+=V.y,I.width=V.width,I.height=V.height,I.overflow="visible",de.create("use",I,t)}function _(C){var v=m(C,"color");if(!v){var I=C.getGradient(),L=I._radial,R=C.getOrigin(),M=C.getDestination(),V;if(L){V={cx:R.x,cy:R.y,r:R.getDistance(M)};var U=C.getHighlight();U&&(V.fx=U.x,V.fy=U.y)}else V={x1:R.x,y1:R.y,x2:M.x,y2:M.y};V.gradientUnits="userSpaceOnUse",v=de.create((L?"radial":"linear")+"Gradient",V,t);for(var j=I._stops,Y=0,H=j.length;Y<H;Y++){var X=j[Y],Q=X._color,$=Q.getAlpha(),tt=X._offset;V={offset:tt??Y/(H-1)},Q&&(V["stop-color"]=Q.toCSS(!0)),$<1&&(V["stop-opacity"]=$),v.appendChild(de.create("stop",V,t))}E(C,v,"color")}return"url(#"+v.id+")"}function g(C){var v=de.create("text",e(C._matrix,!0),t);return v.textContent=C._content,v}var y={Group:r,Layer:r,Raster:s,Path:u,Shape:h,CompoundPath:p,SymbolItem:d,PointText:g};function w(C,v,I){var L={},R=!I&&C.getParent(),M=[];return C._name!=null&&(L.id=C._name),c.each(Nr,function(V){var U=V.get,j=V.type,Y=C[U]();if(V.exportFilter?V.exportFilter(C,Y):!R||!c.equals(R[U](),Y)){if(j==="color"&&Y!=null){var H=Y.getAlpha();H<1&&(L[V.attribute+"-opacity"]=H)}j==="style"?M.push(V.attribute+": "+Y):L[V.attribute]=Y==null?"none":j==="color"?Y.gradient?_(Y):Y.toCSS(!0):j==="array"?Y.join(","):j==="lookup"?V.toSVG[Y]:Y}}),M.length&&(L.style=M.join(";")),L.opacity===1&&delete L.opacity,C._visible||(L.visibility="hidden"),de.set(v,L,t)}var x;function m(C,v){return x||(x={ids:{},svgs:{}}),C&&x.svgs[v+"-"+(C._id||C.__id||(C.__id=it.get("svg")))]}function E(C,v,I){x||m();var L=x.ids[I]=(x.ids[I]||0)+1;v.id=I+"-"+L,x.svgs[I+"-"+(C._id||C.__id)]=v}function k(C,v){var I=C,L=null;if(x){I=C.nodeName.toLowerCase()==="svg"&&C;for(var R in x.svgs)L||(I||(I=de.create("svg"),I.appendChild(C)),L=I.insertBefore(de.create("defs"),I.firstChild)),L.appendChild(x.svgs[R]);x=null}return v.asString?new n.XMLSerializer().serializeToString(I):I}function A(C,v,I){var L=y[C._class],R=L&&L(C,v);if(R){var M=v.onExport;M&&(R=M(C,R,v)||R);var V=JSON.stringify(C._data);V&&V!=="{}"&&V!=="null"&&R.setAttribute("data-paper-data",V)}return R&&w(C,R,I)}function b(C){return C||(C={}),t=new q(C.precision),C}T.inject({exportSVG:function(C){return C=b(C),k(A(this,C,!0),C)}}),ot.inject({exportSVG:function(C){C=b(C);var v=this._children,I=this.getView(),L=c.pick(C.bounds,"view"),R=C.matrix||L==="view"&&I._matrix,M=R&&ft.read([R]),V=L==="view"?new nt([0,0],I.getViewSize()):L==="content"?T._getBounds(v,M,{stroke:!0}).rect:nt.read([L],0,{readNull:!0}),U={version:"1.1",xmlns:de.svg,"xmlns:xlink":de.xlink};V&&(U.width=V.width,U.height=V.height,(V.x||V.x===0||V.y||V.y===0)&&(U.viewBox=t.rectangle(V)));var j=de.create("svg",U,t),Y=j;M&&!M.isIdentity()&&(Y=j.appendChild(de.create("g",e(M),t)));for(var H=0,X=v.length;H<X;H++)Y.appendChild(A(v[H],C,!0));return k(j,C)}})},new function(){var t={},e;function r(v,I,L,R,M,V){var U=de.get(v,I)||V,j=U==null?R?null:L?"":0:L?U:parseFloat(U);return/%\s*$/.test(U)?j/100*(M?1:e[/x|^width/.test(I)?"width":"height"]):j}function s(v,I,L,R,M,V,U){return I=r(v,I||"x",!1,R,M,V),L=r(v,L||"y",!1,R,M,U),R&&(I==null||L==null)?null:new F(I,L)}function u(v,I,L,R,M){return I=r(v,I||"width",!1,R,M),L=r(v,L||"height",!1,R,M),R&&(I==null||L==null)?null:new G(I,L)}function h(v,I,L){return v==="none"?null:I==="number"?parseFloat(v):I==="array"?v?v.split(/[\s,]+/g).map(parseFloat):[]:I==="color"?A(v)||v:I==="lookup"?L[v]:v}function p(v,I,L,R){var M=v.childNodes,V=I==="clippath",U=I==="defs",j=new xt,Y=j._project,H=Y._currentStyle,X=[];if(!V&&!U&&(j=k(j,v,R),Y._currentStyle=j._style.clone()),R)for(var Q=v.querySelectorAll("defs"),$=0,tt=Q.length;$<tt;$++)b(Q[$],L,!1);for(var $=0,tt=M.length;$<tt;$++){var st=M[$],mt;st.nodeType===1&&!/^defs$/i.test(st.nodeName)&&(mt=b(st,L,!1))&&!(mt instanceof Ot)&&X.push(mt)}return j.addChildren(X),V&&(j=k(j.reduce(),v,R)),Y._currentStyle=H,(V||U)&&(j.remove(),j=null),j}function d(v,I){for(var L=v.getAttribute("points").match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g),R=[],M=0,V=L.length;M<V;M+=2)R.push(new F(parseFloat(L[M]),parseFloat(L[M+1])));var U=new zt(R);return I==="polygon"&&U.closePath(),U}function _(v){return ue.create(v.getAttribute("d"))}function g(v,I){var L=(r(v,"href",!0)||"").substring(1),R=I==="radialgradient",M;if(L)M=t[L].getGradient(),M._radial^R&&(M=M.clone(),M._radial=R);else{for(var V=v.childNodes,U=[],j=0,Y=V.length;j<Y;j++){var H=V[j];H.nodeType===1&&U.push(k(new ve,H))}M=new he(U,R)}var X,Q,$,tt=r(v,"gradientUnits",!0)!=="userSpaceOnUse";R?(X=s(v,"cx","cy",!1,tt,"50%","50%"),Q=X.add(r(v,"r",!1,!1,tt,"50%"),0),$=s(v,"fx","fy",!0,tt)):(X=s(v,"x1","y1",!1,tt,"0%","0%"),Q=s(v,"x2","y2",!1,tt,"100%","0%"));var st=k(new Mt(M,X,Q,$),v);return st._scaleToBounds=tt,null}var y={"#document":function(v,I,L,R){for(var M=v.childNodes,V=0,U=M.length;V<U;V++){var j=M[V];if(j.nodeType===1)return b(j,L,R)}},g:p,svg:p,clippath:p,polygon:d,polyline:d,path:_,lineargradient:g,radialgradient:g,image:function(v){var I=new Ft(r(v,"href",!0));return I.on("load",function(){var L=u(v);this.setSize(L);var R=s(v).add(L.divide(2));this._matrix.append(new ft().translate(R))}),I},symbol:function(v,I,L,R){return new Ot(p(v,I,L,R),!0)},defs:p,use:function(v){var I=(r(v,"href",!0)||"").substring(1),L=t[I],R=s(v);return L?L instanceof Ot?L.place(R):L.clone().translate(R):null},circle:function(v){return new vt.Circle(s(v,"cx","cy"),r(v,"r"))},ellipse:function(v){return new vt.Ellipse({center:s(v,"cx","cy"),radius:u(v,"rx","ry")})},rect:function(v){return new vt.Rectangle(new nt(s(v),u(v)),u(v,"rx","ry"))},line:function(v){return new zt.Line(s(v,"x1","y1"),s(v,"x2","y2"))},text:function(v){var I=new Jt(s(v).add(s(v,"dx","dy")));return I.setContent(v.textContent.trim()||""),I},switch:p};function w(v,I,L,R){if(v.transform){for(var M=(R.getAttribute(L)||"").split(/\)\s*/g),V=new ft,U=0,j=M.length;U<j;U++){var Y=M[U];if(!Y)break;for(var H=Y.split(/\(\s*/),X=H[0],Q=H[1].split(/[\s,]+/g),$=0,tt=Q.length;$<tt;$++)Q[$]=parseFloat(Q[$]);switch(X){case"matrix":V.append(new ft(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]));break;case"rotate":V.rotate(Q[0],Q[1]||0,Q[2]||0);break;case"translate":V.translate(Q[0],Q[1]||0);break;case"scale":V.scale(Q);break;case"skewX":V.skew(Q[0],0);break;case"skewY":V.skew(0,Q[0]);break}}v.transform(V)}}function x(v,I,L){var R=L==="fill-opacity"?"getFillColor":"getStrokeColor",M=v[R]&&v[R]();M&&M.setAlpha(parseFloat(I))}var m=c.set(c.each(Nr,function(v){this[v.attribute]=function(I,L){if(I[v.set]&&(I[v.set](h(L,v.type,v.fromSVG)),v.type==="color")){var R=I[v.get]();if(R&&R._scaleToBounds){var M=I.getBounds();R.transform(new ft().translate(M.getPoint()).scale(M.getSize()))}}}},{}),{id:function(v,I){t[I]=v,v.setName&&v.setName(I)},"clip-path":function(v,I){var L=A(I);if(L)if(L=L.clone(),L.setClipMask(!0),v instanceof xt)v.insertChild(0,L);else return new xt(L,v)},gradientTransform:w,transform:w,"fill-opacity":x,"stroke-opacity":x,visibility:function(v,I){v.setVisible&&v.setVisible(I==="visible")},display:function(v,I){v.setVisible&&v.setVisible(I!==null)},"stop-color":function(v,I){v.setColor&&v.setColor(I)},"stop-opacity":function(v,I){v._color&&v._color.setAlpha(parseFloat(I))},offset:function(v,I){if(v.setOffset){var L=I.match(/(.*)%$/);v.setOffset(L?L[1]/100:parseFloat(I))}},viewBox:function(v,I,L,R,M){var V=new nt(h(I,"array")),U=u(R,null,null,!0),j,Y;if(v instanceof xt){var H=U?U.divide(V.getSize()):1,Y=new ft().scale(H).translate(V.getPoint().negate());j=v}else v instanceof Ot&&(U&&V.setSize(U),j=v._item);if(j){if(E(R,"overflow",M)!=="visible"){var X=new vt.Rectangle(V);X.setClipMask(!0),j.addChild(X)}Y&&j.transform(Y)}}});function E(v,I,L){var R=v.attributes[I],M=R&&R.value;if(!M&&v.style){var V=c.camelize(I);M=v.style[V],!M&&L.node[V]!==L.parent[V]&&(M=L.node[V])}return M?M==="none"?null:M:a}function k(v,I,L){var R=I.parentNode,M={node:Kt.getStyles(I)||{},parent:!L&&!/^defs$/i.test(R.tagName)&&Kt.getStyles(R)||{}};return c.each(m,function(V,U){var j=E(I,U,M);v=j!==a&&V(v,j,U,I,M)||v}),v}function A(v){var I=v&&v.match(/\((?:["'#]*)([^"')]+)/),L=I&&I[1],R=L&&t[o?L.replace(o.location.href.split("#")[0]+"#",""):L];return R&&R._scaleToBounds&&(R=R.clone(),R._scaleToBounds=!0),R}function b(v,I,L){var R=v.nodeName.toLowerCase(),M=R!=="#document",V=f.body,U,j,Y;L&&M&&(e=jt.getView().getSize(),e=u(v,null,null,!0)||e,U=de.create("svg",{style:"stroke-width: 1px; stroke-miterlimit: 10"}),j=v.parentNode,Y=v.nextSibling,U.appendChild(v),V.appendChild(U));var H=jt.settings,X=H.applyMatrix,Q=H.insertItems;H.applyMatrix=!1,H.insertItems=!1;var $=y[R],tt=$&&$(v,R,I,L)||null;if(H.insertItems=Q,H.applyMatrix=X,tt){M&&!(tt instanceof xt)&&(tt=k(tt,v,L));var st=I.onImport,mt=M&&v.getAttribute("data-paper-data");st&&(tt=st(v,tt,I)||tt),I.expandShapes&&tt instanceof vt&&(tt.remove(),tt=tt.toPath()),mt&&(tt._data=JSON.parse(mt))}return U&&(V.removeChild(U),j&&(Y?j.insertBefore(v,Y):j.appendChild(v))),L&&(t={},tt&&c.pick(I.applyMatrix,X)&&tt.matrix.apply(!0,!0)),tt}function C(v,I,L){if(!v)return null;I=typeof I=="function"?{onLoad:I}:I||{};var R=jt,M=null;function V(H){try{var X=typeof H=="object"?H:new n.DOMParser().parseFromString(H.trim(),"image/svg+xml");if(!X.nodeName)throw X=null,new Error("Unsupported SVG source: "+v);jt=R,M=b(X,I,!0),(!I||I.insert!==!1)&&L._insertItem(a,M);var Q=I.onLoad;Q&&Q(M,H)}catch($){U($)}}function U(H,X){var Q=I.onError;if(Q)Q(H,X);else throw new Error(H)}if(typeof v=="string"&&!/^[\s\S]*</.test(v)){var j=f.getElementById(v);j?V(j):Xi.request({url:v,async:!0,onLoad:V,onError:U})}else if(typeof File<"u"&&v instanceof File){var Y=new FileReader;return Y.onload=function(){V(Y.result)},Y.onerror=function(){U(Y.error)},Y.readAsText(v)}else V(v);return M}T.inject({importSVG:function(v,I){return C(v,I,this)}}),ot.inject({importSVG:function(v,I){return this.activate(),C(v,I,this)}})},c.exports.PaperScript=function(){var t=this,e=t.acorn;if(!e&&typeof bh<"u")try{e=Ch()}catch{}if(!e){var r,s;e=r=s={},function(k,A){if(typeof r=="object"&&typeof s=="object")return A(r);if(typeof a=="function"&&a.amd)return a(["exports"],A);A(k.acorn||(k.acorn={}))}(this,function(k){k.version="0.5.0";var A,b,C,v;k.parse=function(Z,J){return b=String(Z),C=b.length,L(J),Rs(),Fu(A.program)};var I=k.defaultOptions={ecmaVersion:5,strictSemicolons:!1,allowTrailingCommas:!0,forbidReserved:!1,allowReturnOutsideFunction:!1,locations:!1,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null};function L(Z){A=Z||{};for(var J in I)Object.prototype.hasOwnProperty.call(A,J)||(A[J]=I[J]);v=A.sourceFile||null}var R=k.getLineInfo=function(Z,J){for(var ht=1,dt=0;;){vr.lastIndex=dt;var Vt=vr.exec(Z);if(Vt&&Vt.index<J)++ht,dt=Vt.index+Vt[0].length;else break}return{line:ht,column:J-dt}};k.tokenize=function(Z,J){b=String(Z),C=b.length,L(J),Rs();var ht={};function dt(Vt){return mt=U,er(Vt),ht.start=V,ht.end=U,ht.startLoc=j,ht.endLoc=Y,ht.type=H,ht.value=X,ht}return dt.jumpTo=function(Vt,qt){if(M=Vt,A.locations){$=1,tt=vr.lastIndex=0;for(var Ht;(Ht=vr.exec(b))&&Ht.index<Vt;)++$,tt=Ht.index+Ht[0].length}Q=qt,mr()},dt};var M,V,U,j,Y,H,X,Q,$,tt,st,mt,yt,St,It,lt;function ct(Z,J){var ht=R(b,Z);J+=" ("+ht.line+":"+ht.column+")";var dt=new SyntaxError(J);throw dt.pos=Z,dt.loc=ht,dt.raisedAt=M,dt}var Ct=[],At={type:"num"},Et={type:"regexp"},Nt={type:"string"},Lt={type:"name"},Bt={type:"eof"},Ut={keyword:"break"},Dt={keyword:"case",beforeExpr:!0},ke={keyword:"catch"},Pt={keyword:"continue"},oe={keyword:"debugger"},pe={keyword:"default"},re={keyword:"do",isLoop:!0},xe={keyword:"else",beforeExpr:!0},Fe={keyword:"finally"},Pe={keyword:"for",isLoop:!0},Ge={keyword:"function"},Oe={keyword:"if"},_e={keyword:"return",beforeExpr:!0},ti={keyword:"switch"},ze={keyword:"throw",beforeExpr:!0},We={keyword:"try"},vi={keyword:"var"},ei={keyword:"while",isLoop:!0},_r={keyword:"with"},Yi={keyword:"new",beforeExpr:!0},Rr={keyword:"this"},Fr={keyword:"null",atomValue:null},zr={keyword:"true",atomValue:!0},Ki={keyword:"false",atomValue:!1},Zt={keyword:"in",binop:7,beforeExpr:!0},Dr={break:Ut,case:Dt,catch:ke,continue:Pt,debugger:oe,default:pe,do:re,else:xe,finally:Fe,for:Pe,function:Ge,if:Oe,return:_e,switch:ti,throw:ze,try:We,var:vi,while:ei,with:_r,null:Fr,true:zr,false:Ki,new:Yi,in:Zt,instanceof:{keyword:"instanceof",binop:7,beforeExpr:!0},this:Rr,typeof:{keyword:"typeof",prefix:!0,beforeExpr:!0},void:{keyword:"void",prefix:!0,beforeExpr:!0},delete:{keyword:"delete",prefix:!0,beforeExpr:!0}},Qi={type:"[",beforeExpr:!0},Ji={type:"]"},Ci={type:"{",beforeExpr:!0},ki={type:"}"},oi={type:"(",beforeExpr:!0},ii={type:")"},i={type:",",beforeExpr:!0},l={type:";",beforeExpr:!0},S={type:":",beforeExpr:!0},N={type:"."},W={type:"?",beforeExpr:!0},rt={binop:10,beforeExpr:!0},ut={isAssign:!0,beforeExpr:!0},bt={isAssign:!0,beforeExpr:!0},Tt={postfix:!0,prefix:!0,isUpdate:!0},Gt={prefix:!0,beforeExpr:!0},Xt={binop:1,beforeExpr:!0},Se={binop:2,beforeExpr:!0},Pi={binop:3,beforeExpr:!0},$i={binop:4,beforeExpr:!0},Mi={binop:5,beforeExpr:!0},gr={binop:6,beforeExpr:!0},Li={binop:7,beforeExpr:!0},Ni={binop:8,beforeExpr:!0},gu={binop:9,prefix:!0,beforeExpr:!0},vu={binop:10,beforeExpr:!0};k.tokTypes={bracketL:Qi,bracketR:Ji,braceL:Ci,braceR:ki,parenL:oi,parenR:ii,comma:i,semi:l,colon:S,dot:N,question:W,slash:rt,eq:ut,name:Lt,eof:Bt,num:At,regexp:Et,string:Nt};for(var Es in Dr)k.tokTypes["_"+Es]=Dr[Es];function Vr(Z){Z=Z.split(" ");var J="",ht=[];t:for(var dt=0;dt<Z.length;++dt){for(var Vt=0;Vt<ht.length;++Vt)if(ht[Vt][0].length==Z[dt].length){ht[Vt].push(Z[dt]);continue t}ht.push([Z[dt]])}function qt(ne){if(ne.length==1)return J+="return str === "+JSON.stringify(ne[0])+";";J+="switch(str){";for(var pi=0;pi<ne.length;++pi)J+="case "+JSON.stringify(ne[pi])+":";J+="return true}return false;"}if(ht.length>3){ht.sort(function(ne,pi){return pi.length-ne.length}),J+="switch(str.length){";for(var dt=0;dt<ht.length;++dt){var Ht=ht[dt];J+="case "+Ht[0].length+":",qt(Ht)}J+="}"}else qt(Z);return new Function("str",J)}var mu=Vr("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),xu=Vr("class enum extends super const export import"),Os=Vr("implements interface let package private protected public static yield"),an=Vr("eval arguments"),yu=Vr("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),bu=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ms="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",wu="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_",Ls=new RegExp("["+Ms+"]"),Su=new RegExp("["+Ms+wu+"]"),un=/[\n\r\u2028\u2029]/,vr=/\r\n|[\n\r\u2028\u2029]/g,on=k.isIdentifierStart=function(Z){return Z<65?Z===36:Z<91?!0:Z<97?Z===95:Z<123?!0:Z>=170&&Ls.test(String.fromCharCode(Z))},Ns=k.isIdentifierChar=function(Z){return Z<48?Z===36:Z<58?!0:Z<65?!1:Z<91?!0:Z<97?Z===95:Z<123?!0:Z>=170&&Su.test(String.fromCharCode(Z))};function tr(){this.line=$,this.column=M-tt}function Rs(){$=1,M=tt=0,Q=!0,mr()}function Me(Z,J){U=M,A.locations&&(Y=new tr),H=Z,mr(),X=J,Q=Z.beforeExpr}function Cu(){var Z=A.onComment&&A.locations&&new tr,J=M,ht=b.indexOf("*/",M+=2);if(ht===-1&&ct(M-2,"Unterminated comment"),M=ht+2,A.locations){vr.lastIndex=J;for(var dt;(dt=vr.exec(b))&&dt.index<M;)++$,tt=dt.index+dt[0].length}A.onComment&&A.onComment(!0,b.slice(J+2,ht),J,M,Z,A.locations&&new tr)}function In(){for(var Z=M,J=A.onComment&&A.locations&&new tr,ht=b.charCodeAt(M+=2);M<C&&ht!==10&&ht!==13&&ht!==8232&&ht!==8233;)++M,ht=b.charCodeAt(M);A.onComment&&A.onComment(!1,b.slice(Z+2,M),Z,M,J,A.locations&&new tr)}function mr(){for(;M<C;){var Z=b.charCodeAt(M);if(Z===32)++M;else if(Z===13){++M;var J=b.charCodeAt(M);J===10&&++M,A.locations&&(++$,tt=M)}else if(Z===10||Z===8232||Z===8233)++M,A.locations&&(++$,tt=M);else if(Z>8&&Z<14)++M;else if(Z===47){var J=b.charCodeAt(M+1);if(J===42)Cu();else if(J===47)In();else break}else if(Z===160)++M;else if(Z>=5760&&bu.test(String.fromCharCode(Z)))++M;else break}}function ku(){var Z=b.charCodeAt(M+1);return Z>=48&&Z<=57?zs(!0):(++M,Me(N))}function Pu(){var Z=b.charCodeAt(M+1);return Q?(++M,Fs()):Z===61?Le(bt,2):Le(rt,1)}function Tu(){var Z=b.charCodeAt(M+1);return Z===61?Le(bt,2):Le(vu,1)}function Iu(Z){var J=b.charCodeAt(M+1);return J===Z?Le(Z===124?Xt:Se,2):J===61?Le(bt,2):Le(Z===124?Pi:Mi,1)}function Au(){var Z=b.charCodeAt(M+1);return Z===61?Le(bt,2):Le($i,1)}function Eu(Z){var J=b.charCodeAt(M+1);return J===Z?J==45&&b.charCodeAt(M+2)==62&&un.test(b.slice(mt,M))?(M+=3,In(),mr(),er()):Le(Tt,2):J===61?Le(bt,2):Le(gu,1)}function Ou(Z){var J=b.charCodeAt(M+1),ht=1;return J===Z?(ht=Z===62&&b.charCodeAt(M+2)===62?3:2,b.charCodeAt(M+ht)===61?Le(bt,ht+1):Le(Ni,ht)):J==33&&Z==60&&b.charCodeAt(M+2)==45&&b.charCodeAt(M+3)==45?(M+=4,In(),mr(),er()):(J===61&&(ht=b.charCodeAt(M+2)===61?3:2),Le(Li,ht))}function Mu(Z){var J=b.charCodeAt(M+1);return J===61?Le(gr,b.charCodeAt(M+2)===61?3:2):Le(Z===61?ut:Gt,1)}function Lu(Z){switch(Z){case 46:return ku();case 40:return++M,Me(oi);case 41:return++M,Me(ii);case 59:return++M,Me(l);case 44:return++M,Me(i);case 91:return++M,Me(Qi);case 93:return++M,Me(Ji);case 123:return++M,Me(Ci);case 125:return++M,Me(ki);case 58:return++M,Me(S);case 63:return++M,Me(W);case 48:var J=b.charCodeAt(M+1);if(J===120||J===88)return Nu();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return zs(!1);case 34:case 39:return Ru(Z);case 47:return Pu();case 37:case 42:return Tu();case 124:case 38:return Iu(Z);case 94:return Au();case 43:case 45:return Eu(Z);case 60:case 62:return Ou(Z);case 61:case 33:return Mu(Z);case 126:return Le(Gt,1)}return!1}function er(Z){if(Z?M=V+1:V=M,A.locations&&(j=new tr),Z)return Fs();if(M>=C)return Me(Bt);var J=b.charCodeAt(M);if(on(J)||J===92)return Vs();var ht=Lu(J);if(ht===!1){var dt=String.fromCharCode(J);if(dt==="\\"||Ls.test(dt))return Vs();ct(M,"Unexpected character '"+dt+"'")}return ht}function Le(Z,J){var ht=b.slice(M,M+J);M+=J,Me(Z,ht)}function Fs(){for(var Vt="",Z,J,ht=M;;){M>=C&&ct(ht,"Unterminated regular expression");var dt=b.charAt(M);if(un.test(dt)&&ct(ht,"Unterminated regular expression"),Z)Z=!1;else{if(dt==="[")J=!0;else if(dt==="]"&&J)J=!1;else if(dt==="/"&&!J)break;Z=dt==="\\"}++M}var Vt=b.slice(ht,M);++M;var qt=Ds();qt&&!/^[gmsiy]*$/.test(qt)&&ct(ht,"Invalid regexp flag");try{var Ht=new RegExp(Vt,qt)}catch(ne){ne instanceof SyntaxError&&ct(ht,ne.message),ct(ne)}return Me(Et,Ht)}function Br(Z,J){for(var ht=M,dt=0,Vt=0,qt=J??1/0;Vt<qt;++Vt){var Ht=b.charCodeAt(M),ne;if(Ht>=97?ne=Ht-97+10:Ht>=65?ne=Ht-65+10:Ht>=48&&Ht<=57?ne=Ht-48:ne=1/0,ne>=Z)break;++M,dt=dt*Z+ne}return M===ht||J!=null&&M-ht!==J?null:dt}function Nu(){M+=2;var Z=Br(16);return Z==null&&ct(V+2,"Expected hexadecimal number"),on(b.charCodeAt(M))&&ct(M,"Identifier directly after number"),Me(At,Z)}function zs(Z){var J=M,ht=!1,dt=b.charCodeAt(M)===48;!Z&&Br(10)===null&&ct(J,"Invalid number"),b.charCodeAt(M)===46&&(++M,Br(10),ht=!0);var Vt=b.charCodeAt(M);(Vt===69||Vt===101)&&(Vt=b.charCodeAt(++M),(Vt===43||Vt===45)&&++M,Br(10)===null&&ct(J,"Invalid number"),ht=!0),on(b.charCodeAt(M))&&ct(M,"Identifier directly after number");var qt=b.slice(J,M),Ht;return ht?Ht=parseFloat(qt):!dt||qt.length===1?Ht=parseInt(qt,10):/[89]/.test(qt)||lt?ct(J,"Invalid number"):Ht=parseInt(qt,8),Me(At,Ht)}function Ru(Z){M++;for(var J="";;){M>=C&&ct(V,"Unterminated string constant");var ht=b.charCodeAt(M);if(ht===Z)return++M,Me(Nt,J);if(ht===92){ht=b.charCodeAt(++M);var dt=/^[0-7]+/.exec(b.slice(M,M+3));for(dt&&(dt=dt[0]);dt&&parseInt(dt,8)>255;)dt=dt.slice(0,-1);if(dt==="0"&&(dt=null),++M,dt)lt&&ct(M-2,"Octal literal in strict mode"),J+=String.fromCharCode(parseInt(dt,8)),M+=dt.length-1;else switch(ht){case 110:J+=`
7
- `;break;case 114:J+="\r";break;case 120:J+=String.fromCharCode(hn(2));break;case 117:J+=String.fromCharCode(hn(4));break;case 85:J+=String.fromCharCode(hn(8));break;case 116:J+=" ";break;case 98:J+="\b";break;case 118:J+="\v";break;case 102:J+="\f";break;case 48:J+="\0";break;case 13:b.charCodeAt(M)===10&&++M;case 10:A.locations&&(tt=M,++$);break;default:J+=String.fromCharCode(ht);break}}else(ht===13||ht===10||ht===8232||ht===8233)&&ct(V,"Unterminated string constant"),J+=String.fromCharCode(ht),++M}}function hn(Z){var J=Br(16,Z);return J===null&&ct(V,"Bad character escape sequence"),J}var xr;function Ds(){xr=!1;for(var Z,J=!0,ht=M;;){var dt=b.charCodeAt(M);if(Ns(dt))xr&&(Z+=b.charAt(M)),++M;else if(dt===92){xr||(Z=b.slice(ht,M)),xr=!0,b.charCodeAt(++M)!=117&&ct(M,"Expecting Unicode escape sequence \\uXXXX"),++M;var Vt=hn(4),qt=String.fromCharCode(Vt);qt||ct(M-1,"Invalid Unicode escape"),(J?on(Vt):Ns(Vt))||ct(M-4,"Invalid Unicode escape"),Z+=qt}else break;J=!1}return xr?Z:b.slice(ht,M)}function Vs(){var Z=Ds(),J=Lt;return!xr&&yu(Z)&&(J=Dr[Z]),Me(J,Z)}function ie(){st=V,mt=U,yt=Y,er()}function An(Z){if(lt=Z,M=V,A.locations)for(;M<tt;)tt=b.lastIndexOf(`
8
- `,tt-2)+1,--$;mr(),er()}function Bs(){this.type=null,this.start=V,this.end=null}function qs(){this.start=j,this.end=null,v!==null&&(this.source=v)}function De(){var Z=new Bs;return A.locations&&(Z.loc=new qs),A.directSourceFile&&(Z.sourceFile=A.directSourceFile),A.ranges&&(Z.range=[V,0]),Z}function Ri(Z){var J=new Bs;return J.start=Z.start,A.locations&&(J.loc=new qs,J.loc.start=Z.loc.start),A.ranges&&(J.range=[Z.range[0],0]),J}function Yt(Z,J){return Z.type=J,Z.end=mt,A.locations&&(Z.loc.end=yt),A.ranges&&(Z.range[1]=mt),Z}function En(Z){return A.ecmaVersion>=5&&Z.type==="ExpressionStatement"&&Z.expression.type==="Literal"&&Z.expression.value==="use strict"}function ye(Z){if(H===Z)return ie(),!0}function ln(){return!A.strictSemicolons&&(H===Bt||H===ki||un.test(b.slice(mt,V)))}function ir(){!ye(l)&&!ln()&&Ti()}function Ie(Z){H===Z?ie():Ti()}function Ti(){ct(V,"Unexpected token")}function fn(Z){Z.type!=="Identifier"&&Z.type!=="MemberExpression"&&ct(Z.start,"Assigning to rvalue"),lt&&Z.type==="Identifier"&&an(Z.name)&&ct(Z.start,"Assigning to "+Z.name+" in strict mode")}function Fu(Z){st=mt=M,A.locations&&(yt=new tr),St=lt=null,It=[],er();var J=Z||De(),ht=!0;for(Z||(J.body=[]);H!==Bt;){var dt=di();J.body.push(dt),ht&&En(dt)&&An(!0),ht=!1}return Yt(J,"Program")}var On={kind:"loop"},zu={kind:"switch"};function di(){(H===rt||H===bt&&X=="/=")&&er(!0);var Z=H,J=De();switch(Z){case Ut:case Pt:ie();var ht=Z===Ut;ye(l)||ln()?J.label=null:H!==Lt?Ti():(J.label=Fi(),ir());for(var dt=0;dt<It.length;++dt){var Vt=It[dt];if((J.label==null||Vt.name===J.label.name)&&(Vt.kind!=null&&(ht||Vt.kind==="loop")||J.label&&ht))break}return dt===It.length&&ct(J.start,"Unsyntactic "+Z.keyword),Yt(J,ht?"BreakStatement":"ContinueStatement");case oe:return ie(),ir(),Yt(J,"DebuggerStatement");case re:return ie(),It.push(On),J.body=di(),It.pop(),Ie(ei),J.test=qr(),ir(),Yt(J,"DoWhileStatement");case Pe:if(ie(),It.push(On),Ie(oi),H===l)return Mn(J,null);if(H===vi){var qt=De();return ie(),Hs(qt,!0),Yt(qt,"VariableDeclaration"),qt.declarations.length===1&&ye(Zt)?Us(J,qt):Mn(J,qt)}var qt=Be(!1,!0);return ye(Zt)?(fn(qt),Us(J,qt)):Mn(J,qt);case Ge:return ie(),zn(J,!0);case Oe:return ie(),J.test=qr(),J.consequent=di(),J.alternate=ye(xe)?di():null,Yt(J,"IfStatement");case _e:return!St&&!A.allowReturnOutsideFunction&&ct(V,"'return' outside of function"),ie(),ye(l)||ln()?J.argument=null:(J.argument=Be(),ir()),Yt(J,"ReturnStatement");case ti:ie(),J.discriminant=qr(),J.cases=[],Ie(Ci),It.push(zu);for(var Ht,ne;H!=ki;)if(H===Dt||H===pe){var pi=H===Dt;Ht&&Yt(Ht,"SwitchCase"),J.cases.push(Ht=De()),Ht.consequent=[],ie(),pi?Ht.test=Be():(ne&&ct(st,"Multiple default clauses"),ne=!0,Ht.test=null),Ie(S)}else Ht||Ti(),Ht.consequent.push(di());return Ht&&Yt(Ht,"SwitchCase"),ie(),It.pop(),Yt(J,"SwitchStatement");case ze:return ie(),un.test(b.slice(mt,V))&&ct(mt,"Illegal newline after throw"),J.argument=Be(),ir(),Yt(J,"ThrowStatement");case We:if(ie(),J.block=Ur(),J.handler=null,H===ke){var rr=De();ie(),Ie(oi),rr.param=Fi(),lt&&an(rr.param.name)&&ct(rr.param.start,"Binding "+rr.param.name+" in strict mode"),Ie(ii),rr.guard=null,rr.body=Ur(),J.handler=Yt(rr,"CatchClause")}return J.guardedHandlers=Ct,J.finalizer=ye(Fe)?Ur():null,!J.handler&&!J.finalizer&&ct(J.start,"Missing catch or finally clause"),Yt(J,"TryStatement");case vi:return ie(),Hs(J),ir(),Yt(J,"VariableDeclaration");case ei:return ie(),J.test=qr(),It.push(On),J.body=di(),It.pop(),Yt(J,"WhileStatement");case _r:return lt&&ct(V,"'with' in strict mode"),ie(),J.object=qr(),J.body=di(),Yt(J,"WithStatement");case Ci:return Ur();case l:return ie(),Yt(J,"EmptyStatement");default:var Vn=X,cn=Be();if(Z===Lt&&cn.type==="Identifier"&&ye(S)){for(var dt=0;dt<It.length;++dt)It[dt].name===Vn&&ct(cn.start,"Label '"+Vn+"' is already declared");var Hu=H.isLoop?"loop":H===ti?"switch":null;return It.push({name:Vn,kind:Hu}),J.body=di(),It.pop(),J.label=cn,Yt(J,"LabeledStatement")}else return J.expression=cn,ir(),Yt(J,"ExpressionStatement")}}function qr(){Ie(oi);var Z=Be();return Ie(ii),Z}function Ur(Z){var J=De(),ht=!0,dt=!1,Vt;for(J.body=[],Ie(Ci);!ye(ki);){var qt=di();J.body.push(qt),ht&&Z&&En(qt)&&(Vt=dt,An(dt=!0)),ht=!1}return dt&&!Vt&&An(!1),Yt(J,"BlockStatement")}function Mn(Z,J){return Z.init=J,Ie(l),Z.test=H===l?null:Be(),Ie(l),Z.update=H===ii?null:Be(),Ie(ii),Z.body=di(),It.pop(),Yt(Z,"ForStatement")}function Us(Z,J){return Z.left=J,Z.right=Be(),Ie(ii),Z.body=di(),It.pop(),Yt(Z,"ForInStatement")}function Hs(Z,J){for(Z.declarations=[],Z.kind="var";;){var ht=De();if(ht.id=Fi(),lt&&an(ht.id.name)&&ct(ht.id.start,"Binding "+ht.id.name+" in strict mode"),ht.init=ye(ut)?Be(!0,J):null,Z.declarations.push(Yt(ht,"VariableDeclarator")),!ye(i))break}return Z}function Be(Z,J){var ht=Ln(J);if(!Z&&H===i){var dt=Ri(ht);for(dt.expressions=[ht];ye(i);)dt.expressions.push(Ln(J));return Yt(dt,"SequenceExpression")}return ht}function Ln(Z){var J=Du(Z);if(H.isAssign){var ht=Ri(J);return ht.operator=X,ht.left=J,ie(),ht.right=Ln(Z),fn(J),Yt(ht,"AssignmentExpression")}return J}function Du(Z){var J=Vu(Z);if(ye(W)){var ht=Ri(J);return ht.test=J,ht.consequent=Be(!0),Ie(S),ht.alternate=Be(!0,Z),Yt(ht,"ConditionalExpression")}return J}function Vu(Z){return Nn(Rn(),-1,Z)}function Nn(Z,J,ht){var dt=H.binop;if(dt!=null&&(!ht||H!==Zt)&&dt>J){var Vt=Ri(Z);Vt.left=Z,Vt.operator=X;var qt=H;ie(),Vt.right=Nn(Rn(),dt,ht);var Ht=Yt(Vt,qt===Xt||qt===Se?"LogicalExpression":"BinaryExpression");return Nn(Ht,J,ht)}return Z}function Rn(){if(H.prefix){var Z=De(),J=H.isUpdate;return Z.operator=X,Z.prefix=!0,Q=!0,ie(),Z.argument=Rn(),J?fn(Z.argument):lt&&Z.operator==="delete"&&Z.argument.type==="Identifier"&&ct(Z.start,"Deleting local variable in strict mode"),Yt(Z,J?"UpdateExpression":"UnaryExpression")}for(var ht=Bu();H.postfix&&!ln();){var Z=Ri(ht);Z.operator=X,Z.prefix=!1,Z.argument=ht,fn(ht),ie(),ht=Yt(Z,"UpdateExpression")}return ht}function Bu(){return Hr(Fn())}function Hr(Z,J){if(ye(N)){var ht=Ri(Z);return ht.object=Z,ht.property=Fi(!0),ht.computed=!1,Hr(Yt(ht,"MemberExpression"),J)}else if(ye(Qi)){var ht=Ri(Z);return ht.object=Z,ht.property=Be(),ht.computed=!0,Ie(Ji),Hr(Yt(ht,"MemberExpression"),J)}else if(!J&&ye(oi)){var ht=Ri(Z);return ht.callee=Z,ht.arguments=Dn(ii,!1),Hr(Yt(ht,"CallExpression"),J)}else return Z}function Fn(){switch(H){case Rr:var dt=De();return ie(),Yt(dt,"ThisExpression");case Lt:return Fi();case At:case Nt:case Et:var dt=De();return dt.value=X,dt.raw=b.slice(V,U),ie(),Yt(dt,"Literal");case Fr:case zr:case Ki:var dt=De();return dt.value=H.atomValue,dt.raw=H.keyword,ie(),Yt(dt,"Literal");case oi:var Z=j,J=V;ie();var ht=Be();return ht.start=J,ht.end=U,A.locations&&(ht.loc.start=Z,ht.loc.end=Y),A.ranges&&(ht.range=[J,U]),Ie(ii),ht;case Qi:var dt=De();return ie(),dt.elements=Dn(Ji,!0,!0),Yt(dt,"ArrayExpression");case Ci:return Uu();case Ge:var dt=De();return ie(),zn(dt,!1);case Yi:return qu();default:Ti()}}function qu(){var Z=De();return ie(),Z.callee=Hr(Fn(),!0),ye(oi)?Z.arguments=Dn(ii,!1):Z.arguments=Ct,Yt(Z,"NewExpression")}function Uu(){var Z=De(),J=!0,ht=!1;for(Z.properties=[],ie();!ye(ki);){if(J)J=!1;else if(Ie(i),A.allowTrailingCommas&&ye(ki))break;var dt={key:Gs()},Vt=!1,qt;if(ye(S)?(dt.value=Be(!0),qt=dt.kind="init"):A.ecmaVersion>=5&&dt.key.type==="Identifier"&&(dt.key.name==="get"||dt.key.name==="set")?(Vt=ht=!0,qt=dt.kind=dt.key.name,dt.key=Gs(),H!==oi&&Ti(),dt.value=zn(De(),!1)):Ti(),dt.key.type==="Identifier"&&(lt||ht))for(var Ht=0;Ht<Z.properties.length;++Ht){var ne=Z.properties[Ht];if(ne.key.name===dt.key.name){var pi=qt==ne.kind||Vt&&ne.kind==="init"||qt==="init"&&(ne.kind==="get"||ne.kind==="set");pi&&!lt&&qt==="init"&&ne.kind==="init"&&(pi=!1),pi&&ct(dt.key.start,"Redefinition of property")}}Z.properties.push(dt)}return Yt(Z,"ObjectExpression")}function Gs(){return H===At||H===Nt?Fn():Fi(!0)}function zn(Z,J){H===Lt?Z.id=Fi():J?Ti():Z.id=null,Z.params=[];var ht=!0;for(Ie(oi);!ye(ii);)ht?ht=!1:Ie(i),Z.params.push(Fi());var dt=St,Vt=It;if(St=!0,It=[],Z.body=Ur(!0),St=dt,It=Vt,lt||Z.body.body.length&&En(Z.body.body[0]))for(var qt=Z.id?-1:0;qt<Z.params.length;++qt){var Ht=qt<0?Z.id:Z.params[qt];if((Os(Ht.name)||an(Ht.name))&&ct(Ht.start,"Defining '"+Ht.name+"' in strict mode"),qt>=0)for(var ne=0;ne<qt;++ne)Ht.name===Z.params[ne].name&&ct(Ht.start,"Argument name clash in strict mode")}return Yt(Z,J?"FunctionDeclaration":"FunctionExpression")}function Dn(Z,J,ht){for(var dt=[],Vt=!0;!ye(Z);){if(Vt)Vt=!1;else if(Ie(i),J&&A.allowTrailingCommas&&ye(Z))break;ht&&H===i?dt.push(null):dt.push(Be(!0))}return dt}function Fi(Z){var J=De();return Z&&A.forbidReserved=="everywhere"&&(Z=!1),H===Lt?(!Z&&(A.forbidReserved&&(A.ecmaVersion===3?mu:xu)(X)||lt&&Os(X))&&b.slice(V,U).indexOf("\\")==-1&&ct(V,"The keyword '"+X+"' is reserved"),J.name=X):Z&&H.keyword?J.name=H.keyword:Ti(),Q=!1,ie(),Yt(J,"Identifier")}}),e.version||(e=null)}function u(k,A){return(t.acorn||e).parse(k,A)}var h={"+":"__add","-":"__subtract","*":"__multiply","/":"__divide","%":"__modulo","==":"__equals","!=":"__equals"},p={"-":"__negate","+":"__self"},d=c.each(["add","subtract","multiply","divide","modulo","equals","negate"],function(k){this["__"+k]="#"+k},{__self:function(){return this}});F.inject(d),G.inject(d),Mt.inject(d);function _(k,A,b){var C=h[A];if(k&&k[C]){var v=k[C](b);return A==="!="?!v:v}switch(A){case"+":return k+b;case"-":return k-b;case"*":return k*b;case"/":return k/b;case"%":return k%b;case"==":return k==b;case"!=":return k!=b}}function g(k,A){var b=p[k];if(A&&A[b])return A[b]();switch(k){case"+":return+A;case"-":return-A}}function y(k,A){if(!k)return"";A=A||{};var b=[];function C(lt){for(var ct=0,Ct=b.length;ct<Ct;ct++){var At=b[ct];if(At[0]>=lt)break;lt+=At[1]}return lt}function v(lt){return k.substring(C(lt.range[0]),C(lt.range[1]))}function I(lt,ct){return k.substring(C(lt.range[1]),C(ct.range[0]))}function L(lt,ct){for(var Ct=C(lt.range[0]),At=C(lt.range[1]),Et=0,Nt=b.length-1;Nt>=0;Nt--)if(Ct>b[Nt][0]){Et=Nt+1;break}b.splice(Et,0,[Ct,ct.length-At+Ct]),k=k.substring(0,Ct)+ct+k.substring(At)}function R(lt,ct){switch(lt.type){case"UnaryExpression":if(lt.operator in p&&lt.argument.type!=="Literal"){var Ct=v(lt.argument);L(lt,'$__("'+lt.operator+'", '+Ct+")")}break;case"BinaryExpression":if(lt.operator in h&&lt.left.type!=="Literal"){var At=v(lt.left),Et=v(lt.right),Nt=I(lt.left,lt.right),Lt=lt.operator;L(lt,"__$__("+At+","+Nt.replace(new RegExp("\\"+Lt),'"'+Lt+'"')+", "+Et+")")}break;case"UpdateExpression":case"AssignmentExpression":var Bt=ct&&ct.type;if(!(Bt==="ForStatement"||Bt==="BinaryExpression"&&/^[=!<>]/.test(ct.operator)||Bt==="MemberExpression"&&ct.computed)){if(lt.type==="UpdateExpression"){var Ct=v(lt.argument),Ut="__$__("+Ct+', "'+lt.operator[0]+'", 1)',Dt=Ct+" = "+Ut;lt.prefix?Dt="("+Dt+")":(Bt==="AssignmentExpression"||Bt==="VariableDeclarator"||Bt==="BinaryExpression")&&(v(ct.left||ct.id)===Ct&&(Dt=Ut),Dt=Ct+"; "+Dt),L(lt,Dt)}else if(/^.=$/.test(lt.operator)&&lt.left.type!=="Literal"){var At=v(lt.left),Et=v(lt.right),Ut=At+" = __$__("+At+', "'+lt.operator[0]+'", '+Et+")";L(lt,/^\(.*\)$/.test(v(lt))?"("+Ut+")":Ut)}}break}}function M(lt){switch(lt.type){case"ExportDefaultDeclaration":L({range:[lt.start,lt.declaration.start]},"module.exports = ");break;case"ExportNamedDeclaration":var ct=lt.declaration,Ct=lt.specifiers;if(ct){var At=ct.declarations;At&&(At.forEach(function(Nt){L(Nt,"module.exports."+v(Nt))}),L({range:[lt.start,ct.start+ct.kind.length]},""))}else if(Ct){var Et=Ct.map(function(Nt){var Lt=v(Nt);return"module.exports."+Lt+" = "+Lt+"; "}).join("");Et&&L(lt,Et)}break}}function V(lt,ct,Ct){if(lt){for(var At in lt)if(At!=="range"&&At!=="loc"){var Et=lt[At];if(Array.isArray(Et))for(var Nt=0,Lt=Et.length;Nt<Lt;Nt++)V(Et[Nt],lt,Ct);else Et&&typeof Et=="object"&&V(Et,lt,Ct)}Ct.operatorOverloading!==!1&&R(lt,ct),Ct.moduleExports!==!1&&M(lt)}}function U(lt){var ct="",Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(lt=(Math.abs(lt)<<1)+(lt<0?1:0);lt||!ct;){var At=lt&31;lt>>=5,lt&&(At|=32),ct+=Ct[At]}return ct}var j=A.url||"",Y=A.sourceMaps,H=A.paperFeatures||{},X=A.source||k,Q=A.offset||0,$=jt.agent,tt=$.versionNumber,st=!1,mt=/\r\n|\n|\r/mg,yt;if(Y&&($.chrome&&tt>=30||$.webkit&&tt>=537.76||$.firefox&&tt>=23||$.node)){if($.node)Q-=2;else if(o&&j&&!o.location.href.indexOf(j)){var St=f.getElementsByTagName("html")[0].innerHTML;Q=St.substr(0,St.indexOf(k)+1).match(mt).length+1}st=Q>0&&!($.chrome&&tt>=36||$.safari&&tt>=600||$.firefox&&tt>=40||$.node);var It=["AA"+U(st?0:Q)+"A"];It.length=(k.match(mt)||[]).length+1+(st?Q:0),yt={version:3,file:j,names:[],mappings:It.join(";AACA"),sourceRoot:"",sources:[j],sourcesContent:[X]}}return(H.operatorOverloading!==!1||H.moduleExports!==!1)&&V(u(k,{ranges:!0,preserveParens:!0,sourceType:"module"}),null,H),yt&&(st&&(k=new Array(Q+1).join(`
9
- `)+k),/^(inline|both)$/.test(Y)&&(k+=`
10
- //# sourceMappingURL=data:application/json;base64,`+n.btoa(unescape(encodeURIComponent(JSON.stringify(yt))))),k+=`
11
- //# sourceURL=`+(j||"paperscript")),{url:j,source:X,code:k,map:yt}}function w(k,A,b){jt=A;var C=A.getView(),v=/\btool\.\w+|\s+on(?:Key|Mouse)(?:Up|Down|Move|Drag)\b/.test(k)&&!/\bnew\s+Tool\b/.test(k)?new Mr:null,I=v?v._events:[],L=["onFrame","onResize"].concat(I),R=[],M=[],V,U=typeof k=="object"?k:y(k,b);k=U.code;function j(tt,st){for(var mt in tt)(st||!/^_/.test(mt))&&new RegExp("([\\b\\s\\W]|^)"+mt.replace(/\$/g,"\\$")+"\\b").test(k)&&(R.push(mt),M.push(tt[mt]))}j({__$__:_,$__:g,paper:A,tool:v},!0),j(A),k="var module = { exports: {} }; "+k;var Q=c.each(L,function(tt){new RegExp("\\s+"+tt+"\\b").test(k)&&(R.push(tt),this.push("module.exports."+tt+" = "+tt+";"))},[]).join(`
12
- `);Q&&(k+=`
13
- `+Q),k+=`
14
- return module.exports;`;var Y=jt.agent;if(f&&(Y.chrome||Y.firefox&&Y.versionNumber<40)){var H=f.createElement("script"),X=f.head||f.getElementsByTagName("head")[0];Y.firefox&&(k=`
15
- `+k),H.appendChild(f.createTextNode("document.__paperscript__ = function("+R+") {"+k+`
16
- }`)),X.appendChild(H),V=f.__paperscript__,delete f.__paperscript__,X.removeChild(H)}else V=Function(R,k);var Q=V&&V.apply(A,M),$=Q||{};return c.each(I,function(tt){var st=$[tt];st&&(v[tt]=st)}),C&&($.onResize&&C.setOnResize($.onResize),C.emit("resize",{size:C.size,delta:new F}),$.onFrame&&C.setOnFrame($.onFrame),C.requestUpdate()),Q}function x(k){if(/^text\/(?:x-|)paperscript$/.test(k.type)&&O.getAttribute(k,"ignore")!=="true"){var A=O.getAttribute(k,"canvas"),b=f.getElementById(A),C=k.src||k.getAttribute("data-src"),v=O.hasAttribute(k,"async"),I="data-paper-scope";if(!b)throw new Error('Unable to find canvas with id "'+A+'"');var L=O.get(b.getAttribute(I))||new O().setup(b);return b.setAttribute(I,L._id),C?Xi.request({url:C,async:v,mimeType:"text/plain",onLoad:function(R){w(R,L,C)}}):w(k.innerHTML,L,k.baseURI),k.setAttribute("data-paper-ignore","true"),L}}function m(){c.each(f&&f.getElementsByTagName("script"),x)}function E(k){return k?x(k):m()}return o&&(f.readyState==="complete"?setTimeout(m):ee.add(o,{load:m})),{compile:y,execute:w,load:E,parse:u,calculateBinary:_,calculateUnary:g}}.call(this);var jt=new(O.inject(c.exports,{Base:c,Numerical:K,Key:Si,DomEvent:ee,DomElement:Kt,document:f,window:o,Symbol:Ot,PlacedSymbol:Wt}));return jt.agent.node&&da(jt),typeof a=="function"&&a.amd?a("paper",jt):z&&(z.exports=jt),jt}).call(pu,typeof self=="object"?self:null)})(_u);var kh=_u.exports;const br=xh(kh);function Ph(z){let n,a;return{c(){n=Ws("i"),a=Ws("canvas"),Bn(n,"class","cur cup"),Bn(a,"class","cur"),Bn(a,"resize",""),qn(a,"height","100vh"),qn(a,"width","100vw"),qn(a,"z-index","1000002")},m(o,f){js(o,n,f),z[2](n),js(o,a,f),z[3](a)},p:Un,i:Un,o:Un,d(o){o&&(Zs(n),Zs(a)),z[2](null),z[3](null)}}}function Th(z,n,a){var o,f,c;c="mouseleave",Zu(()=>setTimeout(()=>{var D,B,q,K,it,F,at,G,et,nt,pt,ft,gt,ot,T,xt,kt,vt,Ft,Wt,Ot,Rt,wt,te,_t,Qt,ue,zt,se,Je,Ee,Ve;se="#000",ft="rgba(0,0,0,0)",at=-19,G=-19,xt=0,kt=0,T=!1,Qt=8,te=10,Je=1,zt=40,K=[],et=f.className,nt=et.length,br.setup(o),wt=new br.Path.RegularPolygon(new br.Point(0,0),Qt,te/2),wt.strokeColor=se,wt.strokeWidth=Je,ue=Jt=>{wt.strokeColor,wt.strokeColor=Jt},gt=()=>{f.className.endsWith(" H")||(a(1,f.className=et+" H",f),ue(ft))},(()=>{var Jt,Mt,he;Jt=0,setInterval(()=>{if(!T)if(Mt===at&&he===G){if(Jt===3){gt();return}Jt+=1}else Mt=at,he=G,Jt=0},1e3)})(),Rt=150,Ot=4,ot=!1,pt=new br.Group([wt]),pt.applyMatrix=!1,Wt=wt.segments.map(()=>_h()),it=[],customElements.define("m-c",class extends HTMLElement{constructor(){super(),K.push(this),this.addEventListener("mouseenter",Jt=>{var Mt;Mt=this.getBoundingClientRect(),Ee=Math.round(Mt.left+Mt.width/2),Ve=Math.round(Mt.top+Mt.height/2),T=!0,ue("#f50"),a(1,f.className=et+" I",f),q=this}),this.addEventListener(c,Jt=>{a(1,f.className=et,f),ue(se),T=!1,q===this&&(q=void 0)})}}),F=document.body,new MutationObserver(mh((Jt,Mt)=>{var he,ve,ce,Kt,ee;for(ee=[],ce=0,Kt=K.length;ce<Kt;ce++)ve=K[ce],F.contains(ve)?ee.push(ve):ve===q&&(he=document.createEvent("HTMLEvents"),he.initEvent(c,!1,!0),ve.dispatchEvent(he));K=ee},1e3)).observe(F,{childList:!0,subtree:!0}),vt=(Jt,Mt,he)=>(1-he)*Jt+he*Mt,Ft=(Jt,Mt,he,ve,ce)=>(Jt-Mt)*(ce-ve)/(he-Mt)+ve,br.view.onFrame=Jt=>{var Mt,he,ve;T?(he=Ee,ve=Ve):(he=at,ve=G),xt=vt(xt,he,.2),kt=vt(kt,ve,.2),pt.position=new br.Point(xt,kt),Mt=wt.bounds.width,T?Mt<zt&&wt.scale(1.08):Mt>te&&(ot&&(wt.segments.forEach((ce,Kt)=>{ce.point.set(...it[Kt])}),ot=!1,it=[]),wt.scale(.92)),T&&Mt>=zt&&(ot=!0,it.length===0&&wt.segments.forEach((ce,Kt)=>{it[Kt]=[ce.point.x,ce.point.y]}),wt.segments.forEach((ce,Kt)=>{var ee,ae,Wi,_i,ji,Si,Zi,gi;Zi=Wt[Kt](Jt.count/Rt,0),gi=Wt[Kt](Jt.count/Rt,1),Wi=Ft(Zi,-1,1,-Ot,Ot),_i=Ft(gi,-1,1,-Ot,Ot),[ee,ae]=it[Kt],ji=ee+Wi,Si=ae+_i,ce.point.set(ji,Si)})),wt.smooth()},D=["A","BUTTON"],B=["INPUT","TEXTAREA"],document.addEventListener("mousemove",Jt=>{var Mt,he,ve,ce;if({clientX:at,clientY:G}=Jt,!T){for(Mt=f.className,{target:ce}=Jt;ce;){if({tagName:ve}=ce,B.includes(ve)){gt();return}else if(D.includes(ve)){he=" "+ve,Mt.endsWith(he)||(a(1,f.className=et+he,f),ue(ft));return}ce=ce.parentNode}Mt.length!==nt&&(a(1,f.className=et,f),ue(se))}}),_t=()=>{dh.set(f,{x:at,y:G}),requestAnimationFrame(_t)},requestAnimationFrame(_t)}));function P(D){Xs[D?"unshift":"push"](()=>{f=D,a(1,f)})}function O(D){Xs[D?"unshift":"push"](()=>{o=D,a(0,o)})}return[o,f,P,O]}class Ih extends Gu{constructor(n){super(),Wu(this,n,Th,Ph,ju,{})}}const Ah=Ih,tl=()=>{var z;({b:z}=Xu),new Ah({target:z}),document.body.appendChild(z)};export{tl as default};