go-duck-cli 1.2.25 → 1.3.0

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 (214) hide show
  1. package/README.md +6 -0
  2. package/generators/config.js +3 -1
  3. package/generators/security.js +2 -2
  4. package/go-duck-planner/css/bootstrap.min.css +6 -0
  5. package/go-duck-planner/css/main.css +1 -0
  6. package/go-duck-planner/favicon.ico +0 -0
  7. package/go-duck-planner/fonts/icomoonf33b-2.html +0 -0
  8. package/go-duck-planner/fonts/icomoonf33b-3.html +0 -0
  9. package/go-duck-planner/fonts/icomoonf33b-4.html +0 -0
  10. package/go-duck-planner/fonts/icomoonf33b.html +0 -0
  11. package/go-duck-planner/fonts/open-sans/OpenSans-Bold.html +0 -0
  12. package/go-duck-planner/fonts/open-sans/OpenSans-ExtraBold.html +0 -0
  13. package/go-duck-planner/fonts/open-sans/OpenSans-Light.html +0 -0
  14. package/go-duck-planner/fonts/open-sans/OpenSans-Regular.html +0 -0
  15. package/go-duck-planner/fonts/open-sans/OpenSans-SemiBold.html +0 -0
  16. package/go-duck-planner/fonts/rubik-mono/RubikMonoOne-Regular.html +0 -0
  17. package/go-duck-planner/fonts/style.css +2735 -0
  18. package/go-duck-planner/img/cancel.html +0 -0
  19. package/go-duck-planner/img/consulting.html +0 -0
  20. package/go-duck-planner/img/consulting2.html +0 -0
  21. package/go-duck-planner/img/dashed-circles-dark.html +0 -0
  22. package/go-duck-planner/img/docs/doc.html +0 -0
  23. package/go-duck-planner/img/docs/pdf.html +0 -0
  24. package/go-duck-planner/img/docs/ppt.html +0 -0
  25. package/go-duck-planner/img/docs/xls.html +0 -0
  26. package/go-duck-planner/img/docs/zip.html +0 -0
  27. package/go-duck-planner/img/empty-chat-display.html +0 -0
  28. package/go-duck-planner/img/error-screen/stars.html +0 -0
  29. package/go-duck-planner/img/fav.png +0 -0
  30. package/go-duck-planner/img/flags/1x1/au.html +0 -0
  31. package/go-duck-planner/img/flags/1x1/br.html +0 -0
  32. package/go-duck-planner/img/flags/1x1/bv.html +131 -0
  33. package/go-duck-planner/img/flags/1x1/ca.html +0 -0
  34. package/go-duck-planner/img/flags/1x1/cw.html +131 -0
  35. package/go-duck-planner/img/flags/1x1/eu.html +131 -0
  36. package/go-duck-planner/img/flags/1x1/hn.html +131 -0
  37. package/go-duck-planner/img/flags/1x1/in.html +0 -0
  38. package/go-duck-planner/img/flags/1x1/ni.html +131 -0
  39. package/go-duck-planner/img/flags/1x1/se.html +131 -0
  40. package/go-duck-planner/img/flags/1x1/za.html +131 -0
  41. package/go-duck-planner/img/folder.html +0 -0
  42. package/go-duck-planner/img/followers.html +0 -0
  43. package/go-duck-planner/img/food/biscuit.html +0 -0
  44. package/go-duck-planner/img/food/cupcake.html +0 -0
  45. package/go-duck-planner/img/food/donut.html +0 -0
  46. package/go-duck-planner/img/food/ice-cream.html +0 -0
  47. package/go-duck-planner/img/food/pizza.html +0 -0
  48. package/go-duck-planner/img/food/tea-cup.html +0 -0
  49. package/go-duck-planner/img/hover-on-tabs.html +0 -0
  50. package/go-duck-planner/img/icon-search.html +0 -0
  51. package/go-duck-planner/img/lines-bg.html +0 -0
  52. package/go-duck-planner/img/lines-bg2.html +0 -0
  53. package/go-duck-planner/img/login-bg.html +0 -0
  54. package/go-duck-planner/img/logo-compact.html +0 -0
  55. package/go-duck-planner/img/logo-large.html +0 -0
  56. package/go-duck-planner/img/logo.png +0 -0
  57. package/go-duck-planner/img/logo.svg +19 -0
  58. package/go-duck-planner/img/pattern.html +0 -0
  59. package/go-duck-planner/img/products/bag.html +0 -0
  60. package/go-duck-planner/img/products/camera.html +0 -0
  61. package/go-duck-planner/img/products/clock.html +0 -0
  62. package/go-duck-planner/img/products/drone.html +0 -0
  63. package/go-duck-planner/img/products/pencils.html +0 -0
  64. package/go-duck-planner/img/products/ring.html +0 -0
  65. package/go-duck-planner/img/products/shirt.html +0 -0
  66. package/go-duck-planner/img/products/shoes.html +0 -0
  67. package/go-duck-planner/img/products/toy.html +0 -0
  68. package/go-duck-planner/img/realestate/img1.html +0 -0
  69. package/go-duck-planner/img/realestate/img10.html +0 -0
  70. package/go-duck-planner/img/realestate/img11.html +0 -0
  71. package/go-duck-planner/img/realestate/img12.html +0 -0
  72. package/go-duck-planner/img/realestate/img2.html +0 -0
  73. package/go-duck-planner/img/realestate/img3.html +0 -0
  74. package/go-duck-planner/img/realestate/img4.html +0 -0
  75. package/go-duck-planner/img/realestate/img5.html +0 -0
  76. package/go-duck-planner/img/realestate/img6.html +0 -0
  77. package/go-duck-planner/img/realestate/img7.html +0 -0
  78. package/go-duck-planner/img/realestate/img8.html +0 -0
  79. package/go-duck-planner/img/realestate/img9.html +0 -0
  80. package/go-duck-planner/img/shade.html +0 -0
  81. package/go-duck-planner/img/stock/img1.html +0 -0
  82. package/go-duck-planner/img/stock/img10.html +0 -0
  83. package/go-duck-planner/img/stock/img11.html +0 -0
  84. package/go-duck-planner/img/stock/img12.html +0 -0
  85. package/go-duck-planner/img/stock/img13.html +0 -0
  86. package/go-duck-planner/img/stock/img14.html +0 -0
  87. package/go-duck-planner/img/stock/img2.html +0 -0
  88. package/go-duck-planner/img/stock/img3.html +0 -0
  89. package/go-duck-planner/img/stock/img4.html +0 -0
  90. package/go-duck-planner/img/stock/img5.html +0 -0
  91. package/go-duck-planner/img/stock/img6.html +0 -0
  92. package/go-duck-planner/img/stock/img7.html +0 -0
  93. package/go-duck-planner/img/stock/img8.html +0 -0
  94. package/go-duck-planner/img/stock/img9.html +0 -0
  95. package/go-duck-planner/img/svg/box.html +0 -0
  96. package/go-duck-planner/img/svg/commisions.html +0 -0
  97. package/go-duck-planner/img/svg/customer.html +0 -0
  98. package/go-duck-planner/img/svg/income.html +0 -0
  99. package/go-duck-planner/img/trophy.html +0 -0
  100. package/go-duck-planner/img/user-2.html +0 -0
  101. package/go-duck-planner/img/user.html +0 -0
  102. package/go-duck-planner/img/user1.html +0 -0
  103. package/go-duck-planner/img/user10.html +0 -0
  104. package/go-duck-planner/img/user12.html +0 -0
  105. package/go-duck-planner/img/user13.html +0 -0
  106. package/go-duck-planner/img/user14.html +0 -0
  107. package/go-duck-planner/img/user15.html +0 -0
  108. package/go-duck-planner/img/user16.html +0 -0
  109. package/go-duck-planner/img/user17.html +0 -0
  110. package/go-duck-planner/img/user18.html +0 -0
  111. package/go-duck-planner/img/user19.html +0 -0
  112. package/go-duck-planner/img/user2.html +0 -0
  113. package/go-duck-planner/img/user20.html +0 -0
  114. package/go-duck-planner/img/user21.html +0 -0
  115. package/go-duck-planner/img/user22.html +0 -0
  116. package/go-duck-planner/img/user23.html +0 -0
  117. package/go-duck-planner/img/user24.html +0 -0
  118. package/go-duck-planner/img/user3.html +0 -0
  119. package/go-duck-planner/img/user4.html +0 -0
  120. package/go-duck-planner/img/user5.html +0 -0
  121. package/go-duck-planner/img/user6.html +0 -0
  122. package/go-duck-planner/img/user7.html +0 -0
  123. package/go-duck-planner/img/user8.html +0 -0
  124. package/go-duck-planner/img/user9.html +0 -0
  125. package/go-duck-planner/index.html +30 -0
  126. package/go-duck-planner/js/bootstrap.bundle.min.html +0 -0
  127. package/go-duck-planner/js/jquery.min.html +0 -0
  128. package/go-duck-planner/js/main.html +0 -0
  129. package/go-duck-planner/js/modernizr.html +0 -0
  130. package/go-duck-planner/js/moment.html +0 -0
  131. package/go-duck-planner/main-HHOZYGRI.js +47 -0
  132. package/go-duck-planner/styles-3LK4NBNX.css +1 -0
  133. package/go-duck-planner/vendor/apex/apexcharts.min.html +0 -0
  134. package/go-duck-planner/vendor/apex/custom/analytics/byChannelGraph.html +0 -0
  135. package/go-duck-planner/vendor/apex/custom/analytics/byCountryGraph.html +0 -0
  136. package/go-duck-planner/vendor/apex/custom/analytics/byDeviceGraph.html +0 -0
  137. package/go-duck-planner/vendor/apex/custom/analytics/ordersGraph.html +0 -0
  138. package/go-duck-planner/vendor/apex/custom/analytics/targets.html +0 -0
  139. package/go-duck-planner/vendor/apex/custom/crm/sales.html +0 -0
  140. package/go-duck-planner/vendor/apex/custom/crm/sparkline-graphs.html +0 -0
  141. package/go-duck-planner/vendor/apex/custom/home/customersGraph.html +0 -0
  142. package/go-duck-planner/vendor/apex/custom/home/earningsGraph.html +0 -0
  143. package/go-duck-planner/vendor/apex/custom/home/ordersGraph.html +0 -0
  144. package/go-duck-planner/vendor/apex/custom/home/salesGraph.html +0 -0
  145. package/go-duck-planner/vendor/apex/custom/home/sparkline.html +0 -0
  146. package/go-duck-planner/vendor/apex/custom/home/visitorsGraph.html +0 -0
  147. package/go-duck-planner/vendor/apex/custom/profile/revenue.html +0 -0
  148. package/go-duck-planner/vendor/apex/custom/reports/orders.html +0 -0
  149. package/go-duck-planner/vendor/apex/custom/reports/revenue.html +0 -0
  150. package/go-duck-planner/vendor/apex/custom/reports/sales.html +0 -0
  151. package/go-duck-planner/vendor/apex/custom/reports/sales2.html +0 -0
  152. package/go-duck-planner/vendor/apex/custom/reports/sparkline.html +0 -0
  153. package/go-duck-planner/vendor/apex/custom/saas/revenue.html +0 -0
  154. package/go-duck-planner/vendor/apex/custom/saas/sales.html +0 -0
  155. package/go-duck-planner/vendor/apex/custom/sales/revenue.html +0 -0
  156. package/go-duck-planner/vendor/apex/custom/sales/tickets.html +0 -0
  157. package/go-duck-planner/vendor/bs-select/bs-select-custom.html +0 -0
  158. package/go-duck-planner/vendor/bs-select/bs-select.html +0 -0
  159. package/go-duck-planner/vendor/bs-select/bs-select.min.html +0 -0
  160. package/go-duck-planner/vendor/calendar/css/custom.html +0 -0
  161. package/go-duck-planner/vendor/calendar/css/main.min.html +0 -0
  162. package/go-duck-planner/vendor/calendar/custom/custom-schedule-calendar.html +0 -0
  163. package/go-duck-planner/vendor/calendar/custom/daygrid-calendar.html +0 -0
  164. package/go-duck-planner/vendor/calendar/custom/draggable-calendar.html +0 -0
  165. package/go-duck-planner/vendor/calendar/custom/google-view-calendar.html +0 -0
  166. package/go-duck-planner/vendor/calendar/custom/list-view-calendar.html +0 -0
  167. package/go-duck-planner/vendor/calendar/custom/selectable-calendar.html +0 -0
  168. package/go-duck-planner/vendor/calendar/js/main.min.html +0 -0
  169. package/go-duck-planner/vendor/circliful/circliful.custom.html +0 -0
  170. package/go-duck-planner/vendor/circliful/circliful.min.html +0 -0
  171. package/go-duck-planner/vendor/datatables/buttons.bs.html +0 -0
  172. package/go-duck-planner/vendor/datatables/buttons.min.html +0 -0
  173. package/go-duck-planner/vendor/datatables/buttons.print.min.html +0 -0
  174. package/go-duck-planner/vendor/datatables/custom/custom-datatables.html +0 -0
  175. package/go-duck-planner/vendor/datatables/dataTables.bootstrap.min.html +0 -0
  176. package/go-duck-planner/vendor/datatables/dataTables.bs4-custom.html +0 -0
  177. package/go-duck-planner/vendor/datatables/dataTables.bs4.html +0 -0
  178. package/go-duck-planner/vendor/datatables/dataTables.min.html +0 -0
  179. package/go-duck-planner/vendor/datatables/html5.min.html +0 -0
  180. package/go-duck-planner/vendor/datatables/jszip.min.html +0 -0
  181. package/go-duck-planner/vendor/datatables/pdfmake.min.html +0 -0
  182. package/go-duck-planner/vendor/datatables/vfs_fonts.html +0 -0
  183. package/go-duck-planner/vendor/daterange/custom-daterange.html +0 -0
  184. package/go-duck-planner/vendor/daterange/daterange-2.html +0 -0
  185. package/go-duck-planner/vendor/daterange/daterange.html +0 -0
  186. package/go-duck-planner/vendor/dropzone/dropzone.min-2.html +0 -0
  187. package/go-duck-planner/vendor/dropzone/dropzone.min.html +0 -0
  188. package/go-duck-planner/vendor/gallery/baguetteBox.html +0 -0
  189. package/go-duck-planner/vendor/gallery/custom-gallery.html +0 -0
  190. package/go-duck-planner/vendor/gallery/gallery.html +0 -0
  191. package/go-duck-planner/vendor/gallery/plugins.html +0 -0
  192. package/go-duck-planner/vendor/input-tags/tagsinput-custom.html +0 -0
  193. package/go-duck-planner/vendor/input-tags/tagsinput.html +0 -0
  194. package/go-duck-planner/vendor/input-tags/tagsinput.min.html +0 -0
  195. package/go-duck-planner/vendor/input-tags/typeahead.html +0 -0
  196. package/go-duck-planner/vendor/megamenu/css/megamenu.css +591 -0
  197. package/go-duck-planner/vendor/megamenu/js/custom.html +0 -0
  198. package/go-duck-planner/vendor/megamenu/js/megamenu.html +0 -0
  199. package/go-duck-planner/vendor/rating/raty-custom.html +0 -0
  200. package/go-duck-planner/vendor/rating/raty.html +0 -0
  201. package/go-duck-planner/vendor/search-filter/custom-search-filter.css +122 -0
  202. package/go-duck-planner/vendor/search-filter/custom-search-filter.html +0 -0
  203. package/go-duck-planner/vendor/search-filter/search-filter.css +497 -0
  204. package/go-duck-planner/vendor/search-filter/search-filter.html +0 -0
  205. package/go-duck-planner/vendor/slimscroll/custom-scrollbar.html +0 -0
  206. package/go-duck-planner/vendor/slimscroll/slimscroll.min.html +0 -0
  207. package/go-duck-planner/vendor/summernote/summernote-bs4-2.html +0 -0
  208. package/go-duck-planner/vendor/summernote/summernote-bs4.html +0 -0
  209. package/go-duck-planner/vendor/wizard/jquery.steps.custom.html +0 -0
  210. package/go-duck-planner/vendor/wizard/jquery.steps.html +0 -0
  211. package/go-duck-planner/vendor/wizard/jquery.steps.min.html +0 -0
  212. package/index.js +37 -3
  213. package/package.json +1 -1
  214. package/templates/go/router.go.hbs +8 -3
@@ -0,0 +1,47 @@
1
+ var JO=Object.create;var jc=Object.defineProperty,QO=Object.defineProperties,KO=Object.getOwnPropertyDescriptor,eP=Object.getOwnPropertyDescriptors,tP=Object.getOwnPropertyNames,eD=Object.getOwnPropertySymbols,nP=Object.getPrototypeOf,nD=Object.prototype.hasOwnProperty,rP=Object.prototype.propertyIsEnumerable;var tD=(e,t,n)=>t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ce=(e,t)=>{for(var n in t||={})nD.call(t,n)&&tD(e,n,t[n]);if(eD)for(var n of eD(t))rP.call(t,n)&&tD(e,n,t[n]);return e},lt=(e,t)=>QO(e,eP(t));var X=(e,t)=>()=>(e&&(t=e(e=0)),t);var rD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kt=(e,t)=>{for(var n in t)jc(e,n,{get:t[n],enumerable:!0})},iD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tP(t))!nD.call(e,i)&&i!==n&&jc(e,i,{get:()=>t[i],enumerable:!(r=KO(t,i))||r.enumerable});return e};var Gi=(e,t,n)=>(n=e!=null?JO(nP(e)):{},iD(t||!e||!e.__esModule?jc(n,"default",{value:e,enumerable:!0}):n,e)),iP=e=>iD(jc({},"__esModule",{value:!0}),e);var id,N0,od,dp,_0,mN,io,bo,vN,R0,yN,IN,O0,P0,k0,CN,AN,fp,L0,wN,Xt=X(()=>{"use strict";id="1.13.8",N0=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},od=Array.prototype,dp=Object.prototype,_0=typeof Symbol<"u"?Symbol.prototype:null,mN=od.push,io=od.slice,bo=dp.toString,vN=dp.hasOwnProperty,R0=typeof ArrayBuffer<"u",yN=typeof DataView<"u",IN=Array.isArray,O0=Object.keys,P0=Object.create,k0=R0&&ArrayBuffer.isView,CN=isNaN,AN=isFinite,fp=!{toString:null}.propertyIsEnumerable("toString"),L0=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],wN=Math.pow(2,53)-1});function kt(e,t){return t=t==null?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}var Er=X(()=>{"use strict"});function Qn(e){var t=typeof e;return t==="function"||t==="object"&&!!e}var ns=X(()=>{"use strict"});function hp(e){return e===null}var bN=X(()=>{"use strict"});function Fu(e){return e===void 0}var F0=X(()=>{"use strict"});function ju(e){return e===!0||e===!1||bo.call(e)==="[object Boolean]"}var j0=X(()=>{"use strict";Xt()});function gp(e){return!!(e&&e.nodeType===1)}var DN=X(()=>{"use strict"});function bt(e){var t="[object "+e+"]";return function(n){return bo.call(n)===t}}var Bn=X(()=>{"use strict";Xt()});var fa,pp=X(()=>{"use strict";Bn();fa=bt("String")});var sd,B0=X(()=>{"use strict";Bn();sd=bt("Number")});var V0,xN=X(()=>{"use strict";Bn();V0=bt("Date")});var z0,EN=X(()=>{"use strict";Bn();z0=bt("RegExp")});var G0,MN=X(()=>{"use strict";Bn();G0=bt("Error")});var ad,U0=X(()=>{"use strict";Bn();ad=bt("Symbol")});var ud,H0=X(()=>{"use strict";Bn();ud=bt("ArrayBuffer")});var SN,RV,zt,Vr=X(()=>{"use strict";Bn();Xt();SN=bt("Function"),RV=N0.document&&N0.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof RV!="function"&&(SN=function(e){return typeof e=="function"||!1});zt=SN});var Z0,TN=X(()=>{"use strict";Bn();Z0=bt("Object")});var mp,Bu,Vu=X(()=>{"use strict";Xt();TN();mp=yN&&(!/\[native code\]/.test(String(DataView))||Z0(new DataView(new ArrayBuffer(8)))),Bu=typeof Map<"u"&&Z0(new Map)});function PV(e){return e!=null&&zt(e.getInt8)&&ud(e.buffer)}var OV,rs,vp=X(()=>{"use strict";Bn();Vr();H0();Vu();OV=bt("DataView");rs=mp?PV:OV});var cr,is=X(()=>{"use strict";Xt();Bn();cr=IN||bt("Array")});function Vn(e,t){return e!=null&&vN.call(e,t)}var Do=X(()=>{"use strict";Xt()});var W0,ha,yp=X(()=>{"use strict";Bn();Do();W0=bt("Arguments");(function(){W0(arguments)||(W0=function(e){return Vn(e,"callee")})})();ha=W0});function Ip(e){return!ad(e)&&AN(e)&&!isNaN(parseFloat(e))}var NN=X(()=>{"use strict";Xt();U0()});function zu(e){return sd(e)&&CN(e)}var Y0=X(()=>{"use strict";Xt();B0()});function Gu(e){return function(){return e}}var $0=X(()=>{"use strict"});function cd(e){return function(t){var n=e(t);return typeof n=="number"&&n>=0&&n<=wN}}var X0=X(()=>{"use strict";Xt()});function ld(e){return function(t){return t?.[e]}}var q0=X(()=>{"use strict"});var ga,Cp=X(()=>{"use strict";q0();ga=ld("byteLength")});var _N,RN=X(()=>{"use strict";X0();Cp();_N=cd(ga)});function LV(e){return k0?k0(e)&&!rs(e):_N(e)&&kV.test(bo.call(e))}var kV,dd,J0=X(()=>{"use strict";Xt();vp();$0();RN();kV=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;dd=R0?LV:Gu(!1)});var Gt,zr=X(()=>{"use strict";q0();Gt=ld("length")});function FV(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(i){return t[i]===!0},push:function(i){return t[i]=!0,e.push(i)}}}function fd(e,t){t=FV(t);var n=L0.length,r=e.constructor,i=zt(r)&&r.prototype||dp,o="constructor";for(Vn(e,o)&&!t.contains(o)&&t.push(o);n--;)o=L0[n],o in e&&e[o]!==i[o]&&!t.contains(o)&&t.push(o)}var Q0=X(()=>{"use strict";Xt();Vr();Do()});function at(e){if(!Qn(e))return[];if(O0)return O0(e);var t=[];for(var n in e)Vn(e,n)&&t.push(n);return fp&&fd(e,t),t}var Mn=X(()=>{"use strict";ns();Xt();Do();Q0()});function Ap(e){if(e==null)return!0;var t=Gt(e);return typeof t=="number"&&(cr(e)||fa(e)||ha(e))?t===0:Gt(at(e))===0}var ON=X(()=>{"use strict";zr();is();pp();yp();Mn()});function Uu(e,t){var n=at(t),r=n.length;if(e==null)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0}var K0=X(()=>{"use strict";Mn()});function $e(e){if(e instanceof $e)return e;if(!(this instanceof $e))return new $e(e);this._wrapped=e}var Mr=X(()=>{"use strict";Xt();$e.VERSION=id;$e.prototype.value=function(){return this._wrapped};$e.prototype.valueOf=$e.prototype.toJSON=$e.prototype.value;$e.prototype.toString=function(){return String(this._wrapped)}});function wp(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,ga(e))}var PN=X(()=>{"use strict";Cp()});function bp(e,t){for(var n=[{a:e,b:t}],r=[],i=[];n.length;){var o=n.pop();if(o===!0){r.pop(),i.pop();continue}if(e=o.a,t=o.b,e===t){if(e!==0||1/e===1/t)continue;return!1}if(e==null||t==null)return!1;if(e!==e){if(t!==t)continue;return!1}var s=typeof e;if(s!=="function"&&s!=="object"&&typeof t!="object")return!1;e instanceof $e&&(e=e._wrapped),t instanceof $e&&(t=t._wrapped);var a=bo.call(e);if(a!==bo.call(t))return!1;if(mp&&a=="[object Object]"&&rs(e)){if(!rs(t))return!1;a=kN}switch(a){case"[object RegExp]":case"[object String]":if(""+e==""+t)continue;return!1;case"[object Number]":n.push({a:+e,b:+t});continue;case"[object Date]":case"[object Boolean]":if(+e==+t)continue;return!1;case"[object Symbol]":if(_0.valueOf.call(e)===_0.valueOf.call(t))continue;return!1;case"[object ArrayBuffer]":case kN:n.push({a:wp(e),b:wp(t)});continue}var u=a==="[object Array]";if(!u&&dd(e)){var l=ga(e);if(l!==ga(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)continue;u=!0}if(!u){if(typeof e!="object"||typeof t!="object")return!1;var f=e.constructor,d=t.constructor;if(f!==d&&!(zt(f)&&f instanceof f&&zt(d)&&d instanceof d)&&"constructor"in e&&"constructor"in t)return!1}for(var m=r.length;m--;)if(r[m]===e){if(i[m]===t)break;return!1}if(!(m>=0))if(r.push(e),i.push(t),n.push(!0),u){if(m=e.length,m!==t.length)return!1;for(;m--;)n.push({a:e[m],b:t[m]})}else{var I=at(e),C;if(m=I.length,at(t).length!==m)return!1;for(;m--;){if(C=I[m],!Vn(t,C))return!1;n.push({a:e[C],b:t[C]})}}}return!0}var kN,LN=X(()=>{"use strict";Mr();Xt();Cp();J0();Vr();Vu();vp();Mn();Do();PN();kN="[object DataView]"});function li(e){if(!Qn(e))return[];var t=[];for(var n in e)t.push(n);return fp&&fd(e,t),t}var Hu=X(()=>{"use strict";ns();Xt();Q0()});function Zu(e){var t=Gt(e);return function(n){if(n==null)return!1;var r=li(n);if(Gt(r))return!1;for(var i=0;i<t;i++)if(!zt(n[e[i]]))return!1;return e!==nA||!zt(n[eA])}}var eA,FN,tA,jN,BN,nA,VN,Dp=X(()=>{"use strict";zr();Vr();Hu();eA="forEach",FN="has",tA=["clear","delete"],jN=["get",FN,"set"],BN=tA.concat(eA,jN),nA=tA.concat(jN),VN=["add"].concat(tA,eA,FN)});var rA,zN=X(()=>{"use strict";Bn();Vu();Dp();rA=Bu?Zu(BN):bt("Map")});var iA,GN=X(()=>{"use strict";Bn();Vu();Dp();iA=Bu?Zu(nA):bt("WeakMap")});var oA,UN=X(()=>{"use strict";Bn();Vu();Dp();oA=Bu?Zu(VN):bt("Set")});var sA,HN=X(()=>{"use strict";Bn();sA=bt("WeakSet")});function Sr(e){for(var t=at(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}var pa=X(()=>{"use strict";Mn()});function xp(e){for(var t=at(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}var ZN=X(()=>{"use strict";Mn()});function Wu(e){for(var t={},n=at(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}var aA=X(()=>{"use strict";Mn()});function ma(e){var t=[];for(var n in e)zt(e[n])&&t.push(n);return t.sort()}var uA=X(()=>{"use strict";Vr()});function va(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||n==null)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),a=s.length,u=0;u<a;u++){var l=s[u];(!t||n[l]===void 0)&&(n[l]=o[l])}return n}}var Ep=X(()=>{"use strict"});var hd,cA=X(()=>{"use strict";Ep();Hu();hd=va(li)});var os,Mp=X(()=>{"use strict";Ep();Mn();os=va(at)});var gd,lA=X(()=>{"use strict";Ep();Hu();gd=va(li,!0)});function jV(){return function(){}}function pd(e){if(!Qn(e))return{};if(P0)return P0(e);var t=jV();t.prototype=e;var n=new t;return t.prototype=null,n}var dA=X(()=>{"use strict";ns();Xt()});function Sp(e,t){var n=pd(e);return t&&os(n,t),n}var WN=X(()=>{"use strict";dA();Mp()});function Tp(e){return Qn(e)?cr(e)?e.slice():hd({},e):e}var YN=X(()=>{"use strict";ns();is();cA()});function Np(e,t){return t(e),e}var $N=X(()=>{"use strict"});function md(e){return cr(e)?e:[e]}var fA=X(()=>{"use strict";Mr();is();$e.toPath=md});function Ri(e){return $e.toPath(e)}var Yu=X(()=>{"use strict";Mr();fA()});function ya(e,t){for(var n=t.length,r=0;r<n;r++){if(e==null)return;e=e[t[r]]}return n?e:void 0}var _p=X(()=>{"use strict"});function $u(e,t,n){var r=ya(e,Ri(t));return Fu(r)?n:r}var hA=X(()=>{"use strict";Yu();_p();F0()});function Rp(e,t){t=Ri(t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(!Vn(e,i))return!1;e=e[i]}return!!n}var XN=X(()=>{"use strict";Do();Yu()});function ss(e){return e}var Op=X(()=>{"use strict"});function Oi(e){return e=os({},e),function(t){return Uu(t,e)}}var vd=X(()=>{"use strict";Mp();K0()});function as(e){return e=Ri(e),function(t){return ya(t,e)}}var Pp=X(()=>{"use strict";_p();Yu()});function Pi(e,t,n){if(t===void 0)return e;switch(n??3){case 1:return function(r){return e.call(t,r)};case 3:return function(r,i,o){return e.call(t,r,i,o)};case 4:return function(r,i,o,s){return e.call(t,r,i,o,s)}}return function(){return e.apply(t,arguments)}}var Xu=X(()=>{"use strict"});function yd(e,t,n){return e==null?ss:zt(e)?Pi(e,t,n):Qn(e)&&!cr(e)?Oi(e):as(e)}var gA=X(()=>{"use strict";Op();Vr();ns();is();vd();Pp();Xu()});function Ia(e,t){return yd(e,t,1/0)}var pA=X(()=>{"use strict";Mr();gA();$e.iteratee=Ia});function Lt(e,t,n){return $e.iteratee!==Ia?$e.iteratee(e,t):yd(e,t,n)}var lr=X(()=>{"use strict";Mr();gA();pA()});function kp(e,t,n){t=Lt(t,n);for(var r=at(e),i=r.length,o={},s=0;s<i;s++){var a=r[s];o[a]=t(e[a],a,e)}return o}var qN=X(()=>{"use strict";lr();Mn()});function qu(){}var mA=X(()=>{"use strict"});function Lp(e){return e==null?qu:function(t){return $u(e,t)}}var JN=X(()=>{"use strict";mA();hA()});function Fp(e,t,n){var r=Array(Math.max(0,e));t=Pi(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}var QN=X(()=>{"use strict";Xu()});function Ca(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}var vA=X(()=>{"use strict"});var xo,jp=X(()=>{"use strict";xo=Date.now||function(){return new Date().getTime()}});function Id(e){var t=function(o){return e[o]},n="(?:"+at(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(o){return o=o==null?"":""+o,r.test(o)?o.replace(i,t):o}}var yA=X(()=>{"use strict";Mn()});var Bp,IA=X(()=>{"use strict";Bp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}});var CA,KN=X(()=>{"use strict";yA();IA();CA=Id(Bp)});var e1,t1=X(()=>{"use strict";aA();IA();e1=Wu(Bp)});var AA,n1=X(()=>{"use strict";yA();t1();AA=Id(e1)});var wA,bA=X(()=>{"use strict";Mr();wA=$e.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g}});function zV(e){return"\\"+BV[e]}function Vp(e,t,n){!t&&n&&(t=n),t=gd({},t,$e.templateSettings);var r=RegExp([(t.escape||DA).source,(t.interpolate||DA).source,(t.evaluate||DA).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(l,f,d,m,I){return o+=e.slice(i,I).replace(VV,zV),i=I+l.length,f?o+=`'+
2
+ ((__t=(`+f+`))==null?'':_.escape(__t))+
3
+ '`:d?o+=`'+
4
+ ((__t=(`+d+`))==null?'':__t)+
5
+ '`:m&&(o+=`';
6
+ `+m+`
7
+ __p+='`),l}),o+=`';
8
+ `;var s=t.variable;if(s){if(!GV.test(s))throw new Error("variable is not a bare identifier: "+s)}else o=`with(obj||{}){
9
+ `+o+`}
10
+ `,s="obj";o=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
11
+ `+o+`return __p;
12
+ `;var a;try{a=new Function(s,"_",o)}catch(l){throw l.source=o,l}var u=function(l){return a.call(this,l,$e)};return u.source="function("+s+`){
13
+ `+o+"}",u}var DA,BV,VV,GV,r1=X(()=>{"use strict";lA();Mr();bA();DA=/(.)^/,BV={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},VV=/\\|'|\r|\n|\u2028|\u2029/g;GV=/^\s*(\w|\$)+\s*$/});function zp(e,t,n){t=Ri(t);var r=t.length;if(!r)return zt(n)?n.call(e):n;for(var i=0;i<r;i++){var o=e?.[t[i]];o===void 0&&(o=n,i=r),e=zt(o)?o.call(e):o}return e}var i1=X(()=>{"use strict";Vr();Yu()});function Gp(e){var t=++UV+"";return e?e+t:t}var UV,o1=X(()=>{"use strict";UV=0});function Up(e){var t=$e(e);return t._chain=!0,t}var s1=X(()=>{"use strict";Mr()});function Cd(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=pd(e.prototype),s=e.apply(o,i);return Qn(s)?s:o}var xA=X(()=>{"use strict";dA();ns()});var EA,Eo,Ad=X(()=>{"use strict";Er();xA();Mr();EA=kt(function(e,t){var n=EA.placeholder,r=function(){for(var i=0,o=t.length,s=Array(o),a=0;a<o;a++)s[a]=t[a]===n?arguments[i++]:t[a];for(;i<arguments.length;)s.push(arguments[i++]);return Cd(e,r,this,this,s)};return r});EA.placeholder=$e;Eo=EA});var wd,MA=X(()=>{"use strict";Er();Vr();xA();wd=kt(function(e,t,n){if(!zt(e))throw new TypeError("Bind must be called on a function");var r=kt(function(i){return Cd(e,r,t,this,n.concat(i))});return r})});var Wt,Tr=X(()=>{"use strict";X0();zr();Wt=cd(Gt)});function Gr(e,t,n){!t&&t!==0&&(t=1/0);for(var r=[],i=0,o=0,s=Gt(e)||0,a=[];;){if(o>=s){if(!a.length)break;var u=a.pop();o=u.i,e=u.v,s=Gt(e);continue}var l=e[o++];a.length>=t?r[i++]=l:Wt(l)&&(cr(l)||ha(l))?(a.push({i:o,v:e}),o=0,e=l,s=Gt(e)):n||(r[i++]=l)}return r}var Aa=X(()=>{"use strict";zr();Tr();is();yp()});var SA,a1=X(()=>{"use strict";Er();Aa();MA();SA=kt(function(e,t){t=Gr(t,!1,!1);var n=t.length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=wd(e[r],e)}return e})});function Hp(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return Vn(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}var u1=X(()=>{"use strict";Do()});var bd,TA=X(()=>{"use strict";Er();bd=kt(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)})});var NA,c1=X(()=>{"use strict";Ad();TA();Mr();NA=Eo(bd,$e,1)});function Zp(e,t,n){var r,i,o,s,a=0;n||(n={});var u=function(){a=n.leading===!1?0:xo(),r=null,s=e.apply(i,o),r||(i=o=null)},l=function(){var f=xo();!a&&n.leading===!1&&(a=f);var d=t-(f-a);return i=this,o=arguments,d<=0||d>t?(r&&(clearTimeout(r),r=null),a=f,s=e.apply(i,o),r||(i=o=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,d)),s};return l.cancel=function(){clearTimeout(r),a=0,r=i=o=null},l}var l1=X(()=>{"use strict";jp()});function Wp(e,t,n){var r,i,o,s,a,u=function(){var f=xo()-i;t>f?r=setTimeout(u,t-f):(r=null,n||(s=e.apply(a,o)),r||(o=a=null))},l=kt(function(f){return a=this,o=f,i=xo(),r||(r=setTimeout(u,t),n&&(s=e.apply(a,o))),s});return l.cancel=function(){clearTimeout(r),r=o=a=null},l}var d1=X(()=>{"use strict";Er();jp()});function Yp(e,t){return Eo(t,e)}var f1=X(()=>{"use strict";Ad()});function us(e){return function(){return!e.apply(this,arguments)}}var $p=X(()=>{"use strict"});function Xp(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}var h1=X(()=>{"use strict"});function qp(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}var g1=X(()=>{"use strict"});function Ju(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var _A=X(()=>{"use strict"});var RA,p1=X(()=>{"use strict";Ad();_A();RA=Eo(Ju,2)});function Qu(e,t,n){t=Lt(t,n);for(var r=at(e),i,o=0,s=r.length;o<s;o++)if(i=r[o],t(e[i],i,e))return i}var OA=X(()=>{"use strict";lr();Mn()});function Dd(e){return function(t,n,r){n=Lt(n,r);for(var i=Gt(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}var PA=X(()=>{"use strict";lr();zr()});var wa,Jp=X(()=>{"use strict";PA();wa=Dd(1)});var xd,kA=X(()=>{"use strict";PA();xd=Dd(-1)});function Ku(e,t,n,r){n=Lt(n,r,1);for(var i=n(t),o=0,s=Gt(e);o<s;){var a=Math.floor((o+s)/2);n(e[a])<i?o=a+1:s=a}return o}var LA=X(()=>{"use strict";lr();zr()});function Ed(e,t,n){return function(r,i,o){var s=0,a=Gt(r);if(typeof o=="number")e>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(io.call(r,s,a),zu),o>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o<a;o+=e)if(r[o]===i)return o;return-1}}var FA=X(()=>{"use strict";zr();Xt();Y0()});var Md,jA=X(()=>{"use strict";LA();Jp();FA();Md=Ed(1,wa,Ku)});var BA,m1=X(()=>{"use strict";kA();FA();BA=Ed(-1,xd)});function ba(e,t,n){var r=Wt(e)?wa:Qu,i=r(e,t,n);if(i!==void 0&&i!==-1)return e[i]}var VA=X(()=>{"use strict";Tr();Jp();OA()});function Qp(e,t){return ba(e,Oi(t))}var v1=X(()=>{"use strict";VA();vd()});function Sn(e,t,n){t=Pi(t,n);var r,i;if(Wt(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=at(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}var cs=X(()=>{"use strict";Xu();Tr();Mn()});function dr(e,t,n){t=Lt(t,n);for(var r=!Wt(e)&&at(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var a=r?r[s]:s;o[s]=t(e[a],a,e)}return o}var Da=X(()=>{"use strict";lr();Tr();Mn()});function Sd(e){var t=function(n,r,i,o){var s=!Wt(n)&&at(n),a=(s||n).length,u=e>0?0:a-1;for(o||(i=n[s?s[u]:u],u+=e);u>=0&&u<a;u+=e){var l=s?s[u]:u;i=r(i,n[l],l,n)}return i};return function(n,r,i,o){var s=arguments.length>=3;return t(n,Pi(r,o,4),i,s)}}var zA=X(()=>{"use strict";Tr();Mn();Xu()});var Td,y1=X(()=>{"use strict";zA();Td=Sd(1)});var Kp,I1=X(()=>{"use strict";zA();Kp=Sd(-1)});function Ur(e,t,n){var r=[];return t=Lt(t,n),Sn(e,function(i,o,s){t(i,o,s)&&r.push(i)}),r}var ec=X(()=>{"use strict";lr();cs()});function em(e,t,n){return Ur(e,us(Lt(t)),n)}var C1=X(()=>{"use strict";ec();$p();lr()});function Nd(e,t,n){t=Lt(t,n);for(var r=!Wt(e)&&at(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0}var A1=X(()=>{"use strict";lr();Tr();Mn()});function _d(e,t,n){t=Lt(t,n);for(var r=!Wt(e)&&at(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1}var w1=X(()=>{"use strict";lr();Tr();Mn()});function Kn(e,t,n,r){return Wt(e)||(e=Sr(e)),(typeof n!="number"||r)&&(n=0),Md(e,t,n)>=0}var tc=X(()=>{"use strict";Tr();pa();jA()});var GA,b1=X(()=>{"use strict";Er();Vr();Da();_p();Yu();GA=kt(function(e,t,n){var r,i;return zt(t)?i=t:(t=Ri(t),r=t.slice(0,-1),t=t[t.length-1]),dr(e,function(o){var s=i;if(!s){if(r&&r.length&&(o=ya(o,r)),o==null)return;s=o[t]}return s==null?s:s.apply(o,n)})})});function ls(e,t){return dr(e,as(t))}var tm=X(()=>{"use strict";Da();Pp()});function nm(e,t){return Ur(e,Oi(t))}var D1=X(()=>{"use strict";ec();vd()});function nc(e,t,n){var r=-1/0,i=-1/0,o,s;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=Wt(e)?e:Sr(e);for(var a=0,u=e.length;a<u;a++)o=e[a],o!=null&&o>r&&(r=o)}else t=Lt(t,n),Sn(e,function(l,f,d){s=t(l,f,d),(s>i||s===-1/0&&r===-1/0)&&(r=l,i=s)});return r}var UA=X(()=>{"use strict";Tr();pa();lr();cs()});function rm(e,t,n){var r=1/0,i=1/0,o,s;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=Wt(e)?e:Sr(e);for(var a=0,u=e.length;a<u;a++)o=e[a],o!=null&&o<r&&(r=o)}else t=Lt(t,n),Sn(e,function(l,f,d){s=t(l,f,d),(s<i||s===1/0&&r===1/0)&&(r=l,i=s)});return r}var x1=X(()=>{"use strict";Tr();pa();lr();cs()});function rc(e){return e?cr(e)?io.call(e):fa(e)?e.match(HV):Wt(e)?dr(e,ss):Sr(e):[]}var HV,HA=X(()=>{"use strict";is();Xt();pp();Tr();Da();Op();pa();HV=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g});function ic(e,t,n){if(t==null||n)return Wt(e)||(e=Sr(e)),e[Ca(e.length-1)];var r=rc(e),i=Gt(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,s=0;s<t;s++){var a=Ca(s,o),u=r[s];r[s]=r[a],r[a]=u}return r.slice(0,t)}var ZA=X(()=>{"use strict";Tr();pa();zr();vA();HA()});function im(e){return ic(e,1/0)}var E1=X(()=>{"use strict";ZA()});function om(e,t,n){var r=0;return t=Lt(t,n),ls(dr(e,function(i,o,s){return{value:i,index:r++,criteria:t(i,o,s)}}).sort(function(i,o){var s=i.criteria,a=o.criteria;if(s!==a){if(s>a||s===void 0)return 1;if(s<a||a===void 0)return-1}return i.index-o.index}),"value")}var M1=X(()=>{"use strict";lr();tm();Da()});function Mo(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Lt(r,i),Sn(n,function(s,a){var u=r(s,a,n);e(o,s,u)}),o}}var Rd=X(()=>{"use strict";lr();cs()});var WA,S1=X(()=>{"use strict";Rd();Do();WA=Mo(function(e,t,n){Vn(e,n)?e[n].push(t):e[n]=[t]})});var YA,T1=X(()=>{"use strict";Rd();YA=Mo(function(e,t,n){e[n]=t})});var $A,N1=X(()=>{"use strict";Rd();Do();$A=Mo(function(e,t,n){Vn(e,n)?e[n]++:e[n]=1})});var XA,_1=X(()=>{"use strict";Rd();XA=Mo(function(e,t,n){e[n?0:1].push(t)},!0)});function sm(e){return e==null?0:Wt(e)?e.length:at(e).length}var R1=X(()=>{"use strict";Tr();Mn()});function qA(e,t,n){return t in n}var O1=X(()=>{"use strict"});var Od,JA=X(()=>{"use strict";Er();Vr();Xu();Hu();O1();Aa();Od=kt(function(e,t){var n={},r=t[0];if(e==null)return n;zt(r)?(t.length>1&&(r=Pi(r,t[1])),t=li(e)):(r=qA,t=Gr(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var s=t[i],a=e[s];r(a,s,e)&&(n[s]=a)}return n})});var QA,P1=X(()=>{"use strict";Er();Vr();$p();Da();Aa();tc();JA();QA=kt(function(e,t){var n=t[0],r;return zt(n)?(n=us(n),t.length>1&&(r=t[1])):(t=dr(Gr(t,!1,!1),String),n=function(i,o){return!Kn(t,o)}),Od(e,n,r)})});function oc(e,t,n){return io.call(e,0,Math.max(0,e.length-(t==null||n?1:t)))}var KA=X(()=>{"use strict";Xt()});function sc(e,t,n){return e==null||e.length<1?t==null||n?void 0:[]:t==null||n?e[0]:oc(e,e.length-t)}var k1=X(()=>{"use strict";KA()});function ds(e,t,n){return io.call(e,t==null||n?1:t)}var ew=X(()=>{"use strict";Xt()});function am(e,t,n){return e==null||e.length<1?t==null||n?void 0:[]:t==null||n?e[e.length-1]:ds(e,Math.max(0,e.length-t))}var L1=X(()=>{"use strict";ew()});function um(e){return Ur(e,Boolean)}var F1=X(()=>{"use strict";ec()});function cm(e,t){return Gr(e,t,!1)}var j1=X(()=>{"use strict";Aa()});var Pd,tw=X(()=>{"use strict";Er();Aa();ec();tc();Pd=kt(function(e,t){return t=Gr(t,!0,!0),Ur(e,function(n){return!Kn(t,n)})})});var nw,B1=X(()=>{"use strict";Er();tw();nw=kt(function(e,t){return Pd(e,t)})});function xa(e,t,n,r){ju(t)||(r=n,n=t,t=!1),n!=null&&(n=Lt(n,r));for(var i=[],o=[],s=0,a=Gt(e);s<a;s++){var u=e[s],l=n?n(u,s,e):u;t&&!n?((!s||o!==l)&&i.push(u),o=l):n?Kn(o,l)||(o.push(l),i.push(u)):Kn(i,u)||i.push(u)}return i}var rw=X(()=>{"use strict";j0();lr();zr();tc()});var iw,V1=X(()=>{"use strict";Er();rw();Aa();iw=kt(function(e){return xa(Gr(e,!0,!0))})});function lm(e){for(var t=[],n=arguments.length,r=0,i=Gt(e);r<i;r++){var o=e[r];if(!Kn(t,o)){var s;for(s=1;s<n&&Kn(arguments[s],o);s++);s===n&&t.push(o)}}return t}var z1=X(()=>{"use strict";zr();tc()});function Ea(e){for(var t=e&&nc(e,Gt).length||0,n=Array(t),r=0;r<t;r++)n[r]=ls(e,r);return n}var ow=X(()=>{"use strict";UA();zr();tm()});var sw,G1=X(()=>{"use strict";Er();ow();sw=kt(Ea)});function dm(e,t){for(var n={},r=0,i=Gt(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}var U1=X(()=>{"use strict";zr()});function fm(e,t,n){t==null&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}var H1=X(()=>{"use strict"});function hm(e,t){if(t==null||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(io.call(e,r,r+=t));return n}var Z1=X(()=>{"use strict";Xt()});function ac(e,t){return e._chain?$e(t).chain():t}var aw=X(()=>{"use strict";Mr()});function uc(e){return Sn(ma(e),function(t){var n=$e[t]=e[t];$e.prototype[t]=function(){var r=[this._wrapped];return mN.apply(r,arguments),ac(this,n.apply($e,r))}}),$e}var W1=X(()=>{"use strict";Mr();cs();uA();Xt();aw()});var Y1,$1=X(()=>{"use strict";Mr();cs();Xt();aw();Sn(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=od[e];$e.prototype[e]=function(){var n=this._wrapped;return n!=null&&(t.apply(n,arguments),(e==="shift"||e==="splice")&&n.length===0&&delete n[0]),ac(this,n)}});Sn(["concat","join","slice"],function(e){var t=od[e];$e.prototype[e]=function(){var n=this._wrapped;return n!=null&&(n=t.apply(n,arguments)),ac(this,n)}});Y1=$e});var uw={};Kt(uw,{VERSION:()=>id,after:()=>qp,all:()=>Nd,allKeys:()=>li,any:()=>_d,assign:()=>os,before:()=>Ju,bind:()=>wd,bindAll:()=>SA,chain:()=>Up,chunk:()=>hm,clone:()=>Tp,collect:()=>dr,compact:()=>um,compose:()=>Xp,constant:()=>Gu,contains:()=>Kn,countBy:()=>$A,create:()=>Sp,debounce:()=>Wp,default:()=>Y1,defaults:()=>gd,defer:()=>NA,delay:()=>bd,detect:()=>ba,difference:()=>Pd,drop:()=>ds,each:()=>Sn,escape:()=>CA,every:()=>Nd,extend:()=>hd,extendOwn:()=>os,filter:()=>Ur,find:()=>ba,findIndex:()=>wa,findKey:()=>Qu,findLastIndex:()=>xd,findWhere:()=>Qp,first:()=>sc,flatten:()=>cm,foldl:()=>Td,foldr:()=>Kp,forEach:()=>Sn,functions:()=>ma,get:()=>$u,groupBy:()=>WA,has:()=>Rp,head:()=>sc,identity:()=>ss,include:()=>Kn,includes:()=>Kn,indexBy:()=>YA,indexOf:()=>Md,initial:()=>oc,inject:()=>Td,intersection:()=>lm,invert:()=>Wu,invoke:()=>GA,isArguments:()=>ha,isArray:()=>cr,isArrayBuffer:()=>ud,isBoolean:()=>ju,isDataView:()=>rs,isDate:()=>V0,isElement:()=>gp,isEmpty:()=>Ap,isEqual:()=>bp,isError:()=>G0,isFinite:()=>Ip,isFunction:()=>zt,isMap:()=>rA,isMatch:()=>Uu,isNaN:()=>zu,isNull:()=>hp,isNumber:()=>sd,isObject:()=>Qn,isRegExp:()=>z0,isSet:()=>oA,isString:()=>fa,isSymbol:()=>ad,isTypedArray:()=>dd,isUndefined:()=>Fu,isWeakMap:()=>iA,isWeakSet:()=>sA,iteratee:()=>Ia,keys:()=>at,last:()=>am,lastIndexOf:()=>BA,map:()=>dr,mapObject:()=>kp,matcher:()=>Oi,matches:()=>Oi,max:()=>nc,memoize:()=>Hp,methods:()=>ma,min:()=>rm,mixin:()=>uc,negate:()=>us,noop:()=>qu,now:()=>xo,object:()=>dm,omit:()=>QA,once:()=>RA,pairs:()=>xp,partial:()=>Eo,partition:()=>XA,pick:()=>Od,pluck:()=>ls,property:()=>as,propertyOf:()=>Lp,random:()=>Ca,range:()=>fm,reduce:()=>Td,reduceRight:()=>Kp,reject:()=>em,rest:()=>ds,restArguments:()=>kt,result:()=>zp,sample:()=>ic,select:()=>Ur,shuffle:()=>im,size:()=>sm,some:()=>_d,sortBy:()=>om,sortedIndex:()=>Ku,tail:()=>ds,take:()=>sc,tap:()=>Np,template:()=>Vp,templateSettings:()=>wA,throttle:()=>Zp,times:()=>Fp,toArray:()=>rc,toPath:()=>md,transpose:()=>Ea,unescape:()=>AA,union:()=>iw,uniq:()=>xa,unique:()=>xa,uniqueId:()=>Gp,unzip:()=>Ea,values:()=>Sr,where:()=>nm,without:()=>nw,wrap:()=>Yp,zip:()=>sw});var gm=X(()=>{"use strict";Xt();Er();ns();bN();F0();j0();DN();pp();B0();xN();EN();MN();U0();H0();vp();is();Vr();yp();NN();Y0();J0();ON();K0();LN();zN();GN();UN();HN();Mn();Hu();pa();ZN();aA();uA();cA();Mp();lA();WN();YN();$N();hA();XN();qN();Op();$0();mA();fA();Pp();JN();vd();QN();vA();jp();KN();n1();bA();r1();i1();o1();s1();pA();Ad();MA();a1();u1();TA();c1();l1();d1();f1();$p();h1();g1();_A();p1();OA();Jp();kA();LA();jA();m1();VA();v1();cs();Da();y1();I1();ec();C1();A1();w1();tc();b1();tm();D1();UA();x1();E1();ZA();M1();S1();T1();N1();_1();HA();R1();JA();P1();k1();KA();L1();ew();F1();j1();B1();rw();V1();z1();tw();ow();G1();U1();H1();Z1();W1();$1()});var cw,X1,q1=X(()=>{"use strict";gm();gm();cw=uc(uw);cw._=cw;X1=cw});var J1={};Kt(J1,{VERSION:()=>id,after:()=>qp,all:()=>Nd,allKeys:()=>li,any:()=>_d,assign:()=>os,before:()=>Ju,bind:()=>wd,bindAll:()=>SA,chain:()=>Up,chunk:()=>hm,clone:()=>Tp,collect:()=>dr,compact:()=>um,compose:()=>Xp,constant:()=>Gu,contains:()=>Kn,countBy:()=>$A,create:()=>Sp,debounce:()=>Wp,default:()=>X1,defaults:()=>gd,defer:()=>NA,delay:()=>bd,detect:()=>ba,difference:()=>Pd,drop:()=>ds,each:()=>Sn,escape:()=>CA,every:()=>Nd,extend:()=>hd,extendOwn:()=>os,filter:()=>Ur,find:()=>ba,findIndex:()=>wa,findKey:()=>Qu,findLastIndex:()=>xd,findWhere:()=>Qp,first:()=>sc,flatten:()=>cm,foldl:()=>Td,foldr:()=>Kp,forEach:()=>Sn,functions:()=>ma,get:()=>$u,groupBy:()=>WA,has:()=>Rp,head:()=>sc,identity:()=>ss,include:()=>Kn,includes:()=>Kn,indexBy:()=>YA,indexOf:()=>Md,initial:()=>oc,inject:()=>Td,intersection:()=>lm,invert:()=>Wu,invoke:()=>GA,isArguments:()=>ha,isArray:()=>cr,isArrayBuffer:()=>ud,isBoolean:()=>ju,isDataView:()=>rs,isDate:()=>V0,isElement:()=>gp,isEmpty:()=>Ap,isEqual:()=>bp,isError:()=>G0,isFinite:()=>Ip,isFunction:()=>zt,isMap:()=>rA,isMatch:()=>Uu,isNaN:()=>zu,isNull:()=>hp,isNumber:()=>sd,isObject:()=>Qn,isRegExp:()=>z0,isSet:()=>oA,isString:()=>fa,isSymbol:()=>ad,isTypedArray:()=>dd,isUndefined:()=>Fu,isWeakMap:()=>iA,isWeakSet:()=>sA,iteratee:()=>Ia,keys:()=>at,last:()=>am,lastIndexOf:()=>BA,map:()=>dr,mapObject:()=>kp,matcher:()=>Oi,matches:()=>Oi,max:()=>nc,memoize:()=>Hp,methods:()=>ma,min:()=>rm,mixin:()=>uc,negate:()=>us,noop:()=>qu,now:()=>xo,object:()=>dm,omit:()=>QA,once:()=>RA,pairs:()=>xp,partial:()=>Eo,partition:()=>XA,pick:()=>Od,pluck:()=>ls,property:()=>as,propertyOf:()=>Lp,random:()=>Ca,range:()=>fm,reduce:()=>Td,reduceRight:()=>Kp,reject:()=>em,rest:()=>ds,restArguments:()=>kt,result:()=>zp,sample:()=>ic,select:()=>Ur,shuffle:()=>im,size:()=>sm,some:()=>_d,sortBy:()=>om,sortedIndex:()=>Ku,tail:()=>ds,take:()=>sc,tap:()=>Np,template:()=>Vp,templateSettings:()=>wA,throttle:()=>Zp,times:()=>Fp,toArray:()=>rc,toPath:()=>md,transpose:()=>Ea,unescape:()=>AA,union:()=>iw,uniq:()=>xa,unique:()=>xa,uniqueId:()=>Gp,unzip:()=>Ea,values:()=>Sr,where:()=>nm,without:()=>nw,wrap:()=>Yp,zip:()=>sw});var Q1=X(()=>{"use strict";q1();gm()});var fs=rD((K1,pm)=>{"use strict";(function(e,t){"use strict";typeof pm=="object"&&typeof pm.exports=="object"?pm.exports=e.document?t(e,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(e)})(typeof window<"u"?window:K1,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(c){return n.flat.call(c)}:function(c){return n.concat.apply([],c)},s=n.push,a=n.indexOf,u={},l=u.toString,f=u.hasOwnProperty,d=f.toString,m=d.call(Object),I={},C=function(h){return typeof h=="function"&&typeof h.nodeType!="number"&&typeof h.item!="function"},M=function(h){return h!=null&&h===h.window},E=e.document,N={type:!0,src:!0,nonce:!0,noModule:!0};function B(c,h,g){g=g||E;var v,A,b=g.createElement("script");if(b.text=c,h)for(v in N)A=h[v]||h.getAttribute&&h.getAttribute(v),A&&b.setAttribute(v,A);g.head.appendChild(b).parentNode.removeChild(b)}function Z(c){return c==null?c+"":typeof c=="object"||typeof c=="function"?u[l.call(c)]||"object":typeof c}var $="3.7.1",te=/HTML$/i,p=function(c,h){return new p.fn.init(c,h)};p.fn=p.prototype={jquery:$,constructor:p,length:0,toArray:function(){return i.call(this)},get:function(c){return c==null?i.call(this):c<0?this[c+this.length]:this[c]},pushStack:function(c){var h=p.merge(this.constructor(),c);return h.prevObject=this,h},each:function(c){return p.each(this,c)},map:function(c){return this.pushStack(p.map(this,function(h,g){return c.call(h,g,h)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,function(c,h){return(h+1)%2}))},odd:function(){return this.pushStack(p.grep(this,function(c,h){return h%2}))},eq:function(c){var h=this.length,g=+c+(c<0?h:0);return this.pushStack(g>=0&&g<h?[this[g]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},p.extend=p.fn.extend=function(){var c,h,g,v,A,b,x=arguments[0]||{},L=1,P=arguments.length,H=!1;for(typeof x=="boolean"&&(H=x,x=arguments[L]||{},L++),typeof x!="object"&&!C(x)&&(x={}),L===P&&(x=this,L--);L<P;L++)if((c=arguments[L])!=null)for(h in c)v=c[h],!(h==="__proto__"||x===v)&&(H&&v&&(p.isPlainObject(v)||(A=Array.isArray(v)))?(g=x[h],A&&!Array.isArray(g)?b=[]:!A&&!p.isPlainObject(g)?b={}:b=g,A=!1,x[h]=p.extend(H,b,v)):v!==void 0&&(x[h]=v));return x},p.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(c){throw new Error(c)},noop:function(){},isPlainObject:function(c){var h,g;return!c||l.call(c)!=="[object Object]"?!1:(h=r(c),h?(g=f.call(h,"constructor")&&h.constructor,typeof g=="function"&&d.call(g)===m):!0)},isEmptyObject:function(c){var h;for(h in c)return!1;return!0},globalEval:function(c,h,g){B(c,{nonce:h&&h.nonce},g)},each:function(c,h){var g,v=0;if(y(c))for(g=c.length;v<g&&h.call(c[v],v,c[v])!==!1;v++);else for(v in c)if(h.call(c[v],v,c[v])===!1)break;return c},text:function(c){var h,g="",v=0,A=c.nodeType;if(!A)for(;h=c[v++];)g+=p.text(h);return A===1||A===11?c.textContent:A===9?c.documentElement.textContent:A===3||A===4?c.nodeValue:g},makeArray:function(c,h){var g=h||[];return c!=null&&(y(Object(c))?p.merge(g,typeof c=="string"?[c]:c):s.call(g,c)),g},inArray:function(c,h,g){return h==null?-1:a.call(h,c,g)},isXMLDoc:function(c){var h=c&&c.namespaceURI,g=c&&(c.ownerDocument||c).documentElement;return!te.test(h||g&&g.nodeName||"HTML")},merge:function(c,h){for(var g=+h.length,v=0,A=c.length;v<g;v++)c[A++]=h[v];return c.length=A,c},grep:function(c,h,g){for(var v,A=[],b=0,x=c.length,L=!g;b<x;b++)v=!h(c[b],b),v!==L&&A.push(c[b]);return A},map:function(c,h,g){var v,A,b=0,x=[];if(y(c))for(v=c.length;b<v;b++)A=h(c[b],b,g),A!=null&&x.push(A);else for(b in c)A=h(c[b],b,g),A!=null&&x.push(A);return o(x)},guid:1,support:I}),typeof Symbol=="function"&&(p.fn[Symbol.iterator]=n[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(c,h){u["[object "+h+"]"]=h.toLowerCase()});function y(c){var h=!!c&&"length"in c&&c.length,g=Z(c);return C(c)||M(c)?!1:g==="array"||h===0||typeof h=="number"&&h>0&&h-1 in c}function D(c,h){return c.nodeName&&c.nodeName.toLowerCase()===h.toLowerCase()}var S=n.pop,_=n.sort,j=n.splice,V="[\\x20\\t\\r\\n\\f]",W=new RegExp("^"+V+"+|((?:^|[^\\\\])(?:\\\\.)*)"+V+"+$","g");p.contains=function(c,h){var g=h&&h.parentNode;return c===g||!!(g&&g.nodeType===1&&(c.contains?c.contains(g):c.compareDocumentPosition&&c.compareDocumentPosition(g)&16))};var oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function fe(c,h){return h?c==="\0"?"\uFFFD":c.slice(0,-1)+"\\"+c.charCodeAt(c.length-1).toString(16)+" ":"\\"+c}p.escapeSelector=function(c){return(c+"").replace(oe,fe)};var U=E,q=s;(function(){var c,h,g,v,A,b=q,x,L,P,H,re,ce=p.expando,K=0,he=0,Ge=vf(),vt=vf(),et=vf(),_n=vf(),mn=function(R,z){return R===z&&(A=!0),0},Fi="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ji="(?:\\\\[\\da-fA-F]{1,6}"+V+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",ct="\\["+V+"*("+ji+")(?:"+V+"*([*^$|!~]?=)"+V+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+ji+"))|)"+V+"*\\]",xs=":("+ji+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+ct+")*)|.*)\\)|)",It=new RegExp(V+"+","g"),un=new RegExp("^"+V+"*,"+V+"*"),kc=new RegExp("^"+V+"*([>+~]|"+V+")"+V+"*"),bv=new RegExp(V+"|>"),Bi=new RegExp(xs),Lc=new RegExp("^"+ji+"$"),Vi={ID:new RegExp("^#("+ji+")"),CLASS:new RegExp("^\\.("+ji+")"),TAG:new RegExp("^("+ji+"|[*])"),ATTR:new RegExp("^"+ct),PSEUDO:new RegExp("^"+xs),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+V+"*(even|odd|(([+-]|)(\\d*)n|)"+V+"*(?:([+-]|)"+V+"*(\\d+)|))"+V+"*\\)|)","i"),bool:new RegExp("^(?:"+Fi+")$","i"),needsContext:new RegExp("^"+V+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+V+"*((?:-\\d)?\\d*)"+V+"*\\)|)(?=[^-]|$)","i")},_o=/^(?:input|select|textarea|button)$/i,Ro=/^h\d$/i,$r=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Dv=/[+~]/,ao=new RegExp("\\\\[\\da-fA-F]{1,6}"+V+"?|\\\\([^\\r\\n\\f])","g"),uo=function(R,z){var J="0x"+R.slice(1)-65536;return z||(J<0?String.fromCharCode(J+65536):String.fromCharCode(J>>10|55296,J&1023|56320))},HO=function(){Oo()},ZO=If(function(R){return R.disabled===!0&&D(R,"fieldset")},{dir:"parentNode",next:"legend"});function WO(){try{return x.activeElement}catch{}}try{b.apply(n=i.call(U.childNodes),U.childNodes),n[U.childNodes.length].nodeType}catch{b={apply:function(z,J){q.apply(z,i.call(J))},call:function(z){q.apply(z,i.call(arguments,1))}}}function Pt(R,z,J,ne){var ue,ye,we,Ee,be,ot,Ve,He=z&&z.ownerDocument,st=z?z.nodeType:9;if(J=J||[],typeof R!="string"||!R||st!==1&&st!==9&&st!==11)return J;if(!ne&&(Oo(z),z=z||x,P)){if(st!==11&&(be=$r.exec(R)))if(ue=be[1]){if(st===9)if(we=z.getElementById(ue)){if(we.id===ue)return b.call(J,we),J}else return J;else if(He&&(we=He.getElementById(ue))&&Pt.contains(z,we)&&we.id===ue)return b.call(J,we),J}else{if(be[2])return b.apply(J,z.getElementsByTagName(R)),J;if((ue=be[3])&&z.getElementsByClassName)return b.apply(J,z.getElementsByClassName(ue)),J}if(!_n[R+" "]&&(!H||!H.test(R))){if(Ve=R,He=z,st===1&&(bv.test(R)||kc.test(R))){for(He=Dv.test(R)&&xv(z.parentNode)||z,(He!=z||!I.scope)&&((Ee=z.getAttribute("id"))?Ee=p.escapeSelector(Ee):z.setAttribute("id",Ee=ce)),ot=Fc(R),ye=ot.length;ye--;)ot[ye]=(Ee?"#"+Ee:":scope")+" "+yf(ot[ye]);Ve=ot.join(",")}try{return b.apply(J,He.querySelectorAll(Ve)),J}catch{_n(R,!0)}finally{Ee===ce&&z.removeAttribute("id")}}}return Kb(R.replace(W,"$1"),z,J,ne)}function vf(){var R=[];function z(J,ne){return R.push(J+" ")>h.cacheLength&&delete z[R.shift()],z[J+" "]=ne}return z}function yi(R){return R[ce]=!0,R}function Va(R){var z=x.createElement("fieldset");try{return!!R(z)}catch{return!1}finally{z.parentNode&&z.parentNode.removeChild(z),z=null}}function YO(R){return function(z){return D(z,"input")&&z.type===R}}function $O(R){return function(z){return(D(z,"input")||D(z,"button"))&&z.type===R}}function Jb(R){return function(z){return"form"in z?z.parentNode&&z.disabled===!1?"label"in z?"label"in z.parentNode?z.parentNode.disabled===R:z.disabled===R:z.isDisabled===R||z.isDisabled!==!R&&ZO(z)===R:z.disabled===R:"label"in z?z.disabled===R:!1}}function Es(R){return yi(function(z){return z=+z,yi(function(J,ne){for(var ue,ye=R([],J.length,z),we=ye.length;we--;)J[ue=ye[we]]&&(J[ue]=!(ne[ue]=J[ue]))})})}function xv(R){return R&&typeof R.getElementsByTagName<"u"&&R}function Oo(R){var z,J=R?R.ownerDocument||R:U;return J==x||J.nodeType!==9||!J.documentElement||(x=J,L=x.documentElement,P=!p.isXMLDoc(x),re=L.matches||L.webkitMatchesSelector||L.msMatchesSelector,L.msMatchesSelector&&U!=x&&(z=x.defaultView)&&z.top!==z&&z.addEventListener("unload",HO),I.getById=Va(function(ne){return L.appendChild(ne).id=p.expando,!x.getElementsByName||!x.getElementsByName(p.expando).length}),I.disconnectedMatch=Va(function(ne){return re.call(ne,"*")}),I.scope=Va(function(){return x.querySelectorAll(":scope")}),I.cssHas=Va(function(){try{return x.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),I.getById?(h.filter.ID=function(ne){var ue=ne.replace(ao,uo);return function(ye){return ye.getAttribute("id")===ue}},h.find.ID=function(ne,ue){if(typeof ue.getElementById<"u"&&P){var ye=ue.getElementById(ne);return ye?[ye]:[]}}):(h.filter.ID=function(ne){var ue=ne.replace(ao,uo);return function(ye){var we=typeof ye.getAttributeNode<"u"&&ye.getAttributeNode("id");return we&&we.value===ue}},h.find.ID=function(ne,ue){if(typeof ue.getElementById<"u"&&P){var ye,we,Ee,be=ue.getElementById(ne);if(be){if(ye=be.getAttributeNode("id"),ye&&ye.value===ne)return[be];for(Ee=ue.getElementsByName(ne),we=0;be=Ee[we++];)if(ye=be.getAttributeNode("id"),ye&&ye.value===ne)return[be]}return[]}}),h.find.TAG=function(ne,ue){return typeof ue.getElementsByTagName<"u"?ue.getElementsByTagName(ne):ue.querySelectorAll(ne)},h.find.CLASS=function(ne,ue){if(typeof ue.getElementsByClassName<"u"&&P)return ue.getElementsByClassName(ne)},H=[],Va(function(ne){var ue;L.appendChild(ne).innerHTML="<a id='"+ce+"' href='' disabled='disabled'></a><select id='"+ce+"-\r\\' disabled='disabled'><option selected=''></option></select>",ne.querySelectorAll("[selected]").length||H.push("\\["+V+"*(?:value|"+Fi+")"),ne.querySelectorAll("[id~="+ce+"-]").length||H.push("~="),ne.querySelectorAll("a#"+ce+"+*").length||H.push(".#.+[+~]"),ne.querySelectorAll(":checked").length||H.push(":checked"),ue=x.createElement("input"),ue.setAttribute("type","hidden"),ne.appendChild(ue).setAttribute("name","D"),L.appendChild(ne).disabled=!0,ne.querySelectorAll(":disabled").length!==2&&H.push(":enabled",":disabled"),ue=x.createElement("input"),ue.setAttribute("name",""),ne.appendChild(ue),ne.querySelectorAll("[name='']").length||H.push("\\["+V+"*name"+V+"*="+V+`*(?:''|"")`)}),I.cssHas||H.push(":has"),H=H.length&&new RegExp(H.join("|")),mn=function(ne,ue){if(ne===ue)return A=!0,0;var ye=!ne.compareDocumentPosition-!ue.compareDocumentPosition;return ye||(ye=(ne.ownerDocument||ne)==(ue.ownerDocument||ue)?ne.compareDocumentPosition(ue):1,ye&1||!I.sortDetached&&ue.compareDocumentPosition(ne)===ye?ne===x||ne.ownerDocument==U&&Pt.contains(U,ne)?-1:ue===x||ue.ownerDocument==U&&Pt.contains(U,ue)?1:v?a.call(v,ne)-a.call(v,ue):0:ye&4?-1:1)}),x}Pt.matches=function(R,z){return Pt(R,null,null,z)},Pt.matchesSelector=function(R,z){if(Oo(R),P&&!_n[z+" "]&&(!H||!H.test(z)))try{var J=re.call(R,z);if(J||I.disconnectedMatch||R.document&&R.document.nodeType!==11)return J}catch{_n(z,!0)}return Pt(z,x,null,[R]).length>0},Pt.contains=function(R,z){return(R.ownerDocument||R)!=x&&Oo(R),p.contains(R,z)},Pt.attr=function(R,z){(R.ownerDocument||R)!=x&&Oo(R);var J=h.attrHandle[z.toLowerCase()],ne=J&&f.call(h.attrHandle,z.toLowerCase())?J(R,z,!P):void 0;return ne!==void 0?ne:R.getAttribute(z)},Pt.error=function(R){throw new Error("Syntax error, unrecognized expression: "+R)},p.uniqueSort=function(R){var z,J=[],ne=0,ue=0;if(A=!I.sortStable,v=!I.sortStable&&i.call(R,0),_.call(R,mn),A){for(;z=R[ue++];)z===R[ue]&&(ne=J.push(ue));for(;ne--;)j.call(R,J[ne],1)}return v=null,R},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(i.apply(this)))},h=p.expr={cacheLength:50,createPseudo:yi,match:Vi,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(R){return R[1]=R[1].replace(ao,uo),R[3]=(R[3]||R[4]||R[5]||"").replace(ao,uo),R[2]==="~="&&(R[3]=" "+R[3]+" "),R.slice(0,4)},CHILD:function(R){return R[1]=R[1].toLowerCase(),R[1].slice(0,3)==="nth"?(R[3]||Pt.error(R[0]),R[4]=+(R[4]?R[5]+(R[6]||1):2*(R[3]==="even"||R[3]==="odd")),R[5]=+(R[7]+R[8]||R[3]==="odd")):R[3]&&Pt.error(R[0]),R},PSEUDO:function(R){var z,J=!R[6]&&R[2];return Vi.CHILD.test(R[0])?null:(R[3]?R[2]=R[4]||R[5]||"":J&&Bi.test(J)&&(z=Fc(J,!0))&&(z=J.indexOf(")",J.length-z)-J.length)&&(R[0]=R[0].slice(0,z),R[2]=J.slice(0,z)),R.slice(0,3))}},filter:{TAG:function(R){var z=R.replace(ao,uo).toLowerCase();return R==="*"?function(){return!0}:function(J){return D(J,z)}},CLASS:function(R){var z=Ge[R+" "];return z||(z=new RegExp("(^|"+V+")"+R+"("+V+"|$)"))&&Ge(R,function(J){return z.test(typeof J.className=="string"&&J.className||typeof J.getAttribute<"u"&&J.getAttribute("class")||"")})},ATTR:function(R,z,J){return function(ne){var ue=Pt.attr(ne,R);return ue==null?z==="!=":z?(ue+="",z==="="?ue===J:z==="!="?ue!==J:z==="^="?J&&ue.indexOf(J)===0:z==="*="?J&&ue.indexOf(J)>-1:z==="$="?J&&ue.slice(-J.length)===J:z==="~="?(" "+ue.replace(It," ")+" ").indexOf(J)>-1:z==="|="?ue===J||ue.slice(0,J.length+1)===J+"-":!1):!0}},CHILD:function(R,z,J,ne,ue){var ye=R.slice(0,3)!=="nth",we=R.slice(-4)!=="last",Ee=z==="of-type";return ne===1&&ue===0?function(be){return!!be.parentNode}:function(be,ot,Ve){var He,st,Le,Ht,Ar,Hn=ye!==we?"nextSibling":"previousSibling",Xr=be.parentNode,zi=Ee&&be.nodeName.toLowerCase(),za=!Ve&&!Ee,or=!1;if(Xr){if(ye){for(;Hn;){for(Le=be;Le=Le[Hn];)if(Ee?D(Le,zi):Le.nodeType===1)return!1;Ar=Hn=R==="only"&&!Ar&&"nextSibling"}return!0}if(Ar=[we?Xr.firstChild:Xr.lastChild],we&&za){for(st=Xr[ce]||(Xr[ce]={}),He=st[R]||[],Ht=He[0]===K&&He[1],or=Ht&&He[2],Le=Ht&&Xr.childNodes[Ht];Le=++Ht&&Le&&Le[Hn]||(or=Ht=0)||Ar.pop();)if(Le.nodeType===1&&++or&&Le===be){st[R]=[K,Ht,or];break}}else if(za&&(st=be[ce]||(be[ce]={}),He=st[R]||[],Ht=He[0]===K&&He[1],or=Ht),or===!1)for(;(Le=++Ht&&Le&&Le[Hn]||(or=Ht=0)||Ar.pop())&&!((Ee?D(Le,zi):Le.nodeType===1)&&++or&&(za&&(st=Le[ce]||(Le[ce]={}),st[R]=[K,or]),Le===be)););return or-=ue,or===ne||or%ne===0&&or/ne>=0}}},PSEUDO:function(R,z){var J,ne=h.pseudos[R]||h.setFilters[R.toLowerCase()]||Pt.error("unsupported pseudo: "+R);return ne[ce]?ne(z):ne.length>1?(J=[R,R,"",z],h.setFilters.hasOwnProperty(R.toLowerCase())?yi(function(ue,ye){for(var we,Ee=ne(ue,z),be=Ee.length;be--;)we=a.call(ue,Ee[be]),ue[we]=!(ye[we]=Ee[be])}):function(ue){return ne(ue,0,J)}):ne}},pseudos:{not:yi(function(R){var z=[],J=[],ne=Tv(R.replace(W,"$1"));return ne[ce]?yi(function(ue,ye,we,Ee){for(var be,ot=ne(ue,null,Ee,[]),Ve=ue.length;Ve--;)(be=ot[Ve])&&(ue[Ve]=!(ye[Ve]=be))}):function(ue,ye,we){return z[0]=ue,ne(z,null,we,J),z[0]=null,!J.pop()}}),has:yi(function(R){return function(z){return Pt(R,z).length>0}}),contains:yi(function(R){return R=R.replace(ao,uo),function(z){return(z.textContent||p.text(z)).indexOf(R)>-1}}),lang:yi(function(R){return Lc.test(R||"")||Pt.error("unsupported lang: "+R),R=R.replace(ao,uo).toLowerCase(),function(z){var J;do if(J=P?z.lang:z.getAttribute("xml:lang")||z.getAttribute("lang"))return J=J.toLowerCase(),J===R||J.indexOf(R+"-")===0;while((z=z.parentNode)&&z.nodeType===1);return!1}}),target:function(R){var z=e.location&&e.location.hash;return z&&z.slice(1)===R.id},root:function(R){return R===L},focus:function(R){return R===WO()&&x.hasFocus()&&!!(R.type||R.href||~R.tabIndex)},enabled:Jb(!1),disabled:Jb(!0),checked:function(R){return D(R,"input")&&!!R.checked||D(R,"option")&&!!R.selected},selected:function(R){return R.parentNode&&R.parentNode.selectedIndex,R.selected===!0},empty:function(R){for(R=R.firstChild;R;R=R.nextSibling)if(R.nodeType<6)return!1;return!0},parent:function(R){return!h.pseudos.empty(R)},header:function(R){return Ro.test(R.nodeName)},input:function(R){return _o.test(R.nodeName)},button:function(R){return D(R,"input")&&R.type==="button"||D(R,"button")},text:function(R){var z;return D(R,"input")&&R.type==="text"&&((z=R.getAttribute("type"))==null||z.toLowerCase()==="text")},first:Es(function(){return[0]}),last:Es(function(R,z){return[z-1]}),eq:Es(function(R,z,J){return[J<0?J+z:J]}),even:Es(function(R,z){for(var J=0;J<z;J+=2)R.push(J);return R}),odd:Es(function(R,z){for(var J=1;J<z;J+=2)R.push(J);return R}),lt:Es(function(R,z,J){var ne;for(J<0?ne=J+z:J>z?ne=z:ne=J;--ne>=0;)R.push(ne);return R}),gt:Es(function(R,z,J){for(var ne=J<0?J+z:J;++ne<z;)R.push(ne);return R})}},h.pseudos.nth=h.pseudos.eq;for(c in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})h.pseudos[c]=YO(c);for(c in{submit:!0,reset:!0})h.pseudos[c]=$O(c);function Qb(){}Qb.prototype=h.filters=h.pseudos,h.setFilters=new Qb;function Fc(R,z){var J,ne,ue,ye,we,Ee,be,ot=vt[R+" "];if(ot)return z?0:ot.slice(0);for(we=R,Ee=[],be=h.preFilter;we;){(!J||(ne=un.exec(we)))&&(ne&&(we=we.slice(ne[0].length)||we),Ee.push(ue=[])),J=!1,(ne=kc.exec(we))&&(J=ne.shift(),ue.push({value:J,type:ne[0].replace(W," ")}),we=we.slice(J.length));for(ye in h.filter)(ne=Vi[ye].exec(we))&&(!be[ye]||(ne=be[ye](ne)))&&(J=ne.shift(),ue.push({value:J,type:ye,matches:ne}),we=we.slice(J.length));if(!J)break}return z?we.length:we?Pt.error(R):vt(R,Ee).slice(0)}function yf(R){for(var z=0,J=R.length,ne="";z<J;z++)ne+=R[z].value;return ne}function If(R,z,J){var ne=z.dir,ue=z.next,ye=ue||ne,we=J&&ye==="parentNode",Ee=he++;return z.first?function(be,ot,Ve){for(;be=be[ne];)if(be.nodeType===1||we)return R(be,ot,Ve);return!1}:function(be,ot,Ve){var He,st,Le=[K,Ee];if(Ve){for(;be=be[ne];)if((be.nodeType===1||we)&&R(be,ot,Ve))return!0}else for(;be=be[ne];)if(be.nodeType===1||we)if(st=be[ce]||(be[ce]={}),ue&&D(be,ue))be=be[ne]||be;else{if((He=st[ye])&&He[0]===K&&He[1]===Ee)return Le[2]=He[2];if(st[ye]=Le,Le[2]=R(be,ot,Ve))return!0}return!1}}function Ev(R){return R.length>1?function(z,J,ne){for(var ue=R.length;ue--;)if(!R[ue](z,J,ne))return!1;return!0}:R[0]}function XO(R,z,J){for(var ne=0,ue=z.length;ne<ue;ne++)Pt(R,z[ne],J);return J}function Cf(R,z,J,ne,ue){for(var ye,we=[],Ee=0,be=R.length,ot=z!=null;Ee<be;Ee++)(ye=R[Ee])&&(!J||J(ye,ne,ue))&&(we.push(ye),ot&&z.push(Ee));return we}function Mv(R,z,J,ne,ue,ye){return ne&&!ne[ce]&&(ne=Mv(ne)),ue&&!ue[ce]&&(ue=Mv(ue,ye)),yi(function(we,Ee,be,ot){var Ve,He,st,Le,Ht=[],Ar=[],Hn=Ee.length,Xr=we||XO(z||"*",be.nodeType?[be]:be,[]),zi=R&&(we||!z)?Cf(Xr,Ht,R,be,ot):Xr;if(J?(Le=ue||(we?R:Hn||ne)?[]:Ee,J(zi,Le,be,ot)):Le=zi,ne)for(Ve=Cf(Le,Ar),ne(Ve,[],be,ot),He=Ve.length;He--;)(st=Ve[He])&&(Le[Ar[He]]=!(zi[Ar[He]]=st));if(we){if(ue||R){if(ue){for(Ve=[],He=Le.length;He--;)(st=Le[He])&&Ve.push(zi[He]=st);ue(null,Le=[],Ve,ot)}for(He=Le.length;He--;)(st=Le[He])&&(Ve=ue?a.call(we,st):Ht[He])>-1&&(we[Ve]=!(Ee[Ve]=st))}}else Le=Cf(Le===Ee?Le.splice(Hn,Le.length):Le),ue?ue(null,Ee,Le,ot):b.apply(Ee,Le)})}function Sv(R){for(var z,J,ne,ue=R.length,ye=h.relative[R[0].type],we=ye||h.relative[" "],Ee=ye?1:0,be=If(function(He){return He===z},we,!0),ot=If(function(He){return a.call(z,He)>-1},we,!0),Ve=[function(He,st,Le){var Ht=!ye&&(Le||st!=g)||((z=st).nodeType?be(He,st,Le):ot(He,st,Le));return z=null,Ht}];Ee<ue;Ee++)if(J=h.relative[R[Ee].type])Ve=[If(Ev(Ve),J)];else{if(J=h.filter[R[Ee].type].apply(null,R[Ee].matches),J[ce]){for(ne=++Ee;ne<ue&&!h.relative[R[ne].type];ne++);return Mv(Ee>1&&Ev(Ve),Ee>1&&yf(R.slice(0,Ee-1).concat({value:R[Ee-2].type===" "?"*":""})).replace(W,"$1"),J,Ee<ne&&Sv(R.slice(Ee,ne)),ne<ue&&Sv(R=R.slice(ne)),ne<ue&&yf(R))}Ve.push(J)}return Ev(Ve)}function qO(R,z){var J=z.length>0,ne=R.length>0,ue=function(ye,we,Ee,be,ot){var Ve,He,st,Le=0,Ht="0",Ar=ye&&[],Hn=[],Xr=g,zi=ye||ne&&h.find.TAG("*",ot),za=K+=Xr==null?1:Math.random()||.1,or=zi.length;for(ot&&(g=we==x||we||ot);Ht!==or&&(Ve=zi[Ht])!=null;Ht++){if(ne&&Ve){for(He=0,!we&&Ve.ownerDocument!=x&&(Oo(Ve),Ee=!P);st=R[He++];)if(st(Ve,we||x,Ee)){b.call(be,Ve);break}ot&&(K=za)}J&&((Ve=!st&&Ve)&&Le--,ye&&Ar.push(Ve))}if(Le+=Ht,J&&Ht!==Le){for(He=0;st=z[He++];)st(Ar,Hn,we,Ee);if(ye){if(Le>0)for(;Ht--;)Ar[Ht]||Hn[Ht]||(Hn[Ht]=S.call(be));Hn=Cf(Hn)}b.apply(be,Hn),ot&&!ye&&Hn.length>0&&Le+z.length>1&&p.uniqueSort(be)}return ot&&(K=za,g=Xr),Ar};return J?yi(ue):ue}function Tv(R,z){var J,ne=[],ue=[],ye=et[R+" "];if(!ye){for(z||(z=Fc(R)),J=z.length;J--;)ye=Sv(z[J]),ye[ce]?ne.push(ye):ue.push(ye);ye=et(R,qO(ue,ne)),ye.selector=R}return ye}function Kb(R,z,J,ne){var ue,ye,we,Ee,be,ot=typeof R=="function"&&R,Ve=!ne&&Fc(R=ot.selector||R);if(J=J||[],Ve.length===1){if(ye=Ve[0]=Ve[0].slice(0),ye.length>2&&(we=ye[0]).type==="ID"&&z.nodeType===9&&P&&h.relative[ye[1].type]){if(z=(h.find.ID(we.matches[0].replace(ao,uo),z)||[])[0],z)ot&&(z=z.parentNode);else return J;R=R.slice(ye.shift().value.length)}for(ue=Vi.needsContext.test(R)?0:ye.length;ue--&&(we=ye[ue],!h.relative[Ee=we.type]);)if((be=h.find[Ee])&&(ne=be(we.matches[0].replace(ao,uo),Dv.test(ye[0].type)&&xv(z.parentNode)||z))){if(ye.splice(ue,1),R=ne.length&&yf(ye),!R)return b.apply(J,ne),J;break}}return(ot||Tv(R,Ve))(ne,z,!P,J,!z||Dv.test(R)&&xv(z.parentNode)||z),J}I.sortStable=ce.split("").sort(mn).join("")===ce,Oo(),I.sortDetached=Va(function(R){return R.compareDocumentPosition(x.createElement("fieldset"))&1}),p.find=Pt,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,Pt.compile=Tv,Pt.select=Kb,Pt.setDocument=Oo,Pt.tokenize=Fc,Pt.escape=p.escapeSelector,Pt.getText=p.text,Pt.isXML=p.isXMLDoc,Pt.selectors=p.expr,Pt.support=p.support,Pt.uniqueSort=p.uniqueSort})();var Y=function(c,h,g){for(var v=[],A=g!==void 0;(c=c[h])&&c.nodeType!==9;)if(c.nodeType===1){if(A&&p(c).is(g))break;v.push(c)}return v},Q=function(c,h){for(var g=[];c;c=c.nextSibling)c.nodeType===1&&c!==h&&g.push(c);return g},Pe=p.expr.match.needsContext,Se=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Et(c,h,g){return C(h)?p.grep(c,function(v,A){return!!h.call(v,A,v)!==g}):h.nodeType?p.grep(c,function(v){return v===h!==g}):typeof h!="string"?p.grep(c,function(v){return a.call(h,v)>-1!==g}):p.filter(h,c,g)}p.filter=function(c,h,g){var v=h[0];return g&&(c=":not("+c+")"),h.length===1&&v.nodeType===1?p.find.matchesSelector(v,c)?[v]:[]:p.find.matches(c,p.grep(h,function(A){return A.nodeType===1}))},p.fn.extend({find:function(c){var h,g,v=this.length,A=this;if(typeof c!="string")return this.pushStack(p(c).filter(function(){for(h=0;h<v;h++)if(p.contains(A[h],this))return!0}));for(g=this.pushStack([]),h=0;h<v;h++)p.find(c,A[h],g);return v>1?p.uniqueSort(g):g},filter:function(c){return this.pushStack(Et(this,c||[],!1))},not:function(c){return this.pushStack(Et(this,c||[],!0))},is:function(c){return!!Et(this,typeof c=="string"&&Pe.test(c)?p(c):c||[],!1).length}});var jt,xe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Te=p.fn.init=function(c,h,g){var v,A;if(!c)return this;if(g=g||jt,typeof c=="string")if(c[0]==="<"&&c[c.length-1]===">"&&c.length>=3?v=[null,c,null]:v=xe.exec(c),v&&(v[1]||!h))if(v[1]){if(h=h instanceof p?h[0]:h,p.merge(this,p.parseHTML(v[1],h&&h.nodeType?h.ownerDocument||h:E,!0)),Se.test(v[1])&&p.isPlainObject(h))for(v in h)C(this[v])?this[v](h[v]):this.attr(v,h[v]);return this}else return A=E.getElementById(v[2]),A&&(this[0]=A,this.length=1),this;else return!h||h.jquery?(h||g).find(c):this.constructor(h).find(c);else{if(c.nodeType)return this[0]=c,this.length=1,this;if(C(c))return g.ready!==void 0?g.ready(c):c(p)}return p.makeArray(c,this)};Te.prototype=p.fn,jt=p(E);var se=/^(?:parents|prev(?:Until|All))/,ie={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({has:function(c){var h=p(c,this),g=h.length;return this.filter(function(){for(var v=0;v<g;v++)if(p.contains(this,h[v]))return!0})},closest:function(c,h){var g,v=0,A=this.length,b=[],x=typeof c!="string"&&p(c);if(!Pe.test(c)){for(;v<A;v++)for(g=this[v];g&&g!==h;g=g.parentNode)if(g.nodeType<11&&(x?x.index(g)>-1:g.nodeType===1&&p.find.matchesSelector(g,c))){b.push(g);break}}return this.pushStack(b.length>1?p.uniqueSort(b):b)},index:function(c){return c?typeof c=="string"?a.call(p(c),this[0]):a.call(this,c.jquery?c[0]:c):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(c,h){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(c,h))))},addBack:function(c){return this.add(c==null?this.prevObject:this.prevObject.filter(c))}});function ge(c,h){for(;(c=c[h])&&c.nodeType!==1;);return c}p.each({parent:function(c){var h=c.parentNode;return h&&h.nodeType!==11?h:null},parents:function(c){return Y(c,"parentNode")},parentsUntil:function(c,h,g){return Y(c,"parentNode",g)},next:function(c){return ge(c,"nextSibling")},prev:function(c){return ge(c,"previousSibling")},nextAll:function(c){return Y(c,"nextSibling")},prevAll:function(c){return Y(c,"previousSibling")},nextUntil:function(c,h,g){return Y(c,"nextSibling",g)},prevUntil:function(c,h,g){return Y(c,"previousSibling",g)},siblings:function(c){return Q((c.parentNode||{}).firstChild,c)},children:function(c){return Q(c.firstChild)},contents:function(c){return c.contentDocument!=null&&r(c.contentDocument)?c.contentDocument:(D(c,"template")&&(c=c.content||c),p.merge([],c.childNodes))}},function(c,h){p.fn[c]=function(g,v){var A=p.map(this,h,g);return c.slice(-5)!=="Until"&&(v=g),v&&typeof v=="string"&&(A=p.filter(v,A)),this.length>1&&(ie[c]||p.uniqueSort(A),se.test(c)&&A.reverse()),this.pushStack(A)}});var Ue=/[^\x20\t\r\n\f]+/g;function ut(c){var h={};return p.each(c.match(Ue)||[],function(g,v){h[v]=!0}),h}p.Callbacks=function(c){c=typeof c=="string"?ut(c):p.extend({},c);var h,g,v,A,b=[],x=[],L=-1,P=function(){for(A=A||c.once,v=h=!0;x.length;L=-1)for(g=x.shift();++L<b.length;)b[L].apply(g[0],g[1])===!1&&c.stopOnFalse&&(L=b.length,g=!1);c.memory||(g=!1),h=!1,A&&(g?b=[]:b="")},H={add:function(){return b&&(g&&!h&&(L=b.length-1,x.push(g)),(function re(ce){p.each(ce,function(K,he){C(he)?(!c.unique||!H.has(he))&&b.push(he):he&&he.length&&Z(he)!=="string"&&re(he)})})(arguments),g&&!h&&P()),this},remove:function(){return p.each(arguments,function(re,ce){for(var K;(K=p.inArray(ce,b,K))>-1;)b.splice(K,1),K<=L&&L--}),this},has:function(re){return re?p.inArray(re,b)>-1:b.length>0},empty:function(){return b&&(b=[]),this},disable:function(){return A=x=[],b=g="",this},disabled:function(){return!b},lock:function(){return A=x=[],!g&&!h&&(b=g=""),this},locked:function(){return!!A},fireWith:function(re,ce){return A||(ce=ce||[],ce=[re,ce.slice?ce.slice():ce],x.push(ce),h||P()),this},fire:function(){return H.fireWith(this,arguments),this},fired:function(){return!!v}};return H};function _e(c){return c}function mt(c){throw c}function w(c,h,g,v){var A;try{c&&C(A=c.promise)?A.call(c).done(h).fail(g):c&&C(A=c.then)?A.call(c,h,g):h.apply(void 0,[c].slice(v))}catch(b){g.apply(void 0,[b])}}p.extend({Deferred:function(c){var h=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],g="pending",v={state:function(){return g},always:function(){return A.done(arguments).fail(arguments),this},catch:function(b){return v.then(null,b)},pipe:function(){var b=arguments;return p.Deferred(function(x){p.each(h,function(L,P){var H=C(b[P[4]])&&b[P[4]];A[P[1]](function(){var re=H&&H.apply(this,arguments);re&&C(re.promise)?re.promise().progress(x.notify).done(x.resolve).fail(x.reject):x[P[0]+"With"](this,H?[re]:arguments)})}),b=null}).promise()},then:function(b,x,L){var P=0;function H(re,ce,K,he){return function(){var Ge=this,vt=arguments,et=function(){var mn,Fi;if(!(re<P)){if(mn=K.apply(Ge,vt),mn===ce.promise())throw new TypeError("Thenable self-resolution");Fi=mn&&(typeof mn=="object"||typeof mn=="function")&&mn.then,C(Fi)?he?Fi.call(mn,H(P,ce,_e,he),H(P,ce,mt,he)):(P++,Fi.call(mn,H(P,ce,_e,he),H(P,ce,mt,he),H(P,ce,_e,ce.notifyWith))):(K!==_e&&(Ge=void 0,vt=[mn]),(he||ce.resolveWith)(Ge,vt))}},_n=he?et:function(){try{et()}catch(mn){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(mn,_n.error),re+1>=P&&(K!==mt&&(Ge=void 0,vt=[mn]),ce.rejectWith(Ge,vt))}};re?_n():(p.Deferred.getErrorHook?_n.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(_n.error=p.Deferred.getStackHook()),e.setTimeout(_n))}}return p.Deferred(function(re){h[0][3].add(H(0,re,C(L)?L:_e,re.notifyWith)),h[1][3].add(H(0,re,C(b)?b:_e)),h[2][3].add(H(0,re,C(x)?x:mt))}).promise()},promise:function(b){return b!=null?p.extend(b,v):v}},A={};return p.each(h,function(b,x){var L=x[2],P=x[5];v[x[1]]=L.add,P&&L.add(function(){g=P},h[3-b][2].disable,h[3-b][3].disable,h[0][2].lock,h[0][3].lock),L.add(x[3].fire),A[x[0]]=function(){return A[x[0]+"With"](this===A?void 0:this,arguments),this},A[x[0]+"With"]=L.fireWith}),v.promise(A),c&&c.call(A,A),A},when:function(c){var h=arguments.length,g=h,v=Array(g),A=i.call(arguments),b=p.Deferred(),x=function(L){return function(P){v[L]=this,A[L]=arguments.length>1?i.call(arguments):P,--h||b.resolveWith(v,A)}};if(h<=1&&(w(c,b.done(x(g)).resolve,b.reject,!h),b.state()==="pending"||C(A[g]&&A[g].then)))return b.then();for(;g--;)w(A[g],x(g),b.reject);return b.promise()}});var T=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(c,h){e.console&&e.console.warn&&c&&T.test(c.name)&&e.console.warn("jQuery.Deferred exception: "+c.message,c.stack,h)},p.readyException=function(c){e.setTimeout(function(){throw c})};var O=p.Deferred();p.fn.ready=function(c){return O.then(c).catch(function(h){p.readyException(h)}),this},p.extend({isReady:!1,readyWait:1,ready:function(c){(c===!0?--p.readyWait:p.isReady)||(p.isReady=!0,!(c!==!0&&--p.readyWait>0)&&O.resolveWith(E,[p]))}}),p.ready.then=O.then;function F(){E.removeEventListener("DOMContentLoaded",F),e.removeEventListener("load",F),p.ready()}E.readyState==="complete"||E.readyState!=="loading"&&!E.documentElement.doScroll?e.setTimeout(p.ready):(E.addEventListener("DOMContentLoaded",F),e.addEventListener("load",F));var G=function(c,h,g,v,A,b,x){var L=0,P=c.length,H=g==null;if(Z(g)==="object"){A=!0;for(L in g)G(c,h,L,g[L],!0,b,x)}else if(v!==void 0&&(A=!0,C(v)||(x=!0),H&&(x?(h.call(c,v),h=null):(H=h,h=function(re,ce,K){return H.call(p(re),K)})),h))for(;L<P;L++)h(c[L],g,x?v:v.call(c[L],L,h(c[L],g)));return A?c:H?h.call(c):P?h(c[0],g):b},ae=/^-ms-/,Ie=/-([a-z])/g;function Fe(c,h){return h.toUpperCase()}function nt(c){return c.replace(ae,"ms-").replace(Ie,Fe)}var Jt=function(c){return c.nodeType===1||c.nodeType===9||!+c.nodeType};function Qt(){this.expando=p.expando+Qt.uid++}Qt.uid=1,Qt.prototype={cache:function(c){var h=c[this.expando];return h||(h={},Jt(c)&&(c.nodeType?c[this.expando]=h:Object.defineProperty(c,this.expando,{value:h,configurable:!0}))),h},set:function(c,h,g){var v,A=this.cache(c);if(typeof h=="string")A[nt(h)]=g;else for(v in h)A[nt(v)]=h[v];return A},get:function(c,h){return h===void 0?this.cache(c):c[this.expando]&&c[this.expando][nt(h)]},access:function(c,h,g){return h===void 0||h&&typeof h=="string"&&g===void 0?this.get(c,h):(this.set(c,h,g),g!==void 0?g:h)},remove:function(c,h){var g,v=c[this.expando];if(v!==void 0){if(h!==void 0)for(Array.isArray(h)?h=h.map(nt):(h=nt(h),h=h in v?[h]:h.match(Ue)||[]),g=h.length;g--;)delete v[h[g]];(h===void 0||p.isEmptyObject(v))&&(c.nodeType?c[this.expando]=void 0:delete c[this.expando])}},hasData:function(c){var h=c[this.expando];return h!==void 0&&!p.isEmptyObject(h)}};var ve=new Qt,Dt=new Qt,Bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Yt=/[A-Z]/g;function $t(c){return c==="true"?!0:c==="false"?!1:c==="null"?null:c===+c+""?+c:Bt.test(c)?JSON.parse(c):c}function hn(c,h,g){var v;if(g===void 0&&c.nodeType===1)if(v="data-"+h.replace(Yt,"-$&").toLowerCase(),g=c.getAttribute(v),typeof g=="string"){try{g=$t(g)}catch{}Dt.set(c,h,g)}else g=void 0;return g}p.extend({hasData:function(c){return Dt.hasData(c)||ve.hasData(c)},data:function(c,h,g){return Dt.access(c,h,g)},removeData:function(c,h){Dt.remove(c,h)},_data:function(c,h,g){return ve.access(c,h,g)},_removeData:function(c,h){ve.remove(c,h)}}),p.fn.extend({data:function(c,h){var g,v,A,b=this[0],x=b&&b.attributes;if(c===void 0){if(this.length&&(A=Dt.get(b),b.nodeType===1&&!ve.get(b,"hasDataAttrs"))){for(g=x.length;g--;)x[g]&&(v=x[g].name,v.indexOf("data-")===0&&(v=nt(v.slice(5)),hn(b,v,A[v])));ve.set(b,"hasDataAttrs",!0)}return A}return typeof c=="object"?this.each(function(){Dt.set(this,c)}):G(this,function(L){var P;if(b&&L===void 0)return P=Dt.get(b,c),P!==void 0||(P=hn(b,c),P!==void 0)?P:void 0;this.each(function(){Dt.set(this,c,L)})},null,h,arguments.length>1,null,!0)},removeData:function(c){return this.each(function(){Dt.remove(this,c)})}}),p.extend({queue:function(c,h,g){var v;if(c)return h=(h||"fx")+"queue",v=ve.get(c,h),g&&(!v||Array.isArray(g)?v=ve.access(c,h,p.makeArray(g)):v.push(g)),v||[]},dequeue:function(c,h){h=h||"fx";var g=p.queue(c,h),v=g.length,A=g.shift(),b=p._queueHooks(c,h),x=function(){p.dequeue(c,h)};A==="inprogress"&&(A=g.shift(),v--),A&&(h==="fx"&&g.unshift("inprogress"),delete b.stop,A.call(c,x,b)),!v&&b&&b.empty.fire()},_queueHooks:function(c,h){var g=h+"queueHooks";return ve.get(c,g)||ve.access(c,g,{empty:p.Callbacks("once memory").add(function(){ve.remove(c,[h+"queue",g])})})}}),p.fn.extend({queue:function(c,h){var g=2;return typeof c!="string"&&(h=c,c="fx",g--),arguments.length<g?p.queue(this[0],c):h===void 0?this:this.each(function(){var v=p.queue(this,c,h);p._queueHooks(this,c),c==="fx"&&v[0]!=="inprogress"&&p.dequeue(this,c)})},dequeue:function(c){return this.each(function(){p.dequeue(this,c)})},clearQueue:function(c){return this.queue(c||"fx",[])},promise:function(c,h){var g,v=1,A=p.Deferred(),b=this,x=this.length,L=function(){--v||A.resolveWith(b,[b])};for(typeof c!="string"&&(h=c,c=void 0),c=c||"fx";x--;)g=ve.get(b[x],c+"queueHooks"),g&&g.empty&&(v++,g.empty.add(L));return L(),A.promise(h)}});var ir=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pi=new RegExp("^(?:([+-])=|)("+ir+")([a-z%]*)$","i"),yr=["Top","Right","Bottom","Left"],mi=E.documentElement,Li=function(c){return p.contains(c.ownerDocument,c)},Ec={composed:!0};mi.getRootNode&&(Li=function(c){return p.contains(c.ownerDocument,c)||c.getRootNode(Ec)===c.ownerDocument});var ws=function(c,h){return c=h||c,c.style.display==="none"||c.style.display===""&&Li(c)&&p.css(c,"display")==="none"};function Mc(c,h,g,v){var A,b,x=20,L=v?function(){return v.cur()}:function(){return p.css(c,h,"")},P=L(),H=g&&g[3]||(p.cssNumber[h]?"":"px"),re=c.nodeType&&(p.cssNumber[h]||H!=="px"&&+P)&&pi.exec(p.css(c,h));if(re&&re[3]!==H){for(P=P/2,H=H||re[3],re=+P||1;x--;)p.style(c,h,re+H),(1-b)*(1-(b=L()/P||.5))<=0&&(x=0),re=re/b;re=re*2,p.style(c,h,re+H),g=g||[]}return g&&(re=+re||+P||0,A=g[1]?re+(g[1]+1)*g[2]:+g[2],v&&(v.unit=H,v.start=re,v.end=A)),A}var Sc={};function ff(c){var h,g=c.ownerDocument,v=c.nodeName,A=Sc[v];return A||(h=g.body.appendChild(g.createElement(v)),A=p.css(h,"display"),h.parentNode.removeChild(h),A==="none"&&(A="block"),Sc[v]=A,A)}function Rr(c,h){for(var g,v,A=[],b=0,x=c.length;b<x;b++)v=c[b],v.style&&(g=v.style.display,h?(g==="none"&&(A[b]=ve.get(v,"display")||null,A[b]||(v.style.display="")),v.style.display===""&&ws(v)&&(A[b]=ff(v))):g!=="none"&&(A[b]="none",ve.set(v,"display",g)));for(b=0;b<x;b++)A[b]!=null&&(c[b].style.display=A[b]);return c}p.fn.extend({show:function(){return Rr(this,!0)},hide:function(){return Rr(this)},toggle:function(c){return typeof c=="boolean"?c?this.show():this.hide():this.each(function(){ws(this)?p(this).show():p(this).hide()})}});var No=/^(?:checkbox|radio)$/i,Tc=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Nc=/^$|^module$|\/(?:java|ecma)script/i;(function(){var c=E.createDocumentFragment(),h=c.appendChild(E.createElement("div")),g=E.createElement("input");g.setAttribute("type","radio"),g.setAttribute("checked","checked"),g.setAttribute("name","t"),h.appendChild(g),I.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,h.innerHTML="<textarea>x</textarea>",I.noCloneChecked=!!h.cloneNode(!0).lastChild.defaultValue,h.innerHTML="<option></option>",I.option=!!h.lastChild})();var Ir={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ir.tbody=Ir.tfoot=Ir.colgroup=Ir.caption=Ir.thead,Ir.th=Ir.td,I.option||(Ir.optgroup=Ir.option=[1,"<select multiple='multiple'>","</select>"]);function sn(c,h){var g;return typeof c.getElementsByTagName<"u"?g=c.getElementsByTagName(h||"*"):typeof c.querySelectorAll<"u"?g=c.querySelectorAll(h||"*"):g=[],h===void 0||h&&D(c,h)?p.merge([c],g):g}function cv(c,h){for(var g=0,v=c.length;g<v;g++)ve.set(c[g],"globalEval",!h||ve.get(h[g],"globalEval"))}var lO=/<|&#?\w+;/;function Eb(c,h,g,v,A){for(var b,x,L,P,H,re,ce=h.createDocumentFragment(),K=[],he=0,Ge=c.length;he<Ge;he++)if(b=c[he],b||b===0)if(Z(b)==="object")p.merge(K,b.nodeType?[b]:b);else if(!lO.test(b))K.push(h.createTextNode(b));else{for(x=x||ce.appendChild(h.createElement("div")),L=(Tc.exec(b)||["",""])[1].toLowerCase(),P=Ir[L]||Ir._default,x.innerHTML=P[1]+p.htmlPrefilter(b)+P[2],re=P[0];re--;)x=x.lastChild;p.merge(K,x.childNodes),x=ce.firstChild,x.textContent=""}for(ce.textContent="",he=0;b=K[he++];){if(v&&p.inArray(b,v)>-1){A&&A.push(b);continue}if(H=Li(b),x=sn(ce.appendChild(b),"script"),H&&cv(x),g)for(re=0;b=x[re++];)Nc.test(b.type||"")&&g.push(b)}return ce}var Mb=/^([^.]*)(?:\.(.+)|)/;function La(){return!0}function Fa(){return!1}function lv(c,h,g,v,A,b){var x,L;if(typeof h=="object"){typeof g!="string"&&(v=v||g,g=void 0);for(L in h)lv(c,L,g,v,h[L],b);return c}if(v==null&&A==null?(A=g,v=g=void 0):A==null&&(typeof g=="string"?(A=v,v=void 0):(A=v,v=g,g=void 0)),A===!1)A=Fa;else if(!A)return c;return b===1&&(x=A,A=function(P){return p().off(P),x.apply(this,arguments)},A.guid=x.guid||(x.guid=p.guid++)),c.each(function(){p.event.add(this,h,A,v,g)})}p.event={global:{},add:function(c,h,g,v,A){var b,x,L,P,H,re,ce,K,he,Ge,vt,et=ve.get(c);if(Jt(c))for(g.handler&&(b=g,g=b.handler,A=b.selector),A&&p.find.matchesSelector(mi,A),g.guid||(g.guid=p.guid++),(P=et.events)||(P=et.events=Object.create(null)),(x=et.handle)||(x=et.handle=function(_n){return typeof p<"u"&&p.event.triggered!==_n.type?p.event.dispatch.apply(c,arguments):void 0}),h=(h||"").match(Ue)||[""],H=h.length;H--;)L=Mb.exec(h[H])||[],he=vt=L[1],Ge=(L[2]||"").split(".").sort(),he&&(ce=p.event.special[he]||{},he=(A?ce.delegateType:ce.bindType)||he,ce=p.event.special[he]||{},re=p.extend({type:he,origType:vt,data:v,handler:g,guid:g.guid,selector:A,needsContext:A&&p.expr.match.needsContext.test(A),namespace:Ge.join(".")},b),(K=P[he])||(K=P[he]=[],K.delegateCount=0,(!ce.setup||ce.setup.call(c,v,Ge,x)===!1)&&c.addEventListener&&c.addEventListener(he,x)),ce.add&&(ce.add.call(c,re),re.handler.guid||(re.handler.guid=g.guid)),A?K.splice(K.delegateCount++,0,re):K.push(re),p.event.global[he]=!0)},remove:function(c,h,g,v,A){var b,x,L,P,H,re,ce,K,he,Ge,vt,et=ve.hasData(c)&&ve.get(c);if(!(!et||!(P=et.events))){for(h=(h||"").match(Ue)||[""],H=h.length;H--;){if(L=Mb.exec(h[H])||[],he=vt=L[1],Ge=(L[2]||"").split(".").sort(),!he){for(he in P)p.event.remove(c,he+h[H],g,v,!0);continue}for(ce=p.event.special[he]||{},he=(v?ce.delegateType:ce.bindType)||he,K=P[he]||[],L=L[2]&&new RegExp("(^|\\.)"+Ge.join("\\.(?:.*\\.|)")+"(\\.|$)"),x=b=K.length;b--;)re=K[b],(A||vt===re.origType)&&(!g||g.guid===re.guid)&&(!L||L.test(re.namespace))&&(!v||v===re.selector||v==="**"&&re.selector)&&(K.splice(b,1),re.selector&&K.delegateCount--,ce.remove&&ce.remove.call(c,re));x&&!K.length&&((!ce.teardown||ce.teardown.call(c,Ge,et.handle)===!1)&&p.removeEvent(c,he,et.handle),delete P[he])}p.isEmptyObject(P)&&ve.remove(c,"handle events")}},dispatch:function(c){var h,g,v,A,b,x,L=new Array(arguments.length),P=p.event.fix(c),H=(ve.get(this,"events")||Object.create(null))[P.type]||[],re=p.event.special[P.type]||{};for(L[0]=P,h=1;h<arguments.length;h++)L[h]=arguments[h];if(P.delegateTarget=this,!(re.preDispatch&&re.preDispatch.call(this,P)===!1)){for(x=p.event.handlers.call(this,P,H),h=0;(A=x[h++])&&!P.isPropagationStopped();)for(P.currentTarget=A.elem,g=0;(b=A.handlers[g++])&&!P.isImmediatePropagationStopped();)(!P.rnamespace||b.namespace===!1||P.rnamespace.test(b.namespace))&&(P.handleObj=b,P.data=b.data,v=((p.event.special[b.origType]||{}).handle||b.handler).apply(A.elem,L),v!==void 0&&(P.result=v)===!1&&(P.preventDefault(),P.stopPropagation()));return re.postDispatch&&re.postDispatch.call(this,P),P.result}},handlers:function(c,h){var g,v,A,b,x,L=[],P=h.delegateCount,H=c.target;if(P&&H.nodeType&&!(c.type==="click"&&c.button>=1)){for(;H!==this;H=H.parentNode||this)if(H.nodeType===1&&!(c.type==="click"&&H.disabled===!0)){for(b=[],x={},g=0;g<P;g++)v=h[g],A=v.selector+" ",x[A]===void 0&&(x[A]=v.needsContext?p(A,this).index(H)>-1:p.find(A,this,null,[H]).length),x[A]&&b.push(v);b.length&&L.push({elem:H,handlers:b})}}return H=this,P<h.length&&L.push({elem:H,handlers:h.slice(P)}),L},addProp:function(c,h){Object.defineProperty(p.Event.prototype,c,{enumerable:!0,configurable:!0,get:C(h)?function(){if(this.originalEvent)return h(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[c]},set:function(g){Object.defineProperty(this,c,{enumerable:!0,configurable:!0,writable:!0,value:g})}})},fix:function(c){return c[p.expando]?c:new p.Event(c)},special:{load:{noBubble:!0},click:{setup:function(c){var h=this||c;return No.test(h.type)&&h.click&&D(h,"input")&&hf(h,"click",!0),!1},trigger:function(c){var h=this||c;return No.test(h.type)&&h.click&&D(h,"input")&&hf(h,"click"),!0},_default:function(c){var h=c.target;return No.test(h.type)&&h.click&&D(h,"input")&&ve.get(h,"click")||D(h,"a")}},beforeunload:{postDispatch:function(c){c.result!==void 0&&c.originalEvent&&(c.originalEvent.returnValue=c.result)}}}};function hf(c,h,g){if(!g){ve.get(c,h)===void 0&&p.event.add(c,h,La);return}ve.set(c,h,!1),p.event.add(c,h,{namespace:!1,handler:function(v){var A,b=ve.get(this,h);if(v.isTrigger&1&&this[h]){if(b)(p.event.special[h]||{}).delegateType&&v.stopPropagation();else if(b=i.call(arguments),ve.set(this,h,b),this[h](),A=ve.get(this,h),ve.set(this,h,!1),b!==A)return v.stopImmediatePropagation(),v.preventDefault(),A}else b&&(ve.set(this,h,p.event.trigger(b[0],b.slice(1),this)),v.stopPropagation(),v.isImmediatePropagationStopped=La)}})}p.removeEvent=function(c,h,g){c.removeEventListener&&c.removeEventListener(h,g)},p.Event=function(c,h){if(!(this instanceof p.Event))return new p.Event(c,h);c&&c.type?(this.originalEvent=c,this.type=c.type,this.isDefaultPrevented=c.defaultPrevented||c.defaultPrevented===void 0&&c.returnValue===!1?La:Fa,this.target=c.target&&c.target.nodeType===3?c.target.parentNode:c.target,this.currentTarget=c.currentTarget,this.relatedTarget=c.relatedTarget):this.type=c,h&&p.extend(this,h),this.timeStamp=c&&c.timeStamp||Date.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:Fa,isPropagationStopped:Fa,isImmediatePropagationStopped:Fa,isSimulated:!1,preventDefault:function(){var c=this.originalEvent;this.isDefaultPrevented=La,c&&!this.isSimulated&&c.preventDefault()},stopPropagation:function(){var c=this.originalEvent;this.isPropagationStopped=La,c&&!this.isSimulated&&c.stopPropagation()},stopImmediatePropagation:function(){var c=this.originalEvent;this.isImmediatePropagationStopped=La,c&&!this.isSimulated&&c.stopImmediatePropagation(),this.stopPropagation()}},p.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},p.event.addProp),p.each({focus:"focusin",blur:"focusout"},function(c,h){function g(v){if(E.documentMode){var A=ve.get(this,"handle"),b=p.event.fix(v);b.type=v.type==="focusin"?"focus":"blur",b.isSimulated=!0,A(v),b.target===b.currentTarget&&A(b)}else p.event.simulate(h,v.target,p.event.fix(v))}p.event.special[c]={setup:function(){var v;if(hf(this,c,!0),E.documentMode)v=ve.get(this,h),v||this.addEventListener(h,g),ve.set(this,h,(v||0)+1);else return!1},trigger:function(){return hf(this,c),!0},teardown:function(){var v;if(E.documentMode)v=ve.get(this,h)-1,v?ve.set(this,h,v):(this.removeEventListener(h,g),ve.remove(this,h));else return!1},_default:function(v){return ve.get(v.target,c)},delegateType:h},p.event.special[h]={setup:function(){var v=this.ownerDocument||this.document||this,A=E.documentMode?this:v,b=ve.get(A,h);b||(E.documentMode?this.addEventListener(h,g):v.addEventListener(c,g,!0)),ve.set(A,h,(b||0)+1)},teardown:function(){var v=this.ownerDocument||this.document||this,A=E.documentMode?this:v,b=ve.get(A,h)-1;b?ve.set(A,h,b):(E.documentMode?this.removeEventListener(h,g):v.removeEventListener(c,g,!0),ve.remove(A,h))}}}),p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(c,h){p.event.special[c]={delegateType:h,bindType:h,handle:function(g){var v,A=this,b=g.relatedTarget,x=g.handleObj;return(!b||b!==A&&!p.contains(A,b))&&(g.type=x.origType,v=x.handler.apply(this,arguments),g.type=h),v}}}),p.fn.extend({on:function(c,h,g,v){return lv(this,c,h,g,v)},one:function(c,h,g,v){return lv(this,c,h,g,v,1)},off:function(c,h,g){var v,A;if(c&&c.preventDefault&&c.handleObj)return v=c.handleObj,p(c.delegateTarget).off(v.namespace?v.origType+"."+v.namespace:v.origType,v.selector,v.handler),this;if(typeof c=="object"){for(A in c)this.off(A,h,c[A]);return this}return(h===!1||typeof h=="function")&&(g=h,h=void 0),g===!1&&(g=Fa),this.each(function(){p.event.remove(this,c,g,h)})}});var dO=/<script|<style|<link/i,fO=/checked\s*(?:[^=]|=\s*.checked.)/i,hO=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Sb(c,h){return D(c,"table")&&D(h.nodeType!==11?h:h.firstChild,"tr")&&p(c).children("tbody")[0]||c}function gO(c){return c.type=(c.getAttribute("type")!==null)+"/"+c.type,c}function pO(c){return(c.type||"").slice(0,5)==="true/"?c.type=c.type.slice(5):c.removeAttribute("type"),c}function Tb(c,h){var g,v,A,b,x,L,P;if(h.nodeType===1){if(ve.hasData(c)&&(b=ve.get(c),P=b.events,P)){ve.remove(h,"handle events");for(A in P)for(g=0,v=P[A].length;g<v;g++)p.event.add(h,A,P[A][g])}Dt.hasData(c)&&(x=Dt.access(c),L=p.extend({},x),Dt.set(h,L))}}function mO(c,h){var g=h.nodeName.toLowerCase();g==="input"&&No.test(c.type)?h.checked=c.checked:(g==="input"||g==="textarea")&&(h.defaultValue=c.defaultValue)}function ja(c,h,g,v){h=o(h);var A,b,x,L,P,H,re=0,ce=c.length,K=ce-1,he=h[0],Ge=C(he);if(Ge||ce>1&&typeof he=="string"&&!I.checkClone&&fO.test(he))return c.each(function(vt){var et=c.eq(vt);Ge&&(h[0]=he.call(this,vt,et.html())),ja(et,h,g,v)});if(ce&&(A=Eb(h,c[0].ownerDocument,!1,c,v),b=A.firstChild,A.childNodes.length===1&&(A=b),b||v)){for(x=p.map(sn(A,"script"),gO),L=x.length;re<ce;re++)P=A,re!==K&&(P=p.clone(P,!0,!0),L&&p.merge(x,sn(P,"script"))),g.call(c[re],P,re);if(L)for(H=x[x.length-1].ownerDocument,p.map(x,pO),re=0;re<L;re++)P=x[re],Nc.test(P.type||"")&&!ve.access(P,"globalEval")&&p.contains(H,P)&&(P.src&&(P.type||"").toLowerCase()!=="module"?p._evalUrl&&!P.noModule&&p._evalUrl(P.src,{nonce:P.nonce||P.getAttribute("nonce")},H):B(P.textContent.replace(hO,""),P,H))}return c}function Nb(c,h,g){for(var v,A=h?p.filter(h,c):c,b=0;(v=A[b])!=null;b++)!g&&v.nodeType===1&&p.cleanData(sn(v)),v.parentNode&&(g&&Li(v)&&cv(sn(v,"script")),v.parentNode.removeChild(v));return c}p.extend({htmlPrefilter:function(c){return c},clone:function(c,h,g){var v,A,b,x,L=c.cloneNode(!0),P=Li(c);if(!I.noCloneChecked&&(c.nodeType===1||c.nodeType===11)&&!p.isXMLDoc(c))for(x=sn(L),b=sn(c),v=0,A=b.length;v<A;v++)mO(b[v],x[v]);if(h)if(g)for(b=b||sn(c),x=x||sn(L),v=0,A=b.length;v<A;v++)Tb(b[v],x[v]);else Tb(c,L);return x=sn(L,"script"),x.length>0&&cv(x,!P&&sn(c,"script")),L},cleanData:function(c){for(var h,g,v,A=p.event.special,b=0;(g=c[b])!==void 0;b++)if(Jt(g)){if(h=g[ve.expando]){if(h.events)for(v in h.events)A[v]?p.event.remove(g,v):p.removeEvent(g,v,h.handle);g[ve.expando]=void 0}g[Dt.expando]&&(g[Dt.expando]=void 0)}}}),p.fn.extend({detach:function(c){return Nb(this,c,!0)},remove:function(c){return Nb(this,c)},text:function(c){return G(this,function(h){return h===void 0?p.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=h)})},null,c,arguments.length)},append:function(){return ja(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var h=Sb(this,c);h.appendChild(c)}})},prepend:function(){return ja(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var h=Sb(this,c);h.insertBefore(c,h.firstChild)}})},before:function(){return ja(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this)})},after:function(){return ja(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this.nextSibling)})},empty:function(){for(var c,h=0;(c=this[h])!=null;h++)c.nodeType===1&&(p.cleanData(sn(c,!1)),c.textContent="");return this},clone:function(c,h){return c=c??!1,h=h??c,this.map(function(){return p.clone(this,c,h)})},html:function(c){return G(this,function(h){var g=this[0]||{},v=0,A=this.length;if(h===void 0&&g.nodeType===1)return g.innerHTML;if(typeof h=="string"&&!dO.test(h)&&!Ir[(Tc.exec(h)||["",""])[1].toLowerCase()]){h=p.htmlPrefilter(h);try{for(;v<A;v++)g=this[v]||{},g.nodeType===1&&(p.cleanData(sn(g,!1)),g.innerHTML=h);g=0}catch{}}g&&this.empty().append(h)},null,c,arguments.length)},replaceWith:function(){var c=[];return ja(this,arguments,function(h){var g=this.parentNode;p.inArray(this,c)<0&&(p.cleanData(sn(this)),g&&g.replaceChild(h,this))},c)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,h){p.fn[c]=function(g){for(var v,A=[],b=p(g),x=b.length-1,L=0;L<=x;L++)v=L===x?this:this.clone(!0),p(b[L])[h](v),s.apply(A,v.get());return this.pushStack(A)}});var dv=new RegExp("^("+ir+")(?!px)[a-z%]+$","i"),fv=/^--/,gf=function(c){var h=c.ownerDocument.defaultView;return(!h||!h.opener)&&(h=e),h.getComputedStyle(c)},_b=function(c,h,g){var v,A,b={};for(A in h)b[A]=c.style[A],c.style[A]=h[A];v=g.call(c);for(A in h)c.style[A]=b[A];return v},vO=new RegExp(yr.join("|"),"i");(function(){function c(){if(H){P.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",H.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mi.appendChild(P).appendChild(H);var re=e.getComputedStyle(H);g=re.top!=="1%",L=h(re.marginLeft)===12,H.style.right="60%",b=h(re.right)===36,v=h(re.width)===36,H.style.position="absolute",A=h(H.offsetWidth/3)===12,mi.removeChild(P),H=null}}function h(re){return Math.round(parseFloat(re))}var g,v,A,b,x,L,P=E.createElement("div"),H=E.createElement("div");H.style&&(H.style.backgroundClip="content-box",H.cloneNode(!0).style.backgroundClip="",I.clearCloneStyle=H.style.backgroundClip==="content-box",p.extend(I,{boxSizingReliable:function(){return c(),v},pixelBoxStyles:function(){return c(),b},pixelPosition:function(){return c(),g},reliableMarginLeft:function(){return c(),L},scrollboxSize:function(){return c(),A},reliableTrDimensions:function(){var re,ce,K,he;return x==null&&(re=E.createElement("table"),ce=E.createElement("tr"),K=E.createElement("div"),re.style.cssText="position:absolute;left:-11111px;border-collapse:separate",ce.style.cssText="box-sizing:content-box;border:1px solid",ce.style.height="1px",K.style.height="9px",K.style.display="block",mi.appendChild(re).appendChild(ce).appendChild(K),he=e.getComputedStyle(ce),x=parseInt(he.height,10)+parseInt(he.borderTopWidth,10)+parseInt(he.borderBottomWidth,10)===ce.offsetHeight,mi.removeChild(re)),x}}))})();function _c(c,h,g){var v,A,b,x,L=fv.test(h),P=c.style;return g=g||gf(c),g&&(x=g.getPropertyValue(h)||g[h],L&&x&&(x=x.replace(W,"$1")||void 0),x===""&&!Li(c)&&(x=p.style(c,h)),!I.pixelBoxStyles()&&dv.test(x)&&vO.test(h)&&(v=P.width,A=P.minWidth,b=P.maxWidth,P.minWidth=P.maxWidth=P.width=x,x=g.width,P.width=v,P.minWidth=A,P.maxWidth=b)),x!==void 0?x+"":x}function Rb(c,h){return{get:function(){if(c()){delete this.get;return}return(this.get=h).apply(this,arguments)}}}var Ob=["Webkit","Moz","ms"],Pb=E.createElement("div").style,kb={};function yO(c){for(var h=c[0].toUpperCase()+c.slice(1),g=Ob.length;g--;)if(c=Ob[g]+h,c in Pb)return c}function hv(c){var h=p.cssProps[c]||kb[c];return h||(c in Pb?c:kb[c]=yO(c)||c)}var IO=/^(none|table(?!-c[ea]).+)/,CO={position:"absolute",visibility:"hidden",display:"block"},Lb={letterSpacing:"0",fontWeight:"400"};function Fb(c,h,g){var v=pi.exec(h);return v?Math.max(0,v[2]-(g||0))+(v[3]||"px"):h}function gv(c,h,g,v,A,b){var x=h==="width"?1:0,L=0,P=0,H=0;if(g===(v?"border":"content"))return 0;for(;x<4;x+=2)g==="margin"&&(H+=p.css(c,g+yr[x],!0,A)),v?(g==="content"&&(P-=p.css(c,"padding"+yr[x],!0,A)),g!=="margin"&&(P-=p.css(c,"border"+yr[x]+"Width",!0,A))):(P+=p.css(c,"padding"+yr[x],!0,A),g!=="padding"?P+=p.css(c,"border"+yr[x]+"Width",!0,A):L+=p.css(c,"border"+yr[x]+"Width",!0,A));return!v&&b>=0&&(P+=Math.max(0,Math.ceil(c["offset"+h[0].toUpperCase()+h.slice(1)]-b-P-L-.5))||0),P+H}function jb(c,h,g){var v=gf(c),A=!I.boxSizingReliable()||g,b=A&&p.css(c,"boxSizing",!1,v)==="border-box",x=b,L=_c(c,h,v),P="offset"+h[0].toUpperCase()+h.slice(1);if(dv.test(L)){if(!g)return L;L="auto"}return(!I.boxSizingReliable()&&b||!I.reliableTrDimensions()&&D(c,"tr")||L==="auto"||!parseFloat(L)&&p.css(c,"display",!1,v)==="inline")&&c.getClientRects().length&&(b=p.css(c,"boxSizing",!1,v)==="border-box",x=P in c,x&&(L=c[P])),L=parseFloat(L)||0,L+gv(c,h,g||(b?"border":"content"),x,v,L)+"px"}p.extend({cssHooks:{opacity:{get:function(c,h){if(h){var g=_c(c,"opacity");return g===""?"1":g}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(c,h,g,v){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var A,b,x,L=nt(h),P=fv.test(h),H=c.style;if(P||(h=hv(L)),x=p.cssHooks[h]||p.cssHooks[L],g!==void 0){if(b=typeof g,b==="string"&&(A=pi.exec(g))&&A[1]&&(g=Mc(c,h,A),b="number"),g==null||g!==g)return;b==="number"&&!P&&(g+=A&&A[3]||(p.cssNumber[L]?"":"px")),!I.clearCloneStyle&&g===""&&h.indexOf("background")===0&&(H[h]="inherit"),(!x||!("set"in x)||(g=x.set(c,g,v))!==void 0)&&(P?H.setProperty(h,g):H[h]=g)}else return x&&"get"in x&&(A=x.get(c,!1,v))!==void 0?A:H[h]}},css:function(c,h,g,v){var A,b,x,L=nt(h),P=fv.test(h);return P||(h=hv(L)),x=p.cssHooks[h]||p.cssHooks[L],x&&"get"in x&&(A=x.get(c,!0,g)),A===void 0&&(A=_c(c,h,v)),A==="normal"&&h in Lb&&(A=Lb[h]),g===""||g?(b=parseFloat(A),g===!0||isFinite(b)?b||0:A):A}}),p.each(["height","width"],function(c,h){p.cssHooks[h]={get:function(g,v,A){if(v)return IO.test(p.css(g,"display"))&&(!g.getClientRects().length||!g.getBoundingClientRect().width)?_b(g,CO,function(){return jb(g,h,A)}):jb(g,h,A)},set:function(g,v,A){var b,x=gf(g),L=!I.scrollboxSize()&&x.position==="absolute",P=L||A,H=P&&p.css(g,"boxSizing",!1,x)==="border-box",re=A?gv(g,h,A,H,x):0;return H&&L&&(re-=Math.ceil(g["offset"+h[0].toUpperCase()+h.slice(1)]-parseFloat(x[h])-gv(g,h,"border",!1,x)-.5)),re&&(b=pi.exec(v))&&(b[3]||"px")!=="px"&&(g.style[h]=v,v=p.css(g,h)),Fb(g,v,re)}}}),p.cssHooks.marginLeft=Rb(I.reliableMarginLeft,function(c,h){if(h)return(parseFloat(_c(c,"marginLeft"))||c.getBoundingClientRect().left-_b(c,{marginLeft:0},function(){return c.getBoundingClientRect().left}))+"px"}),p.each({margin:"",padding:"",border:"Width"},function(c,h){p.cssHooks[c+h]={expand:function(g){for(var v=0,A={},b=typeof g=="string"?g.split(" "):[g];v<4;v++)A[c+yr[v]+h]=b[v]||b[v-2]||b[0];return A}},c!=="margin"&&(p.cssHooks[c+h].set=Fb)}),p.fn.extend({css:function(c,h){return G(this,function(g,v,A){var b,x,L={},P=0;if(Array.isArray(v)){for(b=gf(g),x=v.length;P<x;P++)L[v[P]]=p.css(g,v[P],!1,b);return L}return A!==void 0?p.style(g,v,A):p.css(g,v)},c,h,arguments.length>1)}});function Cr(c,h,g,v,A){return new Cr.prototype.init(c,h,g,v,A)}p.Tween=Cr,Cr.prototype={constructor:Cr,init:function(c,h,g,v,A,b){this.elem=c,this.prop=g,this.easing=A||p.easing._default,this.options=h,this.start=this.now=this.cur(),this.end=v,this.unit=b||(p.cssNumber[g]?"":"px")},cur:function(){var c=Cr.propHooks[this.prop];return c&&c.get?c.get(this):Cr.propHooks._default.get(this)},run:function(c){var h,g=Cr.propHooks[this.prop];return this.options.duration?this.pos=h=p.easing[this.easing](c,this.options.duration*c,0,1,this.options.duration):this.pos=h=c,this.now=(this.end-this.start)*h+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),g&&g.set?g.set(this):Cr.propHooks._default.set(this),this}},Cr.prototype.init.prototype=Cr.prototype,Cr.propHooks={_default:{get:function(c){var h;return c.elem.nodeType!==1||c.elem[c.prop]!=null&&c.elem.style[c.prop]==null?c.elem[c.prop]:(h=p.css(c.elem,c.prop,""),!h||h==="auto"?0:h)},set:function(c){p.fx.step[c.prop]?p.fx.step[c.prop](c):c.elem.nodeType===1&&(p.cssHooks[c.prop]||c.elem.style[hv(c.prop)]!=null)?p.style(c.elem,c.prop,c.now+c.unit):c.elem[c.prop]=c.now}}},Cr.propHooks.scrollTop=Cr.propHooks.scrollLeft={set:function(c){c.elem.nodeType&&c.elem.parentNode&&(c.elem[c.prop]=c.now)}},p.easing={linear:function(c){return c},swing:function(c){return .5-Math.cos(c*Math.PI)/2},_default:"swing"},p.fx=Cr.prototype.init,p.fx.step={};var Ba,pf,AO=/^(?:toggle|show|hide)$/,wO=/queueHooks$/;function pv(){pf&&(E.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(pv):e.setTimeout(pv,p.fx.interval),p.fx.tick())}function Bb(){return e.setTimeout(function(){Ba=void 0}),Ba=Date.now()}function mf(c,h){var g,v=0,A={height:c};for(h=h?1:0;v<4;v+=2-h)g=yr[v],A["margin"+g]=A["padding"+g]=c;return h&&(A.opacity=A.width=c),A}function Vb(c,h,g){for(var v,A=(vi.tweeners[h]||[]).concat(vi.tweeners["*"]),b=0,x=A.length;b<x;b++)if(v=A[b].call(g,h,c))return v}function bO(c,h,g){var v,A,b,x,L,P,H,re,ce="width"in h||"height"in h,K=this,he={},Ge=c.style,vt=c.nodeType&&ws(c),et=ve.get(c,"fxshow");g.queue||(x=p._queueHooks(c,"fx"),x.unqueued==null&&(x.unqueued=0,L=x.empty.fire,x.empty.fire=function(){x.unqueued||L()}),x.unqueued++,K.always(function(){K.always(function(){x.unqueued--,p.queue(c,"fx").length||x.empty.fire()})}));for(v in h)if(A=h[v],AO.test(A)){if(delete h[v],b=b||A==="toggle",A===(vt?"hide":"show"))if(A==="show"&&et&&et[v]!==void 0)vt=!0;else continue;he[v]=et&&et[v]||p.style(c,v)}if(P=!p.isEmptyObject(h),!(!P&&p.isEmptyObject(he))){ce&&c.nodeType===1&&(g.overflow=[Ge.overflow,Ge.overflowX,Ge.overflowY],H=et&&et.display,H==null&&(H=ve.get(c,"display")),re=p.css(c,"display"),re==="none"&&(H?re=H:(Rr([c],!0),H=c.style.display||H,re=p.css(c,"display"),Rr([c]))),(re==="inline"||re==="inline-block"&&H!=null)&&p.css(c,"float")==="none"&&(P||(K.done(function(){Ge.display=H}),H==null&&(re=Ge.display,H=re==="none"?"":re)),Ge.display="inline-block")),g.overflow&&(Ge.overflow="hidden",K.always(function(){Ge.overflow=g.overflow[0],Ge.overflowX=g.overflow[1],Ge.overflowY=g.overflow[2]})),P=!1;for(v in he)P||(et?"hidden"in et&&(vt=et.hidden):et=ve.access(c,"fxshow",{display:H}),b&&(et.hidden=!vt),vt&&Rr([c],!0),K.done(function(){vt||Rr([c]),ve.remove(c,"fxshow");for(v in he)p.style(c,v,he[v])})),P=Vb(vt?et[v]:0,v,K),v in et||(et[v]=P.start,vt&&(P.end=P.start,P.start=0))}}function DO(c,h){var g,v,A,b,x;for(g in c)if(v=nt(g),A=h[v],b=c[g],Array.isArray(b)&&(A=b[1],b=c[g]=b[0]),g!==v&&(c[v]=b,delete c[g]),x=p.cssHooks[v],x&&"expand"in x){b=x.expand(b),delete c[v];for(g in b)g in c||(c[g]=b[g],h[g]=A)}else h[v]=A}function vi(c,h,g){var v,A,b=0,x=vi.prefilters.length,L=p.Deferred().always(function(){delete P.elem}),P=function(){if(A)return!1;for(var ce=Ba||Bb(),K=Math.max(0,H.startTime+H.duration-ce),he=K/H.duration||0,Ge=1-he,vt=0,et=H.tweens.length;vt<et;vt++)H.tweens[vt].run(Ge);return L.notifyWith(c,[H,Ge,K]),Ge<1&&et?K:(et||L.notifyWith(c,[H,1,0]),L.resolveWith(c,[H]),!1)},H=L.promise({elem:c,props:p.extend({},h),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},g),originalProperties:h,originalOptions:g,startTime:Ba||Bb(),duration:g.duration,tweens:[],createTween:function(ce,K){var he=p.Tween(c,H.opts,ce,K,H.opts.specialEasing[ce]||H.opts.easing);return H.tweens.push(he),he},stop:function(ce){var K=0,he=ce?H.tweens.length:0;if(A)return this;for(A=!0;K<he;K++)H.tweens[K].run(1);return ce?(L.notifyWith(c,[H,1,0]),L.resolveWith(c,[H,ce])):L.rejectWith(c,[H,ce]),this}}),re=H.props;for(DO(re,H.opts.specialEasing);b<x;b++)if(v=vi.prefilters[b].call(H,c,re,H.opts),v)return C(v.stop)&&(p._queueHooks(H.elem,H.opts.queue).stop=v.stop.bind(v)),v;return p.map(re,Vb,H),C(H.opts.start)&&H.opts.start.call(c,H),H.progress(H.opts.progress).done(H.opts.done,H.opts.complete).fail(H.opts.fail).always(H.opts.always),p.fx.timer(p.extend(P,{elem:c,anim:H,queue:H.opts.queue})),H}p.Animation=p.extend(vi,{tweeners:{"*":[function(c,h){var g=this.createTween(c,h);return Mc(g.elem,c,pi.exec(h),g),g}]},tweener:function(c,h){C(c)?(h=c,c=["*"]):c=c.match(Ue);for(var g,v=0,A=c.length;v<A;v++)g=c[v],vi.tweeners[g]=vi.tweeners[g]||[],vi.tweeners[g].unshift(h)},prefilters:[bO],prefilter:function(c,h){h?vi.prefilters.unshift(c):vi.prefilters.push(c)}}),p.speed=function(c,h,g){var v=c&&typeof c=="object"?p.extend({},c):{complete:g||!g&&h||C(c)&&c,duration:c,easing:g&&h||h&&!C(h)&&h};return p.fx.off?v.duration=0:typeof v.duration!="number"&&(v.duration in p.fx.speeds?v.duration=p.fx.speeds[v.duration]:v.duration=p.fx.speeds._default),(v.queue==null||v.queue===!0)&&(v.queue="fx"),v.old=v.complete,v.complete=function(){C(v.old)&&v.old.call(this),v.queue&&p.dequeue(this,v.queue)},v},p.fn.extend({fadeTo:function(c,h,g,v){return this.filter(ws).css("opacity",0).show().end().animate({opacity:h},c,g,v)},animate:function(c,h,g,v){var A=p.isEmptyObject(c),b=p.speed(h,g,v),x=function(){var L=vi(this,p.extend({},c),b);(A||ve.get(this,"finish"))&&L.stop(!0)};return x.finish=x,A||b.queue===!1?this.each(x):this.queue(b.queue,x)},stop:function(c,h,g){var v=function(A){var b=A.stop;delete A.stop,b(g)};return typeof c!="string"&&(g=h,h=c,c=void 0),h&&this.queue(c||"fx",[]),this.each(function(){var A=!0,b=c!=null&&c+"queueHooks",x=p.timers,L=ve.get(this);if(b)L[b]&&L[b].stop&&v(L[b]);else for(b in L)L[b]&&L[b].stop&&wO.test(b)&&v(L[b]);for(b=x.length;b--;)x[b].elem===this&&(c==null||x[b].queue===c)&&(x[b].anim.stop(g),A=!1,x.splice(b,1));(A||!g)&&p.dequeue(this,c)})},finish:function(c){return c!==!1&&(c=c||"fx"),this.each(function(){var h,g=ve.get(this),v=g[c+"queue"],A=g[c+"queueHooks"],b=p.timers,x=v?v.length:0;for(g.finish=!0,p.queue(this,c,[]),A&&A.stop&&A.stop.call(this,!0),h=b.length;h--;)b[h].elem===this&&b[h].queue===c&&(b[h].anim.stop(!0),b.splice(h,1));for(h=0;h<x;h++)v[h]&&v[h].finish&&v[h].finish.call(this);delete g.finish})}}),p.each(["toggle","show","hide"],function(c,h){var g=p.fn[h];p.fn[h]=function(v,A,b){return v==null||typeof v=="boolean"?g.apply(this,arguments):this.animate(mf(h,!0),v,A,b)}}),p.each({slideDown:mf("show"),slideUp:mf("hide"),slideToggle:mf("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,h){p.fn[c]=function(g,v,A){return this.animate(h,g,v,A)}}),p.timers=[],p.fx.tick=function(){var c,h=0,g=p.timers;for(Ba=Date.now();h<g.length;h++)c=g[h],!c()&&g[h]===c&&g.splice(h--,1);g.length||p.fx.stop(),Ba=void 0},p.fx.timer=function(c){p.timers.push(c),p.fx.start()},p.fx.interval=13,p.fx.start=function(){pf||(pf=!0,pv())},p.fx.stop=function(){pf=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(c,h){return c=p.fx&&p.fx.speeds[c]||c,h=h||"fx",this.queue(h,function(g,v){var A=e.setTimeout(g,c);v.stop=function(){e.clearTimeout(A)}})},(function(){var c=E.createElement("input"),h=E.createElement("select"),g=h.appendChild(E.createElement("option"));c.type="checkbox",I.checkOn=c.value!=="",I.optSelected=g.selected,c=E.createElement("input"),c.value="t",c.type="radio",I.radioValue=c.value==="t"})();var zb,Rc=p.expr.attrHandle;p.fn.extend({attr:function(c,h){return G(this,p.attr,c,h,arguments.length>1)},removeAttr:function(c){return this.each(function(){p.removeAttr(this,c)})}}),p.extend({attr:function(c,h,g){var v,A,b=c.nodeType;if(!(b===3||b===8||b===2)){if(typeof c.getAttribute>"u")return p.prop(c,h,g);if((b!==1||!p.isXMLDoc(c))&&(A=p.attrHooks[h.toLowerCase()]||(p.expr.match.bool.test(h)?zb:void 0)),g!==void 0){if(g===null){p.removeAttr(c,h);return}return A&&"set"in A&&(v=A.set(c,g,h))!==void 0?v:(c.setAttribute(h,g+""),g)}return A&&"get"in A&&(v=A.get(c,h))!==null?v:(v=p.find.attr(c,h),v??void 0)}},attrHooks:{type:{set:function(c,h){if(!I.radioValue&&h==="radio"&&D(c,"input")){var g=c.value;return c.setAttribute("type",h),g&&(c.value=g),h}}}},removeAttr:function(c,h){var g,v=0,A=h&&h.match(Ue);if(A&&c.nodeType===1)for(;g=A[v++];)c.removeAttribute(g)}}),zb={set:function(c,h,g){return h===!1?p.removeAttr(c,g):c.setAttribute(g,g),g}},p.each(p.expr.match.bool.source.match(/\w+/g),function(c,h){var g=Rc[h]||p.find.attr;Rc[h]=function(v,A,b){var x,L,P=A.toLowerCase();return b||(L=Rc[P],Rc[P]=x,x=g(v,A,b)!=null?P:null,Rc[P]=L),x}});var xO=/^(?:input|select|textarea|button)$/i,EO=/^(?:a|area)$/i;p.fn.extend({prop:function(c,h){return G(this,p.prop,c,h,arguments.length>1)},removeProp:function(c){return this.each(function(){delete this[p.propFix[c]||c]})}}),p.extend({prop:function(c,h,g){var v,A,b=c.nodeType;if(!(b===3||b===8||b===2))return(b!==1||!p.isXMLDoc(c))&&(h=p.propFix[h]||h,A=p.propHooks[h]),g!==void 0?A&&"set"in A&&(v=A.set(c,g,h))!==void 0?v:c[h]=g:A&&"get"in A&&(v=A.get(c,h))!==null?v:c[h]},propHooks:{tabIndex:{get:function(c){var h=p.find.attr(c,"tabindex");return h?parseInt(h,10):xO.test(c.nodeName)||EO.test(c.nodeName)&&c.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),I.optSelected||(p.propHooks.selected={get:function(c){var h=c.parentNode;return h&&h.parentNode&&h.parentNode.selectedIndex,null},set:function(c){var h=c.parentNode;h&&(h.selectedIndex,h.parentNode&&h.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){p.propFix[this.toLowerCase()]=this});function bs(c){var h=c.match(Ue)||[];return h.join(" ")}function Ds(c){return c.getAttribute&&c.getAttribute("class")||""}function mv(c){return Array.isArray(c)?c:typeof c=="string"?c.match(Ue)||[]:[]}p.fn.extend({addClass:function(c){var h,g,v,A,b,x;return C(c)?this.each(function(L){p(this).addClass(c.call(this,L,Ds(this)))}):(h=mv(c),h.length?this.each(function(){if(v=Ds(this),g=this.nodeType===1&&" "+bs(v)+" ",g){for(b=0;b<h.length;b++)A=h[b],g.indexOf(" "+A+" ")<0&&(g+=A+" ");x=bs(g),v!==x&&this.setAttribute("class",x)}}):this)},removeClass:function(c){var h,g,v,A,b,x;return C(c)?this.each(function(L){p(this).removeClass(c.call(this,L,Ds(this)))}):arguments.length?(h=mv(c),h.length?this.each(function(){if(v=Ds(this),g=this.nodeType===1&&" "+bs(v)+" ",g){for(b=0;b<h.length;b++)for(A=h[b];g.indexOf(" "+A+" ")>-1;)g=g.replace(" "+A+" "," ");x=bs(g),v!==x&&this.setAttribute("class",x)}}):this):this.attr("class","")},toggleClass:function(c,h){var g,v,A,b,x=typeof c,L=x==="string"||Array.isArray(c);return C(c)?this.each(function(P){p(this).toggleClass(c.call(this,P,Ds(this),h),h)}):typeof h=="boolean"&&L?h?this.addClass(c):this.removeClass(c):(g=mv(c),this.each(function(){if(L)for(b=p(this),A=0;A<g.length;A++)v=g[A],b.hasClass(v)?b.removeClass(v):b.addClass(v);else(c===void 0||x==="boolean")&&(v=Ds(this),v&&ve.set(this,"__className__",v),this.setAttribute&&this.setAttribute("class",v||c===!1?"":ve.get(this,"__className__")||""))}))},hasClass:function(c){var h,g,v=0;for(h=" "+c+" ";g=this[v++];)if(g.nodeType===1&&(" "+bs(Ds(g))+" ").indexOf(h)>-1)return!0;return!1}});var MO=/\r/g;p.fn.extend({val:function(c){var h,g,v,A=this[0];return arguments.length?(v=C(c),this.each(function(b){var x;this.nodeType===1&&(v?x=c.call(this,b,p(this).val()):x=c,x==null?x="":typeof x=="number"?x+="":Array.isArray(x)&&(x=p.map(x,function(L){return L==null?"":L+""})),h=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()],(!h||!("set"in h)||h.set(this,x,"value")===void 0)&&(this.value=x))})):A?(h=p.valHooks[A.type]||p.valHooks[A.nodeName.toLowerCase()],h&&"get"in h&&(g=h.get(A,"value"))!==void 0?g:(g=A.value,typeof g=="string"?g.replace(MO,""):g??"")):void 0}}),p.extend({valHooks:{option:{get:function(c){var h=p.find.attr(c,"value");return h??bs(p.text(c))}},select:{get:function(c){var h,g,v,A=c.options,b=c.selectedIndex,x=c.type==="select-one",L=x?null:[],P=x?b+1:A.length;for(b<0?v=P:v=x?b:0;v<P;v++)if(g=A[v],(g.selected||v===b)&&!g.disabled&&(!g.parentNode.disabled||!D(g.parentNode,"optgroup"))){if(h=p(g).val(),x)return h;L.push(h)}return L},set:function(c,h){for(var g,v,A=c.options,b=p.makeArray(h),x=A.length;x--;)v=A[x],(v.selected=p.inArray(p.valHooks.option.get(v),b)>-1)&&(g=!0);return g||(c.selectedIndex=-1),b}}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]={set:function(c,h){if(Array.isArray(h))return c.checked=p.inArray(p(c).val(),h)>-1}},I.checkOn||(p.valHooks[this].get=function(c){return c.getAttribute("value")===null?"on":c.value})});var Oc=e.location,Gb={guid:Date.now()},vv=/\?/;p.parseXML=function(c){var h,g;if(!c||typeof c!="string")return null;try{h=new e.DOMParser().parseFromString(c,"text/xml")}catch{}return g=h&&h.getElementsByTagName("parsererror")[0],(!h||g)&&p.error("Invalid XML: "+(g?p.map(g.childNodes,function(v){return v.textContent}).join(`
14
+ `):c)),h};var Ub=/^(?:focusinfocus|focusoutblur)$/,Hb=function(c){c.stopPropagation()};p.extend(p.event,{trigger:function(c,h,g,v){var A,b,x,L,P,H,re,ce,K=[g||E],he=f.call(c,"type")?c.type:c,Ge=f.call(c,"namespace")?c.namespace.split("."):[];if(b=ce=x=g=g||E,!(g.nodeType===3||g.nodeType===8)&&!Ub.test(he+p.event.triggered)&&(he.indexOf(".")>-1&&(Ge=he.split("."),he=Ge.shift(),Ge.sort()),P=he.indexOf(":")<0&&"on"+he,c=c[p.expando]?c:new p.Event(he,typeof c=="object"&&c),c.isTrigger=v?2:3,c.namespace=Ge.join("."),c.rnamespace=c.namespace?new RegExp("(^|\\.)"+Ge.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=void 0,c.target||(c.target=g),h=h==null?[c]:p.makeArray(h,[c]),re=p.event.special[he]||{},!(!v&&re.trigger&&re.trigger.apply(g,h)===!1))){if(!v&&!re.noBubble&&!M(g)){for(L=re.delegateType||he,Ub.test(L+he)||(b=b.parentNode);b;b=b.parentNode)K.push(b),x=b;x===(g.ownerDocument||E)&&K.push(x.defaultView||x.parentWindow||e)}for(A=0;(b=K[A++])&&!c.isPropagationStopped();)ce=b,c.type=A>1?L:re.bindType||he,H=(ve.get(b,"events")||Object.create(null))[c.type]&&ve.get(b,"handle"),H&&H.apply(b,h),H=P&&b[P],H&&H.apply&&Jt(b)&&(c.result=H.apply(b,h),c.result===!1&&c.preventDefault());return c.type=he,!v&&!c.isDefaultPrevented()&&(!re._default||re._default.apply(K.pop(),h)===!1)&&Jt(g)&&P&&C(g[he])&&!M(g)&&(x=g[P],x&&(g[P]=null),p.event.triggered=he,c.isPropagationStopped()&&ce.addEventListener(he,Hb),g[he](),c.isPropagationStopped()&&ce.removeEventListener(he,Hb),p.event.triggered=void 0,x&&(g[P]=x)),c.result}},simulate:function(c,h,g){var v=p.extend(new p.Event,g,{type:c,isSimulated:!0});p.event.trigger(v,null,h)}}),p.fn.extend({trigger:function(c,h){return this.each(function(){p.event.trigger(c,h,this)})},triggerHandler:function(c,h){var g=this[0];if(g)return p.event.trigger(c,h,g,!0)}});var SO=/\[\]$/,Zb=/\r?\n/g,TO=/^(?:submit|button|image|reset|file)$/i,NO=/^(?:input|select|textarea|keygen)/i;function yv(c,h,g,v){var A;if(Array.isArray(h))p.each(h,function(b,x){g||SO.test(c)?v(c,x):yv(c+"["+(typeof x=="object"&&x!=null?b:"")+"]",x,g,v)});else if(!g&&Z(h)==="object")for(A in h)yv(c+"["+A+"]",h[A],g,v);else v(c,h)}p.param=function(c,h){var g,v=[],A=function(b,x){var L=C(x)?x():x;v[v.length]=encodeURIComponent(b)+"="+encodeURIComponent(L??"")};if(c==null)return"";if(Array.isArray(c)||c.jquery&&!p.isPlainObject(c))p.each(c,function(){A(this.name,this.value)});else for(g in c)yv(g,c[g],h,A);return v.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var c=p.prop(this,"elements");return c?p.makeArray(c):this}).filter(function(){var c=this.type;return this.name&&!p(this).is(":disabled")&&NO.test(this.nodeName)&&!TO.test(c)&&(this.checked||!No.test(c))}).map(function(c,h){var g=p(this).val();return g==null?null:Array.isArray(g)?p.map(g,function(v){return{name:h.name,value:v.replace(Zb,`\r
15
+ `)}}):{name:h.name,value:g.replace(Zb,`\r
16
+ `)}}).get()}});var _O=/%20/g,RO=/#.*$/,OO=/([?&])_=[^&]*/,PO=/^(.*?):[ \t]*([^\r\n]*)$/mg,kO=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,LO=/^(?:GET|HEAD)$/,FO=/^\/\//,Wb={},Iv={},Yb="*/".concat("*"),Cv=E.createElement("a");Cv.href=Oc.href;function $b(c){return function(h,g){typeof h!="string"&&(g=h,h="*");var v,A=0,b=h.toLowerCase().match(Ue)||[];if(C(g))for(;v=b[A++];)v[0]==="+"?(v=v.slice(1)||"*",(c[v]=c[v]||[]).unshift(g)):(c[v]=c[v]||[]).push(g)}}function Xb(c,h,g,v){var A={},b=c===Iv;function x(L){var P;return A[L]=!0,p.each(c[L]||[],function(H,re){var ce=re(h,g,v);if(typeof ce=="string"&&!b&&!A[ce])return h.dataTypes.unshift(ce),x(ce),!1;if(b)return!(P=ce)}),P}return x(h.dataTypes[0])||!A["*"]&&x("*")}function Av(c,h){var g,v,A=p.ajaxSettings.flatOptions||{};for(g in h)h[g]!==void 0&&((A[g]?c:v||(v={}))[g]=h[g]);return v&&p.extend(!0,c,v),c}function jO(c,h,g){for(var v,A,b,x,L=c.contents,P=c.dataTypes;P[0]==="*";)P.shift(),v===void 0&&(v=c.mimeType||h.getResponseHeader("Content-Type"));if(v){for(A in L)if(L[A]&&L[A].test(v)){P.unshift(A);break}}if(P[0]in g)b=P[0];else{for(A in g){if(!P[0]||c.converters[A+" "+P[0]]){b=A;break}x||(x=A)}b=b||x}if(b)return b!==P[0]&&P.unshift(b),g[b]}function BO(c,h,g,v){var A,b,x,L,P,H={},re=c.dataTypes.slice();if(re[1])for(x in c.converters)H[x.toLowerCase()]=c.converters[x];for(b=re.shift();b;)if(c.responseFields[b]&&(g[c.responseFields[b]]=h),!P&&v&&c.dataFilter&&(h=c.dataFilter(h,c.dataType)),P=b,b=re.shift(),b){if(b==="*")b=P;else if(P!=="*"&&P!==b){if(x=H[P+" "+b]||H["* "+b],!x){for(A in H)if(L=A.split(" "),L[1]===b&&(x=H[P+" "+L[0]]||H["* "+L[0]],x)){x===!0?x=H[A]:H[A]!==!0&&(b=L[0],re.unshift(L[1]));break}}if(x!==!0)if(x&&c.throws)h=x(h);else try{h=x(h)}catch(ce){return{state:"parsererror",error:x?ce:"No conversion from "+P+" to "+b}}}}return{state:"success",data:h}}p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oc.href,type:"GET",isLocal:kO.test(Oc.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(c,h){return h?Av(Av(c,p.ajaxSettings),h):Av(p.ajaxSettings,c)},ajaxPrefilter:$b(Wb),ajaxTransport:$b(Iv),ajax:function(c,h){typeof c=="object"&&(h=c,c=void 0),h=h||{};var g,v,A,b,x,L,P,H,re,ce,K=p.ajaxSetup({},h),he=K.context||K,Ge=K.context&&(he.nodeType||he.jquery)?p(he):p.event,vt=p.Deferred(),et=p.Callbacks("once memory"),_n=K.statusCode||{},mn={},Fi={},ji="canceled",ct={readyState:0,getResponseHeader:function(It){var un;if(P){if(!b)for(b={};un=PO.exec(A);)b[un[1].toLowerCase()+" "]=(b[un[1].toLowerCase()+" "]||[]).concat(un[2]);un=b[It.toLowerCase()+" "]}return un==null?null:un.join(", ")},getAllResponseHeaders:function(){return P?A:null},setRequestHeader:function(It,un){return P==null&&(It=Fi[It.toLowerCase()]=Fi[It.toLowerCase()]||It,mn[It]=un),this},overrideMimeType:function(It){return P==null&&(K.mimeType=It),this},statusCode:function(It){var un;if(It)if(P)ct.always(It[ct.status]);else for(un in It)_n[un]=[_n[un],It[un]];return this},abort:function(It){var un=It||ji;return g&&g.abort(un),xs(0,un),this}};if(vt.promise(ct),K.url=((c||K.url||Oc.href)+"").replace(FO,Oc.protocol+"//"),K.type=h.method||h.type||K.method||K.type,K.dataTypes=(K.dataType||"*").toLowerCase().match(Ue)||[""],K.crossDomain==null){L=E.createElement("a");try{L.href=K.url,L.href=L.href,K.crossDomain=Cv.protocol+"//"+Cv.host!=L.protocol+"//"+L.host}catch{K.crossDomain=!0}}if(K.data&&K.processData&&typeof K.data!="string"&&(K.data=p.param(K.data,K.traditional)),Xb(Wb,K,h,ct),P)return ct;H=p.event&&K.global,H&&p.active++===0&&p.event.trigger("ajaxStart"),K.type=K.type.toUpperCase(),K.hasContent=!LO.test(K.type),v=K.url.replace(RO,""),K.hasContent?K.data&&K.processData&&(K.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(K.data=K.data.replace(_O,"+")):(ce=K.url.slice(v.length),K.data&&(K.processData||typeof K.data=="string")&&(v+=(vv.test(v)?"&":"?")+K.data,delete K.data),K.cache===!1&&(v=v.replace(OO,"$1"),ce=(vv.test(v)?"&":"?")+"_="+Gb.guid+++ce),K.url=v+ce),K.ifModified&&(p.lastModified[v]&&ct.setRequestHeader("If-Modified-Since",p.lastModified[v]),p.etag[v]&&ct.setRequestHeader("If-None-Match",p.etag[v])),(K.data&&K.hasContent&&K.contentType!==!1||h.contentType)&&ct.setRequestHeader("Content-Type",K.contentType),ct.setRequestHeader("Accept",K.dataTypes[0]&&K.accepts[K.dataTypes[0]]?K.accepts[K.dataTypes[0]]+(K.dataTypes[0]!=="*"?", "+Yb+"; q=0.01":""):K.accepts["*"]);for(re in K.headers)ct.setRequestHeader(re,K.headers[re]);if(K.beforeSend&&(K.beforeSend.call(he,ct,K)===!1||P))return ct.abort();if(ji="abort",et.add(K.complete),ct.done(K.success),ct.fail(K.error),g=Xb(Iv,K,h,ct),!g)xs(-1,"No Transport");else{if(ct.readyState=1,H&&Ge.trigger("ajaxSend",[ct,K]),P)return ct;K.async&&K.timeout>0&&(x=e.setTimeout(function(){ct.abort("timeout")},K.timeout));try{P=!1,g.send(mn,xs)}catch(It){if(P)throw It;xs(-1,It)}}function xs(It,un,kc,bv){var Bi,Lc,Vi,_o,Ro,$r=un;P||(P=!0,x&&e.clearTimeout(x),g=void 0,A=bv||"",ct.readyState=It>0?4:0,Bi=It>=200&&It<300||It===304,kc&&(_o=jO(K,ct,kc)),!Bi&&p.inArray("script",K.dataTypes)>-1&&p.inArray("json",K.dataTypes)<0&&(K.converters["text script"]=function(){}),_o=BO(K,_o,ct,Bi),Bi?(K.ifModified&&(Ro=ct.getResponseHeader("Last-Modified"),Ro&&(p.lastModified[v]=Ro),Ro=ct.getResponseHeader("etag"),Ro&&(p.etag[v]=Ro)),It===204||K.type==="HEAD"?$r="nocontent":It===304?$r="notmodified":($r=_o.state,Lc=_o.data,Vi=_o.error,Bi=!Vi)):(Vi=$r,(It||!$r)&&($r="error",It<0&&(It=0))),ct.status=It,ct.statusText=(un||$r)+"",Bi?vt.resolveWith(he,[Lc,$r,ct]):vt.rejectWith(he,[ct,$r,Vi]),ct.statusCode(_n),_n=void 0,H&&Ge.trigger(Bi?"ajaxSuccess":"ajaxError",[ct,K,Bi?Lc:Vi]),et.fireWith(he,[ct,$r]),H&&(Ge.trigger("ajaxComplete",[ct,K]),--p.active||p.event.trigger("ajaxStop")))}return ct},getJSON:function(c,h,g){return p.get(c,h,g,"json")},getScript:function(c,h){return p.get(c,void 0,h,"script")}}),p.each(["get","post"],function(c,h){p[h]=function(g,v,A,b){return C(v)&&(b=b||A,A=v,v=void 0),p.ajax(p.extend({url:g,type:h,dataType:b,data:v,success:A},p.isPlainObject(g)&&g))}}),p.ajaxPrefilter(function(c){var h;for(h in c.headers)h.toLowerCase()==="content-type"&&(c.contentType=c.headers[h]||"")}),p._evalUrl=function(c,h,g){return p.ajax({url:c,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(v){p.globalEval(v,h,g)}})},p.fn.extend({wrapAll:function(c){var h;return this[0]&&(C(c)&&(c=c.call(this[0])),h=p(c,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&h.insertBefore(this[0]),h.map(function(){for(var g=this;g.firstElementChild;)g=g.firstElementChild;return g}).append(this)),this},wrapInner:function(c){return C(c)?this.each(function(h){p(this).wrapInner(c.call(this,h))}):this.each(function(){var h=p(this),g=h.contents();g.length?g.wrapAll(c):h.append(c)})},wrap:function(c){var h=C(c);return this.each(function(g){p(this).wrapAll(h?c.call(this,g):c)})},unwrap:function(c){return this.parent(c).not("body").each(function(){p(this).replaceWith(this.childNodes)}),this}}),p.expr.pseudos.hidden=function(c){return!p.expr.pseudos.visible(c)},p.expr.pseudos.visible=function(c){return!!(c.offsetWidth||c.offsetHeight||c.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var VO={0:200,1223:204},Pc=p.ajaxSettings.xhr();I.cors=!!Pc&&"withCredentials"in Pc,I.ajax=Pc=!!Pc,p.ajaxTransport(function(c){var h,g;if(I.cors||Pc&&!c.crossDomain)return{send:function(v,A){var b,x=c.xhr();if(x.open(c.type,c.url,c.async,c.username,c.password),c.xhrFields)for(b in c.xhrFields)x[b]=c.xhrFields[b];c.mimeType&&x.overrideMimeType&&x.overrideMimeType(c.mimeType),!c.crossDomain&&!v["X-Requested-With"]&&(v["X-Requested-With"]="XMLHttpRequest");for(b in v)x.setRequestHeader(b,v[b]);h=function(L){return function(){h&&(h=g=x.onload=x.onerror=x.onabort=x.ontimeout=x.onreadystatechange=null,L==="abort"?x.abort():L==="error"?typeof x.status!="number"?A(0,"error"):A(x.status,x.statusText):A(VO[x.status]||x.status,x.statusText,(x.responseType||"text")!=="text"||typeof x.responseText!="string"?{binary:x.response}:{text:x.responseText},x.getAllResponseHeaders()))}},x.onload=h(),g=x.onerror=x.ontimeout=h("error"),x.onabort!==void 0?x.onabort=g:x.onreadystatechange=function(){x.readyState===4&&e.setTimeout(function(){h&&g()})},h=h("abort");try{x.send(c.hasContent&&c.data||null)}catch(L){if(h)throw L}},abort:function(){h&&h()}}}),p.ajaxPrefilter(function(c){c.crossDomain&&(c.contents.script=!1)}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(c){return p.globalEval(c),c}}}),p.ajaxPrefilter("script",function(c){c.cache===void 0&&(c.cache=!1),c.crossDomain&&(c.type="GET")}),p.ajaxTransport("script",function(c){if(c.crossDomain||c.scriptAttrs){var h,g;return{send:function(v,A){h=p("<script>").attr(c.scriptAttrs||{}).prop({charset:c.scriptCharset,src:c.url}).on("load error",g=function(b){h.remove(),g=null,b&&A(b.type==="error"?404:200,b.type)}),E.head.appendChild(h[0])},abort:function(){g&&g()}}}});var qb=[],wv=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var c=qb.pop()||p.expando+"_"+Gb.guid++;return this[c]=!0,c}}),p.ajaxPrefilter("json jsonp",function(c,h,g){var v,A,b,x=c.jsonp!==!1&&(wv.test(c.url)?"url":typeof c.data=="string"&&(c.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&wv.test(c.data)&&"data");if(x||c.dataTypes[0]==="jsonp")return v=c.jsonpCallback=C(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,x?c[x]=c[x].replace(wv,"$1"+v):c.jsonp!==!1&&(c.url+=(vv.test(c.url)?"&":"?")+c.jsonp+"="+v),c.converters["script json"]=function(){return b||p.error(v+" was not called"),b[0]},c.dataTypes[0]="json",A=e[v],e[v]=function(){b=arguments},g.always(function(){A===void 0?p(e).removeProp(v):e[v]=A,c[v]&&(c.jsonpCallback=h.jsonpCallback,qb.push(v)),b&&C(A)&&A(b[0]),b=A=void 0}),"script"}),I.createHTMLDocument=(function(){var c=E.implementation.createHTMLDocument("").body;return c.innerHTML="<form></form><form></form>",c.childNodes.length===2})(),p.parseHTML=function(c,h,g){if(typeof c!="string")return[];typeof h=="boolean"&&(g=h,h=!1);var v,A,b;return h||(I.createHTMLDocument?(h=E.implementation.createHTMLDocument(""),v=h.createElement("base"),v.href=E.location.href,h.head.appendChild(v)):h=E),A=Se.exec(c),b=!g&&[],A?[h.createElement(A[1])]:(A=Eb([c],h,b),b&&b.length&&p(b).remove(),p.merge([],A.childNodes))},p.fn.load=function(c,h,g){var v,A,b,x=this,L=c.indexOf(" ");return L>-1&&(v=bs(c.slice(L)),c=c.slice(0,L)),C(h)?(g=h,h=void 0):h&&typeof h=="object"&&(A="POST"),x.length>0&&p.ajax({url:c,type:A||"GET",dataType:"html",data:h}).done(function(P){b=arguments,x.html(v?p("<div>").append(p.parseHTML(P)).find(v):P)}).always(g&&function(P,H){x.each(function(){g.apply(this,b||[P.responseText,H,P])})}),this},p.expr.pseudos.animated=function(c){return p.grep(p.timers,function(h){return c===h.elem}).length},p.offset={setOffset:function(c,h,g){var v,A,b,x,L,P,H,re=p.css(c,"position"),ce=p(c),K={};re==="static"&&(c.style.position="relative"),L=ce.offset(),b=p.css(c,"top"),P=p.css(c,"left"),H=(re==="absolute"||re==="fixed")&&(b+P).indexOf("auto")>-1,H?(v=ce.position(),x=v.top,A=v.left):(x=parseFloat(b)||0,A=parseFloat(P)||0),C(h)&&(h=h.call(c,g,p.extend({},L))),h.top!=null&&(K.top=h.top-L.top+x),h.left!=null&&(K.left=h.left-L.left+A),"using"in h?h.using.call(c,K):ce.css(K)}},p.fn.extend({offset:function(c){if(arguments.length)return c===void 0?this:this.each(function(A){p.offset.setOffset(this,c,A)});var h,g,v=this[0];if(v)return v.getClientRects().length?(h=v.getBoundingClientRect(),g=v.ownerDocument.defaultView,{top:h.top+g.pageYOffset,left:h.left+g.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var c,h,g,v=this[0],A={top:0,left:0};if(p.css(v,"position")==="fixed")h=v.getBoundingClientRect();else{for(h=this.offset(),g=v.ownerDocument,c=v.offsetParent||g.documentElement;c&&(c===g.body||c===g.documentElement)&&p.css(c,"position")==="static";)c=c.parentNode;c&&c!==v&&c.nodeType===1&&(A=p(c).offset(),A.top+=p.css(c,"borderTopWidth",!0),A.left+=p.css(c,"borderLeftWidth",!0))}return{top:h.top-A.top-p.css(v,"marginTop",!0),left:h.left-A.left-p.css(v,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent;c&&p.css(c,"position")==="static";)c=c.offsetParent;return c||mi})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(c,h){var g=h==="pageYOffset";p.fn[c]=function(v){return G(this,function(A,b,x){var L;if(M(A)?L=A:A.nodeType===9&&(L=A.defaultView),x===void 0)return L?L[h]:A[b];L?L.scrollTo(g?L.pageXOffset:x,g?x:L.pageYOffset):A[b]=x},c,v,arguments.length)}}),p.each(["top","left"],function(c,h){p.cssHooks[h]=Rb(I.pixelPosition,function(g,v){if(v)return v=_c(g,h),dv.test(v)?p(g).position()[h]+"px":v})}),p.each({Height:"height",Width:"width"},function(c,h){p.each({padding:"inner"+c,content:h,"":"outer"+c},function(g,v){p.fn[v]=function(A,b){var x=arguments.length&&(g||typeof A!="boolean"),L=g||(A===!0||b===!0?"margin":"border");return G(this,function(P,H,re){var ce;return M(P)?v.indexOf("outer")===0?P["inner"+c]:P.document.documentElement["client"+c]:P.nodeType===9?(ce=P.documentElement,Math.max(P.body["scroll"+c],ce["scroll"+c],P.body["offset"+c],ce["offset"+c],ce["client"+c])):re===void 0?p.css(P,H,L):p.style(P,H,re,L)},h,x?A:void 0,x)}})}),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(c,h){p.fn[h]=function(g){return this.on(h,g)}}),p.fn.extend({bind:function(c,h,g){return this.on(c,null,h,g)},unbind:function(c,h){return this.off(c,null,h)},delegate:function(c,h,g,v){return this.on(h,c,g,v)},undelegate:function(c,h,g){return arguments.length===1?this.off(c,"**"):this.off(h,c||"**",g)},hover:function(c,h){return this.on("mouseenter",c).on("mouseleave",h||c)}}),p.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(c,h){p.fn[h]=function(g,v){return arguments.length>0?this.on(h,null,g,v):this.trigger(h)}});var zO=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;p.proxy=function(c,h){var g,v,A;if(typeof h=="string"&&(g=c[h],h=c,c=g),!!C(c))return v=i.call(arguments,2),A=function(){return c.apply(h||this,v.concat(i.call(arguments)))},A.guid=c.guid=c.guid||p.guid++,A},p.holdReady=function(c){c?p.readyWait++:p.ready(!0)},p.isArray=Array.isArray,p.parseJSON=JSON.parse,p.nodeName=D,p.isFunction=C,p.isWindow=M,p.camelCase=nt,p.type=Z,p.now=Date.now,p.isNumeric=function(c){var h=p.type(c);return(h==="number"||h==="string")&&!isNaN(c-parseFloat(c))},p.trim=function(c){return c==null?"":(c+"").replace(zO,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return p});var GO=e.jQuery,UO=e.$;return p.noConflict=function(c){return e.$===p&&(e.$=UO),c&&e.jQuery===p&&(e.jQuery=GO),p},typeof t>"u"&&(e.jQuery=e.$=p),p})});var kd=rD(lw=>{"use strict";(function(e){var t=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define=="function"&&define.amd)define(["underscore","jquery","exports"],function(i,o,s){t.Backbone=e(t,s,i,o)});else if(typeof lw<"u"){var n=(Q1(),iP(J1)),r;try{r=fs()}catch{}e(t,lw,n,r)}else t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)})(function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.4.1",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s=t.Events={},a=/\s+/,u,l=function(w,T,O,F,G){var ae=0,Ie;if(O&&typeof O=="object")for(F!==void 0&&("context"in G)&&G.context===void 0&&(G.context=F),Ie=n.keys(O);ae<Ie.length;ae++)T=l(w,T,Ie[ae],O[Ie[ae]],G);else if(O&&a.test(O))for(Ie=O.split(a);ae<Ie.length;ae++)T=w(T,Ie[ae],F,G);else T=w(T,O,F,G);return T};s.on=function(w,T,O){if(this._events=l(f,this._events||{},w,T,{context:O,ctx:this,listening:u}),u){var F=this._listeners||(this._listeners={});F[u.id]=u,u.interop=!1}return this},s.listenTo=function(w,T,O){if(!w)return this;var F=w._listenId||(w._listenId=n.uniqueId("l")),G=this._listeningTo||(this._listeningTo={}),ae=u=G[F];ae||(this._listenId||(this._listenId=n.uniqueId("l")),ae=u=G[F]=new E(this,w));var Ie=d(w,T,O,this);if(u=void 0,Ie)throw Ie;return ae.interop&&ae.on(T,O),this};var f=function(w,T,O,F){if(O){var G=w[T]||(w[T]=[]),ae=F.context,Ie=F.ctx,Fe=F.listening;Fe&&Fe.count++,G.push({callback:O,context:ae,ctx:ae||Ie,listening:Fe})}return w},d=function(w,T,O,F){try{w.on(T,O,F)}catch(G){return G}};s.off=function(w,T,O){return this._events?(this._events=l(m,this._events,w,T,{context:O,listeners:this._listeners}),this):this},s.stopListening=function(w,T,O){var F=this._listeningTo;if(!F)return this;for(var G=w?[w._listenId]:n.keys(F),ae=0;ae<G.length;ae++){var Ie=F[G[ae]];if(!Ie)break;Ie.obj.off(T,O,this),Ie.interop&&Ie.off(T,O)}return n.isEmpty(F)&&(this._listeningTo=void 0),this};var m=function(w,T,O,F){if(w){var G=F.context,ae=F.listeners,Ie=0,Fe;if(!T&&!G&&!O){for(Fe=n.keys(ae);Ie<Fe.length;Ie++)ae[Fe[Ie]].cleanup();return}for(Fe=T?[T]:n.keys(w);Ie<Fe.length;Ie++){T=Fe[Ie];var nt=w[T];if(!nt)break;for(var Jt=[],Qt=0;Qt<nt.length;Qt++){var ve=nt[Qt];if(O&&O!==ve.callback&&O!==ve.callback._callback||G&&G!==ve.context)Jt.push(ve);else{var Dt=ve.listening;Dt&&Dt.off(T,O)}}Jt.length?w[T]=Jt:delete w[T]}return w}};s.once=function(w,T,O){var F=l(I,{},w,T,this.off.bind(this));return typeof w=="string"&&O==null&&(T=void 0),this.on(F,T,O)},s.listenToOnce=function(w,T,O){var F=l(I,{},T,O,this.stopListening.bind(this,w));return this.listenTo(w,F)};var I=function(w,T,O,F){if(O){var G=w[T]=n.once(function(){F(T,G),O.apply(this,arguments)});G._callback=O}return w};s.trigger=function(w){if(!this._events)return this;for(var T=Math.max(0,arguments.length-1),O=Array(T),F=0;F<T;F++)O[F]=arguments[F+1];return l(C,this._events,w,void 0,O),this};var C=function(w,T,O,F){if(w){var G=w[T],ae=w.all;G&&ae&&(ae=ae.slice()),G&&M(G,F),ae&&M(ae,[T].concat(F))}return w},M=function(w,T){var O,F=-1,G=w.length,ae=T[0],Ie=T[1],Fe=T[2];switch(T.length){case 0:for(;++F<G;)(O=w[F]).callback.call(O.ctx);return;case 1:for(;++F<G;)(O=w[F]).callback.call(O.ctx,ae);return;case 2:for(;++F<G;)(O=w[F]).callback.call(O.ctx,ae,Ie);return;case 3:for(;++F<G;)(O=w[F]).callback.call(O.ctx,ae,Ie,Fe);return;default:for(;++F<G;)(O=w[F]).callback.apply(O.ctx,T);return}},E=function(w,T){this.id=w._listenId,this.listener=w,this.obj=T,this.interop=!0,this.count=0,this._events=void 0};E.prototype.on=s.on,E.prototype.off=function(w,T){var O;this.interop?(this._events=l(m,this._events,w,T,{context:void 0,listeners:void 0}),O=!this._events):(this.count--,O=this.count===0),O&&this.cleanup()},E.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(t,s);var N=t.Model=function(w,T){var O=w||{};T||(T={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},T.collection&&(this.collection=T.collection),T.parse&&(O=this.parse(O,T)||{});var F=n.result(this,"defaults");O=n.defaults(n.extend({},F,O),F),this.set(O,T),this.changed={},this.initialize.apply(this,arguments)};n.extend(N.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(w){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(w){return this.attributes[w]},escape:function(w){return n.escape(this.get(w))},has:function(w){return this.get(w)!=null},matches:function(w){return!!n.iteratee(w,this)(this.attributes)},set:function(w,T,O){if(w==null)return this;var F;if(typeof w=="object"?(F=w,O=T):(F={})[w]=T,O||(O={}),!this._validate(F,O))return!1;var G=O.unset,ae=O.silent,Ie=[],Fe=this._changing;this._changing=!0,Fe||(this._previousAttributes=n.clone(this.attributes),this.changed={});var nt=this.attributes,Jt=this.changed,Qt=this._previousAttributes;for(var ve in F)T=F[ve],n.isEqual(nt[ve],T)||Ie.push(ve),n.isEqual(Qt[ve],T)?delete Jt[ve]:Jt[ve]=T,G?delete nt[ve]:nt[ve]=T;if(this.idAttribute in F){var Dt=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,Dt,O)}if(!ae){Ie.length&&(this._pending=O);for(var Bt=0;Bt<Ie.length;Bt++)this.trigger("change:"+Ie[Bt],this,nt[Ie[Bt]],O)}if(Fe)return this;if(!ae)for(;this._pending;)O=this._pending,this._pending=!1,this.trigger("change",this,O);return this._pending=!1,this._changing=!1,this},unset:function(w,T){return this.set(w,void 0,n.extend({},T,{unset:!0}))},clear:function(w){var T={};for(var O in this.attributes)T[O]=void 0;return this.set(T,n.extend({},w,{unset:!0}))},hasChanged:function(w){return w==null?!n.isEmpty(this.changed):n.has(this.changed,w)},changedAttributes:function(w){if(!w)return this.hasChanged()?n.clone(this.changed):!1;var T=this._changing?this._previousAttributes:this.attributes,O={},F;for(var G in w){var ae=w[G];n.isEqual(T[G],ae)||(O[G]=ae,F=!0)}return F?O:!1},previous:function(w){return w==null||!this._previousAttributes?null:this._previousAttributes[w]},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(w){w=n.extend({parse:!0},w);var T=this,O=w.success;return w.success=function(F){var G=w.parse?T.parse(F,w):F;if(!T.set(G,w))return!1;O&&O.call(w.context,T,F,w),T.trigger("sync",T,F,w)},mt(this,w),this.sync("read",this,w)},save:function(w,T,O){var F;w==null||typeof w=="object"?(F=w,O=T):(F={})[w]=T,O=n.extend({validate:!0,parse:!0},O);var G=O.wait;if(F&&!G){if(!this.set(F,O))return!1}else if(!this._validate(F,O))return!1;var ae=this,Ie=O.success,Fe=this.attributes;O.success=function(Qt){ae.attributes=Fe;var ve=O.parse?ae.parse(Qt,O):Qt;if(G&&(ve=n.extend({},F,ve)),ve&&!ae.set(ve,O))return!1;Ie&&Ie.call(O.context,ae,Qt,O),ae.trigger("sync",ae,Qt,O)},mt(this,O),F&&G&&(this.attributes=n.extend({},Fe,F));var nt=this.isNew()?"create":O.patch?"patch":"update";nt==="patch"&&!O.attrs&&(O.attrs=F);var Jt=this.sync(nt,this,O);return this.attributes=Fe,Jt},destroy:function(w){w=w?n.clone(w):{};var T=this,O=w.success,F=w.wait,G=function(){T.stopListening(),T.trigger("destroy",T,T.collection,w)};w.success=function(Ie){F&&G(),O&&O.call(w.context,T,Ie,w),T.isNew()||T.trigger("sync",T,Ie,w)};var ae=!1;return this.isNew()?n.defer(w.success):(mt(this,w),ae=this.sync("delete",this,w)),F||G(),ae},url:function(){var w=n.result(this,"urlRoot")||n.result(this.collection,"url")||_e();if(this.isNew())return w;var T=this.get(this.idAttribute);return w.replace(/[^\/]$/,"$&/")+encodeURIComponent(T)},parse:function(w,T){return w},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(w){return this._validate({},n.extend({},w,{validate:!0}))},_validate:function(w,T){if(!T.validate||!this.validate)return!0;w=n.extend({},this.attributes,w);var O=this.validationError=this.validate(w,T)||null;return O?(this.trigger("invalid",this,O,n.extend(T,{validationError:O})),!1):!0}});var B=t.Collection=function(w,T){T||(T={}),this.preinitialize.apply(this,arguments),T.model&&(this.model=T.model),T.comparator!==void 0&&(this.comparator=T.comparator),this._reset(),this.initialize.apply(this,arguments),w&&this.reset(w,n.extend({silent:!0},T))},Z={add:!0,remove:!0,merge:!0},$={add:!0,remove:!1},te=function(w,T,O){O=Math.min(Math.max(O,0),w.length);var F=Array(w.length-O),G=T.length,ae;for(ae=0;ae<F.length;ae++)F[ae]=w[ae+O];for(ae=0;ae<G;ae++)w[ae+O]=T[ae];for(ae=0;ae<F.length;ae++)w[ae+G+O]=F[ae]};n.extend(B.prototype,s,{model:N,preinitialize:function(){},initialize:function(){},toJSON:function(w){return this.map(function(T){return T.toJSON(w)})},sync:function(){return t.sync.apply(this,arguments)},add:function(w,T){return this.set(w,n.extend({merge:!1},T,$))},remove:function(w,T){T=n.extend({},T);var O=!n.isArray(w);w=O?[w]:w.slice();var F=this._removeModels(w,T);return!T.silent&&F.length&&(T.changes={added:[],merged:[],removed:F},this.trigger("update",this,T)),O?F[0]:F},set:function(w,T){if(w!=null){T=n.extend({},Z,T),T.parse&&!this._isModel(w)&&(w=this.parse(w,T)||[]);var O=!n.isArray(w);w=O?[w]:w.slice();var F=T.at;F!=null&&(F=+F),F>this.length&&(F=this.length),F<0&&(F+=this.length+1);var G=[],ae=[],Ie=[],Fe=[],nt={},Jt=T.add,Qt=T.merge,ve=T.remove,Dt=!1,Bt=this.comparator&&F==null&&T.sort!==!1,Yt=n.isString(this.comparator)?this.comparator:null,$t,hn;for(hn=0;hn<w.length;hn++){$t=w[hn];var ir=this.get($t);if(ir){if(Qt&&$t!==ir){var pi=this._isModel($t)?$t.attributes:$t;T.parse&&(pi=ir.parse(pi,T)),ir.set(pi,T),Ie.push(ir),Bt&&!Dt&&(Dt=ir.hasChanged(Yt))}nt[ir.cid]||(nt[ir.cid]=!0,G.push(ir)),w[hn]=ir}else Jt&&($t=w[hn]=this._prepareModel($t,T),$t&&(ae.push($t),this._addReference($t,T),nt[$t.cid]=!0,G.push($t)))}if(ve){for(hn=0;hn<this.length;hn++)$t=this.models[hn],nt[$t.cid]||Fe.push($t);Fe.length&&this._removeModels(Fe,T)}var yr=!1,mi=!Bt&&Jt&&ve;if(G.length&&mi?(yr=this.length!==G.length||n.some(this.models,function(Li,Ec){return Li!==G[Ec]}),this.models.length=0,te(this.models,G,0),this.length=this.models.length):ae.length&&(Bt&&(Dt=!0),te(this.models,ae,F??this.length),this.length=this.models.length),Dt&&this.sort({silent:!0}),!T.silent){for(hn=0;hn<ae.length;hn++)F!=null&&(T.index=F+hn),$t=ae[hn],$t.trigger("add",$t,this,T);(Dt||yr)&&this.trigger("sort",this,T),(ae.length||Fe.length||Ie.length)&&(T.changes={added:ae,removed:Fe,merged:Ie},this.trigger("update",this,T))}return O?w[0]:w}},reset:function(w,T){T=T?n.clone(T):{};for(var O=0;O<this.models.length;O++)this._removeReference(this.models[O],T);return T.previousModels=this.models,this._reset(),w=this.add(w,n.extend({silent:!0},T)),T.silent||this.trigger("reset",this,T),w},push:function(w,T){return this.add(w,n.extend({at:this.length},T))},pop:function(w){var T=this.at(this.length-1);return this.remove(T,w)},unshift:function(w,T){return this.add(w,n.extend({at:0},T))},shift:function(w){var T=this.at(0);return this.remove(T,w)},slice:function(){return o.apply(this.models,arguments)},get:function(w){if(w!=null)return this._byId[w]||this._byId[this.modelId(this._isModel(w)?w.attributes:w,w.idAttribute)]||w.cid&&this._byId[w.cid]},has:function(w){return this.get(w)!=null},at:function(w){return w<0&&(w+=this.length),this.models[w]},where:function(w,T){return this[T?"find":"filter"](w)},findWhere:function(w){return this.where(w,!0)},sort:function(w){var T=this.comparator;if(!T)throw new Error("Cannot sort a set without a comparator");w||(w={});var O=T.length;return n.isFunction(T)&&(T=T.bind(this)),O===1||n.isString(T)?this.models=this.sortBy(T):this.models.sort(T),w.silent||this.trigger("sort",this,w),this},pluck:function(w){return this.map(w+"")},fetch:function(w){w=n.extend({parse:!0},w);var T=w.success,O=this;return w.success=function(F){var G=w.reset?"reset":"set";O[G](F,w),T&&T.call(w.context,O,F,w),O.trigger("sync",O,F,w)},mt(this,w),this.sync("read",this,w)},create:function(w,T){T=T?n.clone(T):{};var O=T.wait;if(w=this._prepareModel(w,T),!w)return!1;O||this.add(w,T);var F=this,G=T.success;return T.success=function(ae,Ie,Fe){O&&F.add(ae,Fe),G&&G.call(Fe.context,ae,Ie,Fe)},w.save(null,T),w},parse:function(w,T){return w},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(w,T){return w[T||this.model.prototype.idAttribute||"id"]},values:function(){return new y(this,D)},keys:function(){return new y(this,S)},entries:function(){return new y(this,_)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(w,T){if(this._isModel(w))return w.collection||(w.collection=this),w;T=T?n.clone(T):{},T.collection=this;var O;return this.model.prototype?O=new this.model(w,T):O=this.model(w,T),O.validationError?(this.trigger("invalid",this,O.validationError,T),!1):O},_removeModels:function(w,T){for(var O=[],F=0;F<w.length;F++){var G=this.get(w[F]);if(G){var ae=this.indexOf(G);this.models.splice(ae,1),this.length--,delete this._byId[G.cid];var Ie=this.modelId(G.attributes,G.idAttribute);Ie!=null&&delete this._byId[Ie],T.silent||(T.index=ae,G.trigger("remove",G,this,T)),O.push(G),this._removeReference(G,T)}}return O},_isModel:function(w){return w instanceof N},_addReference:function(w,T){this._byId[w.cid]=w;var O=this.modelId(w.attributes,w.idAttribute);O!=null&&(this._byId[O]=w),w.on("all",this._onModelEvent,this)},_removeReference:function(w,T){delete this._byId[w.cid];var O=this.modelId(w.attributes,w.idAttribute);O!=null&&delete this._byId[O],this===w.collection&&delete w.collection,w.off("all",this._onModelEvent,this)},_onModelEvent:function(w,T,O,F){if(T){if((w==="add"||w==="remove")&&O!==this)return;if(w==="destroy"&&this.remove(T,F),w==="changeId"){var G=this.modelId(T.previousAttributes(),T.idAttribute),ae=this.modelId(T.attributes,T.idAttribute);G!=null&&delete this._byId[G],ae!=null&&(this._byId[ae]=T)}}this.trigger.apply(this,arguments)}});var p=typeof Symbol=="function"&&Symbol.iterator;p&&(B.prototype[p]=B.prototype.values);var y=function(w,T){this._collection=w,this._kind=T,this._index=0},D=1,S=2,_=3;p&&(y.prototype[p]=function(){return this}),y.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var w=this._collection.at(this._index);this._index++;var T;if(this._kind===D)T=w;else{var O=this._collection.modelId(w.attributes,w.idAttribute);this._kind===S?T=O:T=[O,w]}return{value:T,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var j=t.View=function(w){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(w,W)),this._ensureElement(),this.initialize.apply(this,arguments)},V=/^(\S+)\s*(.*)$/,W=["model","collection","el","id","attributes","className","tagName","events"];n.extend(j.prototype,s,{tagName:"div",$:function(w){return this.$el.find(w)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(w){return this.undelegateEvents(),this._setElement(w),this.delegateEvents(),this},_setElement:function(w){this.$el=w instanceof t.$?w:t.$(w),this.el=this.$el[0]},delegateEvents:function(w){if(w||(w=n.result(this,"events")),!w)return this;this.undelegateEvents();for(var T in w){var O=w[T];if(n.isFunction(O)||(O=this[O]),!!O){var F=T.match(V);this.delegate(F[1],F[2],O.bind(this))}}return this},delegate:function(w,T,O){return this.$el.on(w+".delegateEvents"+this.cid,T,O),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(w,T,O){return this.$el.off(w+".delegateEvents"+this.cid,T,O),this},_createElement:function(w){return document.createElement(w)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var w=n.extend({},n.result(this,"attributes"));this.id&&(w.id=n.result(this,"id")),this.className&&(w.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(w)}},_setAttributes:function(w){this.$el.attr(w)}});var oe=function(w,T,O,F){switch(T){case 1:return function(){return w[O](this[F])};case 2:return function(G){return w[O](this[F],G)};case 3:return function(G,ae){return w[O](this[F],U(G,this),ae)};case 4:return function(G,ae,Ie){return w[O](this[F],U(G,this),ae,Ie)};default:return function(){var G=o.call(arguments);return G.unshift(this[F]),w[O].apply(w,G)}}},fe=function(w,T,O,F){n.each(O,function(G,ae){T[ae]&&(w.prototype[ae]=oe(T,G,ae,F))})},U=function(w,T){return n.isFunction(w)?w:n.isObject(w)&&!T._isModel(w)?q(w):n.isString(w)?function(O){return O.get(w)}:w},q=function(w){var T=n.matches(w);return function(O){return T(O.attributes)}},Y={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},Q={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};n.each([[B,Y,"models"],[N,Q,"attributes"]],function(w){var T=w[0],O=w[1],F=w[2];T.mixin=function(G){var ae=n.reduce(n.functions(G),function(Ie,Fe){return Ie[Fe]=0,Ie},{});fe(T,G,ae,F)},fe(T,n,O,F)}),t.sync=function(w,T,O){var F=Pe[w];n.defaults(O||(O={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var G={type:F,dataType:"json"};if(O.url||(G.url=n.result(T,"url")||_e()),O.data==null&&T&&(w==="create"||w==="update"||w==="patch")&&(G.contentType="application/json",G.data=JSON.stringify(O.attrs||T.toJSON(O))),O.emulateJSON&&(G.contentType="application/x-www-form-urlencoded",G.data=G.data?{model:G.data}:{}),O.emulateHTTP&&(F==="PUT"||F==="DELETE"||F==="PATCH")){G.type="POST",O.emulateJSON&&(G.data._method=F);var ae=O.beforeSend;O.beforeSend=function(nt){if(nt.setRequestHeader("X-HTTP-Method-Override",F),ae)return ae.apply(this,arguments)}}G.type!=="GET"&&!O.emulateJSON&&(G.processData=!1);var Ie=O.error;O.error=function(nt,Jt,Qt){O.textStatus=Jt,O.errorThrown=Qt,Ie&&Ie.call(O.context,nt,Jt,Qt)};var Fe=O.xhr=t.ajax(n.extend(G,O));return T.trigger("request",T,Fe,O),Fe};var Pe={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var Se=t.Router=function(w){w||(w={}),this.preinitialize.apply(this,arguments),w.routes&&(this.routes=w.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},Et=/\((.*?)\)/g,jt=/(\(\?)?:\w+/g,xe=/\*\w+/g,Te=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(Se.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(w,T,O){n.isRegExp(w)||(w=this._routeToRegExp(w)),n.isFunction(T)&&(O=T,T=""),O||(O=this[T]);var F=this;return t.history.route(w,function(G){var ae=F._extractParameters(w,G);F.execute(O,ae,T)!==!1&&(F.trigger.apply(F,["route:"+T].concat(ae)),F.trigger("route",T,ae),t.history.trigger("route",F,T,ae))}),this},execute:function(w,T,O){w&&w.apply(this,T)},navigate:function(w,T){return t.history.navigate(w,T),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var w,T=n.keys(this.routes);(w=T.pop())!=null;)this.route(w,this.routes[w])}},_routeToRegExp:function(w){return w=w.replace(Te,"\\$&").replace(Et,"(?:$1)?").replace(jt,function(T,O){return O?T:"([^/?]+)"}).replace(xe,"([^?]*?)"),new RegExp("^"+w+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(w,T){var O=w.exec(T).slice(1);return n.map(O,function(F,G){return G===O.length-1?F||null:F?decodeURIComponent(F):null})}});var se=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),typeof window<"u"&&(this.location=window.location,this.history=window.history)},ie=/^[#\/]|\s+$/g,ge=/^\/+|\/+$/g,Ue=/#.*$/;se.started=!1,n.extend(se.prototype,s,{interval:50,atRoot:function(){var w=this.location.pathname.replace(/[^\/]$/,"$&/");return w===this.root&&!this.getSearch()},matchRoot:function(){var w=this.decodeFragment(this.location.pathname),T=w.slice(0,this.root.length-1)+"/";return T===this.root},decodeFragment:function(w){return decodeURI(w.replace(/%25/g,"%2525"))},getSearch:function(){var w=this.location.href.replace(/#.*/,"").match(/\?.+/);return w?w[0]:""},getHash:function(w){var T=(w||this).location.href.match(/#(.*)$/);return T?T[1]:""},getPath:function(){var w=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return w.charAt(0)==="/"?w.slice(1):w},getFragment:function(w){return w==null&&(this._usePushState||!this._wantsHashChange?w=this.getPath():w=this.getHash()),w.replace(ie,"")},start:function(w){if(se.started)throw new Error("Backbone.history has already been started");if(se.started=!0,this.options=n.extend({root:"/"},this.options,w),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.history&&this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(ge,"/"),this._wantsHashChange&&this._wantsPushState)if(!this._hasPushState&&!this.atRoot()){var T=this.root.slice(0,-1)||"/";return this.location.replace(T+"#"+this.getPath()),!0}else this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0});if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var O=document.body,F=O.insertBefore(this.iframe,O.firstChild).contentWindow;F.document.open(),F.document.close(),F.location.hash="#"+this.fragment}var G=window.addEventListener||function(ae,Ie){return attachEvent("on"+ae,Ie)};if(this._usePushState?G("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?G("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var w=window.removeEventListener||function(T,O){return detachEvent("on"+T,O)};this._usePushState?w("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&w("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),se.started=!1},route:function(w,T){this.handlers.unshift({route:w,callback:T})},checkUrl:function(w){var T=this.getFragment();if(T===this.fragment&&this.iframe&&(T=this.getHash(this.iframe.contentWindow)),T===this.fragment)return!1;this.iframe&&this.navigate(T),this.loadUrl()},loadUrl:function(w){return this.matchRoot()?(w=this.fragment=this.getFragment(w),n.some(this.handlers,function(T){if(T.route.test(w))return T.callback(w),!0})):!1},navigate:function(w,T){if(!se.started)return!1;(!T||T===!0)&&(T={trigger:!!T}),w=this.getFragment(w||"");var O=this.root;(w===""||w.charAt(0)==="?")&&(O=O.slice(0,-1)||"/");var F=O+w;w=w.replace(Ue,"");var G=this.decodeFragment(w);if(this.fragment!==G){if(this.fragment=G,this._usePushState)this.history[T.replace?"replaceState":"pushState"]({},document.title,F);else if(this._wantsHashChange){if(this._updateHash(this.location,w,T.replace),this.iframe&&w!==this.getHash(this.iframe.contentWindow)){var ae=this.iframe.contentWindow;T.replace||(ae.document.open(),ae.document.close()),this._updateHash(ae.location,w,T.replace)}}else return this.location.assign(F);if(T.trigger)return this.loadUrl(w)}},_updateHash:function(w,T,O){if(O){var F=w.href.replace(/(javascript:|#).*$/,"");w.replace(F+"#"+T)}else w.hash="#"+T}}),t.history=new se;var ut=function(w,T){var O=this,F;return w&&n.has(w,"constructor")?F=w.constructor:F=function(){return O.apply(this,arguments)},n.extend(F,O,T),F.prototype=n.create(O.prototype,w),F.prototype.constructor=F,F.__super__=O.prototype,F};N.extend=B.extend=Se.extend=j.extend=se.extend=ut;var _e=function(){throw new Error('A "url" property or function must be specified')},mt=function(w,T){var O=T.error;T.error=function(F){O&&O.call(T.context,w,F,T),w.trigger("error",w,F,T)}};return t})});var Zn=null,Af=!1,Nv=1,oP=null,Wn=Symbol("SIGNAL");function Qe(e){let t=Zn;return Zn=e,t}function xf(){return Zn}var Ga={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ua(e){if(Af)throw new Error("");if(Zn===null)return;Zn.consumerOnSignalRead(e);let t=Zn.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Zn.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Zn.producers,n!==void 0&&n.producer===e)){Zn.producersTail=n,n.lastReadVersion=e.version;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Zn&&(!r||aP(i,Zn)))return;let o=Za(Zn),s={producer:e,consumer:Zn,nextProducer:n,prevConsumer:i,lastReadVersion:e.version,nextConsumer:void 0};Zn.producersTail=s,t!==void 0?t.nextProducer=s:Zn.producers=s,o&&uD(e,s)}function oD(){Nv++}function Ef(e){if(!(Za(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Nv)){if(!e.producerMustRecompute(e)&&!Mf(e)){Df(e);return}e.producerRecomputeValue(e),Df(e)}}function _v(e){if(e.consumers===void 0)return;let t=Af;Af=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||sP(r)}}finally{Af=t}}function Rv(){return Zn?.consumerAllowSignalWrites!==!1}function sP(e){e.dirty=!0,_v(e),e.consumerMarkedDirty?.(e)}function Df(e){e.dirty=!1,e.lastCleanEpoch=Nv}function Ha(e){return e&&sD(e),Qe(e)}function sD(e){e.producersTail=void 0,e.recomputing=!0}function Vc(e,t){Qe(t),e&&aD(e)}function aD(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(Za(e))do n=Ov(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function Mf(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(Ef(n),r!==n.version))return!0}return!1}function zc(e){if(Za(e)){let t=e.producers;for(;t!==void 0;)t=Ov(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function uD(e,t){let n=e.consumersTail,r=Za(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let i=e.producers;i!==void 0;i=i.nextProducer)uD(i.producer,i)}function Ov(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=i:t.consumersTail=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!Za(t)){let o=t.producers;for(;o!==void 0;)o=Ov(o)}return n}function Za(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Sf(e){oP?.(e)}function aP(e,t){let n=t.producersTail;if(n!==void 0){let r=t.producers;do{if(r===e)return!0;if(r===n)break;r=r.nextProducer}while(r!==void 0)}return!1}function Tf(e,t){return Object.is(e,t)}function Nf(e,t){let n=Object.create(uP);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(Ef(n),Ua(n),n.value===Bc)throw n.error;return n.value};return r[Wn]=n,Sf(n),r}var wf=Symbol("UNSET"),bf=Symbol("COMPUTING"),Bc=Symbol("ERRORED"),uP=lt(Ce({},Ga),{value:wf,dirty:!0,error:null,equal:Tf,kind:"computed",producerMustRecompute(e){return e.value===wf||e.value===bf},producerRecomputeValue(e){if(e.value===bf)throw new Error("");let t=e.value;e.value=bf;let n=Ha(e),r,i=!1;try{r=e.computation(),Qe(null),i=t!==wf&&t!==Bc&&r!==Bc&&e.equal(t,r)}catch(o){r=Bc,e.error=o}finally{Vc(e,n)}if(i){e.value=t;return}e.value=r,e.version++}});function cP(){throw new Error}var cD=cP;function lD(e){cD(e)}function Pv(e){cD=e}var lP=null;function kv(e,t){let n=Object.create(_f);n.value=e,t!==void 0&&(n.equal=t);let r=()=>dD(n);return r[Wn]=n,Sf(n),[r,s=>Wa(n,s),s=>Lv(n,s)]}function dD(e){return Ua(e),e.value}function Wa(e,t){Rv()||lD(e),e.equal(e.value,t)||(e.value=t,dP(e))}function Lv(e,t){Rv()||lD(e),Wa(e,t(e.value))}var _f=lt(Ce({},Ga),{equal:Tf,value:void 0,kind:"signal"});function dP(e){e.version++,oD(),_v(e),lP?.(e)}function Je(e){return typeof e=="function"}function Ya(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Rf=Ya(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:
17
+ ${n.map((r,i)=>`${i+1}) ${r.toString()}`).join(`
18
+ `)}`:"",this.name="UnsubscriptionError",this.errors=n});function Gc(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Rn=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Je(r))try{r()}catch(o){t=o instanceof Rf?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{fD(o)}catch(s){t=t??[],s instanceof Rf?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Rf(t)}}add(t){var n;if(t&&t!==this)if(this.closed)fD(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Gc(n,t)}remove(t){let{_finalizers:n}=this;n&&Gc(n,t),t instanceof e&&t._removeParent(this)}};Rn.EMPTY=(()=>{let e=new Rn;return e.closed=!0,e})();var Fv=Rn.EMPTY;function Of(e){return e instanceof Rn||e&&"closed"in e&&Je(e.remove)&&Je(e.add)&&Je(e.unsubscribe)}function fD(e){Je(e)?e():e.unsubscribe()}var Ii={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var $a={setTimeout(e,t,...n){let{delegate:r}=$a;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=$a;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Pf(e){$a.setTimeout(()=>{let{onUnhandledError:t}=Ii;if(t)t(e);else throw e})}function Uc(){}var hD=jv("C",void 0,void 0);function gD(e){return jv("E",void 0,e)}function pD(e){return jv("N",e,void 0)}function jv(e,t,n){return{kind:e,value:t,error:n}}var Ms=null;function Xa(e){if(Ii.useDeprecatedSynchronousErrorHandling){let t=!Ms;if(t&&(Ms={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Ms;if(Ms=null,n)throw r}}else e()}function mD(e){Ii.useDeprecatedSynchronousErrorHandling&&Ms&&(Ms.errorThrown=!0,Ms.error=e)}var Ss=class extends Rn{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Of(t)&&t.add(this)):this.destination=gP}static create(t,n,r){return new qa(t,n,r)}next(t){this.isStopped?Vv(pD(t),this):this._next(t)}error(t){this.isStopped?Vv(gD(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Vv(hD,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},fP=Function.prototype.bind;function Bv(e,t){return fP.call(e,t)}var zv=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){kf(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){kf(r)}else kf(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){kf(n)}}},qa=class extends Ss{constructor(t,n,r){super();let i;if(Je(t)||!t)i={next:t??void 0,error:n??void 0,complete:r??void 0};else{let o;this&&Ii.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&Bv(t.next,o),error:t.error&&Bv(t.error,o),complete:t.complete&&Bv(t.complete,o)}):i=t}this.destination=new zv(i)}};function kf(e){Ii.useDeprecatedSynchronousErrorHandling?mD(e):Pf(e)}function hP(e){throw e}function Vv(e,t){let{onStoppedNotification:n}=Ii;n&&$a.setTimeout(()=>n(e,t))}var gP={closed:!0,next:Uc,error:hP,complete:Uc};var Ja=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ci(e){return e}function Gv(...e){return Uv(e)}function Uv(e){return e.length===0?Ci:e.length===1?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}var Ct=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=mP(n)?n:new qa(n,r,i);return Xa(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=vD(r),new r((i,o)=>{let s=new qa({next:a=>{try{n(a)}catch(u){o(u),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Ja](){return this}pipe(...n){return Uv(n)(this)}toPromise(n){return n=vD(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function vD(e){var t;return(t=e??Ii.Promise)!==null&&t!==void 0?t:Promise}function pP(e){return e&&Je(e.next)&&Je(e.error)&&Je(e.complete)}function mP(e){return e&&e instanceof Ss||pP(e)&&Of(e)}function vP(e){return Je(e?.lift)}function Mt(e){return t=>{if(vP(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function St(e,t,n,r,i){return new Hv(e,t,n,r,i)}var Hv=class extends Ss{constructor(t,n,r,i,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(u){t.error(u)}}:super._next,this._error=i?function(a){try{i(a)}catch(u){t.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};var yD=Ya(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var vn=(()=>{class e extends Ct{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Lf(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new yD}next(n){Xa(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Xa(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Xa(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?Fv:(this.currentObservers=null,o.push(n),new Rn(()=>{this.currentObservers=null,Gc(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new Ct;return n.source=this,n}}return e.create=(t,n)=>new Lf(t,n),e})(),Lf=class extends vn{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:Fv}};var On=class extends vn{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Pn=new Ct(e=>e.complete());function ID(e){return e&&Je(e.schedule)}function CD(e){return e[e.length-1]}function Ff(e){return Je(CD(e))?e.pop():void 0}function Po(e){return ID(CD(e))?e.pop():void 0}function wD(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{l(r.next(f))}catch(d){s(d)}}function u(f){try{l(r.throw(f))}catch(d){s(d)}}function l(f){f.done?o(f.value):i(f.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function AD(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ts(e){return this instanceof Ts?(this.v=e,this):new Ts(e)}function bD(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(I){return function(C){return Promise.resolve(C).then(I,d)}}function a(I,C){r[I]&&(i[I]=function(M){return new Promise(function(E,N){o.push([I,M,E,N])>1||u(I,M)})},C&&(i[I]=C(i[I])))}function u(I,C){try{l(r[I](C))}catch(M){m(o[0][3],M)}}function l(I){I.value instanceof Ts?Promise.resolve(I.value.v).then(f,d):m(o[0][2],I)}function f(I){u("next",I)}function d(I){u("throw",I)}function m(I,C){I(C),o.shift(),o.length&&u(o[0][0],o[0][1])}}function DD(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof AD=="function"?AD(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(l){o({value:l,done:a})},s)}}var jf=e=>e&&typeof e.length=="number"&&typeof e!="function";function Bf(e){return Je(e?.then)}function Vf(e){return Je(e[Ja])}function zf(e){return Symbol.asyncIterator&&Je(e?.[Symbol.asyncIterator])}function Gf(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function yP(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Uf=yP();function Hf(e){return Je(e?.[Uf])}function Zf(e){return bD(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:i}=yield Ts(n.read());if(i)return yield Ts(void 0);yield yield Ts(r)}}finally{n.releaseLock()}})}function Wf(e){return Je(e?.getReader)}function gn(e){if(e instanceof Ct)return e;if(e!=null){if(Vf(e))return IP(e);if(jf(e))return CP(e);if(Bf(e))return AP(e);if(zf(e))return xD(e);if(Hf(e))return wP(e);if(Wf(e))return bP(e)}throw Gf(e)}function IP(e){return new Ct(t=>{let n=e[Ja]();if(Je(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function CP(e){return new Ct(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function AP(e){return new Ct(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Pf)})}function wP(e){return new Ct(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function xD(e){return new Ct(t=>{DP(e,t).catch(n=>t.error(n))})}function bP(e){return xD(Zf(e))}function DP(e,t){var n,r,i,o;return wD(this,void 0,void 0,function*(){try{for(n=DD(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function wr(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function Yf(e,t=0){return Mt((n,r)=>{n.subscribe(St(r,i=>wr(r,e,()=>r.next(i),t),()=>wr(r,e,()=>r.complete(),t),i=>wr(r,e,()=>r.error(i),t)))})}function $f(e,t=0){return Mt((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function ED(e,t){return gn(e).pipe($f(t),Yf(t))}function MD(e,t){return gn(e).pipe($f(t),Yf(t))}function SD(e,t){return new Ct(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function TD(e,t){return new Ct(n=>{let r;return wr(n,t,()=>{r=e[Uf](),wr(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>Je(r?.return)&&r.return()})}function Xf(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ct(n=>{wr(n,t,()=>{let r=e[Symbol.asyncIterator]();wr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function ND(e,t){return Xf(Zf(e),t)}function _D(e,t){if(e!=null){if(Vf(e))return ED(e,t);if(jf(e))return SD(e,t);if(Bf(e))return MD(e,t);if(zf(e))return Xf(e,t);if(Hf(e))return TD(e,t);if(Wf(e))return ND(e,t)}throw Gf(e)}function cn(e,t){return t?_D(e,t):gn(e)}function dt(...e){let t=Po(e);return cn(e,t)}function Zv(e,t){let n=Je(e)?e:()=>e,r=i=>i.error(n());return new Ct(t?i=>t.schedule(r,0,i):r)}function qf(e){return!!e&&(e instanceof Ct||Je(e.lift)&&Je(e.subscribe))}var Ns=Ya(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function en(e,t){return Mt((n,r)=>{let i=0;n.subscribe(St(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:xP}=Array;function EP(e,t){return xP(t)?e(...t):e(t)}function Jf(e){return en(t=>EP(e,t))}var{isArray:MP}=Array,{getPrototypeOf:SP,prototype:TP,keys:NP}=Object;function Qf(e){if(e.length===1){let t=e[0];if(MP(t))return{args:t,keys:null};if(_P(t)){let n=NP(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function _P(e){return e&&typeof e=="object"&&SP(e)===TP}function Kf(e,t){return e.reduce((n,r,i)=>(n[r]=t[i],n),{})}function Wv(...e){let t=Po(e),n=Ff(e),{args:r,keys:i}=Qf(e);if(r.length===0)return cn([],t);let o=new Ct(RP(r,t,i?s=>Kf(i,s):Ci));return n?o.pipe(Jf(n)):o}function RP(e,t,n=Ci){return r=>{RD(t,()=>{let{length:i}=e,o=new Array(i),s=i,a=i;for(let u=0;u<i;u++)RD(t,()=>{let l=cn(e[u],t),f=!1;l.subscribe(St(r,d=>{o[u]=d,f||(f=!0,a--),a||r.next(n(o.slice()))},()=>{--s||r.complete()}))},r)},r)}}function RD(e,t,n){e?wr(n,e,t):t()}function OD(e,t,n,r,i,o,s,a){let u=[],l=0,f=0,d=!1,m=()=>{d&&!u.length&&!l&&t.complete()},I=M=>l<r?C(M):u.push(M),C=M=>{o&&t.next(M),l++;let E=!1;gn(n(M,f++)).subscribe(St(t,N=>{i?.(N),o?I(N):t.next(N)},()=>{E=!0},void 0,()=>{if(E)try{for(l--;u.length&&l<r;){let N=u.shift();s?wr(t,s,()=>C(N)):C(N)}m()}catch(N){t.error(N)}}))};return e.subscribe(St(t,I,()=>{d=!0,m()})),()=>{a?.()}}function sr(e,t,n=1/0){return Je(t)?sr((r,i)=>en((o,s)=>t(r,o,i,s))(gn(e(r,i))),n):(typeof t=="number"&&(n=t),Mt((r,i)=>OD(r,i,e,n)))}function PD(e=1/0){return sr(Ci,e)}function kD(){return PD(1)}function Qa(...e){return kD()(cn(e,Po(e)))}function Hc(e){return new Ct(t=>{gn(e()).subscribe(t)})}function Yv(...e){let t=Ff(e),{args:n,keys:r}=Qf(e),i=new Ct(o=>{let{length:s}=n;if(!s){o.complete();return}let a=new Array(s),u=s,l=s;for(let f=0;f<s;f++){let d=!1;gn(n[f]).subscribe(St(o,m=>{d||(d=!0,l--),a[f]=m},()=>u--,void 0,()=>{(!u||!d)&&(l||o.next(r?Kf(r,a):a),o.complete())}))}});return t?i.pipe(Jf(t)):i}function co(e,t){return Mt((n,r)=>{let i=0;n.subscribe(St(r,o=>e.call(t,o,i++)&&r.next(o)))})}function Zc(e){return Mt((t,n)=>{let r=null,i=!1,o;r=t.subscribe(St(n,void 0,void 0,s=>{o=gn(e(s,Zc(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function eh(e,t){return Je(t)?sr(e,t,1):sr(e,1)}function LD(e){return Mt((t,n)=>{let r=!1;t.subscribe(St(n,i=>{r=!0,n.next(i)},()=>{r||n.next(e),n.complete()}))})}function lo(e){return e<=0?()=>Pn:Mt((t,n)=>{let r=0;t.subscribe(St(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function FD(e=OP){return Mt((t,n)=>{let r=!1;t.subscribe(St(n,i=>{r=!0,n.next(i)},()=>r?n.complete():n.error(e())))})}function OP(){return new Ns}function $v(e){return Mt((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function fo(e,t){let n=arguments.length>=2;return r=>r.pipe(e?co((i,o)=>e(i,o,r)):Ci,lo(1),n?LD(t):FD(()=>new Ns))}function th(e){return e<=0?()=>Pn:Mt((t,n)=>{let r=[];t.subscribe(St(n,i=>{r.push(i),e<r.length&&r.shift()},()=>{for(let i of r)n.next(i);n.complete()},void 0,()=>{r=null}))})}function Xv(...e){let t=Po(e);return Mt((n,r)=>{(t?Qa(e,n,t):Qa(e,n)).subscribe(r)})}function Ai(e,t){return Mt((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(St(r,u=>{i?.unsubscribe();let l=0,f=o++;gn(e(u,f)).subscribe(i=St(r,d=>r.next(t?t(u,d,f,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function Wc(e){return Mt((t,n)=>{gn(e).subscribe(St(n,()=>n.complete(),Uc)),!n.closed&&t.subscribe(n)})}function qr(e,t,n){let r=Je(e)||t||n?{next:e,error:t,complete:n}:e;return r?Mt((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(St(o,u=>{var l;(l=r.next)===null||l===void 0||l.call(r,u),o.next(u)},()=>{var u;a=!1,(u=r.complete)===null||u===void 0||u.call(r),o.complete()},u=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,u),o.error(u)},()=>{var u,l;a&&((u=r.unsubscribe)===null||u===void 0||u.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):Ci}var qv;function nh(){return qv}function Ui(e){let t=qv;return qv=e,t}var jD=Symbol("NotFound");function Ka(e){return e===jD||e?.name==="\u0275NotFound"}function BD(e){let t=Qe(null);try{return e()}finally{Qe(t)}}var dy="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Me=class extends Error{code;constructor(t,n){super(tu(t,n)),this.code=t}};function LP(e){return`NG0${Math.abs(e)}`}function tu(e,t){return`${LP(e)}${t?": "+t:""}`}function Tt(e){for(let t in e)if(e[t]===Tt)return t;throw Error("")}function HD(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Qc(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(Qc).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
19
+ `);return r>=0?n.slice(0,r):n}function fy(e,t){return e?t?`${e} ${t}`:e:t||""}var FP=Tt({__forward_ref__:Tt});function Zi(e){return e.__forward_ref__=Zi,e}function kn(e){return hy(e)?e():e}function hy(e){return typeof e=="function"&&e.hasOwnProperty(FP)&&e.__forward_ref__===Zi}function ke(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function go(e){return{providers:e.providers||[],imports:e.imports||[]}}function Kc(e){return jP(e,ah)}function gy(e){return Kc(e)!==null}function jP(e,t){return e.hasOwnProperty(t)&&e[t]||null}function BP(e){let t=e?.[ah]??null;return t||null}function Qv(e){return e&&e.hasOwnProperty(ih)?e[ih]:null}var ah=Tt({\u0275prov:Tt}),ih=Tt({\u0275inj:Tt}),Oe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=ke({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function py(e){return e&&!!e.\u0275providers}var my=Tt({\u0275cmp:Tt}),vy=Tt({\u0275dir:Tt}),yy=Tt({\u0275pipe:Tt}),Iy=Tt({\u0275mod:Tt}),$c=Tt({\u0275fac:Tt}),Fs=Tt({__NG_ELEMENT_ID__:Tt}),VD=Tt({__NG_ENV_ID__:Tt});function Cy(e){return uh(e,"@NgModule"),e[Iy]||null}function Lo(e){return uh(e,"@Component"),e[my]||null}function Ay(e){return uh(e,"@Directive"),e[vy]||null}function ZD(e){return uh(e,"@Pipe"),e[yy]||null}function uh(e,t){if(e==null)throw new Me(-919,!1)}function WD(e){return typeof e=="string"?e:e==null?"":String(e)}var YD=Tt({ngErrorCode:Tt}),VP=Tt({ngErrorMessage:Tt}),zP=Tt({ngTokenPath:Tt});function wy(e,t){return $D("",-200,t)}function ch(e,t){throw new Me(-201,!1)}function $D(e,t,n){let r=new Me(t,e);return r[YD]=t,r[VP]=e,n&&(r[zP]=n),r}function GP(e){return e[YD]}var Kv;function XD(){return Kv}function Or(e){let t=Kv;return Kv=e,t}function by(e,t,n){let r=Kc(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;ch(e,"")}var UP={},_s=UP,HP="__NG_DI_FLAG__",ey=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Rs(n)||0;try{return this.injector.get(t,r&8?null:_s,r)}catch(i){if(Ka(i))return i;throw i}}};function ZP(e,t=0){let n=nh();if(n===void 0)throw new Me(-203,!1);if(n===null)return by(e,void 0,t);{let r=WP(t),i=n.retrieve(e,r);if(Ka(i)){if(r.optional)return null;throw i}return i}}function tt(e,t=0){return(XD()||ZP)(kn(e),t)}function pe(e,t){return tt(e,Rs(t))}function Rs(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function WP(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ty(e){let t=[];for(let n=0;n<e.length;n++){let r=kn(e[n]);if(Array.isArray(r)){if(r.length===0)throw new Me(900,!1);let i,o=0;for(let s=0;s<r.length;s++){let a=r[s],u=YP(a);typeof u=="number"?u===-1?i=a.token:o|=u:i=a}t.push(tt(i,o))}else t.push(tt(r))}return t}function YP(e){return e[HP]}function Os(e,t){let n=e.hasOwnProperty($c);return n?e[$c]:null}function qD(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function JD(e){return e.flat(Number.POSITIVE_INFINITY)}function lh(e,t){e.forEach(n=>Array.isArray(n)?lh(n,t):t(n))}function Dy(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function el(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function QD(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function KD(e,t,n){let r=nu(e,t);return r>=0?e[r|1]=n:(r=~r,QD(e,r,t,n)),r}function dh(e,t){let n=nu(e,t);if(n>=0)return e[n|1]}function nu(e,t){return $P(e,t,1)}function $P(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}var Fo={},Pr=[],js=new Oe(""),xy=new Oe("",-1),Ey=new Oe(""),Xc=class{get(t,n=_s){if(n===_s){let i=$D("",-201);throw i.name="\u0275NotFound",i}return n}};function ru(e){return{\u0275providers:e}}function ex(e){return ru([{provide:js,multi:!0,useValue:e}])}function tx(...e){return{\u0275providers:My(!0,e),\u0275fromNgModule:!0}}function My(e,...t){let n=[],r=new Set,i,o=s=>{n.push(s)};return lh(t,s=>{let a=s;oh(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&nx(i,o),n}function nx(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Sy(i,o=>{t(o,r)})}}function oh(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,o=Qv(e),s=!o&&Lo(e);if(!o&&!s){let u=e.ngModule;if(o=Qv(u),o)i=u;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of u)oh(l,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let l;lh(o.imports,f=>{oh(f,t,n,r)&&(l||=[],l.push(f))}),l!==void 0&&nx(l,t)}if(!a){let l=Os(i)||(()=>new i);t({provide:i,useFactory:l,deps:Pr},i),t({provide:Ey,useValue:i,multi:!0},i),t({provide:js,useValue:()=>tt(i),multi:!0},i)}let u=o.providers;if(u!=null&&!a){let l=e;Sy(u,f=>{t(f,l)})}}else return!1;return i!==e&&e.providers!==void 0}function Sy(e,t){for(let n of e)py(n)&&(n=n.\u0275providers),Array.isArray(n)?Sy(n,t):t(n)}var XP=Tt({provide:String,useValue:Tt});function rx(e){return e!==null&&typeof e=="object"&&XP in e}function qP(e){return!!(e&&e.useExisting)}function JP(e){return!!(e&&e.useFactory)}function Ps(e){return typeof e=="function"}function ix(e){return!!e.useClass}var tl=new Oe(""),rh={},zD={},Jv;function nl(){return Jv===void 0&&(Jv=new Xc),Jv}var In=class{},ks=class extends In{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,ry(t,s=>this.processProvider(s)),this.records.set(xy,eu(void 0,this)),i.has("environment")&&this.records.set(In,eu(void 0,this));let o=this.records.get(tl);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Ey,Pr,{self:!0}))}retrieve(t,n){let r=Rs(n)||0;try{return this.get(t,_s,r)}catch(i){if(Ka(i))return i;throw i}}destroy(){Yc(this),this._destroyed=!0;let t=Qe(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Qe(t)}}onDestroy(t){return Yc(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Yc(this);let n=Ui(this),r=Or(void 0),i;try{return t()}finally{Ui(n),Or(r)}}get(t,n=_s,r){if(Yc(this),t.hasOwnProperty(VD))return t[VD](this);let i=Rs(r),o,s=Ui(this),a=Or(void 0);try{if(!(i&4)){let l=this.records.get(t);if(l===void 0){let f=nk(t)&&Kc(t);f&&this.injectableDefInScope(f)?l=eu(ny(t),rh):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,i)}let u=i&2?nl():this.parent;return n=i&8&&n===_s?null:n,u.get(t,n)}catch(u){let l=GP(u);throw l===-200||l===-201?new Me(l,null):u}finally{Or(a),Ui(s)}}resolveInjectorInitializers(){let t=Qe(null),n=Ui(this),r=Or(void 0),i;try{let o=this.get(js,Pr,{self:!0});for(let s of o)s()}finally{Ui(n),Or(r),Qe(t)}}toString(){return"R3Injector[...]"}processProvider(t){t=kn(t);let n=Ps(t)?t:kn(t&&t.provide),r=KP(t);if(!Ps(t)&&t.multi===!0){let i=this.records.get(n);i||(i=eu(void 0,rh,!0),i.factory=()=>ty(i.multi),this.records.set(n,i)),n=t,i.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let i=Qe(null);try{if(n.value===zD)throw wy("");return n.value===rh&&(n.value=zD,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&tk(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{Qe(i)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=kn(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function ny(e){let t=Kc(e),n=t!==null?t.factory:Os(e);if(n!==null)return n;if(e instanceof Oe)throw new Me(-204,!1);if(e instanceof Function)return QP(e);throw new Me(-204,!1)}function QP(e){if(e.length>0)throw new Me(-204,!1);let n=BP(e);return n!==null?()=>n.factory(e):()=>new e}function KP(e){if(rx(e))return eu(void 0,e.useValue);{let t=Ty(e);return eu(t,rh)}}function Ty(e,t,n){let r;if(Ps(e)){let i=kn(e);return Os(i)||ny(i)}else if(rx(e))r=()=>kn(e.useValue);else if(JP(e))r=()=>e.useFactory(...ty(e.deps||[]));else if(qP(e))r=(i,o)=>tt(kn(e.useExisting),o!==void 0&&o&8?8:void 0);else{let i=kn(e&&(e.useClass||e.provide));if(ek(e))r=()=>new i(...ty(e.deps));else return Os(i)||ny(i)}return r}function Yc(e){if(e.destroyed)throw new Me(-205,!1)}function eu(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function ek(e){return!!e.deps}function tk(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function nk(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function ry(e,t){for(let n of e)Array.isArray(n)?ry(n,t):n&&py(n)?ry(n.\u0275providers,t):t(n)}function $n(e,t){let n;e instanceof ks?(Yc(e),n=e):n=new ey(e);let r,i=Ui(n),o=Or(void 0);try{return t()}finally{Ui(i),Or(o)}}function ox(){return XD()!==void 0||nh()!=null}var wi=0,We=1,Ze=2,Dn=3,Jr=4,Qr=5,rl=6,iu=7,Xn=8,jo=9,Wi=10,dn=11,ou=12,Ny=13,Bs=14,Kr=15,Bo=16,Vs=17,Yi=18,Vo=19,_y=20,ho=21,fh=22,il=23,Lr=24,zs=25,su=26,br=27,sx=1;var zo=7,ol=8,Gs=9,ar=10;function po(e){return Array.isArray(e)&&typeof e[sx]=="object"}function bi(e){return Array.isArray(e)&&e[sx]===!0}function Ry(e){return(e.flags&4)!==0}function mo(e){return e.componentOffset>-1}function sl(e){return(e.flags&1)===1}function $i(e){return!!e.template}function au(e){return(e[Ze]&512)!==0}function Us(e){return(e[Ze]&256)===256}var ax="svg",ux="math";function ei(e){for(;Array.isArray(e);)e=e[wi];return e}function Oy(e,t){return ei(t[e])}function Xi(e,t){return ei(t[e.index])}function Py(e,t){return e.data[t]}function cx(e,t){return e[t]}function ti(e,t){let n=t[e];return po(n)?n:n[wi]}function lx(e){return(e[Ze]&4)===4}function hh(e){return(e[Ze]&128)===128}function dx(e){return bi(e[Dn])}function al(e,t){return t==null?null:e[t]}function ky(e){e[Vs]=0}function Ly(e){e[Ze]&1024||(e[Ze]|=1024,hh(e)&&uu(e))}function fx(e,t){for(;e>0;)t=t[Bs],e--;return t}function ul(e){return!!(e[Ze]&9216||e[Lr]?.dirty)}function gh(e){e[Wi].changeDetectionScheduler?.notify(8),e[Ze]&64&&(e[Ze]|=1024),ul(e)&&uu(e)}function uu(e){e[Wi].changeDetectionScheduler?.notify(0);let t=ko(e);for(;t!==null&&!(t[Ze]&8192||(t[Ze]|=8192,!hh(t)));)t=ko(t)}function Fy(e,t){if(Us(e))throw new Me(911,!1);e[ho]===null&&(e[ho]=[]),e[ho].push(t)}function hx(e,t){if(e[ho]===null)return;let n=e[ho].indexOf(t);n!==-1&&e[ho].splice(n,1)}function ko(e){let t=e[Dn];return bi(t)?t[Dn]:t}function jy(e){return e[iu]??=[]}function By(e){return e.cleanup??=[]}function gx(e,t,n,r){let i=jy(t);i.push(n),e.firstCreatePass&&By(e).push(r,i.length-1)}var rt={lFrame:_x(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var iy=!1;function px(){return rt.lFrame.elementDepthCount}function mx(){rt.lFrame.elementDepthCount++}function vx(){rt.lFrame.elementDepthCount--}function Vy(){return rt.bindingsEnabled}function yx(){return rt.skipHydrationRootTNode!==null}function Ix(e){return rt.skipHydrationRootTNode===e}function Cx(){rt.skipHydrationRootTNode=null}function Vt(){return rt.lFrame.lView}function Dr(){return rt.lFrame.tView}function tn(e){return rt.lFrame.contextLView=e,e[Xn]}function nn(e){return rt.lFrame.contextLView=null,e}function xr(){let e=zy();for(;e!==null&&e.type===64;)e=e.parent;return e}function zy(){return rt.lFrame.currentTNode}function Ax(){let e=rt.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function cu(e,t){let n=rt.lFrame;n.currentTNode=e,n.isParent=t}function Gy(){return rt.lFrame.isParent}function wx(){rt.lFrame.isParent=!1}function bx(){return rt.lFrame.contextLView}function Uy(){return iy}function Hy(e){let t=iy;return iy=e,t}function Dx(e){return rt.lFrame.bindingIndex=e}function ph(){return rt.lFrame.bindingIndex++}function xx(e){let t=rt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Ex(){return rt.lFrame.inI18n}function Mx(e,t){let n=rt.lFrame;n.bindingIndex=n.bindingRootIndex=e,mh(t)}function Sx(){return rt.lFrame.currentDirectiveIndex}function mh(e){rt.lFrame.currentDirectiveIndex=e}function Tx(e){let t=rt.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Zy(){return rt.lFrame.currentQueryIndex}function vh(e){rt.lFrame.currentQueryIndex=e}function rk(e){let t=e[We];return t.type===2?t.declTNode:t.type===1?e[Qr]:null}function Wy(e,t,n){if(n&4){let i=t,o=e;for(;i=i.parent,i===null&&!(n&1);)if(i=rk(o),i===null||(o=o[Bs],i.type&10))break;if(i===null)return!1;t=i,e=o}let r=rt.lFrame=Nx();return r.currentTNode=t,r.lView=e,!0}function yh(e){let t=Nx(),n=e[We];rt.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Nx(){let e=rt.lFrame,t=e===null?null:e.child;return t===null?_x(e):t}function _x(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Rx(){let e=rt.lFrame;return rt.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Yy=Rx;function Ih(){let e=Rx();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Ox(e){return(rt.lFrame.contextLView=fx(e,rt.lFrame.contextLView))[Xn]}function Hs(){return rt.lFrame.selectedIndex}function Go(e){rt.lFrame.selectedIndex=e}function $y(){let e=rt.lFrame;return Py(e.tView,e.selectedIndex)}function Xy(){return rt.lFrame.currentNamespace}var Px=!0;function Ch(){return Px}function Ah(e){Px=e}function oy(e,t=null,n=null,r){let i=qy(e,t,n,r);return i.resolveInjectorInitializers(),i}function qy(e,t=null,n=null,r,i=new Set){let o=[n||Pr,tx(e)],s;return new ks(o,t||nl(),s||null,i)}var kr=class e{static THROW_IF_NOT_FOUND=_s;static NULL=new Xc;static create(t,n){if(Array.isArray(t))return oy({name:""},n,t,"");{let r=t.name??"";return oy({name:r},t.parent,t.providers,r)}}static \u0275prov=ke({token:e,providedIn:"any",factory:()=>tt(xy)});static __NG_ELEMENT_ID__=-1},Cn=new Oe(""),Di=(()=>{class e{static __NG_ELEMENT_ID__=ik;static __NG_ENV_ID__=n=>n}return e})(),sy=class extends Di{_lView;constructor(t){super(),this._lView=t}get destroyed(){return Us(this._lView)}onDestroy(t){let n=this._lView;return Fy(n,t),()=>hx(n,t)}};function ik(){return new sy(Vt())}var kx=!1,Lx=new Oe(""),Uo=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new On(!1);debugTaskTracker=pe(Lx,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Ct(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=ke({token:e,providedIn:"root",factory:()=>new e})}return e})(),ay=class extends vn{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,ox()&&(this.destroyRef=pe(Di,{optional:!0})??void 0,this.pendingTasks=pe(Uo,{optional:!0})??void 0)}emit(t){let n=Qe(null);try{super.next(t)}finally{Qe(n)}}subscribe(t,n,r){let i=t,o=n||(()=>null),s=r;if(t&&typeof t=="object"){let u=t;i=u.next?.bind(u),o=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:i,error:o,complete:s});return t instanceof Rn&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},yn=ay;function sh(...e){}function Jy(e){let t,n;function r(){e=sh;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Fx(e){return queueMicrotask(()=>e()),()=>{e=sh}}var Qy="isAngularZone",qc=Qy+"_ID",ok=0,Yn=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yn(!1);onMicrotaskEmpty=new yn(!1);onStable=new yn(!1);onError=new yn(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=kx}=t;if(typeof Zone>"u")throw new Me(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,uk(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Qy)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new Me(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new Me(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,sk,sh,sh);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},sk={};function Ky(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function ak(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Jy(()=>{e.callbackScheduled=!1,uy(e),e.isCheckStableRunning=!0,Ky(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),uy(e)}function uk(e){let t=()=>{ak(e)},n=ok++;e._inner=e._inner.fork({name:"angular",properties:{[Qy]:!0,[qc]:n,[qc+n]:!0},onInvokeTask:(r,i,o,s,a,u)=>{if(ck(u))return r.invokeTask(o,s,a,u);try{return GD(e),r.invokeTask(o,s,a,u)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),UD(e)}},onInvoke:(r,i,o,s,a,u,l)=>{try{return GD(e),r.invoke(o,s,a,u,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!lk(u)&&t(),UD(e)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,uy(e),Ky(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function uy(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function GD(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function UD(e){e._nesting--,Ky(e)}var Jc=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yn;onMicrotaskEmpty=new yn;onStable=new yn;onError=new yn;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,i){return t.apply(n,r)}};function ck(e){return jx(e,"__ignore_ng_zone__")}function lk(e){return jx(e,"__scheduler_tick__")}function jx(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Hi=class{_console=console;handleError(t){this._console.error("ERROR",t)}},xi=new Oe("",{factory:()=>{let e=pe(Yn),t=pe(In),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Hi),n.handleError(r))})}}}),Bx={provide:js,useValue:()=>{let e=pe(Hi,{optional:!0})},multi:!0},dk=new Oe("",{factory:()=>{let e=pe(Cn).defaultView;if(!e)return;let t=pe(xi),n=o=>{t(o.reason),o.preventDefault()},r=o=>{o.error?t(o.error):t(new Error(o.message,{cause:o})),o.preventDefault()},i=()=>{e.addEventListener("unhandledrejection",n),e.addEventListener("error",r)};typeof Zone<"u"?Zone.root.run(i):i(),pe(Di).onDestroy(()=>{e.removeEventListener("error",r),e.removeEventListener("unhandledrejection",n)})}});function eI(){return ru([ex(()=>{pe(dk)})])}function ni(e,t){let[n,r,i]=kv(e,t?.equal),o=n,s=o[Wn];return o.set=r,o.update=i,o.asReadonly=Vx.bind(o),o}function Vx(){let e=this[Wn];if(e.readonlyFn===void 0){let t=()=>this();t[Wn]=e,e.readonlyFn=t}return e.readonlyFn}var wh=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=fk}return e})();function fk(){return new wh(Vt(),xr())}var Ls=class{},cl=new Oe("",{factory:()=>!0});var tI=new Oe("");var nI=(()=>{class e{static \u0275prov=ke({token:e,providedIn:"root",factory:()=>new cy})}return e})(),cy=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[n,r]of this.queues)n===null?t||=this.flushQueue(r):t||=n.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let n=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,n=!0,r.run());return n}},ly=class{[Wn];constructor(t){this[Wn]=t}destroy(){this[Wn].destroy()}};function yl(e){return{toString:e}.toString()}function bk(e){return typeof e=="function"}function IE(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var Sh=class{previousValue;currentValue;firstChange;constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}},mu=(()=>{let e=()=>CE;return e.ngInherit=!0,e})();function CE(e){return e.type.prototype.ngOnChanges&&(e.setInput=xk),Dk}function Dk(){let e=wE(this),t=e?.current;if(t){let n=e.previous;if(n===Fo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function xk(e,t,n,r,i){let o=this.declaredInputs[r],s=wE(e)||Ek(e,{previous:Fo,current:null}),a=s.current||(s.current={}),u=s.previous,l=u[o];a[o]=new Sh(l&&l.currentValue,n,u===Fo),IE(e,t,i,n)}var AE="__ngSimpleChanges__";function wE(e){return e[AE]||null}function Ek(e,t){return e[AE]=t}var zx=[];var Nt=function(e,t=null,n){for(let r=0;r<zx.length;r++){let i=zx[r];i(e,t,n)}},At=(function(e){return e[e.TemplateCreateStart=0]="TemplateCreateStart",e[e.TemplateCreateEnd=1]="TemplateCreateEnd",e[e.TemplateUpdateStart=2]="TemplateUpdateStart",e[e.TemplateUpdateEnd=3]="TemplateUpdateEnd",e[e.LifecycleHookStart=4]="LifecycleHookStart",e[e.LifecycleHookEnd=5]="LifecycleHookEnd",e[e.OutputStart=6]="OutputStart",e[e.OutputEnd=7]="OutputEnd",e[e.BootstrapApplicationStart=8]="BootstrapApplicationStart",e[e.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",e[e.BootstrapComponentStart=10]="BootstrapComponentStart",e[e.BootstrapComponentEnd=11]="BootstrapComponentEnd",e[e.ChangeDetectionStart=12]="ChangeDetectionStart",e[e.ChangeDetectionEnd=13]="ChangeDetectionEnd",e[e.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",e[e.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",e[e.AfterRenderHooksStart=16]="AfterRenderHooksStart",e[e.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",e[e.ComponentStart=18]="ComponentStart",e[e.ComponentEnd=19]="ComponentEnd",e[e.DeferBlockStateStart=20]="DeferBlockStateStart",e[e.DeferBlockStateEnd=21]="DeferBlockStateEnd",e[e.DynamicComponentStart=22]="DynamicComponentStart",e[e.DynamicComponentEnd=23]="DynamicComponentEnd",e[e.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",e[e.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",e})(At||{});function Mk(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let s=CE(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}function bE(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let o=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:u,ngAfterViewChecked:l,ngOnDestroy:f}=o;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),u&&(e.viewHooks??=[]).push(-n,u),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),f!=null&&(e.destroyHooks??=[]).push(n,f)}}function Dh(e,t,n){DE(e,t,3,n)}function xh(e,t,n,r){(e[Ze]&3)===n&&DE(e,t,n,r)}function rI(e,t){let n=e[Ze];(n&3)===t&&(n&=16383,n+=1,e[Ze]=n)}function DE(e,t,n,r){let i=r!==void 0?e[Vs]&65535:0,o=r??-1,s=t.length-1,a=0;for(let u=i;u<s;u++)if(typeof t[u+1]=="number"){if(a=t[u],r!=null&&a>=r)break}else t[u]<0&&(e[Vs]+=65536),(a<o||o==-1)&&(Sk(e,n,t,u),e[Vs]=(e[Vs]&4294901760)+u+2),u++}function Gx(e,t){Nt(At.LifecycleHookStart,e,t);let n=Qe(null);try{t.call(e)}finally{Qe(n),Nt(At.LifecycleHookEnd,e,t)}}function Sk(e,t,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=e[s];i?e[Ze]>>14<e[Vs]>>16&&(e[Ze]&3)===t&&(e[Ze]+=16384,Gx(a,o)):Gx(a,o)}var du=-1,Ws=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r,i){this.factory=t,this.name=i,this.canSeeViewProviders=n,this.injectImpl=r}};function Tk(e){return(e.flags&8)!==0}function Nk(e){return(e.flags&16)!==0}function _k(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{let o=i,s=n[++r];Ok(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function Rk(e){return e===3||e===4||e===6}function Ok(e){return e.charCodeAt(0)===64}function hl(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Ux(e,n,i,null,t[++r]):Ux(e,n,i,null,null))}}return e}function Ux(e,t,n,r,i){let o=0,s=e.length;if(t===-1)s=-1;else for(;o<e.length;){let a=e[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<e.length;){let a=e[o];if(typeof a=="number")break;if(a===n){i!==null&&(e[o+1]=i);return}o++,i!==null&&o++}s!==-1&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),i!==null&&e.splice(o++,0,i)}function xE(e){return e!==du}function Th(e){return e&32767}function Pk(e){return e>>16}function Nh(e,t){let n=Pk(e),r=t;for(;n>0;)r=r[Bs],n--;return r}var hI=!0;function Hx(e){let t=hI;return hI=e,t}var kk=256,EE=kk-1,ME=5,Lk=0,qi={};function Fk(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fs)&&(r=n[Fs]),r==null&&(r=n[Fs]=Lk++);let i=r&EE,o=1<<i;t.data[e+(i>>ME)]|=o}function _h(e,t){let n=SE(e,t);if(n!==-1)return n;let r=t[We];r.firstCreatePass&&(e.injectorIndex=t.length,iI(r.data,e),iI(t,null),iI(r.blueprint,null));let i=FI(e,t),o=e.injectorIndex;if(xE(i)){let s=Th(i),a=Nh(i,t),u=a[We].data;for(let l=0;l<8;l++)t[o+l]=a[s+l]|u[s+l]}return t[o+8]=i,o}function iI(e,t){e.push(0,0,0,0,0,0,0,0,t)}function SE(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function FI(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=OE(i),r===null)return du;if(n++,i=i[Bs],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return du}function gI(e,t,n){Fk(e,t,n)}function TE(e,t,n){if(n&8||e!==void 0)return e;ch(t,"NodeInjector")}function NE(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let i=e[jo],o=Or(void 0);try{return i?i.get(t,r,n&8):by(t,r,n&8)}finally{Or(o)}}return TE(r,t,n)}function _E(e,t,n,r=0,i){if(e!==null){if(t[Ze]&2048&&!(r&2)){let s=zk(e,t,n,r,qi);if(s!==qi)return s}let o=RE(e,t,n,r,qi);if(o!==qi)return o}return NE(t,n,r,i)}function RE(e,t,n,r,i){let o=Bk(n);if(typeof o=="function"){if(!Wy(t,e,r))return r&1?TE(i,n,r):NE(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&8))ch(n);else return s}finally{Yy()}}else if(typeof o=="number"){let s=null,a=SE(e,t),u=du,l=r&1?t[Kr][Qr]:null;for((a===-1||r&4)&&(u=a===-1?FI(e,t):t[a+8],u===du||!Wx(r,!1)?a=-1:(s=t[We],a=Th(u),t=Nh(u,t)));a!==-1;){let f=t[We];if(Zx(o,a,f.data)){let d=jk(a,t,n,s,r,l);if(d!==qi)return d}u=t[a+8],u!==du&&Wx(r,t[We].data[a+8]===l)&&Zx(o,a,t)?(s=f,a=Th(u),t=Nh(u,t)):a=-1}}return i}function jk(e,t,n,r,i,o){let s=t[We],a=s.data[e+8],u=r==null?mo(a)&&hI:r!=s&&(a.type&3)!==0,l=i&1&&o===a,f=Eh(a,s,n,u,l);return f!==null?gl(t,s,f,a,i):qi}function Eh(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,u=e.directiveStart,l=e.directiveEnd,f=o>>20,d=r?a:a+f,m=i?a+f:l;for(let I=d;I<m;I++){let C=s[I];if(I<u&&n===C||I>=u&&C.type===n)return I}if(i){let I=s[u];if(I&&$i(I)&&I.type===n)return u}return null}function gl(e,t,n,r,i){let o=e[n],s=t.data;if(o instanceof Ws){let a=o;if(a.resolving)throw wy("");let u=Hx(a.canSeeViewProviders);a.resolving=!0;let l=s[n].type||s[n],f,d=a.injectImpl?Or(a.injectImpl):null,m=Wy(e,r,0);try{o=e[n]=a.factory(void 0,i,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&Mk(n,s[n],t)}finally{d!==null&&Or(d),Hx(u),a.resolving=!1,Yy()}}return o}function Bk(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fs)?e[Fs]:void 0;return typeof t=="number"?t>=0?t&EE:Vk:t}function Zx(e,t,n){let r=1<<e;return!!(n[t+(e>>ME)]&r)}function Wx(e,t){return!(e&2)&&!(e&1&&t)}var Zs=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return _E(this._tNode,this._lView,t,Rs(r),n)}};function Vk(){return new Zs(xr(),Vt())}function Qi(e){return yl(()=>{let t=e.prototype.constructor,n=t[$c]||pI(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[$c]||pI(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function pI(e){return hy(e)?()=>{let t=pI(kn(e));return t&&t()}:Os(e)}function zk(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[Ze]&2048&&!au(s);){let a=RE(o,s,n,r|2,qi);if(a!==qi)return a;let u=o.parent;if(!u){let l=s[_y];if(l){let f=l.get(n,qi,r&-5);if(f!==qi)return f}u=OE(s),s=s[Bs]}o=u}return i}function OE(e){let t=e[We],n=t.type;return n===2?t.declTNode:n===1?e[Qr]:null}function Gk(){return vu(xr(),Vt())}function vu(e,t){return new Si(Xi(e,t))}var Si=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=Gk}return e})();function Uk(e){return e instanceof Si?e.nativeElement:e}function Hk(){return this._results[Symbol.iterator]()}var Rh=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new vn}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=JD(t);(this._changesDetected=!qD(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Hk};function PE(e){return(e.flags&128)===128}var jI=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(jI||{}),kE=new Map,Zk=0;function Wk(){return Zk++}function Yk(e){kE.set(e[Vo],e)}function mI(e){kE.delete(e[Vo])}var Yx="__ngContext__";function fu(e,t){po(t)?(e[Yx]=t[Vo],Yk(t)):e[Yx]=t}function LE(e){return jE(e[ou])}function FE(e){return jE(e[Jr])}function jE(e){for(;e!==null&&!bi(e);)e=e[Jr];return e}var $k;function BI(e){$k=e}var zh=new Oe("",{factory:()=>Xk}),Xk="ng";var Gh=new Oe(""),Il=new Oe("",{providedIn:"platform",factory:()=>"unknown"});var Uh=new Oe("",{factory:()=>pe(Cn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var BE=!1,VE=new Oe("",{factory:()=>BE});var $x=new WeakMap;function qk(e,t){if(e==null||typeof e!="object")return;let n=$x.get(e);n||(n=new WeakSet,$x.set(e,n)),n.add(t)}var Jk=(e,t,n,r)=>{};function Qk(e,t,n,r){Jk(e,t,n,r)}function VI(e){return(e.flags&32)===32}var Kk=()=>null;function zE(e,t,n=!1){return Kk(e,t,n)}function GE(e,t){let n=e.contentQueries;if(n!==null){let r=Qe(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=e.data[s];vh(o),a.contentQueries(2,t[s],s)}}}finally{Qe(r)}}}function vI(e,t,n){vh(0);let r=Qe(null);try{t(e,n)}finally{Qe(r)}}function UE(e,t,n){if(Ry(t)){let r=Qe(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;s<o;s++){let a=e.data[s];if(a.contentQueries){let u=n[s];a.contentQueries(1,u,s)}}}finally{Qe(r)}}}var Mi=(function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e[e.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",e})(Mi||{});var yI=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${dy})`}};function HE(e){return e instanceof yI?e.changingThisBreaksApplicationSecurity:e}function eL(e,t){return e.createText(t)}function tL(e,t,n){e.setValue(t,n)}function ZE(e,t,n){return e.createElement(t,n)}function Oh(e,t,n,r,i){e.insertBefore(t,n,r,i)}function WE(e,t,n){e.appendChild(t,n)}function Xx(e,t,n,r,i){r!==null?Oh(e,t,n,r,i):WE(e,t,n)}function nL(e,t,n,r){e.removeChild(null,t,n,r)}function rL(e,t,n){e.setAttribute(t,"style",n)}function iL(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function YE(e,t,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&_k(e,t,r),i!==null&&iL(e,t,i),o!==null&&rL(e,t,o)}function $E(e){return e instanceof Function?e():e}function oL(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}var XE="ng-template";function sL(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&oL(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(zI(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&typeof(o=t[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function zI(e){return e.type===4&&e.value!==XE}function aL(e,t,n){let r=e.type===4&&!n?XE:e.value;return t===r}function uL(e,t,n){let r=4,i=e.attrs,o=i!==null?dL(i):0,s=!1;for(let a=0;a<t.length;a++){let u=t[a];if(typeof u=="number"){if(!s&&!Ei(r)&&!Ei(u))return!1;if(s&&Ei(u))continue;s=!1,r=u|r&1;continue}if(!s)if(r&4){if(r=2|r&1,u!==""&&!aL(e,u,n)||u===""&&t.length===1){if(Ei(r))return!1;s=!0}}else if(r&8){if(i===null||!sL(e,i,u,n)){if(Ei(r))return!1;s=!0}}else{let l=t[++a],f=cL(u,i,zI(e),n);if(f===-1){if(Ei(r))return!1;s=!0;continue}if(l!==""){let d;if(f>o?d="":d=i[f+1].toLowerCase(),r&2&&l!==d){if(Ei(r))return!1;s=!0}}}}return Ei(r)||s}function Ei(e){return(e&1)===0}function cL(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){let s=t[i];if(s===e)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return fL(t,e)}function lL(e,t,n=!1){for(let r=0;r<t.length;r++)if(uL(e,t[r],n))return!0;return!1}function dL(e){for(let t=0;t<e.length;t++){let n=e[t];if(Rk(n))return t}return e.length}function fL(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function qx(e,t){return e?":not("+t.trim()+")":t}function hL(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!Ei(s)&&(t+=qx(o,i),i=""),r=s,o=o||!Ei(r);n++}return i!==""&&(t+=qx(o,i)),t}function gL(e){return e.map(hL).join(",")}function pL(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let o=e[r];if(typeof o=="string")i===2?o!==""&&t.push(o,e[++r]):i===8&&n.push(o);else{if(!Ei(i))break;i=o}r++}return n.length&&t.push(1,...n),t}var Wo={};function GI(e,t,n,r,i,o,s,a,u,l,f){let d=br+r,m=d+i,I=mL(d,m),C=typeof l=="function"?l():l;return I[We]={type:e,blueprint:I,template:n,queries:null,viewQuery:a,declTNode:t,data:I.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:m,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:u,consts:C,incompleteFirstPass:!1,ssrId:f}}function mL(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Wo);return n}function vL(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=GI(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function UI(e,t,n,r,i,o,s,a,u,l,f){let d=t.blueprint.slice();return d[wi]=i,d[Ze]=r|4|128|8|64|1024,(l!==null||e&&e[Ze]&2048)&&(d[Ze]|=2048),ky(d),d[Dn]=d[Bs]=e,d[Xn]=n,d[Wi]=s||e&&e[Wi],d[dn]=a||e&&e[dn],d[jo]=u||e&&e[jo]||null,d[Qr]=o,d[Vo]=Wk(),d[rl]=f,d[_y]=l,d[Kr]=t.type==2?e[Kr]:d,d}function yL(e,t,n){let r=Xi(t,e),i=vL(n),o=e[Wi].rendererFactory,s=HI(e,UI(e,i,null,qE(n),r,t,null,o.createRenderer(r,n),null,null,null));return e[t.index]=s}function qE(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function JE(e,t,n,r){if(n===0)return-1;let i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function HI(e,t){return e[ou]?e[Ny][Jr]=t:e[ou]=t,e[Ny]=t,t}function An(e=1){QE(Dr(),Vt(),Hs()+e,!1)}function QE(e,t,n,r){if(!r)if((t[Ze]&3)===3){let o=e.preOrderCheckHooks;o!==null&&Dh(t,o,n)}else{let o=e.preOrderHooks;o!==null&&xh(t,o,0,n)}Go(n)}var Hh=(function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e})(Hh||{});function II(e,t,n,r){let i=Qe(null);try{let[o,s,a]=e.inputs[n],u=null;(s&Hh.SignalBased)!==0&&(u=t[o][Wn]),u!==null&&u.transformFn!==void 0?r=u.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,u,r,n,o):IE(t,u,o,r)}finally{Qe(i)}}var Ji=(function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e})(Ji||{}),IL;function ZI(e,t){return IL(e,t)}var D8=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var CI=new WeakMap,ll=new WeakSet;function CL(e,t){let n=CI.get(e);if(!n||n.length===0)return;let r=t.parentNode,i=t.previousSibling;for(let o=n.length-1;o>=0;o--){let s=n[o],a=s.parentNode;s===t?(n.splice(o,1),ll.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(i&&s===i||a&&r&&a!==r)&&(n.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function AL(e,t){let n=CI.get(e);n?n.includes(t)||n.push(t):CI.set(e,[t])}var hu=new Set,Zh=(function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e})(Zh||{}),Yo=new Oe(""),Jx=new Set;function Wh(e){Jx.has(e)||(Jx.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var WI=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ke({token:e,providedIn:"root",factory:()=>new e})}return e})(),KE=[0,1,2,3],eM=(()=>{class e{ngZone=pe(Yn);scheduler=pe(Ls);errorHandler=pe(Hi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){pe(Yo,{optional:!0})}execute(){let n=this.sequences.size>0;n&&Nt(At.AfterRenderHooksStart),this.executing=!0;for(let r of KE)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&Nt(At.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[zs]??=[]).push(n),uu(r),r[Ze]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(Zh.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ke({token:e,providedIn:"root",factory:()=>new e})}return e})(),Ph=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,i,o,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=i,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[zs];t&&(this.view[zs]=t.filter(n=>n!==this))}};function Cl(e,t){let n=t?.injector??pe(kr);return Wh("NgAfterNextRender"),bL(e,n,t,!0)}function wL(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function bL(e,t,n,r){let i=t.get(WI);i.impl??=t.get(eM);let o=t.get(Yo,null,{optional:!0}),s=n?.manualCleanup!==!0?t.get(Di):null,a=t.get(wh,null,{optional:!0}),u=new Ph(i.impl,wL(e),a?.view,r,s,o?.snapshot(null));return i.impl.register(u),u}var DL=new Oe("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:pe(In)})});function tM(e,t,n){let r=e.get(DL);if(Array.isArray(t))for(let i of t)r.queue.add(i),n?.detachedLeaveAnimationFns?.push(i);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function xL(e,t){for(let[n,r]of t)tM(e,r.animateFns)}function Qx(e,t,n,r){let i=e?.[su]?.enter;t!==null&&i&&i.has(n.index)&&xL(r,i)}function lu(e,t,n,r,i,o,s,a){if(i!=null){let u,l=!1;bi(i)?u=i:po(i)&&(l=!0,i=i[wi]);let f=ei(i);e===0&&r!==null?(Qx(a,r,o,n),s==null?WE(t,r,f):Oh(t,r,f,s||null,!0)):e===1&&r!==null?(Qx(a,r,o,n),Oh(t,r,f,s||null,!0),CL(o,f)):e===2?(a?.[su]?.leave?.has(o.index)&&AL(o,f),ll.delete(f),Kx(a,o,n,d=>{if(ll.has(f)){ll.delete(f);return}nL(t,f,l,d)})):e===3&&(ll.delete(f),Kx(a,o,n,()=>{t.destroyNode(f)})),u!=null&&jL(t,e,n,u,o,r,s)}}function EL(e,t){nM(e,t),t[wi]=null,t[Qr]=null}function ML(e,t,n,r,i,o){r[wi]=i,r[Qr]=t,Yh(e,r,n,1,i,o)}function nM(e,t){t[Wi].changeDetectionScheduler?.notify(9),Yh(e,t,t[dn],2,null,null)}function SL(e){let t=e[ou];if(!t)return oI(e[We],e);for(;t;){let n=null;if(po(t))n=t[ou];else{let r=t[ar];r&&(n=r)}if(!n){for(;t&&!t[Jr]&&t!==e;)po(t)&&oI(t[We],t),t=t[Dn];t===null&&(t=e),po(t)&&oI(t[We],t),n=t&&t[Jr]}t=n}}function YI(e,t){let n=e[Gs],r=n.indexOf(t);n.splice(r,1)}function rM(e,t){if(Us(t))return;let n=t[dn];n.destroyNode&&Yh(e,t,n,3,null,null),SL(t)}function oI(e,t){if(Us(t))return;let n=Qe(null);try{t[Ze]&=-129,t[Ze]|=256,t[Lr]&&zc(t[Lr]),_L(e,t),NL(e,t),t[We].type===1&&t[dn].destroy();let r=t[Bo];if(r!==null&&bi(t[Dn])){r!==t[Dn]&&YI(r,t);let i=t[Yi];i!==null&&i.detachView(e)}mI(t)}finally{Qe(n)}}function Kx(e,t,n,r){let i=e?.[su];if(i==null||i.leave==null||!i.leave.has(t.index))return r(!1);e&&hu.add(e[Vo]),tM(n,()=>{if(i.leave&&i.leave.has(t.index)){let s=i.leave.get(t.index),a=[];if(s){for(let u=0;u<s.animateFns.length;u++){let l=s.animateFns[u],{promise:f}=l();a.push(f)}i.detachedLeaveAnimationFns=void 0}i.running=Promise.allSettled(a),TL(e,r)}else e&&hu.delete(e[Vo]),r(!1)},i)}function TL(e,t){let n=e[su]?.running;if(n){n.then(()=>{e[su].running=void 0,hu.delete(e[Vo]),t(!0)});return}t(!1)}function NL(e,t){let n=e.cleanup,r=t[iu];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[iu]=null);let i=t[ho];if(i!==null){t[ho]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=t[il];if(o!==null){t[il]=null;for(let s of o)s.destroy()}}function _L(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Ws)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],u=o[s+1];Nt(At.LifecycleHookStart,a,u);try{u.call(a)}finally{Nt(At.LifecycleHookEnd,a,u)}}else{Nt(At.LifecycleHookStart,i,o);try{o.call(i)}finally{Nt(At.LifecycleHookEnd,i,o)}}}}}function RL(e,t,n){return OL(e,t.parent,n)}function OL(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[wi];if(mo(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Mi.None||i===Mi.Emulated)return null}return Xi(r,n)}function PL(e,t,n){return LL(e,t,n)}function kL(e,t,n){return e.type&40?Xi(e,n):null}var LL=kL,eE;function $I(e,t,n,r){let i=RL(e,r,t),o=t[dn],s=r.parent||t[Qr],a=PL(s,r,t);if(i!=null)if(Array.isArray(n))for(let u=0;u<n.length;u++)Xx(o,i,n[u],a,!1);else Xx(o,i,n,a,!1);eE!==void 0&&eE(o,r,t,n,i)}function dl(e,t){if(t!==null){let n=t.type;if(n&3)return Xi(t,e);if(n&4)return AI(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return dl(e,r);{let i=e[t.index];return bi(i)?AI(-1,i):ei(i)}}else{if(n&128)return dl(e,t.next);if(n&32)return ZI(t,e)()||ei(e[t.index]);{let r=iM(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=ko(e[Kr]);return dl(i,r)}else return dl(e,t.next)}}}return null}function iM(e,t){if(t!==null){let r=e[Kr][Qr],i=t.projection;return r.projection[i]}return null}function AI(e,t){let n=ar+e+1;if(n<t.length){let r=t[n],i=r[We].firstChild;if(i!==null)return dl(r,i)}return t[zo]}function XI(e,t,n,r,i,o,s){for(;n!=null;){let a=r[jo];if(n.type===128){n=n.next;continue}let u=r[n.index],l=n.type;if(s&&t===0&&(u&&fu(ei(u),r),n.flags|=2),!VI(n))if(l&8)XI(e,t,n.child,r,i,o,!1),lu(t,e,a,i,u,n,o,r);else if(l&32){let f=ZI(n,r),d;for(;d=f();)lu(t,e,a,i,d,n,o,r);lu(t,e,a,i,u,n,o,r)}else l&16?FL(e,t,r,n,i,o):lu(t,e,a,i,u,n,o,r);n=s?n.projectionNext:n.next}}function Yh(e,t,n,r,i,o){XI(n,r,e.firstChild,t,i,o,!1)}function FL(e,t,n,r,i,o){let s=n[Kr],u=s[Qr].projection[r.projection];if(Array.isArray(u))for(let l=0;l<u.length;l++){let f=u[l];lu(t,e,n[jo],i,f,r,o,n)}else{let l=u,f=s[Dn];PE(r)&&(l.flags|=128),XI(e,t,l,f,i,o,!0)}}function jL(e,t,n,r,i,o,s){let a=r[zo],u=ei(r);a!==u&&lu(t,e,n,o,a,i,s);for(let l=ar;l<r.length;l++){let f=r[l];Yh(f[We],f,e,t,o,a)}}function BL(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:Ji.DashCase;i==null?e.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=Ji.Important),e.setStyle(n,r,i,o))}}function oM(e,t,n,r,i){let o=Hs(),s=r&2;try{Go(-1),s&&t.length>br&&QE(e,t,br,!1);let a=s?At.TemplateUpdateStart:At.TemplateCreateStart;Nt(a,i,n),n(r,i)}finally{Go(o);let a=s?At.TemplateUpdateEnd:At.TemplateCreateEnd;Nt(a,i,n)}}function qI(e,t,n){WL(e,t,n),(n.flags&64)===64&&YL(e,t,n)}function sM(e,t,n=Xi){let r=t.localNames;if(r!==null){let i=t.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(t,e):e[s];e[i++]=a}}}function VL(e,t,n,r){let o=r.get(VE,BE)||n===Mi.ShadowDom||n===Mi.ExperimentalIsolatedShadowDom,s=e.selectRootElement(t,o);if(s.tagName.toLowerCase()==="script")throw new Me(905,!1);return zL(s),s}function zL(e){GL(e)}var GL=()=>null;function UL(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function aM(e,t,n,r,i,o){let s=t[We];if(JI(e,s,t,n,r)){mo(e)&&ZL(t,e.index);return}e.type&3&&(n=UL(n)),HL(e,t,n,r,i,o)}function HL(e,t,n,r,i,o){if(e.type&3){let s=Xi(e,t);r=o!=null?o(r,e.value||"",n):r,i.setProperty(s,n,r)}else e.type&12}function ZL(e,t){let n=ti(t,e);n[Ze]&16||(n[Ze]|=64)}function WL(e,t,n){let r=n.directiveStart,i=n.directiveEnd;mo(n)&&yL(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||_h(n,t);let o=n.initialInputs;for(let s=r;s<i;s++){let a=e.data[s],u=gl(t,e,s,n);if(fu(u,t),o!==null&&XL(t,s-r,u,a,n,o),$i(a)){let l=ti(n.index,t);l[Xn]=gl(t,e,s,n)}}}function YL(e,t,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=Sx();try{Go(o);for(let a=r;a<i;a++){let u=e.data[a],l=t[a];mh(a),(u.hostBindings!==null||u.hostVars!==0||u.hostAttrs!==null)&&$L(u,l)}}finally{Go(-1),mh(s)}}function $L(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function uM(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];lL(t,o.selectors,!1)&&(r??=[],$i(o)?r.unshift(o):r.push(o))}return r}function XL(e,t,n,r,i,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let u=s[a],l=s[a+1];II(r,n,u,l)}}function qL(e,t,n,r,i){let o=br+n,s=t[We],a=i(s,t,e,r,n);t[o]=a,cu(e,!0);let u=e.type===2;return u?(YE(t[dn],a,e),(px()===0||sl(e))&&fu(a,t),mx()):fu(a,t),Ch()&&(!u||!VI(e))&&$I(s,t,a,e),e}function JL(e){let t=e;return Gy()?wx():(t=t.parent,cu(t,!1)),t}function QL(e,t){let n=e[jo];if(!n)return;let r;try{r=n.get(xi,null)}catch{r=null}r?.(t)}function JI(e,t,n,r,i){let o=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let u=0;u<s.length;u+=2){let l=s[u],f=s[u+1],d=t.data[l];II(d,n[l],f,i),a=!0}if(o)for(let u of o){let l=n[u],f=t.data[u];II(f,l,r,i),a=!0}return a}function KL(e,t){let n=ti(t,e),r=n[We];e2(r,n);let i=n[wi];i!==null&&n[rl]===null&&(n[rl]=zE(i,n[jo])),Nt(At.ComponentStart);try{QI(r,n,n[Xn])}finally{Nt(At.ComponentEnd,n[Xn])}}function e2(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function QI(e,t,n){yh(t);try{let r=e.viewQuery;r!==null&&vI(1,r,n);let i=e.template;i!==null&&oM(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Yi]?.finishViewCreation(e),e.staticContentQueries&&GE(e,t),e.staticViewQueries&&vI(2,e.viewQuery,n);let o=e.components;o!==null&&t2(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[Ze]&=-5,Ih()}}function t2(e,t){for(let n=0;n<t.length;n++)KL(e,t[n])}function n2(e,t,n,r){let i=Qe(null);try{let o=t.tView,a=e[Ze]&4096?4096:16,u=UI(e,o,n,a,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];u[Bo]=l;let f=e[Yi];return f!==null&&(u[Yi]=f.createEmbeddedView(o)),QI(o,u,n),u}finally{Qe(i)}}function tE(e,t){return!t||t.firstChild===null||PE(e)}function pl(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=t[n.index];o!==null&&r.push(ei(o)),bi(o)&&cM(o,r);let s=n.type;if(s&8)pl(e,t,n.child,r);else if(s&32){let a=ZI(n,t),u;for(;u=a();)r.push(u)}else if(s&16){let a=iM(t,n);if(Array.isArray(a))r.push(...a);else{let u=ko(t[Kr]);pl(u[We],u,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function cM(e,t){for(let n=ar;n<e.length;n++){let r=e[n],i=r[We].firstChild;i!==null&&pl(r[We],r,i,t)}e[zo]!==e[wi]&&t.push(e[zo])}function lM(e){if(e[zs]!==null){for(let t of e[zs])t.impl.addSequence(t);e[zs].length=0}}var dM=[];function r2(e){return e[Lr]??i2(e)}function i2(e){let t=dM.pop()??Object.create(s2);return t.lView=e,t}function o2(e){e.lView[Lr]!==e&&(e.lView=null,dM.push(e))}var s2=lt(Ce({},Ga),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{uu(e.lView)},consumerOnSignalRead(){this.lView[Lr]=this}});function a2(e){let t=e[Lr]??Object.create(u2);return t.lView=e,t}var u2=lt(Ce({},Ga),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=ko(e.lView);for(;t&&!fM(t[We]);)t=ko(t);t&&Ly(t)},consumerOnSignalRead(){this.lView[Lr]=this}});function fM(e){return e.type!==2}function hM(e){if(e[il]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[il])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[Ze]&8192)}}var c2=100;function gM(e,t=0){let r=e[Wi].rendererFactory,i=!1;i||r.begin?.();try{l2(e,t)}finally{i||r.end?.()}}function l2(e,t){let n=Uy();try{Hy(!0),wI(e,t);let r=0;for(;ul(e);){if(r===c2)throw new Me(103,!1);r++,wI(e,1)}}finally{Hy(n)}}function d2(e,t,n,r){if(Us(t))return;let i=t[Ze],o=!1,s=!1;yh(t);let a=!0,u=null,l=null;o||(fM(e)?(l=r2(t),u=Ha(l)):xf()===null?(a=!1,l=a2(t),u=Ha(l)):t[Lr]&&(zc(t[Lr]),t[Lr]=null));try{ky(t),Dx(e.bindingStartIndex),n!==null&&oM(e,t,n,2,r);let f=(i&3)===3;if(!o)if(f){let I=e.preOrderCheckHooks;I!==null&&Dh(t,I,null)}else{let I=e.preOrderHooks;I!==null&&xh(t,I,0,null),rI(t,0)}if(s||f2(t),hM(t),pM(t,0),e.contentQueries!==null&&GE(e,t),!o)if(f){let I=e.contentCheckHooks;I!==null&&Dh(t,I)}else{let I=e.contentHooks;I!==null&&xh(t,I,1),rI(t,1)}g2(e,t);let d=e.components;d!==null&&vM(t,d,0);let m=e.viewQuery;if(m!==null&&vI(2,m,r),!o)if(f){let I=e.viewCheckHooks;I!==null&&Dh(t,I)}else{let I=e.viewHooks;I!==null&&xh(t,I,2),rI(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[fh]){for(let I of t[fh])I();t[fh]=null}o||(lM(t),t[Ze]&=-73)}catch(f){throw o||uu(t),f}finally{l!==null&&(Vc(l,u),a&&o2(l)),Ih()}}function pM(e,t){for(let n=LE(e);n!==null;n=FE(n))for(let r=ar;r<n.length;r++){let i=n[r];mM(i,t)}}function f2(e){for(let t=LE(e);t!==null;t=FE(t)){if(!(t[Ze]&2))continue;let n=t[Gs];for(let r=0;r<n.length;r++){let i=n[r];Ly(i)}}}function h2(e,t,n){Nt(At.ComponentStart);let r=ti(t,e);try{mM(r,n)}finally{Nt(At.ComponentEnd,r[Xn])}}function mM(e,t){hh(e)&&wI(e,t)}function wI(e,t){let r=e[We],i=e[Ze],o=e[Lr],s=!!(t===0&&i&16);if(s||=!!(i&64&&t===0),s||=!!(i&1024),s||=!!(o?.dirty&&Mf(o)),s||=!1,o&&(o.dirty=!1),e[Ze]&=-9217,s)d2(r,e,r.template,e[Xn]);else if(i&8192){let a=Qe(null);try{hM(e),pM(e,1);let u=r.components;u!==null&&vM(e,u,1),lM(e)}finally{Qe(a)}}}function vM(e,t,n){for(let r=0;r<t.length;r++)h2(e,t[r],n)}function g2(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Go(~i);else{let o=i,s=n[++r],a=n[++r];Mx(s,o);let u=t[o];Nt(At.HostBindingsUpdateStart,u);try{a(2,u)}finally{Nt(At.HostBindingsUpdateEnd,u)}}}}finally{Go(-1)}}function KI(e,t){let n=Uy()?64:1088;for(e[Wi].changeDetectionScheduler?.notify(t);e;){e[Ze]|=n;let r=ko(e);if(au(e)&&!r)return e;e=r}return null}function yM(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function p2(e,t,n,r=!0){let i=t[We];if(m2(i,t,e,n),r){let s=AI(n,e),a=t[dn],u=a.parentNode(e[zo]);u!==null&&ML(i,e[Qr],a,t,u,s)}let o=t[rl];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function bI(e,t){if(e.length<=ar)return;let n=ar+t,r=e[n];if(r){let i=r[Bo];i!==null&&i!==e&&YI(i,r),t>0&&(e[n-1][Jr]=r[Jr]);let o=el(e,ar+t);EL(r[We],r);let s=o[Yi];s!==null&&s.detachView(o[We]),r[Dn]=null,r[Jr]=null,r[Ze]&=-129}return r}function m2(e,t,n,r){let i=ar+r,o=n.length;r>0&&(n[i-1][Jr]=t),r<o-ar?(t[Jr]=n[i],Dy(n,ar+r,t)):(n.push(t),t[Jr]=null),t[Dn]=n;let s=t[Bo];s!==null&&n!==s&&IM(s,t);let a=t[Yi];a!==null&&a.insertView(e),gh(t),t[Ze]|=128}function IM(e,t){let n=e[Gs],r=t[Dn];if(po(r))e[Ze]|=2;else{let i=r[Dn][Kr];t[Kr]!==i&&(e[Ze]|=2)}n===null?e[Gs]=[t]:n.push(t)}var Ho=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[We];return pl(n,t,n.firstChild,[])}constructor(t,n){this._lView=t,this._cdRefInjectingView=n}get context(){return this._lView[Xn]}set context(t){this._lView[Xn]=t}get destroyed(){return Us(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Dn];if(bi(t)){let n=t[ol],r=n?n.indexOf(this):-1;r>-1&&(bI(t,r),el(n,r))}this._attachedToViewContainer=!1}rM(this._lView[We],this._lView)}onDestroy(t){Fy(this._lView,t)}markForCheck(){KI(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Ze]&=-129}reattach(){gh(this._lView),this._lView[Ze]|=128}detectChanges(){this._lView[Ze]|=1024,gM(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Me(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=au(this._lView),n=this._lView[Bo];n!==null&&!t&&YI(n,this._lView),nM(this._lView[We],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Me(902,!1);this._appRef=t;let n=au(this._lView),r=this._lView[Bo];r!==null&&!n&&IM(r,this._lView),gh(this._lView)}};var Zo=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=v2;constructor(n,r,i){this._declarationLView=n,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,r){return this.createEmbeddedViewImpl(n,r)}createEmbeddedViewImpl(n,r,i){let o=n2(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:r,dehydratedView:i});return new Ho(o)}}return e})();function v2(){return eC(xr(),Vt())}function eC(e,t){return e.type&4?new Zo(t,e,vu(e,t)):null}function tC(e,t,n,r,i){let o=e.data[t];if(o===null)o=y2(e,t,n,r,i),Ex()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=Ax();o.injectorIndex=s===null?-1:s.injectorIndex}return cu(o,!0),o}function y2(e,t,n,r,i){let o=zy(),s=Gy(),a=s?o:o&&o.parent,u=e.data[t]=C2(e,a,n,t,r,i);return I2(e,u,o,s),u}function I2(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function C2(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return yx()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,namespace:Xy(),attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var A2=()=>null;function nE(e,t){return A2(e,t)}var CM=class{},$h=class{},DI=class{resolveComponentFactory(t){throw new Me(917,!1)}},Al=class{static NULL=new DI},Ys=class{},qs=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>w2()}return e})();function w2(){let e=Vt(),t=xr(),n=ti(t.index,e);return(po(n)?n:e)[dn]}var AM=(()=>{class e{static \u0275prov=ke({token:e,providedIn:"root",factory:()=>null})}return e})();var Mh={},xI=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let i=this.injector.get(t,Mh,r);return i!==Mh||n===Mh?i:this.parentInjector.get(t,n,r)}};function rE(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)i=fy(i,a);else if(o==2){let u=a,l=t[++s];r=fy(r,u+": "+l+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function wt(e,t=0){let n=Vt();if(n===null)return tt(e,t);let r=xr();return _E(r,n,kn(e),t)}function wM(e,t,n,r,i){let o=r===null?null:{"":-1},s=i(e,n);if(s!==null){let a=s,u=null,l=null;for(let f of s)if(f.resolveHostDirectives!==null){[a,u,l]=f.resolveHostDirectives(s);break}x2(e,t,n,a,o,u,l)}o!==null&&r!==null&&b2(n,r,o)}function b2(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let o=n[t[i+1]];if(o==null)throw new Me(-301,!1);r.push(t[i],o)}}function D2(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function x2(e,t,n,r,i,o,s){let a=r.length,u=null;for(let m=0;m<a;m++){let I=r[m];u===null&&$i(I)&&(u=I,D2(e,n,m)),gI(_h(n,t),e,I.type)}_2(n,e.data.length,a),u?.viewProvidersResolver&&u.viewProvidersResolver(u);for(let m=0;m<a;m++){let I=r[m];I.providersResolver&&I.providersResolver(I)}let l=!1,f=!1,d=JE(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let m=0;m<a;m++){let I=r[m];if(n.mergedAttrs=hl(n.mergedAttrs,I.hostAttrs),M2(e,n,t,d,I),N2(d,I,i),s!==null&&s.has(I)){let[M,E]=s.get(I);n.directiveToIndex.set(I.type,[d,M+n.directiveStart,E+n.directiveStart])}else(o===null||!o.has(I))&&n.directiveToIndex.set(I.type,d);I.contentQueries!==null&&(n.flags|=4),(I.hostBindings!==null||I.hostAttrs!==null||I.hostVars!==0)&&(n.flags|=64);let C=I.type.prototype;!l&&(C.ngOnChanges||C.ngOnInit||C.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!f&&(C.ngOnChanges||C.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),f=!0),d++}E2(e,n,o)}function E2(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))iE(0,t,i,r),iE(1,t,i,r),sE(t,r,!1);else{let o=n.get(i);oE(0,t,o,r),oE(1,t,o,r),sE(t,r,!0)}}}function iE(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(r),bM(t,o)}}function oE(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),bM(t,s)}}function bM(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function sE(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=e;if(r===null||!n&&i===null||n&&o===null||zI(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let u=r[a];if(u===0){a+=4;continue}else if(u===5){a+=2;continue}else if(typeof u=="number")break;if(!n&&i.hasOwnProperty(u)){let l=i[u];for(let f of l)if(f===t){s??=[],s.push(u,r[a+1]);break}}else if(n&&o.hasOwnProperty(u)){let l=o[u];for(let f=0;f<l.length;f+=2)if(l[f]===t){s??=[],s.push(l[f+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function M2(e,t,n,r,i){e.data[r]=i;let o=i.factory||(i.factory=Os(i.type,!0)),s=new Ws(o,$i(i),wt,null);e.blueprint[r]=s,n[r]=s,S2(e,t,r,JE(e,n,i.hostVars,Wo),i)}function S2(e,t,n,r,i){let o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;T2(s)!=a&&s.push(a),s.push(n,r,o)}}function T2(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function N2(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;$i(t)&&(n[""]=e)}}function _2(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function DM(e,t,n,r,i,o,s,a){let u=t[We],l=u.consts,f=al(l,s),d=tC(u,e,n,r,f);return o&&wM(u,t,d,al(l,a),i),d.mergedAttrs=hl(d.mergedAttrs,d.attrs),d.attrs!==null&&rE(d,d.attrs,!1),d.mergedAttrs!==null&&rE(d,d.mergedAttrs,!0),u.queries!==null&&u.queries.elementStart(u,d),d}function xM(e,t){bE(e,t),Ry(t)&&e.queries.elementEnd(t)}function nC(e){return MM(e)?Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e:!1}function EM(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)t(e[n]);else{let n=e[Symbol.iterator](),r;for(;!(r=n.next()).done;)t(r.value)}}function MM(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function Xh(e,t,n){if(n===Wo)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function sI(e,t,n){return function r(i){let o=r.__ngNativeEl__;o!==void 0&&qk(i,o);let s=mo(e)?ti(e.index,t):t;KI(s,5);let a=t[Xn],u=aE(t,a,n,i),l=r.__ngNextListenerFn__;for(;l;)u=aE(t,a,l,i)&&u,l=l.__ngNextListenerFn__;return u}}function aE(e,t,n,r){let i=Qe(null);try{return Nt(At.OutputStart,t,n),n(r)!==!1}catch(o){return QL(e,o),!1}finally{Nt(At.OutputEnd,t,n),Qe(i)}}function R2(e,t,n,r,i,o,s,a){let u=sl(e),l=!1,f=null;if(!r&&u&&(f=P2(t,n,o,e.index)),f!==null){let d=f.__ngLastListenerFn__||f;d.__ngNextListenerFn__=s,f.__ngLastListenerFn__=s,l=!0}else{let d=Xi(e,n),m=r?r(d):d;Qk(n,m,o,a),r||(a.__ngNativeEl__=d);let I=i.listen(m,o,a);if(!O2(o)){let C=r?M=>r(ei(M[e.index])):e.index;SM(C,t,n,o,a,I,!1)}}return l}function O2(e){return e.startsWith("animation")||e.startsWith("transition")}function P2(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=t[iu],u=i[o+2];return a&&a.length>u?a[u]:null}typeof s=="string"&&(o+=2)}return null}function SM(e,t,n,r,i,o,s){let a=t.firstCreatePass?By(t):null,u=jy(n),l=u.length;u.push(i,o),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function uE(e,t,n,r,i,o){let s=t[n],a=t[We],l=a.data[n].outputs[r],d=s[l].subscribe(o);SM(e.index,a,t,i,o,d,!0)}var EI=Symbol("BINDING");function TM(e){return e.debugInfo?.className||e.type.name||null}var kh=class extends Al{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let n=Lo(t);return new gu(n,this.ngModule)}};function k2(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],o={propName:n,templateName:t,isSignal:(r&Hh.SignalBased)!==0};return i&&(o.transform=i),o})}function L2(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function F2(e,t,n){let r=t instanceof In?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new xI(n,r):n}function j2(e){let t=e.get(Ys,null);if(t===null)throw new Me(407,!1);let n=e.get(AM,null),r=e.get(Ls,null),i=e.get(Yo,null,{optional:!0});return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r,ngReflect:!1,tracingService:i}}function B2(e,t){let n=NM(e);return ZE(t,n,n==="svg"?ax:n==="math"?ux:null)}function NM(e){return(e.selectors[0][0]||"div").toLowerCase()}var gu=class extends $h{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=k2(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=L2(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){super(),this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=gL(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,i,o,s){Nt(At.DynamicComponentStart);let a=Qe(null);try{let u=this.componentDef,l=F2(u,i||this.ngModule,t),f=j2(l),d=f.tracingService;return d&&d.componentCreate?d.componentCreate(TM(u),()=>this.createComponentRef(f,l,n,r,o,s)):this.createComponentRef(f,l,n,r,o,s)}finally{Qe(a)}}createComponentRef(t,n,r,i,o,s){let a=this.componentDef,u=V2(i,a,s,o),l=t.rendererFactory.createRenderer(null,a),f=i?VL(l,i,a.encapsulation,n):B2(a,l),d=s?.some(cE)||o?.some(C=>typeof C!="function"&&C.bindings.some(cE)),m=UI(null,u,null,512|qE(a),null,null,t,l,n,null,zE(f,n,!0));m[br]=f,yh(m);let I=null;try{let C=DM(br,m,2,"#host",()=>u.directiveRegistry,!0,0);YE(l,f,C),fu(f,m),qI(u,m,C),UE(u,C,m),xM(u,C),r!==void 0&&G2(C,this.ngContentSelectors,r),I=ti(C.index,m),m[Xn]=I[Xn],QI(u,m,null)}catch(C){throw I!==null&&mI(I),mI(m),C}finally{Nt(At.DynamicComponentEnd),Ih()}return new Lh(this.componentType,m,!!d)}};function V2(e,t,n,r){let i=e?["ng-version","21.2.14"]:pL(t.selectors[0]),o=null,s=null,a=0;if(n)for(let f of n)a+=f[EI].requiredVars,f.create&&(f.targetIdx=0,(o??=[]).push(f)),f.update&&(f.targetIdx=0,(s??=[]).push(f));if(r)for(let f=0;f<r.length;f++){let d=r[f];if(typeof d!="function")for(let m of d.bindings){a+=m[EI].requiredVars;let I=f+1;m.create&&(m.targetIdx=I,(o??=[]).push(m)),m.update&&(m.targetIdx=I,(s??=[]).push(m))}}let u=[t];if(r)for(let f of r){let d=typeof f=="function"?f:f.type,m=Ay(d);u.push(m)}return GI(0,null,z2(o,s),1,a,u,null,null,null,[i],null)}function z2(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let r of e)r.create();if(n&2&&t)for(let r of t)r.update()}}function cE(e){let t=e[EI].kind;return t==="input"||t==="twoWay"}var Lh=class extends CM{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=Py(n[We],br),this.location=vu(this._tNode,n),this.instance=ti(this._tNode.index,n)[Xn],this.hostView=this.changeDetectorRef=new Ho(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let i=this._rootLView,o=JI(r,i[We],i,t,n);this.previousInputValues.set(t,n);let s=ti(r.index,i);KI(s,1)}get injector(){return new Zs(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function G2(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var vo=(()=>{class e{static __NG_ELEMENT_ID__=U2}return e})();function U2(){let e=xr();return _M(e,Vt())}var MI=class e extends vo{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return vu(this._hostTNode,this._hostLView)}get injector(){return new Zs(this._hostTNode,this._hostLView)}get parentInjector(){let t=FI(this._hostTNode,this._hostLView);if(xE(t)){let n=Nh(t,this._hostLView),r=Th(t),i=n[We].data[r+8];return new Zs(i,n)}else return new Zs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=lE(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-ar}createEmbeddedView(t,n,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=nE(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,i,tE(this._hostTNode,s)),a}createComponent(t,n,r,i,o,s,a){let u=t&&!bk(t),l;if(u)l=n;else{let E=n||{};l=E.index,r=E.injector,i=E.projectableNodes,o=E.environmentInjector||E.ngModuleRef,s=E.directives,a=E.bindings}let f=u?t:new gu(Lo(t)),d=r||this.parentInjector;if(!o&&f.ngModule==null){let N=(u?d:this.parentInjector).get(In,null);N&&(o=N)}let m=Lo(f.componentType??{}),I=nE(this._lContainer,m?.id??null),C=I?.firstChild??null,M=f.create(d,i,C,o,s,a);return this.insertImpl(M.hostView,l,tE(this._hostTNode,I)),M}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let i=t._lView;if(dx(i)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let u=i[Dn],l=new e(u,u[Qr],u[Dn]);l.detach(l.indexOf(t))}}let o=this._adjustIndex(n),s=this._lContainer;return p2(s,i,o,r),t.attachToViewContainerRef(),Dy(aI(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=lE(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=bI(this._lContainer,n);r&&(el(aI(this._lContainer),n),rM(r[We],r))}detach(t){let n=this._adjustIndex(t,-1),r=bI(this._lContainer,n);return r&&el(aI(this._lContainer),n)!=null?new Ho(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function lE(e){return e[ol]}function aI(e){return e[ol]||(e[ol]=[])}function _M(e,t){let n,r=t[e.index];return bi(r)?n=r:(n=yM(r,t,null,e),t[e.index]=n,HI(t,n)),Z2(n,t,e,r),new MI(n,e,t)}function H2(e,t){let n=e[dn],r=n.createComment(""),i=Xi(t,e),o=n.parentNode(i);return Oh(n,o,r,n.nextSibling(i),!1),r}var Z2=$2,W2=()=>!1;function Y2(e,t,n){return W2(e,t,n)}function $2(e,t,n,r){if(e[zo])return;let i;n.type&8?i=ei(r):i=H2(t,n),e[zo]=i}var SI=class e{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},TI=class e{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new e(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)rC(t,n).matches!==null&&this.queries[n].setDirty()}},NI=class{flags;read;predicate;constructor(t,n,r=null){this.flags=n,this.read=r,typeof t=="string"?this.predicate=nF(t):this.predicate=t}},_I=class e{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new e(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},RI=class e{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(t,n,X2(n,o)),this.matchTNodeWithReadOption(t,n,Eh(n,t,o,!1,!1))}else r===Zo?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Eh(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Si||i===vo||i===Zo&&n.type&4)this.addMatch(n.index,-2);else{let o=Eh(n,t,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function X2(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function q2(e,t){return e.type&11?vu(e,t):e.type&4?eC(e,t):null}function J2(e,t,n,r){return n===-1?q2(t,e):n===-2?Q2(e,t,r):gl(e,e[We],n,t)}function Q2(e,t,n){if(n===Si)return vu(t,e);if(n===Zo)return eC(t,e);if(n===vo)return _M(t,e)}function RM(e,t,n,r){let i=t[Yi].queries[r];if(i.matches===null){let o=e.data,s=n.matches,a=[];for(let u=0;s!==null&&u<s.length;u+=2){let l=s[u];if(l<0)a.push(null);else{let f=o[l];a.push(J2(t,f,s[u+1],n.metadata.read))}}i.matches=a}return i.matches}function OI(e,t,n,r){let i=e.queries.getByIndex(n),o=i.matches;if(o!==null){let s=RM(e,t,i,n);for(let a=0;a<o.length;a+=2){let u=o[a];if(u>0)r.push(s[a/2]);else{let l=o[a+1],f=t[-u];for(let d=ar;d<f.length;d++){let m=f[d];m[Bo]===m[Dn]&&OI(m[We],m,l,r)}if(f[Gs]!==null){let d=f[Gs];for(let m=0;m<d.length;m++){let I=d[m];OI(I[We],I,l,r)}}}}}return r}function K2(e,t){return e[Yi].queries[t].queryList}function eF(e,t,n){let r=new Rh((n&4)===4);return gx(e,t,r,r.destroy),(t[Yi]??=new TI).queries.push(new SI(r))-1}function tF(e,t,n){let r=Dr();return r.firstCreatePass&&(rF(r,new NI(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),eF(r,Vt(),t)}function nF(e){return e.split(",").map(t=>t.trim())}function rF(e,t,n){e.queries===null&&(e.queries=new _I),e.queries.track(new RI(t,n))}function rC(e,t){return e.queries.getByIndex(t)}function iF(e,t){let n=e[We],r=rC(n,t);return r.crossesNgTemplate?OI(n,e,t,[]):RM(n,e,r,t)}var $s=class{},qh=class{};var Fh=class extends $s{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new kh(this);constructor(t,n,r,i=!0){super(),this.ngModuleType=t,this._parent=n;let o=Cy(t);this._bootstrapComponents=$E(o.bootstrap),this._r3Injector=qy(t,n,[{provide:$s,useValue:this},{provide:Al,useValue:this.componentFactoryResolver},...r],Qc(t),new Set(["environment"])),i&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},jh=class extends qh{moduleType;constructor(t){super(),this.moduleType=t}create(t){return new Fh(this.moduleType,t,[])}};var ml=class extends $s{injector;componentFactoryResolver=new kh(this);instance=null;constructor(t){super();let n=new ks([...t.providers,{provide:$s,useValue:this},{provide:Al,useValue:this.componentFactoryResolver}],t.parent||nl(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function wl(e,t,n=null){return new ml({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var oF=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=My(!1,n.type),i=r.length>0?wl([r],this._injector,""):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ke({token:e,providedIn:"environment",factory:()=>new e(tt(In))})}return e})();function Js(e){return yl(()=>{let t=OM(e),n=lt(Ce({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===jI.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(oF).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Mi.Emulated,styles:e.styles||Pr,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&Wh("NgStandalone"),PM(n);let r=e.dependencies;return n.directiveDefs=dE(r,sF),n.pipeDefs=dE(r,ZD),n.id=cF(n),n})}function sF(e){return Lo(e)||Ay(e)}function $o(e){return yl(()=>({type:e.type,bootstrap:e.bootstrap||Pr,declarations:e.declarations||Pr,imports:e.imports||Pr,exports:e.exports||Pr,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function aF(e,t){if(e==null)return Fo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o,s,a,u;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,u=i[3]||null):(o=i,s=i,a=Hh.None,u=null),n[o]=[r,a,u],t[o]=s}return n}function uF(e){if(e==null)return Fo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Ln(e){return yl(()=>{let t=OM(e);return PM(t),t})}function OM(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Fo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Pr,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:aF(e.inputs,t),outputs:uF(e.outputs),debugInfo:null}}function PM(e){e.features?.forEach(t=>t(e))}function dE(e,t){return e?()=>{let n=typeof e=="function"?e():e,r=[];for(let i of n){let o=t(i);o!==null&&r.push(o)}return r}:null}function cF(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let o of r.join("|"))t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function lF(e){return Object.getPrototypeOf(e.prototype).constructor}function Ki(e){let t=lF(e.type),n=!0,r=[e];for(;t;){let i;if($i(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Me(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let s=e;s.inputs=uI(e.inputs),s.declaredInputs=uI(e.declaredInputs),s.outputs=uI(e.outputs);let a=i.hostBindings;a&&pF(e,a);let u=i.viewQuery,l=i.contentQueries;if(u&&hF(e,u),l&&gF(e,l),dF(e,i),HD(e.outputs,i.outputs),$i(i)&&i.data.animation){let f=e.data;f.animation=(f.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(e),a===Ki&&(n=!1)}}t=Object.getPrototypeOf(t)}fF(r)}function dF(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function fF(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=hl(i.hostAttrs,n=hl(n,i.hostAttrs))}}function uI(e){return e===Fo?{}:e===Pr?[]:e}function hF(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function gF(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function pF(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function mF(e,t,n,r,i,o,s,a){if(n.firstCreatePass){e.mergedAttrs=hl(e.mergedAttrs,e.attrs);let f=e.tView=GI(2,e,i,o,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),f.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),cu(e,!1);let u=yF(n,t,e,r);Ch()&&$I(n,t,u,e),fu(u,t);let l=yM(u,t,u,e);t[r+br]=l,HI(t,l),Y2(l,e,t)}function vF(e,t,n,r,i,o,s,a,u,l,f){let d=n+br,m;return t.firstCreatePass?(m=tC(t,d,4,s||null,a||null),Vy()&&wM(t,e,m,al(t.consts,l),uM),bE(t,m)):m=t.data[d],mF(m,e,t,n,r,i,o,u),sl(m)&&qI(t,e,m),l!=null&&sM(e,m,f),m}function yu(e,t,n,r,i,o,s,a){let u=Vt(),l=Dr(),f=al(l.consts,o);return vF(u,l,e,t,n,r,i,f,void 0,s,a),yu}var yF=IF;function IF(e,t,n,r){return Ah(!0),t[dn].createComment("")}var iC=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function oC(e){return typeof e=="function"&&e[Wn]!==void 0}function sC(e){return oC(e)&&typeof e.set=="function"}var aC=new Oe("");function Xo(e){return!!e&&typeof e.then=="function"}function uC(e){return!!e&&typeof e.subscribe=="function"}var kM=new Oe("");var cC=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=pe(kM,{optional:!0})??[];injector=pe(kr);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=$n(this.injector,i);if(Xo(o))n.push(o);else if(uC(o)){let s=new Promise((a,u)=>{o.subscribe({complete:a,error:u})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Jh=new Oe("");function LM(){Pv(()=>{let e="";throw new Me(600,e)})}function FM(e){return e.isBoundToModule}var CF=10;var qo=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=pe(xi);afterRenderManager=pe(WI);zonelessEnabled=pe(cl);rootEffectScheduler=pe(nI);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new vn;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=pe(Uo);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(en(n=>!n))}constructor(){pe(Yo,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=pe(In);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,i=kr.NULL){return this._injector.get(Yn).run(()=>{Nt(At.BootstrapComponentStart);let s=n instanceof $h;if(!this._injector.get(cC).done){let C="";throw new Me(405,C)}let u;s?u=n:u=this._injector.get(Al).resolveComponentFactory(n),this.componentTypes.push(u.componentType);let l=FM(u)?void 0:this._injector.get($s),f=r||u.selector,d=u.create(i,[],f,l),m=d.location.nativeElement,I=d.injector.get(aC,null);return I?.registerApplication(m),d.onDestroy(()=>{this.detachView(d.hostView),fl(this.components,d),I?.unregisterApplication(m)}),this._loadComponent(d),Nt(At.BootstrapComponentEnd,d),d})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Nt(At.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Zh.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw Nt(At.ChangeDetectionEnd),new Me(101,!1);let n=Qe(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Qe(n),this.afterTick.next(),Nt(At.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ys,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<CF;){Nt(At.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{Nt(At.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let n=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:i}of this.allViews){if(!r&&!ul(i))continue;let o=r&&!this.zonelessEnabled?0:1;gM(i,o),n=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}n||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>ul(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;fl(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(i){this.internalErrorHandler(i)}this.components.push(n),this._injector.get(Jh,[]).forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>fl(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Me(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function fl(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function ri(e,t,n){let r=Vt(),i=ph();if(Xh(r,i,t)){let o=Dr(),s=$y();aM(s,r,e,t,r[dn],n)}return ri}function fE(e,t,n,r,i){JI(t,e,n,i?"class":"style",r)}function Ne(e,t,n,r){let i=Vt(),o=i[We],s=e+br,a=o.firstCreatePass?DM(s,i,2,t,uM,Vy(),n,r):o.data[s];if(mo(a)){let u=i[Wi].tracingService;if(u&&u.componentCreate){let l=o.data[a.directiveStart+a.componentOffset];return u.componentCreate(TM(l),()=>(hE(e,t,i,a,r),Ne))}}return hE(e,t,i,a,r),Ne}function hE(e,t,n,r,i){if(qL(r,n,e,t,AF),sl(r)){let o=n[We];qI(o,n,r),UE(o,r,n)}i!=null&&sM(n,r)}function Re(){let e=Dr(),t=xr(),n=JL(t);return e.firstCreatePass&&xM(e,n),Ix(n)&&Cx(),vx(),n.classesWithoutHost!=null&&Tk(n)&&fE(e,n,Vt(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&Nk(n)&&fE(e,n,Vt(),n.stylesWithoutHost,!1),Re}function Zt(e,t,n,r){return Ne(e,t,n,r),Re(),Zt}var AF=(e,t,n,r,i)=>(Ah(!0),ZE(t[dn],r,Xy()));function Qs(){return Vt()}var bl="en-US";var wF=bl;function jM(e){typeof e=="string"&&(wF=e.toLowerCase().replace(/_/g,"-"))}function rn(e,t,n){let r=Vt(),i=Dr(),o=xr();return BM(i,r,r[dn],o,e,t,n),rn}function BM(e,t,n,r,i,o,s){let a=!0,u=null;if((r.type&3||s)&&(u??=sI(r,t,o),R2(r,e,t,s,n,i,o,u)&&(a=!1)),a){let l=r.outputs?.[i],f=r.hostDirectiveOutputs?.[i];if(f&&f.length)for(let d=0;d<f.length;d+=2){let m=f[d],I=f[d+1];u??=sI(r,t,o),uE(r,t,m,I,i,u)}if(l&&l.length)for(let d of l)u??=sI(r,t,o),uE(r,t,d,i,i,u)}}function fn(e=1){return Ox(e)}function Qh(e,t,n){return tF(e,t,n),Qh}function lC(e){let t=Vt(),n=Dr(),r=Zy();vh(r+1);let i=rC(n,r);if(e.dirty&&lx(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let o=iF(t,r);e.reset(o,Uk),e.notifyOnChanges()}return!0}return!1}function dC(){return K2(Vt(),Zy())}function fC(e){let t=bx();return cx(t,br+e)}function bh(e,t){return e<<17|t<<2}function Xs(e){return e>>17&32767}function bF(e){return(e&2)==2}function DF(e,t){return e&131071|t<<17}function PI(e){return e|2}function pu(e){return(e&131068)>>2}function cI(e,t){return e&-131069|t<<2}function xF(e){return(e&1)===1}function kI(e){return e|1}function EF(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=Xs(s),u=pu(s);e[r]=n;let l=!1,f;if(Array.isArray(n)){let d=n;f=d[1],(f===null||nu(d,f)>0)&&(l=!0)}else f=n;if(i)if(u!==0){let m=Xs(e[a+1]);e[r+1]=bh(m,a),m!==0&&(e[m+1]=cI(e[m+1],r)),e[a+1]=DF(e[a+1],r)}else e[r+1]=bh(a,0),a!==0&&(e[a+1]=cI(e[a+1],r)),a=r;else e[r+1]=bh(u,0),a===0?a=r:e[u+1]=cI(e[u+1],r),u=r;l&&(e[r+1]=PI(e[r+1])),gE(e,f,r,!0),gE(e,f,r,!1),MF(t,f,e,r,o),s=bh(a,u),o?t.classBindings=s:t.styleBindings=s}function MF(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&nu(o,t)>=0&&(n[r+1]=kI(n[r+1]))}function gE(e,t,n,r){let i=e[n+1],o=t===null,s=r?Xs(i):pu(i),a=!1;for(;s!==0&&(a===!1||o);){let u=e[s],l=e[s+1];SF(u,t)&&(a=!0,e[s+1]=r?kI(l):PI(l)),s=r?Xs(l):pu(l)}a&&(e[n+1]=r?PI(i):kI(i))}function SF(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?nu(e,t)>=0:!1}function Kh(e,t){return TF(e,t,null,!0),Kh}function TF(e,t,n,r){let i=Vt(),o=Dr(),s=xx(2);if(o.firstUpdatePass&&_F(o,e,s,r),t!==Wo&&Xh(i,s,t)){let a=o.data[Hs()];LF(o,a,i,i[dn],e,i[s+1]=FF(t,n),r,s)}}function NF(e,t){return t>=e.expandoStartIndex}function _F(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[Hs()],s=NF(e,n);jF(o,r)&&t===null&&!s&&(t=!1),t=RF(i,o,t,r),EF(i,o,t,n,s,r)}}function RF(e,t,n,r){let i=Tx(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=lI(null,e,t,n,r),n=vl(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=lI(i,e,t,n,r),o===null){let u=OF(e,t,r);u!==void 0&&Array.isArray(u)&&(u=lI(null,e,t,u[1],r),u=vl(u,t.attrs,r),PF(e,t,r,u))}else o=kF(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function OF(e,t,n){let r=n?t.classBindings:t.styleBindings;if(pu(r)!==0)return e[Xs(r)]}function PF(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Xs(i)]=r}function kF(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++){let s=e[o].hostAttrs;r=vl(r,s,n)}return vl(r,t.attrs,n)}function lI(e,t,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=t[a],r=vl(r,o.hostAttrs,i),o!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function vl(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?i=s:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),KD(e,s,n?!0:t[++o]))}return e===void 0?null:e}function LF(e,t,n,r,i,o,s,a){if(!(t.type&3))return;let u=e.data,l=u[a+1],f=xF(l)?pE(u,t,n,i,pu(l),s):void 0;if(!Bh(f)){Bh(o)||bF(l)&&(o=pE(u,null,n,i,a,s));let d=Oy(Hs(),n);BL(r,s,d,i,o)}}function pE(e,t,n,r,i,o){let s=t===null,a;for(;i>0;){let u=e[i],l=Array.isArray(u),f=l?u[1]:u,d=f===null,m=n[i+1];m===Wo&&(m=d?Pr:void 0);let I=d?dh(m,r):f===r?m:void 0;if(l&&!Bh(I)&&(I=dh(u,r)),Bh(I)&&(a=I,s))return a;let C=e[i+1];i=s?Xs(C):pu(C)}if(t!==null){let u=o?t.residualClasses:t.residualStyles;u!=null&&(a=dh(u,r))}return a}function Bh(e){return e!==void 0}function FF(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=Qc(HE(e)))),e}function jF(e,t){return(e.flags&(t?8:16))!==0}function yt(e,t=""){let n=Vt(),r=Dr(),i=e+br,o=r.firstCreatePass?tC(r,i,1,t,null):r.data[i],s=BF(r,n,o,t);n[i]=s,Ch()&&$I(r,n,s,o),cu(o,!1)}var BF=(e,t,n,r)=>(Ah(!0),eL(t[dn],r));function VF(e,t,n,r=""){return Xh(e,ph(),n)?t+WD(n)+r:Wo}function Dl(e){return hC("",e),Dl}function hC(e,t,n){let r=Vt(),i=VF(r,e,t,n);return i!==Wo&&zF(r,Hs(),i),hC}function zF(e,t,n){let r=Oy(t,e);tL(e[dn],r,n)}function Ti(e,t,n){sC(t)&&(t=t());let r=Vt(),i=ph();if(Xh(r,i,t)){let o=Dr(),s=$y();aM(s,r,e,t,r[dn],n)}return Ti}function eo(e,t){let n=sC(e);return n&&e.set(t),n}function Ni(e,t){let n=Vt(),r=Dr(),i=xr();return BM(r,n,n[dn],i,e,t),Ni}function mE(e,t,n){let r=Dr();r.firstCreatePass&&VM(t,r.data,r.blueprint,$i(e),n)}function VM(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let o=0;o<e.length;o++)VM(e[o],t,n,r,i);else{let o=Dr(),s=Vt(),a=xr(),u=Ps(e)?e:kn(e.provide),l=Ty(e),f=a.providerIndexes&1048575,d=a.directiveStart,m=a.providerIndexes>>20;if(Ps(e)||!e.multi){let I=new Ws(l,i,wt,null),C=fI(u,t,i?f:f+m,d);C===-1?(gI(_h(a,s),o,u),dI(o,e,t.length),t.push(u),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(I),s.push(I)):(n[C]=I,s[C]=I)}else{let I=fI(u,t,f+m,d),C=fI(u,t,f,f+m),M=I>=0&&n[I],E=C>=0&&n[C];if(i&&!E||!i&&!M){gI(_h(a,s),o,u);let N=HF(i?UF:GF,n.length,i,r,l,e);!i&&E&&(n[C].providerFactory=N),dI(o,e,t.length,0),t.push(u),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(N),s.push(N)}else{let N=zM(n[i?C:I],l,!i&&r);dI(o,e,I>-1?I:C,N)}!i&&r&&E&&n[C].componentProviders++}}}function dI(e,t,n,r){let i=Ps(t),o=ix(t);if(i||o){let u=(o?kn(t.useClass):t).prototype.ngOnDestroy;if(u){let l=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let f=l.indexOf(n);f===-1?l.push(n,[r,u]):l[f+1].push(r,u)}else l.push(n,u)}}}function zM(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function fI(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function GF(e,t,n,r,i){return LI(this.multi,[])}function UF(e,t,n,r,i){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,u=gl(r,r[We],this.providerFactory.index,i);s=u.slice(0,a),LI(o,s);for(let l=a;l<u.length;l++)s.push(u[l])}else s=[],LI(o,s);return s}function LI(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function HF(e,t,n,r,i,o){let s=new Ws(e,n,wt,null);return s.multi=[],s.index=t,s.componentProviders=0,zM(s,i,r&&!n),s}function Ks(e,t){return n=>{n.providersResolver=(r,i)=>mE(r,i?i(e):e,!1),t&&(n.viewProvidersResolver=(r,i)=>mE(r,i?i(t):t,!0))}}var Vh=class{ngModuleFactory;componentFactories;constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},gC=(()=>{class e{compileModuleSync(n){return new jh(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),i=Cy(n),o=$E(i.declarations).reduce((s,a)=>{let u=Lo(a);return u&&s.push(new gu(u)),s},[]);return new Vh(r,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var GM=(()=>{class e{applicationErrorHandler=pe(xi);appRef=pe(qo);taskService=pe(Uo);ngZone=pe(Yn);zonelessEnabled=pe(cl);tracing=pe(Yo,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Rn;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(qc):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(pe(tI,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?Fx:Jy;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(qc+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function UM(){return[{provide:Ls,useExisting:GM},{provide:Yn,useClass:Jc},{provide:cl,useValue:!0}]}function ZF(){return typeof $localize<"u"&&$localize.locale||bl}var eg=new Oe("",{factory:()=>pe(eg,{optional:!0,skipSelf:!0})||ZF()});function qn(e){return BD(e)}function ea(e,t){return Nf(e,t?.equal)}var $M=Symbol("InputSignalNode#UNSET"),fj=lt(Ce({},_f),{transformFn:void 0,applyValueToInputSignal(e,t){Wa(e,t)}});function XM(e,t){let n=Object.create(fj);n.value=e,n.transformFn=t?.transform;function r(){if(Ua(n),n.value===$M){let i=null;throw new Me(-950,i)}return n.value}return r[Wn]=n,r}function HM(e,t){return XM(e,t)}function hj(e){return XM($M,e)}var qM=(HM.required=hj,HM);var pC=new Oe(""),gj=new Oe("");function xl(e){return!e.moduleRef}function pj(e){let t=xl(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Yn);return n.run(()=>{xl(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(xi),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),xl(e)){let o=()=>t.destroy(),s=e.platformInjector.get(pC);s.add(o),t.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(pC);s.add(o),e.moduleRef.onDestroy(()=>{fl(e.allPlatformModules,e.moduleRef),i.unsubscribe(),s.delete(o)})}return vj(r,n,()=>{let o=t.get(Uo),s=o.add(),a=t.get(cC);return a.runInitializers(),a.donePromise.then(()=>{let u=t.get(eg,bl);if(jM(u||bl),!t.get(gj,!0))return xl(e)?t.get(qo):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(xl(e)){let f=t.get(qo);return e.rootComponent!==void 0&&f.bootstrap(e.rootComponent),f}else return mj?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{o.remove(s)})})})}var mj;function vj(e,t,n){try{let r=n();return Xo(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var tg=null;function yj(e=[],t){return kr.create({name:t,providers:[{provide:tl,useValue:"platform"},{provide:pC,useValue:new Set([()=>tg=null])},...e]})}function Ij(e=[]){if(tg)return tg;let t=yj(e);return tg=t,LM(),Cj(t),t}function Cj(e){let t=e.get(Gh,null);$n(e,()=>{t?.forEach(n=>n())})}var Aj=1e4;var hee=Aj-1e3;var Iu=(()=>{class e{static __NG_ELEMENT_ID__=wj}return e})();function wj(e){return bj(xr(),Vt(),(e&16)===16)}function bj(e,t,n){if(mo(e)&&!n){let r=ti(e.index,t);return new Ho(r,r)}else if(e.type&175){let r=t[Kr];return new Ho(r,t)}return null}var mC=class{supports(t){return nC(t)}create(t){return new vC(t)}},Dj=(e,t)=>t,vC=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(t){this._trackByFn=t||Dj}forEachItem(t){let n;for(n=this._itHead;n!==null;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,r=this._removalsHead,i=0,o=null;for(;n||r;){let s=!r||n&&n.currentIndex<ZM(r,i,o)?n:r,a=ZM(s,i,o),u=s.currentIndex;if(s===r)i--,r=r._nextRemoved;else if(n=n._next,s.previousIndex==null)i++;else{o||(o=[]);let l=a-i,f=u-i;if(l!=f){for(let m=0;m<l;m++){let I=m<o.length?o[m]:o[m]=0,C=I+m;f<=C&&C<l&&(o[m]=I+1)}let d=s.previousIndex;o[d]=f-l}}a!==u&&t(s,a,u)}}forEachPreviousItem(t){let n;for(n=this._previousItHead;n!==null;n=n._nextPrevious)t(n)}forEachAddedItem(t){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)t(n)}forEachMovedItem(t){let n;for(n=this._movesHead;n!==null;n=n._nextMoved)t(n)}forEachRemovedItem(t){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)t(n)}forEachIdentityChange(t){let n;for(n=this._identityChangesHead;n!==null;n=n._nextIdentityChange)t(n)}diff(t){if(t==null&&(t=[]),!nC(t))throw new Me(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let n=this._itHead,r=!1,i,o,s;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),n===null||!Object.is(n.trackById,s)?(n=this._mismatch(n,o,s,a),r=!0):(r&&(n=this._verifyReinsertion(n,o,s,a)),Object.is(n.item,o)||this._addIdentityChange(n,o)),n=n._next}else i=0,EM(t,a=>{s=this._trackByFn(i,a),n===null||!Object.is(n.trackById,s)?(n=this._mismatch(n,a,s,i),r=!0):(r&&(n=this._verifyReinsertion(n,a,s,i)),Object.is(n.item,a)||this._addIdentityChange(n,a)),n=n._next,i++}),this.length=i;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,r,i){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,o,i)):(t=this._linkedRecords===null?null:this._linkedRecords.get(r,i),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,o,i)):t=this._addAfter(new yC(n,r),o,i)),t}_verifyReinsertion(t,n,r,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return o!==null?t=this._reinsertAfter(o,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;t!==null;){let n=t._next;this._addToRemovals(this._unlink(t)),t=n}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let i=t._prevRemoved,o=t._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(t,n,r),this._addToMoves(t,r),t}_moveAfter(t,n,r){return this._unlink(t),this._insertAfter(t,n,r),this._addToMoves(t,r),t}_addAfter(t,n,r){return this._insertAfter(t,n,r),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,n,r){let i=n===null?this._itHead:n._next;return t._next=i,t._prev=n,i===null?this._itTail=t:i._prev=t,n===null?this._itHead=t:n._next=t,this._linkedRecords===null&&(this._linkedRecords=new ng),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let n=t._prev,r=t._next;return n===null?this._itHead=r:n._next=r,r===null?this._itTail=n:r._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new ng),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},yC=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(t,n){this.item=t,this.trackById=n}},IC=class{_head=null;_tail=null;add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let r;for(r=this._head;r!==null;r=r._nextDup)if((n===null||n<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){let n=t._prevDup,r=t._nextDup;return n===null?this._head=r:n._nextDup=r,r===null?this._tail=n:r._prevDup=n,this._head===null}},ng=class{map=new Map;put(t){let n=t.trackById,r=this.map.get(n);r||(r=new IC,this.map.set(n,r)),r.add(t)}get(t,n){let r=t,i=this.map.get(r);return i?i.get(t,n):null}remove(t){let n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function ZM(e,t,n){let r=e.previousIndex;if(r===null)return r;let i=0;return n&&r<n.length&&(i=n[r]),r+t+i}function WM(){return new CC([new mC])}var CC=(()=>{class e{factories;static \u0275prov=ke({token:e,providedIn:"root",factory:WM});constructor(n){this.factories=n}static create(n,r){if(r!=null){let i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:()=>{let r=pe(e,{optional:!0,skipSelf:!0});return e.create(n,r||WM())}}}find(n){let r=this.factories.find(i=>i.supports(n));if(r!=null)return r;throw new Me(901,!1)}}return e})();function JM(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;Nt(At.BootstrapApplicationStart);try{let o=i?.injector??Ij(r),s=[UM(),Bx,...n||[]],a=new ml({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return pj({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Nt(At.BootstrapApplicationEnd)}}function AC(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}var QM=null;function oi(){return QM}function wC(e){QM??=e}var El=class{},rg=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(KM),providedIn:"platform"})}return e})();var KM=(()=>{class e extends rg{_location;_history;_doc=pe(Cn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return oi().getBaseHref(this._doc)}onPopState(n){let r=oi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=oi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function nS(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function eS(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function Jo(e){return e&&e[0]!=="?"?`?${e}`:e}var ig=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(Ej),providedIn:"root"})}return e})(),xj=new Oe(""),Ej=(()=>{class e extends ig{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??pe(Cn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return nS(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Jo(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Jo(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Jo(o));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(r){return new(r||e)(tt(rg),tt(xj,8))};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Cu=(()=>{class e{_subject=new vn;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=Tj(eS(tS(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Jo(r))}normalize(n){return e.stripTrailingSlash(Sj(this._basePath,tS(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Jo(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Jo(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Jo;static joinWithSlash=nS;static stripTrailingSlash=eS;static \u0275fac=function(r){return new(r||e)(tt(ig))};static \u0275prov=ke({token:e,factory:()=>Mj(),providedIn:"root"})}return e})();function Mj(){return new Cu(tt(ig))}function Sj(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function tS(e){return e.replace(/\/index.html$/,"")}function Tj(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var og=class{$implicit;ngForOf;index;count;constructor(t,n,r,i){this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},ag=(()=>{class e{_viewContainer;_template;_differs;set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(n,r,i){this._viewContainer=n,this._template=r,this._differs=i}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;!this._differ&&n&&(this._differ=this._differs.find(n).create(this.ngForTrackBy))}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let r=this._viewContainer;n.forEachOperation((i,o,s)=>{if(i.previousIndex==null)r.createEmbeddedView(this._template,new og(i.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)r.remove(o===null?void 0:o);else if(o!==null){let a=r.get(o);r.move(a,s),rS(a,i)}});for(let i=0,o=r.length;i<o;i++){let a=r.get(i).context;a.index=i,a.count=o,a.ngForOf=this._ngForOf}n.forEachIdentityChange(i=>{let o=r.get(i.currentIndex);rS(o,i)})}static ngTemplateContextGuard(n,r){return!0}static \u0275fac=function(r){return new(r||e)(wt(vo),wt(Zo),wt(CC))};static \u0275dir=Ln({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return e})();function rS(e,t){e.context.$implicit=t.item}var bC=(()=>{class e{_viewContainer;_context=new sg;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(n,r){this._viewContainer=n,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){iS(n,!1),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){iS(n,!1),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(n,r){return!0}static \u0275fac=function(r){return new(r||e)(wt(vo),wt(Zo))};static \u0275dir=Ln({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return e})(),sg=class{$implicit=null;ngIf=null};function iS(e,t){if(e&&!e.createEmbeddedView)throw new Me(2020,!1)}var ug=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=$o({type:e});static \u0275inj=go({})}return e})();function DC(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var Ml=class{};var oS="browser";var Sl=class{_doc;constructor(t){this._doc=t}manager},cg=(()=>{class e extends Sl{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||e)(tt(Cn))};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})(),fg=new Oe(""),SC=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let i=n.filter(s=>!(s instanceof cg));this._plugins=i.slice().reverse();let o=n.find(s=>s instanceof cg);o&&this._plugins.push(o)}addEventListener(n,r,i,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new Me(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(tt(fg),tt(Yn))};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})(),xC="ng-app-id";function sS(e){for(let t of e)t.remove()}function aS(e,t){let n=t.createElement("style");return n.textContent=e,n}function _j(e,t,n,r){let i=e.head?.querySelectorAll(`style[${xC}="${t}"],link[${xC}="${t}"]`);if(i)for(let o of i)o.removeAttribute(xC),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function MC(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var TC=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,_j(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,aS);r?.forEach(i=>this.addUsage(i,this.external,MC))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(sS(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])sS(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,aS(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,MC(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(tt(Cn),tt(zh),tt(Uh,8),tt(Il))};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})(),EC={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},NC=/%COMP%/g;var cS="%COMP%",Rj=`_nghost-${cS}`,Oj=`_ngcontent-${cS}`,Pj=!0,kj=new Oe("",{factory:()=>Pj});function Lj(e){return Oj.replace(NC,e)}function Fj(e){return Rj.replace(NC,e)}function lS(e,t){return t.map(n=>n.replace(NC,e))}var _C=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(n,r,i,o,s,a,u=null,l=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=u,this.tracingService=l,this.defaultRenderer=new Tl(n,s,a,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(n,r);return i instanceof dg?i.applyToHost(n):i instanceof Nl&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case Mi.Emulated:o=new dg(u,l,r,this.appId,f,s,a,d);break;case Mi.ShadowDom:return new lg(u,n,r,s,a,this.nonce,d,l);case Mi.ExperimentalIsolatedShadowDom:return new lg(u,n,r,s,a,this.nonce,d);default:o=new Nl(u,l,r,f,s,a,d);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(tt(SC),tt(TC),tt(zh),tt(kj),tt(Cn),tt(Yn),tt(Uh),tt(Yo,8))};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})(),Tl=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(EC[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(uS(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(uS(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new Me(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;let o=EC[i];o?t.setAttributeNS(o,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let i=EC[r];i?t.removeAttributeNS(i,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(Ji.DashCase|Ji.Important)?t.style.setProperty(n,r,i&Ji.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&Ji.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,i){if(typeof t=="string"&&(t=oi().getGlobalEventTarget(this.doc,t),!t))throw new Me(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,n,o)),this.eventManager.addEventListener(t,n,o,i)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;t(n)===!1&&n.preventDefault()}}};function uS(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var lg=class extends Tl{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,i,o,s,a,u){super(t,i,o,a),this.hostEl=n,this.sharedStylesHost=u,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=lS(r.id,l);for(let d of l){let m=document.createElement("style");s&&m.setAttribute("nonce",s),m.textContent=d,this.shadowRoot.appendChild(m)}let f=r.getExternalStyles?.();if(f)for(let d of f){let m=MC(d,i);s&&m.setAttribute("nonce",s),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Nl=class extends Tl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,i,o,s,a,u){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i;let l=r.styles;this.styles=u?lS(u,l):l,this.styleUrls=r.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&hu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},dg=class extends Nl{contentAttr;hostAttr;constructor(t,n,r,i,o,s,a,u){let l=i+"-"+r.id;super(t,n,r,o,s,a,u,l),this.contentAttr=Lj(l),this.hostAttr=Fj(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}};var hg=class e extends El{supportsDOMEvents=!0;static makeCurrent(){wC(new e)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=jj();return n==null?null:Bj(n)}resetBaseElement(){_l=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return DC(document.cookie,t)}},_l=null;function jj(){return _l=_l||document.head.querySelector("base"),_l?_l.getAttribute("href"):null}function Bj(e){return new URL(e,document.baseURI).pathname}var Vj=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})(),dS=["alt","control","meta","shift"],zj={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Gj={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},fS=(()=>{class e extends Sl{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>oi().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),dS.forEach(l=>{let f=r.indexOf(l);f>-1&&(r.splice(f,1),s+=l+".")}),s+=o,r.length!=0||o.length===0)return null;let u={};return u.domEventName=i,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let i=zj[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),dS.forEach(s=>{if(s!==i){let a=Gj[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(tt(Cn))};static \u0275prov=ke({token:e,factory:e.\u0275fac})}return e})();async function RC(e,t,n){let r=Ce({rootComponent:e},Uj(t,n));return JM(r)}function Uj(e,t){return{platformRef:t?.platformRef,appProviders:[...$j,...e?.providers??[]],platformProviders:Yj}}function Hj(){hg.makeCurrent()}function Zj(){return new Hi}function Wj(){return BI(document),document}var Yj=[{provide:Il,useValue:oS},{provide:Gh,useValue:Hj,multi:!0},{provide:Cn,useFactory:Wj}];var $j=[{provide:tl,useValue:"root"},{provide:Hi,useFactory:Zj},{provide:fg,useClass:cg,multi:!0},{provide:fg,useClass:fS,multi:!0},_C,TC,SC,{provide:Ys,useExisting:_C},{provide:Ml,useClass:Vj},[]];var hS=(()=>{class e{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static \u0275fac=function(r){return new(r||e)(tt(Cn))};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ye="primary",Zl=Symbol("RouteTitle"),FC=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function na(e){return new FC(e)}function OC(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(i[0]===":")n[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function AS(e,t,n){let r=n.path.split("/"),i=r.indexOf("**");if(i===-1){if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.length<e.length))return null;let u={},l=e.slice(0,r.length);return OC(r,l,u)?{consumed:l,posParams:u}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),s=r.slice(i+1);if(o.length+s.length>e.length||n.pathMatch==="full"&&t.hasChildren()&&n.path!=="**")return null;let a={};return!OC(o,e.slice(0,o.length),a)||!OC(s,e.slice(e.length-s.length),a)?null:{consumed:e,posParams:a}}function Ig(e){return new Promise((t,n)=>{e.pipe(fo()).subscribe({next:r=>t(r),error:r=>n(r)})})}function qj(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!to(e[n],t[n]))return!1;return!0}function to(e,t){let n=e?jC(e):void 0,r=t?jC(t):void 0;if(!n||!r||n.length!=r.length)return!1;let i;for(let o=0;o<n.length;o++)if(i=n[o],!wS(e[i],t[i]))return!1;return!0}function jC(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e)]}function wS(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((i,o)=>r[o]===i)}else return e===t}function Jj(e){return e.length>0?e[e.length-1]:null}function oa(e){return qf(e)?e:Xo(e)?cn(Promise.resolve(e)):dt(e)}function bS(e){return qf(e)?Ig(e):Promise.resolve(e)}var Qj={exact:ES,subset:MS},DS={exact:Kj,subset:e3,ignored:()=>!0},xS={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},BC={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function gS(e,t,n){return Qj[n.paths](e.root,t.root,n.matrixParams)&&DS[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function Kj(e,t){return to(e,t)}function ES(e,t,n){if(!ta(e.segments,t.segments)||!mg(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!ES(e.children[r],t.children[r],n))return!1;return!0}function e3(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>wS(e[n],t[n]))}function MS(e,t,n){return SS(e,t,t.segments,n)}function SS(e,t,n,r){if(e.segments.length>n.length){let i=e.segments.slice(0,n.length);return!(!ta(i,n)||t.hasChildren()||!mg(i,n,r))}else if(e.segments.length===n.length){if(!ta(e.segments,n)||!mg(e.segments,n,r))return!1;for(let i in t.children)if(!e.children[i]||!MS(e.children[i],t.children[i],r))return!1;return!0}else{let i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!ta(e.segments,i)||!mg(e.segments,i,r)||!e.children[Ye]?!1:SS(e.children[Ye],t,o,r)}}function mg(e,t,n){return t.every((r,i)=>DS[n](e[i].parameters,r.parameters))}var ai=class{root;queryParams;fragment;_queryParamMap;constructor(t=new xt([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){return r3.serialize(this)}},xt=class{segments;children;parent=null;constructor(t,n){this.segments=t,this.children=n,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return vg(this)}},Qo=class{path;parameters;_parameterMap;constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap??=na(this.parameters),this._parameterMap}toString(){return NS(this)}};function t3(e,t){return ta(e,t)&&e.every((n,r)=>to(n.parameters,t[r].parameters))}function ta(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function n3(e,t){let n=[];return Object.entries(e.children).forEach(([r,i])=>{r===Ye&&(n=n.concat(t(i,r)))}),Object.entries(e.children).forEach(([r,i])=>{r!==Ye&&(n=n.concat(t(i,r)))}),n}var Wl=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>new Ko,providedIn:"root"})}return e})(),Ko=class{parse(t){let n=new zC(t);return new ai(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n=`/${Rl(t.root,!0)}`,r=s3(t.queryParams),i=typeof t.fragment=="string"?`#${i3(t.fragment)}`:"";return`${n}${r}${i}`}},r3=new Ko;function vg(e){return e.segments.map(t=>NS(t)).join("/")}function Rl(e,t){if(!e.hasChildren())return vg(e);if(t){let n=e.children[Ye]?Rl(e.children[Ye],!1):"",r=[];return Object.entries(e.children).forEach(([i,o])=>{i!==Ye&&r.push(`${i}:${Rl(o,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}else{let n=n3(e,(r,i)=>i===Ye?[Rl(e.children[Ye],!1)]:[`${i}:${Rl(r,!1)}`]);return Object.keys(e.children).length===1&&e.children[Ye]!=null?`${vg(e)}/${n[0]}`:`${vg(e)}/(${n.join("//")})`}}function TS(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function gg(e){return TS(e).replace(/%3B/gi,";")}function i3(e){return encodeURI(e)}function VC(e){return TS(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function yg(e){return decodeURIComponent(e)}function pS(e){return yg(e.replace(/\+/g,"%20"))}function NS(e){return`${VC(e.path)}${o3(e.parameters)}`}function o3(e){return Object.entries(e).map(([t,n])=>`;${VC(t)}=${VC(n)}`).join("")}function s3(e){let t=Object.entries(e).map(([n,r])=>Array.isArray(r)?r.map(i=>`${gg(n)}=${gg(i)}`).join("&"):`${gg(n)}=${gg(r)}`).filter(n=>n);return t.length?`?${t.join("&")}`:""}var a3=/^[^\/()?;#]+/;function PC(e){let t=e.match(a3);return t?t[0]:""}var u3=/^[^\/()?;=#]+/;function c3(e){let t=e.match(u3);return t?t[0]:""}var l3=/^[^=?&#]+/;function d3(e){let t=e.match(l3);return t?t[0]:""}var f3=/^[^&#]+/;function h3(e){let t=e.match(f3);return t?t[0]:""}var zC=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new xt([],{}):new xt([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(t=0){if(t>50)throw new Me(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0,t));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1,t)),(n.length>0||Object.keys(r).length>0)&&(i[Ye]=new xt(n,r)),i}parseSegment(){let t=PC(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new Me(4009,!1);return this.capture(t),new Qo(yg(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=c3(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let i=PC(this.remaining);i&&(r=i,this.capture(r))}t[yg(n)]=yg(r)}parseQueryParam(t){let n=d3(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=h3(this.remaining);s&&(r=s,this.capture(r))}let i=pS(n),o=pS(r);if(t.hasOwnProperty(i)){let s=t[i];Array.isArray(s)||(s=[s],t[i]=s),s.push(o)}else t[i]=o}parseParens(t,n){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=PC(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new Me(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=Ye);let a=this.parseChildren(n+1);r[s??Ye]=Object.keys(a).length===1&&a[Ye]?a[Ye]:new xt([],a),this.consumeOptional("//")}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new Me(4011,!1)}};function _S(e){return e.segments.length>0?new xt([],{[Ye]:e}):e}function RS(e){let t={};for(let[r,i]of Object.entries(e.children)){let o=RS(i);if(r===Ye&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[r]=o)}let n=new xt(e.segments,t);return g3(n)}function g3(e){if(e.numberOfChildren===1&&e.children[Ye]){let t=e.children[Ye];return new xt(e.segments.concat(t.segments),t.children)}return e}function Du(e){return e instanceof ai}function OS(e,t,n=null,r=null,i=new Ko){let o=PS(e);return kS(o,t,n,r,i)}function PS(e){let t;function n(o){let s={};for(let u of o.children){let l=n(u);s[u.outlet]=l}let a=new xt(o.url,s);return o===e&&(t=a),a}let r=n(e.root),i=_S(r);return t??i}function kS(e,t,n,r,i){let o=e;for(;o.parent;)o=o.parent;if(t.length===0)return kC(o,o,o,n,r,i);let s=p3(t);if(s.toRoot())return kC(o,o,new xt([],{}),n,r,i);let a=m3(s,o,e),u=a.processChildren?Pl(a.segmentGroup,a.index,s.commands):FS(a.segmentGroup,a.index,s.commands);return kC(o,a.segmentGroup,u,n,r,i)}function Cg(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function Fl(e){return typeof e=="object"&&e!=null&&e.outlets}function mS(e,t,n){e||="\u0275";let r=new ai;return r.queryParams={[e]:t},n.parse(n.serialize(r)).queryParams[e]}function kC(e,t,n,r,i,o){let s={};for(let[l,f]of Object.entries(r??{}))s[l]=Array.isArray(f)?f.map(d=>mS(l,d,o)):mS(l,f,o);let a;e===t?a=n:a=LS(e,t,n);let u=_S(RS(a));return new ai(u,s,i)}function LS(e,t,n){let r={};return Object.entries(e.children).forEach(([i,o])=>{o===t?r[i]=n:r[i]=LS(o,t,n)}),new xt(e.segments,r)}var Ag=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&Cg(r[0]))throw new Me(4003,!1);let i=r.find(Fl);if(i&&i!==Jj(r))throw new Me(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function p3(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new Ag(!0,0,e);let t=0,n=!1,r=e.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,l])=>{a[u]=typeof l=="string"?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?n=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new Ag(n,t,r)}var wu=class{segmentGroup;processChildren;index;constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function m3(e,t,n){if(e.isAbsolute)return new wu(t,!0,0);if(!n)return new wu(t,!1,NaN);if(n.parent===null)return new wu(n,!0,0);let r=Cg(e.commands[0])?0:1,i=n.segments.length-1+r;return v3(n,i,e.numberOfDoubleDots)}function v3(e,t,n){let r=e,i=t,o=n;for(;o>i;){if(o-=i,r=r.parent,!r)throw new Me(4005,!1);i=r.segments.length}return new wu(r,!1,i-o)}function y3(e){return Fl(e[0])?e[0].outlets:{[Ye]:e}}function FS(e,t,n){if(e??=new xt([],{}),e.segments.length===0&&e.hasChildren())return Pl(e,t,n);let r=I3(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<e.segments.length){let o=new xt(e.segments.slice(0,r.pathIndex),{});return o.children[Ye]=new xt(e.segments.slice(r.pathIndex),e.children),Pl(o,0,i)}else return r.match&&i.length===0?new xt(e.segments,{}):r.match&&!e.hasChildren()?GC(e,t,n):r.match?Pl(e,0,i):GC(e,t,n)}function Pl(e,t,n){if(n.length===0)return new xt(e.segments,{});{let r=y3(n),i={};if(Object.keys(r).some(o=>o!==Ye)&&e.children[Ye]&&e.numberOfChildren===1&&e.children[Ye].segments.length===0){let o=Pl(e.children[Ye],t,n);return new xt(e.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=FS(e.children[o],t,s))}),Object.entries(e.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new xt(e.segments,i)}}function I3(e,t,n){let r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};for(;i<e.segments.length;){if(r>=n.length)return o;let s=e.segments[i],a=n[r];if(Fl(a))break;let u=`${a}`,l=r<n.length-1?n[r+1]:null;if(i>0&&u===void 0)break;if(u&&l&&typeof l=="object"&&l.outlets===void 0){if(!yS(u,l,s))return o;r+=2}else{if(!yS(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function GC(e,t,n){let r=e.segments.slice(0,t),i=0;for(;i<n.length;){let o=n[i];if(Fl(o)){let u=C3(o.outlets);return new xt(r,u)}if(i===0&&Cg(n[0])){let u=e.segments[t];r.push(new Qo(u.path,vS(n[0]))),i++;continue}let s=Fl(o)?o.outlets[Ye]:`${o}`,a=i<n.length-1?n[i+1]:null;s&&a&&Cg(a)?(r.push(new Qo(s,vS(a))),i+=2):(r.push(new Qo(s,{})),i++)}return new xt(r,{})}function C3(e){let t={};return Object.entries(e).forEach(([n,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=GC(new xt([],{}),0,r))}),t}function vS(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function yS(e,t,n){return e==n.path&&to(t,n.parameters)}var kl="imperative",xn=(function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e})(xn||{}),jr=class{id;url;constructor(t,n){this.id=t,this.url=n}},ra=class extends jr{type=xn.NavigationStart;navigationTrigger;restoredState;constructor(t,n,r="imperative",i=null){super(t,n),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Io=class extends jr{urlAfterRedirects;type=xn.NavigationEnd;constructor(t,n,r){super(t,n),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Jn=(function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e[e.Aborted=4]="Aborted",e})(Jn||{}),jl=(function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e})(jl||{}),si=class extends jr{reason;code;type=xn.NavigationCancel;constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function jS(e){return e instanceof si&&(e.code===Jn.Redirect||e.code===Jn.SupersededByNewNavigation)}var Co=class extends jr{reason;code;type=xn.NavigationSkipped;constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i}},ia=class extends jr{error;target;type=xn.NavigationError;constructor(t,n,r,i){super(t,n),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Bl=class extends jr{urlAfterRedirects;state;type=xn.RoutesRecognized;constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},wg=class extends jr{urlAfterRedirects;state;type=xn.GuardsCheckStart;constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},bg=class extends jr{urlAfterRedirects;state;shouldActivate;type=xn.GuardsCheckEnd;constructor(t,n,r,i,o){super(t,n),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Dg=class extends jr{urlAfterRedirects;state;type=xn.ResolveStart;constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},xg=class extends jr{urlAfterRedirects;state;type=xn.ResolveEnd;constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Eg=class{route;type=xn.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Mg=class{route;type=xn.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Sg=class{snapshot;type=xn.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Tg=class{snapshot;type=xn.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ng=class{snapshot;type=xn.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},_g=class{snapshot;type=xn.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var xu=class{},Vl=class{},Eu=class{url;navigationBehaviorOptions;constructor(t,n){this.url=t,this.navigationBehaviorOptions=n}};function A3(e){return!(e instanceof xu)&&!(e instanceof Eu)&&!(e instanceof Vl)}var Rg=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Nu(this.rootInjector)}},Nu=(()=>{class e{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,r){let i=this.getOrCreateContext(n);i.outlet=r,this.contexts.set(n,i)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Rg(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static \u0275fac=function(r){return new(r||e)(tt(In))};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Og=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=UC(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=UC(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=HC(t,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return HC(t,this._root).map(n=>n.value)}};function UC(e,t){if(e===t.value)return t;for(let n of t.children){let r=UC(e,n);if(r)return r}return null}function HC(e,t){if(e===t.value)return[t];for(let n of t.children){let r=HC(e,n);if(r.length)return r.unshift(t),r}return[]}var Fr=class{value;children;constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}};function Au(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var zl=class extends Og{snapshot;constructor(t,n){super(t),this.snapshot=n,KC(this,t)}toString(){return this.snapshot.toString()}};function BS(e,t){let n=w3(e,t),r=new On([new Qo("",{})]),i=new On({}),o=new On({}),s=new On({}),a=new On(""),u=new es(r,i,s,a,o,Ye,e,n.root);return u.snapshot=n.root,new zl(new Fr(u,[]),n)}function w3(e,t){let n={},r={},i={},s=new Mu([],n,i,"",r,Ye,e,null,{},t);return new Gl("",new Fr(s,[]))}var es=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,n,r,i,o,s,a,u){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(en(l=>l[Zl]))??dt(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(en(t=>na(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(en(t=>na(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function QC(e,t,n="emptyOnly"){let r,{routeConfig:i}=e;return t!==null&&(n==="always"||i?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:Ce(Ce({},t.params),e.params),data:Ce(Ce({},t.data),e.data),resolve:Ce(Ce(Ce(Ce({},e.data),t.data),i?.data),e._resolvedData)}:r={params:Ce({},e.params),data:Ce({},e.data),resolve:Ce(Ce({},e.data),e._resolvedData??{})},i&&zS(i)&&(r.resolve[Zl]=i.title),r}var Mu=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Zl]}constructor(t,n,r,i,o,s,a,u,l,f){this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=l,this._environmentInjector=f}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=na(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${n}')`}},Gl=class extends Og{url;constructor(t,n){super(n),this.url=t,KC(this,n)}toString(){return VS(this._root)}};function KC(e,t){t.value._routerState=e,t.children.forEach(n=>KC(e,n))}function VS(e){let t=e.children.length>0?` { ${e.children.map(VS).join(", ")} } `:"";return`${e.value}${t}`}function LC(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,to(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),to(t.params,n.params)||e.paramsSubject.next(n.params),qj(t.url,n.url)||e.urlSubject.next(n.url),to(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function ZC(e,t){let n=to(e.params,t.params)&&t3(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||ZC(e.parent,t.parent))}function zS(e){return typeof e.title=="string"||e.title===null}var GS=new Oe(""),Yl=(()=>{class e{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Ye;activateEvents=new yn;deactivateEvents=new yn;attachEvents=new yn;detachEvents=new yn;routerOutletData=qM();parentContexts=pe(Nu);location=pe(vo);changeDetector=pe(Iu);inputBinder=pe(Fg,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:i}=n.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Me(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Me(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Me(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new Me(4013,!1);this._activatedRoute=n;let i=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new WC(n,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Ln({type:e,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[mu]})}return e})(),WC=class{route;childContexts;parent;outletData;constructor(t,n,r,i){this.route=t,this.childContexts=n,this.parent=r,this.outletData=i}get(t,n){return t===es?this.route:t===Nu?this.childContexts:t===GS?this.outletData:this.parent.get(t,n)}},Fg=new Oe("");var e0=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Js({type:e,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Zt(0,"router-outlet")},dependencies:[Yl],encapsulation:2})}return e})();function t0(e){let t=e.children&&e.children.map(t0),n=t?lt(Ce({},e),{children:t}):Ce({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==Ye&&(n.component=e0),n}function b3(e,t,n){let r=Ul(e,t._root,n?n._root:void 0);return new zl(r,t)}function Ul(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let i=D3(e,t,n);return new Fr(r,i)}else{if(e.shouldAttach(t.value)){let o=e.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Ul(e,a)),s}}let r=x3(t.value),i=t.children.map(o=>Ul(e,o));return new Fr(r,i)}}function D3(e,t,n){return t.children.map(r=>{for(let i of n.children)if(e.shouldReuseRoute(r.value,i.value.snapshot))return Ul(e,r,i);return Ul(e,r)})}function x3(e){return new es(new On(e.url),new On(e.params),new On(e.queryParams),new On(e.fragment),new On(e.data),e.outlet,e.component,e)}var Su=class{redirectTo;navigationBehaviorOptions;constructor(t,n){this.redirectTo=t,this.navigationBehaviorOptions=n}},US="ngNavigationCancelingError";function Pg(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=Du(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=HS(!1,Jn.Redirect);return i.url=n,i.navigationBehaviorOptions=r,i}function HS(e,t){let n=new Error(`NavigationCancelingError: ${e||""}`);return n[US]=!0,n.cancellationCode=t,n}function E3(e){return ZS(e)&&Du(e.url)}function ZS(e){return!!e&&e[US]}var YC=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,n,r,i,o){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),LC(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let i=Au(n);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else o&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),i=r&&t.value.component?r.children:n,o=Au(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),i=r&&t.value.component?r.children:n,o=Au(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let i=Au(n);t.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new _g(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Tg(t.value.snapshot))}activateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(LC(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),LC(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,r)}},kg=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},bu=class{component;route;constructor(t,n){this.component=t,this.route=n}};function M3(e,t,n){let r=e._root,i=t?t._root:null;return Ol(r,i,n,[r.value])}function S3(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function _u(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!gy(e)?e:t.get(e):r}function Ol(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=Au(t);return e.children.forEach(s=>{T3(s,o[s.value.outlet],n,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ll(a,n.getContext(s),i)),i}function T3(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=N3(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new kg(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ol(e,t,a?a.children:null,r,i):Ol(e,t,n,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new bu(a.outlet.component,s))}else s&&Ll(t,a,i),i.canActivateChecks.push(new kg(r)),o.component?Ol(e,null,a?a.children:null,r,i):Ol(e,null,n,r,i);return i}function N3(e,t,n){if(typeof n=="function")return $n(t._environmentInjector,()=>n(e,t));switch(n){case"pathParamsChange":return!ta(e.url,t.url);case"pathParamsOrQueryParamsChange":return!ta(e.url,t.url)||!to(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ZC(e,t)||!to(e.queryParams,t.queryParams);default:return!ZC(e,t)}}function Ll(e,t,n){let r=Au(e),i=e.value;Object.entries(r).forEach(([o,s])=>{i.component?t?Ll(s,t.children.getContext(o),n):Ll(s,null,n):Ll(s,t,n)}),i.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new bu(t.outlet.component,i)):n.canDeactivateChecks.push(new bu(null,i)):n.canDeactivateChecks.push(new bu(null,i))}function $l(e){return typeof e=="function"}function _3(e){return typeof e=="boolean"}function R3(e){return e&&$l(e.canLoad)}function O3(e){return e&&$l(e.canActivate)}function P3(e){return e&&$l(e.canActivateChild)}function k3(e){return e&&$l(e.canDeactivate)}function L3(e){return e&&$l(e.canMatch)}function WS(e){return e instanceof Ns||e?.name==="EmptyError"}var pg=Symbol("INITIAL_VALUE");function Tu(){return Ai(e=>Wv(e.map(t=>t.pipe(lo(1),Xv(pg)))).pipe(en(t=>{for(let n of t)if(n!==!0){if(n===pg)return pg;if(n===!1||F3(n))return n}return!0}),co(t=>t!==pg),lo(1)))}function F3(e){return Du(e)||e instanceof Su}function YS(e){return e.aborted?dt(void 0).pipe(lo(1)):new Ct(t=>{let n=()=>{t.next(),t.complete()};return e.addEventListener("abort",n),()=>e.removeEventListener("abort",n)})}function $S(e){return Wc(YS(e))}function j3(e){return sr(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=t;return o.length===0&&i.length===0?dt(lt(Ce({},t),{guardsResult:!0})):B3(o,n,r).pipe(sr(s=>s&&_3(s)?V3(n,i,e):dt(s)),en(s=>lt(Ce({},t),{guardsResult:s})))})}function B3(e,t,n){return cn(e).pipe(sr(r=>Z3(r.component,r.route,n,t)),fo(r=>r!==!0,!0))}function V3(e,t,n){return cn(t).pipe(eh(r=>Qa(G3(r.route.parent,n),z3(r.route,n),H3(e,r.path),U3(e,r.route))),fo(r=>r!==!0,!0))}function z3(e,t){return e!==null&&t&&t(new Ng(e)),dt(!0)}function G3(e,t){return e!==null&&t&&t(new Sg(e)),dt(!0)}function U3(e,t){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return dt(!0);let r=n.map(i=>Hc(()=>{let o=t._environmentInjector,s=_u(i,o),a=O3(s)?s.canActivate(t,e):$n(o,()=>s(t,e));return oa(a).pipe(fo())}));return dt(r).pipe(Tu())}function H3(e,t){let n=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(o=>S3(o)).filter(o=>o!==null).map(o=>Hc(()=>{let s=o.guards.map(a=>{let u=o.node._environmentInjector,l=_u(a,u),f=P3(l)?l.canActivateChild(n,e):$n(u,()=>l(n,e));return oa(f).pipe(fo())});return dt(s).pipe(Tu())}));return dt(i).pipe(Tu())}function Z3(e,t,n,r){let i=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!i||i.length===0)return dt(!0);let o=i.map(s=>{let a=t._environmentInjector,u=_u(s,a),l=k3(u)?u.canDeactivate(e,t,n,r):$n(a,()=>u(e,t,n,r));return oa(l).pipe(fo())});return dt(o).pipe(Tu())}function W3(e,t,n,r,i){let o=t.canLoad;if(o===void 0||o.length===0)return dt(!0);let s=o.map(a=>{let u=_u(a,e),l=R3(u)?u.canLoad(t,n):$n(e,()=>u(t,n)),f=oa(l);return i?f.pipe($S(i)):f});return dt(s).pipe(Tu(),XS(r))}function XS(e){return Gv(qr(t=>{if(typeof t!="boolean")throw Pg(e,t)}),en(t=>t===!0))}function Y3(e,t,n,r,i,o){let s=t.canMatch;if(!s||s.length===0)return dt(!0);let a=s.map(u=>{let l=_u(u,e),f=L3(l)?l.canMatch(t,n,i):$n(e,()=>l(t,n,i));return oa(f).pipe($S(o))});return dt(a).pipe(Tu(),XS(r))}var yo=class e extends Error{segmentGroup;constructor(t){super(),this.segmentGroup=t||null,Object.setPrototypeOf(this,e.prototype)}},Hl=class e extends Error{urlTree;constructor(t){super(),this.urlTree=t,Object.setPrototypeOf(this,e.prototype)}};function $3(e){throw new Me(4e3,!1)}function X3(e){throw HS(!1,Jn.GuardRejected)}var $C=class{urlSerializer;urlTree;constructor(t,n){this.urlSerializer=t,this.urlTree=n}async lineralizeSegments(t,n){let r=[],i=n.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[Ye])throw $3(`${t.redirectTo}`);i=i.children[Ye]}}async applyRedirectCommands(t,n,r,i,o){let s=await q3(n,i,o);if(s instanceof ai)throw new Hl(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),t,r);if(s[0]==="/")throw new Hl(a);return a}applyRedirectCreateUrlTree(t,n,r,i){let o=this.createSegmentGroup(t,n.root,r,i);return new ai(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=n[a]}else r[i]=o}),r}createSegmentGroup(t,n,r,i){let o=this.createSegments(t,n.segments,r,i),s={};return Object.entries(n.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(t,u,r,i)}),new xt(o,s)}createSegments(t,n,r,i){return n.map(o=>o.path[0]===":"?this.findPosParam(t,o,i):this.findOrReturn(o,r))}findPosParam(t,n,r){let i=r[n.path.substring(1)];if(!i)throw new Me(4001,!1);return i}findOrReturn(t,n){let r=0;for(let i of n){if(i.path===t.path)return n.splice(r),i;r++}return t}};function q3(e,t,n){if(typeof e=="string")return Promise.resolve(e);let r=e;return Ig(oa($n(n,()=>r(t))))}function J3(e,t){return e.providers&&!e._injector&&(e._injector=wl(e.providers,t,`Route: ${e.path}`)),e._injector??t}function _i(e){return e.outlet||Ye}function Q3(e,t){let n=e.filter(r=>_i(r)===t);return n.push(...e.filter(r=>_i(r)!==t)),n}var XC={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function qS(e){return{routeConfig:e.routeConfig,url:e.url,params:e.params,queryParams:e.queryParams,fragment:e.fragment,data:e.data,outlet:e.outlet,title:e.title,paramMap:e.paramMap,queryParamMap:e.queryParamMap}}function K3(e,t,n,r,i,o,s){let a=JS(e,t,n);if(!a.matched)return dt(a);let u=qS(o(a));return r=J3(t,r),Y3(r,t,n,i,u,s).pipe(en(l=>l===!0?a:Ce({},XC)))}function JS(e,t,n){if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?Ce({},XC):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let i=(t.matcher||AS)(n,e,t);if(!i)return Ce({},XC);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?Ce(Ce({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function IS(e,t,n,r,i){return n.length>0&&nB(e,n,r,i)?{segmentGroup:new xt(t,tB(r,new xt(n,e.children))),slicedSegments:[]}:n.length===0&&rB(e,n,r)?{segmentGroup:new xt(e.segments,eB(e,n,r,e.children)),slicedSegments:n}:{segmentGroup:new xt(e.segments,e.children),slicedSegments:n}}function eB(e,t,n,r){let i={};for(let o of n)if(jg(e,t,o)&&!r[_i(o)]){let s=new xt([],{});i[_i(o)]=s}return Ce(Ce({},r),i)}function tB(e,t){let n={};n[Ye]=t;for(let r of e)if(r.path===""&&_i(r)!==Ye){let i=new xt([],{});n[_i(r)]=i}return n}function nB(e,t,n,r){return n.some(i=>!jg(e,t,i)||!(_i(i)!==Ye)?!1:!(r!==void 0&&_i(i)===r))}function rB(e,t,n){return n.some(r=>jg(e,t,r))}function jg(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function iB(e,t,n){return t.length===0&&!e.children[n]}var qC=class{};async function oB(e,t,n,r,i,o,s="emptyOnly",a){return new JC(e,t,n,r,i,s,o,a).recognize()}var sB=31,JC=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,n,r,i,o,s,a,u){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=u,this.applyRedirects=new $C(this.urlSerializer,this.urlTree)}noMatchError(t){return new Me(4002,`'${t.segmentGroup}'`)}async recognize(){let t=IS(this.urlTree.root,[],[],this.config).segmentGroup,{children:n,rootSnapshot:r}=await this.match(t),i=new Fr(r,n),o=new Gl("",i),s=OS(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(t){let n=new Mu([],Object.freeze({}),Object.freeze(Ce({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Ye,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,t,Ye,n),rootSnapshot:n}}catch(r){if(r instanceof Hl)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof yo?this.noMatchError(r):r}}async processSegmentGroup(t,n,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(t,n,r,o);let s=await this.processSegment(t,n,r,r.segments,i,!0,o);return s instanceof Fr?[s]:[]}async processChildren(t,n,r,i){let o=[];for(let u of Object.keys(r.children))u==="primary"?o.unshift(u):o.push(u);let s=[];for(let u of o){let l=r.children[u],f=Q3(n,u),d=await this.processSegmentGroup(t,f,l,u,i);s.push(...d)}let a=QS(s);return aB(a),a}async processSegment(t,n,r,i,o,s,a){for(let u of n)try{return await this.processSegmentAgainstRoute(u._injector??t,n,u,r,i,o,s,a)}catch(l){if(l instanceof yo||WS(l))continue;throw l}if(iB(r,i,o))return new qC;throw new yo(r)}async processSegmentAgainstRoute(t,n,r,i,o,s,a,u){if(_i(r)!==s&&(s===Ye||!jg(i,o,r)))throw new yo(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(t,i,r,o,s,u);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(t,i,n,r,o,s,u);throw new yo(i)}async expandSegmentAgainstRouteUsingRedirect(t,n,r,i,o,s,a){let{matched:u,parameters:l,consumedSegments:f,positionalParamSegments:d,remainingSegments:m}=JS(n,i,o);if(!u)throw new yo(n);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>sB&&(this.allowRedirects=!1));let I=this.createSnapshot(t,i,o,l,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let C=await this.applyRedirects.applyRedirectCommands(f,i.redirectTo,d,qS(I),t),M=await this.applyRedirects.lineralizeSegments(i,C);return this.processSegment(t,r,n,M.concat(m),s,!1,a)}createSnapshot(t,n,r,i,o){let s=new Mu(r,i,Object.freeze(Ce({},this.urlTree.queryParams)),this.urlTree.fragment,cB(n),_i(n),n.component??n._loadedComponent??null,n,lB(n),t),a=QC(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}async matchSegmentAgainstRoute(t,n,r,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Z=>this.createSnapshot(t,r,Z.consumedSegments,Z.parameters,s),u=await Ig(K3(n,r,i,t,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(n.children={}),!u?.matched)throw new yo(n);t=r._injector??t;let{routes:l}=await this.getChildConfig(t,r,i),f=r._loadedInjector??t,{parameters:d,consumedSegments:m,remainingSegments:I}=u,C=this.createSnapshot(t,r,m,d,s),{segmentGroup:M,slicedSegments:E}=IS(n,m,I,l,o);if(E.length===0&&M.hasChildren()){let Z=await this.processChildren(f,l,M,C);return new Fr(C,Z)}if(l.length===0&&E.length===0)return new Fr(C,[]);let N=_i(r)===o,B=await this.processSegment(f,l,M,E,N?Ye:o,!0,C);return new Fr(C,B instanceof Fr?[B]:[])}async getChildConfig(t,n,r){if(n.children)return{routes:n.children,injector:t};if(n.loadChildren){if(n._loadedRoutes!==void 0){let o=n._loadedNgModuleFactory;return o&&!n._loadedInjector&&(n._loadedInjector=o.create(t).injector),{routes:n._loadedRoutes,injector:n._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await Ig(W3(t,n,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(t,n);return n._loadedRoutes=o.routes,n._loadedInjector=o.injector,n._loadedNgModuleFactory=o.factory,o}throw X3(n)}return{routes:[],injector:t}}};function aB(e){e.sort((t,n)=>t.value.outlet===Ye?-1:n.value.outlet===Ye?1:t.value.outlet.localeCompare(n.value.outlet))}function uB(e){let t=e.value.routeConfig;return t&&t.path===""}function QS(e){let t=[],n=new Set;for(let r of e){if(!uB(r)){t.push(r);continue}let i=t.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),n.add(i)):t.push(r)}for(let r of n){let i=QS(r.children);t.push(new Fr(r.value,i))}return t.filter(r=>!n.has(r))}function cB(e){return e.data||{}}function lB(e){return e.resolve||{}}function dB(e,t,n,r,i,o,s){return sr(async a=>{let{state:u,tree:l}=await oB(e,t,n,r,a.extractedUrl,i,o,s);return lt(Ce({},a),{targetSnapshot:u,urlAfterRedirects:l})})}function fB(e){return sr(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return dt(t);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let u of KS(a))o.add(u);let s=0;return cn(o).pipe(eh(a=>i.has(a)?hB(a,n,e):(a.data=QC(a,a.parent,e).resolve,dt(void 0))),qr(()=>s++),th(1),sr(a=>s===o.size?dt(t):Pn))})}function KS(e){let t=e.children.map(n=>KS(n)).flat();return[e,...t]}function hB(e,t,n){let r=e.routeConfig,i=e._resolve;return r?.title!==void 0&&!zS(r)&&(i[Zl]=r.title),Hc(()=>(e.data=QC(e,e.parent,n).resolve,gB(i,e,t).pipe(en(o=>(e._resolvedData=o,e.data=Ce(Ce({},e.data),o),null)))))}function gB(e,t,n){let r=jC(e);if(r.length===0)return dt({});let i={};return cn(r).pipe(sr(o=>pB(e[o],t,n).pipe(fo(),qr(s=>{if(s instanceof Su)throw Pg(new Ko,s);i[o]=s}))),th(1),en(()=>i),Zc(o=>WS(o)?Pn:Zv(o)))}function pB(e,t,n){let r=t._environmentInjector,i=_u(e,r),o=i.resolve?i.resolve(t,n):$n(r,()=>i(t,n));return oa(o)}function CS(e){return Ai(t=>{let n=e(t);return n?cn(n).pipe(en(()=>t)):dt(t)})}var n0=(()=>{class e{buildTitle(n){let r,i=n.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===Ye);return r}getResolvedTitleForRoute(n){return n.data[Zl]}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(eT),providedIn:"root"})}return e})(),eT=(()=>{class e extends n0{title;constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||e)(tt(hS))};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Xl=new Oe("",{factory:()=>({})}),ql=new Oe(""),tT=(()=>{class e{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=pe(gC);async loadComponent(n,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await bS($n(n,()=>r.loadComponent())),s=await iT(rT(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}})();return this.componentLoaders.set(r,i),i}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await nT(r,this.compiler,n,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();async function nT(e,t,n,r){let i=await bS($n(n,()=>e.loadChildren())),o=await iT(rT(i)),s;o instanceof qh||Array.isArray(o)?s=o:s=await t.compileModuleAsync(o),r&&r(e);let a,u,l=!1,f;return Array.isArray(s)?(u=s,l=!0):(a=s.create(n).injector,f=s,u=a.get(ql,[],{optional:!0,self:!0}).flat()),{routes:u.map(t0),injector:a,factory:f}}function mB(e){return e&&typeof e=="object"&&"default"in e}function rT(e){return mB(e)?e.default:e}async function iT(e){return e}var Bg=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(vB),providedIn:"root"})}return e})(),vB=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oT=new Oe("");var yB=()=>{},sT=new Oe(""),aT=(()=>{class e{currentNavigation=ni(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ni(null);events=new vn;transitionAbortWithErrorSubject=new vn;configLoader=pe(tT);environmentInjector=pe(In);destroyRef=pe(Di);urlSerializer=pe(Wl);rootContexts=pe(Nu);location=pe(Cu);inputBindingEnabled=pe(Fg,{optional:!0})!==null;titleStrategy=pe(n0);options=pe(Xl,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=pe(Bg);createViewTransition=pe(oT,{optional:!0});navigationErrorHandler=pe(sT,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>dt(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=i=>this.events.next(new Eg(i)),r=i=>this.events.next(new Mg(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;qn(()=>{this.transitions?.next(lt(Ce({},n),{extractedUrl:this.urlHandlingStrategy.extract(n.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(n){return this.transitions=new On(null),this.transitions.pipe(co(r=>r!==null),Ai(r=>{let i=!1,o=new AbortController,s=()=>!i&&this.currentTransition?.id===r.id;return dt(r).pipe(Ai(a=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",Jn.SupersededByNewNavigation),Pn;this.currentTransition=r;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:u?lt(Ce({},u),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),f=a.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&f!=="reload")return this.events.next(new Co(a.id,this.urlSerializer.serialize(a.rawUrl),"",jl.IgnoredSameUrlNavigation)),a.resolve(!1),Pn;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return dt(a).pipe(Ai(d=>(this.events.next(new ra(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),d.id!==this.navigationId?Pn:Promise.resolve(d))),dB(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),qr(d=>{r.targetSnapshot=d.targetSnapshot,r.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation.update(m=>(m.finalUrl=d.urlAfterRedirects,m)),this.events.next(new Vl)}),Ai(d=>cn(r.routesRecognizeHandler.deferredHandle??dt(void 0)).pipe(en(()=>d))),qr(()=>{let d=new Bl(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(d)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:d,extractedUrl:m,source:I,restoredState:C,extras:M}=a,E=new ra(d,this.urlSerializer.serialize(m),I,C);this.events.next(E);let N=BS(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=lt(Ce({},a),{targetSnapshot:N,urlAfterRedirects:m,extras:lt(Ce({},M),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(B=>(B.finalUrl=m,B)),dt(r)}else return this.events.next(new Co(a.id,this.urlSerializer.serialize(a.extractedUrl),"",jl.IgnoredByUrlHandlingStrategy)),a.resolve(!1),Pn}),en(a=>{let u=new wg(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(u),this.currentTransition=r=lt(Ce({},a),{guards:M3(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),r}),j3(a=>this.events.next(a)),Ai(a=>{if(r.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Pg(this.urlSerializer,a.guardsResult);let u=new bg(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(u),!s())return Pn;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",Jn.GuardRejected),Pn;if(a.guards.canActivateChecks.length===0)return dt(a);let l=new Dg(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(l),!s())return Pn;let f=!1;return dt(a).pipe(fB(this.paramsInheritanceStrategy),qr({next:()=>{f=!0;let d=new xg(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(d)},complete:()=>{f||this.cancelNavigationTransition(a,"",Jn.NoDataFromResolver)}}))}),CS(a=>{let u=f=>{let d=[];if(f.routeConfig?._loadedComponent)f.component=f.routeConfig?._loadedComponent;else if(f.routeConfig?.loadComponent){let m=f._environmentInjector;d.push(this.configLoader.loadComponent(m,f.routeConfig).then(I=>{f.component=I}))}for(let m of f.children)d.push(...u(m));return d},l=u(a.targetSnapshot.root);return l.length===0?dt(a):cn(Promise.all(l).then(()=>a))}),CS(()=>this.afterPreactivation()),Ai(()=>{let{currentSnapshot:a,targetSnapshot:u}=r,l=this.createViewTransition?.(this.environmentInjector,a.root,u.root);return l?cn(l).pipe(en(()=>r)):dt(r)}),lo(1),Ai(a=>{let u=b3(n.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=r=a=lt(Ce({},a),{targetRouterState:u}),this.currentNavigation.update(f=>(f.targetRouterState=u,f)),this.events.next(new xu);let l=r.beforeActivateHandler.deferredHandle;return l?cn(l.then(()=>a)):dt(a)}),qr(a=>{new YC(n.routeReuseStrategy,r.targetRouterState,r.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),s()&&(i=!0,this.currentNavigation.update(u=>(u.abort=yB,u)),this.lastSuccessfulNavigation.set(qn(this.currentNavigation)),this.events.next(new Io(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),Wc(YS(o.signal).pipe(co(()=>!i&&!r.targetRouterState),qr(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",Jn.Aborted)}))),qr({complete:()=>{i=!0}}),Wc(this.transitionAbortWithErrorSubject.pipe(qr(a=>{throw a}))),$v(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",Jn.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Zc(a=>{if(i=!0,this.destroyed)return r.resolve(!1),Pn;if(ZS(a))this.events.next(new si(r.id,this.urlSerializer.serialize(r.extractedUrl),a.message,a.cancellationCode)),E3(a)?this.events.next(new Eu(a.url,a.navigationBehaviorOptions)):r.resolve(!1);else{let u=new ia(r.id,this.urlSerializer.serialize(r.extractedUrl),a,r.targetSnapshot??void 0);try{let l=$n(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(l instanceof Su){let{message:f,cancellationCode:d}=Pg(this.urlSerializer,l);this.events.next(new si(r.id,this.urlSerializer.serialize(r.extractedUrl),f,d)),this.events.next(new Eu(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(u),a}catch(l){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(l)}}return Pn}))}))}cancelNavigationTransition(n,r,i){let o=new si(n.id,this.urlSerializer.serialize(n.extractedUrl),r,i);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=qn(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return n.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function IB(e){return e!==kl}var uT=new Oe("");var cT=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(CB),providedIn:"root"})}return e})(),Lg=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}shouldDestroyInjector(t){return!0}},CB=(()=>{class e extends Lg{static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),r0=(()=>{class e{urlSerializer=pe(Wl);options=pe(Xl,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=pe(Cu);urlHandlingStrategy=pe(Bg);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new ai;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:n,initialUrl:r,targetBrowserUrl:i}){let o=n!==void 0?this.urlHandlingStrategy.merge(n,r):r,s=i??o;return s instanceof ai?this.urlSerializer.serialize(s):s}routerUrlState(n){return n?.targetBrowserUrl===void 0||n?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(n.finalUrl)}}commitTransition({targetRouterState:n,finalUrl:r,initialUrl:i}){r&&n?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=n):this.rawUrlTree=i}routerState=BS(null,pe(In));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:()=>pe(AB),providedIn:"root"})}return e})(),AB=(()=>{class e extends r0{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{n(r.url,r.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(n,r){n instanceof ra?this.updateStateMemento():n instanceof Co?this.commitTransition(r):n instanceof Bl?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof xu?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):n instanceof si&&!jS(n)?this.restoreHistory(r):n instanceof ia?this.restoreHistory(r,!0):n instanceof Io&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let{extras:i,id:o}=r,{replaceUrl:s,state:a}=i;if(this.location.isCurrentPathEqualTo(n)||s){let u=this.browserPageId,l=Ce(Ce({},a),this.generateNgRouterState(o,u,r));this.location.replaceState(n,"",l)}else{let u=Ce(Ce({},a),this.generateNgRouterState(o,this.browserPageId+1,r));this.location.go(n,"",u)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===n.finalUrl&&o===0&&(this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(n),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:n}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r,i){return this.canceledNavigationResolution==="computed"?Ce({navigationId:n,\u0275routerPageId:r},this.routerUrlState(i)):Ce({navigationId:n},this.routerUrlState(i))}static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function i0(e,t){e.events.pipe(co(n=>n instanceof Io||n instanceof si||n instanceof ia||n instanceof Co),en(n=>n instanceof Io||n instanceof Co?0:(n instanceof si?n.code===Jn.Redirect||n.code===Jn.SupersededByNewNavigation:!1)?2:1),co(n=>n!==2),lo(1)).subscribe(()=>{t()})}var Vg=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=pe(iC);stateManager=pe(r0);options=pe(Xl,{optional:!0})||{};pendingTasks=pe(Uo);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=pe(aT);urlSerializer=pe(Wl);location=pe(Cu);urlHandlingStrategy=pe(Bg);injector=pe(In);_events=new vn;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=pe(cT);injectorCleanup=pe(uT,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=pe(ql,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!pe(Fg,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:n=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new Rn;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=qn(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof si&&r.code!==Jn.Redirect&&r.code!==Jn.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Io)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof Eu){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=Ce({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||IB(i.source)},s);this.scheduleNavigation(a,kl,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}A3(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),kl,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r,i,o)=>{this.navigateToSyncWithBrowser(n,i,r,o)})}navigateToSyncWithBrowser(n,r,i,o){let s=i?.navigationId?i:null,a=i?.\u0275routerUrl??n;if(i?.\u0275routerUrl&&(o=lt(Ce({},o),{browserUrl:n})),i){let l=Ce({},i);delete l.navigationId,delete l.\u0275routerPageId,delete l.\u0275routerUrl,Object.keys(l).length!==0&&(o.state=l)}let u=this.parseUrl(a);this.scheduleNavigation(u,r,s,o).catch(l=>{this.disposed||this.injector.get(xi)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return qn(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(t0),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,l=u?this.currentUrlTree.fragment:s,f=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":f=Ce(Ce({},this.currentUrlTree.queryParams),o);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=o||null}f!==null&&(f=this.removeEmptyProps(f));let d;try{let m=i?i.snapshot:this.routerState.snapshot.root;d=PS(m)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return kS(d,n,f,l??null,this.urlSerializer)}navigateByUrl(n,r={skipLocationChange:!1}){let i=Du(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,kl,null,r)}navigate(n,r={skipLocationChange:!1}){return wB(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.console.warn(tu(4018,!1)),this.urlSerializer.parse("/")}}isActive(n,r){let i;if(r===!0?i=Ce({},xS):r===!1?i=Ce({},BC):i=Ce(Ce({},BC),r),Du(n))return gS(this.currentUrlTree,n,i);let o=this.parseUrl(n);return gS(this.currentUrlTree,o,i)}removeEmptyProps(n){return Object.entries(n).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(n,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,l;s?(a=s.resolve,u=s.reject,l=s.promise):l=new Promise((d,m)=>{a=d,u=m});let f=this.pendingTasks.add();return i0(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(f))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:a,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function wB(e){for(let t=0;t<e.length;t++)if(e[t]==null)throw new Me(4008,!1)}var xB=new Oe("");function o0(e,...t){return ru([{provide:ql,multi:!0,useValue:e},[],{provide:es,useFactory:EB},{provide:Jh,multi:!0,useFactory:MB},t.map(n=>n.\u0275providers)])}function EB(){return pe(Vg).routerState.root}function MB(){let e=pe(kr);return t=>{let n=e.get(qo);if(t!==n.components[0])return;let r=e.get(Vg),i=e.get(SB);e.get(TB)===1&&r.initialNavigation(),e.get(NB,null,{optional:!0})?.setUpPreloading(),e.get(xB,null,{optional:!0})?.init(),r.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var SB=new Oe("",{factory:()=>new vn}),TB=new Oe("",{factory:()=>1});var NB=new Oe("");var lT=[];var dT={providers:[eI(),o0(lT)]};var CT=(()=>{class e{_renderer;_elementRef;onChange=n=>{};onTouched=()=>{};constructor(n,r){this._renderer=n,this._elementRef=r}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static \u0275fac=function(r){return new(r||e)(wt(qs),wt(Si))};static \u0275dir=Ln({type:e})}return e})(),Zg=(()=>{class e extends CT{static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275dir=Ln({type:e,features:[Ki]})}return e})(),nd=new Oe(""),RB={provide:nd,useExisting:Zi(()=>d0),multi:!0},d0=(()=>{class e extends Zg{writeValue(n){this.setProperty("checked",n)}static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275dir=Ln({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,i){r&1&&rn("change",function(s){return i.onChange(s.target.checked)})("blur",function(){return i.onTouched()})},standalone:!1,features:[Ks([RB]),Ki]})}return e})(),OB={provide:nd,useExisting:Zi(()=>Wg),multi:!0};function PB(){let e=oi()?oi().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var kB=new Oe(""),Wg=(()=>{class e extends CT{_compositionMode;_composing=!1;constructor(n,r,i){super(n,r),this._compositionMode=i,this._compositionMode==null&&(this._compositionMode=!PB())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static \u0275fac=function(r){return new(r||e)(wt(qs),wt(Si),wt(kB,8))};static \u0275dir=Ln({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){r&1&&rn("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},standalone:!1,features:[Ks([OB]),Ki]})}return e})();var LB=new Oe(""),FB=new Oe("");function AT(e){return e!=null}function wT(e){return Xo(e)?cn(e):e}function bT(e){let t={};return e.forEach(n=>{t=n!=null?Ce(Ce({},t),n):t}),Object.keys(t).length===0?null:t}function DT(e,t){return t.map(n=>n(e))}function jB(e){return!e.validate}function xT(e){return e.map(t=>jB(t)?t:n=>t.validate(n))}function BB(e){if(!e)return null;let t=e.filter(AT);return t.length==0?null:function(n){return bT(DT(n,t))}}function ET(e){return e!=null?BB(xT(e)):null}function VB(e){if(!e)return null;let t=e.filter(AT);return t.length==0?null:function(n){let r=DT(n,t).map(wT);return Yv(r).pipe(en(bT))}}function MT(e){return e!=null?VB(xT(e)):null}function fT(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function zB(e){return e._rawValidators}function GB(e){return e._rawAsyncValidators}function s0(e){return e?Array.isArray(e)?e:[e]:[]}function Gg(e,t){return Array.isArray(e)?e.includes(t):e===t}function hT(e,t){let n=s0(t);return s0(e).forEach(i=>{Gg(n,i)||n.push(i)}),n}function gT(e,t){return s0(t).filter(n=>!Gg(e,n))}var Ug=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ET(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=MT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control?.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},a0=class extends Ug{name;get formDirective(){return null}get path(){return null}},td=class extends Ug{_parent=null;name=null;valueAccessor=null},u0=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var ST=(()=>{class e extends u0{constructor(n){super(n)}static \u0275fac=function(r){return new(r||e)(wt(td,2))};static \u0275dir=Ln({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){r&2&&Kh("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},standalone:!1,features:[Ki]})}return e})();var Jl="VALID",zg="INVALID",Ru="PENDING",Ql="DISABLED",sa=class{},Hg=class extends sa{value;source;constructor(t,n){super(),this.value=t,this.source=n}},Kl=class extends sa{pristine;source;constructor(t,n){super(),this.pristine=t,this.source=n}},ed=class extends sa{touched;source;constructor(t,n){super(),this.touched=t,this.source=n}},Ou=class extends sa{status;source;constructor(t,n){super(),this.status=t,this.source=n}};var c0=class extends sa{source;constructor(t){super(),this.source=t}};function UB(e){return(Yg(e)?e.validators:e)||null}function HB(e){return Array.isArray(e)?ET(e):e||null}function ZB(e,t){return(Yg(t)?t.asyncValidators:e)||null}function WB(e){return Array.isArray(e)?MT(e):e||null}function Yg(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}var l0=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,n){this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return qn(this.statusReactive)}set status(t){qn(()=>this.statusReactive.set(t))}_status=ea(()=>this.statusReactive());statusReactive=ni(void 0);get valid(){return this.status===Jl}get invalid(){return this.status===zg}get pending(){return this.status===Ru}get disabled(){return this.status===Ql}get enabled(){return this.status!==Ql}errors;get pristine(){return qn(this.pristineReactive)}set pristine(t){qn(()=>this.pristineReactive.set(t))}_pristine=ea(()=>this.pristineReactive());pristineReactive=ni(!0);get dirty(){return!this.pristine}get touched(){return qn(this.touchedReactive)}set touched(t){qn(()=>this.touchedReactive.set(t))}_touched=ea(()=>this.touchedReactive());touchedReactive=ni(!1);get untouched(){return!this.touched}_events=new vn;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(hT(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(hT(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(gT(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(gT(t,this._rawAsyncValidators))}hasValidator(t){return Gg(this._rawValidators,t)}hasAsyncValidator(t){return Gg(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let n=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(lt(Ce({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new ed(!0,r))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(t))}markAsUntouched(t={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),t.onlySelf||this._parent?._updateTouched(t,r),n&&t.emitEvent!==!1&&this._events.next(new ed(!1,r))}markAsDirty(t={}){let n=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(lt(Ce({},t),{sourceControl:r})),n&&t.emitEvent!==!1&&this._events.next(new Kl(!1,r))}markAsPristine(t={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),t.onlySelf||this._parent?._updatePristine(t,r),n&&t.emitEvent!==!1&&this._events.next(new Kl(!0,r))}markAsPending(t={}){this.status=Ru;let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ou(this.status,n)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(lt(Ce({},t),{sourceControl:n}))}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Ql,this.errors=null,this._forEachChild(i=>{i.disable(lt(Ce({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Hg(this.value,r)),this._events.next(new Ou(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(lt(Ce({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Jl,this._forEachChild(r=>{r.enable(lt(Ce({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(lt(Ce({},t),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,n){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},n),this._parent?._updateTouched({},n))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Jl||this.status===Ru)&&this._runAsyncValidator(r,t.emitEvent)}let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Hg(this.value,n)),this._events.next(new Ou(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(lt(Ce({},t),{sourceControl:n}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ql:Jl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,n){if(this.asyncValidator){this.status=Ru,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1,shouldHaveEmitted:t!==!1};let r=wT(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:n,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,i)=>r&&r._find(i),this)}getError(t,n){let r=n?this.get(n):this;return r?.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,n,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new Ou(this.status,n)),this._parent&&this._parent._updateControlsErrors(t,n,r)}_initObservables(){this.valueChanges=new yn,this.statusChanges=new yn}_calculateStatus(){return this._allControlsDisabled()?Ql:this.errors?zg:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ru)?Ru:this._anyControlsHaveStatus(zg)?zg:Jl}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,n){let r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,t.onlySelf||this._parent?._updatePristine(t,n),i&&this._events.next(new Kl(this.pristine,n))}_updateTouched(t={},n){this.touched=this._anyControlsTouched(),this._events.next(new ed(this.touched,n)),t.onlySelf||this._parent?._updateTouched(t,n)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Yg(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=HB(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=WB(this._rawAsyncValidators)}};var TT=new Oe("",{factory:()=>f0}),f0="always";function YB(e,t){return[...t.path,e]}function $B(e,t,n=f0){qB(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&t.valueAccessor.setDisabledState?.(e.disabled),JB(e,t),KB(e,t),QB(e,t),XB(e,t)}function pT(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function XB(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function qB(e,t){let n=zB(e);t.validator!==null?e.setValidators(fT(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=GB(e);t.asyncValidator!==null?e.setAsyncValidators(fT(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let i=()=>e.updateValueAndValidity();pT(t._rawValidators,i),pT(t._rawAsyncValidators,i)}function JB(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&NT(e,t)})}function QB(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&NT(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function NT(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function KB(e,t){let n=(r,i)=>{t.valueAccessor.writeValue(r),i&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function eV(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function tV(e){return Object.getPrototypeOf(e.constructor)===Zg}function nV(e,t){if(!t)return null;Array.isArray(t);let n,r,i;return t.forEach(o=>{o.constructor===Wg?n=o:tV(o)?r=o:i=o}),i||r||n||null}function mT(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function vT(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var rV=class extends l0{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,n,r){super(UB(n),ZB(r,n)),this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Yg(n)&&(n.nonNullable||n.initialValueIsDefault)&&(vT(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),n.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,n?.emitEvent!==!1&&this._events.next(new c0(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){mT(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){mT(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){vT(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var iV={provide:td,useExisting:Zi(()=>h0)},yT=Promise.resolve(),h0=(()=>{class e extends td{_changeDetectorRef;callSetDisabledState;control=new rV;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yn;constructor(n,r,i,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=n,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=nV(this,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),eV(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){$B(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){yT.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let r=n.isDisabled.currentValue,i=r!==0&&AC(r);yT.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?YB(n,this._parent):[n]}static \u0275fac=function(r){return new(r||e)(wt(a0,9),wt(LB,10),wt(FB,10),wt(nd,10),wt(Iu,8),wt(TT,8))};static \u0275dir=Ln({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Ks([iV]),Ki,mu]})}return e})();var oV={provide:nd,useExisting:Zi(()=>$g),multi:!0};function _T(e,t){return e==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function sV(e){return e.split(":")[0]}var $g=(()=>{class e extends Zg{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;appRefInjector=pe(qo).injector;destroyRef=pe(Di);cdr=pe(Iu);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Cl({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(n){this.cdr.markForCheck(),this.value=n;let r=this._getOptionId(n),i=_T(r,n);this.setProperty("value",i)}registerOnChange(n){this.onChange=r=>{this.value=this._getOptionValue(r),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),n))return r;return null}_getOptionValue(n){let r=sV(n);return this._optionMap.has(r)?this._optionMap.get(r):n}static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275dir=Ln({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){r&1&&rn("change",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Ks([oV]),Ki]})}return e})(),RT=(()=>{class e{_element;_renderer;_select;id;constructor(n,r,i){this._element=n,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(_T(this.id,n)),this._select._writeValueAfterRender())}set value(n){this._setElementValue(n),this._select?._writeValueAfterRender()}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(r){return new(r||e)(wt(Si),wt(qs),wt($g,9))};static \u0275dir=Ln({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),aV={provide:nd,useExisting:Zi(()=>OT),multi:!0};function IT(e,t){return e==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${e}: ${t}`.slice(0,50))}function uV(e){return e.split(":")[0]}var OT=(()=>{class e extends Zg{value;_optionMap=new Map;_idCounter=0;set compareWith(n){this._compareWith=n}_compareWith=Object.is;writeValue(n){this.value=n;let r;if(Array.isArray(n)){let i=n.map(o=>this._getOptionId(o));r=(o,s)=>{o._setSelected(i.indexOf(s)>-1)}}else r=i=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(n){this.onChange=r=>{let i=[],o=r.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let u=s[a],l=this._getOptionValue(u.value);i.push(l)}}else{let s=r.options;for(let a=0;a<s.length;a++){let u=s[a];if(u.selected){let l=this._getOptionValue(u.value);i.push(l)}}}this.value=i,n(i)}}_registerOption(n){let r=(this._idCounter++).toString();return this._optionMap.set(r,n),r}_getOptionId(n){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,n))return r;return null}_getOptionValue(n){let r=uV(n);return this._optionMap.has(r)?this._optionMap.get(r)._value:n}static \u0275fac=(()=>{let n;return function(i){return(n||(n=Qi(e)))(i||e)}})();static \u0275dir=Ln({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){r&1&&rn("change",function(s){return i.onChange(s.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Ks([aV]),Ki]})}return e})(),PT=(()=>{class e{_element;_renderer;_select;id;_value;constructor(n,r,i){this._element=n,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(IT(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(IT(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||e)(wt(Si),wt(qs),wt(OT,9))};static \u0275dir=Ln({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();var cV=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=$o({type:e});static \u0275inj=go({})}return e})();var kT=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:TT,useValue:n.callSetDisabledState??f0}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=$o({type:e});static \u0275inj=go({imports:[cV]})}return e})();var Uw={};Kt(Uw,{absolute:()=>PG,bottom:()=>VG,ellipse:()=>GG,ellipseSpread:()=>zG,fn:()=>kG,left:()=>FG,line:()=>LG,right:()=>jG,top:()=>BG});var Ao={x:"x",y:"y",width:"w",height:"h",minimum:"s",maximum:"l",diagonal:"d"},dV=Object.keys(Ao).map(e=>Ao[e]).join(""),g0="[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?",fV=/\s/g,LT=new RegExp(`^(${g0}\\*)?([${dV}])(/${g0})?([-+]{1,2}${g0})?$`,"g");function jT(e){throw new Error(`Invalid calc() expression: ${e}`)}function hV(e,t){let n=LT.exec(e.replace(fV,""));n||jT(e),LT.lastIndex=0;let[,r,i,o,s]=n,{x:a,y:u,width:l,height:f}=t,d=0;switch(i){case Ao.width:{d=l;break}case Ao.height:{d=f;break}case Ao.x:{d=a;break}case Ao.y:{d=u;break}case Ao.minimum:{d=Math.min(f,l);break}case Ao.maximum:{d=Math.max(f,l);break}case Ao.diagonal:{d=Math.sqrt(f*f+l*l);break}}return r&&(d*=parseFloat(r)),o&&(d/=parseFloat(o.slice(1))),s&&(d+=gV(s)),d}function gV(e){if(!e)return 0;let[t]=e;switch(t){case"+":return parseFloat(e.substr(1));case"-":return-parseFloat(e.substr(1))}return parseFloat(e)}function ui(e){return typeof e=="string"&&e.includes("calc")}var BT="calc(",FT=BT.length;function ci(e,t){let n=e,r=0;do{let i=n.indexOf(BT,r);if(i===-1)return n;let o=i+FT,s=1;e:do{switch(n[o]){case"(":{s++;break}case")":{if(s--,s===0)break e;break}case void 0:jT(n)}o++}while(!0);let a=n.slice(i+FT,o);ui(a)&&(a=ci(a,t));let u=String(hV(a,t));n=n.slice(0,i)+u+n.slice(o+1),r=i+u.length}while(!0)}var jn={};Kt(jn,{Curve:()=>ht,Ellipse:()=>wn,Line:()=>me,Path:()=>De,Point:()=>k,Polygon:()=>ur,Polyline:()=>ft,Rect:()=>de,bezier:()=>TV,ellipse:()=>wV,intersection:()=>_V,line:()=>wo,normalizeAngle:()=>En,point:()=>ku,random:()=>Xg,rect:()=>EV,scale:()=>vV,snapToGrid:()=>no,toDeg:()=>aa,toRad:()=>ln,types:()=>je});var{round:pV,floor:mV,PI:VT}=Math,vV={linear:function(e,t,n){var r=e[1]-e[0],i=t[1]-t[0];return(n-e[0])/r*i+t[0]||0}},En=function(e){return e%360+(e<0?360:0)},no=function(e,t){return t*pV(e/t)},aa=function(e){return 180*e/VT%360},ln=function(e,t){return t=t||!1,e=t?e:e%360,e*VT/180},Xg=function(e,t){if(t===void 0)t=e===void 0?1:e,e=0;else if(t<e){let n=e;e=t,t=n}return mV(Math.random()*(t-e+1)+e)};var{cos:qg,sin:p0,atan2:yV}=Math,Jg=function(e,t){var n=ln(e.y),r=ln(t.y),i=e.x,o=t.x,s=ln(o-i),a=p0(s)*qg(r),u=qg(n)*p0(r)-p0(n)*qg(r)*qg(s),l=aa(yV(a,u)),f=["NE","E","SE","S","SW","W","NW","N"],d=l-22.5;return d<0&&(d+=360),d=parseInt(d/45),f[d]};var Pu=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return(n-=i)*n+(r-=o)*r};var Qg=function(e,t){return Math.sqrt(Pu(e,t))};var je={Point:1,Line:2,Ellipse:3,Rect:4,Polyline:5,Polygon:6,Curve:7,Path:8};var{abs:Kg,cos:m0,sin:v0,sqrt:zT,min:GT,max:UT,atan2:IV,round:HT,pow:CV,PI:ZT}=Math,k=function(e,t){if(!(this instanceof k))return new k(e,t);if(typeof e=="string"){var n=e.split(e.indexOf("@")===-1?" ":"@");e=parseFloat(n[0]),t=parseFloat(n[1])}else Object(e)===e&&(t=e.y,e=e.x);this.x=e===void 0?0:e,this.y=t===void 0?0:t};k.fromPolar=function(e,t,n){n=new k(n);var r=Kg(e*m0(t)),i=Kg(e*v0(t)),o=En(aa(t));return o<90?i=-i:o<180?(r=-r,i=-i):o<270&&(r=-r),new k(n.x+r,n.y+i)};k.random=function(e,t,n,r){return new k(Xg(e,t),Xg(n,r))};k.prototype={type:je.Point,chooseClosest:function(e){var t=e.length;if(t===1)return new k(e[0]);for(var n=null,r=1/0,i=0;i<t;i++){var o=new k(e[i]),s=this.squaredDistance(o);s<r&&(n=o,r=s)}return n},adhereToRect:function(e){return e.containsPoint(this)?this:(this.x=GT(UT(this.x,e.x),e.x+e.width),this.y=GT(UT(this.y,e.y),e.y+e.height),this)},angleBetween:function(e,t){var n=this.equals(e)||this.equals(t)?NaN:this.theta(t)-this.theta(e);return n<0&&(n+=360),n},bearing:function(e){return Jg(this,e)},changeInAngle:function(e,t,n){return this.clone().offset(-e,-t).theta(n)-this.theta(n)},clone:function(){return new k(this)},cross:function(e,t){return e&&t?(t.x-this.x)*(e.y-this.y)-(t.y-this.y)*(e.x-this.x):NaN},difference:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),new k(this.x-(e||0),this.y-(t||0))},distance:function(e){return Qg(this,e)},dot:function(e){return e?this.x*e.x+this.y*e.y:NaN},equals:function(e){return!!e&&this.x===e.x&&this.y===e.y},lerp:function(e,t){var n=this.x,r=this.y;return new k((1-t)*n+t*e.x,(1-t)*r+t*e.y)},magnitude:function(){return zT(this.x*this.x+this.y*this.y)||.01},manhattanDistance:function(e){return Kg(e.x-this.x)+Kg(e.y-this.y)},move:function(e,t){var n=ln(new k(e).theta(this)),r=this.offset(m0(n)*t,-v0(n)*t);return r},normalize:function(e){var t=(e||1)/this.magnitude();return this.scale(t,t)},offset:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x+=e||0,this.y+=t||0,this},reflection:function(e){return new k(e).move(this,this.distance(e))},rotate:function(e,t){if(t===0)return this;e=e||new k(0,0),t=ln(En(-t));var n=m0(t),r=v0(t),i=n*(this.x-e.x)-r*(this.y-e.y)+e.x,o=r*(this.x-e.x)+n*(this.y-e.y)+e.y;return this.x=i,this.y=o,this},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=CV(10,e);break}return this.x=HT(this.x*t)/t,this.y=HT(this.y*t)/t,this},scale:function(e,t,n){return n=n&&new k(n)||new k(0,0),this.x=n.x+e*(this.x-n.x),this.y=n.y+t*(this.y-n.y),this},snapToGrid:function(e,t){return this.x=no(this.x,e),this.y=no(this.y,t||e),this},squaredDistance:function(e){return Pu(this,e)},theta:function(e){e=new k(e);var t=-(e.y-this.y),n=e.x-this.x,r=IV(t,n);return r<0&&(r=2*ZT+r),180*r/ZT},toJSON:function(){return{x:this.x,y:this.y}},toPolar:function(e){e=e&&new k(e)||new k(0,0);var t=this.x,n=this.y;return this.x=zT((t-e.x)*(t-e.x)+(n-e.y)*(n-e.y)),this.y=ln(e.theta(new k(t,n))),this},toString:function(){return this.x+"@"+this.y},serialize:function(){return this.x+","+this.y},update:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x=e||0,this.y=t||0,this},vectorAngle:function(e){var t=new k(0,0);return t.angleBetween(this,e)}};k.prototype.translate=k.prototype.offset;var ku=k;var{max:y0,min:I0}=Math,me=function(e,t){if(!(this instanceof me))return new me(e,t);if(e instanceof me)return new me(e.start,e.end);this.start=new k(e),this.end=new k(t)};me.prototype={type:je.Line,angle:function(){var e=new k(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)},bbox:function(){var e=I0(this.start.x,this.end.x),t=I0(this.start.y,this.end.y),n=y0(this.start.x,this.end.x),r=y0(this.start.y,this.end.y);return new de(e,t,n-e,r-t)},bearing:function(){return Jg(this.start,this.end)},clone:function(){return new me(this.start,this.end)},closestPoint:function(e){return this.pointAt(this.closestPointNormalizedLength(e))},closestPointLength:function(e){return this.closestPointNormalizedLength(e)*this.length()},closestPointNormalizedLength:function(e){var t=this.vector().dot(new me(this.start,e).vector()),n=I0(1,y0(0,t/this.squaredLength()));return n!==n?0:n},closestPointTangent:function(e){return this.tangentAt(this.closestPointNormalizedLength(e))},containsPoint:function(e){var t=this.start,n=this.end;if(t.cross(e,n)!==0)return!1;var r=this.length();return!(new me(t,e).length()>r||new me(e,n).length()>r)},divideAt:function(e){var t=this.pointAt(e);return[new me(this.start,t),new me(t,this.end)]},divideAtLength:function(e){var t=this.pointAtLength(e);return[new me(this.start,t),new me(t,this.end)]},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y},intersect:function(e,t){if(e&&e.intersectionWithLine){var n=e.intersectionWithLine(this,t);return n&&e instanceof me&&(n=n[0]),n}return null},intersectionWithLine:function(e){var t=new k(this.end.x-this.start.x,this.end.y-this.start.y),n=new k(e.end.x-e.start.x,e.end.y-e.start.y),r=t.x*n.y-t.y*n.x,i=new k(e.start.x-this.start.x,e.start.y-this.start.y),o=i.x*n.y-i.y*n.x,s=i.x*t.y-i.y*t.x;if(r===0||o*r<0||s*r<0)return null;if(r>0){if(o>r||s>r)return null}else if(o<r||s<r)return null;return[new k(this.start.x+o*t.x/r,this.start.y+o*t.y/r)]},isDifferentiable:function(){return!this.start.equals(this.end)},length:function(){return Qg(this.start,this.end)},midpoint:function(){return new k((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)},parallel:function(e){let t=this.clone();if(!this.isDifferentiable())return t;let{start:n,end:r}=t,i=n.clone().rotate(r,270),o=r.clone().rotate(n,90);return n.move(o,e),r.move(i,e),t},pointAt:function(e){var t=this.start,n=this.end;return e<=0?t.clone():e>=1?n.clone():t.lerp(n,e)},pointAtLength:function(e){var t=this.start,n=this.end,r=!0;e<0&&(r=!1,e=-e);var i=this.length();return e>=i?r?n.clone():t.clone():this.pointAt((r?e:i-e)/i)},pointOffset:function(e){e=new k(e);var t=this.start,n=this.end,r=(n.x-t.x)*(e.y-t.y)-(n.y-t.y)*(e.x-t.x);return r/this.length()},rotate:function(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this},round:function(e){return this.start.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.end.scale(e,t,n),this},setLength:function(e){var t=this.length();if(!t)return this;var n=e/t;return this.scale(n,n,this.start)},squaredLength:function(){return Pu(this.start,this.end)},tangentAt:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAt(e),i=new me(t,n);return i.translate(r.x-t.x,r.y-t.y),i},tangentAtLength:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAtLength(e),i=new me(t,n);return i.translate(r.x-t.x,r.y-t.y),i},toString:function(){return this.start.toString()+" "+this.end.toString()},serialize:function(){return this.start.serialize()+" "+this.end.serialize()},translate:function(e,t){return this.start.translate(e,t),this.end.translate(e,t),this},vector:function(){return new k(this.end.x-this.start.x,this.end.y-this.start.y)}};me.prototype.intersection=me.prototype.intersect;var wo=me;var{sqrt:WT,round:ep,pow:AV}=Math,wn=function(e,t,n){if(!(this instanceof wn))return new wn(e,t,n);if(e instanceof wn)return new wn(new k(e.x,e.y),e.a,e.b);e=new k(e),this.x=e.x,this.y=e.y,this.a=t,this.b=n};wn.fromRect=function(e){return e=new de(e),new wn(e.center(),e.width/2,e.height/2)};wn.prototype={type:je.Ellipse,bbox:function(){return new de(this.x-this.a,this.y-this.b,2*this.a,2*this.b)},center:function(){return new k(this.x,this.y)},clone:function(){return new wn(this)},containsPoint:function(e){return this.normalizedDistance(e)<=1},equals:function(e){return!!e&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b},inflate:function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.a+=2*e,this.b+=2*t,this},intersectionWithLine:function(e){var t=[],n=e.start,r=e.end,i=this.a,o=this.b,s=e.vector(),a=n.difference(new k(this)),u=new k(s.x/(i*i),s.y/(o*o)),l=new k(a.x/(i*i),a.y/(o*o)),f=s.dot(u),d=s.dot(l),m=a.dot(l)-1,I=d*d-f*m;if(I<0)return null;if(I>0){var C=WT(I),M=(-d-C)/f,E=(-d+C)/f;if((M<0||1<M)&&(E<0||1<E))return null;0<=M&&M<=1&&t.push(n.lerp(r,M)),0<=E&&E<=1&&t.push(n.lerp(r,E))}else{var N=-d/f;if(0<=N&&N<=1)t.push(n.lerp(r,N));else return null}return t},intersectionWithLineFromCenterToPoint:function(e,t){e=new k(e),t&&e.rotate(new k(this.x,this.y),t);var n=e.x-this.x,r=e.y-this.y,i;if(n===0)return i=this.bbox().pointNearestToPoint(e),t?i.rotate(new k(this.x,this.y),-t):i;var o=r/n,s=o*o,a=this.a*this.a,u=this.b*this.b,l=WT(1/(1/a+s/u));l=n<0?-l:l;var f=o*l;return i=new k(this.x+l,this.y+f),t?i.rotate(new k(this.x,this.y),-t):i},normalizedDistance:function(e){var t=e.x,n=e.y,r=this.a,i=this.b,o=this.x,s=this.y;return(t-o)*(t-o)/(r*r)+(n-s)*(n-s)/(i*i)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=AV(10,e);break}return this.x=ep(this.x*t)/t,this.y=ep(this.y*t)/t,this.a=ep(this.a*t)/t,this.b=ep(this.b*t)/t,this},tangentTheta:function(e){var t=30,n=e.x,r=e.y,i=this.a,o=this.b,s=this.bbox().center(),a=s.x,u=s.y,l=n>s.x+i/2,f=n<s.x-i/2,d,m;return l||f?(d=n>s.x?r-t:r+t,m=i*i/(n-a)-i*i*(r-u)*(d-u)/(o*o*(n-a))+a):(m=r>s.y?n+t:n-t,d=o*o/(r-u)-o*o*(n-a)*(m-a)/(i*i*(r-u))+u),new k(m,d).theta(e)},toString:function(){return new k(this.x,this.y).toString()+" "+this.a+" "+this.b}};var wV=wn;var{abs:YT,cos:bV,sin:DV,min:rd,max:$T,round:tp,pow:xV}=Math,de=function(e,t,n,r){if(!(this instanceof de))return new de(e,t,n,r);Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=e===void 0?0:e,this.y=t===void 0?0:t,this.width=n===void 0?0:n,this.height=r===void 0?0:r};de.fromEllipse=function(e){return e=new wn(e),new de(e.x-e.a,e.y-e.b,2*e.a,2*e.b)};de.fromPointUnion=function(...e){if(e.length===0)return null;let t=new k,n,r,i,o;n=r=1/0,i=o=-1/0;for(let s=0;s<e.length;s++){t.update(e[s]);let a=t.x,u=t.y;a<n&&(n=a),a>i&&(i=a),u<r&&(r=u),u>o&&(o=u)}return new de(n,r,i-n,o-r)};de.fromRectUnion=function(...e){if(e.length===0)return null;let t=new de,n,r,i,o;n=r=1/0,i=o=-1/0;for(let s=0;s<e.length;s++){t.update(e[s]);let a=t.x,u=t.y,l=a+t.width,f=u+t.height;a<n&&(n=a),l>i&&(i=l),u<r&&(r=u),f>o&&(o=f)}return new de(n,r,i-n,o-r)};de.prototype={type:je.Rect,bbox:function(e){return this.clone().rotateAroundCenter(e)},rotateAroundCenter:function(e){if(!e)return this;let{width:t,height:n}=this,r=ln(e),i=YT(DV(r)),o=YT(bV(r)),s=t*o+n*i,a=t*i+n*o;return this.x+=(t-s)/2,this.y+=(n-a)/2,this.width=s,this.height=a,this},bottomLeft:function(){return new k(this.x,this.y+this.height)},bottomLine:function(){return new me(this.bottomLeft(),this.bottomRight())},bottomMiddle:function(){return new k(this.x+this.width/2,this.y+this.height)},center:function(){return new k(this.x+this.width/2,this.y+this.height/2)},clone:function(){return new de(this)},containsPoint:function(e){return e instanceof k||(e=new k(e)),e.x>=this.x&&e.x<=this.x+this.width&&e.y>=this.y&&e.y<=this.y+this.height},containsRect:function(e){var t=new de(this).normalize(),n=new de(e).normalize(),r=t.width,i=t.height,o=n.width,s=n.height;if(!r||!i||!o||!s)return!1;var a=t.x,u=t.y,l=n.x,f=n.y;return o+=l,r+=a,s+=f,i+=u,a<=l&&o<=r&&u<=f&&s<=i},corner:function(){return new k(this.x+this.width,this.y+this.height)},equals:function(e){var t=new de(this).normalize(),n=new de(e).normalize();return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height},inflate:function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t,this},intersect:function(e){var t=this.origin(),n=this.corner(),r=e.origin(),i=e.corner();if(i.x<=t.x||i.y<=t.y||r.x>=n.x||r.y>=n.y)return null;var o=$T(t.x,r.x),s=$T(t.y,r.y);return new de(o,s,rd(n.x,i.x)-o,rd(n.y,i.y)-s)},intersectionWithLine:function(e){var t=this,n=[t.topLine(),t.rightLine(),t.bottomLine(),t.leftLine()],r=[],i=[],o,s,a=n.length;for(s=0;s<a;s++)o=e.intersect(n[s]),o!==null&&i.indexOf(o.toString())<0&&(r.push(o),i.push(o.toString()));return r.length>0?r:null},intersectionWithLineFromCenterToPoint:function(e,t){e=new k(e);var n=new k(this.x+this.width/2,this.y+this.height/2),r;t&&e.rotate(n,t);for(var i=[this.topLine(),this.rightLine(),this.bottomLine(),this.leftLine()],o=new me(n,e),s=i.length-1;s>=0;--s){var a=i[s].intersection(o);if(a!==null){r=a;break}}return r&&t&&r.rotate(n,-t),r},leftLine:function(){return new me(this.topLeft(),this.bottomLeft())},leftMiddle:function(){return new k(this.x,this.y+this.height/2)},maxRectScaleToFit:function(e,t){e=new de(e),t||(t=e.center());var n,r,i,o,s,a,u,l,f=t.x,d=t.y;n=r=i=o=s=a=u=l=1/0;var m=e.topLeft();m.x<f&&(n=(this.x-f)/(m.x-f)),m.y<d&&(s=(this.y-d)/(m.y-d));var I=e.bottomRight();I.x>f&&(r=(this.x+this.width-f)/(I.x-f)),I.y>d&&(a=(this.y+this.height-d)/(I.y-d));var C=e.topRight();C.x>f&&(i=(this.x+this.width-f)/(C.x-f)),C.y<d&&(u=(this.y-d)/(C.y-d));var M=e.bottomLeft();return M.x<f&&(o=(this.x-f)/(M.x-f)),M.y>d&&(l=(this.y+this.height-d)/(M.y-d)),{sx:rd(n,r,i,o),sy:rd(s,a,u,l)}},maxRectUniformScaleToFit:function(e,t){var n=this.maxRectScaleToFit(e,t);return rd(n.sx,n.sy)},moveAndExpand:function(e){return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this},normalize:function(){var e=this.x,t=this.y,n=this.width,r=this.height;return this.width<0&&(e=this.x+this.width,n=-this.width),this.height<0&&(t=this.y+this.height,r=-this.height),this.x=e,this.y=t,this.width=n,this.height=r,this},offset:function(e,t){return k.prototype.offset.call(this,e,t)},origin:function(){return new k(this.x,this.y)},pointNearestToPoint:function(e){if(e=new k(e),this.containsPoint(e)){var t=this.sideNearestToPoint(e);switch(t){case"right":return new k(this.x+this.width,e.y);case"left":return new k(this.x,e.y);case"bottom":return new k(e.x,this.y+this.height);case"top":return new k(e.x,this.y)}}return e.adhereToRect(this)},rightLine:function(){return new me(this.topRight(),this.bottomRight())},rightMiddle:function(){return new k(this.x+this.width,this.y+this.height/2)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=xV(10,e);break}return this.x=tp(this.x*t)/t,this.y=tp(this.y*t)/t,this.width=tp(this.width*t)/t,this.height=tp(this.height*t)/t,this},scale:function(e,t,n){return n=this.origin().scale(e,t,n),this.x=n.x,this.y=n.y,this.width*=e,this.height*=t,this},sideNearestToPoint:function(e){e=new k(e);var t=e.x-this.x,n=this.x+this.width-e.x,r=e.y-this.y,i=this.y+this.height-e.y,o=t,s="left";return n<o&&(o=n,s="right"),r<o&&(o=r,s="top"),i<o&&(s="bottom"),s},snapToGrid:function(e,t){var n=this.origin().snapToGrid(e,t),r=this.corner().snapToGrid(e,t);return this.x=n.x,this.y=n.y,this.width=r.x-n.x,this.height=r.y-n.y,this},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},topLine:function(){return new me(this.topLeft(),this.topRight())},topMiddle:function(){return new k(this.x+this.width/2,this.y)},topRight:function(){return new k(this.x+this.width,this.y)},toString:function(){return this.origin().toString()+" "+this.corner().toString()},union:function(e){return de.fromRectUnion(this,e)},update:function(e,t,n,r){return Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=e||0,this.y=t||0,this.width=n||0,this.height=r||0,this}};de.prototype.bottomRight=de.prototype.corner;de.prototype.topLeft=de.prototype.origin;de.prototype.translate=de.prototype.offset;var EV=de;function np(e){let t=e.trim();if(t==="")return[];let n=[],r=t.split(/\b\s*,\s*|,\s*|\s+/),i=r.length;for(let o=0;o<i;o+=2)n.push({x:+r[o],y:+r[o+1]});return n}function rp(e){let t=e.length;if(t===0)return[];let n=[];for(let r=0;r<t;r++){let i=e[r].clone();n.push(i)}return n}function ip(e){let{abs:t}=Math;var n,r,i=e.length;if(i===0)return[];var o;for(n=0;n<i;n++)(o===void 0||e[n].y<o.y||e[n].y===o.y&&e[n].x>o.x)&&(o=e[n]);var s=[];for(n=0;n<i;n++){var a=o.theta(e[n]);a===0&&(a=360);var u=[e[n],n,a];s.push(u)}if(s.sort(function(W,oe){var fe=W[2]-oe[2];return fe===0&&(fe=oe[1]-W[1]),fe}),s.length>2){var l=s[s.length-1];s.unshift(l)}for(var f={},d=[],m,I,C,M,E,N;s.length!==0;)if(m=s.pop(),I=m[0],!f.hasOwnProperty(m[0]+"@@"+m[1]))for(var B=!1;!B;)if(d.length<2)d.push(m),B=!0;else{C=d.pop(),M=C[0],E=d.pop(),N=E[0];var Z=N.cross(M,I);if(Z<0)d.push(E),d.push(C),d.push(m),B=!0;else if(Z===0){var $=1e-10,te=M.angleBetween(N,I);t(te-180)<$||M.equals(I)||N.equals(M)?(f[C[0]+"@@"+C[1]]=M,d.push(E)):t((te+1)%360-1)<$&&(d.push(E),s.push(C))}else f[C[0]+"@@"+C[1]]=M,d.push(E)}d.length>2&&d.pop();var p,y=-1;for(r=d.length,n=0;n<r;n++){var D=d[n][1];(p===void 0||D<p)&&(p=D,y=n)}var S=[];if(y>0){var _=d.slice(y),j=d.slice(0,y);S=_.concat(j)}else S=d;var V=[];for(r=S.length,n=0;n<r;n++)V.push(S[n][0]);return V}var ft=function(e){if(!(this instanceof ft))return new ft(e);if(typeof e=="string")return new ft.parse(e);this.points=Array.isArray(e)?e.map(k):[]};ft.parse=function(e){return new ft(np(e))};ft.fromRect=function(e){return new ft([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft(),e.topLeft()])};ft.prototype={type:je.Polyline,bbox:function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,i=this.points,o=i.length;if(o===0)return null;for(var s=0;s<o;s++){var a=i[s],u=a.x,l=a.y;u<e&&(e=u),u>t&&(t=u),l<n&&(n=l),l>r&&(r=l)}return new de(e,n,t-e,r-n)},clone:function(){return new ft(rp(this.points))},closestPoint:function(e){var t=this.closestPointLength(e);return this.pointAtLength(t)},closestPointLength:function(e){var t=this.lengthPoints(),n=t.length;if(n===0||n===1)return 0;for(var r,i=1/0,o=0,s=n-1,a=0;a<s;a++){var u=new me(t[a],t[a+1]),l=u.length(),f=u.closestPointNormalizedLength(e),d=u.pointAt(f),m=d.squaredDistance(e);m<i&&(i=m,r=o+f*l),o+=l}return r},closestPointNormalizedLength:function(e){var t=this.closestPointLength(e);if(t===0)return 0;var n=this.length();return n===0?0:t/n},closestPointTangent:function(e){var t=this.closestPointLength(e);return this.tangentAtLength(t)},containsPoint:function(e){var t=this.points,n=t.length;if(n===0)return!1;for(var r=e.x,i=e.y,o=n-1,s=0,a=0,u=new me,l=new me,f=new k;s<n;s++){var d=t[o],m=t[s];if(e.equals(d)||(u.start=d,u.end=m,u.containsPoint(e)))return!0;if(i<=d.y&&i>m.y||i>d.y&&i<=m.y){var I=d.x-r>m.x-r?d.x-r:m.x-r;I>=0&&(f.x=r+I,f.y=i,l.start=e,l.end=f,u.intersect(l)&&a++)}o=s}return a%2===1},close:function(){let{start:e,end:t,points:n}=this;return e&&t&&!e.equals(t)&&n.push(e.clone()),this},lengthPoints:function(){return this.points},convexHull:function(){return new ft(ip(this.points))},equals:function(e){if(!e)return!1;var t=this.points,n=e.points,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],s=e.points[i];if(!o.equals(s))return!1}return!0},intersectionWithLine:function(e){for(var t=new me(e),n=[],r=this.lengthPoints(),i=new me,o=0,s=r.length-1;o<s;o++){i.start=r[o],i.end=r[o+1];var a=t.intersectionWithLine(i);a&&n.push(a[0])}return n.length>0?n:null},isDifferentiable:function(){var e=this.points,t=e.length;if(t===0)return!1;for(var n=new me,r=t-1,i=0;i<r;i++)if(n.start=e[i],n.end=e[i+1],n.isDifferentiable())return!0;return!1},length:function(){var e=this.lengthPoints(),t=e.length;if(t===0)return 0;for(var n=0,r=t-1,i=0;i<r;i++)n+=e[i].distance(e[i+1]);return n},pointAt:function(e){var t=this.lengthPoints(),n=t.length;if(n===0)return null;if(n===1||e<=0)return t[0].clone();if(e>=1)return t[n-1].clone();var r=this.length(),i=r*e;return this.pointAtLength(i)},pointAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(n===0)return null;if(n===1)return t[0].clone();var r=!0;e<0&&(r=!1,e=-e);for(var i=0,o=n-1,s=0;s<o;s++){var a=r?s:o-1-s,u=t[a],l=t[a+1],f=new me(u,l),d=u.distance(l);if(e<=i+d)return f.pointAtLength((r?1:-1)*(e-i));i+=d}var m=r?t[n-1]:t[0];return m.clone()},round:function(e){for(var t=this.points,n=t.length,r=0;r<n;r++)t[r].round(e);return this},scale:function(e,t,n){for(var r=this.points,i=r.length,o=0;o<i;o++)r[o].scale(e,t,n);return this},simplify:function(e={}){let t=this.points;if(t.length<3)return this;let n=e.threshold||1e-10,r=0;for(;t[r+2];){let i=r,o=r+1,s=r+2,a=t[i],u=t[o],l=t[s];new me(a,l).closestPoint(u).distance(u)<=n?t.splice(o,1):r+=1}return this},tangentAt:function(e){var t=this.lengthPoints(),n=t.length;if(n===0||n===1)return null;e<0&&(e=0),e>1&&(e=1);var r=this.length(),i=r*e;return this.tangentAtLength(i)},tangentAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(n===0||n===1)return null;var r=!0;e<0&&(r=!1,e=-e);for(var i,o=0,s=n-1,a=0;a<s;a++){var u=r?a:s-1-a,l=t[u],f=t[u+1],d=new me(l,f),m=l.distance(f);if(d.isDifferentiable()){if(e<=o+m)return d.tangentAtLength((r?1:-1)*(e-o));i=d}o+=m}if(i){var I=r?1:0;return i.tangentAt(I)}return null},toString:function(){return this.points+""},translate:function(e,t){for(var n=this.points,r=n.length,i=0;i<r;i++)n[i].translate(e,t);return this},serialize:function(){var e=this.points,t=e.length;if(t===0)return"";for(var n="",r=0;r<t;r++){var i=e[r];n+=i.x+","+i.y+" "}return n.trim()}};Object.defineProperty(ft.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var e=this.points,t=e.length;return t===0?null:this.points[0]}});Object.defineProperty(ft.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.points,t=e.length;return t===0?null:this.points[t-1]}});var{abs:op,sqrt:MV,min:XT,max:qT,pow:C0}=Math,ht=function(e,t,n,r){if(!(this instanceof ht))return new ht(e,t,n,r);if(e instanceof ht)return new ht(e.start,e.controlPoint1,e.controlPoint2,e.end);this.start=new k(e),this.controlPoint1=new k(t),this.controlPoint2=new k(n),this.end=new k(r)};ht.throughPoints=(function(){function e(n){var r=[],i=[],o=n.length-1,s;if(o==1)return r[0]=new k((2*n[0].x+n[1].x)/3,(2*n[0].y+n[1].y)/3),i[0]=new k(2*r[0].x-n[0].x,2*r[0].y-n[0].y),[r,i];var a=[];for(s=1;s<o-1;s++)a[s]=4*n[s].x+2*n[s+1].x;a[0]=n[0].x+2*n[1].x,a[o-1]=(8*n[o-1].x+n[o].x)/2;var u=t(a);for(s=1;s<o-1;++s)a[s]=4*n[s].y+2*n[s+1].y;a[0]=n[0].y+2*n[1].y,a[o-1]=(8*n[o-1].y+n[o].y)/2;var l=t(a);for(s=0;s<o;s++)r.push(new k(u[s],l[s])),s<o-1?i.push(new k(2*n[s+1].x-u[s+1],2*n[s+1].y-l[s+1])):i.push(new k((n[o].x+u[o-1])/2,(n[o].y+l[o-1])/2));return[r,i]}function t(n){var r=n.length,i=[],o=[],s=2;i[0]=n[0]/s;for(var a=1;a<r;a++)o[a]=1/s,s=(a<r-1?4:3.5)-o[a],i[a]=(n[a]-i[a-1])/s;for(a=1;a<r;a++)i[r-a-1]-=o[r-a]*i[r-a];return i}return function(n){if(!n||Array.isArray(n)&&n.length<2)throw new Error("At least 2 points are required");for(var r=e(n),i=[],o=r[0].length,s=0;s<o;s++){var a=new k(r[0][s].x,r[0][s].y),u=new k(r[1][s].x,r[1][s].y);i.push(new ht(n[s],a,u,n[s+1]))}return i}})();ht.prototype={type:je.Curve,bbox:function(){for(var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end,i=e.x,o=e.y,s=t.x,a=t.y,u=n.x,l=n.y,f=r.x,d=r.y,m=new Array,I=new Array,C=[new Array,new Array],M,E,N,B,Z,$,te,p,y=0;y<2;++y){if(y===0?(E=6*i-12*s+6*u,M=-3*i+9*s-9*u+3*f,N=3*s-3*i):(E=6*o-12*a+6*l,M=-3*o+9*a-9*l+3*d,N=3*a-3*o),op(M)<1e-12){if(op(E)<1e-12)continue;B=-N/E,0<B&&B<1&&I.push(B);continue}te=E*E-4*N*M,p=MV(te),!(te<0)&&(Z=(-E+p)/(2*M),0<Z&&Z<1&&I.push(Z),$=(-E-p)/(2*M),0<$&&$<1&&I.push($))}for(var D=I.length,S=D,_,j,V;D--;)B=I[D],_=1-B,j=_*_*_*i+3*_*_*B*s+3*_*B*B*u+B*B*B*f,C[0][D]=j,V=_*_*_*o+3*_*_*B*a+3*_*B*B*l+B*B*B*d,C[1][D]=V,m[D]={X:j,Y:V};I[S]=0,I[S+1]=1,m[S]={X:i,Y:o},m[S+1]={X:f,Y:d},C[0][S]=i,C[1][S]=o,C[0][S+1]=f,C[1][S+1]=d,I.length=S+2,C[0].length=S+2,C[1].length=S+2,m.length=S+2;var W=XT.apply(null,C[0]),oe=XT.apply(null,C[1]),fe=qT.apply(null,C[0]),U=qT.apply(null,C[1]);return new de(W,oe,fe-W,U-oe)},clone:function(){return new ht(this.start,this.controlPoint1,this.controlPoint2,this.end)},closestPoint:function(e,t){return this.pointAtT(this.closestPointT(e,t))},closestPointLength:function(e,t){t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=t.subdivisions===void 0?this.getSubdivisions({precision:n}):t.subdivisions,i={precision:n,subdivisions:r};return this.lengthAtT(this.closestPointT(e,i),i)},closestPointNormalizedLength:function(e,t){t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=t.subdivisions===void 0?this.getSubdivisions({precision:n}):t.subdivisions,i={precision:n,subdivisions:r},o=this.closestPointLength(e,i);if(!o)return 0;var s=this.length(i);return s===0?0:o/s},closestPointT:function(e,t){t=t||{};for(var n=t.precision===void 0?this.PRECISION:t.precision,r=t.subdivisions===void 0?this.getSubdivisions({precision:n}):t.subdivisions,i,o,s,a,u,l,f,d=r.length,m=d?1/d:0,I=0;I<d;I++){var C=r[I],M=C.start.distance(e),E=C.end.distance(e),N=M+E;(!f||N<f)&&(i=C,o=I*m,s=(I+1)*m,a=M,u=E,l=C.start.distance(C.end),f=N)}for(var B=C0(10,-n);;){var Z=a?op(a-u)/a:0,$=u?op(a-u)/u:0,te=Z<B||$<B,p=a?a<l*B:!0,y=u?u<l*B:!0,D=p||y;if(te||D)return a<=u?o:s;var S=i.divide(.5);m/=2;var _=S[0].start.distance(e),j=S[0].end.distance(e),V=_+j,W=S[1].start.distance(e),oe=S[1].end.distance(e),fe=W+oe;V<=fe?(i=S[0],s-=m,a=_,u=j):(i=S[1],o+=m,a=W,u=oe)}},closestPointTangent:function(e,t){return this.tangentAtT(this.closestPointT(e,t))},containsPoint:function(e,t){var n=this.toPolyline(t);return n.containsPoint(e)},divideAt:function(e,t){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);var n=this.tAt(e,t);return this.divideAtT(n)},divideAtLength:function(e,t){var n=this.tAtLength(e,t);return this.divideAtT(n)},divideAtT:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return[new ht(t,t,t,t),new ht(t,n,r,i)];if(e>=1)return[new ht(t,n,r,i),new ht(i,i,i,i)];var o=this.getSkeletonPoints(e),s=o.startControlPoint1,a=o.startControlPoint2,u=o.divider,l=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new ht(t,s,a,u),new ht(u,l,f,i)]},endpointDistance:function(){return this.start.distance(this.end)},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.controlPoint1.x===e.controlPoint1.x&&this.controlPoint1.y===e.controlPoint1.y&&this.controlPoint2.x===e.controlPoint2.x&&this.controlPoint2.y===e.controlPoint2.y&&this.end.x===e.end.x&&this.end.y===e.end.y},getSkeletonPoints:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(e>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};var o=new me(t,n).pointAt(e),s=new me(n,r).pointAt(e),a=new me(r,i).pointAt(e),u=new me(o,s).pointAt(e),l=new me(s,a).pointAt(e),f=new me(u,l).pointAt(e),d={startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:l,dividerControlPoint2:a};return d},getSubdivisions:function(e){e=e||{};var t=e.precision===void 0?this.PRECISION:e.precision,n=this.start,r=this.controlPoint1,i=this.controlPoint2,o=this.end,s=[new ht(n,r,i,o)];if(t===0)return s;var a=!this.isDifferentiable();if(a)return s;var u=this.endpointDistance(),l=C0(10,-t),f=2,d=r.cross(n,o)===0&&i.cross(n,o)===0;d&&(f=2*t);for(var m=0;;){m+=1;for(var I=[],C=s.length,M=0;M<C;M++){var E=s[M],N=E.divide(.5);I.push(N[0],N[1])}for(var B=0,Z=I.length,$=0;$<Z;$++){var te=I[$];B+=te.endpointDistance()}if(m>=f){var p=B!==0?(B-u)/B:0;if(p<l)return I}s=I,u=B}},isDifferentiable:function(){var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},length:function(e){e=e||{};for(var t=e.precision===void 0?this.PRECISION:e.precision,n=e.subdivisions===void 0?this.getSubdivisions({precision:t}):e.subdivisions,r=0,i=n.length,o=0;o<i;o++){var s=n[o];r+=s.endpointDistance()}return r},lengthAtT:function(e,t){if(e<=0)return 0;t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=this.divide(e)[0],i=r.length({precision:n});return i},pointAt:function(e,t){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();var n=this.tAt(e,t);return this.pointAtT(n)},pointAtLength:function(e,t){var n=this.tAtLength(e,t);return this.pointAtT(n)},pointAtT:function(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider},PRECISION:3,round:function(e){return this.start.round(e),this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},tangentAt:function(e,t){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var n=this.tAt(e,t);return this.tangentAtT(n)},tangentAtLength:function(e,t){if(!this.isDifferentiable())return null;var n=this.tAtLength(e,t);return this.tangentAtT(n)},tangentAtT:function(e){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var t=this.getSkeletonPoints(e),n=t.startControlPoint2,r=t.dividerControlPoint1,i=t.divider,o=new me(n,r);return o.translate(i.x-n.x,i.y-n.y),o},tAt:function(e,t){if(e<=0)return 0;if(e>=1)return 1;t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=t.subdivisions===void 0?this.getSubdivisions({precision:n}):t.subdivisions,i={precision:n,subdivisions:r},o=this.length(i),s=o*e;return this.tAtLength(s,i)},tAtLength:function(e,t){var n=!0;e<0&&(n=!1,e=-e),t=t||{};for(var r=t.precision===void 0?this.PRECISION:t.precision,i=t.subdivisions===void 0?this.getSubdivisions({precision:r}):t.subdivisions,o={precision:r,subdivisions:i},s,a,u,l,f,d=0,m=i.length,I=1/m,C=0;C<m;C++){var M=n?C:m-1-C,E=i[C],N=E.endpointDistance();if(e<=d+N){s=E,a=M*I,u=(M+1)*I,l=n?e-d:N+d-e,f=n?N+d-e:e-d;break}d+=N}if(!s)return n?1:0;for(var B=this.length(o),Z=C0(10,-r);;){var $;if($=B!==0?l/B:0,$<Z)return a;if($=B!==0?f/B:0,$<Z)return u;var te,p,y=s.divide(.5);I/=2;var D=y[0].endpointDistance(),S=y[1].endpointDistance();l<=D?(s=y[0],u-=I,te=l,p=D-te):(s=y[1],a+=I,te=l-D,p=S-te),l=te,f=p}},toPoints:function(e){e=e||{};for(var t=e.precision===void 0?this.PRECISION:e.precision,n=e.subdivisions===void 0?this.getSubdivisions({precision:t}):e.subdivisions,r=[n[0].start.clone()],i=n.length,o=0;o<i;o++){var s=n[o];r.push(s.end.clone())}return r},toPolyline:function(e){return new ft(this.toPoints(e))},toString:function(){return this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}};ht.prototype.divide=ht.prototype.divideAtT;function ua(e){var t,n,r=[];for(n=arguments.length,t=1;t<n;t++)r.push(arguments[t]);if(!e)throw new Error("Missing a parent object.");var i=Object.create(e);for(n=r.length,t=0;t<n;t++){var o=r[t],s,a;for(a in o)o.hasOwnProperty(a)&&(delete i[a],s=Object.getOwnPropertyDescriptor(o,a),Object.defineProperty(i,a,s))}return i}var De=function(e){if(!(this instanceof De))return new De(e);if(typeof e=="string")return new De.parse(e);this.segments=[];var t,n;if(e)if(Array.isArray(e)&&e.length!==0)if(e=e.reduce(function(a,u){return a.concat(u)},[]),n=e.length,e[0].isSegment)for(t=0;t<n;t++){var r=e[t];this.appendSegment(r)}else{var i=null;for(t=0;t<n;t++){var o=e[t];if(!(o instanceof me||o instanceof ht))throw new Error("Cannot construct a path segment from the provided object.");t===0&&this.appendSegment(De.createSegment("M",o.start)),i&&!i.end.equals(o.start)&&this.appendSegment(De.createSegment("M",o.start)),o instanceof me?this.appendSegment(De.createSegment("L",o.end)):o instanceof ht&&this.appendSegment(De.createSegment("C",o.controlPoint1,o.controlPoint2,o.end)),i=o}}else if(e.isSegment)this.appendSegment(e);else if(e instanceof me)this.appendSegment(De.createSegment("M",e.start)),this.appendSegment(De.createSegment("L",e.end));else if(e instanceof ht)this.appendSegment(De.createSegment("M",e.start)),this.appendSegment(De.createSegment("C",e.controlPoint1,e.controlPoint2,e.end));else if(e instanceof ft){if(!(e.points&&e.points.length!==0))return;for(n=e.points.length,t=0;t<n;t++){var s=e.points[t];t===0?this.appendSegment(De.createSegment("M",s)):this.appendSegment(De.createSegment("L",s))}}else throw new Error("Cannot construct a path from the provided object.")};De.parse=function(e){if(!e)return new De;for(var t=new De,n=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,r=e.match(n),i=r.length,o=0;o<i;o++){var s=r[o],a=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,u=s.match(a),l=De.createSegment.apply(this,u);t.appendSegment(l)}return t};De.createSegment=function(e){if(!e)throw new Error("Type must be provided.");var t=De.segmentTypes[e];if(!t)throw new Error(e+" is not a recognized path segment type.");for(var n=[],r=arguments.length,i=1;i<r;i++)n.push(arguments[i]);return ro(t,n)};De.prototype={type:je.Path,appendSegment:function(e){var t=this.segments,n=t.length,r,i=n!==0?t[n-1]:null,o=null;if(Array.isArray(e)){if(e=e.reduce(function(l,f){return l.concat(f)},[]),!e[0].isSegment)throw new Error("Segments required.");for(var s=e.length,a=0;a<s;a++){var u=e[a];r=this.prepareSegment(u,i,o),t.push(r),i=r}}else{if(!e||!e.isSegment)throw new Error("Segment required.");r=this.prepareSegment(e,i,o),t.push(r)}},bbox:function(){var e=this.segments,t=e.length;if(t===0)return null;for(var n,r=0;r<t;r++){var i=e[r];if(i.isVisible){var o=i.bbox();n=n?n.union(o):o}}if(n)return n;var s=e[t-1];return new de(s.end.x,s.end.y,0,0)},clone:function(){for(var e=this.segments,t=e.length,n=new De,r=0;r<t;r++){var i=e[r].clone();n.appendSegment(i)}return n},closestPoint:function(e,t){var n=this.closestPointT(e,t);return n?this.pointAtT(n):null},closestPointLength:function(e,t){t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions,i={precision:n,segmentSubdivisions:r},o=this.closestPointT(e,i);return o?this.lengthAtT(o,i):0},closestPointNormalizedLength:function(e,t){t=t||{};var n=t.precision===void 0?this.PRECISION:t.precision,r=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions,i={precision:n,segmentSubdivisions:r},o=this.closestPointLength(e,i);if(o===0)return 0;var s=this.length(i);return s===0?0:o/s},closestPointT:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;t=t||{};for(var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s,a=1/0,u=0;u<r;u++){var l=n[u],f=o[u];if(l.isVisible){var d=l.closestPointT(e,{precision:i,subdivisions:f}),m=l.pointAtT(d),I=new me(m,e).squaredLength();I<a&&(s={segmentIndex:u,value:d},a=I)}}return s||{segmentIndex:r-1,value:1}},closestPointTangent:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;t=t||{};for(var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s,a=1/0,u=0;u<r;u++){var l=n[u],f=o[u];if(l.isDifferentiable()){var d=l.closestPointT(e,{precision:i,subdivisions:f}),m=l.pointAtT(d),I=new me(m,e).squaredLength();I<a&&(s=l.tangentAtT(d),a=I)}}return s||null},containsPoint:function(e,t){var n=this.toPolylines(t);if(!n)return!1;for(var r=n.length,i=0,o=0;o<r;o++){var s=n[o];s.containsPoint(e)&&i++}return i%2===1},divideAt:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;e<0&&(e=0),e>1&&(e=1),t=t||{};var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s={precision:i,segmentSubdivisions:o},a=this.length(s),u=a*e;return this.divideAtLength(u,s)},divideAtLength:function(e,t){var n=this.segments.length;if(n===0)return null;var r=!0;e<0&&(r=!1,e=-e),t=t||{};var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s,a,u=0,l,f,d,m,I;for(s=0;s<n;s++){var C=r?s:n-1-s;a=this.getSegment(C);var M=o[C],E=a.length({precision:i,subdivisions:M});if(a.isDifferentiable()&&(d=a,m=C,e<=u+E)){f=C,l=a.divideAtLength((r?1:-1)*(e-u),{precision:i,subdivisions:M});break}u+=E}if(!d)return null;l||(f=m,I=r?1:0,l=d.divideAtT(I));var N=this.clone();N.replaceSegment(f,l);var B=f,Z=f+1,$=f+2;l[0].isDifferentiable()||(N.removeSegment(B),Z-=1,$-=1);var te=N.getSegment(Z).start;N.insertSegment(Z,De.createSegment("M",te)),$+=1,l[1].isDifferentiable()||(N.removeSegment($-1),$-=1);var p=$-B-1;for(s=$;s<N.segments.length;s++){var y=this.getSegment(s-p);if(a=N.getSegment(s),a.type==="Z"&&!y.subpathStartSegment.end.equals(a.subpathStartSegment.end)){var D=De.createSegment("L",y.end);N.replaceSegment(s,D)}}var S=new De(N.segments.slice(0,Z)),_=new De(N.segments.slice(Z));return[S,_]},equals:function(e){if(!e)return!1;var t=this.segments,n=e.segments,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],s=n[i];if(o.type!==s.type||!o.equals(s))return!1}return!0},getSegment:function(e){var t=this.segments,n=t.length;if(n===0)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");return t[e]},getSegmentSubdivisions:function(e){var t=this.segments,n=t.length;e=e||{};for(var r=e.precision===void 0?this.PRECISION:e.precision,i=[],o=0;o<n;o++){var s=t[o],a=s.getSubdivisions({precision:r});i.push(a)}return i},getSubpaths:function(){let t=this.clone().validate().segments,n=t.length,r=[];for(let i=0;i<n;i++){let o=t[i];o.isSubpathStart?r.push(new De(o)):r[r.length-1].appendSegment(o)}return r},insertSegment:function(e,t){var n=this.segments,r=n.length;if(e<0&&(e=r+e+1),e>r||e<0)throw new Error("Index out of range.");var i,o=null,s=null;if(r!==0&&(e>=1?(o=n[e-1],s=o.nextSegment):s=n[0]),Array.isArray(t)){if(t=t.reduce(function(f,d){return f.concat(d)},[]),!t[0].isSegment)throw new Error("Segments required.");for(var a=t.length,u=0;u<a;u++){var l=t[u];i=this.prepareSegment(l,o,s),n.splice(e+u,0,i),o=i}}else{if(!t||!t.isSegment)throw new Error("Segment required.");i=this.prepareSegment(t,o,s),n.splice(e,0,i)}},intersectionWithLine:function(e,t){var n=null,r=this.toPolylines(t);if(!r)return null;for(var i=0,o=r.length;i<o;i++){var s=r[i],a=e.intersect(s);a&&(n||(n=[]),Array.isArray(a)?Array.prototype.push.apply(n,a):n.push(a))}return n},isDifferentiable:function(){for(var e=this.segments,t=e.length,n=0;n<t;n++){var r=e[n];if(r.isDifferentiable())return!0}return!1},isValid:function(){var e=this.segments,t=e.length===0||e[0].type==="M";return t},length:function(e){var t=this.segments,n=t.length;if(n===0)return 0;e=e||{};for(var r=e.precision===void 0?this.PRECISION:e.precision,i=e.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=0,s=0;s<n;s++){var a=t[s],u=i[s];o+=a.length({subdivisions:u})}return o},lengthAtT:function(e,t){var n=this.segments,r=n.length;if(r===0)return 0;var i=e.segmentIndex;if(i<0)return 0;var o=e.value;i>=r?(i=r-1,o=1):o<0?o=0:o>1&&(o=1),t=t||{};for(var s=t.precision===void 0?this.PRECISION:t.precision,a=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:s}):t.segmentSubdivisions,u,l=0,f=0;f<i;f++){var d=n[f];u=a[f],l+=d.length({precisison:s,subdivisions:u})}return d=n[i],u=a[i],l+=d.lengthAtT(o,{precisison:s,subdivisions:u}),l},pointAt:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();t=t||{};var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s={precision:i,segmentSubdivisions:o},a=this.length(s),u=a*e;return this.pointAtLength(u,s)},pointAtLength:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;if(e===0)return this.start.clone();var i=!0;e<0&&(i=!1,e=-e),t=t||{};for(var o=t.precision===void 0?this.PRECISION:t.precision,s=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,a,u=0,l=0;l<r;l++){var f=i?l:r-1-l,d=n[f],m=s[f],I=d.length({precision:o,subdivisions:m});if(d.isVisible){if(e<=u+I)return d.pointAtLength((i?1:-1)*(e-u),{precision:o,subdivisions:m});a=d}u+=I}if(a)return i?a.end:a.start;var C=n[r-1];return C.end.clone()},pointAtT:function(e){var t=this.segments,n=t.length;if(n===0)return null;var r=e.segmentIndex;if(r<0)return t[0].pointAtT(0);if(r>=n)return t[n-1].pointAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].pointAtT(i)},PRECISION:3,prepareSegment:function(e,t,n){e.previousSegment=t,e.nextSegment=n,t&&(t.nextSegment=e),n&&(n.previousSegment=e);var r=e;return e.isSubpathStart&&(e.subpathStartSegment=e,r=n),r&&this.updateSubpathStartSegment(r),e},removeSegment:function(e){var t=this.segments,n=t.length;if(n===0)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");var r=t.splice(e,1)[0],i=r.previousSegment,o=r.nextSegment;i&&(i.nextSegment=o),o&&(o.previousSegment=i),r.isSubpathStart&&o&&this.updateSubpathStartSegment(o)},replaceSegment:function(e,t){var n=this.segments,r=n.length;if(r===0)throw new Error("Path has no segments.");if(e<0&&(e=r+e),e>=r||e<0)throw new Error("Index out of range.");var i,o=n[e],s=o.previousSegment,a=o.nextSegment,u=o.isSubpathStart;if(Array.isArray(t)){if(t=t.reduce(function(m,I){return m.concat(I)},[]),!t[0].isSegment)throw new Error("Segments required.");n.splice(e,1);for(var l=t.length,f=0;f<l;f++){var d=t[f];i=this.prepareSegment(d,s,a),n.splice(e+f,0,i),s=i,u&&i.isSubpathStart&&(u=!1)}}else{if(!t||!t.isSegment)throw new Error("Segment required.");i=this.prepareSegment(t,s,a),n.splice(e,1,i),u&&i.isSubpathStart&&(u=!1)}u&&a&&this.updateSubpathStartSegment(a)},round:function(e){for(var t=this.segments,n=t.length,r=0;r<n;r++){var i=t[r];i.round(e)}return this},scale:function(e,t,n){for(var r=this.segments,i=r.length,o=0;o<i;o++){var s=r[o];s.scale(e,t,n)}return this},segmentAt:function(e,t){var n=this.segmentIndexAt(e,t);return n?this.getSegment(n):null},segmentAtLength:function(e,t){var n=this.segmentIndexAtLength(e,t);return n?this.getSegment(n):null},segmentIndexAt:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;e<0&&(e=0),e>1&&(e=1),t=t||{};var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s={precision:i,segmentSubdivisions:o},a=this.length(s),u=a*e;return this.segmentIndexAtLength(u,s)},segmentIndexAtLength:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;var i=!0;e<0&&(i=!1,e=-e),t=t||{};for(var o=t.precision===void 0?this.PRECISION:t.precision,s=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,a=null,u=0,l=0;l<r;l++){var f=i?l:r-1-l,d=n[f],m=s[f],I=d.length({precision:o,subdivisions:m});if(d.isVisible){if(e<=u+I)return f;a=f}u+=I}return a},serialize:function(){if(!this.isValid())throw new Error("Invalid path segments.");return this.toString()},tangentAt:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;e<0&&(e=0),e>1&&(e=1),t=t||{};var i=t.precision===void 0?this.PRECISION:t.precision,o=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:i}):t.segmentSubdivisions,s={precision:i,segmentSubdivisions:o},a=this.length(s),u=a*e;return this.tangentAtLength(u,s)},tangentAtLength:function(e,t){var n=this.segments,r=n.length;if(r===0)return null;var i=!0;e<0&&(i=!1,e=-e),t=t||{};for(var o=t.precision===void 0?this.PRECISION:t.precision,s=t.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,a,u=0,l=0;l<r;l++){var f=i?l:r-1-l,d=n[f],m=s[f],I=d.length({precision:o,subdivisions:m});if(d.isDifferentiable()){if(e<=u+I)return d.tangentAtLength((i?1:-1)*(e-u),{precision:o,subdivisions:m});a=d}u+=I}if(a){var C=i?1:0;return a.tangentAtT(C)}return null},tangentAtT:function(e){var t=this.segments,n=t.length;if(n===0)return null;var r=e.segmentIndex;if(r<0)return t[0].tangentAtT(0);if(r>=n)return t[n-1].tangentAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].tangentAtT(i)},toPoints:function(e){var t=this.segments,n=t.length;if(n===0)return null;e=e||{};for(var r=e.precision===void 0?this.PRECISION:e.precision,i=e.segmentSubdivisions===void 0?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=[],s=[],a=0;a<n;a++){var u=t[a];if(u.isVisible){var l=i[a];if(l.length>0){var f=l.map(function(d){return d.start});Array.prototype.push.apply(s,f)}else s.push(u.start)}else s.length>0&&(s.push(t[a-1].end),o.push(s),s=[])}return s.length>0&&(s.push(this.end),o.push(s)),o},toPolylines:function(e){var t=[],n=this.toPoints(e);if(!n)return null;for(var r=0,i=n.length;r<i;r++)t.push(new ft(n[r]));return t},toString:function(){for(var e=this.segments,t=e.length,n="",r=0;r<t;r++){var i=e[r];n+=i.serialize()+" "}return n.trim()},translate:function(e,t){for(var n=this.segments,r=n.length,i=0;i<r;i++){var o=n[i];o.translate(e,t)}return this},updateSubpathStartSegment:function(e){for(var t=e.previousSegment;e&&!e.isSubpathStart;)t?e.subpathStartSegment=t.subpathStartSegment:e.subpathStartSegment=null,t=e,e=e.nextSegment},validate:function(){return this.isValid()||this.insertSegment(0,De.createSegment("M",0,0)),this}};Object.defineProperty(De.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(t===0)return null;for(var n=0;n<t;n++){var r=e[n];if(r.isVisible)return r.start}return e[t-1].end}});Object.defineProperty(De.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(t===0)return null;for(var n=t-1;n>=0;n--){var r=e[n];if(r.isVisible)return r.end}return e[t-1].end}});function ro(e,t){return t.unshift(null),new(Function.prototype.bind.apply(e,t))}var la={bbox:function(){throw new Error("Declaration missing for virtual function.")},clone:function(){throw new Error("Declaration missing for virtual function.")},closestPoint:function(){throw new Error("Declaration missing for virtual function.")},closestPointLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointNormalizedLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointT:function(e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither closestPointT() nor closestPointNormalizedLength() function is implemented.")},closestPointTangent:function(){throw new Error("Declaration missing for virtual function.")},divideAt:function(){throw new Error("Declaration missing for virtual function.")},divideAtLength:function(){throw new Error("Declaration missing for virtual function.")},divideAtT:function(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither divideAtT() nor divideAt() function is implemented.")},equals:function(){throw new Error("Declaration missing for virtual function.")},getSubdivisions:function(){throw new Error("Declaration missing for virtual function.")},isDifferentiable:function(){throw new Error("Declaration missing for virtual function.")},isSegment:!0,isSubpathStart:!1,isVisible:!0,length:function(){throw new Error("Declaration missing for virtual function.")},lengthAtT:function(e){if(e<=0)return 0;var t=this.length();return e>=1?t:t*e},nextSegment:null,pointAt:function(){throw new Error("Declaration missing for virtual function.")},pointAtLength:function(){throw new Error("Declaration missing for virtual function.")},pointAtT:function(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither pointAtT() nor pointAt() function is implemented.")},previousSegment:null,round:function(){throw new Error("Declaration missing for virtual function.")},subpathStartSegment:null,scale:function(){throw new Error("Declaration missing for virtual function.")},serialize:function(){throw new Error("Declaration missing for virtual function.")},tangentAt:function(){throw new Error("Declaration missing for virtual function.")},tangentAtLength:function(){throw new Error("Declaration missing for virtual function.")},tangentAtT:function(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither tangentAtT() nor tangentAt() function is implemented.")},toString:function(){throw new Error("Declaration missing for virtual function.")},translate:function(){throw new Error("Declaration missing for virtual function.")}};Object.defineProperty(la,"end",{configurable:!0,enumerable:!0,writable:!0});Object.defineProperty(la,"start",{configurable:!0,enumerable:!0,get:function(){if(!this.previousSegment)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path; OR segment has not yet been added to a path.)");return this.previousSegment.end}});Object.defineProperty(la,"type",{configurable:!0,enumerable:!0,get:function(){throw new Error("Bad segment declaration. No type specified.")}});var Fn=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof Fn))return ro(Fn,e);if(t===0)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates (none provided).");var r;if(e[0]instanceof me){if(t===1)return this.end=e[0].end.clone(),this;throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+t+" lines provided).")}else if(typeof e[0]=="string"||typeof e[0]=="number"){if(t===2)return this.end=new k(+e[0],+e[1]),this;if(t<2)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+t+" coordinates provided).");var i;for(r=[],n=0;n<t;n+=2)i=e.slice(n,n+2),r.push(ro(Fn,i));return r}else{if(t===1)return this.end=new k(e[0]),this;var o;for(r=[],n=0;n<t;n+=1)o=e[n],r.push(new Fn(o));return r}},JT={clone:function(){return new Fn(this.end)},divideAt:function(e){var t=new me(this.start,this.end),n=t.divideAt(e);return[new Fn(n[0]),new Fn(n[1])]},divideAtLength:function(e){var t=new me(this.start,this.end),n=t.divideAtLength(e);return[new Fn(n[0]),new Fn(n[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return this.previousSegment?!this.start.equals(this.end):!1},round:function(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(JT,"type",{configurable:!0,enumerable:!0,value:"L"});Fn.prototype=ua(la,me.prototype,JT);var Br=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof Br))return ro(Br,e);if(t===0)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates (none provided).");var r;if(e[0]instanceof ht){if(t===1)return this.controlPoint1=e[0].controlPoint1.clone(),this.controlPoint2=e[0].controlPoint2.clone(),this.end=e[0].end.clone(),this;throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+t+" curves provided).")}else if(typeof e[0]=="string"||typeof e[0]=="number"){if(t===6)return this.controlPoint1=new k(+e[0],+e[1]),this.controlPoint2=new k(+e[2],+e[3]),this.end=new k(+e[4],+e[5]),this;if(t<6)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+t+" coordinates provided).");var i;for(r=[],n=0;n<t;n+=6)i=e.slice(n,n+6),r.push(ro(Br,i));return r}else{if(t===3)return this.controlPoint1=new k(e[0]),this.controlPoint2=new k(e[1]),this.end=new k(e[2]),this;if(t<3)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+t+" points provided).");var o;for(r=[],n=0;n<t;n+=3)o=e.slice(n,n+3),r.push(ro(Br,o));return r}},QT={clone:function(){return new Br(this.controlPoint1,this.controlPoint2,this.end)},divideAt:function(e,t){var n=new ht(this.start,this.controlPoint1,this.controlPoint2,this.end),r=n.divideAt(e,t);return[new Br(r[0]),new Br(r[1])]},divideAtLength:function(e,t){var n=new ht(this.start,this.controlPoint1,this.controlPoint2,this.end),r=n.divideAtLength(e,t);return[new Br(r[0]),new Br(r[1])]},divideAtT:function(e){var t=new ht(this.start,this.controlPoint1,this.controlPoint2,this.end),n=t.divideAtT(e);return[new Br(n[0]),new Br(n[1])]},isDifferentiable:function(){if(!this.previousSegment)return!1;var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},round:function(e){return this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},serialize:function(){var e=this.controlPoint1,t=this.controlPoint2,n=this.end;return this.type+" "+e.x+" "+e.y+" "+t.x+" "+t.y+" "+n.x+" "+n.y},toString:function(){return this.type+" "+this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}};Object.defineProperty(QT,"type",{configurable:!0,enumerable:!0,value:"C"});Br.prototype=ua(la,ht.prototype,QT);var ca=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof ca))return ro(ca,e);if(t===0)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates (none provided).");var r;if(e[0]instanceof me){if(t===1)return this.end=e[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+t+" lines provided).")}else if(e[0]instanceof ht){if(t===1)return this.end=e[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+t+" curves provided).")}else if(typeof e[0]=="string"||typeof e[0]=="number"){if(t===2)return this.end=new k(+e[0],+e[1]),this;if(t<2)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+t+" coordinates provided).");var i;for(r=[],n=0;n<t;n+=2)i=e.slice(n,n+2),n===0?r.push(ro(ca,i)):r.push(ro(Fn,i));return r}else{if(t===1)return this.end=new k(e[0]),this;var o;for(r=[],n=0;n<t;n+=1)o=e[n],n===0?r.push(new ca(o)):r.push(new Fn(o));return r}},A0={bbox:function(){return null},clone:function(){return new ca(this.end)},closestPoint:function(){return this.end.clone()},closestPointNormalizedLength:function(){return 0},closestPointLength:function(){return 0},closestPointT:function(){return 1},closestPointTangent:function(){return null},divideAt:function(){return[this.clone(),this.clone()]},divideAtLength:function(){return[this.clone(),this.clone()]},equals:function(e){return this.end.equals(e.end)},getSubdivisions:function(){return[]},isDifferentiable:function(){return!1},isSubpathStart:!0,isVisible:!1,length:function(){return 0},lengthAtT:function(){return 0},pointAt:function(){return this.end.clone()},pointAtLength:function(){return this.end.clone()},pointAtT:function(){return this.end.clone()},round:function(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},tangentAt:function(){return null},tangentAtLength:function(){return null},tangentAtT:function(){return null},toString:function(){return this.type+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(A0,"start",{configurable:!0,enumerable:!0,get:function(){throw new Error("Illegal access. Moveto segments should not need a start property.")}});Object.defineProperty(A0,"type",{configurable:!0,enumerable:!0,value:"M"});ca.prototype=ua(la,A0);var Lu=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof Lu))return ro(Lu,e);if(t>0)throw new Error("Closepath constructor expects no arguments.");return this},w0={clone:function(){return new Lu},divideAt:function(e){var t=new me(this.start,this.end),n=t.divideAt(e);return[n[1].isDifferentiable()?new Fn(n[0]):this.clone(),new Fn(n[1])]},divideAtLength:function(e){var t=new me(this.start,this.end),n=t.divideAtLength(e);return[n[1].isDifferentiable()?new Fn(n[0]):this.clone(),new Fn(n[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)},round:function(){return this},scale:function(){return this},serialize:function(){return this.type},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(){return this}};Object.defineProperty(w0,"end",{configurable:!0,enumerable:!0,get:function(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. Moveto); OR segment has not yet been added to a path.)");return this.subpathStartSegment.end}});Object.defineProperty(w0,"type",{configurable:!0,enumerable:!0,value:"Z"});Lu.prototype=ua(la,me.prototype,w0);var SV=De.segmentTypes={L:Fn,C:Br,M:ca,Z:Lu,z:Lu};De.regexSupportedData=new RegExp("^[\\s\\d"+Object.keys(SV).join("")+",.]*$");De.isDataSupported=function(e){return typeof e!="string"?!1:this.regexSupportedData.test(e)};var TV={curveThroughPoints:function(e){return console.warn("deprecated"),new De(ht.throughPoints(e)).serialize()},getCurveControlPoints:function(e){console.warn("deprecated");var t=[],n=[],r=e.length-1,i;if(r==1)return t[0]=new k((2*e[0].x+e[1].x)/3,(2*e[0].y+e[1].y)/3),n[0]=new k(2*t[0].x-e[0].x,2*t[0].y-e[0].y),[t,n];var o=[];for(i=1;i<r-1;i++)o[i]=4*e[i].x+2*e[i+1].x;o[0]=e[0].x+2*e[1].x,o[r-1]=(8*e[r-1].x+e[r].x)/2;var s=this.getFirstControlPoints(o);for(i=1;i<r-1;++i)o[i]=4*e[i].y+2*e[i+1].y;o[0]=e[0].y+2*e[1].y,o[r-1]=(8*e[r-1].y+e[r].y)/2;var a=this.getFirstControlPoints(o);for(i=0;i<r;i++)t.push(new k(s[i],a[i])),i<r-1?n.push(new k(2*e[i+1].x-s[i+1],2*e[i+1].y-a[i+1])):n.push(new k((e[r].x+s[r-1])/2,(e[r].y+a[r-1])/2));return[t,n]},getCurveDivider:function(e,t,n,r){console.warn("deprecated");var i=new ht(e,t,n,r);return function(s){var a=i.divide(s);return[{p0:a[0].start,p1:a[0].controlPoint1,p2:a[0].controlPoint2,p3:a[0].end},{p0:a[1].start,p1:a[1].controlPoint1,p2:a[1].controlPoint2,p3:a[1].end}]}},getFirstControlPoints:function(e){console.warn("deprecated");var t=e.length,n=[],r=[],i=2;n[0]=e[0]/i;for(var o=1;o<t;o++)r[o]=1/i,i=(o<t-1?4:3.5)-r[o],n[o]=(e[o]-n[o-1])/i;for(o=1;o<t;o++)n[t-o-1]-=r[t-o]*n[t-o];return n},getInversionSolver:function(e,t,n,r){console.warn("deprecated");var i=new ht(e,t,n,r);return function(s){return i.closestPointT(s)}}};var ur=function(e){if(!(this instanceof ur))return new ur(e);if(typeof e=="string")return new ur.parse(e);this.points=Array.isArray(e)?e.map(k):[]};ur.parse=function(e){return new ur(np(e))};ur.fromRect=function(e){return new ur([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft()])};ur.prototype=ua(ft.prototype,{type:je.Polygon,clone:function(){return new ur(rp(this.points))},convexHull:function(){return new ur(ip(this.points))},lengthPoints:function(){let{start:e,end:t,points:n}=this;return n.length<=1||e.equals(t)?n:[...n,e.clone()]}});var T0={};Kt(T0,{ellipseWithEllipse:()=>eN,ellipseWithLine:()=>b0,exists:()=>KT,lineWithLine:()=>da,pathWithEllipse:()=>cN,pathWithLine:()=>uN,pathWithPath:()=>dN,pathWithPolygon:()=>cp,pathWithPolyline:()=>M0,pathWithRect:()=>lN,polygonWithEllipse:()=>up,polygonWithLine:()=>E0,polygonWithPolygon:()=>aN,polygonWithPolyline:()=>sN,polygonWithRect:()=>oN,polylineWithEllipse:()=>x0,polylineWithLine:()=>ap,polylineWithPolyline:()=>iN,polylineWithRect:()=>rN,rectWithEllipse:()=>nN,rectWithLine:()=>tN,rectWithRect:()=>D0});function KT(e,t,n,r){switch(e.type){case je.Line:{if(t.type===je.Line)return da(e,t);break}case je.Ellipse:{switch(t.type){case je.Line:return b0(e,t);case je.Ellipse:return eN(e,t)}break}case je.Rect:{switch(t.type){case je.Line:return tN(e,t);case je.Ellipse:return nN(e,t);case je.Rect:return D0(e,t)}break}case je.Polyline:{switch(t.type){case je.Line:return ap(e,t);case je.Ellipse:return x0(e,t);case je.Rect:return rN(e,t);case je.Polyline:return iN(e,t)}break}case je.Polygon:{switch(t.type){case je.Line:return E0(e,t);case je.Ellipse:return up(e,t);case je.Rect:return oN(e,t);case je.Polyline:return sN(e,t);case je.Polygon:return aN(e,t)}break}case je.Path:{switch(t.type){case je.Line:return uN(e,t,n);case je.Ellipse:return cN(e,t,n);case je.Rect:return lN(e,t,n);case je.Polyline:return M0(e,t,n);case je.Polygon:return cp(e,t,n);case je.Path:return dN(e,t,n,r)}break}}switch(t.type){case je.Ellipse:case je.Rect:case je.Polyline:case je.Polygon:case je.Path:return KT(t,e,r,n);default:throw Error(`The intersection for ${e} and ${t} could not be found.`)}}function da(e,t){let n=e.start.x,r=e.start.y,i=e.end.x,o=e.end.y,s=t.start.x,a=t.start.y,u=t.end.x,l=t.end.y,f=i-n,d=o-r,m=u-s,I=l-a,C=n-s,M=r-a,E=f*I-m*d,N=(f*M-d*C)/E,B=(m*M-I*C)/E;return N>=0&&N<=1&&B>=0&&B<=1}function b0(e,t){let n=e.a,r=e.b,i=e.x,o=e.y,s=t.start.x-i,a=t.end.x-i,u=t.start.y-o,l=t.end.y-o,f=n*n,d=r*r,m=a-s,I=l-u,C=m*m/f+I*I/d,M=2*s*m/f+2*u*I/d,E=s*s/f+u*u/d-1,N=M*M-4*C*E;if(N===0){let B=-M/2/C;return B>=0&&B<=1}else if(N>0){let B=Math.sqrt(N),Z=(-M+B)/2/C,$=(-M-B)/2/C;return Z>=0&&Z<=1||$>=0&&$<=1}return!1}function eN(e,t){return NV(e,0,t,0)}function tN(e,t){let{start:n,end:r}=t,{x:i,y:o,width:s,height:a}=e;return n.x>i+s&&r.x>i+s||n.x<i&&r.x<i||n.y>o+a&&r.y>o+a||n.y<o&&r.y<o?!1:e.containsPoint(t.start)||e.containsPoint(t.end)?!0:da(e.topLine(),t)||da(e.rightLine(),t)||da(e.bottomLine(),t)||da(e.leftLine(),t)}function nN(e,t){return D0(e,de.fromEllipse(t))?up(ur.fromRect(e),t):!1}function D0(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function ap(e,t){return fN(e,t,{interior:!1})}function x0(e,t){return hN(e,t,{interior:!1})}function rN(e,t){return gN(e,t,{interior:!1})}function iN(e,t){return lp(e,t,{interior:!1})}function E0(e,t){return fN(e,t,{interior:!0})}function up(e,t){return hN(e,t,{interior:!0})}function oN(e,t){return gN(e,t,{interior:!0})}function sN(e,t){return lp(e,t,{interior:!0})}function aN(e,t){return S0(e,t,{interior:!0})}function uN(e,t,n){return e.getSubpaths().some(r=>{let[i]=r.toPolylines(n),{type:o}=r.getSegment(-1);return o==="Z"?E0(i,t):ap(i,t)})}function cN(e,t,n){return e.getSubpaths().some(r=>{let[i]=r.toPolylines(n),{type:o}=r.getSegment(-1);return o==="Z"?up(i,t):x0(i,t)})}function lN(e,t,n){return cp(e,ur.fromRect(t),n)}function M0(e,t,n){return pN(e,t,n,{interior:!1})}function cp(e,t,n){return pN(e,t,n,{interior:!0})}function dN(e,t,n,r){return e.getSubpaths().some(i=>{let[o]=i.toPolylines(n),{type:s}=i.getSegment(-1);return s==="Z"?cp(t,o,r):M0(t,o,r)})}function fN(e,t,n={}){let{interior:r=!1}=n,i;if(r){if(e.containsPoint(t.start))return!0;let{start:a,end:u,points:l}=e;i=u.equals(a)?l:[...l,a]}else i=e.points;let{length:o}=i,s=new me;for(let a=0;a<o-1;a++)if(s.start=i[a],s.end=i[a+1],da(t,s))return!0;return!1}function hN(e,t,n={}){let{start:r,end:i,points:o}=e;if(t.containsPoint(r))return!0;let s,{interior:a=!1}=n;if(a){if(e.containsPoint(t.center()))return!0;s=i.equals(r)?o:[...o,r]}else s=o;let{length:u}=s,l=new me;for(let f=0;f<u-1;f++)if(l.start=s[f],l.end=s[f+1],b0(t,l))return!0;return!1}function gN(e,t,n){let r=ur.fromRect(t);return S0(e,r,n)}function pN(e,t,n,r){return e.getSubpaths().some(i=>{let[o]=i.toPolylines(n),{type:s}=i.getSegment(-1);return s==="Z"?S0(t,o,r):lp(t,o,r)})}function lp(e,t,n={}){let{interior:r=!1}=n,i;if(r){let{start:u}=t;if(e.containsPoint(u))return!0;i=e.clone().close()}else i=e;let o=t.points,{length:s}=o,a=new me;for(let u=0;u<s-1;u++)if(a.start=o[u],a.end=o[u+1],ap(i,a))return!0;return!1}function S0(e,t,n){return t.containsPoint(e.start)||lp(e,t.clone().close(),n)}function NV(e,t,n,r){let{cos:i,sin:o}=Math,s=o(t),a=i(t),u=o(r),l=i(r),f=s*s,d=a*a,m=s*a,I=u*u,C=l*l,M=u*l,E=e.a*e.a,N=e.b*e.b,B=n.a*n.a,Z=n.b*n.b,$=E*f+N*d,te=B*I+Z*C,p=E*d+N*f,y=B*C+Z*I,D=2*(N-E)*m,S=2*(Z-B)*M,_=-2*$*e.x-D*e.y,j=-2*te*n.x-S*n.y,V=-D*e.x-2*p*e.y,W=-S*n.x-2*y*n.y,oe=$*e.x*e.x+p*e.y*e.y+D*e.x*e.y-E*N,fe=te*n.x*n.x+y*n.y*n.y+S*n.x*n.y-B*Z;D=D/2,S=S/2,_=_/2,j=j/2,V=V/2,W=W/2;let U=ts([[$,D,_],[D,p,V],[_,V,oe]]),q=ts([[te,S,j],[S,y,W],[j,W,fe]]),Y=.33333333*(ts([[te,D,_],[S,p,V],[j,V,oe]])+ts([[$,S,_],[D,y,V],[_,W,oe]])+ts([[$,D,j],[D,p,W],[_,V,fe]])),Q=.33333333*(ts([[$,S,j],[D,y,W],[_,W,fe]])+ts([[te,D,j],[S,p,W],[j,V,fe]])+ts([[te,S,_],[S,y,V],[j,W,oe]])),Pe=sp([[U,Y],[Y,Q]]),Se=sp([[U,Q],[Y,q]]),Et=sp([[Y,Q],[Q,q]]);return!(sp([[2*Pe,Se],[Se,2*Et]])>0&&(Q>0||Y>0))}function sp(e){return e[0][0]*e[1][1]-e[0][1]*e[1][0]}function ts(e){return e[0][0]*e[1][1]*e[2][2]-e[0][0]*e[1][2]*e[2][1]-e[0][1]*e[1][0]*e[2][2]+e[0][1]*e[1][2]*e[2][0]+e[0][2]*e[1][0]*e[2][1]-e[0][2]*e[1][1]*e[2][0]}var _V=T0;var Vw=Gi(kd(),1);var gs=Gi(fs(),1);var ZV=(function(){var e=typeof window=="object"&&!!window.SVGAngle;if(!e)return function(){throw new Error("SVG is required to use Vectorizer.")};var t={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},n="1.1",r=Math,i=r.PI,o=r.atan2,s=r.sqrt,a=r.min,u=r.max,l=r.cos,f=r.sin,d=function(y,D,S){if(!(this instanceof d))return d.apply(Object.create(d.prototype),arguments);if(y){if(d.isV(y)&&(y=y.node),D=D||{},d.isString(y)){if(y=y.trim(),y.toLowerCase()==="svg")y=d.createSvgDocument();else if(y[0]==="<"){var _=d.createSvgDocument(y);if(_.childNodes.length>1){var j=[],V,W;for(V=0,W=_.childNodes.length;V<W;V++){var oe=_.childNodes[V];j.push(new d(document.importNode(oe,!0)))}return j}y=document.importNode(_.firstChild,!0)}else y=document.createElementNS(t.svg,y);d.ensureId(y)}return this.node=y,this.setAttributes(D),S&&this.append(S),this}},m=d.prototype;Object.defineProperty(m,"id",{enumerable:!0,get:function(){return this.node.id},set:function(y){this.node.id=y}}),m.getTransformToElement=function(y){var D=this.node;if(d.isSVGGraphicsElement(y)&&d.isSVGGraphicsElement(D)){var S=d.toNode(y).getScreenCTM(),_=D.getScreenCTM();if(S&&_)return S.inverse().multiply(_)}return d.createSVGMatrix()},m.transform=function(y,D){var S=this.node;if(d.isUndefined(y))return d.transformStringToMatrix(this.attr("transform"));if(D&&D.absolute)return this.attr("transform",d.matrixToTransformString(y));var _=d.createSVGTransform(y);return S.transform.baseVal.appendItem(_),this},m.translate=function(y,D,S){S=S||{},D=D||0;var _=this.attr("transform")||"",j=d.parseTransformString(_);if(_=j.value,d.isUndefined(y))return j.translate;_=_.replace(/translate\([^)]*\)/g,"").trim();var V=S.absolute?y:j.translate.tx+y,W=S.absolute?D:j.translate.ty+D,oe="translate("+V+","+W+")";return this.attr("transform",(oe+" "+_).trim()),this},m.rotate=function(y,D,S,_){_=_||{};var j=this.attr("transform")||"",V=d.parseTransformString(j);if(j=V.value,d.isUndefined(y))return V.rotate;j=j.replace(/rotate\([^)]*\)/g,"").trim(),y%=360;var W=_.absolute?y:V.rotate.angle+y,oe=D!==void 0&&S!==void 0?","+D+","+S:"",fe="rotate("+W+oe+")";return this.attr("transform",(j+" "+fe).trim()),this},m.scale=function(y,D){D=d.isUndefined(D)?y:D;var S=this.attr("transform")||"",_=d.parseTransformString(S);if(S=_.value,d.isUndefined(y))return _.scale;S=S.replace(/scale\([^)]*\)/g,"").trim();var j="scale("+y+","+D+")";return this.attr("transform",(S+" "+j).trim()),this},m.bbox=function(y,D){var S,_=this.node,j=_.ownerSVGElement;if(!j)return new de(0,0,0,0);try{S=_.getBBox()}catch{S={x:_.clientLeft,y:_.clientTop,width:_.clientWidth,height:_.clientHeight}}if(y)return new de(S);var V=this.getTransformToElement(D||j);return d.transformRect(S,V)},m.getBBox=function(y){var D={},S,_=this.node,j=_.ownerSVGElement;if(!j||!d.isSVGGraphicsElement(_))return new de(0,0,0,0);if(y&&(y.target&&(D.target=d.toNode(y.target)),y.recursive&&(D.recursive=y.recursive)),D.recursive){var W=this.children(),oe=W.length;if(oe===0)return this.getBBox({target:D.target,recursive:!1});D.target||(D.target=this);for(var fe=0;fe<oe;fe++){var U=W[fe],q;U.children().length===0?q=U.getBBox({target:D.target,recursive:!1}):q=U.getBBox({target:D.target,recursive:!0}),S?S=S.union(q):S=q}return S}else{try{S=_.getBBox()}catch{S={x:_.clientLeft,y:_.clientTop,width:_.clientWidth,height:_.clientHeight}}if(D.target){var V=this.getTransformToElement(D.target);return d.transformRect(S,V)}else return new de(S)}};function I(y,D){y||(y={});var S=d("textPath"),_=y.d;if(_&&y["xlink:href"]===void 0){var j=d("path").attr("d",_).appendTo(D.defs());S.attr("xlink:href","#"+j.id)}return d.isObject(y)&&S.attr(y),S.node}function C(y,D,S){S||(S={});for(var _=S.includeAnnotationIndices,j=S.eol,V=S.lineHeight,W=S.baseSize,oe=0,fe={},U=D.length-1,q=0;q<=U;q++){var Y=D[q],Q=null;if(d.isObject(Y)){var Pe=Y.attrs,Se=d("tspan",Pe),Et=Se.node,jt=Y.t;j&&q===U&&(jt+=j),Et.textContent=jt;var xe=Pe.class;xe&&Se.addClass(xe),_&&Se.attr("annotations",Y.annotations),Q=parseFloat(Pe["font-size"]),isFinite(Q)||(Q=W),Q&&Q>oe&&(oe=Q)}else j&&q===U&&(Y+=j),Et=document.createTextNode(Y||" "),W&&W>oe&&(oe=W);y.appendChild(Et)}return oe&&(fe.maxFontSize=oe),V?fe.lineHeight=V:oe&&(fe.lineHeight=oe*1.2),fe}var M=/em$/;function E(y,D){var S=parseFloat(y);return M.test(y)?S*D:S}function N(y,D,S,_){if(!Array.isArray(D))return 0;var j=D.length;if(!j)return 0;for(var V=D[0],W=E(V.maxFontSize,S)||S,oe=0,fe=E(_,S),U=1;U<j;U++){V=D[U];var q=E(V.lineHeight,S)||fe;oe+=q}var Y=E(V.maxFontSize,S)||S,Q;switch(y){case"middle":Q=W/2-.15*Y-oe/2;break;case"bottom":Q=-(.25*Y)-oe;break;default:case"top":Q=.8*W;break}return Q}m.text=function(y,D){if(y&&typeof y!="string")throw new Error("Vectorizer: text() expects the first argument to be a string.");y=d.sanitizeText(y),D||(D={});var S=D.displayEmpty,_=D.eol,j=D.textPath,V=D.textVerticalAnchor,W=V==="middle"||V==="bottom"||V==="top",oe=D.x;oe===void 0&&(oe=this.attr("x")||0);var fe=D.includeAnnotationIndices,U=D.annotations;U&&!d.isArray(U)&&(U=[U]);var q=D.lineHeight,Y=q==="auto",Q=Y?"1.5em":q||"1em";this.empty(),this.attr({"xml:space":"preserve",display:y||S?null:"none"});var Pe=parseFloat(this.attr("font-size"));Pe||(Pe=16,(W||U)&&this.attr("font-size",Pe));var Se=document,Et;j?(typeof j=="string"&&(j={d:j}),Et=I(j,this)):Et=Se.createDocumentFragment();for(var jt=0,xe=y.split(`
20
+ `),Te=[],se,ie=0,ge=xe.length-1;ie<=ge;ie++){var Ue=Q,ut="v-line",_e=Se.createElementNS(t.svg,"tspan"),mt=xe[ie],w;if(mt)if(U){var T=d.annotateString(mt,U,{offset:-jt,includeAnnotationIndices:fe});w=C(_e,T,{includeAnnotationIndices:fe,eol:ie!==ge&&_,lineHeight:Y?null:Q,baseSize:Pe});var O=w.lineHeight;O&&Y&&ie!==0&&(Ue=O),ie===0&&(se=w.maxFontSize*.8)}else _&&ie!==ge&&(mt+=_),_e.textContent=mt;else{_e.textContent="-",ut+=" v-empty-line";var F=_e.style;if(F.fillOpacity=0,F.strokeOpacity=0,U){w={},T=d.findAnnotationsAtIndex(U,jt);let ae=Pe;for(let Ie=T.length;Ie>0;Ie--){let Fe=T[Ie-1].attrs;if(!Fe||!("font-size"in Fe))continue;let nt=parseFloat(Fe["font-size"]);if(isFinite(nt)){ae=nt;break}}Y&&(ie>0?Ue=ae*1.2:se=ae*.8),_e.setAttribute("font-size",ae),w.maxFontSize=ae}}w&&Te.push(w),ie>0&&_e.setAttribute("dy",Ue),(ie>0||j)&&_e.setAttribute("x",oe),_e.className.baseVal=ut,Et.appendChild(_e),jt+=mt.length+1}if(W)if(U)Ue=N(V,Te,Pe,Q);else if(V==="top")Ue="0.8em";else{var G;switch(ge>0?(G=parseFloat(Q)||1,G*=ge,M.test(Q)||(G/=Pe)):G=0,V){case"middle":Ue=.3-G/2+"em";break;case"bottom":Ue=-G-.3+"em";break}}else V===0?Ue="0em":V?Ue=V:(Ue=0,this.attr("y")===null&&this.attr("y",se||"0.8em"));return Et.firstChild.setAttribute("dy",Ue),this.append(Et),this},m.removeAttr=function(y){let D=te[y],{ns:S,local:_}=d.qualifyAttr(D),j=this.node;return S?j.hasAttributeNS(S,_)&&j.removeAttributeNS(S,_):j.hasAttribute(D)&&j.removeAttribute(D),this},m.attr=function(y,D){if(d.isUndefined(y)){for(var S=this.node.attributes,_={},j=0;j<S.length;j++)_[S[j].name]=S[j].value;return _}if(d.isString(y)&&d.isUndefined(D))return this.node.getAttribute(te[y]);if(typeof y=="object")for(var V in y)y.hasOwnProperty(V)&&this.setAttribute(V,y[V]);else this.setAttribute(y,D);return this},m.normalizePath=function(){var y=this.tagName();return y==="PATH"&&this.attr("d",d.normalizePathData(this.attr("d"))),this},m.remove=function(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this},m.empty=function(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this},m.setAttributes=function(y){for(var D in y)y.hasOwnProperty(D)&&this.setAttribute(D,y[D]);return this},m.append=function(y){d.isArray(y)||(y=[y]);for(var D=0,S=y.length;D<S;D++)this.node.appendChild(d.toNode(y[D]));return this},m.prepend=function(y){var D=this.node.firstChild;return D?d(D).before(y):this.append(y)},m.before=function(y){var D=this.node,S=D.parentNode;if(S){d.isArray(y)||(y=[y]);for(var _=0,j=y.length;_<j;_++)S.insertBefore(d.toNode(y[_]),D)}return this},m.appendTo=function(y){return d.toNode(y).appendChild(this.node),this},m.svg=function(){return this.node instanceof window.SVGSVGElement?this:d(this.node.ownerSVGElement)},m.tagName=function(){return this.node.tagName.toUpperCase()},m.defs=function(){var y=this.svg()||this,D=y.node.getElementsByTagName("defs")[0];return D?d(D):d("defs").appendTo(y)},m.clone=function(){var y=d(this.node.cloneNode(!0));return y.node.id=d.uniqueId(),y},m.findOne=function(y){var D=this.node.querySelector(y);return D?d(D):void 0},m.find=function(y){var D=[],S=this.node.querySelectorAll(y);if(S)for(var _=0;_<S.length;_++)D.push(d(S[_]));return D},m.children=function(){for(var y=this.node.childNodes,D=[],S=0;S<y.length;S++){var _=y[S];_.nodeType===1&&D.push(d(y[S]))}return D},m.parent=function(){return d(this.node.parentNode)||null},m.index=function(){for(var y=0,D=this.node.previousSibling;D;)D.nodeType===1&&y++,D=D.previousSibling;return y},m.findParentByClass=function(y,D){for(var S=this.node.ownerSVGElement,_=this.node.parentNode;_&&_!==D&&_!==S;){var j=d(_);if(j.hasClass(y))return j;_=_.parentNode}return null},m.contains=function(y){var D=this.node,S=d.toNode(y),_=S&&S.parentNode;return D===_||!!(_&&_.nodeType===1&&D.compareDocumentPosition(_)&16)},m.toLocalPoint=function(y,D){var S=this.svg().node,_=S.createSVGPoint();_.x=y,_.y=D;try{var j=_.matrixTransform(S.getScreenCTM().inverse()),V=this.getTransformToElement(S).inverse()}catch{return _}return j.matrixTransform(V)},m.translateCenterToPoint=function(y){var D=this.getBBox({target:this.svg()}),S=D.center();return this.translate(y.x-S.x,y.y-S.y),this},m.translateAndAutoOrient=function(y,D,S){y=new k(y),D=new k(D),S||(S=this.svg());var _=this.scale();this.attr("transform","");var j=this.getBBox({target:S}).scale(_.sx,_.sy),V=d.createSVGTransform();V.setTranslate(-j.x-j.width/2,-j.y-j.height/2);var W=d.createSVGTransform(),oe=y.angleBetween(D,y.clone().offset(1,0));oe&&W.setRotate(oe,0,0);var fe=d.createSVGTransform(),U=y.clone().move(D,j.width/2);fe.setTranslate(2*y.x-U.x,2*y.y-U.y);var q=this.getTransformToElement(S),Y=d.createSVGTransform();return Y.setMatrix(fe.matrix.multiply(W.matrix.multiply(V.matrix.multiply(q.scale(_.sx,_.sy))))),this.attr("transform",d.matrixToTransformString(Y.matrix)),this},m.animateAlongPath=function(y,D){D=d.toNode(D);var S=d.ensureId(D),_=d("animateMotion",y),j=d("mpath",{"xlink:href":"#"+S});_.append(j),this.append(_);try{_.node.beginElement()}catch{if(document.documentElement.getAttribute("smiling")==="fake"){var V=_.node;V.animators=[];var W=V.getAttribute("id");W&&(id2anim[W]=V);for(var oe=getTargets(V),fe=0,U=oe.length;fe<U;fe++){var q=oe[fe],Y=new Animator(V,q,fe);animators.push(Y),V.animators[fe]=Y,Y.register()}}}return this};let B=/[^\x20\t\r\n\f]+/g;function Z(y){return d.isString(y)?y.trim().match(B)||[]:[]}m.hasClass=function(y){return d.isString(y)?this.node.classList.contains(y.trim()):!1},m.addClass=function(y){return this.node.classList.add(...Z(y)),this},m.removeClass=function(y){return this.node.classList.remove(...Z(y)),this},m.toggleClass=function(y,D){let S=Z(y);for(let _=0;_<S.length;_++)this.node.classList.toggle(S[_],D);return this},m.sample=function(y){y=y||1;for(var D=this.node,S=D.getTotalLength(),_=[],j=0,V;j<S;)V=D.getPointAtLength(j),_.push({x:V.x,y:V.y,distance:j}),j+=y;return _},m.convertToPath=function(){var y=d("path");y.attr(this.attr());var D=this.convertToPathData();return D&&y.attr("d",D),y},m.convertToPathData=function(){var y=this.tagName();switch(y){case"PATH":return this.attr("d");case"LINE":return d.convertLineToPathData(this.node);case"POLYGON":return d.convertPolygonToPathData(this.node);case"POLYLINE":return d.convertPolylineToPathData(this.node);case"ELLIPSE":return d.convertEllipseToPathData(this.node);case"CIRCLE":return d.convertCircleToPathData(this.node);case"RECT":return d.convertRectToPathData(this.node)}throw new Error(y+" cannot be converted to PATH.")},d.prototype.toGeometryShape=function(){var y,D,S,_,j,V,W,oe,fe,U,q,Y,Q,Pe,Se;switch(this.tagName()){case"RECT":return y=parseFloat(this.attr("x"))||0,D=parseFloat(this.attr("y"))||0,S=parseFloat(this.attr("width"))||0,_=parseFloat(this.attr("height"))||0,new de(y,D,S,_);case"CIRCLE":return j=parseFloat(this.attr("cx"))||0,V=parseFloat(this.attr("cy"))||0,W=parseFloat(this.attr("r"))||0,new wn({x:j,y:V},W,W);case"ELLIPSE":return j=parseFloat(this.attr("cx"))||0,V=parseFloat(this.attr("cy"))||0,oe=parseFloat(this.attr("rx"))||0,fe=parseFloat(this.attr("ry"))||0,new wn({x:j,y:V},oe,fe);case"POLYLINE":return U=d.getPointsFromSvgNode(this),new ft(U);case"POLYGON":return U=d.getPointsFromSvgNode(this),U.length>1&&U.push(U[0]),new ft(U);case"PATH":return q=this.attr("d"),De.isDataSupported(q)||(q=d.normalizePathData(q)),new De(q);case"LINE":return Y=parseFloat(this.attr("x1"))||0,Pe=parseFloat(this.attr("y1"))||0,Q=parseFloat(this.attr("x2"))||0,Se=parseFloat(this.attr("y2"))||0,new me({x:Y,y:Pe},{x:Q,y:Se})}return this.getBBox()},m.findIntersection=function(y,D){var S=this.svg().node;D=D||S;var _=this.getBBox({target:D}),j=_.center();if(_.intersectionWithLineFromCenterToPoint(y)){var V,W=this.tagName();if(W==="RECT"){var oe=new de(parseFloat(this.attr("x")||0),parseFloat(this.attr("y")||0),parseFloat(this.attr("width")),parseFloat(this.attr("height"))),fe=this.getTransformToElement(D),U=d.decomposeMatrix(fe),q=S.createSVGTransform();q.setRotate(-U.rotation,j.x,j.y);var Y=d.transformRect(oe,q.matrix.multiply(fe));V=new de(Y).intersectionWithLineFromCenterToPoint(y,U.rotation)}else if(W==="PATH"||W==="POLYGON"||W==="POLYLINE"||W==="CIRCLE"||W==="ELLIPSE"){var Q=W==="PATH"?this:this.convertToPath(),Pe=Q.sample(),Se=1/0,Et=[],jt,xe,Te,se,ie,ge;for(jt=0;jt<Pe.length;jt++)xe=Pe[jt],Te=d.createSVGPoint(xe.x,xe.y),Te=Te.matrixTransform(this.getTransformToElement(D)),xe=new k(Te),se=xe.distance(j),ie=xe.distance(y)*1.1,ge=se+ie,ge<Se?(Se=ge,Et=[{sample:xe,refDistance:ie}]):ge<Se+1&&Et.push({sample:xe,refDistance:ie});Et.sort(function(Ue,ut){return Ue.refDistance-ut.refDistance}),Et[0]&&(V=Et[0].sample)}return V}},m.setAttribute=function(y,D){let S=this.node;if(D===null)return this.removeAttr(y),this;let _=te[y],{ns:j}=d.qualifyAttr(_);return j?S.setAttributeNS(j,_,D):_==="id"?S.id=D:S.setAttribute(_,D),this},d.createSvgDocument=function(y){if(y){let S=`<svg xmlns="${t.svg}" xmlns:xlink="${t.xlink}" version="${n}">${y}</svg>`,{documentElement:_}=d.parseXML(S,{async:!1});return _}let D=document.createElementNS(t.svg,"svg");return D.setAttributeNS(t.xmlns,"xmlns:xlink",t.xlink),D.setAttribute("version",n),D},d.createSVGStyle=function(y){let{node:D}=d("style",{type:"text/css"},[d.createCDATASection(y)]);return D},d.createCDATASection=function(y=""){return document.implementation.createDocument(null,"xml",null).createCDATASection(y)},d.idCounter=0,d.uniqueId=function(){return"v-"+ ++d.idCounter},d.toNode=function(y){return d.isV(y)?y.node:y.nodeName&&y||y[0]},d.ensureId=function(y){return y=d.toNode(y),y.id||(y.id=d.uniqueId())},d.sanitizeText=function(y){return(y||"").replace(/ /g,"\xA0")},d.isUndefined=function(y){return typeof y>"u"},d.isString=function(y){return typeof y=="string"},d.isObject=function(y){return y&&typeof y=="object"},d.isArray=Array.isArray,d.parseXML=function(y,D){D=D||{};var S;try{var _=new DOMParser;d.isUndefined(D.async)||(_.async=D.async),S=_.parseFromString(y,"text/xml")}catch{S=void 0}if(!S||S.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+y);return S};let $=Object.create(null);["baseFrequency","baseProfile","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].forEach(y=>$[y]=y);let te=new Proxy($,{get(y,D){return d.supportCamelCaseAttributes?D in y?y[D]:y[D]=D.replace(/[A-Z]/g,"-$&").toLowerCase():D}});Object.defineProperty(d,"attributeNames",{value:te,writable:!1}),Object.defineProperty(d,"supportCamelCaseAttributes",{value:!1,writable:!0}),d.qualifyAttr=function(y){if(y.indexOf(":")!==-1){var D=y.split(":");return{ns:t[D[0]],local:D[1]}}return{ns:null,local:y}},d.transformSeparatorRegex=/[ ,]+/,d.transformRegex=/\b\w+\([^()]+\)/g,d.transformFunctionRegex=/\b(\w+)\(([^()]+)\)/,d.transformTranslateRegex=/\btranslate\(([^()]+)\)/,d.transformRotateRegex=/\brotate\(([^()]+)\)/,d.transformScaleRegex=/\bscale\(([^()]+)\)/,d.transformStringToMatrix=function(y){let D=d.createSVGMatrix(),S=y&&y.match(d.transformRegex);if(!S)return D;let _=S.length;for(let j=0;j<_;j++){let W=S[j].match(d.transformFunctionRegex);if(W){let oe,fe,U,q,Y,Q=d.createSVGMatrix(),Pe=W[1].toLowerCase(),Se=W[2].split(d.transformSeparatorRegex);switch(Pe){case"scale":oe=parseFloat(Se[0]),fe=Se[1]===void 0?oe:parseFloat(Se[1]),Q=Q.scaleNonUniform(oe,fe);break;case"translate":U=parseFloat(Se[0]),q=parseFloat(Se[1]),Q=Q.translate(U,q);break;case"rotate":Y=parseFloat(Se[0]),U=parseFloat(Se[1])||0,q=parseFloat(Se[2])||0,U!==0||q!==0?Q=Q.translate(U,q).rotate(Y).translate(-U,-q):Q=Q.rotate(Y);break;case"skewx":Y=parseFloat(Se[0]),Q=Q.skewX(Y);break;case"skewy":Y=parseFloat(Se[0]),Q=Q.skewY(Y);break;case"matrix":Q.a=parseFloat(Se[0]),Q.b=parseFloat(Se[1]),Q.c=parseFloat(Se[2]),Q.d=parseFloat(Se[3]),Q.e=parseFloat(Se[4]),Q.f=parseFloat(Se[5]);break;default:continue}D=D.multiply(Q)}}return D},d.matrixToTransformString=function(y){return y||(y=!0),"matrix("+(y.a!==void 0?y.a:1)+","+(y.b!==void 0?y.b:0)+","+(y.c!==void 0?y.c:0)+","+(y.d!==void 0?y.d:1)+","+(y.e!==void 0?y.e:0)+","+(y.f!==void 0?y.f:0)+")"},d.parseTransformString=function(y){var D,S,_;if(y){var j=d.transformSeparatorRegex;if(y.trim().indexOf("matrix")>=0){var V=d.transformStringToMatrix(y),W=d.decomposeMatrix(V);D=[W.translateX,W.translateY],_=[W.scaleX,W.scaleY],S=[W.rotation];var oe=[];(D[0]!==0||D[1]!==0)&&oe.push("translate("+D+")"),(_[0]!==1||_[1]!==1)&&oe.push("scale("+_+")"),S[0]!==0&&oe.push("rotate("+S+")"),y=oe.join(" ")}else{let U=y.match(d.transformTranslateRegex);U&&(D=U[1].split(j));let q=y.match(d.transformRotateRegex);q&&(S=q[1].split(j));let Y=y.match(d.transformScaleRegex);Y&&(_=Y[1].split(j))}}var fe=_&&_[0]?parseFloat(_[0]):1;return{value:y,translate:{tx:D&&D[0]?parseInt(D[0],10):0,ty:D&&D[1]?parseInt(D[1],10):0},rotate:{angle:S&&S[0]?parseInt(S[0],10):0,cx:S&&S[1]?parseInt(S[1],10):void 0,cy:S&&S[2]?parseInt(S[2],10):void 0},scale:{sx:fe,sy:_&&_[1]?parseFloat(_[1]):fe}}},d.deltaTransformPoint=function(y,D){var S=D.x*y.a+D.y*y.c+0,_=D.x*y.b+D.y*y.d+0;return{x:S,y:_}},d.decomposeMatrix=function(y){var D=d.deltaTransformPoint(y,{x:0,y:1}),S=d.deltaTransformPoint(y,{x:1,y:0}),_=180/i*o(D.y,D.x)-90,j=180/i*o(S.y,S.x);return{translateX:y.e,translateY:y.f,scaleX:s(y.a*y.a+y.b*y.b),scaleY:s(y.c*y.c+y.d*y.d),skewX:_,skewY:j,rotation:_}},d.matrixToScale=function(y){var D,S,_,j;return y?(D=d.isUndefined(y.a)?1:y.a,j=d.isUndefined(y.d)?1:y.d,S=y.b,_=y.c):D=j=1,{sx:S?s(D*D+S*S):D,sy:_?s(_*_+j*j):j}},d.matrixToRotate=function(y){var D={x:0,y:1};return y&&(D=d.deltaTransformPoint(y,D)),{angle:En(aa(o(D.y,D.x))-90)}},d.matrixToTranslate=function(y){return{tx:y&&y.e||0,ty:y&&y.f||0}},d.isV=function(y){return y instanceof d},d.isVElement=d.isV,d.isSVGGraphicsElement=function(y){return y?(y=d.toNode(y),y instanceof SVGElement&&typeof y.getScreenCTM=="function"):!1};var p=d("svg").node;return d.createSVGMatrix=function(y){var D=p.createSVGMatrix();for(var S in y)D[S]=y[S];return D},d.createSVGTransform=function(y){return d.isUndefined(y)?p.createSVGTransform():(y instanceof SVGMatrix||(y=d.createSVGMatrix(y)),p.createSVGTransformFromMatrix(y))},d.createSVGPoint=function(y,D){var S=p.createSVGPoint();return S.x=y,S.y=D,S},d.transformRect=function(y,D){var S=p.createSVGPoint();S.x=y.x,S.y=y.y;var _=S.matrixTransform(D);S.x=y.x+y.width,S.y=y.y;var j=S.matrixTransform(D);S.x=y.x+y.width,S.y=y.y+y.height;var V=S.matrixTransform(D);S.x=y.x,S.y=y.y+y.height;var W=S.matrixTransform(D),oe=a(_.x,j.x,V.x,W.x),fe=u(_.x,j.x,V.x,W.x),U=a(_.y,j.y,V.y,W.y),q=u(_.y,j.y,V.y,W.y);return new de(oe,U,fe-oe,q-U)},d.transformPoint=function(y,D){return new k(d.createSVGPoint(y.x,y.y).matrixTransform(D))},d.transformLine=function(y,D){return new me(d.transformPoint(y.start,D),d.transformPoint(y.end,D))},d.transformPolyline=function(y,D){var S=y instanceof ft?y.points:y;d.isArray(S)||(S=[]);for(var _=[],j=0,V=S.length;j<V;j++)_[j]=d.transformPoint(S[j],D);return new ft(_)},d.styleToObject=function(y){for(var D={},S=y.split(";"),_=0;_<S.length;_++){var j=S[_],V=j.split("=");D[V[0].trim()]=V[1].trim()}return D},d.createSlicePathData=function(y,D,S,_){var j=2*i-1e-6,V=y,W=D,oe=S,fe=_,U=(fe<oe&&(U=oe,oe=fe,fe=U),fe-oe),q=U<i?"0":"1",Y=l(oe),Q=f(oe),Pe=l(fe),Se=f(fe);return U>=j?V?"M0,"+W+"A"+W+","+W+" 0 1,1 0,"+-W+"A"+W+","+W+" 0 1,1 0,"+W+"M0,"+V+"A"+V+","+V+" 0 1,0 0,"+-V+"A"+V+","+V+" 0 1,0 0,"+V+"Z":"M0,"+W+"A"+W+","+W+" 0 1,1 0,"+-W+"A"+W+","+W+" 0 1,1 0,"+W+"Z":V?"M"+W*Y+","+W*Q+"A"+W+","+W+" 0 "+q+",1 "+W*Pe+","+W*Se+"L"+V*Pe+","+V*Se+"A"+V+","+V+" 0 "+q+",0 "+V*Y+","+V*Q+"Z":"M"+W*Y+","+W*Q+"A"+W+","+W+" 0 "+q+",1 "+W*Pe+","+W*Se+"L0,0Z"},d.mergeAttrs=function(y,D){for(var S in D)S==="class"?y[S]=y[S]?y[S]+" "+D[S]:D[S]:S==="style"?d.isObject(y[S])&&d.isObject(D[S])?y[S]=d.mergeAttrs(y[S],D[S]):d.isObject(y[S])?y[S]=d.mergeAttrs(y[S],d.styleToObject(D[S])):d.isObject(D[S])?y[S]=d.mergeAttrs(d.styleToObject(y[S]),D[S]):y[S]=d.mergeAttrs(d.styleToObject(y[S]),d.styleToObject(D[S])):y[S]=D[S];return y},d.annotateString=function(y,D,S){D=D||[],S=S||{};for(var _=S.offset||0,j=[],V,W=[],oe,fe,U=0;U<y.length;U++){oe=W[U]=y[U];for(var q=0;q<D.length;q++){var Y=D[q],Q=Y.start+_,Pe=Y.end+_;U>=Q&&U<Pe&&(d.isObject(oe)?oe.attrs=d.mergeAttrs(d.mergeAttrs({},oe.attrs),Y.attrs):oe=W[U]={t:y[U],attrs:Y.attrs},S.includeAnnotationIndices&&(oe.annotations||(oe.annotations=[])).push(q))}fe=W[U-1],fe?d.isObject(oe)&&d.isObject(fe)?JSON.stringify(oe.attrs)===JSON.stringify(fe.attrs)?V.t+=oe.t:(j.push(V),V=oe):d.isObject(oe)||d.isObject(fe)?(j.push(V),V=oe):V=(V||"")+oe:V=oe}return V&&j.push(V),j},d.findAnnotationsAtIndex=function(y,D){var S=[];return y&&y.forEach(function(_){_.start<D&&D<=_.end&&S.push(_)}),S},d.findAnnotationsBetweenIndexes=function(y,D,S){var _=[];return y&&y.forEach(function(j){(D>=j.start&&D<j.end||S>j.start&&S<=j.end||j.start>=D&&j.end<S)&&_.push(j)}),_},d.shiftAnnotations=function(y,D,S){return y&&y.forEach(function(_){_.start<D&&_.end>=D?_.end+=S:_.start>=D&&(_.start+=S,_.end+=S)}),y},d.convertLineToPathData=function(y){y=d(y);var D=["M",y.attr("x1"),y.attr("y1"),"L",y.attr("x2"),y.attr("y2")].join(" ");return D},d.convertPolygonToPathData=function(y){var D=d.getPointsFromSvgNode(y);return D.length===0?null:d.svgPointsToPath(D)+" Z"},d.convertPolylineToPathData=function(y){var D=d.getPointsFromSvgNode(y);return D.length===0?null:d.svgPointsToPath(D)},d.svgPointsToPath=function(y){for(var D=0,S=y.length;D<S;D++)y[D]=y[D].x+" "+y[D].y;return"M "+y.join(" L")},d.getPointsFromSvgNode=function(y){y=d.toNode(y);var D=[],S=y.points;if(S)for(var _=0,j=S.numberOfItems;_<j;_++)D.push(S.getItem(_));return D},d.KAPPA=.551784,d.convertCircleToPathData=function(y){y=d(y);var D=parseFloat(y.attr("cx"))||0,S=parseFloat(y.attr("cy"))||0,_=parseFloat(y.attr("r")),j=_*d.KAPPA,V=["M",D,S-_,"C",D+j,S-_,D+_,S-j,D+_,S,"C",D+_,S+j,D+j,S+_,D,S+_,"C",D-j,S+_,D-_,S+j,D-_,S,"C",D-_,S-j,D-j,S-_,D,S-_,"Z"].join(" ");return V},d.convertEllipseToPathData=function(y){y=d(y);var D=parseFloat(y.attr("cx"))||0,S=parseFloat(y.attr("cy"))||0,_=parseFloat(y.attr("rx")),j=parseFloat(y.attr("ry"))||_,V=_*d.KAPPA,W=j*d.KAPPA,oe=["M",D,S-j,"C",D+V,S-j,D+_,S-W,D+_,S,"C",D+_,S+W,D+V,S+j,D,S+j,"C",D-V,S+j,D-_,S+W,D-_,S,"C",D-_,S-W,D-V,S-j,D,S-j,"Z"].join(" ");return oe},d.convertRectToPathData=function(y){return y=d(y),d.rectToPath({x:parseFloat(y.attr("x"))||0,y:parseFloat(y.attr("y"))||0,width:parseFloat(y.attr("width"))||0,height:parseFloat(y.attr("height"))||0,rx:parseFloat(y.attr("rx"))||0,ry:parseFloat(y.attr("ry"))||0})},d.rectToPath=function(y){var D,S=y.x,_=y.y,j=y.width,V=y.height,W=a(y.rx||y["top-rx"]||0,j/2),oe=a(y.rx||y["bottom-rx"]||0,j/2),fe=a(y.ry||y["top-ry"]||0,V/2),U=a(y.ry||y["bottom-ry"]||0,V/2);return W||oe||fe||U?D=["M",S,_+fe,"v",V-fe-U,"a",oe,U,0,0,0,oe,U,"h",j-2*oe,"a",oe,U,0,0,0,oe,-U,"v",-(V-U-fe),"a",W,fe,0,0,0,-W,-fe,"h",-(j-2*W),"a",W,fe,0,0,0,-W,fe,"Z"]:D=["M",S,_,"H",S+j,"V",_+V,"H",S,"V",_,"Z"],D.join(" ")},d.normalizePathData=(function(){var y=`
21
+ \v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,D=new RegExp("([a-z])["+y+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+y+"]*,?["+y+"]*)+)","ig"),S=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+y+"]*,?["+y+"]*","ig"),_=Math,j=_.PI,V=_.sin,W=_.cos,oe=_.tan,fe=_.asin,U=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],No=[_e+Mc*Ec,mt-Sc*Li],Tc=[_e,mt];if(Rr[0]=2*ff[0]-Rr[0],Rr[1]=2*ff[1]-Rr[1],w)return[Rr,No,Tc].concat(F);F=[Rr,No,Tc].concat(F).join().split(",");for(var Nc=[],Ir=F.length,sn=0;sn<Ir;sn++)Nc[sn]=sn%2?Q(F[sn-1],F[sn],O).y:Q(F[sn],F[sn+1],O).x;return Nc}function Se(xe){if(!xe)return null;var Te={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},se=[];return String(xe).replace(D,function(ie,ge,Ue){var ut=[],_e=ge.toLowerCase();for(Ue.replace(S,function(mt,w){w&&ut.push(+w)}),_e==="m"&&ut.length>2&&(se.push([ge].concat(ut.splice(0,2))),_e="l",ge=ge==="m"?"l":"L");ut.length>=Te[_e]&&(se.push([ge].concat(ut.splice(0,Te[_e]))),!!Te[_e]););}),se}function Et(xe){if((!Array.isArray(xe)||!Array.isArray(xe&&xe[0]))&&(xe=Se(xe)),!xe||!xe.length)return[["M",0,0]];for(var Te=[],se=0,ie=0,ge=0,Ue=0,ut=0,_e,mt=xe.length,w=ut;w<mt;w++){var T=[];Te.push(T);var O=xe[w];if(_e=O[0],_e!=_e.toUpperCase()){T[0]=_e.toUpperCase();var F,G;switch(T[0]){case"A":T[1]=O[1],T[2]=O[2],T[3]=O[3],T[4]=O[4],T[5]=O[5],T[6]=+O[6]+se,T[7]=+O[7]+ie;break;case"V":T[1]=+O[1]+ie;break;case"H":T[1]=+O[1]+se;break;case"M":for(ge=+O[1]+se,Ue=+O[2]+ie,F=O.length,G=1;G<F;G++)T[G]=+O[G]+(G%2?se:ie);break;default:for(F=O.length,G=1;G<F;G++)T[G]=+O[G]+(G%2?se:ie);break}}else for(var ae=O.length,Ie=0;Ie<ae;Ie++)T[Ie]=O[Ie];switch(T[0]){case"Z":se=+ge,ie=+Ue;break;case"H":se=T[1];break;case"V":ie=T[1];break;case"M":ge=T[T.length-2],Ue=T[T.length-1],se=T[T.length-2],ie=T[T.length-1];break;default:se=T[T.length-2],ie=T[T.length-1];break}}return Te}function jt(xe){var Te=Et(xe),se={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function ie(F,G,ae){var Ie,Fe;if(!F)return["C",G.x,G.y,G.x,G.y,G.x,G.y];switch(F[0]in{T:1,Q:1}||(G.qx=null,G.qy=null),F[0]){case"M":G.X=F[1],G.Y=F[2];break;case"A":parseFloat(F[1])===0||parseFloat(F[2])===0?F=["L",F[6],F[7]]:F=["C"].concat(Pe.apply(0,[G.x,G.y].concat(F.slice(1))));break;case"S":ae==="C"||ae==="S"?(Ie=G.x*2-G.bx,Fe=G.y*2-G.by):(Ie=G.x,Fe=G.y),F=["C",Ie,Fe].concat(F.slice(1));break;case"T":ae==="Q"||ae==="T"?(G.qx=G.x*2-G.qx,G.qy=G.y*2-G.qy):(G.qx=G.x,G.qy=G.y),F=["C"].concat(Y(G.x,G.y,G.qx,G.qy,F[1],F[2]));break;case"Q":G.qx=F[1],G.qy=F[2],F=["C"].concat(Y(G.x,G.y,F[1],F[2],F[3],F[4]));break;case"H":F=["L"].concat(F[1],G.y);break;case"V":F=["L"].concat(G.x,F[1]);break;case"L":break;case"Z":break}return F}function ge(F,G){if(F[G].length>7){F[G].shift();for(var ae=F[G];ae.length;)Ue[G]="A",F.splice(G++,0,["C"].concat(ae.splice(0,6)));F.splice(G,1),mt=Te.length}}for(var Ue=[],ut="",_e="",mt=Te.length,w=0;w<mt;w++){Te[w]&&(ut=Te[w][0]),ut!=="C"&&(Ue[w]=ut,w>0&&(_e=Ue[w-1])),Te[w]=ie(Te[w],se,_e),Ue[w]!=="A"&&ut==="C"&&(Ue[w]="C"),ge(Te,w);var T=Te[w],O=T.length;se.x=T[O-2],se.y=T[O-1],se.bx=parseFloat(T[O-4])||se.x,se.by=parseFloat(T[O-3])||se.y}return(!Te[0][0]||Te[0][0]!=="M")&&Te.unshift(["M",0,0]),Te}return function(xe){return jt(xe).join(",").split(",").join(" ")}})(),d.namespace=t,d.g=jn,d})(),ee=ZV;var zn={useCSSSelectors:!0,classNamePrefix:"joint-",defaultTheme:"default",doubleTapInterval:300};var Fd="[object Arguments]",dw="[object Array]",Am="[object Boolean]",mw="[object Date]",s_="[object Error]",WV="[object Function]",Bd="[object Map]",wm="[object Number]",YV="[object Null]",lc="[object Object]",vw="[object RegExp]",Vd="[object Set]",bm="[object String]",Dm="[object Symbol]",$V="[object Undefined]",XV="[object WeakMap]",yw="[object ArrayBuffer]",Iw="[object DataView]",a_="[object Float32Array]",u_="[object Float64Array]",c_="[object Int8Array]",l_="[object Int16Array]",d_="[object Int32Array]",f_="[object Uint8Array]",h_="[object Uint8ClampedArray]",g_="[object Uint16Array]",p_="[object Uint32Array]",qV={[Fd]:!0,[dw]:!0,[yw]:!0,[Iw]:!0,[Am]:!0,[mw]:!0,[a_]:!0,[u_]:!0,[c_]:!0,[l_]:!0,[d_]:!0,[Bd]:!0,[wm]:!0,[lc]:!0,[vw]:!0,[Vd]:!0,[bm]:!0,[Dm]:!0,[f_]:!0,[h_]:!0,[g_]:!0,[p_]:!0,[s_]:!1,[WV]:!1,[XV]:!1},Cw="\\ud800-\\udfff",JV="\\u0300-\\u036f",QV="\\ufe20-\\ufe2f",KV="\\u20d0-\\u20ff",ez="\\u1ab0-\\u1aff",tz="\\u1dc0-\\u1dff",nz=JV+QV+KV+ez+tz,m_="\\u2700-\\u27bf",v_="a-z\\xdf-\\xf6\\xf8-\\xff",rz="\\xac\\xb1\\xd7\\xf7",iz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",oz="\\u2000-\\u206f",sz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",y_="A-Z\\xc0-\\xd6\\xd8-\\xde",az="\\ufe0e\\ufe0f",I_=rz+iz+oz+sz,C_="['\u2019]",e_=`[${I_}]`,Aw=`[${nz}]`,A_="\\d",uz=`[${m_}]`,w_=`[${v_}]`,b_=`[^${Cw}${I_+A_+m_+v_+y_}]`,fw="\\ud83c[\\udffb-\\udfff]",cz=`(?:${Aw}|${fw})`,D_=`[^${Cw}]`,ww="(?:\\ud83c[\\udde6-\\uddff]){2}",bw="[\\ud800-\\udbff][\\udc00-\\udfff]",cc=`[${y_}]`,lz="\\u200d",t_=`(?:${w_}|${b_})`,dz=`(?:${cc}|${b_})`,n_=`(?:${C_}(?:d|ll|m|re|s|t|ve))?`,r_=`(?:${C_}(?:D|LL|M|RE|S|T|VE))?`,x_=`${cz}?`,E_=`[${az}]?`,fz=`(?:${lz}(?:${[D_,ww,bw].join("|")})${E_+x_})*`,hz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",M_=E_+x_+fz,pz=`(?:${[uz,ww,bw].join("|")})${M_}`,mz=RegExp([`${cc}?${w_}+${n_}(?=${[e_,cc,"$"].join("|")})`,`${dz}+${r_}(?=${[e_,cc+t_,"$"].join("|")})`,`${cc}?${t_}+${n_}`,`${cc}+${r_}`,gz,hz,`${A_}+`,pz].join("|"),"g"),Dw=200,hw="__hash_undefined__",vz=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/,yz=`[${Cw}]`,Iz=`${D_}${Aw}?`,Cz=`(?:${[Iz,Aw,ww,bw,yz].join("|")})`,S_=RegExp(`${fw}(?=${fw})|${Cz+M_}`,"g"),Az=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wz=/^\w*$/,bz=46,Dz=/\\(\\)?/g,xz=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g"),Ez=/^(?:0|[1-9]\d*)$/,Mz=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),Sz=4294967294,Tz=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,T_=e=>S_.test(e),Nz=e=>e.match(S_)||[],_z=e=>e.split(""),N_=e=>T_(e)?Nz(e):_z(e),Rz=e=>e==null?[]:zd(e).map(t=>e[t]),zd=e=>fi(e)?__(e):Object.keys(Object(e)),Oz=e=>{if(!xm(e))return Object.keys(e);var t=[];for(var n in Object(e))hasOwnProperty.call(e,n)&&n!="constructor"&&t.push(n);return t},__=(e,t)=>{let n=Array.isArray(e),r=!n&&ki(e)&&di(e)===Fd,i=!n&&!r&&Hd(e),o=n||r||i,s=e.length,a=new Array(o?s:0),u=o?-1:s;for(;++u<s;)a[u]=`${u}`;for(let l in e)(t||hasOwnProperty.call(e,l))&&!(o&&(l==="length"||V_(l,s)))&&a.push(l);return a},mm=(e,t)=>{let{length:n}=e;for(;n--;)if(hc(e[n][0],t))return n;return-1},hc=(e,t)=>e===t||e!==e&&t!==t,ki=e=>e!=null&&typeof e=="object",ym=(e,t,n)=>{if(!Ke(n))return!1;let r=typeof t;return(r=="number"?fi(n)&&t>-1&&t<n.length:r=="string"&&t in n)?hc(n[t],e):!1},Pz=e=>ki(e)&&di(e)==Vd,kz=e=>ki(e)&&di(e)==Bd,xm=e=>{let t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Object.prototype;return e===n},Gd=(e,t,n)=>{let r=e[t];(!(hasOwnProperty.call(e,t)&&hc(r,n))||n===void 0&&!(t in e))&&(e[t]=n)},Ud=(e,t,n)=>{let r=-1,i=t.length;for(;++r<i;){let o=t[r];Gd(n,o,e[o])}return n},fi=e=>e!=null&&typeof e!="function"&&typeof e.length=="number"&&e.length>-1&&e.length%1===0,fc=e=>typeof e=="symbol"||ki(e)&&di(e)===Dm,Lz=e=>{let t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&hasOwnProperty.call(e,"index")&&(n.index=e.index,n.input=e.input),n},xw=(e,t)=>{let n=-1,r=e.length;for(t||(t=new Array(r));++n<r;)t[n]=e[n];return t},di=e=>e==null?e===void 0?$V:YV:Object.prototype.toString.call(e),Ew=e=>{let t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t},R_=(e,t)=>{let n=t?Ew(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Fz=e=>{let t=new e.constructor(e.source,/\w*$/.exec(e));return t.lastIndex=e.lastIndex,t},O_=e=>typeof e.constructor=="function"&&!xm(e)?Object.create(Object.getPrototypeOf(e)):{},Mw=e=>e==null?[]:(e=Object(e),Object.getOwnPropertySymbols(e).filter(n=>propertyIsEnumerable.call(e,n))),jz=(e,t)=>Ud(e,Mw(e),t);function Bz(e,t){let n=t?Ew(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Vz=(e,t,n)=>{let r=e.constructor;switch(t){case yw:return Ew(e,n);case Am:case mw:return new r(+e);case Iw:return Bz(e,n);case a_:case u_:case c_:case l_:case d_:case f_:case h_:case g_:case p_:return R_(e,n);case Bd:return new r(e);case wm:case bm:return new r(e);case vw:return Fz(e);case Vd:return new r;case Dm:return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(e)):{}}},Hd=e=>ki(e)&&vz.test(di(e)),gw=e=>{let t=Object.keys(e);return!Array.isArray(e)&&e!=null&&t.push(...Mw(Object(e))),t},P_=e=>{let t=[];for(;e;)t.push(...Mw(e)),e=Object.getPrototypeOf(Object(e));return t},k_=e=>{let t=[];for(let n in e)t.push(n);return Array.isArray(e)||t.push(...P_(e)),t},vm=({__data__:e},t)=>{let n=e;return Jz(t)?n[typeof t=="string"?"string":"hash"]:n.map},zz=(e,t,n,r)=>{let i=gw(e),o=i.length,a=gw(t).length;if(o!=a)return!1;let u,l=o;for(;l--;)if(u=i[l],!hasOwnProperty.call(t,u))return!1;let f=r.get(e),d=r.get(t);if(f&&d)return f==t&&d==e;let m=!0;r.set(e,t),r.set(t,e);let I,C;for(;++l<o;){u=i[l];let M=e[u],E=t[u];if(!(I===void 0?M===E||n(M,E,r):I)){m=!1;break}C||(C=u=="constructor")}if(m&&!C){let M=e.constructor,E=t.constructor;M!=E&&"constructor"in e&&"constructor"in t&&!(typeof M=="function"&&M instanceof M&&typeof E=="function"&&E instanceof E)&&(m=!1)}return r.delete(e),r.delete(t),m},Em=(e,t,n)=>e===t?!0:e==null||t==null||!ki(e)&&!ki(t)?e!==e&&t!==t:Gz(e,t,Em,n),Gz=(e,t,n,r)=>{let i=Array.isArray(e),o=Array.isArray(t),s=i?dw:di(e),a=o?dw:di(t);s=s==Fd?lc:s,a=a==Fd?lc:a;let u=s==lc,l=a==lc,f=s==a;if(f&&!u)return r||(r=new hs),i||Hd(e)?L_(e,t,!1,n,r):Zz(e,t,s,n,r);let d=u&&hasOwnProperty.call(e,"__wrapped__"),m=l&&hasOwnProperty.call(t,"__wrapped__");if(d||m){let I=d?e.value():e,C=m?t.value():t;return r||(r=new hs),n(I,C,r)}return f?(r||(r=new hs),zz(e,t,n,r)):!1},L_=(e,t,n,r,i)=>{let s=e.length,a=t.length;if(s!=a)return!1;let u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;let f=-1,d=!0,m=n?new Ma:void 0;for(i.set(e,t),i.set(t,e);++f<s;){let I,C=e[f],M=t[f];if(I!==void 0){if(I)continue;d=!1;break}if(m){if(!Uz(t,(E,N)=>{if(!Hz(m,N)&&(C===E||r(C,E,i)))return m.push(N)})){d=!1;break}}else if(!(C===M||r(C,M,i))){d=!1;break}}return i.delete(e),i.delete(t),d},Uz=(e,t)=>{let n=-1,r=e==null?0:e.length;for(;++n<r;)if(t(e[n],n,e))return!0;return!1},Hz=(e,t)=>e.has(t),i_=(e,t,n,r)=>!(e.byteLength!=t.byteLength||!n(new Uint8Array(e),new Uint8Array(t),r)),Zz=(e,t,n,r,i)=>{switch(n){case Iw:return e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset?!1:(e=e.buffer,t=t.buffer,i_(e,t,r,i));case yw:return i_(e,t,r,i);case Am:case mw:case wm:return hc(+e,+t);case s_:return e.name==t.name&&e.message==t.message;case vw:case bm:return e==`${t}`;case Bd:let o=F_;case Vd:if(o||(o=Mm),e.size!=t.size)return!1;let s=i.get(e);if(s)return s==t;i.set(e,t);let a=L_(o(e),o(t),!0,r,i);return i.delete(e),a;case Dm:return Symbol.prototype.valueOf.call(e)==Symbol.prototype.valueOf.call(t)}return!1},F_=e=>{let t=-1,n=Array(e.size);return e.forEach((r,i)=>{n[++t]=[i,r]}),n},Mm=e=>{let t=-1,n=new Array(e.size);return e.forEach(r=>{n[++t]=r}),n},Sw=(e,t)=>{if(Array.isArray(e))return!1;let n=typeof e;return n==="number"||n==="boolean"||e==null||fc(e)?!0:wz.test(e)||!Az.test(e)||t!=null&&e in Object(t)},Wz=e=>{let t=[];return e.charCodeAt(0)===bz&&t.push(""),e.replace(xz,(n,r,i,o)=>{let s=n;i?s=o.replace(Dz,"$1"):r&&(s=r.trim()),t.push(s)}),t},gc=(e,t)=>Array.isArray(e)?e:Sw(e,t)?[e]:Wz(`${e}`),Sm=(e,t)=>{t=gc(t,e);let n=0,r=t.length;for(;e!=null&&n<r;)e=e[Sa(t[n])],n++;return n&&n==r?e:void 0};function Yz(e,t){if(e!==t){let n=e!==void 0,r=e===null,i=e===e,o=fc(e),s=t!==void 0,a=t===null,u=t===t,l=fc(t);if(!a&&!l&&!o&&e>t||o&&s&&u&&!a&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e<t||l&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!u)return-1}return 0}function $z(e,t,n){let r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){let u=r<a?n[r]:null,f=(u&&typeof u=="function"?u:Yz)(i[r],o[r]);if(f)return u&&typeof u!="function"?f*(u=="desc"?-1:1):f}return e.index-t.index}var j_=(e,t)=>{let n=(s,a)=>!!(s==null?0:s.length)&&s.indexOf(a)>-1,r=!0,i=[],o=t.length;if(!e.length)return i;t.length>=Dw&&(n=(s,a)=>s.has(a),r=!1,t=new Ma(t));e:for(let s in e){let a=e[s],u=a;if(a=a!==0?a:0,r&&u===u){let l=o;for(;l--;)if(t[l]===u)continue e;i.push(a)}else n(t,u)||i.push(a)}return i};var Sa=e=>{if(typeof e=="string"||fc(e))return e;let t=`${e}`;return t=="0"&&1/e==-1/0?"-0":t},dc=(e,t=!1,n=!1,r=!0,i,o,s,a)=>{let u;if(i&&(u=s?i(e,o,s,a):i(e)),u!==void 0)return u;if(!Ke(e))return e;let l=Array.isArray(e),f=di(e);if(l){if(u=Lz(e),!t)return xw(e,u)}else{let C=typeof e=="function";if(f===lc||f===Fd||C&&!s){if(u=n||C?{}:O_(e),!t)return n?Xz(e,Ud(e,Object.keys(e),u)):jz(e,Object.assign(u,e))}else{if(C||!qV[f])return s?e:{};u=Vz(e,f,t)}}a||(a=new hs);let d=a.get(e);if(d)return d;if(a.set(e,u),kz(e))return e.forEach((C,M)=>{u.set(M,dc(C,t,n,r,i,M,e,a))}),u;if(Pz(e))return e.forEach(C=>{u.add(dc(C,t,n,r,i,C,e,a))}),u;if(Hd(e))return u;let I=l?void 0:(r?n?k_:gw:n?Tw:zd)(e);return(I||e).forEach((C,M)=>{I&&(M=C,C=e[M]),Gd(u,M,dc(C,t,n,r,i,M,e,a))}),u},Xz=(e,t)=>Ud(e,P_(e),t),B_=(e,t)=>t.length<2?e:Sm(e,t.slice(0,-1));var V_=(e,t)=>{let n=typeof e;return t=t??Number.MAX_SAFE_INTEGER,!!t&&(n==="number"||n!=="symbol"&&Ez.test(e))&&e>-1&&e%1==0&&e<t},qz=(e,t)=>{t=gc(t,e),e=B_(e,t);let n=t[t.length-1];return e==null||delete e[Sa(n)]},Jz=e=>{let t=typeof e;return t==="string"||t==="number"||t==="symbol"||t==="boolean"?e!=="__proto__":e===null},Tw=e=>{let t=[];for(let n in e)t.push(n);return t},Qz=e=>{e=Object(e);let t={};for(let n in e)t[n]=e[n];return t},o_=(e,t)=>{if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]};function z_(e,t=!1){return(n,...r)=>{let i=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):t?(u,l)=>{if(Array.isArray(u)&&!Array.isArray(l))return l}:void 0,a&&ym(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),n=Object(n);++i<o;){let u=r[i];u&&e(n,u,i,s)}return n}}var Nw=(e,t,n,r,i)=>{e!==t&&gr(t,(o,s)=>{if(Ke(o))i||(i=new hs),Kz(e,t,s,n,Nw,r,i);else{let a=r?r(e[s],o,`${s}`,e,t,i):void 0;a===void 0&&(a=o),pw(e,s,a)}},Tw)},Kz=(e,t,n,r,i,o,s)=>{let a=o_(e,n),u=o_(t,n),l=s.get(u);if(l){pw(e,n,l);return}let f=o?o(a,u,`${n}`,e,t,s):void 0,d=f===void 0;if(d){let m=Array.isArray(u),I=!m&&Hd(u);f=u,m||I?Array.isArray(a)?f=a:ki(a)&&fi(a)?f=xw(a):I?(d=!1,f=R_(u,!0)):f=[]:_t(u)||jd(u)?(f=a,jd(a)?f=Qz(a):(typeof a=="function"||!Ke(a))&&(f=O_(u))):d=!1}d&&(s.set(u,f),i(f,u,r,o,s),s.delete(u)),pw(e,n,f)},pw=(e,t,n)=>{(n!==void 0&&!hc(e[t],n)||n===void 0&&!(t in e))&&Gd(e,t,n)};function eG(e,t,n){let r=Object(e),i=n(e),{length:o}=i,s=-1;for(;o--;){let a=i[++s];if(t(r[a],a,r)===!1)break}return e}var tG=(e,t)=>e&&eG(e,t,zd),_w=(e,t)=>{if(e==null)return e;if(!fi(e))return tG(e,t);let n=e.length,r=Object(e),i=-1;for(;++i<n&&t(r[i],i,r)!==!1;);return e};function nG(e){let t=e==null?0:e.length;return t?e[t-1]:void 0}var rG=Set&&1/Mm(new Set([void 0,-0]))[1]==1/0?e=>new Set(e):()=>{};function G_(e,t,n,r,i,o){return Ke(e)&&Ke(t)&&(o.set(t,e),Nw(e,t,void 0,G_,o),o.delete(t)),e}function iG(e,t,n){t.length?t=t.map(s=>Array.isArray(s)?a=>Sm(a,s.length===1?s[0]:s):s):t=[s=>s];let r=-1,i=-1,o=fi(e)?new Array(e.length):[];return _w(e,s=>{let a=t.map(u=>u(s));o[++i]={criteria:a,index:++r,value:s}}),oG(o,(s,a)=>$z(s,a,n))}function oG(e,t){let{length:n}=e;for(e.sort(t);n--;)e[n]=e[n].value;return e}function U_(e){return e===e&&!Ke(e)}function H_(e,t){return n=>n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}function sG(e,t){return e!=null&&AG(e,t,CG)}function aG(e,t){return Sw(e)&&U_(t)?H_(Sa(e),t):n=>{let r=Sm(n,e);return r===void 0&&r===t?sG(n,e):Em(t,r)}}function uG(e){let t=cG(e);return t.length===1&&t[0][2]?H_(t[0][0],t[0][1]):n=>n===e||lG(n,e,t)}function cG(e){let t=zd(e),n=t.length;for(;n--;){let r=t[n],i=e[r];t[n]=[r,i,U_(i)]}return t}function lG(e,t,n,r){let i=n.length,o=i,s=!r;if(e==null)return!o;let a,u;for(e=Object(e);i--;)if(a=n[i],s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1;for(;++i<o;){a=n[i];let l=a[0],f=e[l],d=a[1];if(s&&a[2]){if(f===void 0&&!(l in e))return!1}else{let m=new hs;if(r&&(u=r(f,d,l,e,t,m)),!(u===void 0?Em(d,f,m):u))return!1}}return!0}function dG(e){return Sw(e)?fG(Sa(e)):hG(e)}function fG(e){return t=>t?.[e]}function hG(e){return t=>Sm(t,e)}function gG(e){return typeof e=="function"?e:e==null?t=>t:typeof e=="object"?Array.isArray(e)?aG(e[0],e[1]):uG(e):dG(e)}function Tm(){let e=gG;return arguments.length?e(arguments[0],arguments[1]):e}var pG=(e,t,n,r)=>{let i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n},mG=(e,t,n,r,i)=>(i(e,(o,s,a)=>{n=r?(r=!1,o):t(n,o,s,a)}),n);function vG(e,t,n){let r=Array.isArray(e)?pG:mG,i=arguments.length<3;return r(e,t,n,i,_w)}var yG=e=>Array.isArray(e)||jd(e)||!!(e&&e[Symbol.isConcatSpreadable]);function Z_(e,t,n,r,i){let o=-1,s=e.length;for(n||(n=yG),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Z_(a,t-1,n,r,i):i.push(...a):r||(i[i.length]=a)}return i}var jd=e=>ki(e)&&di(e)=="[object Arguments]";var IG=e=>typeof e=="number"&&e>-1&&e%1==0&&e<=Number.MAX_SAFE_INTEGER,CG=(e,t)=>e!=null&&t in Object(e),AG=(e,t,n)=>{t=gc(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=Sa(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&IG(i)&&V_(s,i)&&(Array.isArray(e)||jd(e)))},wG=e=>e.match(Tz),bG=e=>e.match(mz),DG=(e,t)=>t===void 0?(Mz(e)?bG(e):wG(e))||[]:e.match(t)||[],xG=(e,t,n)=>{let{length:r}=e;return n=n===void 0?r:n,!t&&n>=r?e:e.slice(t,n)},EG=MG("toUpperCase");function MG(e){return t=>{if(!t)return"";let n=T_(t)?N_(t):void 0,r=n?n[0]:t[0],i=n?xG(n,1).join(""):t.slice(1);return r[e]()+i}}var hs=class{constructor(t){let n=this.__data__=new Ld(t);this.size=n.size}clear(){this.__data__=new Ld,this.size=0}delete(t){let n=this.__data__,r=n.delete(t);return this.size=n.size,r}get(t){return this.__data__.get(t)}has(t){return this.__data__.has(t)}set(t,n){let r=this.__data__;if(r instanceof Ld){let i=r.__data__;if(i.length<Dw-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new Im(i)}return r.set(t,n),this.size=r.size,this}},Ld=class{constructor(t){let n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){let i=t[n];this.set(i[0],i[1])}}clear(){this.__data__=[],this.size=0}delete(t){let n=this.__data__,r=mm(n,t);if(r<0)return!1;let i=n.length-1;return r==i?n.pop():n.splice(r,1),--this.size,!0}get(t){let n=this.__data__,r=mm(n,t);return r<0?void 0:n[r][1]}has(t){return mm(this.__data__,t)>-1}set(t,n){let r=this.__data__,i=mm(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}},Im=class{constructor(t){let n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){let i=t[n];this.set(i[0],i[1])}}clear(){this.size=0,this.__data__={hash:new Cm,map:new Map,string:new Cm}}delete(t){let n=vm(this,t).delete(t);return this.size-=n?1:0,n}get(t){return vm(this,t).get(t)}has(t){return vm(this,t).has(t)}set(t,n){let r=vm(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}},Cm=class{constructor(t){let n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){let i=t[n];this.set(i[0],i[1])}}clear(){this.__data__=Object.create(null),this.size=0}delete(t){let n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}get(t){let r=this.__data__[t];return r===hw?void 0:r}has(t){return this.__data__[t]!==void 0}set(t,n){let r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n===void 0?hw:n,this}},Ma=class{constructor(t){let n=-1,r=t==null?0:t.length;for(this.__data__=new Im;++n<r;)this.add(t[n])}add(t){return this.__data__.set(t,hw),this}has(t){return this.__data__.has(t)}};Ma.prototype.push=Ma.prototype.add;var Rw=function(e){var t=Object.prototype.toString;return e===!0||e===!1||!!e&&typeof e=="object"&&t.call(e)===Am},Ke=function(e){return!!e&&(typeof e=="object"||typeof e=="function")},bn=function(e){var t=Object.prototype.toString;return typeof e=="number"||!!e&&typeof e=="object"&&t.call(e)===wm},on=function(e){var t=Object.prototype.toString;return typeof e=="string"||!!e&&typeof e=="object"&&t.call(e)===bm},Ae=z_((e,t)=>{if(xm(t)||fi(t)){Ud(t,zd(t),e);return}for(var n in t)hasOwnProperty.call(t,n)&&Gd(e,n,t[n])});var W_=(e,...t)=>{let n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ym(t[0],t[1],i)&&(r=1);++n<r;){let o=t[n];if(o==null)continue;let s=Object.keys(o),a=s.length,u=-1;for(;++u<a;){let l=s[u],f=e[l];(f===void 0||hc(f,Object.prototype[l])&&!hasOwnProperty.call(e,l))&&(e[l]=o[l])}}return e},Gn=W_,Y_=function(...t){return t.push(void 0,G_),Ut.apply(void 0,t)},Ta=Y_,fr=(e,t,...n)=>{let r=-1,i=typeof t=="function",o=fi(e)?new Array(e.length):[];return _w(e,s=>{o[++r]=i?t.apply(s,n):$_(s,t,...n)}),o},$_=(e,t,...n)=>{t=gc(t,e),e=B_(e,t);let r=e==null?e:e[Sa(nG(t))];return r?.apply(e,n)},Zd=(e,t,n)=>{let r=0,i=e==null?0:e.length;if(i==0)return 0;n=Tm(n,2),t=n(t);let o=t!==t,s=t===null,a=fc(t),u=t===void 0;for(;r<i;){let l,f=Math.floor((r+i)/2),d=n(e[f]),m=d!==void 0,I=d===null,C=d===d,M=fc(d);o?l=C:u?l=C&&m:s?l=C&&m&&!I:a?l=C&&m&&!I&&!M:I||M?l=!1:l=d<t,l?r=f+1:i=f}return Math.min(i,Sz)},Hr=(e,t)=>{let n=-1,r=(u,l)=>!!(u==null?0:u.length)&&u.indexOf(l)>-1;t=Tm(t,2);let i=!0,{length:o}=e,s=[],a=s;if(o>=Dw){let u=t?null:rG(e);if(u)return Mm(u);i=!1,r=(l,f)=>l.has(f),a=new Ma}else a=t?[]:s;e:for(;++n<o;){let u=e[n],l=t?t(u):u;if(u=u!==0?u:0,i&&l===l){let f=a.length;for(;f--;)if(a[f]===l)continue e;t&&a.push(l),s.push(u)}else r(a,l)||(a!==s&&a.push(l),s.push(u))}return s},Zr=e=>dc(e),er=e=>dc(e,!0),hr=e=>{if(e==null)return!0;if(fi(e)&&(Array.isArray(e)||typeof e=="string"||typeof e.splice=="function"||Hd(e)||jd(e)))return!e.length;let t=di(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(xm(e))return!Oz(e).length;for(let n in e)if(hasOwnProperty.call(e,n))return!1;return!0},oo=(e,t)=>Em(e,t),gt=e=>typeof e=="function",_t=e=>{if(!ki(e)||di(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},Be=e=>{if(!e)return[];if(fi(e))return on(e)?N_(e):xw(e);if(Symbol.iterator&&Symbol.iterator in Object(e)){let r=e[Symbol.iterator](),i,o=[];for(;!(i=r.next()).done;)o.push(i.value);return o}let t=di(e);return(t==Bd?F_:t==Vd?Mm:Rz)(e)};function Ow(e,t,n){if(typeof e!="function")throw new TypeError("Expected a function");let r,i,o,s,a,u,l=0,f=!1,d=!1,m=!0,I=!t&&t!==0&&window&&typeof window.requestAnimationFrame=="function";t=+t||0,Ke(n)&&(f=!!n.leading,d="maxWait"in n,o=d?Math.max(+n.maxWait||0,t):o,m="trailing"in n?!!n.trailing:m);function C(y){let D=r,S=i;return r=i=void 0,l=y,s=e.apply(S,D),s}function M(y,D){return I?(window.cancelAnimationFrame(a),window.requestAnimationFrame(y)):setTimeout(y,D)}function E(y){if(I)return window.cancelAnimationFrame(y);clearTimeout(y)}function N(y){return l=y,a=M($,t),f?C(y):s}function B(y){let D=y-u,S=y-l,_=t-D;return d?Math.min(_,o-S):_}function Z(y){let D=y-u,S=y-l;return u===void 0||D>=t||D<0||d&&S>=o}function $(){let y=Date.now();if(Z(y))return te(y);a=M($,B(y))}function te(y){return a=void 0,m&&r?C(y):(r=i=void 0,s)}function p(...y){let D=Date.now(),S=Z(D);if(r=y,i=this,u=D,S){if(a===void 0)return N(u);if(d)return a=M($,t),C(u)}return a===void 0&&(a=M($,t)),s}return p.cancel=()=>{a!==void 0&&E(a),l=0,r=u=i=a=void 0},p.flush=()=>a===void 0?s:te(Date.now()),p.pending=()=>a!==void 0,p}var Pw=(e,t)=>(t=Tm(t,2),vG(e,(n,r,i)=>(i=t(r),hasOwnProperty.call(n,i)?n[i].push(r):Gd(n,i,[r]),n),{})),Wd=(e,t=[])=>{if(e==null)return[];let n=t.length;return n>1&&ym(e,t[0],t[1])?t=[]:n>2&&ym(t[0],t[1],t[2])&&(t=[t[0]]),Array.isArray(t)||(t=[Tm(t,2)]),iG(e,t.flat(1),[])},kw=e=>(e==null?0:e.length)?Z_(e,1/0):[],pc=(e,...t)=>fi(e)?j_(e,t):[],Yd=(e,...t)=>ki(e)&&fi(e)?j_(e,t.flat(1)):[];var mc=(...e)=>{let t=e.flat(1);return Hr(t)},Nr=(e,t)=>{if(e==null)return!1;typeof t=="string"&&(t=t.split("."));let n=-1,r=e;for(;++n<t.length;){if(!r||!hasOwnProperty.call(r,t[n]))return!1;r=r[t[n]]}return!0},Ft=(e,t,n)=>{t=gc(t,e);let r=-1,i=t.length;for(i||(i=1,e=void 0);++r<i;){let o=e?.[Sa(t[r])];o===void 0&&(r=i,o=n),e=typeof o=="function"?o.call(e):o}return e},Wr=(e,...t)=>{let n={};if(e==null)return n;let r=!1;t=t.flat(1).map(o=>(o=gc(o,e),r||(r=o.length>1),o)),Ud(e,k_(e),n),r&&(n=dc(n,!0,!0,!0,o=>_t(o)?void 0:o));let i=t.length;for(;i--;)qz(n,t[i]);return n};var gr=(e,t=n=>n)=>{let n=-1,r=Object(e),i=fi(e)?__(e,!0):Tw(e),o=i.length;for(;o--;){let s=i[++n];if(t(r[s],s,r)===!1)break}},Lw=(e="")=>DG(`${e}`.replace(/['\u2019]/g,"")).reduce((t,n,r)=>(n=n.toLowerCase(),t+(r?EG(n):n)),""),SG=0,Fw=(e="")=>{let t=++SG;return`${e}`+t},Ut=z_((e,t,n,r)=>{Nw(e,t,n,r)},!0);var Un=function(e){return e&&e.toString().split(" ").map(function(t){return t.substr(0,zn.classNamePrefix.length)!==zn.classNamePrefix&&(t=zn.classNamePrefix+t),t}).join(" ")},q_=function(e){return e&&e.toString().split(" ").map(function(t){return t.substr(0,zn.classNamePrefix.length)===zn.classNamePrefix&&(t=t.substr(zn.classNamePrefix.length)),t}).join(" ")},Na=function(e,t){let n={},r={},i=ee.namespace.svg,o=t||i,s=document.createDocumentFragment(),a=function(u,l,f){for(let d=0;d<u.length;d++){let m=u[d];if(typeof m=="string"){let $=document.createTextNode(m);l.appendChild($);continue}if(!m.hasOwnProperty("tagName"))throw new Error("json-dom-parser: missing tagName");let I=m.tagName,C;m.hasOwnProperty("namespaceURI")&&(f=m.namespaceURI),C=document.createElementNS(f,I);let M=f===i,E=M?ee:gs.default,N=m.attributes;N&&E(C).attr(N);let B=m.style;if(B&&(0,gs.default)(C).css(B),m.hasOwnProperty("className")){let $=m.className;M?C.className.baseVal=$:C.className=$}if(m.hasOwnProperty("textContent")&&(C.textContent=m.textContent),m.hasOwnProperty("selector")){let $=m.selector;if(n[$])throw new Error("json-dom-parser: selector must be unique");n[$]=C,E(C).attr("joint-selector",$)}if(m.hasOwnProperty("groupSelector")){let $=m.groupSelector;Array.isArray($)||($=[$]);for(let te=0;te<$.length;te++){let p=$[te],y=r[p];y||(y=r[p]=[]),y.push(C)}}l.appendChild(C);let Z=m.children;Array.isArray(Z)&&a(Z,C,f)}};return a(e,s,o),{fragment:s,selectors:n,groupSelectors:r}},Xd=function(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t},So=function(e,t,n){for(var r=Array.isArray(t)?t:t.split(n||"/"),i,o=0,s=r.length;o<s;)if(i=r[o++],Object(e)===e&&i in e)e=e[i];else return;return e},J_=function(e,t){return typeof t!="string"&&typeof t!="number"&&(t=String(t)),!(t==="constructor"&&typeof e[t]=="function"||t==="__proto__")},qd=function(e,t,n,r){let i=Array.isArray(t)?t:t.split(r||"/"),o=i.length-1,s=e,a=0;for(;a<o;a++){let u=i[a];if(!J_(s,u))return e;s=s[u]||(s[u]={})}return s[i[o]]=n,e},jw=function(e,t,n){let r=Array.isArray(t)?t:t.split(n||"/"),i=r.length-1,o=e,s=0;for(;s<i;s++){let a=r[s];if(!J_(o,a))return e;let u=o[a];if(!u)return e;o=u}return delete o[r[i]],e};var Q_=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})},ps=function(e){return ps.id=ps.id||1,e===void 0?"j_"+ps.id++:(e.id=e.id===void 0?"j_"+ps.id++:e.id,e.id)},K_=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},Tn=function(e){if(e.normalized)return e;let{originalEvent:t,target:n}=e,r=t&&t.changedTouches&&t.changedTouches[0];if(r)for(let i in r)e[i]===void 0&&(e[i]=r[i]);if(n){let i=n.correspondingUseElement;i&&(e.target=i)}return e.normalized=!0,e},eR=function(e){let i=0,o=0,s=0,a=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(i=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(i=o,o=0),s="deltaX"in e?e.deltaX:i*10,a="deltaY"in e?e.deltaY:o*10,(s||a)&&e.deltaMode&&(e.deltaMode==1?(s*=40,a*=40):(s*=800,a*=800)),e.deltaX===0&&e.deltaY!==0&&e.shiftKey&&(s=a,a=0,i=o,o=0),s&&!i&&(i=s<1?-1:1),a&&!o&&(o=a<1?-1:1),{spinX:i,spinY:o,deltaX:s,deltaY:a}},tR=function(e,t){return e>t?t:e<-t?-t:e},Jd=(function(){var e;if(typeof window<"u"&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame),!e){var t=0;e=function(n){var r=new Date().getTime(),i=Math.max(0,16-(r-t)),o=setTimeout(function(){n(r+i)},i);return t=r+i,o}}return function(n,r,...i){return e(r!==void 0?n.bind(r,...i):n)}})(),Qd=(function(){var e,t=typeof window<"u";return t&&(e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame),e=e||clearTimeout,t?e.bind(window):e})();var pn=function(e){return on(e)&&e.slice(-1)==="%"},TG=function(e,t){function n(a){var u=new RegExp("(?:\\d+(?:\\.\\d+)*)("+a+")$").exec(e);return u?u[1]:null}var r=parseFloat(e);if(Number.isNaN(r))return null;var i={};i.value=r;var o;if(t==null)o="[A-Za-z]*";else if(Array.isArray(t)){if(t.length===0)return null;o=t.join("|")}else on(t)&&(o=t);var s=n(o);return s===null?null:(i.unit=s,i)},$d=0;function NG(e,t){let n=e.split(t),r=1;for(let i=0,o=n.length-1;i<o;i++){let s=[];(i>0||n[0]!=="")&&s.push($d),s.push(t),(i<o-1||n[o]!=="")&&s.push($d),n.splice(r,0,...s),r+=s.length+1}return n.filter(i=>i!=="")}function X_(e,t){if(e===null)return t.getBBox().height;switch(e.unit){case"em":return t.getBBox().height*e.value;case"px":case"":return e.value}}var Nm=function(e,t,n={},r={}){var i=t.width,o=t.height,s=r.svgDocument||ee("svg").node,a=ee("tspan").node,u=ee("text").attr(n).append(a).node,l=document.createTextNode("");u.style.opacity=0,u.style.display="block",a.style.display="block",a.appendChild(l),s.appendChild(u),r.svgDocument||document.body.appendChild(s);let f=r.preserveSpaces,d=" ",m=r.separator||r.separator===""?r.separator:d,I=typeof m=="string"?m:d;var C=r.eol||`
22
+ `,M=r.hyphen?new RegExp(r.hyphen):/[^\w\d\u00C0-\u1FFF\u2800-\uFFFD]/,E=r.maxLineCount;bn(E)||(E=1/0);var N=e.split(m),B=[],Z=[],$,te,p;f&&ee(a).attr("xml:space","preserve");for(var y=0,D=0,S=N.length;y<S;y++){var _=N[y];if(!(!_&&!f)&&typeof _=="string"){var j=!1;if(C&&_.indexOf(C)>=0)if(_.length>1){let Pe=NG(N[y],C);N.splice(y,1,...Pe),y--,S=N.length;continue}else{if(f&&typeof N[y-1]=="string"){N.splice(y,$d,"",$d),S+=2,y--;continue}Z[++D]=!f||typeof N[y+1]=="string"?"":void 0,j=!0}if(!j){let Pe;if(f?Pe=Z[D]!==void 0?Z[D]+I+_:_:Pe=Z[D]?Z[D]+I+_:_,l.data=Pe,a.getComputedTextLength()<=i)Z[D]=Pe,($||te)&&(B[D++]=!0,$=0,te=0);else{if(!Z[D]||$){var V=!!$;if($=_.length-1,V||!$){if(!$){if(!Z[D]){Z=[];break}N.splice(y,2,_+N[y+1]),S--,B[D++]=!0,y--;continue}N[y]=_.substring(0,$);let Se=N[y+1];N[y+1]=_.substring($)+(Se===void 0||Se===$d?"":Se)}else{if(te)N.splice(y,2,N[y]+N[y+1]),te=0;else{var W=_.search(M);W>-1&&W!==_.length-1&&W!==0&&(te=W+1,$=0),N.splice(y,1,_.substring(0,te||$),_.substring(te||$)),S++}D&&!B[D-1]&&D--}(!f||Z[D]!=="")&&y--;continue}D++,y--}}var oe=null;if(Z.length>E)oe=E-1;else if(o!==void 0){if(p===void 0&&l.data!=="")if(n.lineHeight==="auto")p=X_({value:1.5,unit:"em"},u);else{let Pe=TG(n.lineHeight,["em","px",""]);p=X_(Pe,u)}p*Z.length>o&&(oe=Math.floor(o/p)-1)}if(oe!==null){Z.splice(oe+1);var fe=r.ellipsis;if(!fe||oe<0)break;typeof fe!="string"&&(fe="\u2026");var U=Z[oe];if(!U&&!j)break;var q=U.length,Y,Q;do{if(Q=U[q],Y=U.substring(0,q),Q?Q.match(m)&&(Y+=Q):Y+=I,Y+=fe,l.data=Y,a.getComputedTextLength()<=i){Z[oe]=Y;break}q--}while(q>=0);break}}}return r.svgDocument?s.removeChild(u):document.body.removeChild(s),Z.join(C)},nR=function(e){var t=(0,gs.default)(gs.default.parseHTML("<div>"+e+"</div>",null,!1));return t.find("*").each(function(){var n=this;gs.default.each(n.attributes,function(){var r=this,i=r.name,o=r.value;(i.startsWith("on")||o.startsWith("javascript:")||o.startsWith("data:")||o.startsWith("vbscript:"))&&(0,gs.default)(n).removeAttr(i)})}),t.html()};var rR=function(e,t){var n=(0,gs.default)(e),r=n.map(function(){var i=this,o=i.parentNode,s=o.insertBefore(document.createTextNode(""),i.nextSibling);return function(){if(o===this)throw new Error("You can't sort elements if any one is a descendant of another.");o.insertBefore(this,s),o.removeChild(s)}});return Array.prototype.sort.call(n,t).each(function(i){r[i].call(this)})};var Yr=function(e){if(Object(e)!==e){var t=0;return isFinite(e)&&(t=+e),{top:t,right:t,bottom:t,left:t}}var n,r,i,o;return n=r=i=o=0,isFinite(e.vertical)&&(n=i=+e.vertical),isFinite(e.horizontal)&&(r=o=+e.horizontal),isFinite(e.top)&&(n=+e.top),isFinite(e.right)&&(r=+e.right),isFinite(e.bottom)&&(i=+e.bottom),isFinite(e.left)&&(o=+e.left),{top:n,right:r,bottom:i,left:o}},iR={linear:function(e){return e},quad:function(e){return e*e},cubic:function(e){return e*e*e},inout:function(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)},exponential:function(e){return Math.pow(2,10*(e-1))},bounce:function(e){for(var t=0,n=1;;t+=n,n/=2)if(e>=(7-4*t)/11){var r=(11-6*t-11*e)/4;return-r*r+n*n}},reverse:function(e){return function(t){return 1-e(1-t)}},reflect:function(e){return function(t){return .5*(t<.5?e(2*t):2-e(2-2*t))}},clamp:function(e,t,n){return t=t||0,n=n||1,function(r){var i=e(r);return i<t?t:i>n?n:i}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},elastic:function(e){return e||(e=1.5),function(t){return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}},_m={number:function(e,t){var n=t-e;return function(r){return e+n*r}},object:function(e,t){var n=Object.keys(e);return function(r){var i,o,s={};for(i=n.length-1;i!=-1;i--)o=n[i],s[o]=e[o]+(t[o]-e[o])*r;return s}},hexColor:function(e,t){var n=parseInt(e.slice(1),16),r=parseInt(t.slice(1),16),i=n&255,o=(r&255)-i,s=n&65280,a=(r&65280)-s,u=n&16711680,l=(r&16711680)-u;return function(f){var d=i+o*f&255,m=s+a*f&65280,I=u+l*f&16711680;return"#"+(1<<24|d|m|I).toString(16).slice(1)}},unit:function(e,t){var n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(e),i=n.exec(t),o=i[1].indexOf("."),s=o>0?i[1].length-o-1:0;e=+r[1];var a=+i[1]-e,u=r[2];return function(l){return(e+a*l).toFixed(s)+u}}},oR={outline:function(e){var t='<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${outerRadius}" /><feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${innerRadius}" /><feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/><feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/><feMerge><feMergeNode in="outline"/><feMergeNode in="SourceGraphic"/></feMerge></filter>',n=Number.isFinite(e.margin)?e.margin:2,r=Number.isFinite(e.width)?e.width:1;return tr(t)({color:e.color||"blue",opacity:Number.isFinite(e.opacity)?e.opacity:1,outerRadius:n+r,innerRadius:n})},highlight:function(e){var t='<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${width}"/><feComposite result="composed" in="colored" in2="morphed" operator="in"/><feGaussianBlur result="blured" in="composed" stdDeviation="${blur}"/><feBlend in="SourceGraphic" in2="blured" mode="normal"/></filter>';return tr(t)({color:e.color||"red",width:Number.isFinite(e.width)?e.width:1,blur:Number.isFinite(e.blur)?e.blur:0,opacity:Number.isFinite(e.opacity)?e.opacity:1})},blur:function(e){var t=Number.isFinite(e.x)?e.x:2;return tr('<filter><feGaussianBlur stdDeviation="${stdDeviation}"/></filter>')({stdDeviation:Number.isFinite(e.y)?[t,e.y]:t})},dropShadow:function(e){var t="SVGFEDropShadowElement"in window?'<filter><feDropShadow stdDeviation="${blur}" dx="${dx}" dy="${dy}" flood-color="${color}" flood-opacity="${opacity}"/></filter>':'<filter><feGaussianBlur in="SourceAlpha" stdDeviation="${blur}"/><feOffset dx="${dx}" dy="${dy}" result="offsetblur"/><feFlood flood-color="${color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="${opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';return tr(t)({dx:e.dx||0,dy:e.dy||0,opacity:Number.isFinite(e.opacity)?e.opacity:1,color:e.color||"black",blur:Number.isFinite(e.blur)?e.blur:4})},grayscale:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return tr('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${b} ${h} 0 0 0 0 0 1 0"/></filter>')({a:.2126+.7874*(1-t),b:.7152-.7152*(1-t),c:.0722-.0722*(1-t),d:.2126-.2126*(1-t),e:.7152+.2848*(1-t),f:.0722-.0722*(1-t),g:.2126-.2126*(1-t),h:.0722+.9278*(1-t)})},sepia:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return tr('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${h} ${i} 0 0 0 0 0 1 0"/></filter>')({a:.393+.607*(1-t),b:.769-.769*(1-t),c:.189-.189*(1-t),d:.349-.349*(1-t),e:.686+.314*(1-t),f:.168-.168*(1-t),g:.272-.272*(1-t),h:.534-.534*(1-t),i:.131+.869*(1-t)})},saturate:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return tr('<filter><feColorMatrix type="saturate" values="${amount}"/></filter>')({amount:1-t})},hueRotate:function(e){return tr('<filter><feColorMatrix type="hueRotate" values="${angle}"/></filter>')({angle:e.angle||0})},invert:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return tr('<filter><feComponentTransfer><feFuncR type="table" tableValues="${amount} ${amount2}"/><feFuncG type="table" tableValues="${amount} ${amount2}"/><feFuncB type="table" tableValues="${amount} ${amount2}"/></feComponentTransfer></filter>')({amount:t,amount2:1-t})},brightness:function(e){return tr('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}"/><feFuncG type="linear" slope="${amount}"/><feFuncB type="linear" slope="${amount}"/></feComponentTransfer></filter>')({amount:Number.isFinite(e.amount)?e.amount:1})},contrast:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return tr('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}" intercept="${amount2}"/><feFuncG type="linear" slope="${amount}" intercept="${amount2}"/><feFuncB type="linear" slope="${amount}" intercept="${amount2}"/></feComponentTransfer></filter>')({amount:t,amount2:.5-t/2})}};var tr=function(e){var t=/<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;return function(n){return n=n||{},e.replace(t,function(r){for(var i=Array.from(arguments),o=i.slice(1,4).find(function(u){return!!u}),s=o.split("."),a=n[s.shift()];a!==void 0&&s.length;)a=a[s.shift()];return a!==void 0?a:""})}};function Rm(e){e=Hr(e);let t=Be(e).reduce(function(n,r){return n[r.id]=r.clone(),n},{});return Be(e).forEach(function(n){let r=t[n.id];if(r.isLink()){let s=r.source(),a=r.target();s.id&&t[s.id]&&r.prop("source/id",t[s.id].id),a.id&&t[a.id]&&r.prop("target/id",t[a.id].id)}let i=n.get("parent");i&&t[i]&&r.set("parent",t[i].id);let o=Be(n.get("embeds")).reduce(function(s,a){return t[a]&&s.push(t[a].id),s},[]);hr(o)||r.set("embeds",o)}),t}var _G=["checked","selected","disabled","readOnly","contentEditable","value","indeterminate"],RG=_G.reduce((e,t)=>(e[t]=!0,e),{}),OG={qualify:function(e){return _t(e)},set:function(e,t,n){Object.keys(e).forEach(function(r){if(RG[r]&&r in n){let i=e[r];n.tagName==="SELECT"&&Array.isArray(i)?Array.from(n.options).forEach(function(o,s){o.selected=i.includes(o.value)}):n[r]=i}})}},sR=OG;var yc=Gi(fs(),1);function ms(e,t){return function(n,r){var i=pn(n);n=parseFloat(n),i&&(n/=100);var o={};if(isFinite(n)){var s=i||n>=0&&n<=1?n*r[t]:Math.max(n+r[t],0);o[e]=s}return o}}function Om(e,t,n){return function(r,i){var o=pn(r);r=parseFloat(r),o&&(r/=100);var s;if(isFinite(r)){var a=i[n]();o||r>0&&r<1?s=a[e]+i[t]*r:s=a[e]+r}var u=k();return u[e]=s||0,u}}function aR(e,t,n){return function(r,i){var o;r==="middle"?o=i[t]/2:r===n?o=i[t]:isFinite(r)?o=r>-1&&r<1?-i[t]*r:-r:pn(r)?o=i[t]*parseFloat(r)/100:o=0;var s=k();return s[e]=-(i[e]+o),s}}function fR(e,t){var n="joint-shape",r=t&&t.resetOffset;return function(i,o,s){var a=(0,yc.default)(s),u=a.data(n);if(!u||u.value!==i){var l=e(i);u={value:i,shape:l,shapeBBox:l.bbox()},a.data(n,u)}var f=u.shape.clone(),d=u.shapeBBox.clone(),m=d.origin(),I=o.origin();d.x=I.x,d.y=I.y;var C=o.maxRectScaleToFit(d,I),M=d.width===0||o.width===0?1:C.sx,E=d.height===0||o.height===0?1:C.sy;return f.scale(M,E,m),r&&f.translate(-m.x,-m.y),f}}function uR(e){function t(r){return new De(ee.normalizePathData(r))}var n=fR(t,e);return function(r,i,o){var s=n(r,i,o);return{d:s.serialize()}}}function cR(e){var t=fR(ft,e);return function(n,r,i){var o=t(n,r,i);return{points:o.serialize()}}}function Pm(e,t){var n=new k(1,0);return function(r){var i,o,s=this[e](r);return s?(o=t.rotate?s.vector().vectorAngle(n):0,i=s.start):(i=this.path.start,o=0),o===0?{transform:"translate("+i.x+","+i.y+")"}:{transform:"translate("+i.x+","+i.y+") rotate("+o+")"}}}function lR(e){return function(n,r,i){let o=ee(i);o.attr(e)!==n&&o.attr(e,n)}}function vc(e,t,n){return n.text!==void 0}function Kd(){return this.model.isLink()}function Bw(e){var t={},n=e.stroke;typeof n=="string"&&(t.stroke=n,t.fill=n);var r=e.strokeOpacity;return r===void 0&&(r=e["stroke-opacity"]),r===void 0&&(r=e.opacity),r!==void 0&&(t["stroke-opacity"]=r,t["fill-opacity"]=r),t}function dR(e){let{paper:t}=this;return`url(#${e.type==="pattern"?t.definePattern(e):t.defineGradient(e)})`}var Xe={xlinkShow:{set:"xlink:show"},xlinkRole:{set:"xlink:role"},xlinkType:{set:"xlink:type"},xlinkArcrole:{set:"xlink:arcrole"},xlinkTitle:{set:"xlink:title"},xlinkActuate:{set:"xlink:actuate"},xmlSpace:{set:"xml:space"},xmlBase:{set:"xml:base"},xmlLang:{set:"xml:lang"},preserveAspectRatio:{set:"preserveAspectRatio"},requiredExtension:{set:"requiredExtension"},requiredFeatures:{set:"requiredFeatures"},systemLanguage:{set:"systemLanguage"},externalResourcesRequired:{set:"externalResourceRequired"},href:{set:lR("href")},xlinkHref:{set:lR("xlink:href")},filter:{qualify:_t,set:function(e){return"url(#"+this.paper.defineFilter(e)+")"}},fill:{qualify:_t,set:dR},stroke:{qualify:_t,set:dR},sourceMarker:{qualify:_t,set:function(e,t,n,r){return e=Ae(Bw(r),e),{"marker-start":"url(#"+this.paper.defineMarker(e)+")"}}},targetMarker:{qualify:_t,set:function(e,t,n,r){return e=Ae(Bw(r),{transform:"rotate(180)"},e),{"marker-end":"url(#"+this.paper.defineMarker(e)+")"}}},vertexMarker:{qualify:_t,set:function(e,t,n,r){return e=Ae(Bw(r),e),{"marker-mid":"url(#"+this.paper.defineMarker(e)+")"}}},text:{qualify:function(e,t,n){return!n.textWrap||!_t(n.textWrap)},set:function(e,t,n,r){let i=(0,yc.default)(n),o="joint-text",s=i.data(o),{lineHeight:a,annotations:u,textVerticalAnchor:l,eol:f,displayEmpty:d}=r,m=r.textPath,I=r.x;ui(I)&&(I=ci(I,t));let C=r["font-size"]||r.fontSize;ui(C)&&(C=ci(C,t));let M=JSON.stringify([e,a,u,l,f,d,m,I,C]);if(s===void 0||s!==M){if(C&&n.setAttribute("font-size",C),Ke(m)){let E=m.selector;if(typeof E=="string"){let[N]=this.findBySelector(E);N instanceof SVGPathElement&&(m=Ae({"xlink:href":"#"+N.id},m))}}ee(n).text(""+e,{lineHeight:a,annotations:u,textPath:m,x:I,textVerticalAnchor:l,eol:f,displayEmpty:d}),i.data(o,M)}}},textWrap:{qualify:_t,set:function(e,t,n,r){var i={},o=e.width||0;pn(o)?i.width=t.width*parseFloat(o)/100:ui(o)?i.width=Number(ci(o,t)):e.width===null?i.width=1/0:o<=0?i.width=t.width+o:i.width=o;var s=e.height||0;pn(s)?i.height=t.height*parseFloat(s)/100:ui(s)?i.height=Number(ci(s,t)):e.height===null||(s<=0?i.height=t.height+s:i.height=s);var a,u=e.text;if(u===void 0&&(u=r.text),u!==void 0){let l=e.breakText||Nm,f=r["font-size"]||r.fontSize;a=l(""+u,i,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":ui(f)?ci(f,t):f,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight,"letter-spacing":"letter-spacing"in r?r["letter-spacing"]:r.letterSpacing},{svgDocument:this.paper.svg,ellipsis:e.ellipsis,hyphen:e.hyphen,separator:e.separator,maxLineCount:e.maxLineCount,preserveSpaces:e.preserveSpaces})}else a="";Xe.text.set.call(this,a,t,n,r)}},title:{qualify:function(e,t){return t instanceof SVGElement},set:function(e,t,n){var r=(0,yc.default)(n),i="joint-title",o=r.data(i);if(o===void 0||o!==e){if(r.data(i,e),n.tagName==="title"){n.textContent=e;return}var s=n.firstElementChild;if(s&&s.tagName==="title")s.textContent=e;else{var a=document.createElementNS(n.namespaceURI,"title");a.textContent=e,n.insertBefore(a,s)}}}},lineHeight:{qualify:vc},textVerticalAnchor:{qualify:vc},textPath:{qualify:vc},annotations:{qualify:vc},eol:{qualify:vc},displayEmpty:{qualify:vc},port:{set:function(e){return e===null||e.id===void 0?e:e.id}},style:{qualify:_t,set:function(e,t,n){(0,yc.default)(n).css(e)}},html:{set:function(e,t,n){(0,yc.default)(n).html(e+"")}},props:sR,ref:{},refX:{position:Om("x","width","origin")},refY:{position:Om("y","height","origin")},refDx:{position:Om("x","width","corner")},refDy:{position:Om("y","height","corner")},refWidth:{set:ms("width","width")},refHeight:{set:ms("height","height")},refRx:{set:ms("rx","width")},refRy:{set:ms("ry","height")},refRInscribed:{set:(function(e){var t=ms(e,"width"),n=ms(e,"height");return function(r,i){var o=i.height>i.width?t:n;return o(r,i)}})("r")},refRCircumscribed:{set:function(e,t){var n=pn(e);e=parseFloat(e),n&&(e/=100);var r=Math.sqrt(t.height*t.height+t.width*t.width),i;return isFinite(e)&&(n||e>=0&&e<=1?i=e*r:i=Math.max(e+r,0)),{r:i}}},refCx:{set:ms("cx","width")},refCy:{set:ms("cy","height")},xAlignment:{offset:aR("x","width","right")},yAlignment:{offset:aR("y","height","bottom")},resetOffset:{offset:function(e,t){return e?{x:-t.x,y:-t.y}:{x:0,y:0}}},refDResetOffset:{set:uR({resetOffset:!0})},refDKeepOffset:{set:uR({resetOffset:!1})},refPointsResetOffset:{set:cR({resetOffset:!0})},refPointsKeepOffset:{set:cR({resetOffset:!1})},connection:{qualify:Kd,set:function({stubs:e=0}){let t;if(isFinite(e)&&e!==0){let n;e<0?n=(this.getConnectionLength()+e)/2:n=e;let r=this.getConnection(),i=this.getConnectionSubdivisions(),o=r.divideAtLength(n,{segmentSubdivisions:i}),s=r.divideAtLength(-n,{segmentSubdivisions:i});o&&s&&(t=`${o[0].serialize()} ${s[1].serialize()}`)}return{d:t||this.getSerializedConnection()}}},atConnectionLengthKeepGradient:{qualify:Kd,set:Pm("getTangentAtLength",{rotate:!0})},atConnectionLengthIgnoreGradient:{qualify:Kd,set:Pm("getTangentAtLength",{rotate:!1})},atConnectionRatioKeepGradient:{qualify:Kd,set:Pm("getTangentAtRatio",{rotate:!0})},atConnectionRatioIgnoreGradient:{qualify:Kd,set:Pm("getTangentAtRatio",{rotate:!1})}};Xe["xlink:href"]=Xe.xlinkHref;["transform","d","points","cx","cy","x1","x2","y1","y2","x","y","dx","dy"].forEach(e=>{Xe[e]={qualify:ui,set:function(n,r){return{[e]:ci(n,r)}}}});["width","height","r","rx","ry","font-size","stroke-width"].forEach(e=>{Xe[e]={qualify:ui,set:function(n,r){return{[e]:Math.max(0,ci(n,r))}}}});Xe.refR=Xe.refRInscribed;Xe.refD=Xe.refDResetOffset;Xe.refPoints=Xe.refPointsResetOffset;Xe.atConnectionLength=Xe.atConnectionLengthKeepGradient;Xe.atConnectionRatio=Xe.atConnectionRatioKeepGradient;Xe.fontSize=Xe["font-size"];Xe.strokeWidth=Xe["stroke-width"];Xe.refX2=Xe.refX;Xe.refY2=Xe.refY;Xe.refWidth2=Xe.refWidth;Xe.refHeight2=Xe.refHeight;Xe["ref-x"]=Xe.refX;Xe["ref-y"]=Xe.refY;Xe["ref-dy"]=Xe.refDy;Xe["ref-dx"]=Xe.refDx;Xe["ref-width"]=Xe.refWidth;Xe["ref-height"]=Xe.refHeight;Xe["x-alignment"]=Xe.xAlignment;Xe["y-alignment"]=Xe.yAlignment;var ef=Xe;var nr=Vw.default.Model.extend({constructor:function(e,t){var n,r=e||{};typeof this.preinitialize=="function"&&this.preinitialize.apply(this,arguments),this.cid=Fw("c"),this.attributes={},t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(r=this.parse(r,t)||{}),(n=Ft(this,"defaults"))&&(r=Ut({},n,r)),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)},translate:function(e,t,n){throw new Error("Must define a translate() method.")},toJSON:function(){let t=Ft(this.constructor.prototype,"defaults").attrs||{},n=this.attributes.attrs,r={};gr(n,function(o,s){let a=t[s];gr(o,function(u,l){Ke(u)&&!Array.isArray(u)?gr(u,function(f,d){(!a||!a[l]||!oo(a[l][d],f))&&(r[s]=r[s]||{},(r[s][l]||(r[s][l]={}))[d]=f)}):(!a||!oo(a[l],u))&&(r[s]=r[s]||{},r[s][l]=u)})});let i=er(Wr(this.attributes,"attrs"));return i.attrs=r,i},initialize:function(e){let t=this.getIdAttribute();(!e||e[t]===void 0)&&this.set(t,this.generateId(),{silent:!0}),this._transitionIds={},this._scheduledTransitionIds={},this.processPorts(),this.on("change:attrs",this.processPorts,this)},getIdAttribute:function(){return this.idAttribute||"id"},generateId:function(){return Q_()},processPorts:function(){var e=this.ports,t={};gr(this.get("attrs"),function(o,s){o&&o.port&&(o.port.id!==void 0?t[o.port.id]=o.port:t[o.port]={id:o.port})});var n={};if(gr(e,function(o,s){t[s]||(n[s]=!0)}),this.graph&&!hr(n)){var r=this.graph.getConnectedLinks(this,{inbound:!0});r.forEach(function(o){n[o.get("target").port]&&o.remove()});var i=this.graph.getConnectedLinks(this,{outbound:!0});i.forEach(function(o){n[o.get("source").port]&&o.remove()})}this.ports=t},remove:function(e={}){let{graph:t,collection:n}=this;if(!t)return n&&n.remove(this,e),this;t.startBatch("remove");let r=this.getParentCell();r&&r.unembed(this,e);let i=this.getEmbeddedCells();for(let o=0,s=i.length;o<s;o++){let a=i[o];a&&a.remove(e)}return this.trigger("remove",this,t.attributes.cells,e),t.stopBatch("remove"),this},toFront:function(e){var t=this.graph;if(t){e=Gn(e||{},{foregroundEmbeds:!0});let n;e.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:e.breadthFirst!==!1,sortSiblings:e.foregroundEmbeds}),n.unshift(this)):n=[this];let r=e.foregroundEmbeds?n:Wd(n,u=>u.z()),o=t.maxZIndex()-n.length+1,s=t.get("cells"),a=s.indexOf(r[0])!==s.length-n.length;a||(a=r.some(function(u,l){return u.z()!==o+l})),a&&(this.startBatch("to-front"),o=o+n.length,r.forEach(function(u,l){u.set("z",o+l,e)}),this.stopBatch("to-front"))}return this},toBack:function(e){var t=this.graph;if(t){e=Gn(e||{},{foregroundEmbeds:!0});let r;e.deep?(r=this.getEmbeddedCells({deep:!0,breadthFirst:e.breadthFirst!==!1,sortSiblings:e.foregroundEmbeds}),r.unshift(this)):r=[this];let i=e.foregroundEmbeds?r:Wd(r,a=>a.z()),o=t.minZIndex();var n=t.get("cells");let s=n.indexOf(i[0])!==0;s||(s=i.some(function(a,u){return a.z()!==o+u})),s&&(this.startBatch("to-back"),o-=r.length,i.forEach(function(a,u){a.set("z",o+u,e)}),this.stopBatch("to-back"))}return this},parent:function(e,t){return e===void 0?this.get("parent"):this.set("parent",e,t)},embed:function(e,t){let n=Array.isArray(e)?e:[e];if(!this.canEmbed(n))throw new Error("Recursive embedding not allowed.");if(n.some(r=>r.isEmbedded()&&this.id!==r.parent()))throw new Error("Embedding of already embedded cells is not allowed.");return this._embedCells(n,t),this},unembed:function(e,t){let n=Array.isArray(e)?e:[e];return this._unembedCells(n,t),this},canEmbed:function(e){return(Array.isArray(e)?e:[e]).every(n=>this!==n&&!this.isEmbeddedIn(n))},_embedCells:function(e,t){let n="embed";this.startBatch(n);let r=Ae([],this.get("embeds"));e.forEach(i=>{r[i.isLink()?"unshift":"push"](i.id),i.parent(this.id,t)}),this.set("embeds",Hr(r),t),this.stopBatch(n)},_unembedCells:function(e,t){let n="unembed";this.startBatch(n),e.forEach(r=>r.unset("parent",t)),this.set("embeds",pc(this.get("embeds"),...e.map(r=>r.id)),t),this.stopBatch(n)},getParentCell:function(){var e=this.parent(),t=this.graph;return e&&t&&t.getCell(e)||null},getAncestors:function(){var e=[];if(!this.graph)return e;for(var t=this.getParentCell();t;)e.push(t),t=t.getParentCell();return e},getEmbeddedCells:function(e){if(e=e||{},!this.graph)return[];if(e.deep)return e.breadthFirst?this._getEmbeddedCellsBfs(e.sortSiblings):this._getEmbeddedCellsDfs(e.sortSiblings);let t=this.get("embeds");if(hr(t))return[];let n=t.map(this.graph.getCell,this.graph);return e.sortSiblings&&(n=Wd(n,r=>r.z())),n},_getEmbeddedCellsBfs:function(e){let t=[],n=[];for(n.push(this);n.length>0;){let r=n.shift();t.push(r);let i=r.getEmbeddedCells({sortSiblings:e});n.push(...i)}return t.shift(),t},_getEmbeddedCellsDfs:function(e){let t=[],n=[];for(n.push(this);n.length>0;){let r=n.pop();t.push(r);let i=r.getEmbeddedCells({sortSiblings:e});for(let o=i.length-1;o>=0;--o)n.push(i[o])}return t.shift(),t},isEmbeddedIn:function(e,t){var n=on(e)?e:e.id,r=this.parent();if(t=Ae({deep:!0},t),this.graph&&t.deep){for(;r;){if(r===n)return!0;r=this.graph.getCell(r).parent()}return!1}else return r===n},isEmbedded:function(){return!!this.parent()},clone:function(e){if(e=e||{},e.deep)return Be(Rm([this].concat(this.getEmbeddedCells({deep:!0}))));var t=Vw.default.Model.prototype.clone.apply(this,arguments);return t.set(this.getIdAttribute(),this.generateId()),t.unset("embeds"),t.unset("parent"),t},prop:function(e,t,n){var r="/",i=on(e);if(i||Array.isArray(e))if(arguments.length>1){var o,s;i?(o=e,s=o.split("/")):(o=e.join(r),s=e.slice());var a=s[0],u=s.length;let Z=n||{};Z.propertyPath=o,Z.propertyValue=t,Z.propertyPathArray=s,"rewrite"in Z||(Z.rewrite=!1);for(var l={},f=l,d=a,m=1;m<u;m++){var I=s[m],C=Number.isFinite(i?Number(I):I);f=f[d]=C?[]:{},d=I}l=qd(l,s,t,"/");var M=Ut({},this.attributes);Z.rewrite&&jw(M,o,"/");var E=Ut(M,l);return this.set(a,E[a],Z)}else return So(this.attributes,e,r);let N=t||{};N.propertyPath=null,N.propertyValue=e,N.propertyPathArray=[],"rewrite"in N||(N.rewrite=!1);let B={};for(let Z in e){let{changedValue:$}=Ut({},{changedValue:this.attributes[Z]},{changedValue:e[Z]});B[Z]=$}return this.set(B,N)},removeProp:function(e,t){t=t||{};var n=Array.isArray(e)?e:e.split("/"),r=n[0];if(r==="attrs"&&(t.dirty=!0),n.length===1)return this.unset(e,t);var i=n.slice(1),o=this.get(r);return o==null?this:(o=er(o),jw(o,i,"/"),this.set(r,o,t))},attr:function(e,t,n){var r=Array.from(arguments);return r.length===0?this.get("attrs"):(Array.isArray(e)?r[0]=["attrs"].concat(e):on(e)?r[0]="attrs/"+e:r[0]={attrs:e},this.prop.apply(this,r))},removeAttr:function(e,t){return Array.isArray(e)?this.removeProp(["attrs"].concat(e)):this.removeProp("attrs/"+e,t)},transition:function(e,t,n,r){r=r||"/";var i={duration:100,delay:10,timingFunction:iR.linear,valueFunction:_m.number};n=Ae(i,n);var o=0,s,a=function(d){var m,I,C;o=o||d,d-=o,I=d/n.duration,I<1?this._transitionIds[e]=m=Jd(a):(I=1,delete this._transitionIds[e]),C=s(n.timingFunction(I)),n.transitionId=m,this.prop(e,C,n),m||this.trigger("transition:end",this,e)}.bind(this);let{_scheduledTransitionIds:u}=this,l;var f=d=>{u[e]&&(u[e]=pc(u[e],l),u[e].length===0&&delete u[e]),this.stopPendingTransitions(e,r),s=n.valueFunction(So(this.attributes,e,r),t),this._transitionIds[e]=Jd(d),this.trigger("transition:start",this,e)};return l=setTimeout(f,n.delay,a),u[e]||(u[e]=[]),u[e].push(l),l},getTransitions:function(){return mc(Object.keys(this._transitionIds),Object.keys(this._scheduledTransitionIds))},stopScheduledTransitions:function(e,t="/"){let{_scheduledTransitionIds:n={}}=this,r=Object.keys(n);if(e){let i=e.split(t);r=r.filter(o=>oo(i,o.split(t).slice(0,i.length)))}return r.forEach(i=>{n[i].forEach(s=>clearTimeout(s)),delete n[i]}),this},stopPendingTransitions(e,t="/"){let{_transitionIds:n={}}=this,r=Object.keys(n);if(e){let i=e.split(t);r=r.filter(o=>oo(i,o.split(t).slice(0,i.length)))}r.forEach(i=>{let o=n[i];Qd(o),delete n[i],this.trigger("transition:end",this,i)})},stopTransitions:function(e,t="/"){return this.stopScheduledTransitions(e,t),this.stopPendingTransitions(e,t),this},addTo:function(e,t){return e.addCell(this,t),this},findView:function(e){return e.findViewByModel(this)},isElement:function(){return!1},isLink:function(){return!1},startBatch:function(e,t){return this.graph&&this.graph.startBatch(e,Ae({},t,{cell:this})),this},stopBatch:function(e,t){return this.graph&&this.graph.stopBatch(e,Ae({},t,{cell:this})),this},getChangeFlag:function(e){var t=0;if(!e)return t;for(var n in e)!e.hasOwnProperty(n)||!this.hasChanged(n)||(t|=e[n]);return t},angle:function(){return 0},position:function(){return new k(0,0)},z:function(){return this.get("z")||0},getPointFromConnectedLink:function(){return new k},getBBox:function(){return new de(0,0,0,0)},getPointRotatedAroundCenter(e,t,n){let r=new k(t,n);return e&&r.rotate(this.getBBox().center(),e),r},getAbsolutePointFromRelative(e,t){return this.getPointRotatedAroundCenter(-this.angle(),this.position().offset(e,t))},getRelativePointFromAbsolute(e,t){return this.getPointRotatedAroundCenter(this.angle(),e,t).difference(this.position())}},{getAttributeDefinition:function(e){var t=this.attributes,n=ef;return t&&t[e]||n[e]},define:function(e,t,n,r){n=Ae({defaults:Ta({type:e},t,this.prototype.defaults)},n);var i=this.extend(n,r);return typeof joint<"u"&&Nr(joint,"shapes")&&qd(joint.shapes,e,i,"."),i}});var hR=function(e,t,n){if(on(n)){if(!km[n])throw new Error('Unknown wrapper: "'+n+'"');n=km[n]}if(!gt(n))throw new Error("Wrapper must be a function.");Be(t).forEach(function(r){e[r]=n(e[r])})},km={cells:function(e){return function(){var t=Array.from(arguments),n=t.length,r=n>0&&t[0]||[],i=n>1&&t[n-1]||{};return Array.isArray(r)||(i instanceof nr?r=t:r instanceof nr&&(t.length>1&&t.pop(),r=t)),i instanceof nr&&(i={}),e.call(this,r,i)}}};var an={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",CENTER:"center"};function tf(e,t){let n=new de(e);switch(t){case void 0:throw new Error("Position required");case an.LEFT:case"leftMiddle":return n.leftMiddle();case an.RIGHT:case"rightMiddle":return n.rightMiddle();case an.TOP:case"topMiddle":return n.topMiddle();case an.BOTTOM:case"bottomMiddle":return n.bottomMiddle();case an.TOP_LEFT:case"topLeft":case"origin":return n.topLeft();case an.TOP_RIGHT:case"topRight":return n.topRight();case an.BOTTOM_LEFT:case"bottomLeft":return n.bottomLeft();case an.BOTTOM_RIGHT:case"bottomRight":case"corner":return n.bottomRight();case an.CENTER:return n.center();default:throw new Error(`Unknown position: ${t}`)}}function gR(e,t,n){var r=e.toJSON();return r.angle=t||0,Gn({},n,r)}function nf(e,t,n,r){return e.map(function(i,o,s){var a=this.pointAt((o+.5)/s.length);return(i.dx||i.dy)&&a.offset(i.dx||0,i.dy||0),gR(a.round(),0,Gw(r,i))},wo(t,n))}function pR(e,t,n,r){var i=t.center(),o=t.width/t.height,s=t.topMiddle(),a=wn.fromRect(t);return e.map(function(u,l,f){var d=n+r(l,f.length),m=s.clone().rotate(i,-d).scale(o,1,i),I=u.compensateRotation?-a.tangentTheta(m):0;return(u.dx||u.dy)&&m.offset(u.dx||0,u.dy||0),u.dr&&m.move(i,u.dr),gR(m.round(),I,Gw(t,u))})}function Gw(e,t){let{x:n,y:r,angle:i}=t;return pn(n)?n=parseFloat(n)/100*e.width:ui(n)&&(n=Number(ci(n,e))),pn(r)?r=parseFloat(r)/100*e.height:ui(r)&&(r=Number(ci(r,e))),{x:n,y:r,angle:i}}function zw(e,t){let{x:n,y:r}=Gw(e,t);return new k(n||0,r||0)}var PG=function(e,t){return e.map(n=>{let r=zw(t,n).round().toJSON();return r.angle=n.angle||0,r})},kG=function(e,t,n){return n.fn(e,t,n)},LG=function(e,t,n){var r=zw(t,n.start||t.origin()),i=zw(t,n.end||t.corner());return nf(e,r,i,t)},FG=function(e,t,n){return nf(e,t.origin(),t.bottomLeft(),t)},jG=function(e,t,n){return nf(e,t.topRight(),t.corner(),t)},BG=function(e,t,n){return nf(e,t.origin(),t.topRight(),t)},VG=function(e,t,n){return nf(e,t.bottomLeft(),t.corner(),t)},zG=function(e,t,n){var r=n.startAngle||0,i=n.step||360/e.length;return pR(e,t,r,function(o){return o*i})},GG=function(e,t,n){var r=n.startAngle||0,i=n.step||20;return pR(e,t,r,function(o,s){return(o+.5-s/2)*i})};var Hw={};Kt(Hw,{bottom:()=>YG,inside:()=>JG,insideOriented:()=>qG,left:()=>HG,manual:()=>UG,outside:()=>XG,outsideOriented:()=>$G,radial:()=>QG,radialOriented:()=>KG,right:()=>ZG,top:()=>WG});function vs(e,t){return Ta({},e,t,{x:0,y:0,angle:0,attrs:{}})}function mR(e){var t=e.center(),n=t.theta(e.origin()),r=t.theta(e.bottomLeft()),i=t.theta(e.corner()),o=t.theta(e.topRight());return[n,o,i,r]}function vR(e,t,n,r){r=Gn({},r,{offset:15});var i=t.center().theta(e),o,s,a,u,l=r.offset,f=0;let[d,m,I,C]=mR(t);i<m||i>I?(a=".3em",o=l,s=0,u="start"):i<d?(o=0,s=-l,n?(f=-90,u="start",a=".3em"):(u="middle",a="0")):i<C?(a=".3em",o=-l,s=0,u="end"):(o=0,s=l,n?(f=90,u="start",a=".3em"):(u="middle",a=".6em"));var M=Math.round;return vs(r,{x:M(o),y:M(s),angle:f,attrs:{labelText:{y:a,textAnchor:u}}})}function yR(e,t,n,r){r=Gn({},r,{offset:15});var i=t.center().theta(e),o,s,a,u,l=r.offset,f=0;let[d,m,I,C]=mR(t);i<m||i>I?(a=".3em",o=-l,s=0,u="end"):i<d?(o=0,s=l,n?(f=90,u="start",a=".3em"):(u="middle",a=".6em")):i<C?(a=".3em",o=l,s=0,u="start"):(o=0,s=-l,n?(f=-90,u="start",a=".3em"):(u="middle",a="0"));var M=Math.round;return vs(r,{x:M(o),y:M(s),angle:f,attrs:{labelText:{y:a,textAnchor:u}}})}function IR(e,t,n){n=Gn({},n,{offset:20});var r=ku(0,0),i=-e.theta(r),o=i,s=e.clone().move(r,n.offset).difference(e).round(),a=".3em",u;(i+90)%180===0?(u=t?"end":"middle",!t&&i===-270&&(a="0em")):i>-270&&i<-90?(u="start",o=i-180):u="end";var l=Math.round;return vs(n,{x:l(s.x),y:l(s.y),angle:t?o:0,attrs:{labelText:{y:a,textAnchor:u}}})}var UG=function(e,t,n){return vs(n)},HG=function(e,t,n){return vs(n,{x:-15,attrs:{labelText:{y:".3em",textAnchor:"end"}}})},ZG=function(e,t,n){return vs(n,{x:15,attrs:{labelText:{y:".3em",textAnchor:"start"}}})},WG=function(e,t,n){return vs(n,{y:-15,attrs:{labelText:{y:"0",textAnchor:"middle"}}})},YG=function(e,t,n){return vs(n,{y:15,attrs:{labelText:{y:".6em",textAnchor:"middle"}}})},$G=function(e,t,n){return vR(e,t,!0,n)},XG=function(e,t,n){return vR(e,t,!1,n)},qG=function(e,t,n){return yR(e,t,!0,n)},JG=function(e,t,n){return yR(e,t,!1,n)},QG=function(e,t,n){return IR(e.difference(t.center()),!1,n)},KG=function(e,t,n){return IR(e.difference(t.center()),!0,n)};var so={};Kt(so,{Cell:()=>nr,CellView:()=>qe,Element:()=>Ot,ElementView:()=>qt,Graph:()=>Lm,HighlighterView:()=>Nn,LayersNames:()=>pr,Link:()=>Rt,LinkView:()=>Pa,Paper:()=>V5,PaperLayer:()=>Zw,ToolView:()=>cb,ToolsView:()=>z5,attributes:()=>ef});var ys=Gi(kd(),1);var Rt=nr.extend({markup:['<path class="connection" stroke="black" d="M 0 0 0 0"/>','<path class="marker-source" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="marker-target" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="connection-wrap" d="M 0 0 0 0"/>','<g class="labels"/>','<g class="marker-vertices"/>','<g class="marker-arrowheads"/>','<g class="link-tools"/>'].join(""),toolMarkup:['<g class="link-tool">','<g class="tool-remove" event="remove">','<circle r="11" />','<path transform="scale(.8) translate(-16, -16)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z" />',"<title>Remove link.</title>","</g>",'<g class="tool-options" event="link:options">','<circle r="11" transform="translate(25)"/>','<path fill="white" transform="scale(.55) translate(29, -16)" d="M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z"/>',"<title>Link options.</title>","</g>","</g>"].join(""),doubleToolMarkup:void 0,vertexMarkup:['<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">','<circle class="marker-vertex" idx="<%= idx %>" r="10" />','<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>','<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">',"<title>Remove vertex.</title>","</path>","</g>"].join(""),arrowheadMarkup:['<g class="marker-arrowhead-group marker-arrowhead-group-<%= end %>">','<path class="marker-arrowhead" end="<%= end %>" d="M 26 0 L 0 13 L 26 26 z" />',"</g>"].join(""),defaultLabel:void 0,labelMarkup:void 0,_builtins:{defaultLabel:{markup:[{tagName:"rect",selector:"rect"},{tagName:"text",selector:"text"}],attrs:{text:{fill:"#000000",fontSize:14,textAnchor:"middle",yAlignment:"middle",pointerEvents:"none"},rect:{ref:"text",fill:"#ffffff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}}},defaults:{type:"link",source:{},target:{}},isLink:function(){return!0},disconnect:function(e){return this.set({source:{x:0,y:0},target:{x:0,y:0}},e)},source:function(e,t,n){if(e===void 0)return Zr(this.get("source"));var r,i,o=e instanceof nr;if(o)return r=Zr(t)||{},r.id=e.id,i=n,this.set("source",r,i);var s=!_t(e);return s?(r=Zr(t)||{},r.x=e.x,r.y=e.y,i=n,this.set("source",r,i)):(r=e,i=t,this.set("source",r,i))},target:function(e,t,n){if(e===void 0)return Zr(this.get("target"));var r,i,o=e instanceof nr;if(o)return r=Zr(t)||{},r.id=e.id,i=n,this.set("target",r,i);var s=!_t(e);return s?(r=Zr(t)||{},r.x=e.x,r.y=e.y,i=n,this.set("target",r,i)):(r=e,i=t,this.set("target",r,i))},router:function(e,t,n){if(e===void 0){var r=this.get("router");return r?typeof r=="object"?Zr(r):r:this.get("manhattan")?{name:"orthogonal"}:null}var i=typeof e=="object"||typeof e=="function",o=i?e:{name:e,args:t},s=i?t:n;return this.set("router",o,s)},connector:function(e,t,n){if(e===void 0){var r=this.get("connector");return r?typeof r=="object"?Zr(r):r:this.get("smooth")?{name:"smooth"}:null}var i=typeof e=="object"||typeof e=="function",o=i?e:{name:e,args:t},s=i?t:n;return this.set("connector",o,s)},label:function(e,t,n){var r=this.labels();return e=isFinite(e)&&e!==null?e|0:0,e<0&&(e=r.length+e),arguments.length<=1?this.prop(["labels",e]):this.prop(["labels",e],t,n)},labels:function(e,t){return arguments.length===0?(e=this.get("labels"),Array.isArray(e)?e.slice():[]):(Array.isArray(e)||(e=[]),this.set("labels",e,t))},hasLabels:function(){let{labels:e}=this.attributes;return Array.isArray(e)&&e.length>0},insertLabel:function(e,t,n){if(!t)throw new Error("dia.Link: no label provided");var r=this.labels(),i=r.length;return e=isFinite(e)&&e!==null?e|0:i,e<0&&(e=i+e+1),r.splice(e,0,t),this.labels(r,n)},appendLabel:function(e,t){return this.insertLabel(-1,e,t)},removeLabel:function(e,t){var n=this.labels();return e=isFinite(e)&&e!==null?e|0:-1,n.splice(e,1),this.labels(n,t)},vertex:function(e,t,n){var r=this.vertices();if(e=isFinite(e)&&e!==null?e|0:0,e<0&&(e=r.length+e),arguments.length<=1)return this.prop(["vertices",e]);var i=this._normalizeVertex(t);return this.prop(["vertices",e],i,n)},vertices:function(e,t){if(arguments.length===0)return e=this.get("vertices"),Array.isArray(e)?e.slice():[];Array.isArray(e)||(e=[]);for(var n=[],r=0;r<e.length;r++){var i=e[r],o=this._normalizeVertex(i);n.push(o)}return this.set("vertices",n,t)},insertVertex:function(e,t,n){if(!t)throw new Error("dia.Link: no vertex provided");var r=this.vertices(),i=r.length;e=isFinite(e)&&e!==null?e|0:i,e<0&&(e=i+e+1);var o=this._normalizeVertex(t);return r.splice(e,0,o),this.vertices(r,n)},removeVertex:function(e,t){var n=this.vertices();return e=isFinite(e)&&e!==null?e|0:-1,n.splice(e,1),this.vertices(n,t)},_normalizeVertex:function(e){var t=!_t(e);return t?{x:e.x,y:e.y}:e},translate:function(e,t,n){return n=n||{},n.translateBy=n.translateBy||this.id,n.tx=e,n.ty=t,this.applyToPoints(function(r){return{x:(r.x||0)+e,y:(r.y||0)+t}},n)},scale:function(e,t,n,r){return this.applyToPoints(function(i){return k(i).scale(e,t,n).toJSON()},r)},applyToPoints:function(e,t){if(!gt(e))throw new TypeError("dia.Link: applyToPoints expects its first parameter to be a function.");var n={},{source:r,target:i}=this.attributes;r.id||(n.source=e(r)),i.id||(n.target=e(i));var o=this.vertices();return o.length>0&&(n.vertices=o.map(e)),this.set(n,t)},getSourcePoint:function(){var e=this.getSourceCell();return e?e.getPointFromConnectedLink(this,"source"):new k(this.source())},getTargetPoint:function(){var e=this.getTargetCell();return e?e.getPointFromConnectedLink(this,"target"):new k(this.target())},getPointFromConnectedLink:function(){return this.getPolyline().pointAt(.5)},getPolyline:function(){let e=[this.getSourcePoint(),...this.vertices().map(k),this.getTargetPoint()];return new ft(e)},getBBox:function(){return this.getPolyline().bbox()},reparent:function(e){var t;if(this.graph){var n=this.getSourceElement(),r=this.getTargetElement(),i=this.getParentCell();n&&r&&(n===r||n.isEmbeddedIn(r)?t=r:r.isEmbeddedIn(n)?t=n:t=this.graph.getCommonAncestor(n,r)),i&&(!t||t.id!==i.id)&&i.unembed(this,e),t&&t.embed(this,e)}return t},hasLoop:function(e){e=e||{};var{source:t,target:n}=this.attributes,r=t.id,i=n.id;if(!r||!i)return!1;var o=r===i;if(!o&&e.deep&&this.graph){var s=this.getSourceCell(),a=this.getTargetCell();o=s.isEmbeddedIn(a)||a.isEmbeddedIn(s)}return o},getSourceCell:function(){let{graph:e,attributes:t}=this;var n=t.source;return n&&n.id&&e&&e.getCell(n.id)||null},getSourceElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getSourceCell()}while(e&&e.isLink());return e},getTargetCell:function(){let{graph:e,attributes:t}=this;var n=t.target;return n&&n.id&&e&&e.getCell(n.id)||null},getTargetElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getTargetCell()}while(e&&e.isLink());return e},getRelationshipAncestor:function(){var e;if(this.graph){var t=[this,this.getSourceElement(),this.getTargetElement()].filter(function(n){return!!n});e=this.graph.getCommonAncestor.apply(this.graph,t)}return e||null},isRelationshipEmbeddedIn:function(e){var t=on(e)||bn(e)?e:e.id,n=this.getRelationshipAncestor();return!!n&&(n.id===t||n.isEmbeddedIn(t))},_getDefaultLabel:function(){var e=this.get("defaultLabel")||this.defaultLabel||{},t={};return t.markup=e.markup||this.get("labelMarkup")||this.labelMarkup,t.position=e.position,t.attrs=e.attrs,t.size=e.size,t}},{endsEqual:function(e,t){var n=e.port===t.port||!e.port&&!t.port;return e.id===t.id&&n}});var CR=function(e){var t=er(e)||{};this.ports=[],this.groups={},this.portLayoutNamespace=Uw,this.portLabelLayoutNamespace=Hw,this._init(t)};CR.prototype={getPorts:function(){return this.ports},getGroup:function(e){return this.groups[e]||{}},getPortsByGroup:function(e){return this.ports.filter(function(t){return t.group===e})},getGroupPortsMetrics:function(e,t){var n=this.getGroup(e),r=this.getPortsByGroup(e),i=n.position||{},o=i.name,s=this.portLayoutNamespace;s[o]||(o="left");var a=i.args||{},u=r.map(function(d){return d&&d.position&&d.position.args}),l=s[o](u,t,a),f={ports:r,result:[]};return Be(l).reduce(function(d,m,I){var C=d.ports[I];return d.result.push({portId:C.id,portTransformation:m,labelTransformation:this._getPortLabelLayout(C,k(m),t),portAttrs:C.attrs,portSize:C.size,labelSize:C.label.size}),d}.bind(this),f),f.result},_getPortLabelLayout:function(e,t,n){var r=this.portLabelLayoutNamespace,i=e.label.position.name||"left";return r[i]?r[i](t,n,e.label.position.args):null},_init:function(e){if(Ke(e.groups))for(var t=Object.keys(e.groups),n=0,r=t.length;n<r;n++){var i=t[n];this.groups[i]=this._evaluateGroup(e.groups[i])}for(var o=Be(e.items),s=0,a=o.length;s<a;s++)this.ports.push(this._evaluatePort(o[s]))},_evaluateGroup:function(e){return Ut(e,{position:this._getPosition(e.position,!0),label:this._getLabel(e,!0)})},_evaluatePort:function(e){var t=Ae({},e),n=this.getGroup(e.group);return t.markup=t.markup||n.markup,t.attrs=Ut({},n.attrs,t.attrs),t.position=this._createPositionNode(n,t),t.label=Ut({},n.label,this._getLabel(t)),t.z=this._getZIndex(n,t),t.size=Ae({},n.size,t.size),t},_getZIndex:function(e,t){return bn(t.z)?t.z:bn(e.z)||e.z==="auto"?e.z:"auto"},_createPositionNode:function(e,t){return Ut({name:"left",args:{}},e.position,{args:t.args})},_getPosition:function(e,t){var n={},r;gt(e)?(r="fn",n.fn=e):on(e)?r=e:e===void 0?r=t?"left":null:Array.isArray(e)?(r="absolute",n.x=e[0],n.y=e[1]):Ke(e)&&(r=e.name,Ae(n,e.args));var i={args:n};return r&&(i.name=r),i},_getLabel:function(e,t){var n=e.label||{},r=n;return r.position=this._getPosition(n.position,t),r}};var AR={_initializePorts:function(){this._createPortData(),this.on("change:ports",function(){this._processRemovedPort(),this._createPortData()},this)},_processRemovedPort:function(){var e=this.get("ports")||{},t={};Be(e.items).forEach(function(a){t[a.id]=!0});var n=this.previous("ports")||{},r={};Be(n.items).forEach(function(a){t[a.id]||(r[a.id]=!0)});var i=this.graph;if(i&&!hr(r)){var o=i.getConnectedLinks(this,{inbound:!0});o.forEach(function(a){r[a.get("target").port]&&a.remove()});var s=i.getConnectedLinks(this,{outbound:!0});s.forEach(function(a){r[a.get("source").port]&&a.remove()})}},hasPorts:function(){var e=this.prop("ports/items");return Array.isArray(e)&&e.length>0},hasPort:function(e){return this.getPortIndex(e)!==-1},getPorts:function(){return er(this.prop("ports/items"))||[]},getGroupPorts:function(e){let t=Be(this.prop(["ports","items"])).filter(n=>n.group===e);return er(t)},getPort:function(e){return er(Be(this.prop("ports/items")).find(function(t){return t.id&&t.id===e}))},getPortsPositions:function(e){var t=this._portSettingsData.getGroupPortsMetrics(e,de(this.size()));return t.reduce(function(n,r){var i=r.portTransformation;return n[r.portId]={x:i.x,y:i.y,angle:i.angle},n},{})},getPortIndex:function(e){var t=Ke(e)?e.id:e;return this._isValidPortId(t)?Be(this.prop("ports/items")).findIndex(function(n){return n.id===t}):-1},addPort:function(e,t){if(!Ke(e)||Array.isArray(e))throw new Error("Element: addPort requires an object.");var n=Ae([],this.prop("ports/items"));return n.push(e),this.prop("ports/items",n,t),this},insertPort:function(e,t,n){let r=typeof e=="number"?e:this.getPortIndex(e);if(!Ke(t)||Array.isArray(t))throw new Error("dia.Element: insertPort requires an object.");let i=Ae([],this.prop("ports/items"));return i.splice(r,0,t),this.prop("ports/items",i,n),this},portProp:function(e,t,n,r){var i=this.getPortIndex(e);if(i===-1)throw new Error("Element: unable to find port with id "+e);var o=Array.prototype.slice.call(arguments,1);return Array.isArray(t)?o[0]=["ports","items",i].concat(t):on(t)?o[0]=["ports/items/",i,"/",t].join(""):(o=["ports/items/"+i],_t(t)&&(o.push(t),o.push(n))),this.prop.apply(this,o)},_validatePorts:function(){var e=this.get("ports")||{},t=[];e=e||{};var n=Be(e.items);return n.forEach(function(r){typeof r!="object"&&t.push("Element: invalid port ",r),this._isValidPortId(r.id)||(r.id=this.generatePortId())},this),Hr(n,"id").length!==n.length&&t.push("Element: found id duplicities in ports."),t},generatePortId:function(){return this.generateId()},_isValidPortId:function(e){return e!=null&&!Ke(e)},addPorts:function(e,t){return e.length&&this.prop("ports/items",Ae([],this.prop("ports/items")).concat(e),t),this},removePort:function(e,t){let n=t||{},r=this.getPortIndex(e);if(r!==-1){let i=Ae([],this.prop(["ports","items"]));i.splice(r,1),n.rewrite=!0,this.startBatch("port-remove"),this.prop(["ports","items"],i,n),this.stopBatch("port-remove")}return this},removePorts:function(e,t){let n,r;if(Array.isArray(e)){if(n=t||{},e.length===0)return this.this;r=Ae([],this.prop(["ports","items"])).filter(function(o){return!e.some(function(s){let a=Ke(s)?s.id:s;return o.id===a})})}else n=e||{},r=[];return this.startBatch("port-remove"),n.rewrite=!0,this.prop(["ports","items"],r,n),this.stopBatch("port-remove"),this},_createPortData:function(){var e=this._validatePorts();if(e.length>0)throw this.set("ports",this.previous("ports")),new Error(e.join(" "));var t;this._portSettingsData&&(t=this._portSettingsData.getPorts()),this._portSettingsData=new CR(this.get("ports"));var n=this._portSettingsData.getPorts();if(t){var r=n.filter(function(o){if(!t.find(function(s){return s.id===o.id}))return o}),i=t.filter(function(o){if(!n.find(function(s){return s.id===o.id}))return o});i.length>0&&this.trigger("ports:remove",this,i),r.length>0&&this.trigger("ports:add",this,r)}}},wR={portContainerMarkup:"g",portMarkup:[{tagName:"circle",selector:"circle",attributes:{r:10,fill:"#FFFFFF",stroke:"#000000"}}],portLabelMarkup:[{tagName:"text",selector:"text",attributes:{fill:"#000000"}}],_portElementsCache:null,_initializePorts:function(){this._cleanPortsCache()},_refreshPorts:function(){this._removePorts(),this._cleanPortsCache(),this._renderPorts()},_cleanPortsCache:function(){this._portElementsCache={}},_renderPorts:function(){for(var e=[],t=this._getContainerElement(),n=0,r=t.node.childNodes.length;n<r;n++)e.push(t.node.childNodes[n]);var i=Pw(this.model._portSettingsData.getPorts(),"z"),o="auto";Be(i[o]).forEach(function(f){var d=this._getPortElement(f);t.append(d),e.push(d)},this);for(var s=Object.keys(i),a=0;a<s.length;a++){var u=s[a];if(u!==o){var l=parseInt(u,10);this._appendPorts(i[u],l,e)}}this._updatePorts()},_getContainerElement:function(){return this.rotatableNode||this.vel},_appendPorts:function(e,t,n){var r=this._getContainerElement(),i=Be(e).map(this._getPortElement,this);n[t]||t<0?ee(n[Math.max(t,0)]).before(i):r.append(i)},_getPortElement:function(e){return this._portElementsCache[e.id]?this._portElementsCache[e.id].portElement:this._createPortElement(e)},findPortNode:function(e,t){let n=this._portElementsCache[e];if(!n)return null;if(!t)return n.portContentElement.node;let r=n.portElement.node,i=n.portSelectors,[o=null]=this.findBySelector(t,r,i);return o},_updatePorts:function(){this._updatePortGroup(void 0);var e=Object.keys(this.model._portSettingsData.groups);e.forEach(this._updatePortGroup,this)},_removePorts:function(){fr(this._portElementsCache,"portElement.remove")},_createPortElement:function(e){let t,n,r,i;var o=ee(this.portContainerMarkup).addClass("joint-port"),s=this._getPortMarkup(e);if(Array.isArray(s)){var a=this.parseDOMJSON(s,o.node),u=a.fragment;u.childNodes.length>1?t=ee("g").append(u):t=ee(u.firstChild),i=a.selectors}else t=ee(s),Array.isArray(t)&&(t=ee("g").append(t));if(!t)throw new Error("ElementView: Invalid port markup.");t.attr({port:e.id,"port-group":e.group});let l=this._getPortLabelMarkup(e.label);if(Array.isArray(l)){let{fragment:M,selectors:E}=this.parseDOMJSON(l,o.node),N=M.childNodes.length;N>0&&(r=E,n=N===1?ee(M.firstChild):ee("g").append(M))}else n=ee(l),Array.isArray(n)&&(n=ee("g").append(n));var f;if(i&&r){for(var d in r)if(i[d]&&d!==this.selector)throw new Error("ElementView: selectors within port must be unique.");f=Ae({},i,r)}else f=i||r||{};let m="portRoot",I="labelRoot",C="labelText";if(m in f||(f[m]=t.node),n){let M=n.node;if(I in f||(f[I]=M),!(C in f)){let E=n.tagName()==="TEXT"?M:Array.from(M.querySelectorAll("text"));f[C]=E,r||(r={}),r[C]=E}}return o.append(t.addClass("joint-port-body")),n&&o.append(n.addClass("joint-port-label")),this._portElementsCache[e.id]={portElement:o,portLabelElement:n,portSelectors:f,portLabelSelectors:r,portContentElement:t,portContentSelectors:i},o},_updatePortGroup:function(e){for(var t=de(this.model.size()),n=this.model._portSettingsData.getGroupPortsMetrics(e,t),r=0,i=n.length;r<i;r++){var o=n[r],s=o.portId,a=this._portElementsCache[s]||{},u=o.portTransformation,l=o.labelTransformation;l&&a.portLabelElement&&(this.updateDOMSubtreeAttributes(a.portLabelElement.node,l.attrs,{rootBBox:new de(o.labelSize),selectors:a.portLabelSelectors}),this.applyPortTransform(a.portLabelElement,l,-u.angle||0)),this.updateDOMSubtreeAttributes(a.portElement.node,o.portAttrs,{rootBBox:new de(o.portSize),selectors:a.portSelectors}),this.applyPortTransform(a.portElement,u)}},applyPortTransform:function(e,t,n){var r=ee.createSVGMatrix().rotate(n||0).translate(t.x||0,t.y||0).rotate(t.angle||0);e.transform(r,{absolute:!0})},_getPortMarkup:function(e){return e.markup||this.model.get("portMarkup")||this.model.portMarkup||this.portMarkup},_getPortLabelMarkup:function(e){return e.markup||this.model.get("portLabelMarkup")||this.model.portLabelMarkup||this.portLabelMarkup}};var Ot=nr.extend({defaults:{position:{x:0,y:0},size:{width:1,height:1},angle:0},initialize:function(){this._initializePorts(),nr.prototype.initialize.apply(this,arguments)},_initializePorts:function(){},_refreshPorts:function(){},isElement:function(){return!0},position:function(e,t,n){let r=bn(t);n=(r?n:e)||{};let{parentRelative:i,deep:o,restrictedArea:s}=n,a;if(i){if(!this.graph)throw new Error("Element must be part of a graph.");let u=this.getParentCell();u&&!u.isLink()&&(a=u.get("position"))}if(r){if(a&&(e+=a.x,t+=a.y),o||s){let{x:u,y:l}=this.get("position");this.translate(e-u,t-l,n)}else this.set("position",{x:e,y:t},n);return this}else{let u=k(this.get("position"));return i?u.difference(a):u}},translate:function(e,t,n){if(e=e||0,t=t||0,e===0&&t===0)return this;n=n||{},n.translateBy=n.translateBy||this.id;var r=this.get("position")||{x:0,y:0},i=n.restrictedArea;if(i&&n.translateBy===this.id)if(typeof i=="function"){var o=i.call(this,r.x+e,r.y+t,n);e=o.x-r.x,t=o.y-r.y}else{var s=this.getBBox({deep:!0}),a=r.x-s.x,u=r.y-s.y,l=Math.max(i.x+a,Math.min(i.x+i.width+a-s.width,r.x+e)),f=Math.max(i.y+u,Math.min(i.y+i.height+u-s.height,r.y+t));e=l-r.x,t=f-r.y}var d={x:r.x+e,y:r.y+t};return n.tx=e,n.ty=t,n.transition?(Ke(n.transition)||(n.transition={}),this.transition("position",d,Ae({},n.transition,{valueFunction:_m.object})),fr(this.getEmbeddedCells(),"translate",e,t,n)):(this.startBatch("translate",n),this.set("position",d,n),fr(this.getEmbeddedCells(),"translate",e,t,n),this.stopBatch("translate",n)),this},size:function(e,t,n){var r=this.get("size");return e===void 0?{width:r.width,height:r.height}:(Ke(e)&&(n=t,t=bn(e.height)?e.height:r.height,e=bn(e.width)?e.width:r.width),this.resize(e,t,n))},resize:function(e,t,n){if(n=n||{},this.startBatch("resize",n),n.direction){var r=this.get("size");switch(n.direction){case"left":case"right":t=r.height;break;case"top":case"bottom":e=r.width;break}var i=En(this.get("angle")||0),o=this.getBBox(),s;if(i){var a={"top-right":0,right:0,"top-left":1,top:1,"bottom-left":2,left:2,"bottom-right":3,bottom:3}[n.direction];n.absolute&&(a+=Math.floor((i+45)/90),a%=4);var u=o[["bottomLeft","corner","topRight","origin"][a]](),l=k(u).rotate(o.center(),-i),f=Math.sqrt(e*e+t*t)/2,d=a*Math.PI/2;d+=Math.atan(a%2==0?t/e:e/t),d-=ln(i);var m=k.fromPolar(f,d,l);s=k(m).offset(e/-2,t/-2)}else switch(s=o.topLeft(),n.direction){case"top":case"top-right":s.offset(0,o.height-t);break;case"left":case"bottom-left":s.offset(o.width-e,0);break;case"top-left":s.offset(o.width-e,o.height-t);break}this.set("size",{width:e,height:t},n),this.position(s.x,s.y,n)}else this.set("size",{width:e,height:t},n);return this.stopBatch("resize",n),this},scale:function(e,t,n,r){var i=this.getBBox().scale(e,t,n);return this.startBatch("scale",r),this.position(i.x,i.y,r),this.resize(i.width,i.height,r),this.stopBatch("scale"),this},fitEmbeds:function(e){return this.fitToChildren(e)},fitToChildren:function(e={}){let{graph:t}=this;if(!t)throw new Error("Element must be part of a graph.");let n=this.getEmbeddedCells().filter(r=>r.isElement());return n.length===0?this:(this.startBatch("fit-embeds",e),e.deep&&fr(n,"fitToChildren",e),this._fitToElements(Object.assign({elements:n},e)),this.stopBatch("fit-embeds"),this)},fitParent:function(e={}){let{graph:t}=this;if(!t)throw new Error("Element must be part of a graph.");if(e.deep&&e.terminator&&(e.terminator===this||e.terminator===this.id))return this;let n=this.getParentCell();if(!n||!n.isElement())return this;let r=n.getEmbeddedCells().filter(i=>i.isElement());return r.length===0?this:(this.startBatch("fit-parent",e),n._fitToElements(Object.assign({elements:r},e)),e.deep&&n.fitParent(e),this.stopBatch("fit-parent"),this)},_fitToElements:function(e={}){let t=this.graph.getCellsBBox(e.elements);if(!t)return;let{expandOnly:n,shrinkOnly:r}=e;if(n&&r)return;let{x:i,y:o,width:s,height:a}=t,{left:u,right:l,top:f,bottom:d}=Yr(e.padding);i-=u,o-=f,s+=u+l,a+=d+f;let m=new de(i,o,s,a);if(n)m=this.getBBox().union(m);else if(r){let I=this.getBBox().intersect(m);if(!I)return;m=I}this.set({position:{x:m.x,y:m.y},size:{width:m.width,height:m.height}},e)},rotate:function(e,t,n,r){if(n){var i=this.getBBox().center(),o=this.get("size"),s=this.get("position");i.rotate(n,this.get("angle")-e);var a=i.x-o.width/2-s.x,u=i.y-o.height/2-s.y;this.startBatch("rotate",{angle:e,absolute:t,origin:n}),this.position(s.x+a,s.y+u,r),this.rotate(e,t,null,r),this.stopBatch("rotate")}else this.set("angle",t?e:(this.get("angle")+e)%360,r);return this},angle:function(){return En(this.get("angle")||0)},getBBox:function(e={}){let{graph:t,attributes:n}=this,{deep:r,rotate:i}=e;if(r&&t){let d=this.getEmbeddedCells({deep:!0,breadthFirst:!0});return d.push(this),t.getCellsBBox(d,e)}let{angle:o=0,position:{x:s,y:a},size:{width:u,height:l}}=n,f=new de(s,a,u,l);return i&&f.rotateAroundCenter(o),f},getPointFromConnectedLink:function(e,t){var n=this.getBBox(),r=n.center(),i=e.get(t);if(!i)return r;var o=i.port;if(!o||!this.hasPort(o))return r;var s=this.portProp(o,["group"]),a=this.getPortsPositions(s),u=new k(a[o]).offset(n.origin()),l=this.angle();return l&&u.rotate(r,-l),u}});Ae(Ot.prototype,AR);var eU=ys.default.Collection.extend({initialize:function(e,t){t.cellNamespace?this.cellNamespace=t.cellNamespace:this.cellNamespace=typeof joint<"u"&&Nr(joint,"shapes")?joint.shapes:null,this.graph=t.graph},model:function(e,t){var n=t.collection,r=n.cellNamespace,i=e.type==="link"?Rt:So(r,e.type,".")||Ot,o=new i(e,t);return t.dry||(o.graph=n.graph),o},comparator:function(e){return e.get("z")||0}}),Lm=ys.default.Model.extend({initialize:function(e,t){t=t||{};var n=new eU([],{model:t.cellModel,cellNamespace:t.cellNamespace,graph:this});ys.default.Model.prototype.set.call(this,"cells",n),n.on("all",this.trigger,this),this.on("change:z",this._sortOnChangeZ,this),this._out={},this._in={},this._nodes={},this._edges={},this._batches={},n.on("add",this._restructureOnAdd,this),n.on("remove",this._restructureOnRemove,this),n.on("reset",this._restructureOnReset,this),n.on("change:source",this._restructureOnChangeSource,this),n.on("change:target",this._restructureOnChangeTarget,this),n.on("remove",this._removeCell,this)},_sortOnChangeZ:function(){this.get("cells").sort()},_restructureOnAdd:function(e){if(e.isLink()){this._edges[e.id]=!0;var{source:t,target:n}=e.attributes;t.id&&((this._out[t.id]||(this._out[t.id]={}))[e.id]=!0),n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)}else this._nodes[e.id]=!0},_restructureOnRemove:function(e){if(e.isLink()){delete this._edges[e.id];var{source:t,target:n}=e.attributes;t.id&&this._out[t.id]&&this._out[t.id][e.id]&&delete this._out[t.id][e.id],n.id&&this._in[n.id]&&this._in[n.id][e.id]&&delete this._in[n.id][e.id]}else delete this._nodes[e.id]},_restructureOnReset:function(e){e=e.models,this._out={},this._in={},this._nodes={},this._edges={},e.forEach(this._restructureOnAdd,this)},_restructureOnChangeSource:function(e){var t=e.previous("source");t.id&&this._out[t.id]&&delete this._out[t.id][e.id];var n=e.attributes.source;n.id&&((this._out[n.id]||(this._out[n.id]={}))[e.id]=!0)},_restructureOnChangeTarget:function(e){var t=e.previous("target");t.id&&this._in[t.id]&&delete this._in[t.id][e.id];var n=e.get("target");n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)},getOutboundEdges:function(e){return this._out&&this._out[e]||{}},getInboundEdges:function(e){return this._in&&this._in[e]||{}},toJSON:function(){var e=ys.default.Model.prototype.toJSON.apply(this,arguments);return e.cells=this.get("cells").toJSON(),e},fromJSON:function(e,t){if(!e.cells)throw new Error("Graph JSON must contain cells array.");return this.set(e,t)},set:function(e,t,n){var r;return typeof e=="object"?(r=e,n=t):(r={})[e]=t,r.hasOwnProperty("cells")&&(this.resetCells(r.cells,n),r=Wr(r,"cells")),ys.default.Model.prototype.set.call(this,r,n)},clear:function(e){e=Ae({},e,{clear:!0});var t=this.get("cells");if(t.length===0)return this;this.startBatch("clear",e);var n=t.sortBy(function(r){return r.isLink()?1:2});do n.shift().remove(e);while(n.length>0);return this.stopBatch("clear"),this},_prepareCell:function(e,t){var n;if(e instanceof ys.default.Model?(n=e.attributes,!e.graph&&(!t||!t.dry)&&(e.graph=this)):n=e,!on(n.type))throw new TypeError("dia.Graph: cell type must be a string.");return e},minZIndex:function(){var e=this.get("cells").first();return e&&e.get("z")||0},maxZIndex:function(){var e=this.get("cells").last();return e&&e.get("z")||0},addCell:function(e,t){return Array.isArray(e)?this.addCells(e,t):(e instanceof ys.default.Model?e.has("z")||e.set("z",this.maxZIndex()+1):e.z===void 0&&(e.z=this.maxZIndex()+1),this.get("cells").add(this._prepareCell(e,t),t||{}),this)},addCells:function(e,t){return e.length===0?this:(e=kw(e),t.maxPosition=t.position=e.length-1,this.startBatch("add",t),e.forEach(function(n){this.addCell(n,t),t.position--},this),this.stopBatch("add",t),this)},resetCells:function(e,t){var n=Be(e).map(function(r){return this._prepareCell(r,t)},this);return this.get("cells").reset(n,t),this},removeCells:function(e,t){return e.length&&(this.startBatch("remove"),fr(e,"remove",t),this.stopBatch("remove")),this},_removeCell:function(e,t,n){n=n||{},n.clear||(n.disconnectLinks?this.disconnectLinks(e,n):this.removeLinks(e,n)),this.get("cells").remove(e,{silent:!0}),e.graph===this&&(e.graph=null)},getCell:function(e){return this.get("cells").get(e)},getCells:function(){return this.get("cells").toArray()},getElements:function(){return this.get("cells").filter(e=>e.isElement())},getLinks:function(){return this.get("cells").filter(e=>e.isLink())},getFirstCell:function(){return this.get("cells").first()},getLastCell:function(){return this.get("cells").last()},getConnectedLinks:function(e,t){t=t||{};var n=t.indirect,r=t.inbound,i=t.outbound;r===void 0&&i===void 0&&(r=i=!0);var o=[],s={};i&&a(this,e),r&&u(this,e);function a(d,m){if(gr(d.getOutboundEdges(m.id),function(C,M){if(!s[M]){var E=d.getCell(M);o.push(E),s[M]=!0,n&&(r&&u(d,E),i&&a(d,E))}}.bind(d)),n&&m.isLink()){var I=m.getTargetCell();I&&I.isLink()&&(s[I.id]||(o.push(I),a(d,I)))}}function u(d,m){if(gr(d.getInboundEdges(m.id),function(C,M){if(!s[M]){var E=d.getCell(M);o.push(E),s[M]=!0,n&&(r&&u(d,E),i&&a(d,E))}}.bind(d)),n&&m.isLink()){var I=m.getSourceCell();I&&I.isLink()&&(s[I.id]||(o.push(I),u(d,I)))}}if(t.deep){var l=e.getEmbeddedCells({deep:!0}),f={};l.forEach(function(d){d.isElement()&&(f[d.id]=!0)}),l.forEach(function(d){d.isLink()||(i&&gr(this.getOutboundEdges(d.id),function(m,I){if(!s[I]){var C=this.getCell(I),{source:M,target:E}=C.attributes,N=M.id,B=E.id;if(!t.includeEnclosed&&N&&f[N]&&B&&f[B])return;o.push(this.getCell(I)),s[I]=!0}}.bind(this)),r&&gr(this.getInboundEdges(d.id),function(m,I){if(!s[I]){var C=this.getCell(I),{source:M,target:E}=C.attributes,N=M.id,B=E.id;if(!t.includeEnclosed&&N&&f[N]&&B&&f[B])return;o.push(this.getCell(I)),s[I]=!0}}.bind(this)))},this)}return o},getNeighbors:function(e,t){t||(t={});var n=t.inbound,r=t.outbound;n===void 0&&r===void 0&&(n=r=!0);var i=this.getConnectedLinks(e,t).reduce(function(a,u){var{source:l,target:f}=u.attributes,d=u.hasLoop(t);if(n&&Nr(l,"id")&&!a[l.id]){var m=this.getCell(l.id);m.isElement()&&(d||m&&m!==e&&(!t.deep||!m.isEmbeddedIn(e)))&&(a[l.id]=m)}if(r&&Nr(f,"id")&&!a[f.id]){var I=this.getCell(f.id);I.isElement()&&(d||I&&I!==e&&(!t.deep||!I.isEmbeddedIn(e)))&&(a[f.id]=I)}return a}.bind(this),{});if(e.isLink()){if(n){var o=e.getSourceCell();o&&o.isElement()&&!i[o.id]&&(i[o.id]=o)}if(r){var s=e.getTargetCell();s&&s.isElement()&&!i[s.id]&&(i[s.id]=s)}}return Be(i)},getCommonAncestor:function(){var e=Array.from(arguments).map(function(n){for(var r=[],i=n.get("parent");i;)r.push(i),i=this.getCell(i).get("parent");return r},this);e=e.sort(function(n,r){return n.length-r.length});var t=Be(e.shift()).find(function(n){return e.every(function(r){return r.includes(n)})});return this.getCell(t)},getSuccessors:function(e,t){t=t||{};var n=[];return this.search(e,function(r){r!==e&&n.push(r)},Ae({},t,{outbound:!0})),n},cloneCells:Rm,cloneSubgraph:function(e,t){var n=this.getSubgraph(e,t);return this.cloneCells(n)},getSubgraph:function(e,t){t=t||{};var n=[],r={},i=[],o=[];return Be(e).forEach(function(s){if(r[s.id]||(n.push(s),r[s.id]=s,s.isLink()?o.push(s):i.push(s)),t.deep){var a=s.getEmbeddedCells({deep:!0});a.forEach(function(u){r[u.id]||(n.push(u),r[u.id]=u,u.isLink()?o.push(u):i.push(u))})}}),o.forEach(function(s){var{source:a,target:u}=s.attributes;if(a.id&&!r[a.id]){var l=this.getCell(a.id);n.push(l),r[l.id]=l,i.push(l)}if(u.id&&!r[u.id]){var f=this.getCell(u.id);n.push(this.getCell(u.id)),r[f.id]=f,i.push(f)}},this),i.forEach(function(s){var a=this.getConnectedLinks(s,t);a.forEach(function(u){var{source:l,target:f}=u.attributes;!r[u.id]&&l.id&&r[l.id]&&f.id&&r[f.id]&&(n.push(u),r[u.id]=u)})},this),n},getPredecessors:function(e,t){t=t||{};var n=[];return this.search(e,function(r){r!==e&&n.push(r)},Ae({},t,{inbound:!0})),n},search:function(e,t,n){n=n||{},n.breadthFirst?this.bfs(e,t,n):this.dfs(e,t,n)},bfs:function(e,t,n={}){let r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){var s=o.shift();if(r[s.id]||(r[s.id]=!0,t.call(this,s,i[s.id])===!1))continue;let a=this.getNeighbors(s,n);for(let u=0,l=a.length;u<l;u++){let f=a[u];i[f.id]=i[s.id]+1,o.push(f)}}},dfs:function(e,t,n={}){let r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){let s=o.pop();if(r[s.id]||(r[s.id]=!0,t.call(this,s,i[s.id])===!1))continue;let a=this.getNeighbors(s,n),u=o.length;for(let l=0,f=a.length;l<f;l++){let d=a[l];i[d.id]=i[s.id]+1,o.splice(u,0,d)}}},getSources:function(){var e=[];return gr(this._nodes,function(t,n){(!this._in[n]||hr(this._in[n]))&&e.push(this.getCell(n))}.bind(this)),e},getSinks:function(){var e=[];return gr(this._nodes,function(t,n){(!this._out[n]||hr(this._out[n]))&&e.push(this.getCell(n))}.bind(this)),e},isSource:function(e){return!this._in[e.id]||hr(this._in[e.id])},isSink:function(e){return!this._out[e.id]||hr(this._out[e.id])},isSuccessor:function(e,t){var n=!1;return this.search(e,function(r){if(r===t&&r!==e)return n=!0,!1},{outbound:!0}),n},isPredecessor:function(e,t){var n=!1;return this.search(e,function(r){if(r===t&&r!==e)return n=!0,!1},{inbound:!0}),n},isNeighbor:function(e,t,n){n=n||{};var r=n.inbound,i=n.outbound;r===void 0&&i===void 0&&(r=i=!0);var o=!1;return this.getConnectedLinks(e,n).forEach(function(s){var{source:a,target:u}=s.attributes;if(r&&Nr(a,"id")&&a.id===t.id||i&&Nr(u,"id")&&u.id===t.id)return o=!0,!1}),o},disconnectLinks:function(e,t){this.getConnectedLinks(e).forEach(function(n){n.set(n.attributes.source.id===e.id?"source":"target",{x:0,y:0},t)})},removeLinks:function(e,t){fr(this.getConnectedLinks(e),"remove",t)},findModelsFromPoint:function(e){return this.getElements().filter(t=>t.getBBox({rotate:!0}).containsPoint(e))},findModelsInArea:function(e,t={}){let n=new de(e),{strict:r=!1}=t,i=r?"containsRect":"intersect";return this.getElements().filter(o=>n[i](o.getBBox({rotate:!0})))},findModelsUnderElement:function(e,t={}){let{searchBy:n="bbox"}=t,r=e.getBBox().rotateAroundCenter(e.angle());return(n==="bbox"?this.findModelsInArea(r):this.findModelsFromPoint(tf(r,n))).filter(o=>e.id!==o.id&&!o.isEmbeddedIn(e))},getBBox:function(){return this.getCellsBBox(this.getCells())},getCellsBBox:function(e,t={}){let{rotate:n=!0}=t;return Be(e).reduce(function(r,i){let o=i.getBBox({rotate:n});return o?r?r.union(o):o:r},null)},translate:function(e,t,n){var r=this.getCells().filter(function(i){return!i.isEmbedded()});return fr(r,"translate",e,t,n),this},resize:function(e,t,n){return this.resizeCells(e,t,this.getCells(),n)},resizeCells:function(e,t,n,r){var i=this.getCellsBBox(n);if(i){var o=Math.max(e/i.width,0),s=Math.max(t/i.height,0);fr(n,"scale",o,s,i.origin(),r)}return this},startBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)+1,this.trigger("batch:start",Ae({},t,{batchName:e}))},stopBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)-1,this.trigger("batch:stop",Ae({},t,{batchName:e}))},hasActiveBatch:function(e){let t=this._batches,n;return arguments.length===0?n=Object.keys(t):Array.isArray(e)?n=e:n=[e],n.some(r=>t[r]>0)}},{validations:{multiLinks:function(e,t){var{source:n,target:r}=t.attributes;if(n.id&&r.id){var i=t.getSourceCell();if(i){var o=e.getConnectedLinks(i,{outbound:!0}),s=o.filter(function(a){var{source:u,target:l}=a.attributes;return u&&u.id===n.id&&(!u.port||u.port===n.port)&&l&&l.id===r.id&&(!l.port||l.port===r.port)});if(s.length>1)return!1}}return!0},linkPinning:function(e,t){var{source:n,target:r}=t.attributes;return n.id&&r.id}}});hR(Lm.prototype,["resetCells","addCells","removeCells"],km.cells);var _a=Gi(kd(),1),Ra=Gi(fs(),1);var Is={},_r=_a.default.View.extend({options:{},theme:null,themeClassNamePrefix:Un("theme-"),requireSetThemeOverride:!1,defaultTheme:zn.defaultTheme,children:null,childNodes:null,DETACHABLE:!0,UPDATE_PRIORITY:2,FLAG_INSERT:1<<30,FLAG_REMOVE:1<<29,FLAG_INIT:1<<28,constructor:function(e){this.requireSetThemeOverride=e&&!!e.theme,this.options=Ae({},this.options,e),_a.default.View.call(this,e)},initialize:function(){Is[this.cid]=this,this.setTheme(this.options.theme||this.defaultTheme),this.init()},unmount:function(){this.svgElement?this.vel.remove():this.$el.remove()},isMounted:function(){return this.el.parentNode!==null},renderChildren:function(e){if(e||(e=Ft(this,"children")),e){var t=this.svgElement,n=ee.namespace[t?"svg":"xhtml"],r=Na(e,n);(t?this.vel:this.$el).empty().append(r.fragment),this.childNodes=r.selectors}return this},findAttribute:function(e,t){for(var n=t;n&&n.nodeType===1;){var r=n.getAttribute(e);if(r)return r;if(n===this.el)return null;n=n.parentNode}return null},_ensureElement:function(){if(this.el)this.setElement(Ft(this,"el"));else{var e=Ft(this,"tagName"),t=Ae({},Ft(this,"attributes")),n=Ae({},Ft(this,"style"));this.id&&(t.id=Ft(this,"id")),this.setElement(this._createElement(e)),this._setAttributes(t),this._setStyle(n)}this._ensureElClassName()},_setAttributes:function(e){this.svgElement?this.vel.attr(e):this.$el.attr(e)},_setStyle:function(e){this.$el.css(e)},_createElement:function(e){return this.svgElement?document.createElementNS(ee.namespace.svg,e):document.createElement(e)},_setElement:function(e){this.$el=e instanceof _a.default.$?e:_a.default.$(e),this.el=this.$el[0],this.svgElement&&(this.vel=ee(this.el))},_ensureElClassName:function(){var e=Ft(this,"className");if(e){var t=Un(e);this.svgElement?this.vel.removeClass(e).addClass(t):this.$el.removeClass(e).addClass(t)}},init:function(){},onRender:function(){},confirmUpdate:function(){return 0},setTheme:function(e,t){return t=t||{},this.theme&&this.requireSetThemeOverride&&!t.override?this:(this.removeThemeClassName(),this.addThemeClassName(e),this.onSetTheme(this.theme,e),this.theme=e,this)},addThemeClassName:function(e){if(e=e||this.theme,!e)return this;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.addClass(t):this.$el.addClass(t),this},removeThemeClassName:function(e){e=e||this.theme;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.removeClass(t):this.$el.removeClass(t),this},onSetTheme:function(e,t){},remove:function(){return this.onRemove(),this.undelegateDocumentEvents(),Is[this.cid]=null,_a.default.View.prototype.remove.apply(this,arguments),this},onRemove:function(){},getEventNamespace:function(){return".joint-event-ns-"+this.cid},delegateElementEvents:function(e,t,n){if(!t)return this;n||(n={});var r=this.getEventNamespace();for(var i in t){var o=t[i];typeof o!="function"&&(o=this[o]),o&&(0,Ra.default)(e).on(i+r,n,o.bind(this))}return this},undelegateElementEvents:function(e){return(0,Ra.default)(e).off(this.getEventNamespace()),this},delegateDocumentEvents:function(e,t){return e||(e=Ft(this,"documentEvents")),this.delegateElementEvents(document,e,t)},undelegateDocumentEvents:function(){return this.undelegateElementEvents(document)},eventData:function(e,t){if(!e)throw new Error("eventData(): event object required.");var n=e.data,r="__"+this.cid+"__";return t===void 0?n?n[r]||{}:{}:(n||(n=e.data={}),n[r]||(n[r]={}),Ae(n[r],t),this)},stopPropagation:function(e){return this.eventData(e,{propagationStopped:!0}),this},isPropagationStopped:function(e){return!!this.eventData(e).propagationStopped}},{extend:function(){var e=Array.from(arguments),t=e[0]&&Ae({},e[0])||{},n=e[1]&&Ae({},e[1])||{},r=t.render||this.prototype&&this.prototype.render||null;return t.render=function(){return typeof r=="function"&&r.apply(this,arguments),this.render.__render__===r&&this.onRender(),this},t.render.__render__=r,_a.default.View.extend.call(this,t,n)}}),bR="dbltap";if(Ra.default.event&&!(bR in Ra.default.event.special)){let e=zn.doubleTapInterval,t=30;Ra.default.event.special[bR]={bindType:"touchend",delegateType:"touchend",handle:function(n,...r){let{handleObj:i,target:o}=n,s=Ra.default.data(o),a=new Date().getTime(),u="lastTouch"in s?a-s.lastTouch:0;u<e&&u>t?(s.lastTouch=null,n.type=i.origType,i.handler.call(this,n,...r)):s.lastTouch=a}}}var pr={CELLS:"cells",BACK:"back",FRONT:"front",TOOLS:"tools",LABELS:"labels"},Zw=_r.extend({tagName:"g",svgElement:!0,pivotNodes:null,defaultTheme:null,options:{name:""},className:function(){return Un(`${this.options.name}-layer`)},init:function(){this.pivotNodes={}},insertSortedNode:function(e,t){this.el.insertBefore(e,this.insertPivot(t))},insertNode:function(e){let{el:t}=this;e.parentNode!==t&&t.appendChild(e)},insertPivot:function(e){let{el:t,pivotNodes:n}=this;e=+e,e||(e=0);let r=n[e];if(r)return r;r=n[e]=document.createComment("z-index:"+(e+1));let i=-1/0;for(let o in n)o=+o,o<e&&o>i&&(i=o,e-1);if(i!==-1/0){let o=n[i];t.insertBefore(r,o.nextSibling)}else t.insertBefore(r,t.firstChild);return r},removePivots:function(){let{el:e,pivotNodes:t}=this;for(let n in t)e.removeChild(t[n]);this.pivotNodes={}}});var Yw=Gi(fs(),1);function rf(e){return e?Array.isArray(e)?e:[e]:[]}var Nn=_r.extend({tagName:"g",svgElement:!0,className:"highlight",HIGHLIGHT_FLAG:1,UPDATE_PRIORITY:3,DETACHABLE:!1,UPDATABLE:!0,MOUNTABLE:!0,cellView:null,nodeSelector:null,node:null,updateRequested:!1,postponedUpdate:!1,transformGroup:null,detachedTransformGroup:null,requestUpdate(e,t){let{paper:n}=e;this.cellView=e,this.nodeSelector=t,n&&(this.updateRequested=!0,n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY))},confirmUpdate(){this.updateRequested=!1;let{cellView:e,nodeSelector:t}=this;return e.isMounted()?(this.update(e,t),this.mount(),this.transform(),0):(this.postponedUpdate=!0,0)},findNode(e,t=null){let n;if(typeof t=="string")[n]=e.findBySelector(t);else if(_t(t)){let r=e.model.isLink(),{label:i=null,port:o,selector:s}=t;r&&i!==null?n=e.findLabelNode(i,s):!r&&o?n=e.findPortNode(o,s):[n]=e.findBySelector(s)}else t&&(n=ee.toNode(t),n instanceof SVGElement||(n=null));return n||null},getNodeMatrix(e,t){let{options:n}=this,{layer:r}=n,{rotatableNode:i}=e,o=e.getNodeMatrix(t);return i?r?i.contains(t)?o:e.getRootRotateMatrix().inverse().multiply(o):e.getNodeRotateMatrix(t).multiply(o):o},mount(){let{MOUNTABLE:e,cellView:t,el:n,options:r,transformGroup:i,detachedTransformGroup:o,postponedUpdate:s,nodeSelector:a}=this;if(!e||i)return;if(s){this.update(t,a),this.transform();return}let{vel:u,paper:l}=t,{layer:f}=r;if(f){let d;o?(d=o,this.detachedTransformGroup=null):d=ee("g").addClass("highlight-transform").append(n),this.transformGroup=d,l.getLayerView(f).insertSortedNode(d.node,r.z)}else(!n.parentNode||n.nextSibling)&&u.append(n)},unmount(){let{MOUNTABLE:e,transformGroup:t,vel:n}=this;e&&(t?(this.transformGroup=null,this.detachedTransformGroup=t,t.remove()):n.remove())},transform(){let{transformGroup:e,cellView:t,updateRequested:n}=this;if(!e||t.model.isLink()||n)return;let r=t.getRootTranslateMatrix(),i=t.getRootRotateMatrix(),o=r.multiply(i);e.attr("transform",ee.matrixToTransformString(o))},update(){let{node:e,cellView:t,nodeSelector:n,updateRequested:r,id:i}=this;if(r)return;this.postponedUpdate=!1;let o=this.node=this.findNode(t,n);e&&this.unhighlight(t,e),o?(this.highlight(t,o),this.mount()):(this.unmount(),t.notify("cell:highlight:invalid",i,this))},onRemove(){let{node:e,cellView:t,id:n,constructor:r}=this;e&&this.unhighlight(t,e),this.unmount(),r._removeRef(t,n)},highlight(e,t){},unhighlight(e,t){},listenToUpdateAttributes(e){let t=Ft(this,"UPDATE_ATTRIBUTES");!Array.isArray(t)||t.length===0||this.listenTo(e.model,"change",this.onCellAttributeChange)},onCellAttributeChange(){let{cellView:e}=this;if(!e)return;let{model:t,paper:n}=e;Ft(this,"UPDATE_ATTRIBUTES").some(i=>t.hasChanged(i))&&n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY)}},{_views:{},highlight:function(e,t,n){let r=this.uniqueId(t,n);this.add(e,t,r,n)},unhighlight:function(e,t,n){let r=this.uniqueId(t,n);this.remove(e,r)},get(e,t=null){let{cid:n}=e,{_views:r}=this,i=r[n];if(t===null){let o=[];if(!i)return o;for(let s in i){let a=i[s];a instanceof this&&o.push(a)}return o}else{if(!i)return null;if(t in i){let o=i[t];if(o instanceof this)return o}return null}},add(e,t,n,r={}){if(!n)throw new Error("dia.HighlighterView: An ID required.");let i=Nn.get(e,n);i&&i.remove();let o=new this(r);return o.id=n,this._addRef(e,n,o),o.requestUpdate(e,t),o.listenToUpdateAttributes(e),o},_addRef(e,t,n){let{cid:r}=e,{_views:i}=this,o=i[r];o||(o=i[r]={}),o[t]=n},_removeRef(e,t){let{cid:n}=e,{_views:r}=this,i=r[n];if(i){t&&delete i[t];for(let o in i)return;delete r[n]}},remove(e,t=null){rf(this.get(e,t)).forEach(n=>{n.remove()})},removeAll(e,t=null){let{_views:n}=this;for(let r in n)for(let i in n[r]){let o=n[r][i];o.cellView.paper===e&&o instanceof this&&(t===null||i===t)&&o.remove()}},update(e,t=null,n=!1){rf(this.get(e,t)).forEach(r=>{(n||r.UPDATABLE)&&r.update()})},transform(e,t=null){rf(this.get(e,t)).forEach(n=>{n.UPDATABLE&&n.transform()})},unmount(e,t=null){rf(this.get(e,t)).forEach(n=>n.unmount())},mount(e,t=null){rf(this.get(e,t)).forEach(n=>n.mount())},uniqueId(e,t=""){return ee.ensureId(e)+JSON.stringify(t)}});var Ic={DEFAULT:"default",EMBEDDING:"embedding",CONNECTING:"connecting",MAGNET_AVAILABILITY:"magnetAvailability",ELEMENT_AVAILABILITY:"elementAvailability"},tU={TOOLS:"TOOLS"},qe=_r.extend({tagName:"g",svgElement:!0,selector:"root",metrics:null,className:function(){var e=["cell"],t=this.model.get("type");return t&&t.toLowerCase().split(".").forEach(function(n,r,i){e.push("type-"+i.slice(0,r+1).join("-"))}),e.join(" ")},_presentationAttributes:null,_flags:null,setFlags:function(){var e={},t={},n=0,r,i,o,s=Ft(this,"presentationAttributes");for(var a in s)if(s.hasOwnProperty(a)){var u=s[a];for(Array.isArray(u)||(u=[u]),r=0,i=u.length;r<i;r++){o=u[r];var l=e[o];l||(l=e[o]=1<<n++),t[a]|=l}}var f=Ft(this,"initFlag");for(Array.isArray(f)||(f=[f]),r=0,i=f.length;r<i;r++)o=f[r],e[o]||(e[o]=1<<n++);if(n>25)throw new Error("dia.CellView: Maximum number of flags exceeded.");this._flags=e,this._presentationAttributes=t},hasFlag:function(e,t){return e&this.getFlag(t)},removeFlag:function(e,t){return e^e&this.getFlag(t)},getFlag:function(e){var t=this._flags;if(!t)return 0;var n=0;if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++)n|=t[e[r]];else n|=t[e];return n},attributes:function(){var e=this.model;return{"model-id":e.id,"data-type":e.attributes.type}},constructor:function(e){e.id=e.id||ps(this),_r.call(this,e)},initialize:function(){this.setFlags(),_r.prototype.initialize.apply(this,arguments),this.cleanNodesCache(),this.$el.data("view",this),this.startListening()},startListening:function(){this.listenTo(this.model,"change",this.onAttributesChange)},onAttributesChange:function(e,t){var n=e.getChangeFlag(this._presentationAttributes);t.updateHandled||!n||(t.dirty&&this.hasFlag(n,"UPDATE")&&(n|=this.getFlag("RENDER")),t.tool&&(t.async=!1),this.requestUpdate(n,t))},requestUpdate:function(e,t){let{paper:n}=this;n&&e>0&&n.requestViewUpdate(this,e,this.UPDATE_PRIORITY,t)},parseDOMJSON:function(e,t){var n=Na(e),r=n.selectors,i=n.groupSelectors;for(var o in i){if(r[o])throw new Error("dia.CellView: ambiguous group selector");r[o]=i[o]}if(t){var s=this.selector;if(r[s])throw new Error("dia.CellView: ambiguous root selector.");r[s]=t}return{fragment:n.fragment,selectors:r}},can:function(e){var t=gt(this.options.interactive)?this.options.interactive(this):this.options.interactive;return Ke(t)&&t[e]!==!1||Rw(t)&&t!==!1},findBySelector:function(e,t,n){if(t||(t=this.el),n||(n=this.selectors),!e||e===".")return[t];if(n){var r=n[e];if(r)return Array.isArray(r)?r:[r]}return zn.useCSSSelectors?(0,Yw.default)(t).find(e).toArray():[]},notify:function(e){if(this.paper){var t=Array.prototype.slice.call(arguments,1);this.trigger.apply(this,[e].concat(t)),this.paper.trigger.apply(this.paper,[e,this].concat(t))}},getBBox:function(e){var t;if(e&&e.useModelGeometry){var n=this.model;t=n.getBBox().bbox(n.angle())}else t=this.getNodeBBox(this.el);return this.paper.localToPaperRect(t)},getNodeBBox:function(e){let t=this.getNodeBoundingRect(e),n=this.getRootTranslateMatrix().multiply(this.getNodeRotateMatrix(e)),r=this.getNodeMatrix(e);return ee.transformRect(t,n.multiply(r))},getNodeRotateMatrix(e){return!this.rotatableNode||this.rotatableNode.contains(e)?this.getRootRotateMatrix():ee.createSVGMatrix()},getNodeUnrotatedBBox:function(e){var t=this.getNodeBoundingRect(e),n=this.getNodeMatrix(e),r=this.getRootTranslateMatrix();return ee.transformRect(t,r.multiply(n))},getRootTranslateMatrix:function(){var e=this.model,t=e.position(),n=ee.createSVGMatrix().translate(t.x,t.y);return n},getRootRotateMatrix:function(){var e=ee.createSVGMatrix(),t=this.model,n=t.angle();if(n){var r=t.getBBox(),i=r.width/2,o=r.height/2;e=e.translate(i,o).rotate(n).translate(-i,-o)}return e},_notifyHighlight:function(e,t,n={}){let{el:r}=this,i;if(typeof t=="string"?[i=r]=this.findBySelector(t):[i=r]=this.$(t),n.partial=i!==r,n.type===void 0){let o;switch(!0){case n.embedding:o=Ic.EMBEDDING;break;case n.connecting:o=Ic.CONNECTING;break;case n.magnetAvailability:o=Ic.MAGNET_AVAILABILITY;break;case n.elementAvailability:o=Ic.ELEMENT_AVAILABILITY;break;default:o=Ic.DEFAULT;break}n.type=o}return this.notify(e,i,n),this},highlight:function(e,t){return this._notifyHighlight("cell:highlight",e,t)},unhighlight:function(e,t={}){return this._notifyHighlight("cell:unhighlight",e,t)},findMagnet:function(e){let t=this.el,n=this.$(e)[0];n||(n=t);do{let r=n.getAttribute("magnet"),i=n===t;if((r||i)&&r!=="false")return n;if(i)return;n=n.parentNode}while(n)},findProxyNode:function(e,t){e||(e=this.el);let n=e.getAttribute(`${t}-selector`);if(n){let[r]=this.findBySelector(n);if(r)return r}return e},getSelector:function(e,t){var n;if(e===this.el)return typeof t=="string"&&(n="> "+t),n;if(e){var r=ee(e).index()+1;n=e.tagName+":nth-child("+r+")",t&&(n+=" > "+t),n=this.getSelector(e.parentNode,n)}return n},addLinkFromMagnet:function(e,t,n){var r=this.paper,i=r.model,o=r.getDefaultLink(this,e);return o.set({source:this.getLinkEnd(e,t,n,o,"source"),target:{x:t,y:n}}).addTo(i,{async:!1,ui:!0}),o.findView(r)},getLinkEnd:function(e,...t){var n=this.model,r=n.id,i=this.findAttribute("port",e),o=e.getAttribute("joint-selector"),s={id:r};return o!=null&&(s.magnet=o),i!=null?(s.port=i,!n.hasPort(i)&&!o&&(s.selector=this.getSelector(e))):o==null&&this.el!==e&&(s.selector=this.getSelector(e)),this.customizeLinkEnd(s,e,...t)},customizeLinkEnd:function(e,t,n,r,i,o){let{paper:s}=this,{connectionStrategy:a}=s.options;if(typeof a=="function"){var u=a.call(s,e,this,t,new k(n,r),i,o,s);if(u)return u}return e},getMagnetFromLinkEnd:function(e){var t=this.el,n=e.port,r=e.magnet,i=this.model,o;return n!=null&&i.isElement()&&i.hasPort(n)?o=this.findPortNode(n,r)||t:(r||(r=e.selector),!r&&n!=null&&(r='[port="'+n+'"]'),o=this.findBySelector(r,t,this.selectors)[0]),this.findProxyNode(o,"magnet")},dragLinkStart:function(e,t,n,r){this.model.startBatch("add-link");let i=this.addLinkFromMagnet(t,n,r);i.notifyPointerdown(e,n,r),i.eventData(e,i.startArrowheadMove("target",{whenNotAllowed:"remove"})),this.eventData(e,{linkView:i})},dragLink:function(e,t,n){var r=this.eventData(e),i=r.linkView;if(i)i.pointermove(e,t,n);else{var o=this.paper,s=o.options.magnetThreshold,a=this.getEventTarget(e),u=r.targetMagnet;if(s==="onleave"){if(u===a||ee(u).contains(a))return}else if(o.eventData(e).mousemoved<=s)return;this.dragLinkStart(e,u,t,n)}},dragLinkEnd:function(e,t,n){var r=this.eventData(e),i=r.linkView;i&&(i.pointerup(e,t,n),this.model.stopBatch("add-link"))},getAttributeDefinition:function(e){return this.model.constructor.getAttributeDefinition(e)},setNodeAttributes:function(e,t){hr(t)||(e instanceof SVGElement?ee(e).attr(t):(0,Yw.default)(e).attr(t))},processNodeAttributes:function(e,t){var n,r,i,o,s,a,u,l,f,d=[];for(n in t)t.hasOwnProperty(n)&&(r=t[n],i=this.getAttributeDefinition(n),i&&(!gt(i.qualify)||i.qualify.call(this,r,e,t,this))?(on(i.set)&&(a||(a={}),a[i.set]=r),r!==null&&d.push(n,i)):(a||(a={}),a[K_(n)]=r));for(o=0,s=d.length;o<s;o+=2)n=d[o],i=d[o+1],r=t[n],gt(i.set)&&(u||(u={}),u[n]=r),gt(i.position)&&(l||(l={}),l[n]=r),gt(i.offset)&&(f||(f={}),f[n]=r);return{raw:t,normal:a,set:u,position:l,offset:f}},updateRelativeAttributes:function(e,t,n,r){r||(r={});var i,o,s,a=t.raw||{},u=t.normal||{},l=t.set,f=t.position,d=t.offset;for(i in l){o=l[i],s=this.getAttributeDefinition(i);var m=s.set.call(this,o,n.clone(),e,a,this);Ke(m)?Ae(u,m):m!==void 0&&(u[i]=m)}if(e instanceof HTMLElement){this.setNodeAttributes(e,u);return}var I=u.transform,C=ee.transformStringToMatrix(I),M=k(C.e,C.f);I&&(u=Wr(u,"transform"),C.e=C.f=0);var E,N,B;if(f||d){var Z=this.getNodeScale(e,r.scalableNode);E=Z.sx,N=Z.sy}var $=!1;for(i in f)o=f[i],s=this.getAttributeDefinition(i),B=s.position.call(this,o,n.clone(),e,a,this),B&&(M.offset(k(B).scale(E,N)),$||($=!0));this.setNodeAttributes(e,u);var te=!1;if(d){var p=this.getNodeBoundingRect(e);if(p.width>0&&p.height>0){var y=ee.transformRect(p,C).scale(1/E,1/N);for(i in d)o=d[i],s=this.getAttributeDefinition(i),B=s.offset.call(this,o,y,e,a,this),B&&(M.offset(k(B).scale(E,N)),te||(te=!0))}}(I!==void 0||$||te)&&(M.round(1),C.e=M.x,C.f=M.y,e.setAttribute("transform",ee.matrixToTransformString(C)))},getNodeScale:function(e,t){var n,r;if(t&&t.contains(e)){var i=t.scale();n=1/i.sx,r=1/i.sy}else n=1,r=1;return{sx:n,sy:r}},cleanNodesCache:function(){this.metrics={}},nodeCache:function(e){var t=this.metrics;if(!t)return{};var n=ee.ensureId(e),r=t[n];return r||(r=t[n]={}),r},getNodeData:function(e){var t=this.nodeCache(e);return t.data||(t.data={}),t.data},getNodeBoundingRect:function(e){var t=this.nodeCache(e);return t.boundingRect===void 0&&(t.boundingRect=ee(e).getBBox()),new de(t.boundingRect)},getNodeMatrix:function(e){let t=this.nodeCache(e);if(t.magnetMatrix===void 0){let{rotatableNode:n,el:r}=this,i;n&&n.contains(e)?i=n:i=r,t.magnetMatrix=ee(e).getTransformToElement(i)}return ee.createSVGMatrix(t.magnetMatrix)},getNodeShape:function(e){var t=this.nodeCache(e);return t.geometryShape===void 0&&(t.geometryShape=ee(e).toGeometryShape()),t.geometryShape.clone()},isNodeConnection:function(e){return this.model.isLink()&&(!e||e===this.el)},findNodesAttributes:function(e,t,n,r){var i,o,s,a,u={},l=[];for(var f in e)if(e.hasOwnProperty(f)&&(s=e[f],!!_t(s))){var d=n[f]=this.findBySelector(f,t,r);for(i=0,o=d.length;i<o;i++){var m=d[i];a=ee.ensureId(m);var I=r&&r[f]===m,C=u[a];if(C){C.array||(l.push(a),C.array=!0,C.attributes=[C.attributes],C.selectedLength=[C.selectedLength]);var M=C.attributes,E=C.selectedLength;if(I)M.unshift(s),E.unshift(-1);else{var N=Zd(E,o);M.splice(N,0,s),E.splice(N,0,o)}}else u[a]={attributes:s,selectedLength:I?-1:o,node:m,array:!1}}}for(i=0,o=l.length;i<o;i++)a=l[i],s=u[a],s.attributes=Ut({},...s.attributes.reverse());return u},getEventTarget:function(e,t={}){let{target:n,type:r,clientX:i=0,clientY:o=0}=e;return t.fromPoint||r==="touchmove"||r==="touchend"||"pointerId"in e&&n.hasPointerCapture(e.pointerId)?document.elementFromPoint(i,o):n},updateDOMSubtreeAttributes:function(e,t,n){n||(n={}),n.rootBBox||(n.rootBBox=de()),n.selectors||(n.selectors=this.selectors);var r={},i={},o=[],s=[],a,u,l,f,d,m=n.roAttributes,I=this.findNodesAttributes(m||t,e,r,n.selectors),C=m?this.findNodesAttributes(t,e,r,n.selectors):I;for(var M in I)if(f=I[M],l=f.attributes,u=f.node,d=this.processNodeAttributes(u,l),!d.set&&!d.position&&!d.offset)this.setNodeAttributes(u,d.normal);else{var E=C[M]&&C[M].attributes,N=E&&l.ref===void 0?E.ref:l.ref,B;if(N){if(B=(r[N]||this.findBySelector(N,e,n.selectors))[0],!B)throw new Error('dia.CellView: "'+N+'" reference does not exist.')}else B=null;if(a={node:u,refNode:B,processedAttributes:d,allAttributes:E},B){var Z=s.findIndex(function($){return $.refNode===u});Z>-1?s.splice(Z,0,a):s.push(a)}else o.push(a)}o.push(...s);for(let $=0,te=o.length;$<te;$++){a=o[$],u=a.node,B=a.refNode;let p=B?ee.ensureId(B):"",y=i[p];y||(y=i[p]=B?ee(B).getBBox({target:nU(u,B)}):n.rootBBox),m?(d=this.processNodeAttributes(u,a.allAttributes),this.mergeProcessedAttributes(d,a.processedAttributes)):d=a.processedAttributes,this.updateRelativeAttributes(u,d,y,n)}},mergeProcessedAttributes:function(e,t){e.set||(e.set={}),e.position||(e.position={}),e.offset||(e.offset={}),Ae(e.set,t.set),Ae(e.position,t.position),Ae(e.offset,t.offset);var n=e.normal&&e.normal.transform;n!==void 0&&t.normal&&(t.normal.transform=n),e.normal=t.normal},onMount(e){e||(this.mountTools(),Nn.mount(this))},onDetach(){this.unmountTools(),Nn.unmount(this)},onRemove:function(){this.removeTools(),this.removeHighlighters()},_toolsView:null,hasTools:function(e){var t=this._toolsView;return t?e?t.getName()===e:!0:!1},addTools:function(e){return this.removeTools(),e&&(this._toolsView=e,e.configure({relatedView:this}),e.listenTo(this.paper,"tools:event",this.onToolEvent.bind(this))),this},unmountTools(){let e=this._toolsView;return e&&e.unmount(),this},mountTools(){let e=this._toolsView;return e&&!e.isMounted()&&e.mount(),this},updateTools:function(e){var t=this._toolsView;return t&&t.update(e),this},removeTools:function(){var e=this._toolsView;return e&&(e.remove(),this._toolsView=null),this},hideTools:function(){var e=this._toolsView;return e&&e.hide(),this},showTools:function(){var e=this._toolsView;return e&&e.show(),this},onToolEvent:function(e){switch(e){case"remove":this.removeTools();break;case"hide":this.hideTools();break;case"show":this.showTools();break}},removeHighlighters:function(){Nn.remove(this)},updateHighlighters:function(e=!1){Nn.update(this,null,e)},transformHighlighters:function(){Nn.transform(this)},preventDefaultInteraction(e){this.eventData(e,{defaultInteractionPrevented:!0})},isDefaultInteractionPrevented(e){let{defaultInteractionPrevented:t=!1}=this.eventData(e);return t},pointerdblclick:function(e,t,n){this.notify("cell:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){this.notify("cell:pointerclick",e,t,n)},contextmenu:function(e,t,n){this.notify("cell:contextmenu",e,t,n)},pointerdown:function(e,t,n){let{model:r}=this,{graph:i}=r;i&&(r.startBatch("pointer"),this.eventData(e,{graph:i})),this.notify("cell:pointerdown",e,t,n)},pointermove:function(e,t,n){this.notify("cell:pointermove",e,t,n)},pointerup:function(e,t,n){let{graph:r}=this.eventData(e);this.notify("cell:pointerup",e,t,n),r&&r.stopBatch("pointer",{cell:this.model})},mouseover:function(e){this.notify("cell:mouseover",e)},mouseout:function(e){this.notify("cell:mouseout",e)},mouseenter:function(e){this.notify("cell:mouseenter",e)},mouseleave:function(e){this.notify("cell:mouseleave",e)},mousewheel:function(e,t,n,r){this.notify("cell:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){this.notify(t,e,n,r)},onmagnet:function(){},magnetpointerdblclick:function(){},magnetcontextmenu:function(){},checkMouseleave(e){let{paper:t,model:n}=this;if(t.isAsync()){if(n.isLink()){let o=n.getSourceElement();if(o){let a=t.findViewByModel(o);a&&(t.dumpView(a),t.checkViewVisibility(a))}let s=n.getTargetElement();if(s){let a=t.findViewByModel(s);a&&(t.dumpView(a),t.checkViewVisibility(a))}}t.dumpView(this),t.checkViewVisibility(this)}let r=this.getEventTarget(e,{fromPoint:!0}),i=t.findView(r);i!==this&&(this.mouseleave(e),i&&i.mouseenter(e))},setInteractivity:function(e){this.options.interactive=e}},{Flags:tU,Highlighting:Ic,addPresentationAttributes:function(e){return Ut({},Ft(this.prototype,"presentationAttributes"),e,function(t,n){if(!(!t||!n)&&(typeof t=="string"&&(t=[t]),typeof n=="string"&&(n=[n]),Array.isArray(t)&&Array.isArray(n)))return Hr(t.concat(n))})}});function nU(e,t){let n=e;do{if(n.contains(t))return n;n=n.parentNode}while(n);return null}var pt={TOOLS:qe.Flags.TOOLS,UPDATE:"UPDATE",TRANSLATE:"TRANSLATE",RESIZE:"RESIZE",PORTS:"PORTS",ROTATE:"ROTATE",RENDER:"RENDER"},Cc={MOVE:"move",MAGNET:"magnet"},qt=qe.extend({_removePorts:function(){},_renderPorts:function(){},className:function(){var e=qe.prototype.className.apply(this).split(" ");return e.push("element"),e.join(" ")},initialize:function(){qe.prototype.initialize.apply(this,arguments),this._initializePorts()},presentationAttributes:{attrs:[pt.UPDATE],position:[pt.TRANSLATE,pt.TOOLS],size:[pt.RESIZE,pt.PORTS,pt.TOOLS],angle:[pt.ROTATE,pt.TOOLS],markup:[pt.RENDER],ports:[pt.PORTS]},initFlag:[pt.RENDER],UPDATE_PRIORITY:0,confirmUpdate:function(e,t){let{useCSSSelectors:n}=zn;this.hasFlag(e,pt.PORTS)&&(this._removePorts(),this._cleanPortsCache());let r=!1;if(this.hasFlag(e,pt.RENDER))this.render(),this.updateTools(t),this.updateHighlighters(!0),r=!0,e=this.removeFlag(e,[pt.RENDER,pt.UPDATE,pt.RESIZE,pt.TRANSLATE,pt.ROTATE,pt.PORTS,pt.TOOLS]);else{let i=!1;this.hasFlag(e,pt.RESIZE)&&(this.resize(t),i=!0,e=this.removeFlag(e,[pt.RESIZE,pt.UPDATE]),n&&(e=this.removeFlag(e,pt.PORTS))),this.hasFlag(e,pt.UPDATE)&&(this.update(this.model,null,t),e=this.removeFlag(e,pt.UPDATE),i=!0,n&&(e=this.removeFlag(e,pt.PORTS))),this.hasFlag(e,pt.TRANSLATE)&&(this.translate(),e=this.removeFlag(e,pt.TRANSLATE),r=!0),this.hasFlag(e,pt.ROTATE)&&(this.rotate(),e=this.removeFlag(e,pt.ROTATE),r=!0),this.hasFlag(e,pt.PORTS)&&(this._renderPorts(),i=!0,e=this.removeFlag(e,pt.PORTS)),i&&this.updateHighlighters(!1)}return r&&this.transformHighlighters(),this.hasFlag(e,pt.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,pt.TOOLS)),e},_initializePorts:function(){},update:function(e,t){this.cleanNodesCache();let{useCSSSelectors:n}=zn;n&&this._removePorts();var r=this.model,i=r.attr();this.updateDOMSubtreeAttributes(this.el,i,{rootBBox:new de(r.size()),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode,roAttributes:t===i?null:t}),n&&this._renderPorts()},rotatableSelector:"rotatable",scalableSelector:"scalable",scalableNode:null,rotatableNode:null,renderMarkup:function(){var e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.ElementView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if(typeof t=="string")return this.renderStringMarkup(t);throw new Error("dia.ElementView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el),n=this.selectors=t.selectors;this.rotatableNode=ee(n[this.rotatableSelector])||null,this.scalableNode=ee(n[this.scalableSelector])||null,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=this.vel;t.append(ee(e)),this.rotatableNode=t.findOne(".rotatable"),this.scalableNode=t.findOne(".scalable");var n=this.selectors={};n[this.selector]=this.el},render:function(){return this.vel.empty(),this.renderMarkup(),this.scalableNode&&this.update(),this.resize(),this.rotatableNode?(this.rotate(),this.translate()):this.updateTransformation(),zn.useCSSSelectors||this._renderPorts(),this},resize:function(e){if(this.scalableNode)return this.sgResize(e);this.model.attributes.angle&&this.rotate(),this.update()},translate:function(){if(this.rotatableNode)return this.rgTranslate();this.updateTransformation()},rotate:function(){if(this.rotatableNode){this.rgRotate(),this.update();return}this.updateTransformation()},updateTransformation:function(){var e=this.getTranslateString(),t=this.getRotateString();t&&(e+=" "+t),this.vel.attr("transform",e)},getTranslateString:function(){var e=this.model.attributes.position;return"translate("+e.x+","+e.y+")"},getRotateString:function(){var e=this.model.attributes,t=e.angle;if(!t)return null;var n=e.size;return"rotate("+t+","+n.width/2+","+n.height/2+")"},rgRotate:function(){this.rotatableNode.attr("transform",this.getRotateString())},rgTranslate:function(){this.vel.attr("transform",this.getTranslateString())},sgResize:function(e){var t=this.model,n=t.angle(),r=t.size(),i=this.scalableNode,o=!1;i.node.getElementsByTagName("path").length>0&&(o=!0);var s=i.getBBox({recursive:o}),a=r.width/(s.width||1),u=r.height/(s.height||1);i.attr("transform","scale("+a+","+u+")");var l=this.rotatableNode,f=l&&l.attr("transform");if(f){l.attr("transform",f+" rotate("+-n+","+r.width/2+","+r.height/2+")");var d=i.getBBox({target:this.paper.cells});t.set("position",{x:d.x,y:d.y},Ae({updateHandled:!0},e)),this.translate(),this.rotate()}this.update()},prepareEmbedding:function(e={}){let t=e.model||this.model,r=(e.paper||this.paper).model,i=e.initialZIndices={},o=t.getEmbeddedCells({deep:!0}),s=r.getConnectedLinks(t,{deep:!0,includeEnclosed:!0});[t,...o,...s].forEach(l=>i[l.id]=l.attributes.z),t.startBatch("to-front"),t.toFront({deep:!0,ui:!0});let a=r.getElements().reduce((l,f)=>Math.max(l,f.attributes.z||0),0);s.forEach(l=>{l.attributes.z<=a&&l.set("z",a+1,{ui:!0})}),t.stopBatch("to-front");let u=t.parent();u?(r.getCell(u).unembed(t,{ui:!0}),e.initialParentId=u):e.initialParentId=null},processEmbedding:function(e={},t,n,r){let i=e.model||this.model,o=e.paper||this.paper,s=o.model,{findParentBy:a,frontParentOnly:u,validateEmbedding:l}=o.options,f;gt(a)?f=Be(a.call(s,this,t,n,r)):a==="pointer"?f=Be(s.findModelsFromPoint({x:n,y:r})):f=s.findModelsUnderElement(i,{searchBy:a}),f=f.filter(I=>I instanceof nr&&i.id!==I.id&&!I.isEmbeddedIn(i)),u&&(f=f.slice(-1));let d=null,m=e.candidateEmbedView;for(let I=f.length-1;I>=0;I--){let C=f[I];if(m&&m.model.id==C.id){d=m;break}else{let M=C.findView(o);if(!gt(l)||l.call(o,this,M)){d=M;break}}}d&&d!=m&&(this.clearEmbedding(e),e.candidateEmbedView=d.highlight(d.findProxyNode(null,"container"),{embedding:!0})),!d&&m&&this.clearEmbedding(e)},clearEmbedding:function(e){e||(e={});var t=e.candidateEmbedView;t&&(t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null)},finalizeEmbedding:function(e={}){let t=e.candidateEmbedView,n=e.model||this.model,r=e.paper||this.paper;if(t)t.model.embed(n,{ui:!0}),t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null;else{let{validateUnembedding:i}=r.options,{initialParentId:o}=e;if(o&&typeof i=="function"&&!i.call(r,this)){this._disallowUnembed(e);return}}r.model.getConnectedLinks(n,{deep:!0}).forEach(i=>{i.reparent({ui:!0})})},_disallowUnembed:function(e){let{model:t,whenNotAllowed:n="revert"}=e,r=t||this.model,o=(e.paper||this.paper).model;switch(n){case"remove":{r.remove({ui:!0});break}case"revert":{let{initialParentId:s,initialPosition:a,initialZIndices:u}=e;if(a){let{x:f,y:d}=a;r.position(f,d,{deep:!0,ui:!0})}u&&Object.keys(u).forEach(f=>{let d=o.getCell(f);d&&d.set("z",u[f],{ui:!0})});let l=o.getCell(s);l&&l.embed(r,{ui:!0});break}}},getDelegatedView:function(){for(var e=this,t=e.model,n=e.paper;e&&!t.isLink();){if(!t.isEmbedded()||e.can("stopDelegation"))return e;t=t.getParentCell(),e=n.findViewByModel(t)}return null},findProxyNode:function(e,t){e||(e=this.el);let n=e.getAttribute(`${t}-selector`);if(n){let r=this.findAttribute("port",e);if(r){let i=this.findPortNode(r,n);if(i)return i}else{let[i]=this.findBySelector(n);if(i)return i}}return e},notifyPointerdown(e,t,n){qe.prototype.pointerdown.call(this,e,t,n),this.notify("element:pointerdown",e,t,n)},notifyPointermove(e,t,n){qe.prototype.pointermove.call(this,e,t,n),this.notify("element:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("element:pointerup",e,t,n),qe.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){qe.prototype.pointerdblclick.apply(this,arguments),this.notify("element:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){qe.prototype.pointerclick.apply(this,arguments),this.notify("element:pointerclick",e,t,n)},contextmenu:function(e,t,n){qe.prototype.contextmenu.apply(this,arguments),this.notify("element:contextmenu",e,t,n)},pointerdown:function(e,t,n){this.notifyPointerdown(e,t,n),this.dragStart(e,t,n)},pointermove:function(e,t,n){let r=this.eventData(e),{targetMagnet:i,action:o,delegatedView:s}=r;switch(i&&this.magnetpointermove(e,i,t,n),o){case Cc.MAGNET:this.dragMagnet(e,t,n);break;case Cc.MOVE:(s||this).drag(e,t,n);default:if(r.preventPointerEvents)break;this.notifyPointermove(e,t,n);break}this.eventData(e,r)},pointerup:function(e,t,n){let r=this.eventData(e),{targetMagnet:i,action:o,delegatedView:s}=r;switch(i&&this.magnetpointerup(e,i,t,n),o){case Cc.MAGNET:this.dragMagnetEnd(e,t,n);break;case Cc.MOVE:(s||this).dragEnd(e,t,n);default:if(r.preventPointerEvents)break;this.notifyPointerup(e,t,n)}i&&this.magnetpointerclick(e,i,t,n),this.checkMouseleave(e)},mouseover:function(e){qe.prototype.mouseover.apply(this,arguments),this.notify("element:mouseover",e)},mouseout:function(e){qe.prototype.mouseout.apply(this,arguments),this.notify("element:mouseout",e)},mouseenter:function(e){qe.prototype.mouseenter.apply(this,arguments),this.notify("element:mouseenter",e)},mouseleave:function(e){qe.prototype.mouseleave.apply(this,arguments),this.notify("element:mouseleave",e)},mousewheel:function(e,t,n,r){qe.prototype.mousewheel.apply(this,arguments),this.notify("element:mousewheel",e,t,n,r)},onmagnet:function(e,t,n){let{currentTarget:r}=e;this.magnetpointerdown(e,r,t,n),this.eventData(e,{targetMagnet:r}),this.dragMagnetStart(e,t,n)},magnetpointerdown:function(e,t,n,r){this.notify("element:magnet:pointerdown",e,t,n,r)},magnetpointermove:function(e,t,n,r){this.notify("element:magnet:pointermove",e,t,n,r)},magnetpointerup:function(e,t,n,r){this.notify("element:magnet:pointerup",e,t,n,r)},magnetpointerdblclick:function(e,t,n,r){this.notify("element:magnet:pointerdblclick",e,t,n,r)},magnetcontextmenu:function(e,t,n,r){this.notify("element:magnet:contextmenu",e,t,n,r)},dragStart:function(e,t,n){if(this.isDefaultInteractionPrevented(e))return;var r=this.getDelegatedView();if(!r||!r.can("elementMove"))return;this.eventData(e,{action:Cc.MOVE,delegatedView:r});let i=r.model.position();r.eventData(e,{initialPosition:i,pointerOffset:i.difference(t,n),restrictedArea:this.paper.getRestrictedArea(r,t,n)})},dragMagnetStart:function(e,t,n){let{paper:r}=this,i=e.isPropagationStopped();if(i&&this.eventData(e,{preventPointerEvents:!0}),this.isDefaultInteractionPrevented(e)||!this.can("addLinkFromMagnet"))return;let{targetMagnet:o=e.currentTarget}=this.eventData(e);if(e.stopPropagation(),!r.options.validateMagnet.call(r,this,o,e)){i?this.dragStart(e,t,n):this.pointerdown(e,t,n);return}r.options.magnetThreshold<=0&&this.dragLinkStart(e,o,t,n),this.eventData(e,{action:Cc.MAGNET})},drag:function(e,t,n){var r=this.paper,i=r.options.gridSize,o=this.model,s=this.eventData(e),{pointerOffset:a,restrictedArea:u,embedding:l}=s,f=no(t+a.x,i),d=no(n+a.y,i);o.position(f,d,{restrictedArea:u,deep:!0,ui:!0}),r.options.embeddingMode&&(l||(this.prepareEmbedding(s),l=!0),this.processEmbedding(s,e,t,n)),this.eventData(e,{embedding:l})},dragMagnet:function(e,t,n){this.dragLink(e,t,n)},dragEnd:function(e,t,n){var r=this.eventData(e);r.embedding&&this.finalizeEmbedding(r)},dragMagnetEnd:function(e,t,n){this.dragLinkEnd(e,t,n)},magnetpointerclick:function(e,t,n,r){var i=this.paper;i.eventData(e).mousemoved>i.options.clickThreshold||this.notify("element:magnet:pointerclick",e,t,n,r)}},{Flags:pt});Ae(qt.prototype,wR);var Ym={};Kt(Ym,{manhattan:()=>Um,metro:()=>AU,normal:()=>rU,oneSide:()=>iU,orthogonal:()=>zm,rightAngle:()=>SU});var rU=function(e,t,n){return e};var iU=function(e,t,n){var r=t.side||"bottom",i=Yr(t.padding||40),o=n.sourceBBox,s=n.targetBBox,a=o.center(),u=s.center(),l,f,d;switch(r){case"bottom":d=1,l="y",f="height";break;case"top":d=-1,l="y",f="height";break;case"left":d=-1,l="x",f="width";break;case"right":d=1,l="x",f="width";break;default:throw new Error("Router: invalid side")}return a[l]+=d*(o[f]/2+i[r]),u[l]+=d*(s[f]/2+i[r]),d*(a[l]-u[l])>0?u[l]=a[l]:a[l]=u[l],[a].concat(e,u)};var oU={N:"S",S:"N",E:"W",W:"E"},sU={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function Bm(e,t,n){var r=new k(e.x,t.y);return n.containsPoint(r)&&(r=new k(t.x,e.y)),r}function Xw(e,t){return e[t==="W"||t==="E"?"width":"height"]}function mr(e,t){return e.x===t.x?e.y>t.y?"N":"S":e.y===t.y?e.x>t.x?"W":"E":null}function Fm(e){return new de(e.x,e.y,0,0)}function Vm(e){var t=Yr(e.padding||e.elementPadding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function DR(e,t){return e.sourceBBox.clone().moveAndExpand(Vm(t))}function xR(e,t){return e.targetBBox.clone().moveAndExpand(Vm(t))}function aU(e,t){if(e.sourceAnchor)return e.sourceAnchor;var n=DR(e,t);return n.center()}function uU(e,t){if(e.targetAnchor)return e.targetAnchor;var n=xR(e,t);return n.center()}function ER(e,t,n){var r=new k(e.x,t.y),i=new k(t.x,e.y),o=mr(e,r),s=mr(e,i),a=oU[n],u=o===n||o!==a&&(s===a||s!==n)?r:i;return{points:[u],direction:mr(u,t)}}function jm(e,t,n){var r=Bm(e,t,n);return{points:[r],direction:mr(r,t)}}function cU(e,t,n,r){var i={},o=[new k(e.x,t.y),new k(t.x,e.y)],s=o.filter(function(d){return!n.containsPoint(d)}),a=s.filter(function(d){return mr(d,e)!==r}),u;if(a.length>0)u=a.filter(function(d){return mr(e,d)===r}).pop(),u=u||a[0],i.points=[u],i.direction=mr(u,t);else{u=Yd(o,s)[0];var l=new k(t).move(u,-Xw(n,r)/2),f=Bm(l,e,n);i.points=[f,l],i.direction=mr(l,t)}return i}function lU(e,t,n,r){var i=jm(t,e,r),o=i.points[0];if(n.containsPoint(o)){i=jm(e,t,n);var s=i.points[0];if(r.containsPoint(s)){var a=new k(e).move(s,-Xw(n,mr(e,s))/2),u=new k(t).move(o,-Xw(r,mr(t,o))/2),l=new me(a,u).midpoint(),f=jm(e,l,n),d=ER(l,t,f.direction);i.points=[f.points[0],d.points[0]],i.direction=d.direction}}return i}function $w(e,t,n,r,i){var o={},s=n.union(r).inflate(1),a=s.center().distance(t)>s.center().distance(e),u=a?t:e,l=a?e:t,f,d,m;return i?(f=k.fromPolar(s.width+s.height,sU[i],u),f=s.pointNearestToPoint(f).move(f,-1)):f=s.pointNearestToPoint(u).move(u,1),d=Bm(f,l,s),f.round().equals(d.round())?(d=k.fromPolar(s.width+s.height,ln(f.theta(u))+Math.PI/2,l),d=s.pointNearestToPoint(d).move(l,1).round(),m=Bm(f,d,s),o.points=a?[d,m,f]:[f,m,d]):o.points=a?[d,f]:[f,d],o.direction=mr(a?f:d,t),o}function zm(e,t,n){var r=DR(n,t),i=xR(n,t),o=aU(n,t),s=uU(n,t);r=r.union(Fm(o)),i=i.union(Fm(s)),e=Be(e).map(k),e.unshift(o),e.push(s);for(var a,u=[],l=0,f=e.length-1;l<f;l++){var d=null,m=e[l],I=e[l+1],C=!!mr(m,I);if(l===0)l+1===f?r.intersect(i.clone().inflate(1))?d=$w(m,I,r,i):C||(d=lU(m,I,r,i)):r.containsPoint(I)?d=$w(m,I,r,Fm(I).moveAndExpand(Vm(t))):C||(d=jm(m,I,r));else if(l+1===f){var M=C&&mr(I,m)===a;i.containsPoint(m)||M?d=$w(m,I,Fm(m).moveAndExpand(Vm(t)),i,a):C||(d=cU(m,I,i,a))}else C||(d=ER(m,I,a));d?(Array.prototype.push.apply(u,d.points),a=d.direction):a=mr(m,I),l+1<f&&u.push(I)}return u}var _R={step:10,maximumLoops:2e3,precision:1,maxAllowedDirectionChange:90,perpendicular:!0,excludeEnds:[],excludeTypes:["basic.Text"],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost:function(){return this.step},directions:function(){var e=this.step,t=this.cost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:-e,offsetY:0,cost:t},{offsetX:0,offsetY:e,cost:t},{offsetX:0,offsetY:-e,cost:t}]},penalties:function(){return{0:0,45:this.step/2,90:this.step/2}},paddingBox:function(){var e=this.step;return{x:-e,y:-e,width:2*e,height:2*e}},isPointObstacle:null,fallbackRouter:function(e,t,n){if(!gt(zm))throw new Error("Manhattan requires the orthogonal router as default fallback.");return zm(e,Ae({},_R,t),n)},fallbackRoute:function(e,t,n){return null},draggingRoute:null};function Qw(e){this.map={},this.options=e,this.mapGridSize=100}Qw.prototype.build=function(e,t){var n=this.options,r=Be(n.excludeEnds).reduce(function(u,l){var f=t.get(l);if(f){var d=e.getCell(f.id);d&&u.push(d)}return u},[]),i=[],o=e.getCell(t.get("source").id);o&&(i=mc(i,o.getAncestors().map(function(u){return u.id})));var s=e.getCell(t.get("target").id);s&&(i=mc(i,s.getAncestors().map(function(u){return u.id})));var a=this.mapGridSize;return e.getElements().reduce(function(u,l){var f=Be(n.excludeTypes).includes(l.get("type")),d=r.find(function($){return $.id===l.id}),m=i.includes(l.id),I=f||d||m;if(!I)for(var C=l.getBBox().moveAndExpand(n.paddingBox),M=C.origin().snapToGrid(a),E=C.corner().snapToGrid(a),N=M.x;N<=E.x;N+=a)for(var B=M.y;B<=E.y;B+=a){var Z=N+"@"+B;u[Z]=u[Z]||[],u[Z].push(C)}return u},this.map),this};Qw.prototype.isPointAccessible=function(e){var t=e.clone().snapToGrid(this.mapGridSize).toString();return Be(this.map[t]).every(function(n){return!n.containsPoint(e)})};function Oa(){this.items=[],this.hash={},this.values={},this.OPEN=1,this.CLOSE=2}Oa.prototype.add=function(e,t){this.hash[e]?this.items.splice(this.items.indexOf(e),1):this.hash[e]=this.OPEN,this.values[e]=t;var n=Zd(this.items,e,function(r){return this.values[r]}.bind(this));this.items.splice(n,0,e)};Oa.prototype.remove=function(e){this.hash[e]=this.CLOSE};Oa.prototype.isOpen=function(e){return this.hash[e]===this.OPEN};Oa.prototype.isClose=function(e){return this.hash[e]===this.CLOSE};Oa.prototype.isEmpty=function(){return this.items.length===0};Oa.prototype.pop=function(){var e=this.items.shift();return this.remove(e),e};function RR(e,t){return t&&t.paddingBox?e.sourceBBox.clone().moveAndExpand(t.paddingBox):e.sourceBBox.clone()}function OR(e,t){return t&&t.paddingBox?e.targetBBox.clone().moveAndExpand(t.paddingBox):e.targetBBox.clone()}function PR(e,t){if(e.sourceAnchor)return e.sourceAnchor;var n=RR(e,t);return n.center()}function dU(e,t){if(e.targetAnchor)return e.targetAnchor;var n=OR(e,t);return n.center()}function qw(e,t,n,r,i){var o=360/n,s=e.theta(fU(e,t,r,i)),a=En(s+o/2);return o*Math.floor(a/o)}function fU(e,t,n,r){var i=r.step,o=t.x-e.x,s=t.y-e.y,a=o/n.x,u=s/n.y,l=a*i,f=u*i;return new k(e.x+l,e.y+f)}function MR(e,t){var n=Math.abs(e-t);return n>180?360-n:n}function hU(e,t,n){var r=n.step;Be(n.directions).forEach(function(i){i.gridOffsetX=i.offsetX/r*t.x,i.gridOffsetY=i.offsetY/r*t.y})}function gU(e,t,n){return{source:t.clone(),x:SR(n.x-t.x,e),y:SR(n.y-t.y,e)}}function SR(e,t){if(!e)return t;var n=Math.abs(e),r=Math.round(n/t);if(!r)return n;var i=r*t,o=n-i,s=o/r;return t+s}function pU(e,t){var n=t.source,r=no(e.x-n.x,t.x)+n.x,i=no(e.y-n.y,t.y)+n.y;return new k(r,i)}function of(e,t){return e.round(t)}function Gm(e,t,n){return of(pU(e.clone(),t),n)}function sf(e){return e.clone().toString()}function Jw(e){return new k(e.x===0?0:Math.abs(e.x)/e.x,e.y===0?0:Math.abs(e.y)/e.y)}function mU(e,t,n,r,i,o,s){for(var a=[],u=Jw(i.difference(n)),l=sf(n),f=e[l],d;f;){d=t[l];var m=Jw(d.difference(f));m.equals(u)||(a.unshift(d),u=m),l=sf(f),f=e[l]}var I=t[l],C=Jw(I.difference(r));return C.equals(u)||a.unshift(I),a}function TR(e,t){for(var n=1/0,r=0,i=t.length;r<i;r++){var o=e.manhattanDistance(t[r]);o<n&&(n=o)}return n}function NR(e,t,n,r,i){var o=i.precision,s=i.directionMap,a=e.difference(t.center()),u=Ke(s)?Object.keys(s):[],l=Be(n),f=u.reduce(function(d,m){if(l.includes(m)){for(var I=s[m],C=new k(e.x+I.x*(Math.abs(a.x)+t.width),e.y+I.y*(Math.abs(a.y)+t.height)),M=new me(e,C),E=M.intersect(t)||[],N=E.length,B,Z=null,$=0;$<N;$++){var te=E[$],p=e.squaredDistance(te);(B===void 0||p>B)&&(B=p,Z=te)}if(Z){var y=Gm(Z,r,o);t.containsPoint(y)&&(y=Gm(y.offset(I.x*r.x,I.y*r.y),r,o)),d.push(y)}}return d},[]);return t.containsPoint(e)||f.push(Gm(e,r,o)),f}function vU(e,t,n,r){var i=r.precision,o,s;e instanceof de?o=of(PR(this,r).clone(),i):o=of(e.clone(),i),t instanceof de?s=of(dU(this,r).clone(),i):s=of(t.clone(),i);var a=gU(r.step,o,s),u,l,f,d;if(e instanceof de?(u=o,f=NR(u,e,r.startDirections,a,r)):(u=o,f=[u]),t instanceof de?(l=s,d=NR(s,t,r.endDirections,a,r)):(l=s,d=[l]),f=f.filter(_e=>!n(_e)),d=d.filter(_e=>!n(_e)),f.length>0&&d.length>0){for(var m=new Oa,I={},C={},M={},E=0,N=f.length;E<N;E++){var B=f[E],Z=sf(B);m.add(Z,TR(B,d)),I[Z]=B,M[Z]=0}var $=r.previousDirectionAngle,te=$===void 0,p,y,D=r.directions;hU(D,a,r);for(var S=D.length,_=Be(d).reduce(function(_e,mt){var w=sf(mt);return _e.push(w),_e},[]),j=r.maximumLoops;!m.isEmpty()&&j>0;){var V=m.pop(),W=I[V],oe=C[V],fe=M[V],U=oe===void 0,q=W.equals(u),Y;U?te?q?Y=null:Y=qw(u,W,S,a,r):Y=$:Y=qw(oe,W,S,a,r);var Q=f.length===d.length;if(Q){for(var Pe=0;Pe<f.length;Pe++)if(!f[Pe].equals(d[Pe])){Q=!1;break}}var Se=U&&Q;if(!Se&&_.indexOf(V)>=0)return r.previousDirectionAngle=Y,mU(C,I,W,u,l,a,r);for(E=0;E<S;E++){p=D[E];var Et=p.angle;if(y=MR(Y,Et),!(!(te&&q)&&y>r.maxAllowedDirectionChange)){var jt=Gm(W.clone().offset(p.gridOffsetX,p.gridOffsetY),a,i),xe=sf(jt);if(!(m.isClose(xe)||n(jt))){if(_.indexOf(xe)>=0){var Te=jt.equals(l);if(!Te){var se=qw(jt,l,S,a,r),ie=MR(Et,se);if(ie>r.maxAllowedDirectionChange)continue}}var ge=p.cost,Ue=q?0:r.penalties[y],ut=fe+ge+Ue;(!m.isOpen(xe)||ut<M[xe])&&(I[xe]=jt,C[xe]=W,M[xe]=ut,m.add(xe,ut+TR(jt,d)))}}}j--}}return r.fallbackRoute.call(this,u,l,r)}function yU(e){if(e.directions=Ft(e,"directions"),e.penalties=Ft(e,"penalties"),e.paddingBox=Ft(e,"paddingBox"),e.padding=Ft(e,"padding"),e.padding){var t=Yr(e.padding);e.paddingBox={x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}Be(e.directions).forEach(function(n){var r=new k(0,0),i=new k(n.offsetX,n.offsetY);n.angle=En(r.theta(i))})}function IU(e,t,n){yU(t),n.options.perpendicular=!!t.perpendicular;var r=RR(n,t),i=OR(n,t),o=PR(n,t);let s;if(typeof t.isPointObstacle=="function")s=t.isPointObstacle;else{let Z=new Qw(t);Z.build(n.paper.model,n.model),s=$=>!Z.isPointAccessible($)}for(var a=Be(e).map(k),u=[],l=o,f,d,m=0,I=a.length;m<=I;m++){var C=null;if(d=f||r,f=a[m],!f){f=i;var M=!n.model.get("source").id||!n.model.get("target").id;if(M&&gt(t.draggingRoute)){var E=d===r?o:d,N=f.origin();C=t.draggingRoute.call(n,E,N,t)}}if(C=C||vU.call(n,d,f,s,t),C===null)return t.fallbackRouter(e,t,n);var B=C[0];B&&B.equals(l)&&C.shift(),l=C[C.length-1]||l,Array.prototype.push.apply(u,C)}return u}var Um=function(e,t,n){return IU(e,Ae({},_R,t),n)};var CU={maxAllowedDirectionChange:45,diagonalCost:function(){var e=this.step;return Math.ceil(Math.sqrt(e*e<<1))},directions:function(){var e=this.step,t=this.cost(),n=this.diagonalCost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:e,offsetY:e,cost:n},{offsetX:0,offsetY:e,cost:t},{offsetX:-e,offsetY:e,cost:n},{offsetX:-e,offsetY:0,cost:t},{offsetX:-e,offsetY:-e,cost:n},{offsetX:0,offsetY:-e,cost:t},{offsetX:e,offsetY:-e,cost:n}]},fallbackRoute:function(e,t,n){var r=e.theta(t),i=[],o={x:t.x,y:e.y},s={x:e.x,y:t.y};if(r%180>90){var a=o;o=s,s=a}var u=r%90<45?o:s,l=new me(e,u),f=90*Math.ceil(r/90),d=k.fromPolar(l.squaredLength(),ln(f+135),u),m=new me(t,d),I=l.intersection(m),C=I||t,M=I?C:e,E=360/n.directions.length,N=M.theta(t),B=En(N+E/2),Z=E*Math.floor(B/E);return n.previousDirectionAngle=Z,C&&i.push(C.round()),i.push(t),i}},AU=function(e,t,n){if(!gt(Um))throw new Error("Metro requires the manhattan router.");return Um(e,Ae({},CU,t),n)};var le={AUTO:"auto",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",ANCHOR_SIDE:"anchor-side",MAGNET_SIDE:"magnet-side"},kR=[le.LEFT,le.RIGHT,le.TOP,le.BOTTOM],Ac={[le.LEFT]:le.RIGHT,[le.RIGHT]:le.LEFT,[le.TOP]:le.BOTTOM,[le.BOTTOM]:le.TOP},wU=[le.TOP,le.BOTTOM],Hm={0:le.RIGHT,180:le.LEFT,270:le.TOP,90:le.BOTTOM};function af(e){return e.angle()}function Zm(e){return new ft(e).simplify({threshold:1}).points}function Wm(e,t){let{point:n,x0:r,y0:i,view:o,bbox:s,direction:a}=e,{point:u,x0:l,y0:f,view:d,bbox:m,direction:I}=t,C;if(o)o.model.isLink()?C=LR(u,n,o):a===le.ANCHOR_SIDE?C=s.sideNearestToPoint(n):a===le.MAGNET_SIDE?C=o.model.getBBox().sideNearestToPoint(n):C=a;else{let E=new de(r,i,0,0);C=kR.includes(a)?a:E.sideNearestToPoint(u)}let M;if(d)d.model.isLink()?M=LR(n,u,d):I===le.ANCHOR_SIDE?M=m.sideNearestToPoint(u):I===le.MAGNET_SIDE?M=d.model.getBBox().sideNearestToPoint(u):M=I;else{let E=new de(l,f,0,0);M=kR.includes(I)?I:E.sideNearestToPoint(n)}return[C,M]}function bU(e,t,n){let{x0:r,y0:i,width:o,height:s,point:a,margin:u}=e,l=r+o,f=i+s,d=r-u,m=l+u,I=i-u,{x:C}=a,{x0:M,y0:E}=t;return M===C&&E<i?le.BOTTOM:M<C&&E<I?le.RIGHT:M>C&&E<I?le.LEFT:M<d&&E>=i||M>m&&E>=i?le.TOP:M>=d&&M<=C&&E>f||M<=m&&M>=C&&E>f?n.point.x<M?le.RIGHT:le.LEFT:le.TOP}function DU(e,t,n){let{x0:r,y0:i,width:o,height:s,point:a,margin:u}=e,l=r+o,f=i+s,d=r-u,m=l+u,I=f+u,{x:C}=a,{x0:M,y0:E}=t;return M===C&&E>f?le.TOP:M<C&&E>I?le.RIGHT:M>C&&E>I?le.LEFT:M<d&&E<=f||M>m&&E<=f?le.BOTTOM:M>=d&&M<=C&&E<i||M<=m&&M>=C&&E<i?n.point.x<M?le.RIGHT:le.LEFT:le.BOTTOM}function xU(e,t,n){let{y0:r,x0:i,width:o,height:s,point:a,margin:u}=e,l=i+o,f=r+s,d=i-u,m=r-u,I=f+u,{x:C,y:M}=a,{x0:E,y0:N}=t;return E<C&&N===M?le.RIGHT:E<=d&&N<M?le.BOTTOM:E<=d&&N>M?le.TOP:E>=i&&N<=m||E>=i&&N>=I?le.LEFT:E>l&&N>=m&&N<=M||E>l&&N<=I&&N>=M?n.point.y<N?le.BOTTOM:le.TOP:le.LEFT}function EU(e,t,n){let{y0:r,x0:i,width:o,height:s,point:a,margin:u}=e,l=i+o,f=r+s,d=l+u,m=r-u,I=f+u,{x:C,y:M}=a,{x0:E,y0:N}=t;return E>C&&N===M?le.LEFT:E>=d&&N<M?le.BOTTOM:E>=d&&N>M?le.TOP:E<=l&&N<=m||E<=l&&N>=I?le.RIGHT:E<i&&N>=m&&N<=M||E<i&&N<=I&&N>=M?n.point.y<N?le.BOTTOM:le.TOP:le.RIGHT}function MU(e,t,n){let[r]=Wm(e,t);switch(r){case le.TOP:return bU(e,t,n);case le.RIGHT:return EU(e,t,n);case le.BOTTOM:return DU(e,t,n);case le.LEFT:return xU(e,t,n)}}function LR(e,t,n){let r=n.getTangentAtLength(n.getClosestPointLength(t)),i=Math.round(af(r)/90)*90;if(i%180===0&&e.y===t.y)return e.x<t.x?le.LEFT:le.RIGHT;if(e.x===t.x)return e.y<t.y?le.TOP:le.BOTTOM;switch(i){case 0:case 180:case 360:return e.y<t.y?le.TOP:le.BOTTOM;case 90:case 270:return e.x<t.x?le.LEFT:le.RIGHT}}function FR(e,t,n,r,i,o,s){r===le.AUTO&&(r=i?le.MAGNET_SIDE:le.ANCHOR_SIDE);let a=e&&e.model.isElement(),{x:u,y:l,width:f=0,height:d=0}=a?de.fromRectUnion(n,e.model.getBBox()):o;return{point:t,x0:u,y0:l,view:e,bbox:n,width:f,height:d,direction:r,margin:a?s:0}}function Kw({x:e,y:t}){let n=new k(e,t);return{point:n,x0:n.x,y0:n.y,view:null,bbox:new de(e,t,0,0),width:0,height:0,direction:null,margin:0}}function jR(e,t,n){let r=t.point.clone(),{x0:i,y0:o,width:s,height:a}=t;switch(e){case"left":r.x=i-n;break;case"right":r.x=i+s+n;break;case"top":r.y=o-n;break;case"bottom":r.y=o+a+n;break}return r}function Cs(e,t){let{point:n,x0:r,y0:i,view:o,width:s,height:a,margin:u}=e,{point:l,x0:f,y0:d,width:m,height:I,margin:C}=t,M=f+m,E=d+I,N=r+s,B=i+a,Z=o&&o.model.isElement(),$=r-u,te=N+u,p=i-u,y=B+u,D=f-C,S=M+C,_=d-C,j=E+C,[V,W]=Wm(e,t),oe=jR(V,{point:n,x0:r,y0:i,width:s,height:a},u),fe=jR(W,{point:l,x0:f,y0:d,width:m,height:I},C),{x:U,y:q}=oe,{x:Y,y:Q}=fe,Pe=(f+M)/2,Se=(d+E)/2,Et=(r+N)/2,jt=(i+B)/2,xe=(Et<Pe?N+f:M+r)/2,Te=(jt<Se?B+d:E+i)/2;if(V==="left"&&W==="right"){if($<=S){let ie=Te;return N<=f&&(E>=p&&Q<q?ie=Math.min(_,p):d<=y&&Q>=q&&(ie=Math.max(j,y))),[{x:U,y:q},{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}let se=(U+Y)/2;return[{x:se,y:q},{x:se,y:Q}]}else if(V==="right"&&W==="left"){if(te>=D){let ie=Te;return U>M&&(E>=p&&Q<q?ie=Math.min(_,p):d<=y&&Q>=q&&(ie=Math.max(j,y))),[{x:U,y:q},{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}let se=(U+Y)/2;return[{x:se,y:q},{x:se,y:Q}]}else if(V==="top"&&W==="bottom"){if(q<Q){let ie=xe,ge=q;return q<d&&(M>=$&&Y<U?ie=Math.min(D,$):f<=te&&Y>=U&&(ie=Math.max(S,te))),[{x:U,y:ge},{x:ie,y:ge},{x:ie,y:Q},{x:Y,y:Q}]}let se=(q+Q)/2;return[{x:U,y:se},{x:Y,y:se}]}else if(V==="bottom"&&W==="top"){if(q-u>Q){let ie=xe,ge=q;return q>E&&(M>=$&&Y<U?ie=Math.min(D,$):f<=te&&Y>=U&&(ie=Math.max(S,te))),[{x:U,y:ge},{x:ie,y:ge},{x:ie,y:Q},{x:Y,y:Q}]}let se=(q+Q)/2;return[{x:U,y:se},{x:Y,y:se}]}else if(V==="top"&&W==="top"){let se,ie=Math.min((B+d)/2,Q),ge=Math.min((i+E)/2,q);if(Q<q){if(U>=S||U<=D)return[{x:U,y:Math.min(q,Q)},{x:Y,y:Math.min(q,Q)}];Y>U?se=Math.min(U,D):se=Math.max(U,S)}else{if(Y>=te||Y<=$)return[{x:U,y:Math.min(q,Q)},{x:Y,y:Math.min(q,Q)}];Y>=U?se=Math.max(Y,te):se=Math.min(Y,$)}return[{x:U,y:ge},{x:se,y:ge},{x:se,y:ie},{x:Y,y:ie}]}else if(V==="bottom"&&W==="bottom"){let se,ie=Math.max((i+E)/2,Q),ge=Math.max((B+d)/2,q);if(Q>q){if(U>=S||U<=D)return[{x:U,y:Math.max(q,Q)},{x:Y,y:Math.max(q,Q)}];Y>U?se=Math.min(U,D):se=Math.max(U,S)}else{if(Y>=te||Y<=$)return[{x:U,y:Math.max(q,Q)},{x:Y,y:Math.max(q,Q)}];Y>=U?se=Math.max(Y,te):se=Math.min(Y,$)}return[{x:U,y:ge},{x:se,y:ge},{x:se,y:ie},{x:Y,y:ie}]}else if(V==="left"&&W==="left"){let se,ie=Math.min((N+f)/2,Y),ge=Math.min((r+M)/2,U);return Y>U?Q<=q?se=Math.min(p,Q):se=Math.max(y,Q):Q>=q?se=Math.min(_,q):se=Math.max(j,q),[{x:ge,y:q},{x:ge,y:se},{x:ie,y:se},{x:ie,y:Q}]}else if(V==="right"&&W==="right"){let se,ie=Math.max((r+M)/2,Y),ge=Math.max((N+f)/2,U);return Y<U?Q<=q?se=Math.min(p,Q):se=Math.max(y,Q):Q>=q?se=Math.min(_,q):se=Math.max(j,q),[{x:ge,y:q},{x:ge,y:se},{x:ie,y:se},{x:ie,y:Q}]}else if(V==="top"&&W==="right"){if(q>Q){if(U<Y){let ie=Te;return(ie>Se||!Z)&&ie<j&&U<f&&(ie=_),[{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}return[{x:U,y:Q}]}let se=Math.max(xe,S);if(Y<U&&Q>i&&Q<B)return[{x:U,y:q},{x:se,y:q},{x:se,y:Q}];if(se>$&&Q>i||f>N){let ie=Math.min(i-u,d-C),ge=Math.max(N+u,M+C);return[{x:U,y:ie},{x:ge,y:ie},{x:ge,y:Q}]}return[{x:U,y:q},{x:Math.max(se,Y),y:q},{x:Math.max(se,Y),y:Q}]}else if(V==="top"&&W==="left"){if(q>Q){if(U>Y){let ie=Te;return(ie>Se||!Z)&&ie<j&&U>M&&(ie=_),[{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}return[{x:U,y:Q}]}let se=Math.min(D,xe);if(U<Y&&B>=Q)return[{x:U,y:q},{x:se,y:q},{x:se,y:Q}];if(se<te&&q<E){let ie=Math.min(p,_),ge=Math.min($,D);return[{x:U,y:ie},{x:ge,y:ie},{x:ge,y:Q}]}return[{x:U,y:q},{x:se,y:q},{x:se,y:Q}]}else if(V==="bottom"&&W==="right"){if(q<Q){if(U<Y){let ie=Te;return(ie<Se||!Z)&&ie>_&&U<f&&(ie=j),[{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}return[{x:U,y:Q}]}else if(r<Y){let ie=Math.max(y,j),ge=Math.max(te,S);return[{x:U,y:ie},{x:ge,y:ie},{x:ge,y:Q}]}let se=xe;return[{x:U,y:q},{x:se,y:q},{x:se,y:Q}]}else if(V==="bottom"&&W==="left"){if(q<Q){if(U>Y){let ie=Te;return(ie<Se||!Z)&&ie>_&&U>M&&(ie=j),[{x:U,y:ie},{x:Y,y:ie},{x:Y,y:Q}]}return[{x:U,y:Q}]}else if(N>Y){let ie=Math.max(y,j),ge=Math.min($,D);return[{x:U,y:ie},{x:ge,y:ie},{x:ge,y:Q}]}let se=xe;return[{x:U,y:q},{x:se,y:q},{x:se,y:Q}]}else if(V==="left"&&W==="bottom"){if(U>=Y&&q>=j)return[{x:Y,y:q}];if(U>=M&&q<Q){let ge=xe;return[{x:ge,y:q},{x:ge,y:Q},{x:Y,y:Q}]}if(Y<N&&E<=i){let ge=Te;return[{x:U,y:q},{x:U,y:ge},{x:Y,y:ge}]}let se=Math.min(D,U),ie=Math.max(y,j);return[{x:se,y:q},{x:se,y:ie},{x:Y,y:ie}]}else if(V==="left"&&W==="top"){if(U>Y&&q<_)return[{x:Y,y:q}];if(U>=M&&q>Q){let ge=xe;return[{x:ge,y:q},{x:ge,y:Q},{x:Y,y:Q}]}if(Y<=N&&Q>q){let ge=Te;return[{x:U,y:q},{x:U,y:ge},{x:Y,y:ge}]}let se=Q<q?Math.min($,D):$,ie=Math.min(p,_);return[{x:se,y:q},{x:se,y:ie},{x:Y,y:ie}]}else if(V==="right"&&W==="top"){if(U<=Y&&q<_)return[{x:Y,y:q}];if(N<f&&q>Q){let ge=xe;return[{x:ge,y:q},{x:ge,y:Q},{x:Y,y:Q}]}if(Y<U&&d>B){let ge=Te;return[{x:U,y:q},{x:U,y:ge},{x:Y,y:ge}]}let se=Math.max(te,S),ie=Math.min(p,_);return[{x:se,y:q},{x:se,y:ie},{x:Y,y:ie}]}else if(V==="right"&&W==="bottom"){if(U<=Y&&q>=j)return[{x:Y,y:q}];if(U<=D&&q<Q){let ge=xe;return[{x:ge,y:q},{x:ge,y:Q},{x:Y,y:Q}]}if(Y>r&&E<i){let ge=Te;return[{x:U,y:q},{x:U,y:ge},{x:Y,y:ge}]}let se=Math.max(S,U),ie=Math.max(y,j);return[{x:se,y:q},{x:se,y:ie},{x:Y,y:ie}]}}function BR(e,t,n){let{sourceDirection:r=le.AUTO,targetDirection:i=le.AUTO}=t,o=t.margin||20,s=t.useVertices||!1,a=!!n.model.source().port,u=FR(n.sourceView,n.sourceAnchor,n.sourceBBox,r,a,n.sourceAnchor,o),l=!!n.model.target().port,f=FR(n.targetView,n.targetAnchor,n.targetBBox,i,l,n.targetAnchor,o),d=[];if(!s||e.length===0)return Zm(Cs(u,f));let m=e.map(M=>Kw(M)),[I]=m;if(u.view&&u.view.model.isElement()&&u.view.model.getBBox().inflate(o).containsPoint(I.point)){let[M]=Wm(u,I),E=M,N=Kw(u.point);N.margin=o,N.direction=M,I.direction=E,d.push(...Cs(N,I),I.point)}else{let M=m[1]||f,E=MU(u,I,M);I.direction=E,d.push(...Cs(u,I),I.point)}for(let M=0;M<m.length-1;M++){let E=m[M],N=m[M+1],B=new me(E.point,N.point),Z=af(B);if(Z%90===0){let p=Hm[Z],y=Ac[p];if(p!==E.direction)d.push(E.point,N.point),N.direction=y;else{let D=En(Z-90),S=0,_=0;D===90?_=-o:D===180?S=-o:D===270?_=o:D===0&&(S=o);let j={x:E.point.x+S,y:E.point.y+_},V={x:N.point.x+S,y:N.point.y+_},W=new me(N.point,V);N.direction=Hm[af(W)],d.push(E.point,j,V,N.point)}continue}let[$,te]=eb(E,N);E.direction=$,N.direction=te,d.push(...Cs(E,N),N.point)}let C=m[m.length-1];if(f.view&&f.view.model.isElement())if(f.view.model.getBBox().inflate(o).containsPoint(C.point)){let[M]=eb(C,f),E=Kw(f.point),[,N]=Wm(C,f);E.margin=o,E.direction=N,C.direction=M,d.push(...Cs(C,E))}else{let M=Zm(d),E=new me(M[M.length-2],C.point),N=Hm[Math.round(af(E))];C.direction=N;let B=Cs(C,f),[Z,$]=Zm([...B,f.point]),te=new me(Z,$),p=Math.round(af(te)),y=Hm[p];y!==N&&N===Ac[y]&&(C.margin=o,B=Cs(C,f)),d.push(...B)}else{let[M]=eb(C,f);C.direction=M,d.push(...Cs(C,f))}return Zm(d)}function eb(e,t){let n=e.direction,r=wU.includes(n),i=e.direction,o=t.direction;if(r){let s=e.point.y>t.point.y,a=t.point.x-e.point.x;n===le.BOTTOM?(i=s?Ac[n]:a>=0?le.RIGHT:le.LEFT,a>0?o=s?le.LEFT:le.TOP:a<0&&(o=s?le.RIGHT:le.TOP)):(i=s?a>=0?le.RIGHT:le.LEFT:Ac[n],a>0?o=s?le.BOTTOM:le.LEFT:a<0&&(o=s?le.BOTTOM:le.RIGHT))}else{let s=e.point.x>t.point.x,a=t.point.y-e.point.y;n===le.RIGHT?(i=s?Ac[n]:a>=0?le.BOTTOM:le.TOP,a>0?o=s?le.TOP:le.LEFT:a<0&&(o=s?le.BOTTOM:le.LEFT)):(i=s?a>=0?le.BOTTOM:le.TOP:Ac[n],a>0?o=s?le.RIGHT:le.TOP:a<0&&(o=s?le.RIGHT:le.BOTTOM))}return[i,o]}BR.Directions=le;var SU=BR;var qm={};Kt(qm,{curve:()=>rb,jumpover:()=>zU,normal:()=>GU,rounded:()=>ZU,smooth:()=>WU,straight:()=>uf});var wc={POINT:"point",CUBIC:"cubic",LINE:"line",GAP:"gap"},TU=Object.values(wc),NU=10,_U=1,uf=function(e,t,n=[],r={}){let{cornerType:i=wc.POINT,cornerRadius:o=NU,cornerPreserveAspectRatio:s=!1,precision:a=_U,raw:u=!1}=r;if(TU.indexOf(i)===-1)throw new Error("Invalid `cornerType` provided to `straight` connector.");let l;if(i===wc.POINT||!o){let f=[e].concat(n).concat([t]),d=new ft(f);l=new De(d)}else{l=new De,l.appendSegment(De.createSegment("M",e));let f,d=n.length;for(let m=0;m<d;m++){let I=new k(n[m]),C=n[m-1]||e,M=n[m+1]||t,E=f||I.distance(C)/2;f=I.distance(M)/2;let N,B;s?N=B=-Math.min(o,E,f):(N=-Math.min(o,E),B=-Math.min(o,f));let Z=I.clone().move(C,N).round(a),$=I.clone().move(M,B).round(a);switch(l.appendSegment(De.createSegment("L",Z)),i){case wc.CUBIC:{let te=.3333333333333333,p=2/3,y=new k(te*Z.x+p*I.x,p*I.y+te*Z.y),D=new k(te*$.x+p*I.x,p*I.y+te*$.y);l.appendSegment(De.createSegment("C",y,D,$));break}case wc.LINE:{l.appendSegment(De.createSegment("L",$));break}case wc.GAP:{l.appendSegment(De.createSegment("M",$));break}}}l.appendSegment(De.createSegment("L",t))}return u?l:l.serialize()};var RU=5,VR=["arc","gap","cubic"],OU=0,zR=1,PU=["smooth"],$m=1/3,Xm=2/3;function GR(e,t){let{x:n,y:r}=e,{x:i,y:o}=t;if(n>i){let s=n;n=i,i=s,s=r,r=o,o=s}if(r>o){let s=n;n=i,i=s,s=r,r=o,o=s}return[new k(n,r),new k(i,o)]}function kU(e,t){let[{x:n,y:r},{x:i,y:o}]=GR(e.start,e.end),[{x:s,y:a},{x:u,y:l}]=GR(t.start,t.end),f=n<=u&&s<=i,d=r<=l&&a<=o;return f&&d}function tb(e,t,n){var r=[].concat(e,n,t);return r.reduce(function(i,o,s){var a=r[s+1];return a!=null&&(i[s]=wo(o,a)),i},[])}function LU(e){var t=e.paper,n=t._jumpOverUpdateList;if(n==null){n=t._jumpOverUpdateList=[];var r=t.model;r.on("batch:stop",function(){this.hasActiveBatch()||FU(t)}),r.on("reset",function(){n=t._jumpOverUpdateList=[]})}n.indexOf(e)<0&&(n.push(e),e.listenToOnce(e.model,"change:connector remove",function(){n.splice(n.indexOf(e),1)}))}function FU(e){for(var t=e._jumpOverUpdateList,n=0;n<t.length;n++){let r=t[n],i=r.getFlag(r.constructor.Flags.CONNECTOR);r.requestUpdate(i)}}function jU(e,t){return Be(t).reduce(function(n,r){var i=e.intersection(r);return i&&n.push(i),n},[])}function UR(e,t){return wo(e,t).squaredLength()}function BU(e,t,n){return t.reduce(function(r,i,o){if(i.skip===!0)return r;var s=r.pop()||e,a=ku(i).move(s.start,-n),u=ku(i).move(s.start,+n),l=t[o+1];if(l!=null){var f=u.distance(l);f<=n&&(u=l.move(s.start,f),l.skip=!0)}else{var d=a.distance(s.end);if(d<n*2+zR)return r.push(s),r}var m=u.distance(s.start);if(m<n*2+zR)return r.push(s),r;var I=wo(a,u);return I.isJump=!0,r.push(wo(s.start,a),I,wo(u,s.end)),r},[])}function HR(e,t,n,r){var i=new De,o;return o=De.createSegment("M",e[0].start),i.appendSegment(o),Be(e).forEach(function(s,a){if(s.isJump){var u,l,f,d;if(n==="arc"){u=-90,l=s.start.difference(s.end);var m=+(l.x<0||l.x===0&&l.y<0);m&&(u+=180);var I=s.midpoint(),C=new me(I,s.end).rotate(I,u),M;M=new me(s.start,I),f=M.pointAt(2/3).rotate(s.start,u),d=C.pointAt(1/3).rotate(C.end,-u),o=De.createSegment("C",f,d,C.end),i.appendSegment(o),M=new me(I,s.end),f=C.pointAt(1/3).rotate(C.end,u),d=M.pointAt(1/3).rotate(s.end,-u),o=De.createSegment("C",f,d,s.end),i.appendSegment(o)}else if(n==="gap")o=De.createSegment("M",s.end),i.appendSegment(o);else if(n==="cubic"){u=s.start.theta(s.end);var E=t*.6,N=t*1.35;l=s.start.difference(s.end),m=+(l.x<0||l.x===0&&l.y<0),m&&(N*=-1),f=k(s.start.x+E,s.start.y+N).rotate(s.start,u),d=k(s.end.x-E,s.end.y+N).rotate(s.end,u),o=De.createSegment("C",f,d,s.end),i.appendSegment(o)}}else{var B=e[a+1];r==0||!B||B.isJump?(o=De.createSegment("L",s.end),i.appendSegment(o)):VU(r,i,s.end,s.start,B.end)}}),i}function VU(e,t,n,r,i){var o=n.distance(r)/2,s=n.distance(i)/2,a=-Math.min(e,o),u=-Math.min(e,s),l=n.clone().move(r,a).round(),f=n.clone().move(i,u).round(),d=new k($m*l.x+Xm*n.x,Xm*n.y+$m*l.y),m=new k($m*f.x+Xm*n.x,Xm*n.y+$m*f.y),I;I=De.createSegment("L",l),t.appendSegment(I),I=De.createSegment("C",d,m,f),t.appendSegment(I)}var zU=function(e,t,n,r){LU(this);var i=r.raw,o=r.size||RU,s=r.jump&&(""+r.jump).toLowerCase(),a=r.radius||OU,u=r.ignoreConnectors||PU;VR.indexOf(s)===-1&&(s=VR[0]);var l=this.paper,f=l.model,d=f.getLinks();if(d.length===1)return HR(tb(e,t,n),o,s,a);var m=this.model,I=d.indexOf(m),C=l.options.defaultConnector||{},M=d.filter(function(te,p){var y=te.get("connector")||C;return Be(u).includes(y.name)?!1:p>I?y.name!=="jumpover":!0}),E=M.map(function(te){return l.findViewByModel(te)}),N=tb(e,t,n),B=E.map(function(te){return te==null?[]:te===this?N:tb(te.sourcePoint,te.targetPoint,te.route)},this),Z=N.reduce(function(te,p){var y=M.reduce(function(D,S,_){if(S!==m){let j=B[_].slice(),V=j.findIndex(oe=>kU(p,oe));V>-1&&p.containsPoint(j[V].end)&&j.splice(V+1,1);let W=jU(p,j);D.push.apply(D,W)}return D},[]).sort(function(D,S){return UR(p.start,D)-UR(p.start,S)});return y.length>0?te.push.apply(te,BU(p,y,o)):te.push(p),te},[]),$=HR(Z,o,s,a);return i?$:$.serialize()};var GU=function(e,t,n=[],r={}){let{raw:i}=r;return uf(e,t,n,{cornerType:"point",raw:i})};var UU=10,HU=0,ZU=function(e,t,n=[],r={}){let{radius:i=UU,raw:o}=r;return uf(e,t,n,{cornerType:"cubic",cornerRadius:i,precision:HU,raw:o})};var WU=function(e,t,n,r){var i=r&&r.raw,o;if(n&&n.length!==0){var s=[e].concat(n).concat([t]),a=ht.throughPoints(s);o=new De(a)}else{o=new De;var u;if(u=De.createSegment("M",e),o.appendSegment(u),Math.abs(e.x-t.x)>=Math.abs(e.y-t.y)){var l=(e.x+t.x)/2;u=De.createSegment("C",l,e.y,l,t.y,t.x,t.y),o.appendSegment(u)}else{var f=(e.y+t.y)/2;u=De.createSegment("C",e.x,f,t.x,f,t.x,t.y),o.appendSegment(u)}}return i?o:o.serialize()};var hi={AUTO:"auto",HORIZONTAL:"horizontal",VERTICAL:"vertical",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},vr={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",AUTO:"auto",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},rb=function(e,t,n=[],r={},i){let o=!!r.raw,{direction:s=hi.AUTO,precision:a=3}=r,u={coeff:r.distanceCoefficient||.6,angleTangentCoefficient:r.angleTangentCoefficient||80,tau:r.tension||.5,sourceTangent:r.sourceTangent?new k(r.sourceTangent):null,targetTangent:r.targetTangent?new k(r.targetTangent):null,rotate:!!r.rotate};typeof r.sourceDirection=="string"?u.sourceDirection=r.sourceDirection:typeof r.sourceDirection=="number"?u.sourceDirection=new k(1,0).rotate(null,r.sourceDirection):u.sourceDirection=r.sourceDirection?new k(r.sourceDirection).normalize():null,typeof r.targetDirection=="string"?u.targetDirection=r.targetDirection:typeof r.targetDirection=="number"?u.targetDirection=new k(1,0).rotate(null,r.targetDirection):u.targetDirection=r.targetDirection?new k(r.targetDirection).normalize():null;let l=[e,...n,t].map(M=>new k(M)),f;if(u.sourceTangent)f=u.sourceTangent;else{let M=JU(i,l,s,u),E=l[0].distance(l[1])*u.coeff,N=l[1].difference(l[0]).normalize(),B=nb(M,N);if(B>Math.PI/4){let Z=E+(B-Math.PI/4)*u.angleTangentCoefficient;f=M.clone().scale(Z,Z)}else f=M.clone().scale(E,E)}let d;if(u.targetTangent)d=u.targetTangent;else{let M=QU(i,l,s,u),E=l.length-1,N=l[E-1].distance(l[E])*u.coeff,B=l[E-1].difference(l[E]).normalize(),Z=nb(M,B);if(Z>Math.PI/4){let $=N+(Z-Math.PI/4)*u.angleTangentCoefficient;d=M.clone().scale($,$)}else d=M.clone().scale(N,N)}let I=e5(l,f,d,u).map(M=>t5(M,u)),C=new De(I).round(a);return o?C:C.serialize()};rb.Directions=hi;rb.TangentDirections=vr;function YU(e,t,n){let{sourceBBox:r}=e,i,o;if(!e.sourceView)r.x>t[1].x?i="right":i="left";else if(o=e.sourceView.model.angle(),n.rotate&&o){let a=e.sourceView.getNodeUnrotatedBBox(e.sourceView.el),u=t[0].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[0]);let s;return i==="left"?s=new k(-1,0):s=new k(1,0),n.rotate&&o&&s.rotate(null,-o),s}function $U(e,t,n){let{targetBBox:r}=e,i,o;if(!e.targetView)r.x>t[t.length-2].x?i="left":i="right";else if(o=e.targetView.model.angle(),n.rotate&&o){let a=e.targetView.getNodeUnrotatedBBox(e.targetView.el),u=t[t.length-1].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[t.length-1]);let s;return i==="left"?s=new k(-1,0):s=new k(1,0),n.rotate&&o&&s.rotate(null,-o),s}function XU(e,t,n){let{sourceBBox:r}=e,i,o;if(!e.sourceView)r.y>t[1].y?i="bottom":i="top";else if(o=e.sourceView.model.angle(),n.rotate&&o){let a=e.sourceView.getNodeUnrotatedBBox(e.sourceView.el),u=t[0].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[0]);let s;return i==="top"?s=new k(0,-1):s=new k(0,1),n.rotate&&o&&s.rotate(null,-o),s}function qU(e,t,n){let{targetBBox:r}=e,i,o;if(!e.targetView)r.y>t[t.length-2].y?i="top":i="bottom";else if(o=e.targetView.model.angle(),n.rotate&&o){let a=e.targetView.getNodeUnrotatedBBox(e.targetView.el),u=t[t.length-1].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[t.length-1]);let s;return i==="top"?s=new k(0,-1):s=new k(0,1),n.rotate&&o&&s.rotate(null,-o),s}function ZR(e,t,n){let{sourceBBox:r}=e,i,o;if(!e.sourceView)i=r.sideNearestToPoint(t[1]);else if(o=e.sourceView.model.angle(),n.rotate&&o){let a=e.sourceView.getNodeUnrotatedBBox(e.sourceView.el),u=t[0].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[0]);let s;switch(i){case"top":s=new k(0,-1);break;case"bottom":s=new k(0,1);break;case"right":s=new k(1,0);break;case"left":s=new k(-1,0);break}return n.rotate&&o&&s.rotate(null,-o),s}function WR(e,t,n){let{targetBBox:r}=e,i,o;if(!e.targetView)i=r.sideNearestToPoint(t[t.length-2]);else if(o=e.targetView.model.angle(),n.rotate&&o){let a=e.targetView.getNodeUnrotatedBBox(e.targetView.el),u=t[t.length-1].clone();u.rotate(r.center(),o),i=a.sideNearestToPoint(u)}else i=r.sideNearestToPoint(t[t.length-1]);let s;switch(i){case"top":s=new k(0,-1);break;case"bottom":s=new k(0,1);break;case"right":s=new k(1,0);break;case"left":s=new k(-1,0);break}return n.rotate&&o&&s.rotate(null,-o),s}function YR(e,t,n){return t[1].difference(t[0]).normalize()}function $R(e,t,n){let r=t.length-1;return t[r-1].difference(t[r]).normalize()}function XR(e,t,n){let{sourceBBox:r}=e,i=r.center();return t[0].difference(i).normalize()}function qR(e,t,n){let{targetBBox:r}=e,i=r.center();return t[t.length-1].difference(i).normalize()}function JU(e,t,n,r){if(r.sourceDirection)switch(r.sourceDirection){case vr.UP:return new k(0,-1);case vr.DOWN:return new k(0,1);case vr.LEFT:return new k(-1,0);case vr.RIGHT:return new k(1,0);case vr.AUTO:return ZR(e,t,r);case vr.CLOSEST_POINT:return YR(e,t,r);case vr.OUTWARDS:return XR(e,t,r);default:return r.sourceDirection}switch(n){case hi.HORIZONTAL:return YU(e,t,r);case hi.VERTICAL:return XU(e,t,r);case hi.CLOSEST_POINT:return YR(e,t,r);case hi.OUTWARDS:return XR(e,t,r);case hi.AUTO:default:return ZR(e,t,r)}}function QU(e,t,n,r){if(r.targetDirection)switch(r.targetDirection){case vr.UP:return new k(0,-1);case vr.DOWN:return new k(0,1);case vr.LEFT:return new k(-1,0);case vr.RIGHT:return new k(1,0);case vr.AUTO:return WR(e,t,r);case vr.CLOSEST_POINT:return $R(e,t,r);case vr.OUTWARDS:return qR(e,t,r);default:return r.targetDirection}switch(n){case hi.HORIZONTAL:return $U(e,t,r);case hi.VERTICAL:return qU(e,t,r);case hi.CLOSEST_POINT:return $R(e,t,r);case hi.OUTWARDS:return qR(e,t,r);case hi.AUTO:default:return WR(e,t,r)}}function KU(e,t){let n=Math.cos(t),r=Math.sin(t),i=n*e.x-r*e.y,o=r*e.x+n*e.y;e.x=i,e.y=o}function nb(e,t){let n=e.dot(t)/(e.magnitude()*t.magnitude());return n<-1&&(n=-1),n>1&&(n=1),Math.acos(n)}function JR(e,t){return e.x*t.y-e.y*t.x}function e5(e,t,n,r){let{tau:i,coeff:o}=r,s=[],a=[],u=[],l=e.length-1;for(let f=0;f<l;f++)s[f]=e[f].distance(e[f+1]);a[0]=t,a[l]=n;for(let f=1;f<l;f++){let d,m;f===1?d=e[f-1].clone().offset(a[f-1].x,a[f-1].y):d=e[f-1].clone(),f===l-1?m=e[f+1].clone().offset(a[f+1].x,a[f+1].y):m=e[f+1].clone();let I=d.difference(e[f]).normalize(),C=m.difference(e[f]).normalize(),M=nb(I,C),E=(Math.PI-M)/2,N,B=JR(I,C),Z;Z=JR(e[f].difference(e[f+1]),e[f].difference(e[f-1])),B<0&&(E=-E),M<Math.PI/2&&(E<0&&Z<0||E>0&&Z>0)&&(E=E-Math.PI),N=C.clone(),KU(N,E);let $=N.clone(),te=N.clone(),p=s[f-1]*o,y=s[f]*o;$.scale(p,p),te.scale(y,y),a[f]=[$,te]}for(let f=0;f<l;f++){let d,m;f===0?d=e[f+1].difference(a[f].x/i,a[f].y/i):d=e[f+1].difference(a[f][1].x/i,a[f][1].y/i),f===l-1?m=e[f].clone().offset(a[f+1].x/i,a[f+1].y/i):m=e[f].difference(a[f+1][0].x/i,a[f+1][0].y/i),u[f]=[d,e[f],e[f+1],m]}return u}function t5(e,t){let{tau:n}=t,r=new k;r.x=e[1].x+(e[2].x-e[0].x)/(6*n),r.y=e[1].y+(e[2].y-e[0].y)/(6*n);let i=new k;return i.x=e[2].x+(e[3].x-e[1].x)/(6*n),i.y=e[2].y+(e[3].y-e[1].y)/(6*n),new ht(e[1],r,i,e[2])}var bc=Gi(fs(),1),ze={TOOLS:qe.Flags.TOOLS,RENDER:"RENDER",UPDATE:"UPDATE",LEGACY_TOOLS:"LEGACY_TOOLS",LABELS:"LABELS",VERTICES:"VERTICES",SOURCE:"SOURCE",TARGET:"TARGET",CONNECTOR:"CONNECTOR"},Pa=qe.extend({className:function(){var e=qe.prototype.className.apply(this).split(" ");return e.push("link"),e.join(" ")},options:{shortLinkLength:105,doubleLinkTools:!1,longLinkLength:155,linkToolsOffset:40,doubleLinkToolsOffset:65,sampleInterval:50},_labelCache:null,_labelSelectors:null,_markerCache:null,_V:null,_dragData:null,metrics:null,decimalsRounding:2,initialize:function(){qe.prototype.initialize.apply(this,arguments),this._labelCache={},this._labelSelectors={},this._markerCache={},this._V={},this.cleanNodesCache()},presentationAttributes:{markup:[ze.RENDER],attrs:[ze.UPDATE],router:[ze.UPDATE],connector:[ze.CONNECTOR],smooth:[ze.UPDATE],manhattan:[ze.UPDATE],toolMarkup:[ze.LEGACY_TOOLS],labels:[ze.LABELS],labelMarkup:[ze.LABELS],vertices:[ze.VERTICES,ze.UPDATE],vertexMarkup:[ze.VERTICES],source:[ze.SOURCE,ze.UPDATE],target:[ze.TARGET,ze.UPDATE]},initFlag:[ze.RENDER,ze.SOURCE,ze.TARGET,ze.TOOLS],UPDATE_PRIORITY:1,confirmUpdate:function(e,t){if(t||(t={}),this.hasFlag(e,ze.SOURCE)){if(!this.updateEndProperties("source"))return e;e=this.removeFlag(e,ze.SOURCE)}if(this.hasFlag(e,ze.TARGET)){if(!this.updateEndProperties("target"))return e;e=this.removeFlag(e,ze.TARGET)}let{paper:n,sourceView:r,targetView:i}=this;if(n&&(r&&!n.isViewMounted(r)||i&&!n.isViewMounted(i)))return e;if(this.hasFlag(e,ze.RENDER))return this.render(),this.updateHighlighters(!0),this.updateTools(t),e=this.removeFlag(e,[ze.RENDER,ze.UPDATE,ze.VERTICES,ze.LABELS,ze.TOOLS,ze.LEGACY_TOOLS,ze.CONNECTOR]),e;let o=!1;this.hasFlag(e,ze.VERTICES)&&(this.renderVertexMarkers(),e=this.removeFlag(e,ze.VERTICES));let{model:s}=this,{attributes:a}=s,u=this.hasFlag(e,ze.LABELS),l=this.hasFlag(e,ze.LEGACY_TOOLS);u&&(this.onLabelsChange(s,a.labels,t),e=this.removeFlag(e,ze.LABELS),o=!0),l&&(this.renderTools(),e=this.removeFlag(e,ze.LEGACY_TOOLS));let f=this.hasFlag(e,ze.UPDATE),d=this.hasFlag(e,ze.CONNECTOR);return(f||d)&&(f?t.translateBy&&s.isRelationshipEmbeddedIn(t.translateBy)?this.translate(t.tx,t.ty):this.update():(this.updatePath(),this.updateDOM()),this.updateTools(t),e=this.removeFlag(e,[ze.UPDATE,ze.TOOLS,ze.CONNECTOR]),u=!1,l=!1,o=!0),u&&this.updateLabelPositions(),l&&this.updateToolsPosition(),o&&this.updateHighlighters(),this.hasFlag(e,ze.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,ze.TOOLS)),e},requestConnectionUpdate:function(e){this.requestUpdate(this.getFlag(ze.UPDATE),e)},isLabelsRenderRequired:function(e={}){let t=this.model.previous("labels");if(!t)return!0;if("propertyPathArray"in e&&"propertyValue"in e){var n=e.propertyPathArray||[],r=n.length;if(r>1){var i=!!t[n[1]];if(i){if(r===2)return"markup"in Object(e.propertyValue);if(n[2]!=="markup")return!1}}}return!0},onLabelsChange:function(e,t,n){this.isLabelsRenderRequired(n)?this.renderLabels():this.updateLabels()},render:function(){return this.vel.empty(),this.unmountLabels(),this._V={},this.renderMarkup(),this.renderLabels(),this.update(),this},renderMarkup:function(){var e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.LinkView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if(typeof t=="string")return this.renderStringMarkup(t);throw new Error("dia.LinkView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el);this.selectors=t.selectors,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=ee(e);Array.isArray(t)||(t=[t]);for(var n=this._V,r=0,i=t.length;r<i;r++){var o=t[r],s=o.attr("class");s&&(s=q_(s),n[bc.default.camelCase(s)]=o)}this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),this.vel.append(t)},_getLabelMarkup:function(e){if(e){if(Array.isArray(e))return this.parseDOMJSON(e,null);if(typeof e=="string")return this._getLabelStringMarkup(e);throw new Error("dia.linkView: invalid label markup")}},_getLabelStringMarkup:function(e){var t=ee(e),n=document.createDocumentFragment();if(!Array.isArray(t))n.appendChild(t.node);else for(var r=0,i=t.length;r<i;r++){var o=t[r].node;n.appendChild(o)}return{fragment:n,selectors:{}}},_normalizeLabelMarkup:function(e){if(e){var t=e.fragment;if(!(e.fragment instanceof DocumentFragment)||!e.fragment.hasChildNodes())throw new Error("dia.LinkView: invalid label markup.");var n,r=t.childNodes;return r.length>1||r[0].nodeName.toUpperCase()!=="G"?n=ee("g").append(t):n=ee(r[0]),n.addClass("label"),{node:n.node,selectors:e.selectors}}},renderLabels:function(){var e=this._V,t=e.labels,n=this._labelCache={},r=this._labelSelectors={},i=this.model,o=i.attributes.labels||[],s=o.length;if(s===0)return t&&t.remove(),this;t?t.empty():(t=e.labels=ee("g").addClass("labels"),this.options.labelsLayer&&(t.addClass(Un(Ft(this,"className"))),t.attr("model-id",i.id)));for(var a=0;a<s;a++){var u=o[a],l=this._normalizeLabelMarkup(this._getLabelMarkup(u.markup)),f,d;if(l)f=l.node,d=l.selectors;else{var m=i._builtins.defaultLabel,I=this._normalizeLabelMarkup(this._getLabelMarkup(m.markup)),C=i._getDefaultLabel(),M=this._normalizeLabelMarkup(this._getLabelMarkup(C.markup)),E=M||I;f=E.node,d=E.selectors}f.setAttribute("label-idx",a),t.append(f),n[a]=f;var N=this.selector;if(d[N])throw new Error("dia.LinkView: ambiguous label root selector.");d[N]=f,r[a]=d}return t.parent()||this.mountLabels(),this.updateLabels(),this},mountLabels:function(){let{el:e,paper:t,model:n,_V:r,options:i}=this,{labels:o}=r;if(!o||!n.hasLabels())return;let{node:s}=o;i.labelsLayer?t.getLayerView(i.labelsLayer).insertSortedNode(s,n.get("z")):s.parentNode!==e&&e.appendChild(s)},unmountLabels:function(){let{options:e,_V:t}=this;if(!t)return;let{labels:n}=t;n&&e.labelsLayer&&n.remove()},findLabelNode:function(e,t){let n=this._labelCache[e];if(!n)return null;let r=this._labelSelectors[e],[i=null]=this.findBySelector(t,n,r);return i},_mergeLabelAttrs:function(e,t,n,r){return t===null?null:t===void 0?n===null?null:n===void 0?e?void 0:r:e?n:Ut({},r,n):e?Ut({},n,t):Ut({},r,n,t)},_mergeLabelSize:function(e,t){return e===null?null:e===void 0?t===null?null:t===void 0?void 0:t:Ut({},t,e)},updateLabels:function(){if(!this._V.labels)return this;for(var e=this.model,t=e.get("labels")||[],n=this.can("labelMove"),r=e._builtins.defaultLabel,i=r.attrs,o=e._getDefaultLabel(),s=o.markup,a=o.attrs,u=o.size,l=0,f=t.length;l<f;l++){var d=this._labelCache[l];d.setAttribute("cursor",n?"move":"default");var m=this._labelSelectors[l],I=t[l],C=I.markup,M=I.attrs,E=I.size,N=this._mergeLabelAttrs(C||s,M,a,i),B=this._mergeLabelSize(E,u);this.updateDOMSubtreeAttributes(d,N,{rootBBox:new de(B),selectors:m})}return this},renderTools:function(){if(!this._V.linkTools)return this;var e=(0,bc.default)(this._V.linkTools.node).empty(),t=tr(this.model.get("toolMarkup")||this.model.toolMarkup),n=ee(t());if(e.append(n.node),this._toolCache=n,this.options.doubleLinkTools){var r;this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup?(t=tr(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup),r=ee(t())):r=n.clone(),e.append(r.node),this._tool2Cache=r}return this},renderVertexMarkers:function(){if(!this._V.markerVertices)return this;var e=(0,bc.default)(this._V.markerVertices.node).empty(),t=tr(this.model.get("vertexMarkup")||this.model.vertexMarkup);return this.model.vertices().forEach(function(n,r){e.append(ee(t(Ae({idx:r},n))).node)}),this},renderArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;var e=(0,bc.default)(this._V.markerArrowheads.node);e.empty();var t=tr(this.model.get("arrowheadMarkup")||this.model.arrowheadMarkup);return this._V.sourceArrowhead=ee(t({end:"source"})),this._V.targetArrowhead=ee(t({end:"target"})),e.append(this._V.sourceArrowhead.node,this._V.targetArrowhead.node),this},removeRedundantLinearVertices:function(e){let n=this.model,r=n.vertices(),i=[this.sourceAnchor,...r,this.targetAnchor],o=i.length,s=new ft(i);s.simplify({threshold:.001});let a=s.points.map(l=>l.toJSON()),u=a.length;return o===u?0:(n.vertices(a.slice(1,u-1),e),o-u)},updateDefaultConnectionPath:function(){var e=this._V;e.connection&&e.connection.attr("d",this.getSerializedConnection()),e.connectionWrap&&e.connectionWrap.attr("d",this.getSerializedConnection()),e.markerSource&&e.markerTarget&&this._translateAndAutoOrientArrows(e.markerSource,e.markerTarget)},getEndView:function(e){switch(e){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error("dia.LinkView: type parameter required.")}},getEndAnchor:function(e){switch(e){case"source":return new k(this.sourceAnchor);case"target":return new k(this.targetAnchor);default:throw new Error("dia.LinkView: type parameter required.")}},getEndConnectionPoint:function(e){switch(e){case"source":return new k(this.sourcePoint);case"target":return new k(this.targetPoint);default:throw new Error("dia.LinkView: type parameter required.")}},getEndMagnet:function(e){switch(e){case"source":var t=this.sourceView;if(!t)break;return this.sourceMagnet||t.el;case"target":var n=this.targetView;if(!n)break;return this.targetMagnet||n.el;default:throw new Error("dia.LinkView: type parameter required.")}return null},update:function(){return this.updateRoute(),this.updatePath(),this.updateDOM(),this},translate:function(e=0,t=0){let{route:n,path:r}=this;if(!n||!r)return;let i=new ft(n);i.translate(e,t),this.route=i.points,this._translateConnectionPoints(e,t),r.translate(e,t),this.updateDOM()},updateDOM(){let{el:e,model:t,selectors:n}=this;this.cleanNodesCache(),this.updateDOMSubtreeAttributes(e,t.attr(),{selectors:n}),this.updateDefaultConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),this.options.perpendicular=null},updateRoute:function(){let{model:e}=this,t=e.vertices(),n=this.findAnchors(t),r=this.sourceAnchor=n.source,i=this.targetAnchor=n.target,o=this.findRoute(t);this.route=o;var s=this.findConnectionPoints(o,r,i);this.sourcePoint=s.source,this.targetPoint=s.target},updatePath:function(){let{route:e,sourcePoint:t,targetPoint:n}=this,r=this.findMarkerPoints(e,t,n),i=this.findPath(e,r.source||t,r.target||n);this.path=i},findMarkerPoints:function(e,t,n){var r=e[0],i=e[e.length-1],o=this._markerCache,s,a;return this._V.markerSource&&(o.sourceBBox=o.sourceBBox||this._V.markerSource.getBBox(),s=k(t).move(r||n,o.sourceBBox.width*this._V.markerSource.scale().sx*-1).round()),this._V.markerTarget&&(o.targetBBox=o.targetBBox||this._V.markerTarget.getBBox(),a=k(n).move(i||t,o.targetBBox.width*this._V.markerTarget.scale().sx*-1).round()),o.sourcePoint=s||t.clone(),o.targetPoint=a||n.clone(),{source:s,target:a}},findAnchorsOrdered:function(e,t,n,r){var i,o,s,a,u=this.model,l=u.get(e),f=u.get(n),d=this.getEndView(e),m=this.getEndView(n),I=this.getEndMagnet(e),C=this.getEndMagnet(n);d?(t?s=new k(t):m?s=C:s=new k(f),i=this.getAnchor(l.anchor,d,I,s,e)):i=new k(l),m?(a=new k(r||i),o=this.getAnchor(f.anchor,m,C,a,n)):o=new k(f);var M={};return M[e]=i,M[n]=o,M},findAnchors:function(e){var t=this.model,n=e[0],r=e[e.length-1];return t.target().priority&&!t.source().priority?this.findAnchorsOrdered("target",r,"source",n):this.findAnchorsOrdered("source",n,"target",r)},findConnectionPoints:function(e,t,n){var r=e[0],i=e[e.length-1],o=this.model,s=o.get("source"),a=o.get("target"),u=this.sourceView,l=this.targetView,f=this.paper.options,d,m,I;if(u&&!u.isNodeConnection(this.sourceMagnet)){d=this.sourceMagnet||u.el;var C=s.connectionPoint||f.defaultConnectionPoint,M=r||n,E=new me(M,t);I=this.getConnectionPoint(C,u,d,E,"source")}else I=t;var N;if(l&&!l.isNodeConnection(this.targetMagnet)){m=this.targetMagnet||l.el;var B=a.connectionPoint||f.defaultConnectionPoint,Z=i||t,$=new me(Z,n);N=this.getConnectionPoint(B,l,m,$,"target")}else N=n;return{source:I,target:N}},getAnchor:function(e,t,n,r,i){var o=t.isNodeConnection(n),s=this.paper.options;if(e||(o?e=s.defaultLinkAnchor:s.perpendicularLinks||this.options.perpendicular?e={name:"perpendicular"}:e=s.defaultAnchor),!e)throw new Error("Anchor required.");var a;if(typeof e=="function")a=e;else{var u=e.name,l=o?"linkAnchorNamespace":"anchorNamespace";if(a=s[l][u],typeof a!="function")throw new Error("Unknown anchor: "+u)}var f=a.call(this,t,n,r,e.args||{},i,this);return f?f.round(this.decimalsRounding):new k},getConnectionPoint:function(e,t,n,r,i){var o,s=r.end,a=this.paper.options;if(typeof a.linkConnectionPoint=="function"){var u=n===t.el?void 0:n;if(o=a.linkConnectionPoint(this,t,u,r.start,i),o)return o}if(!e)return s;var l;if(typeof e=="function")l=e;else{var f=e.name;if(l=a.connectionPointNamespace[f],typeof l!="function")throw new Error("Unknown connection point: "+f)}return o=l.call(this,r,t,n,e.args||{},i,this),o?o.round(this.decimalsRounding):s},_translateConnectionPoints:function(e,t){var n=this._markerCache;n.sourcePoint.offset(e,t),n.targetPoint.offset(e,t),this.sourcePoint.offset(e,t),this.targetPoint.offset(e,t),this.sourceAnchor.offset(e,t),this.targetAnchor.offset(e,t)},_getDefaultLabelPositionProperty:function(){var e=this.model,t=e._builtins.defaultLabel,n=t.position,r=e._getDefaultLabel(),i=this._normalizeLabelPosition(r.position);return Ut({},n,i)},_normalizeLabelPosition:function(e){return typeof e=="number"?{distance:e,offset:null,angle:0,args:null}:e},_mergeLabelPositionProperty:function(e,t){return e===null?null:e===void 0?t===null?null:t:Ut({},t,e)},updateLabelPositions:function(){if(!this._V.labels)return this;var e=this.path;if(!e)return this;var t=this.model,n=t.get("labels")||[];if(!n.length)return this;for(var r=this._getDefaultLabelPositionProperty(),i=0,o=n.length;i<o;i++){var s=this._labelCache[i];if(s){var a=n[i],u=this._normalizeLabelPosition(a.position),l=this._mergeLabelPositionProperty(u,r),f=this._getLabelTransformationMatrix(l);s.setAttribute("transform",ee.matrixToTransformString(f)),this._cleanLabelMatrices(i)}}return this},_cleanLabelMatrices:function(e){let{metrics:t,_labelSelectors:n}=this,r=n[e];if(r)for(let i in r){let{id:o}=r[i];o&&o in t&&delete t[o].magnetMatrix}},updateToolsPosition:function(){if(!this._V.linkTools)return this;var e="",t=this.options.linkToolsOffset,n=this.getConnectionLength();if(!Number.isNaN(n)){n<this.options.shortLinkLength&&(e="scale(.5)",t/=2);var r=this.getPointAtLength(t);if(this._toolCache.attr("transform","translate("+r.x+", "+r.y+") "+e),this.options.doubleLinkTools&&n>=this.options.longLinkLength){var i=this.options.doubleLinkToolsOffset||t;r=this.getPointAtLength(n-i),this._tool2Cache.attr("transform","translate("+r.x+", "+r.y+") "+e),this._tool2Cache.attr("display","inline")}else this.options.doubleLinkTools&&this._tool2Cache.attr("display","none")}return this},updateArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;if(bc.default.css(this._V.markerArrowheads.node,"display")==="none")return this;var e=this.getConnectionLength()<this.options.shortLinkLength?.5:1;return this._V.sourceArrowhead.scale(e),this._V.targetArrowhead.scale(e),this._translateAndAutoOrientArrows(this._V.sourceArrowhead,this._V.targetArrowhead),this},updateEndProperties:function(e){let{model:t,paper:n}=this,r=`${e}View`,i=t.get(e),o=i&&i.id;if(!o)return this[r]=null,this.updateEndMagnet(e),!0;let s=n.getModelById(o);if(!s)throw new Error("LinkView: invalid "+e+" cell.");let a=s.findView(n);return a?(this[r]=a,this.updateEndMagnet(e),!0):!1},updateEndMagnet:function(e){let t=`${e}Magnet`,n=this.getEndView(e);if(n){let r=n.getMagnetFromLinkEnd(this.model.get(e));r===n.el&&(r=null),this[t]=r}else this[t]=null},_translateAndAutoOrientArrows:function(e,t){var n=Be(this.route);e&&e.translateAndAutoOrient(this.sourcePoint,n[0]||this.targetPoint,this.paper.cells),t&&t.translateAndAutoOrient(this.targetPoint,n[n.length-1]||this.sourcePoint,this.paper.cells)},_getLabelPositionProperty:function(e){return this.model.label(e).position||{}},_getLabelPositionAngle:function(e){var t=this._getLabelPositionProperty(e);return t.angle||0},_getLabelPositionArgs:function(e){var t=this._getLabelPositionProperty(e);return t.args},_getDefaultLabelPositionArgs:function(){var e=this.model._getDefaultLabel(),t=e.position||{};return t.args},_mergeLabelPositionArgs:function(e,t){return e===null?null:e===void 0?t===null?null:t:Ut({},t,e)},addLabel:function(e,t,n,r){var i,o,s=0,a;typeof e!="number"?(i=e.x,o=e.y,typeof t=="number"?(s=t,a=n):a=t):(i=e,o=t,typeof n=="number"?(s=n,a=r):a=n);var u=this._getDefaultLabelPositionArgs(),l=a,f=this._mergeLabelPositionArgs(l,u),d={position:this.getLabelPosition(i,o,s,f)},m=-1;return this.model.insertLabel(m,d,a),m},addVertex:function(e,t,n){var r=typeof e!="number",i=r?e.x:e,o=r?e.y:t,s=r?t:n,a={x:i,y:o},u=this.getVertexIndex(i,o);return this.model.insertVertex(u,a,s),u},sendToken:function(e,t,n){function r(d,m){return function(){d.remove(),typeof m=="function"&&m()}}var i,o,s;Ke(t)?(i=t.duration,o=t.direction==="reverse",s=t.connection):(i=t,o=!1,s=null),i=i||1e3;var a={dur:i+"ms",repeatCount:1,calcMode:"linear",fill:"freeze"};o&&(a.keyPoints="1;0",a.keyTimes="0;1");var u=ee(e),l;if(typeof s=="string")l=this.findBySelector(s,this.el,this.selectors)[0];else{var f=this._V;l=f.connection?f.connection.node:this.el.querySelector("path")}if(!(l instanceof SVGPathElement))throw new Error("dia.LinkView: token animation requires a valid connection path.");u.appendTo(this.paper.cells).animateAlongPath(a,l),setTimeout(r(u,n),i)},findRoute:function(e){e||(e=[]);var t=this.paper.options.routerNamespace||Ym,n=this.model.router(),r=this.paper.options.defaultRouter;if(!n)if(r)n=r;else return e.map(k);var i=gt(n)?n:t[n.name];if(!gt(i))throw new Error('dia.LinkView: unknown router: "'+n.name+'".');var o=n.args||{},s=i.call(this,e,o,this);return s||e.map(k)},findPath:function(e,t,n){var r=this.paper.options.connectorNamespace||qm,i=this.model.connector(),o=this.paper.options.defaultConnector;i||(i=o||{});var s=gt(i)?i:r[i.name];if(!gt(s))throw new Error('dia.LinkView: unknown connector: "'+i.name+'".');var a=Zr(i.args||{});a.raw=!0;var u=s.call(this,t,n,e,a,this);return typeof u=="string"&&(u=new De(ee.normalizePathData(u))),u},getConnection:function(){var e=this.path;return e?e.clone():null},getSerializedConnection:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("data"))return t.data;var n=e.serialize();return t.data=n,n},getConnectionSubdivisions:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("segmentSubdivisions"))return t.segmentSubdivisions;var n=e.getSegmentSubdivisions();return t.segmentSubdivisions=n,n},getConnectionLength:function(){var e=this.path;if(!e)return 0;var t=this.metrics;if(t.hasOwnProperty("length"))return t.length;var n=e.length({segmentSubdivisions:this.getConnectionSubdivisions()});return t.length=n,n},getPointAtLength:function(e){var t=this.path;return t?t.pointAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getPointAtRatio:function(e){var t=this.path;return t?(pn(e)&&(e=parseFloat(e)/100),t.pointAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()})):null},getTangentAtLength:function(e){var t=this.path;return t?t.tangentAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getTangentAtRatio:function(e){var t=this.path;return t?t.tangentAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPoint:function(e){var t=this.path;return t?t.closestPoint(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointLength:function(e){var t=this.path;return t?t.closestPointLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointRatio:function(e){var t=this.path;return t?t.closestPointNormalizedLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getLabelPosition:function(e,t,n,r){var i={},o=0,s;typeof n=="number"?(o=n,s=r):s=n,s&&(i.args=s);var a=!(s&&s.absoluteDistance),u=s&&s.absoluteDistance&&s.reverseDistance,l=s&&s.absoluteOffset,f=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},m=new k(e,t),I=f.closestPointT(m,d),C=f.lengthAtT(I,d);a&&(C=C/this.getConnectionLength()||0),u&&(C=-1*(this.getConnectionLength()-C)||1),i.distance=C;var M;l||(M=f.tangentAtT(I));var E;if(M)E=M.pointOffset(m);else{var N=f.pointAtT(I),B=m.difference(N);E={x:B.x,y:B.y}}return i.offset=E,i.angle=o,i},_getLabelTransformationMatrix:function(e){var t,n=0,r={};if(typeof e=="number")t=e;else if(typeof e.distance=="number")r=e.args||{},t=e.distance,n=e.angle||0;else throw new Error("dia.LinkView: invalid label position distance.");var i=t>0&&t<=1,o=0,s={x:0,y:0};if(e.offset){var a=e.offset;typeof a=="number"&&(o=a),a.x&&(s.x=a.x),a.y&&(s.y=a.y)}var u=s.x!==0||s.y!==0||o===0,l=r.keepGradient,f=r.ensureLegibility,d=this.path,m={segmentSubdivisions:this.getConnectionSubdivisions()},I=i?t*this.getConnectionLength():t,C=d.tangentAtLength(I,m),M,E=n;if(C){if(u)M=C.start.clone(),M.offset(s);else{var N=C.clone();N.rotate(C.start,-90),N.setLength(o),M=N.end}l&&(E=C.angle()+n,f&&(E=En((E+90)%180-90)))}else M=d.start.clone(),u&&M.offset(s);return ee.createSVGMatrix().translate(M.x,M.y).rotate(E)},getLabelCoordinates:function(e){var t=this._getLabelTransformationMatrix(e);return new k(t.e,t.f)},getVertexIndex:function(e,t){for(var n=this.model,r=n.vertices(),i=this.getClosestPointLength(new k(e,t)),o=0,s=r.length;o<s;o++){var a=r[o],u=this.getClosestPointLength(a);if(i<u)break}return o},notifyPointerdown(e,t,n){qe.prototype.pointerdown.call(this,e,t,n),this.notify("link:pointerdown",e,t,n)},notifyPointermove(e,t,n){qe.prototype.pointermove.call(this,e,t,n),this.notify("link:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("link:pointerup",e,t,n),qe.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){qe.prototype.pointerdblclick.apply(this,arguments),this.notify("link:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){qe.prototype.pointerclick.apply(this,arguments),this.notify("link:pointerclick",e,t,n)},contextmenu:function(e,t,n){qe.prototype.contextmenu.apply(this,arguments),this.notify("link:contextmenu",e,t,n)},pointerdown:function(e,t,n){this.notifyPointerdown(e,t,n);var r=e.target.getAttribute("class");switch(r){case"marker-vertex":this.dragVertexStart(e,t,n);return;case"marker-vertex-remove":case"marker-vertex-remove-area":this.dragVertexRemoveStart(e,t,n);return;case"marker-arrowhead":this.dragArrowheadStart(e,t,n);return;case"connection":case"connection-wrap":this.dragConnectionStart(e,t,n);return;case"marker-source":case"marker-target":return}this.dragStart(e,t,n)},pointermove:function(e,t,n){var r=this._dragData;r&&this.eventData(e,r);var i=this.eventData(e);switch(i.action){case"vertex-move":this.dragVertex(e,t,n);break;case"label-move":this.dragLabel(e,t,n);break;case"arrowhead-move":this.dragArrowhead(e,t,n);break;case"move":this.drag(e,t,n);break}r&&Ae(r,this.eventData(e)),this.notifyPointermove(e,t,n)},pointerup:function(e,t,n){var r=this._dragData;r&&(this.eventData(e,r),this._dragData=null);var i=this.eventData(e);switch(i.action){case"vertex-move":this.dragVertexEnd(e,t,n);break;case"label-move":this.dragLabelEnd(e,t,n);break;case"arrowhead-move":this.dragArrowheadEnd(e,t,n);break;case"move":this.dragEnd(e,t,n)}this.notifyPointerup(e,t,n),this.checkMouseleave(e)},mouseover:function(e){qe.prototype.mouseover.apply(this,arguments),this.notify("link:mouseover",e)},mouseout:function(e){qe.prototype.mouseout.apply(this,arguments),this.notify("link:mouseout",e)},mouseenter:function(e){qe.prototype.mouseenter.apply(this,arguments),this.notify("link:mouseenter",e)},mouseleave:function(e){qe.prototype.mouseleave.apply(this,arguments),this.notify("link:mouseleave",e)},mousewheel:function(e,t,n,r){qe.prototype.mousewheel.apply(this,arguments),this.notify("link:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){var i=ee(e.target).findParentByClass("link-tool",this.el);if(i){if(e.stopPropagation(),this.can("useLinkTools"))if(t==="remove"){this.model.remove({ui:!0});return}else this.notify(t,e,n,r);this.notifyPointerdown(e,n,r),this.paper.delegateDragEvents(this,e.data)}else qe.prototype.onevent.apply(this,arguments)},onlabel:function(e,t,n){this.notifyPointerdown(e,t,n),this.dragLabelStart(e,t,n);var r=this.eventData(e).stopPropagation;r&&e.stopPropagation()},dragConnectionStart:function(e,t,n){if(this.can("vertexAdd")){var r=this.addVertex({x:t,y:n},{ui:!0});this.eventData(e,{action:"vertex-move",vertexIdx:r})}},dragLabelStart:function(e,t,n){if(this.can("labelMove")){if(this.isDefaultInteractionPrevented(e))return;var r=e.currentTarget,i=parseInt(r.getAttribute("label-idx"),10),o=this._getDefaultLabelPositionProperty(),s=this._normalizeLabelPosition(this._getLabelPositionProperty(i)),a=this._mergeLabelPositionProperty(s,o),u=this.getLabelCoordinates(a),l=u.x-t,f=u.y-n,d=this._getLabelPositionAngle(i),m=this._getLabelPositionArgs(i),I=this._getDefaultLabelPositionArgs(),C=this._mergeLabelPositionArgs(m,I);this.eventData(e,{action:"label-move",labelIdx:i,dx:l,dy:f,positionAngle:d,positionArgs:C,stopPropagation:!0})}else this.eventData(e,{stopPropagation:!0});this.paper.delegateDragEvents(this,e.data)},dragVertexStart:function(e,t,n){if(this.can("vertexMove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.eventData(e,{action:"vertex-move",vertexIdx:i})}},dragVertexRemoveStart:function(e,t,n){if(this.can("vertexRemove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.model.removeVertex(i)}},dragArrowheadStart:function(e,t,n){if(this.can("arrowheadMove")){var r=e.target,i=r.getAttribute("end"),o=this.startArrowheadMove(i,{ignoreBackwardsCompatibility:!0});this.eventData(e,o)}},dragStart:function(e,t,n){this.isDefaultInteractionPrevented(e)||this.can("linkMove")&&this.eventData(e,{action:"move",dx:t,dy:n})},dragLabel:function(e,t,n){var r=this.eventData(e),i={position:this.getLabelPosition(t+r.dx,n+r.dy,r.positionAngle,r.positionArgs)};this.paper.options.snapLabels&&delete i.position.offset;let o={ui:!0};this.paper.isAsync()&&e.type==="touchmove"&&(o.async=!1),this.model.label(r.labelIdx,i,o)},dragVertex:function(e,t,n){var r=this.eventData(e);this.model.vertex(r.vertexIdx,{x:t,y:n},{ui:!0})},dragArrowhead:function(e,t,n){this.paper.options.snapLinks?!this._snapArrowhead(e,t,n)&&this.paper.options.snapLinksSelf&&this._snapArrowheadSelf(e,t,n):this.paper.options.snapLinksSelf?this._snapArrowheadSelf(e,t,n):this._connectArrowhead(this.getEventTarget(e),t,n,this.eventData(e))},drag:function(e,t,n){var r=this.eventData(e);this.model.translate(t-r.dx,n-r.dy,{ui:!0}),this.eventData(e,{dx:t,dy:n})},dragLabelEnd:function(){},dragVertexEnd:function(){},dragArrowheadEnd:function(e,t,n){var r=this.eventData(e),i=this.paper;i.options.snapLinks?this._snapArrowheadEnd(r):this._connectArrowheadEnd(r,t,n),i.linkAllowed(this)?(this._finishEmbedding(r),this._notifyConnectEvent(r,e)):this._disallow(r),this._afterArrowheadMove(r)},dragEnd:function(){},_disallow:function(e){e.whenNotAllowed==="remove"?this.model.remove({ui:!0}):this.model.set(e.arrowhead,e.initialEnd,{ui:!0})},_finishEmbedding:function(e){this.paper.options.embeddingMode&&this.model.reparent()&&(e.z=null)},_notifyConnectEvent:function(e,t){var n=e.arrowhead,r=e.initialEnd,i=this.model.prop(n),o=i&&!Rt.endsEqual(r,i);if(o){var s=this.paper;r.id&&this.notify("link:disconnect",t,s.findViewByModel(r.id),e.initialMagnet,n),i.id&&this.notify("link:connect",t,s.findViewByModel(i.id),e.magnetUnderPointer,n)}},_snapToPoints:function(e,t,n){let r=null,i=1/0,o=null,s=1/0,a=e.x,u=e.y;for(let l=0;l<t.length;l++){let f=Math.abs(t[l].x-e.x);f<i&&(i=f,r=t[l]);let d=Math.abs(t[l].y-e.y);d<s&&(s=d,o=t[l])}return i<n&&(a=r.x),s<n&&(u=o.y),{x:a,y:u}},_snapArrowheadSelf:function(e,t,n){let{paper:r,model:i}=this,{snapLinksSelf:o}=r.options,s=this.eventData(e),a=o.radius||20,u=this.getEndAnchor(s.arrowhead==="source"?"target":"source"),l=i.vertices(),f=[u,...l],d=this._snapToPoints({x:t,y:n},f,a),m=r.localToClientPoint(d);this._connectArrowhead(document.elementFromPoint(m.x,m.y),d.x,d.y,this.eventData(e))},_snapArrowhead:function(e,t,n){let{paper:r}=this,{snapLinks:i,connectionStrategy:o}=r.options,s=this.eventData(e),a=!1;var u=i.radius||50,l=r.findViewsInArea({x:t-u,y:n-u,width:2*u,height:2*u}),f=s.closestView||null,d=s.closestMagnet||null,m=s.magnetProxy||null;s.closestView=s.closestMagnet=s.magnetProxy=null;var I=Number.MAX_VALUE,C=new k(t,n);l.forEach(function(te){let p=[];te.el.getAttribute("magnet")!=="false"&&p.push({bbox:te.model.getBBox(),magnet:te.el}),te.$("[magnet]").toArray().forEach(y=>{p.push({bbox:te.getNodeBBox(y),magnet:y})}),p.forEach(y=>{let{magnet:D,bbox:S}=y,_=S.center().squaredDistance(C);_<I&&(d===D||r.options.validateConnection.apply(r,s.validateConnectionArgs(te,te.el===D?null:D)))&&(I=_,s.closestView=te,s.closestMagnet=D)})},this);var M,E=null,N=s.closestView,B=s.closestMagnet;B&&(E=s.magnetProxy=N.findProxyNode(B,"highlighter"));var Z=s.arrowhead,$=d!==B;if(f&&$&&f.unhighlight(m,{connecting:!0,snapping:!0}),N){let{prevEnd:te,prevX:p,prevY:y}=s;if(s.prevX=t,s.prevY=n,a=!0,!$&&(typeof o!="function"||p===t&&y===n)||(M=N.getLinkEnd(B,t,n,this.model,Z),!$&&oo(te,M)))return a;s.prevEnd=M,$&&N.highlight(E,{connecting:!0,snapping:!0})}else M={x:t,y:n};return this.model.set(Z,M||{x:t,y:n},{ui:!0}),f&&this.notify("link:snap:disconnect",e,f,d,Z),N&&this.notify("link:snap:connect",e,N,B,Z),a},_snapArrowheadEnd:function(e){var t=e.closestView,n=e.closestMagnet;t&&n&&(t.unhighlight(e.magnetProxy,{connecting:!0,snapping:!0}),e.magnetUnderPointer=t.findMagnet(n)),e.closestView=e.closestMagnet=null},_connectArrowhead:function(e,t,n,r){let{paper:i,model:o}=this;if(r.eventTarget!==e){r.magnetProxy&&r.viewUnderPointer.unhighlight(r.magnetProxy,{connecting:!0});let s=r.viewUnderPointer=i.findView(e);if(s){let a=r.magnetUnderPointer=s.findMagnet(e),u=r.magnetProxy=s.findProxyNode(a,"highlighter");a&&this.paper.options.validateConnection.apply(i,r.validateConnectionArgs(s,a))?u&&s.highlight(u,{connecting:!0}):(r.magnetUnderPointer=null,r.magnetProxy=null)}else r.magnetUnderPointer=null,r.magnetProxy=null}r.eventTarget=e,o.set(r.arrowhead,{x:t,y:n},{ui:!0})},_connectArrowheadEnd:function(e={},t,n){let{model:r}=this,{viewUnderPointer:i,magnetUnderPointer:o,magnetProxy:s,arrowhead:a}=e;if(!o||!s||!i)return;i.unhighlight(s,{connecting:!0});let u=i.getLinkEnd(o,t,n,r,a);r.set(a,u,{ui:!0})},_beforeArrowheadMove:function(e){e.z=this.model.get("z"),this.model.toFront();var t=this.el.style;e.pointerEvents=t.pointerEvents,t.pointerEvents="none",this.paper.options.markAvailable&&this._markAvailableMagnets(e)},_afterArrowheadMove:function(e){e.z!==null&&(this.model.set("z",e.z,{ui:!0}),e.z=null),this.el.style.pointerEvents=e.pointerEvents,this.paper.options.markAvailable&&this._unmarkAvailableMagnets(e)},_createValidateConnectionArgs:function(e){var t=[];t[4]=e,t[5]=this;var n,r=0,i=0;e==="source"?(r=2,n="target"):(i=2,n="source");var o=this.model.get(n);if(o.id){var s=t[r]=this.paper.findViewByModel(o.id),a=s.getMagnetFromLinkEnd(o);a===s.el&&(a=void 0),t[r+1]=a}function u(l,f){return t[i]=l,t[i+1]=l.el===f?void 0:f,t}return u},_markAvailableMagnets:function(e){function t(d,m){var I=d.paper,C=I.options.validateConnection;return C.apply(I,this.validateConnectionArgs(d,m))}var n=this.paper,r=n.model.getCells();e.marked={};for(var i=0,o=r.length;i<o;i++){var s=r[i].findView(n);if(s){var a=Array.prototype.slice.call(s.el.querySelectorAll("[magnet]"));s.el.getAttribute("magnet")!=="false"&&a.push(s.el);var u=a.filter(t.bind(e,s));if(u.length>0){for(var l=0,f=u.length;l<f;l++)s.highlight(u[l],{magnetAvailability:!0});s.highlight(null,{elementAvailability:!0}),e.marked[s.model.id]=u}}}},_unmarkAvailableMagnets:function(e){for(var t=Object.keys(e.marked),n,r,i=0,o=t.length;i<o;i++){n=t[i],r=e.marked[n];var s=this.paper.findViewByModel(n);if(s){for(var a=0,u=r.length;a<u;a++)s.unhighlight(r[a],{magnetAvailability:!0});s.unhighlight(null,{elementAvailability:!0})}}e.marked=null},startArrowheadMove:function(e,t){t||(t={});var n={action:"arrowhead-move",arrowhead:e,whenNotAllowed:t.whenNotAllowed||"revert",initialMagnet:this[e+"Magnet"]||(this[e+"View"]?this[e+"View"].el:null),initialEnd:Zr(this.model.get(e)),validateConnectionArgs:this._createValidateConnectionArgs(e)};return this._beforeArrowheadMove(n),t.ignoreBackwardsCompatibility!==!0&&(this._dragData=n),n},onMount:function(){qe.prototype.onMount.apply(this,arguments),this.mountLabels()},onDetach:function(){qe.prototype.onDetach.apply(this,arguments),this.unmountLabels()},onRemove:function(){qe.prototype.onRemove.apply(this,arguments),this.unmountLabels()}},{Flags:ze});Object.defineProperty(Pa.prototype,"sourceBBox",{enumerable:!0,get:function(){var e=this.sourceView;if(!e){var t=this.model.source();return new de(t.x,t.y)}var n=this.sourceMagnet;return e.isNodeConnection(n)?new de(this.sourceAnchor):e.getNodeBBox(n||e.el)}});Object.defineProperty(Pa.prototype,"targetBBox",{enumerable:!0,get:function(){var e=this.targetView;if(!e){var t=this.model.target();return new de(t.x,t.y)}var n=this.targetMagnet;return e.isNodeConnection(n)?new de(this.targetAnchor):e.getNodeBBox(n||e.el)}});var Jm={};Kt(Jm,{addClass:()=>s5,list:()=>a5,mask:()=>i5,opacity:()=>o5,stroke:()=>n5});var n5=Nn.extend({tagName:"path",className:"highlight-stroke",attributes:{"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},options:{padding:3,rx:0,ry:0,useFirstSubpath:!1,attrs:{"stroke-width":3,stroke:"#FEB663"}},getPathData(e,t){let{options:n}=this,{useFirstSubpath:r}=n,i;try{let o=ee(t);if(i=o.convertToPathData().trim(),o.tagName()==="PATH"&&r){let s=i.search(/.M/i)+1;s>0&&(i=i.substr(0,s))}}catch{let s=e.getNodeBoundingRect(t);i=ee.rectToPath(Ae({},n,s.toJSON()))}return i},highlightConnection(e){this.vel.attr("d",e.getSerializedConnection())},highlightNode(e,t){let{vel:n,options:r}=this,{padding:i,layer:o}=r,s=this.getNodeMatrix(e,t);if(i){!o&&t===e.el&&n.remove();let a=e.getNodeBoundingRect(t),u=a.x+a.width/2,l=a.y+a.height/2;a=ee.transformRect(a,s);let f=Math.max(a.width,1),d=Math.max(a.height,1),m=(f+i)/f,I=(d+i)/d,C=ee.createSVGMatrix({a:m,b:0,c:0,d:I,e:u-m*u,f:l-I*l});s=s.multiply(C)}n.attr({d:this.getPathData(e,t),transform:ee.matrixToTransformString(s)})},highlight(e,t){let{vel:n,options:r}=this;n.attr(r.attrs),e.isNodeConnection(t)?this.highlightConnection(e):this.highlightNode(e,t)}});var QR=20;function r5(e,t){let n=e.children();for(;n.length>0;){let r=n.shift();t(r)&&n.push(...r.children())}}var i5=Nn.extend({tagName:"rect",className:"highlight-mask",attributes:{"pointer-events":"none"},options:{padding:3,maskClip:QR,deep:!1,attrs:{stroke:"#FEB663","stroke-width":3,"stroke-linecap":"butt","stroke-linejoin":"miter"}},VISIBLE:"white",INVISIBLE:"black",MASK_ROOT_ATTRIBUTE_BLACKLIST:["marker-start","marker-end","marker-mid","transform","stroke-dasharray","class"],MASK_CHILD_ATTRIBUTE_BLACKLIST:["stroke","fill","stroke-width","stroke-opacity","stroke-dasharray","fill-opacity","marker-start","marker-end","marker-mid","class"],MASK_REPLACE_TAGS:["FOREIGNOBJECT","IMAGE","USE","TEXT","TSPAN","TEXTPATH"],MASK_REMOVE_TAGS:["TEXT","TSPAN","TEXTPATH"],transformMaskChild(e,t){let{MASK_CHILD_ATTRIBUTE_BLACKLIST:n,MASK_REPLACE_TAGS:r,MASK_REMOVE_TAGS:i}=this,o=t.tagName();if(!ee.isSVGGraphicsElement(t)||i.includes(o))return t.remove(),!1;if(r.includes(o)){let s=e.vel.findOne(`#${t.id}`);if(s){let{node:a}=s,u=e.getNodeBoundingRect(a);e.model.isElement()&&(u=ee.transformRect(u,e.getNodeMatrix(a)));let l=ee("rect",u.toJSON()),{x:f,y:d}=u.center(),{angle:m,cx:I=f,cy:C=d}=s.rotate();m&&l.rotate(m,I,C),t.parent().append(l)}return t.remove(),!1}return n.forEach(s=>{s==="fill"&&t.attr("fill")==="none"||t.removeAttr(s)}),!0},transformMaskRoot(e,t){let{MASK_ROOT_ATTRIBUTE_BLACKLIST:n}=this;n.forEach(r=>{t.removeAttr(r)})},getMaskShape(e,t){let{options:n,MASK_REPLACE_TAGS:r}=this,{deep:i}=n,o=t.tagName(),s;if(o==="G"){if(!i)return null;s=t.clone(),r5(s,a=>this.transformMaskChild(e,a))}else{if(r.includes(o))return null;s=t.clone()}return this.transformMaskRoot(e,s),s},getMaskId(){return`highlight-mask-${this.cid}`},getMask(e,t){let{VISIBLE:n,INVISIBLE:r,options:i}=this,{padding:o,attrs:s}=i,a="stroke-width"in s?s["stroke-width"]:1,u=t.attr("fill")!=="none",l=parseFloat(t.attr("stroke-width"));isNaN(l)&&(l=1);let f=l+o*2,d=f+a*2,m=this.getMaskShape(e,t);if(!m){let I=e.getNodeBoundingRect(t.node);I.inflate(I.width?0:.5,I.height?0:.5),m=ee("rect",I.toJSON())}return m.attr(s),ee("mask",{id:this.getMaskId()}).append([m.clone().attr({fill:u?n:"none",stroke:n,"stroke-width":d}),m.clone().attr({fill:u?r:"none",stroke:r,"stroke-width":f})])},removeMask(e){let t=e.svg.getElementById(this.getMaskId());t&&e.defs.removeChild(t)},addMask(e,t){e.defs.appendChild(t.node)},highlight(e,t){let{options:n,vel:r}=this,{padding:i,attrs:o,maskClip:s=QR,layer:a}=n,u="stroke"in o?o.stroke:"#000000";!a&&t===e.el&&r.remove();let l=e.getNodeBoundingRect(t).inflate(i+s),f=this.getNodeMatrix(e,t),d=this.getMask(e,ee(t));this.addMask(e.paper,d),r.attr(l.toJSON()),r.attr({transform:ee.matrixToTransformString(f),mask:`url(#${d.id})`,fill:u})},unhighlight(e){this.removeMask(e.paper)}});var o5=Nn.extend({UPDATABLE:!1,MOUNTABLE:!1,opacityClassName:Un("highlight-opacity"),highlight:function(e,t){ee(t).addClass(this.opacityClassName)},unhighlight:function(e,t){ee(t).removeClass(this.opacityClassName)}});var KR=Un("highlighted"),s5=Nn.extend({UPDATABLE:!1,MOUNTABLE:!1,options:{className:KR},highlight:function(e,t){ee(t).addClass(this.options.className)},unhighlight:function(e,t){ee(t).removeClass(this.options.className)}},{className:KR});var ib={ROW:"row",COLUMN:"column"},a5=Nn.extend({tagName:"g",MOUNTABLE:!0,UPDATE_ATTRIBUTES:function(){return[this.options.attribute]},_prevItems:null,highlight(e,t){let n=e.model,{attribute:r,size:i=20,gap:o=5,direction:s=ib.ROW}=this.options;if(!r)throw new Error("List: attribute is required");let a=typeof i=="number"?{width:i,height:i}:i,u=s===ib.ROW,l=u?a.width:a.height,f=n.get(r);Array.isArray(f)||(f=[]);let d=this._prevItems||[],m=f.map((E,N)=>oo(d[N],f[N]));if(d.length!==f.length||m.some(E=>!E)){let E=this.vel.children(),N=f.map((B,Z)=>{let $=Z in E?E[Z].node:null;if(m[Z])return $;let te=this.createListItem(B,a,$);if(!te)return null;if(!(te instanceof SVGElement))throw new Error("List: item must be an SVGElement");te.dataset.index=Z,te.dataset.attribute=r;let p=Z*(l+o);return te.setAttribute("transform",u?`translate(${p}, 0)`:`translate(0, ${p})`),te});this.vel.empty().append(N),this._prevItems=f}let I=f.length,C=I===0?0:I*l+(I-1)*o,M=u?{width:C,height:a.height}:{width:a.width,height:C};this.position(n,M)},position(e,t){let{vel:n,options:r}=this,{margin:i=5,position:o="top-left"}=r,{width:s,height:a}=e.size(),{left:u,right:l,top:f,bottom:d}=Yr(i),m=new de(u,f,s-(u+l),a-(f+d)),{x:I,y:C}=tf(m,o);switch(o){case an.CENTER:case an.TOP:case an.BOTTOM:{I-=t.width/2;break}case an.RIGHT:case an.BOTTOM_RIGHT:case an.TOP_RIGHT:{I-=t.width;break}}switch(o){case an.CENTER:case an.RIGHT:case an.LEFT:{C-=t.height/2;break}case an.BOTTOM:case an.BOTTOM_RIGHT:case an.BOTTOM_LEFT:{C-=t.height;break}}n.attr("transform",`translate(${I}, ${C})`)}},{Directions:ib,Positions:an});var Qm={};Kt(Qm,{connectionClosest:()=>tO,connectionLength:()=>c5,connectionPerpendicular:()=>f5,connectionRatio:()=>u5,resolveRef:()=>Dc});function u5(e,t,n,r){var i="ratio"in r?r.ratio:.5;return e.getPointAtRatio(i)}function c5(e,t,n,r){var i="length"in r?r.length:20;return e.getPointAtLength(i)}function l5(e,t,n,r){var i=1e6,o=e.getConnection(),s=e.getConnectionSubdivisions(),a=new me(n.clone().offset(0,i),n.clone().offset(0,-i)),u=new me(n.clone().offset(i,0),n.clone().offset(-i,0)),l=a.intersect(o,{segmentSubdivisions:s}),f=u.intersect(o,{segmentSubdivisions:s}),d=[];return l&&Array.prototype.push.apply(d,l),f&&Array.prototype.push.apply(d,f),d.length>0?n.chooseClosest(d):"fallbackAt"in r?eO(e,r.fallbackAt):tO(e,t,n,r)}function d5(e,t,n,r){var i=e.getClosestPoint(n);return i||new k}function Dc(e){return function(t,n,r,i){if(r instanceof Element){var o=this.paper.findView(r),s;if(o)if(o.isNodeConnection(r)){var a="fixedAt"in i?i.fixedAt:"50%";s=eO(o,a)}else s=o.getNodeBBox(r).center();else s=new k;return e.call(this,t,n,s,i)}return e.apply(this,arguments)}}function eO(e,t){var n=parseFloat(t);return pn(t)?e.getPointAtRatio(n/100):e.getPointAtLength(n)}var f5=Dc(l5),tO=Dc(d5);var ev={};Kt(ev,{anchor:()=>y5,bbox:()=>I5,boundary:()=>A5,rectangle:()=>C5});function Km(e,t,n){if(_t(n)){let{x:i,y:o}=n;if(isFinite(o)){let s=new me(t,e),{start:a,end:u}=s.parallel(o);t=a,e=u}n=i}if(!isFinite(n))return e;var r=e.distance(t);return n===0&&r>0?e:e.move(t,-Math.min(n,r-1))}function ab(e){var t=e.getAttribute("stroke-width");return t===null?0:parseFloat(t)||0}function h5(e,t,n=0){let r,i,o,s,{start:a,end:u}=e;switch(t){case"left":r="x",i=u,o=a,s=-1;break;case"right":r="x",i=a,o=u,s=1;break;case"top":r="y",i=u,o=a,s=-1;break;case"bottom":r="y",i=a,o=u,s=1;break;default:return}a[r]<u[r]?i[r]=o[r]:o[r]=i[r],isFinite(n)&&(i[r]+=s*n,o[r]+=s*n)}function g5(e,t,n,r){let{offset:i,alignOffset:o,align:s}=r;return s&&h5(e,s,o),Km(e.end,e.start,i)}function nO(e,t,n,r){var i=t.getNodeBBox(n);r.stroke&&i.inflate(ab(n)/2);var o=e.intersect(i),s=o?e.start.chooseClosest(o):e.end;return Km(s,e.start,r.offset)}function p5(e,t,n,r){var i=t.model.angle();if(i===0)return nO(e,t,n,r);var o=t.getNodeUnrotatedBBox(n);r.stroke&&o.inflate(ab(n)/2);var s=o.center(),a=e.clone().rotate(s,i),u=a.setLength(1e6).intersect(o),l=u?a.start.chooseClosest(u).rotate(s,-i):e.end;return Km(l,e.start,r.offset)}function m5(e){if(!e)return null;var t=e;do{var n=t.tagName;if(typeof n!="string")return null;if(n=n.toUpperCase(),n==="G")t=t.firstElementChild;else if(n==="TITLE")t=t.nextElementSibling;else break}while(t);return t}var ob="segmentSubdivisons",sb="shapeBBox";function v5(e,t,n,r){var i,o,s=r.selector,a=e.end;if(typeof s=="string"?i=t.findBySelector(s)[0]:s===!1?i=n:Array.isArray(s)?i=So(n,s):i=m5(n),!ee.isSVGGraphicsElement(i)){if(i===n||!ee.isSVGGraphicsElement(n))return a;i=n}var u=t.getNodeShape(i),l=t.getNodeMatrix(i),f=t.getRootTranslateMatrix(),d=t.getRootRotateMatrix(),m=f.multiply(d).multiply(l),I=m.inverse(),C=ee.transformLine(e,I),M=C.start.clone(),E=t.getNodeData(i);if(r.insideout===!1){E[sb]||(E[sb]=u.bbox());var N=E[sb];if(N.containsPoint(M))return a}var B;if(u instanceof De){var Z=r.precision||2;E[ob]||(E[ob]=u.getSegmentSubdivisions({precision:Z})),B={precision:Z,segmentSubdivisions:E[ob]}}r.extrapolate===!0&&C.setLength(1e6),o=C.intersect(u,B),o?ee.isArray(o)&&(o=M.chooseClosest(o)):r.sticky===!0&&(u instanceof de?o=u.pointNearestToPoint(M):u instanceof wn?o=u.intersectionWithLineFromCenterToPoint(M):o=u.closestPoint(M,B));var $=o?ee.transformPoint(o,m):a,te=r.offset||0;return r.stroke&&(te+=ab(i)/2),Km($,e.start,te)}var y5=g5,I5=nO,C5=p5,A5=v5;var tv={};Kt(tv,{bottom:()=>M5,bottomLeft:()=>R5,bottomRight:()=>O5,center:()=>x5,left:()=>S5,midSide:()=>k5,modelCenter:()=>L5,perpendicular:()=>P5,right:()=>T5,top:()=>E5,topLeft:()=>N5,topRight:()=>_5});function To(e){return function(t,n,r,i){var o=!!i.rotate,s=o?t.getNodeUnrotatedBBox(n):t.getNodeBBox(n),a=s[e](),u=i.dx;if(u){var l=pn(u);u=parseFloat(u),isFinite(u)&&(l&&(u/=100,u*=s.width),a.x+=u)}var f=i.dy;if(f){var d=pn(f);f=parseFloat(f),isFinite(f)&&(d&&(f/=100,f*=s.height),a.y+=f)}return o?a.rotate(t.model.getBBox().center(),-t.model.angle()):a}}function w5(e,t,n,r){var i=e.model.angle(),o=e.getNodeBBox(t),s=o.center(),a=o.origin(),u=o.corner(),l=r.padding;if(isFinite(l)||(l=0),a.y+l<=n.y&&n.y<=u.y-l){var f=n.y-s.y;s.x+=i===0||i===180?0:f*1/Math.tan(ln(i)),s.y+=f}else if(a.x+l<=n.x&&n.x<=u.x-l){var d=n.x-s.x;s.y+=i===90||i===270?0:d*Math.tan(ln(i)),s.x+=d}return s}function b5(e,t,n,r){var i=!!r.rotate,o,s,a;i?(o=e.getNodeUnrotatedBBox(t),a=e.model.getBBox().center(),s=e.model.angle()):o=e.getNodeBBox(t);var u=r.padding;isFinite(u)&&o.inflate(u),i&&n.rotate(a,s);var l=o.sideNearestToPoint(n),f;switch(l){case"left":f=o.leftMiddle();break;case"right":f=o.rightMiddle();break;case"top":f=o.topMiddle();break;case"bottom":f=o.bottomMiddle();break}return i?f.rotate(a,-s):f}function D5(e,t,n,r,i){return e.model.getPointFromConnectedLink(this.model,i).offset(r.dx,r.dy)}var x5=To("center"),E5=To("topMiddle"),M5=To("bottomMiddle"),S5=To("leftMiddle"),T5=To("rightMiddle"),N5=To("origin"),_5=To("topRight"),R5=To("bottomLeft"),O5=To("corner"),P5=Dc(w5),k5=Dc(b5),L5=D5;var gi=Gi(fs(),1),sO=Gi(kd(),1),xc={NONE:"sorting-none",APPROX:"sorting-approximate",EXACT:"sorting-exact"},F5=50,rO=20,iO=1e3,j5=1/0,nv=9007199254740991,ub=qe.Highlighting,oO={[ub.DEFAULT]:{name:"stroke",options:{padding:3}},[ub.MAGNET_AVAILABILITY]:{name:"addClass",options:{className:"available-magnet"}},[ub.ELEMENT_AVAILABILITY]:{name:"addClass",options:{className:"available-cell"}}},B5=[{name:pr.BACK},{name:pr.CELLS},{name:pr.LABELS},{name:pr.FRONT},{name:pr.TOOLS}],V5=_r.extend({className:"paper",options:{width:800,height:600,origin:{x:0,y:0},gridSize:1,drawGrid:!1,drawGridSize:null,background:!1,perpendicularLinks:!1,elementView:qt,linkView:Pa,snapLabels:!1,snapLinks:!1,snapLinksSelf:!1,labelsLayer:!1,multiLinks:!0,guard:function(e,t){return!1},highlighting:oO,preventContextMenu:!0,preventDefaultBlankAction:!0,preventDefaultViewAction:!0,restrictTranslate:!1,markAvailable:!1,defaultLink:new Rt,defaultConnector:{name:"normal"},defaultRouter:{name:"normal"},defaultAnchor:{name:"center"},defaultLinkAnchor:{name:"connectionRatio"},defaultConnectionPoint:{name:"bbox"},connectionStrategy:null,validateMagnet:function(e,t,n){return t.getAttribute("magnet")!=="passive"},validateConnection:function(e,t,n,r,i,o){return(i==="target"?n:e)instanceof qt},embeddingMode:!1,validateEmbedding:function(e,t){return!0},validateUnembedding:function(e){return!0},findParentBy:"bbox",frontParentOnly:!0,interactive:{labelMove:!1},linkPinning:!0,allowLink:null,clickThreshold:0,moveThreshold:0,magnetThreshold:0,sorting:xc.EXACT,frozen:!1,autoFreeze:!1,onViewUpdate:function(e,t,n,r,i){t&(e.FLAG_INSERT|e.FLAG_REMOVE)||r.mounting||r.isolate||i.requestConnectedLinksUpdate(e,n,r)},onViewPostponed:function(e,t,n){return n.forcePostponedViewUpdate(e,t)},beforeRender:null,afterRender:null,viewport:null,cellViewNamespace:null,routerNamespace:null,connectorNamespace:null,highlighterNamespace:Jm,anchorNamespace:tv,linkAnchorNamespace:Qm,connectionPointNamespace:ev,overflow:!1},events:{dblclick:"pointerdblclick",dbltap:"pointerdblclick",contextmenu:"contextmenu",mousedown:"pointerdown",touchstart:"pointerdown",mouseover:"mouseover",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",wheel:"mousewheel","mouseenter .joint-cell":"mouseenter","mouseleave .joint-cell":"mouseleave","mouseenter .joint-tools":"mouseenter","mouseleave .joint-tools":"mouseleave","dblclick .joint-cell [magnet]":"magnetpointerdblclick","contextmenu .joint-cell [magnet]":"magnetcontextmenu","mousedown .joint-link .label":"onlabel","touchstart .joint-link .label":"onlabel","dragstart .joint-cell image":"onImageDragStart"},documentEvents:{mousemove:"pointermove",touchmove:"pointermove",mouseup:"pointerup",touchend:"pointerup",touchcancel:"pointerup"},svg:null,viewport:null,defs:null,tools:null,$background:null,layers:null,$grid:null,$document:null,_viewportMatrix:null,_viewportTransformString:null,_updates:null,_layers:null,SORT_DELAYING_BATCHES:["add","to-front","to-back"],UPDATE_DELAYING_BATCHES:["translate"],FORM_CONTROL_TAG_NAMES:["TEXTAREA","INPUT","BUTTON","SELECT","OPTION"],GUARDED_TAG_NAMES:["SELECT"],MIN_SCALE:1e-6,init:function(){let{options:e,el:t}=this;e.cellViewNamespace||(e.cellViewNamespace=typeof joint<"u"&&Nr(joint,"shapes")?joint.shapes:null);let n=this.model=e.model||new Lm;this._layers={},this.setGrid(e.drawGrid),this.cloneOptions(),this.render(),this._setDimensions(),this.startListening(),this._views={},this._mw_evt_buffer={event:null,deltas:[]},this.$document=(0,gi.default)(t.ownerDocument),this.resetViews(n.attributes.cells.models),!this.isFrozen()&&this.isAsync()&&this.updateViewsAsync()},_resetUpdates:function(){return this._updates={id:null,priorities:[{},{},{}],unmountedCids:[],mountedCids:[],unmounted:{},mounted:{},count:0,keyFrozen:!1,freezeKey:null,sort:!1,disabled:!1,idle:!1}},startListening:function(){var e=this.model;this.listenTo(e,"add",this.onCellAdded).listenTo(e,"remove",this.onCellRemoved).listenTo(e,"change",this.onCellChange).listenTo(e,"reset",this.onGraphReset).listenTo(e,"sort",this.onGraphSort).listenTo(e,"batch:stop",this.onGraphBatchStop),this.on("cell:highlight",this.onCellHighlight).on("cell:unhighlight",this.onCellUnhighlight).on("scale translate",this.update)},onCellAdded:function(e,t,n){var r=n.position;this.isAsync()||!bn(r)?this.renderView(e,n):(n.maxPosition===r&&this.freeze({key:"addCells"}),this.renderView(e,n),r===0&&this.unfreeze({key:"addCells"}))},onCellRemoved:function(e,t,n){let r=this.findViewByModel(e);r&&this.requestViewUpdate(r,r.FLAG_REMOVE,r.UPDATE_PRIORITY,n)},onCellChange:function(e,t){if(e!==this.model.attributes.cells&&e.hasChanged("z")&&this.options.sorting===xc.APPROX){let n=this.findViewByModel(e);n&&this.requestViewUpdate(n,n.FLAG_INSERT,n.UPDATE_PRIORITY,t)}},onGraphReset:function(e,t){this.resetLayers(),this.resetViews(e.models,t)},onGraphSort:function(){this.model.hasActiveBatch(this.SORT_DELAYING_BATCHES)||this.sortViews()},onGraphBatchStop:function(e){if(!this.isFrozen()){var t=e&&e.batchName,n=this.model;if(!this.isAsync()){var r=this.UPDATE_DELAYING_BATCHES;r.includes(t)&&!n.hasActiveBatch(r)&&this.updateViews(e)}var i=this.SORT_DELAYING_BATCHES;i.includes(t)&&!n.hasActiveBatch(i)&&this.sortViews()}},cloneOptions:function(){let{options:e}=this,{defaultConnector:t,defaultRouter:n,defaultConnectionPoint:r,defaultAnchor:i,defaultLinkAnchor:o,origin:s,highlighting:a,cellViewNamespace:u,interactive:l}=e;!u&&typeof joint<"u"&&Nr(joint,"shapes")&&(e.cellViewNamespace=joint.shapes),gt(t)||(e.defaultConnector=er(t)),gt(n)||(e.defaultRouter=er(n)),gt(r)||(e.defaultConnectionPoint=er(r)),gt(i)||(e.defaultAnchor=er(i)),gt(o)||(e.defaultLinkAnchor=er(o)),_t(l)&&(e.interactive=Ae({},l)),_t(a)&&(e.highlighting=Ta({},a,oO)),e.origin=Ae({},s)},children:function(){var e=ee.namespace;return[{namespaceURI:e.xhtml,tagName:"div",className:Un("paper-background"),selector:"background"},{namespaceURI:e.xhtml,tagName:"div",className:Un("paper-grid"),selector:"grid"},{namespaceURI:e.svg,tagName:"svg",attributes:{width:"100%",height:"100%","xmlns:xlink":e.xlink},selector:"svg",children:[{tagName:"defs",selector:"defs"},{tagName:"g",className:Un("layers"),selector:"layers"}]}]},hasLayerView(e){return e in this._layers},getLayerView(e){let{_layers:t}=this;if(e in t)return t[e];throw new Error(`dia.Paper: Unknown layer "${e}"`)},getLayerNode(e){return this.getLayerView(e).el},render:function(){this.renderChildren();let{childNodes:e,options:t}=this,{svg:n,defs:r,layers:i,background:o,grid:s}=e;return n.style.overflow=t.overflow?"visible":"hidden",this.svg=n,this.defs=r,this.layers=i,this.$background=(0,gi.default)(o),this.$grid=(0,gi.default)(s),this.renderLayers(),ee.ensureId(n),t.background&&this.drawBackground(t.background),t.drawGrid&&this.drawGrid(),this},renderLayers:function(e=B5){this.removeLayers(),e.forEach(({name:i,sorted:o})=>{let s=new Zw({name:i});this.layers.appendChild(s.el),this._layers[i]=s});let t=this.getLayerView(pr.CELLS),n=this.getLayerView(pr.TOOLS),r=this.getLayerView(pr.LABELS);this.tools=n.el,this.cells=this.viewport=t.el,t.vel.addClass(Un("viewport")),r.vel.addClass(Un("viewport"))},removeLayers:function(){let{_layers:e}=this;Object.keys(e).forEach(t=>{e[t].remove(),delete e[t]})},resetLayers:function(){let{_layers:e}=this;Object.keys(e).forEach(t=>{e[t].removePivots()})},update:function(){return this.options.drawGrid&&this.drawGrid(),this._background&&this.updateBackgroundImage(this._background),this},matrix:function(e){var t=this.layers;if(e===void 0){var n=t.getAttribute("transform");return(this._viewportTransformString||null)===n?e=this._viewportMatrix:(e=t.getCTM(),this._viewportMatrix=e,this._viewportTransformString=n),ee.createSVGMatrix(e)}e=ee.createSVGMatrix(e);var r=ee.matrixToTransformString(e);return t.setAttribute("transform",r),this._viewportMatrix=e,this._viewportTransformString=t.getAttribute("transform"),this},clientMatrix:function(){return ee.createSVGMatrix(this.cells.getScreenCTM())},requestConnectedLinksUpdate:function(e,t,n){if(e instanceof qe)for(var r=e.model,i=this.model.getConnectedLinks(r),o=0,s=i.length;o<s;o++){var a=i[o],u=this.findViewByModel(a);if(u){var l=["UPDATE"];a.getTargetCell()===r&&l.push("TARGET"),a.getSourceCell()===r&&l.push("SOURCE");var f=Math.max(t+1,u.UPDATE_PRIORITY);this.scheduleViewUpdate(u,u.getFlag(l),f,n)}}},forcePostponedViewUpdate:function(e,t){if(!e||!(e instanceof qe))return!1;var n=e.model;if(n.isElement())return!1;if((t&e.getFlag(["SOURCE","TARGET"]))===0){var r={silent:!0},i=0,o=this.findViewByModel(n.getSourceCell());o&&!this.isViewMounted(o)&&(i=this.dumpView(o,r),e.updateEndMagnet("source"));var s=0,a=this.findViewByModel(n.getTargetCell());if(a&&!this.isViewMounted(a)&&(s=this.dumpView(a,r),e.updateEndMagnet("target")),i===0&&s===0)return!this.dumpView(e,r)}return!1},requestViewUpdate:function(e,t,n,r){r||(r={}),this.scheduleViewUpdate(e,t,n,r);var i=this.isAsync();if(!(this.isFrozen()||i&&r.async!==!1)&&!this.model.hasActiveBatch(this.UPDATE_DELAYING_BATCHES)){var o=this.updateViews(r);i&&this.notifyAfterRender(o,r)}},scheduleViewUpdate:function(e,t,n,r){let{_updates:i,options:o}=this;i.idle&&o.autoFreeze&&(i.idle=!1,this.unfreeze());let{FLAG_REMOVE:s,FLAG_INSERT:a,UPDATE_PRIORITY:u,cid:l}=e,f=i.priorities[n];if(f||(f=i.priorities[n]={}),n>u)for(let I=n-1;I>=u;I--){let C=i.priorities[I];!C||!(l in C)||(f[l]|=C[l],delete C[l])}let d=f[l]||0;if((d&t)===t)return;d||i.count++,t&s&&d&a?f[l]^=a:t&a&&d&s&&(f[l]^=s),f[l]|=t;let m=o.onViewUpdate;typeof m=="function"&&m.call(this,e,t,n,r||{},this)},dumpViewUpdate:function(e){if(!e)return 0;var t=this._updates,n=e.cid,r=t.priorities[e.UPDATE_PRIORITY],i=this.registerMountedView(e)|r[n];return delete r[n],i},dumpView:function(e,t={}){let n=this.dumpViewUpdate(e);if(!n)return 0;let r=!t.silent;r&&this.notifyBeforeRender(t);let i=this.updateView(e,n,t);if(r){let o={updated:1,priority:e.UPDATE_PRIORITY};this.notifyAfterRender(o,t)}return i},updateView:function(e,t,n){if(!e)return 0;let{FLAG_REMOVE:r,FLAG_INSERT:i,FLAG_INIT:o,model:s}=e;if(e instanceof qe){if(t&r)return this.removeView(s),0;if(t&i){let a=!!(t&o);a&&(t^=o),this.insertView(e,a),t^=i}}return t?e.confirmUpdate(t,n||{}):0},requireView:function(e,t){var n=this.findViewByModel(e);return n?(this.dumpView(n,t),n):null},registerUnmountedView:function(e){var t=e.cid,n=this._updates;if(t in n.unmounted)return 0;var r=n.unmounted[t]|=e.FLAG_INSERT;return n.unmountedCids.push(t),delete n.mounted[t],r},registerMountedView:function(e){var t=e.cid,n=this._updates;if(t in n.mounted)return 0;n.mounted[t]=!0,n.mountedCids.push(t);var r=n.unmounted[t]||0;return delete n.unmounted[t],r},isViewMounted:function(e){if(!e)return!1;var t=e.cid,n=this._updates;return t in n.mounted},dumpViews:function(e){var t=Gn({},e,{viewport:null});this.checkViewport(t),this.updateViews(t)},updateViews:function(e){this.notifyBeforeRender(e);let t,n=0,r=0,i=nv;do r++,t=this.updateViewsBatch(e),n+=t.updated,i=Math.min(t.priority,i);while(!t.empty);let o={updated:n,batches:r,priority:i};return this.notifyAfterRender(o,e),o},hasScheduledUpdates:function(){let e=this._updates.priorities,t=Object.keys(e),n=t.length;for(;n>0&&n--;)for(let r in e[t[n]])return!0;return!1},updateViewsAsync:function(e,t){e||(e={}),t||(t={processed:0,priority:nv});let{_updates:n,options:r}=this,i=n.id;if(i){Qd(i),t.processed===0&&this.hasScheduledUpdates()&&this.notifyBeforeRender(e);let o=this.updateViewsBatch(e),s=Gn({},e,{mountBatchSize:iO-o.mounted,unmountBatchSize:iO-o.unmounted}),a=this.checkViewport(s),u=a.unmounted,l=a.mounted,f=t.processed,d=n.count;o.updated>0?(f+=o.updated+o.unmounted,o.processed=f,t.priority=Math.min(o.priority,t.priority),o.empty&&l===0?(o.unmounted+=u,o.mounted+=l,o.priority=t.priority,this.notifyAfterRender(o,e),t.processed=0,t.priority=nv,n.count=0):t.processed=f):n.idle||r.autoFreeze&&(this.freeze(),n.idle=!0,this.trigger("render:idle",e));let m=e.progress;if(d&&typeof m=="function"&&m.call(this,o.empty,f,d,o,this),n.id!==i)return}if(n.disabled)throw new Error("dia.Paper: can not unfreeze the paper after it was removed");n.id=Jd(this.updateViewsAsync,this,e,t)},notifyBeforeRender:function(e={}){let t=e.beforeRender;typeof t!="function"&&(t=this.options.beforeRender,typeof t!="function")||t.call(this,e,this)},notifyAfterRender:function(e,t={}){let n=t.afterRender;typeof n!="function"&&(n=this.options.afterRender),typeof n=="function"&&n.call(this,e,t,this),this.trigger("render:done",e,t)},updateViewsBatch:function(e){e||(e={});var t=e.batchSize||j5,n=this._updates,r=0,i=0,o=0,s=0,a=nv,u=!0,l=this.options,f=n.priorities,d="viewport"in e?e.viewport:l.viewport;typeof d!="function"&&(d=null);var m=l.onViewPostponed;typeof m!="function"&&(m=null);var I=Object.keys(f);e:for(var C=0,M=I.length;C<M;C++){var E=+I[C],N=f[E];for(var B in N){if(r>=t){u=!1;break e}var Z=Is[B];if(!Z){delete N[B];continue}var $=N[B];if(($&Z.FLAG_REMOVE)===0){var te=B in n.unmounted;if(Z.DETACHABLE&&d&&!d.call(this,Z,!te,this)){te||(this.registerUnmountedView(Z),this.detachView(Z)),n.unmounted[B]|=$,delete N[B],o++;continue}te&&($|=Z.FLAG_INSERT,s++),$|=this.registerMountedView(Z)}var p=this.updateView(Z,$,e);if(p>0&&(N[B]=p,!m||!m.call(this,Z,p,this)||N[B])){i++,u=!1;continue}a>E&&(a=E),r++,delete N[B]}}return{priority:a,updated:r,postponed:i,unmounted:o,mounted:s,empty:u}},getUnmountedViews:function(){let e=this._updates,t=Object.keys(e.unmounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=Is[t[i]];return r},getMountedViews:function(){let e=this._updates,t=Object.keys(e.mounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=Is[t[i]];return r},checkUnmountedViews:function(e,t){t||(t={});var n=0;typeof e!="function"&&(e=null);for(var r=("mountBatchSize"in t)?t.mountBatchSize:1/0,i=this._updates,o=i.unmountedCids,s=i.unmounted,a=0,u=Math.min(o.length,r);a<u;a++){var l=o[a];if(l in s){var f=Is[l];if(f){if(f.DETACHABLE&&e&&!e.call(this,f,!1,this)){o.push(l);continue}n++;var d=this.registerMountedView(f);d&&this.scheduleViewUpdate(f,d,f.UPDATE_PRIORITY,{mounting:!0})}}}return o.splice(0,a),n},checkMountedViews:function(e,t){t||(t={});var n=0;if(typeof e!="function")return n;for(var r=("unmountBatchSize"in t)?t.unmountBatchSize:1/0,i=this._updates,o=i.mountedCids,s=i.mounted,a=0,u=Math.min(o.length,r);a<u;a++){var l=o[a];if(l in s){var f=Is[l];if(f){if(!f.DETACHABLE||e.call(this,f,!0,this)){o.push(l);continue}n++;var d=this.registerUnmountedView(f);d&&this.detachView(f)}}}return o.splice(0,a),n},checkViewVisibility:function(e,t={}){let n="viewport"in t?t.viewport:this.options.viewport;typeof n!="function"&&(n=null);let r=this._updates,{mounted:i,unmounted:o}=r,s=!e.DETACHABLE||!n||n.call(this,e,!1,this),a=!1,u=!1;if(e.cid in i&&!s){this.registerUnmountedView(e)&&this.detachView(e);let d=r.mountedCids.indexOf(e.cid);r.mountedCids.splice(d,1),a=!0}if(!a&&e.cid in o&&s){let f=r.unmountedCids.indexOf(e.cid);r.unmountedCids.splice(f,1);var l=this.registerMountedView(e);l&&this.scheduleViewUpdate(e,l,e.UPDATE_PRIORITY,{mounting:!0}),u=!0}return{mounted:u?1:0,unmounted:a?1:0}},checkViewport:function(e){var t=Gn({},e,{mountBatchSize:1/0,unmountBatchSize:1/0}),n="viewport"in t?t.viewport:this.options.viewport,r=this.checkMountedViews(n,t);if(r>0){var i=this._updates.unmountedCids;t.mountBatchSize=Math.min(i.length-r,t.mountBatchSize)}var o=this.checkUnmountedViews(n,t);return{mounted:o,unmounted:r}},freeze:function(e){e||(e={});var t=this._updates,n=e.key,r=this.options.frozen,i=t.freezeKey;if(n&&n!==i){if(r&&i)return;t.freezeKey=n,t.keyFrozen=r}this.options.frozen=!0;var o=t.id;t.id=null,this.isAsync()&&o&&Qd(o)},unfreeze:function(e){e||(e={});var t=this._updates,n=e.key,r=t.freezeKey;n&&r&&n!==r||(t.freezeKey=null,!(n&&n===r&&t.keyFrozen)&&(this.isAsync()?(this.freeze(),this.updateViewsAsync(e)):this.updateViews(e),this.options.frozen=t.keyFrozen=!1,t.sort&&(this.sortViews(),t.sort=!1)))},isAsync:function(){return!!this.options.async},isFrozen:function(){return!!this.options.frozen},isExactSorting:function(){return this.options.sorting===xc.EXACT},onRemove:function(){this.freeze(),this._updates.disabled=!0,this.removeLayers(),this.removeViews()},getComputedSize:function(){var e=this.options,t=e.width,n=e.height;return bn(t)||(t=this.el.clientWidth),bn(n)||(n=this.el.clientHeight),{width:t,height:n}},setDimensions:function(e,t){let{options:n}=this,{width:r,height:i}=n,o=e===void 0?r:e,s=t===void 0?i:t;if(r===o&&i===s)return;n.width=o,n.height=s,this._setDimensions();let a=this.getComputedSize();this.trigger("resize",a.width,a.height)},_setDimensions:function(){let{options:e}=this,t=e.width,n=e.height;bn(t)&&(t=Math.round(t)),bn(n)&&(n=Math.round(n)),this.$el.css({width:t===null?"":t,height:n===null?"":n})},setOrigin:function(e,t){return this.translate(e||0,t||0)},fitToContent:function(e,t,n,r){Ke(e)?r=e:r=Ae({gridWidth:e,gridHeight:t,padding:n},r);let{x:i,y:o,width:s,height:a}=this.getFitToContentArea(r),{sx:u,sy:l}=this.scale();return this.setOrigin(-i*u,-o*l),this.setDimensions(s*u,a*l),new de(i,o,s,a)},getFitToContentArea:function(e={}){let t=e.gridWidth||1,n=e.gridHeight||1,r=Yr(e.padding||0),i=Math.max(e.minWidth||0,t),o=Math.max(e.minHeight||0,n),s=e.maxWidth||Number.MAX_VALUE,a=e.maxHeight||Number.MAX_VALUE,u=e.allowNewOrigin,l="contentArea"in e?new de(e.contentArea):this.getContentArea(e),{sx:f,sy:d}=this.scale();l.x*=f,l.y*=d,l.width*=f,l.height*=d;let m=Math.ceil((l.width+l.x)/t),I=Math.ceil((l.height+l.y)/n);e.allowNegativeBottomRight||(m=Math.max(m,1),I=Math.max(I,1)),m*=t,I*=n;let C=0;(u==="negative"&&l.x<0||u==="positive"&&l.x>=0||u==="any")&&(C=Math.ceil(-l.x/t)*t,C+=r.left,m+=C);let M=0;return(u==="negative"&&l.y<0||u==="positive"&&l.y>=0||u==="any")&&(M=Math.ceil(-l.y/n)*n,M+=r.top,I+=M),m+=r.right,I+=r.bottom,m=Math.max(m,i),I=Math.max(I,o),m=Math.min(m,s),I=Math.min(I,a),new de(-C/f,-M/d,m/f,I/d)},transformToFitContent:function(e){e||(e={});let t,n;if("contentArea"in e){let E=e.contentArea;t=this.localToPaperRect(E),n=new k(E)}else t=this.getContentBBox(e),n=this.paperToLocalPoint(t);if(!t.width||!t.height)return;Gn(e,{padding:0,preserveAspectRatio:!0,scaleGrid:null,minScale:0,maxScale:Number.MAX_VALUE,verticalAlign:"top",horizontalAlign:"left"});let r=Yr(e.padding),i=e.minScaleX||e.minScale,o=e.maxScaleX||e.maxScale,s=e.minScaleY||e.minScale,a=e.maxScaleY||e.maxScale,u;if(e.fittingBBox)u=e.fittingBBox;else{let E=this.translate(),N=this.getComputedSize();u={x:E.tx,y:E.ty,width:N.width,height:N.height}}u=new de(u).moveAndExpand({x:r.left,y:r.top,width:-r.left-r.right,height:-r.top-r.bottom});let l=this.scale(),f=u.width/t.width*l.sx,d=u.height/t.height*l.sy;if(e.preserveAspectRatio&&(f=d=Math.min(f,d)),e.scaleGrid){let E=e.scaleGrid;f=E*Math.floor(f/E),d=E*Math.floor(d/E)}f=Math.min(o,Math.max(i,f)),d=Math.min(a,Math.max(s,d));let m={x:f/l.sx,y:d/l.sy},I=this.options.origin,C=u.x-n.x*f-I.x,M=u.y-n.y*d-I.y;switch(e.verticalAlign){case"middle":M=M+(u.height-t.height*m.y)/2;break;case"bottom":M=M+(u.height-t.height*m.y);break;default:break}switch(e.horizontalAlign){case"middle":C=C+(u.width-t.width*m.x)/2;break;case"right":C=C+(u.width-t.width*m.x);break;default:break}this.scale(f,d),this.translate(C,M)},scaleContentToFit:function(e){this.transformToFitContent(e)},getContentArea:function(e){return e&&e.useModelGeometry?this.model.getBBox()||new de:ee(this.cells).getBBox()},getContentBBox:function(e){return this.localToPaperRect(this.getContentArea(e))},getArea:function(){return this.paperToLocalRect(this.getComputedSize())},getRestrictedArea:function(...e){let{restrictTranslate:t}=this.options,n;return gt(t)?n=t.apply(this,e):t===!0?n=this.getArea():t?n=new de(t):n=null,n},createViewForModel:function(e){let{options:t}=this;var n,r,i=t.cellViewNamespace,o=e.get("type")+"View",s=So(i,o,".");e.isLink()?(n=t.linkView,r=Pa):(n=t.elementView,r=qt);var a=n.prototype instanceof sO.default.View?s||n:n.call(this,e)||s||r;return new a({model:e,interactive:t.interactive,labelsLayer:t.labelsLayer===!0?pr.LABELS:t.labelsLayer})},removeView:function(e){let{id:t}=e,{_views:n,_updates:r}=this,i=n[t];if(i){var{cid:o}=i;let{mounted:s,unmounted:a}=r;i.remove(),delete n[t],delete s[o],delete a[o]}return i},renderView:function(e,t){let{id:n}=e,r=this._views,i,o,s=!0;return n in r&&(i=r[n],i.model===e?(o=i.FLAG_INSERT,s=!1):this.removeView(e)),s&&(i=r[n]=this.createViewForModel(e),i.paper=this,o=this.registerUnmountedView(i)|this.FLAG_INIT|i.getFlag(Ft(i,"initFlag"))),this.requestViewUpdate(i,o,i.UPDATE_PRIORITY,t),i},onImageDragStart:function(){return!1},resetViews:function(e,t){t||(t={}),e||(e=[]),this._resetUpdates(),this.removeViews();let n=this.options.autoFreeze?null:"reset";this.freeze({key:n});for(var r=0,i=e.length;r<i;r++)this.renderView(e[r],t);this.unfreeze({key:n}),this.sortViews()},removeViews:function(){fr(this._views,"remove"),this._views={}},sortViews:function(){if(this.isExactSorting()){if(this.isFrozen()){this._updates.sort=!0;return}this.sortViewsExact()}},sortViewsExact:function(){var e=(0,gi.default)(this.cells).children("[model-id]"),t=this.model.get("cells");rR(e,function(n,r){var i=t.get(n.getAttribute("model-id")),o=t.get(r.getAttribute("model-id")),s=i.attributes.z||0,a=o.attributes.z||0;return s===a?0:s<a?-1:1})},insertView:function(e,t){let n=this.getLayerView(pr.CELLS),{el:r,model:i}=e;switch(this.options.sorting){case xc.APPROX:n.insertSortedNode(r,i.get("z"));break;case xc.EXACT:default:n.insertNode(r);break}e.onMount(t)},detachView(e){e.unmount(),e.onDetach()},scale:function(e,t,n,r){if(e===void 0)return ee.matrixToScale(this.matrix());t===void 0&&(t=e),n===void 0&&(n=0,r=0);var i=this.translate();if(n||r||i.tx||i.ty){var o=i.tx-n*(e-1),s=i.ty-r*(t-1);this.translate(o,s)}e=Math.max(e||0,this.MIN_SCALE),t=Math.max(t||0,this.MIN_SCALE);var a=this.matrix();return a.a=e,a.d=t,this.matrix(a),this.trigger("scale",e,t,n,r),this},rotate:function(e,t,n){if(e===void 0)return ee.matrixToRotate(this.matrix());if(t===void 0){var r=this.cells.getBBox();t=r.width/2,n=r.height/2}var i=this.matrix().translate(t,n).rotate(e).translate(-t,-n);return this.matrix(i),this},translate:function(e,t){if(e===void 0)return ee.matrixToTranslate(this.matrix());let{options:n}=this,{origin:r,drawGrid:i}=n;e||(e=0),t||(t=0);let o=this.matrix();if(o.e===e&&o.f===t)return this;o.e=e,o.f=t,this.matrix(o);let{tx:s,ty:a}=this.translate();return r.x=s,r.y=a,this.trigger("translate",s,a),i&&this.drawGrid(),this},findView:function(e){var t=on(e)?this.cells.querySelector(e):e instanceof gi.default?e[0]:e,n=this.findAttribute("model-id",t);if(n)return this._views[n]},findViewByModel:function(e){var t=on(e)||bn(e)?e:e&&e.id;return this._views[t]},findViewsFromPoint:function(e){e=new k(e);var t=this.model.getElements().map(this.findViewByModel,this);return t.filter(function(n){return n&&n.vel.getBBox({target:this.cells}).containsPoint(e)},this)},findViewsInArea:function(e,t){t=Gn(t||{},{strict:!1}),e=new de(e);var n=this.model.getElements().map(this.findViewByModel,this),r=t.strict?"containsRect":"intersect";return n.filter(function(i){return i&&e[r](i.vel.getBBox({target:this.cells}))},this)},removeTools:function(){return this.dispatchToolsEvent("remove"),this},hideTools:function(){return this.dispatchToolsEvent("hide"),this},showTools:function(){return this.dispatchToolsEvent("show"),this},dispatchToolsEvent:function(e,...t){typeof e=="string"&&this.trigger("tools:event",e,...t)},getModelById:function(e){return this.model.getCell(e)},snapToGrid:function(e,t){return this.clientToLocalPoint(e,t).snapToGrid(this.options.gridSize)},localToPaperPoint:function(e,t){var n=new k(e,t),r=ee.transformPoint(n,this.matrix());return r},localToPaperRect:function(e,t,n,r){var i=new de(e,t,n,r),o=ee.transformRect(i,this.matrix());return o},paperToLocalPoint:function(e,t){var n=new k(e,t),r=ee.transformPoint(n,this.matrix().inverse());return r},paperToLocalRect:function(e,t,n,r){var i=new de(e,t,n,r),o=ee.transformRect(i,this.matrix().inverse());return o},localToClientPoint:function(e,t){var n=new k(e,t),r=ee.transformPoint(n,this.clientMatrix());return r},localToClientRect:function(e,t,n,r){var i=new de(e,t,n,r),o=ee.transformRect(i,this.clientMatrix());return o},clientToLocalPoint:function(e,t){var n=new k(e,t),r=ee.transformPoint(n,this.clientMatrix().inverse());return r},clientToLocalRect:function(e,t,n,r){var i=new de(e,t,n,r),o=ee.transformRect(i,this.clientMatrix().inverse());return o},localToPagePoint:function(e,t){return this.localToPaperPoint(e,t).offset(this.pageOffset())},localToPageRect:function(e,t,n,r){return this.localToPaperRect(e,t,n,r).offset(this.pageOffset())},pageToLocalPoint:function(e,t){var n=new k(e,t),r=n.difference(this.pageOffset());return this.paperToLocalPoint(r)},pageToLocalRect:function(e,t,n,r){var i=this.pageOffset(),o=new de(e,t,n,r);return o.x-=i.x,o.y-=i.y,this.paperToLocalRect(o)},clientOffset:function(){var e=this.svg.getBoundingClientRect();return new k(e.left,e.top)},pageOffset:function(){return this.clientOffset().offset(window.scrollX,window.scrollY)},linkAllowed:function(e){if(!(e instanceof Pa))throw new Error("Must provide a linkView.");var t=e.model,n=this.options,r=this.model,i=r.constructor.validations;return!(!n.multiLinks&&!i.multiLinks.call(this,r,t)||!n.linkPinning&&!i.linkPinning.call(this,r,t)||typeof n.allowLink=="function"&&!n.allowLink.call(this,e,this))},getDefaultLink:function(e,t){return gt(this.options.defaultLink)?this.options.defaultLink.call(this,e,t):this.options.defaultLink.clone()},resolveHighlighter:function(e={}){let{highlighter:t,type:n}=e,{highlighting:r,highlighterNamespace:i}=this.options;if(t===void 0){if(!r||n&&(t=r[n],t===!1))return!1;t||(t=r.default)}if(!t)return!1;on(t)&&(t={name:t});let o=t.name,s=i[o];if(!s)throw new Error('Unknown highlighter ("'+o+'")');if(typeof s.highlight!="function")throw new Error('Highlighter ("'+o+'") is missing required highlight() method');if(typeof s.unhighlight!="function")throw new Error('Highlighter ("'+o+'") is missing required unhighlight() method');return{highlighter:s,options:t.options||{},name:o}},onCellHighlight:function(e,t,n){let r=this.resolveHighlighter(n);if(!r)return;let{highlighter:i,options:o}=r;i.highlight(e,t,o)},onCellUnhighlight:function(e,t,n){let r=this.resolveHighlighter(n);if(!r)return;let{highlighter:i,options:o}=r;i.unhighlight(e,t,o)},pointerdblclick:function(e){e.preventDefault(),e=Tn(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.pointerdblclick(e,n.x,n.y):this.trigger("blank:pointerdblclick",e,n.x,n.y)}},pointerclick:function(e){var t=this.eventData(e);if(t.mousemoved<=this.options.clickThreshold){e=Tn(e);var n=this.findView(e.target);if(this.guard(e,n))return;var r=this.snapToGrid(e.clientX,e.clientY);n?n.pointerclick(e,r.x,r.y):this.trigger("blank:pointerclick",e,r.x,r.y)}},contextmenu:function(e){if(this.options.preventContextMenu&&e.preventDefault(),this.contextMenuFired){this.contextMenuFired=!1;return}e=Tn(e),this.contextMenuTrigger(e)},contextMenuTrigger:function(e){var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.contextmenu(e,n.x,n.y):this.trigger("blank:contextmenu",e,n.x,n.y)}},pointerdown:function(e){e=Tn(e);let{target:t,button:n}=e,r=this.findView(t),i=n===2;if(r){if(!i&&this.guard(e,r))return;let o=this.FORM_CONTROL_TAG_NAMES.includes(t.tagName);this.options.preventDefaultViewAction&&!o&&e.preventDefault(),o&&r.preventDefaultInteraction(e);let s=this.customEventTrigger(e,r);if(s){if(s.isPropagationStopped())return;e.data=s.data}let a=t.closest("[magnet]");if(a&&r.el!==a&&r.el.contains(a)){let u=Tn(gi.default.Event(e.originalEvent,{data:e.data,currentTarget:a}));if(this.onmagnet(u),u.isDefaultPrevented()&&e.preventDefault(),u.isPropagationStopped()){if(i)return;this.delegateDragEvents(r,u.data);return}e.data=u.data}}if(i){this.contextMenuFired=!0;let o=gi.default.Event(e.originalEvent,{type:"contextmenu",data:e.data});this.contextMenuTrigger(o)}else{let o=this.snapToGrid(e.clientX,e.clientY);r?r.pointerdown(e,o.x,o.y):(this.options.preventDefaultBlankAction&&e.preventDefault(),this.trigger("blank:pointerdown",e,o.x,o.y)),this.delegateDragEvents(r,e.data)}},pointermove:function(e){var t=this.eventData(e);t.mousemoved||(t.mousemoved=0,this.undelegateEvents());var n=++t.mousemoved;if(!(n<=this.options.moveThreshold)){e=Tn(e);var r=this.snapToGrid(e.clientX,e.clientY),i=t.sourceView;i?i.pointermove(e,r.x,r.y):this.trigger("blank:pointermove",e,r.x,r.y),this.eventData(e,t)}},pointerup:function(e){this.undelegateDocumentEvents();var t=Tn(e),n=this.snapToGrid(t.clientX,t.clientY),r=this.eventData(e).sourceView;r?r.pointerup(t,n.x,n.y):this.trigger("blank:pointerup",t,n.x,n.y),t.isPropagationStopped()||this.pointerclick(gi.default.Event(e.originalEvent,{type:"click",data:e.data})),this.delegateEvents()},mouseover:function(e){e=Tn(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseover(e);else{if(this.el===e.target)return;this.trigger("blank:mouseover",e)}},mouseout:function(e){e=Tn(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseout(e);else{if(this.el===e.target)return;this.trigger("blank:mouseout",e)}},mouseenter:function(e){e=Tn(e);let{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;let o=this.findView(n);i&&(o===i||(i.mouseenter(e),this.el.contains(n)))||o||r===this.el&&this.trigger("paper:mouseenter",e)},mouseleave:function(e){e=Tn(e);let{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;let o=this.findView(n);i&&(o===i||(i.mouseleave(e),this.el.contains(n)))||o||r===this.el&&this.trigger("paper:mouseleave",e)},_processMouseWheelEvtBuf:Ow(function(){let{event:e,deltas:t}=this._mw_evt_buffer,n=t.reduce((s,a)=>s+tR(a,F5),0),r=Math.pow(.995,n),{x:i,y:o}=this.clientToLocalPoint(e.clientX,e.clientY);this.trigger("paper:pinch",e,i,o,r),this._mw_evt_buffer={event:null,deltas:[]}},rO,{maxWait:rO}),mousewheel:function(e){e=Tn(e);let t=this.findView(e.target);if(this.guard(e,t))return;let n=e.originalEvent,r=this.snapToGrid(n.clientX,n.clientY),{deltaX:i,deltaY:o}=eR(n),s=this._events["paper:pinch"];if(e.ctrlKey&&s&&s.length>0)n.preventDefault(),this._mw_evt_buffer.event=n,this._mw_evt_buffer.deltas.push(o),this._processMouseWheelEvtBuf();else{let a=Math.max(-1,Math.min(1,n.wheelDelta));t?t.mousewheel(e,r.x,r.y,a):this.trigger("blank:mousewheel",e,r.x,r.y,a),this.trigger("paper:pan",e,i,o)}},onevent:function(e){var t=e.currentTarget,n=t.getAttribute("event");if(n){var r=this.findView(t);if(r){if(e=Tn(e),this.guard(e,r))return;var i=this.snapToGrid(e.clientX,e.clientY);r.onevent(e,n,i.x,i.y)}}},magnetEvent:function(e,t){var n=e.currentTarget,r=n.getAttribute("magnet");if(r){var i=this.findView(n);if(i){if(e=Tn(e),this.guard(e,i))return;var o=this.snapToGrid(e.clientX,e.clientY);t.call(this,i,e,n,o.x,o.y)}}},onmagnet:function(e){if(e.button===2){this.contextMenuFired=!0,this.magnetContextMenuFired=!0;let t=gi.default.Event(e.originalEvent,{type:"contextmenu",data:e.data,currentTarget:e.currentTarget});this.magnetContextMenuTrigger(t),t.isPropagationStopped()&&e.stopPropagation()}else this.magnetEvent(e,function(t,n,r,i,o){t.onmagnet(n,i,o)})},magnetpointerdblclick:function(e){this.magnetEvent(e,function(t,n,r,i,o){t.magnetpointerdblclick(n,r,i,o)})},magnetcontextmenu:function(e){if(this.options.preventContextMenu&&e.preventDefault(),this.magnetContextMenuFired){this.magnetContextMenuFired=!1;return}this.magnetContextMenuTrigger(e)},magnetContextMenuTrigger:function(e){this.magnetEvent(e,function(t,n,r,i,o){t.magnetcontextmenu(n,r,i,o)})},onlabel:function(e){var t=e.currentTarget,n=this.findView(t);if(!n||(e=Tn(e),this.guard(e,n)))return;let r=this.customEventTrigger(e,n,t);if(r){if(r.isPropagationStopped())return;e.data=r.data}var i=this.snapToGrid(e.clientX,e.clientY);n.onlabel(e,i.x,i.y)},getPointerArgs(e){let t=Tn(e),{x:n,y:r}=this.snapToGrid(t.clientX,t.clientY);return[t,n,r]},delegateDragEvents:function(e,t){t||(t={}),this.eventData({data:t},{sourceView:e||null,mousemoved:0}),this.delegateDocumentEvents(null,t)},guard:function(e,t){if(e.type==="mousedown"&&e.button===2||this.options.guard&&this.options.guard(e,t))return!0;if(e.data&&e.data.guarded!==void 0)return e.data.guarded;let{target:n}=e;return this.GUARDED_TAG_NAMES.includes(n.tagName)?!0:!(t&&t.model&&t.model instanceof nr||this.svg===n||this.el===n||gi.default.contains(this.svg,n))},setGridSize:function(e){let{options:t}=this;return t.gridSize=e,t.drawGrid&&!t.drawGridSize&&this.drawGrid(),this},clearGrid:function(){return this.$grid&&this.$grid.css("backgroundImage","none"),this},_getGridRefs:function(){return this._gridCache||(this._gridCache={root:ee("svg",{width:"100%",height:"100%"},ee("defs")),patterns:{},add:function(e,t){ee(this.root.node.childNodes[0]).append(t),this.patterns[e]=t,this.root.append(ee("rect",{width:"100%",height:"100%",fill:"url(#"+e+")"}))},get:function(e){return this.patterns[e]},exist:function(e){return this.patterns[e]!==void 0}}),this._gridCache},setGrid:function(e){this.clearGrid(),this._gridCache=null,this._gridSettings=[];var t=Array.isArray(e)?e:[e||{}];return t.forEach(function(n){this._gridSettings.push.apply(this._gridSettings,this._resolveDrawGridOption(n))},this),this},_resolveDrawGridOption:function(e){var t=this.constructor.gridPatterns;if(on(e)&&Array.isArray(t[e]))return t[e].map(function(u){return Ae({},u)});var n=e||{args:[{}]},r=Array.isArray(n),i=n.name;if(!r&&!i&&!n.markup&&(i="dot"),i&&Array.isArray(t[i])){var o=t[i].map(function(u){return Ae({},u)}),s=Array.isArray(n.args)?n.args:[n.args||{}];Gn(s[0],Wr(e,"args"));for(var a=0;a<s.length;a++)o[a]&&Ae(o[a],s[a]);return o}return r?n:[n]},drawGrid:function(e){let t=this.options.drawGridSize||this.options.gridSize;if(t<=1)return this.clearGrid();var n=Array.isArray(e)?e:[e],r=this.matrix(),i=this._getGridRefs();this._gridSettings.forEach(function(s,a){var u="pattern_"+a,l=Ut(s,n[a],{sx:r.a||1,sy:r.d||1,ox:r.e||0,oy:r.f||0});l.width=t*(r.a||1)*(l.scaleFactor||1),l.height=t*(r.d||1)*(l.scaleFactor||1),i.exist(u)||i.add(u,ee("pattern",{id:u,patternUnits:"userSpaceOnUse"},ee(l.markup)));var f=i.get(u);gt(l.update)&&l.update(f.node.childNodes[0],l);var d=l.ox%l.width;d<0&&(d+=l.width);var m=l.oy%l.height;m<0&&(m+=l.height),f.attr({x:d,y:m,width:l.width,height:l.height})});var o=new XMLSerializer().serializeToString(i.root.node);return o="url(data:image/svg+xml;base64,"+btoa(o)+")",this.$grid.css("backgroundImage",o),this},updateBackgroundImage:function(e){e=e||{};var t=e.position||"center",n=e.size||"auto auto",r=this.scale(),i=this.translate();if(Ke(t)){var o=i.tx+r.sx*(t.x||0),s=i.ty+r.sy*(t.y||0);t=o+"px "+s+"px"}Ke(n)&&(n=new de(n).scale(r.sx,r.sy),n=n.width+"px "+n.height+"px"),this.$background.css({backgroundSize:n,backgroundPosition:t})},drawBackgroundImage:function(e,t){if(!(e instanceof HTMLImageElement)){this.$background.css("backgroundImage","");return}if(!(!this._background||this._background.id!==t.id)){t=t||{};var n,r=t.size,i=t.repeat||"no-repeat",o=t.opacity||1,s=Math.abs(t.quality)||1,a=this.constructor.backgroundPatterns[Lw(i)];if(gt(a)){e.width*=s,e.height*=s;var u=a(e,t);if(!(u instanceof HTMLCanvasElement))throw new Error("dia.Paper: background pattern must return an HTML Canvas instance");n=u.toDataURL("image/png"),i="repeat",Ke(r)?(r.width*=u.width/e.width,r.height*=u.height/e.height):r===void 0&&(t.size={width:u.width/s,height:u.height/s})}else n=e.src,r===void 0&&(t.size={width:e.width,height:e.height});this.$background.css({opacity:o,backgroundRepeat:i,backgroundImage:"url("+n+")"}),this.updateBackgroundImage(t)}},updateBackgroundColor:function(e){this.$el.css("backgroundColor",e||"")},drawBackground:function(e){if(e=e||{},this.updateBackgroundColor(e.color),e.image){e=this._background=er(e),ps(e);var t=document.createElement("img");t.onload=this.drawBackgroundImage.bind(this,t,e),t.src=e.image}else this.drawBackgroundImage(null),this._background=null;return this},setInteractivity:function(e){this.options.interactive=e,fr(this._views,"setInteractivity",e)},isDefined:function(e){return!!this.svg.getElementById(e)},defineFilter:function(e){if(!Ke(e))throw new TypeError("dia.Paper: defineFilter() requires 1. argument to be an object.");var t=e.id,n=e.name;if(t||(t=n+this.svg.id+Xd(JSON.stringify(e))),!this.isDefined(t)){var r=oR,i=r[n]&&r[n](e.args||{});if(!i)throw new Error("Non-existing filter "+n);var o=Ae({filterUnits:"objectBoundingBox",x:-1,y:-1,width:3,height:3},e.attrs,{id:t});ee(i,o).appendTo(this.defs)}return t},defineGradient:function(e){if(!Ke(e))throw new TypeError("dia.Paper: defineGradient() requires 1. argument to be an object.");let{svg:t,defs:n}=this,{type:r,id:i=r+t.id+Xd(JSON.stringify(e)),stops:o,attrs:s={}}=e;if(this.isDefined(i))return i;let a=Be(o).map(({offset:l,color:f,opacity:d})=>ee("stop").attr({offset:l,"stop-color":f,"stop-opacity":Number.isFinite(d)?d:1})),u=ee(r,s,a);return u.id=i,u.appendTo(n),i},definePattern:function(e){if(!Ke(e))throw new TypeError("dia.Paper: definePattern() requires 1. argument to be an object.");let{svg:t,defs:n}=this,{id:r=t.id+Xd(JSON.stringify(e)),markup:i,attrs:o={}}=e;if(!i)throw new TypeError("dia.Paper: definePattern() requires markup.");if(this.isDefined(r))return r;let s=ee("pattern",{patternUnits:"userSpaceOnUse"});if(s.id=r,s.attr(o),typeof i=="string")s.append(ee(i));else{let{fragment:a}=Na(i);s.append(a)}return s.appendTo(n),r},defineMarker:function(e){if(!Ke(e))throw new TypeError("dia.Paper: defineMarker() requires the first argument to be an object.");let{svg:t,defs:n}=this,{id:r=t.id+Xd(JSON.stringify(e)),markup:i,attrs:o={},markerUnits:s="userSpaceOnUse"}=e;if(this.isDefined(r))return r;let a=ee("marker",{orient:"auto",overflow:"visible",markerUnits:s});a.id=r,a.attr(o);let u;if(i){let d;if(typeof i=="string")d=ee(i),d=Array.isArray(d)?d:[d];else{let{fragment:m}=Na(i);d=ee(m).children()}d.length>1?u=ee("g").append(d):u=d[0]}else{let{type:d="path"}=e;u=ee(d)}let l=Wr(e,"type","id","markup","attrs","markerUnits");return Object.keys(l).forEach(d=>{let m=l[d],I=u.attr(d);I==null?u.attr(d,m):d==="transform"&&u.attr(d,m+" "+I)}),u.appendTo(a),a.appendTo(n),r},customEventTrigger:function(e,t,n=t.el){let r=e.target.closest("[event]");if(r&&n!==r&&t.el.contains(r)){let i=Tn(gi.default.Event(e.originalEvent,{data:e.data,currentTarget:r}));return this.onevent(i),i.isDefaultPrevented()&&e.preventDefault(),i}return null}},{sorting:xc,Layers:pr,backgroundPatterns:{flipXy:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=2*n,t.height=2*r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,-1,t.width,t.height),i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,1,t.width,0),i.drawImage(e,0,0,n,r),i.setTransform(1,0,0,-1,0,t.height),i.drawImage(e,0,0,n,r),t},flipX:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=n*2,t.height=r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(e,0,0,n,r),t},flipY:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=n,t.height=r*2;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(e,0,0,n,r),t},watermark:function(e,t){t=t||{};var n=e.width,r=e.height,i=document.createElement("canvas");i.width=n*3,i.height=r*3;for(var o=i.getContext("2d"),s=bn(t.watermarkAngle)?-t.watermarkAngle:-20,a=ln(s),u=i.width/4,l=i.height/4,f=0;f<4;f++)for(var d=0;d<4;d++)(f+d)%2>0&&(o.setTransform(1,0,0,1,(2*f-1)*u,(2*d-1)*l),o.rotate(a),o.drawImage(e,-n/2,-r/2,n,r));return i}},gridPatterns:{dot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){ee(e).attr({width:t.thickness*t.sx,height:t.thickness*t.sy,fill:t.color})}}],fixedDot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){var n=t.sx<=1?t.thickness*t.sx:t.thickness;ee(e).attr({width:n,height:n,fill:t.color})}}],mesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;r-o>=0&&i-o>=0?n=["M",r,0,"H0 M0 0 V0",i].join(" "):n="M 0 0 0 0",ee(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}],doubleMesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;r-o>=0&&i-o>=0?n=["M",r,0,"H0 M0 0 V0",i].join(" "):n="M 0 0 0 0",ee(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}},{color:"#000000",thickness:3,scaleFactor:4,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;r-o>=0&&i-o>=0?n=["M",r,0,"H0 M0 0 V0",i].join(" "):n="M 0 0 0 0",ee(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}]}});var cb=_r.extend({name:null,tagName:"g",className:"tool",svgElement:!0,_visible:!0,init:function(){var e=this.name;e&&this.vel.attr("data-tool-name",e)},configure:function(e,t){return this.relatedView=e,this.paper=e.paper,this.parentView=t,this.simulateRelatedView(this.el),this.delegateEvents(),this},simulateRelatedView:function(e){e&&e.setAttribute("model-id",this.relatedView.model.id)},getName:function(){return this.name},show:function(){this.el.style.display="",this._visible=!0},hide:function(){this.el.style.display="none",this._visible=!1},isVisible:function(){return!!this._visible},focus:function(){var e=this.options.focusOpacity;isFinite(e)&&(this.el.style.opacity=e),this.parentView.focusTool(this)},blur:function(){this.el.style.opacity="",this.parentView.blurTool(this)},update:function(){},guard:function(e){let{paper:t,relatedView:n}=this;return!t||!n?!0:t.guard(e,n)}});var z5=_r.extend({tagName:"g",className:"tools",svgElement:!0,tools:null,isRendered:!1,options:{tools:null,relatedView:null,name:null},configure:function(e){e=Ae(this.options,e);var t=e.tools;if(!Array.isArray(t))return this;var n=e.relatedView;if(!(n instanceof qe))return this;for(var r=this.tools=[],i=0,o=t.length;i<o;i++){var s=t[i];s instanceof cb&&(s.configure(n,this),this.vel.append(s.el),r.push(s))}return this.isRendered=!1,n.requestUpdate(n.getFlag("TOOLS")),this},getName:function(){return this.options.name},update:function(e){e||(e={});var t=this.tools;if(!t)return this;for(var n=this.isRendered,r=0,i=t.length;r<i;r++){var o=t[r];n?e.tool!==o.cid&&o.isVisible()&&o.update():o.render()}return this.isMounted()||this.mount(),n||(this.blurTool(),this.isRendered=!0),this},focusTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];e===i?i.show():i.hide()}return this},blurTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];i!==e&&!i.isVisible()&&(i.show(),i.update())}return this},hide:function(){return this.focusTool(null)},show:function(){return this.blurTool(null)},onRemove:function(){var e=this.tools;if(!e)return this;for(var t=0,n=e.length;t<n;t++)e[t].remove();this.tools=null},mount:function(){let{options:e,el:t}=this,{relatedView:n,layer:r=pr.TOOLS,z:i}=e;return n&&(r?n.paper.getLayerView(r).insertSortedNode(t,i):n.el.appendChild(t)),this}});var As={};Kt(As,{basic:()=>lb,chess:()=>yb,devs:()=>gb,erd:()=>Ib,fsa:()=>Cb,logic:()=>vb,org:()=>Ab,pn:()=>wb,standard:()=>fb,uml:()=>xb});var lb={};Kt(lb,{Circle:()=>lf,Ellipse:()=>Z5,Generic:()=>it,Image:()=>$5,Path:()=>aO,Polygon:()=>W5,Polyline:()=>Y5,Rect:()=>G5,Rhombus:()=>X5,Text:()=>H5,TextBlock:()=>q5,TextBlockView:()=>J5,TextView:()=>U5});var cf={_results:{},_tests:{svgforeignobject:function(){return!!document.createElementNS&&/SVGForeignObject/.test({}.toString.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}},addTest:function(e,t){return this._tests[e]=t},test:function(e){var t=this._tests[e];if(!t)throw new Error('Test not defined ("'+e+'"). Use `joint.env.addTest(name, fn) to add a new test.`');var n=this._results[e];if(typeof n<"u")return n;try{n=t()}catch{n=!1}return this._results[e]=n,n}};var it=Ot.define("basic.Generic",{attrs:{".":{fill:"#ffffff",stroke:"none"}}}),G5=it.define("basic.Rect",{attrs:{rect:{fill:"#ffffff",stroke:"#000000",width:100,height:60},text:{fill:"#000000",text:"","font-size":14,"ref-x":.5,"ref-y":.5,"text-anchor":"middle","y-alignment":"middle","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><rect/></g><text/></g>'}),U5=qt.extend({presentationAttributes:qt.addPresentationAttributes({attrs:["SCALE"]}),confirmUpdate:function(){var e=qt.prototype.confirmUpdate.apply(this,arguments);return this.hasFlag(e,"SCALE")&&(this.resize(),e=this.removeFlag(e,"SCALE")),e}}),H5=it.define("basic.Text",{attrs:{text:{"font-size":18,fill:"#000000"}}},{markup:'<g class="rotatable"><g class="scalable"><text/></g></g>'}),lf=it.define("basic.Circle",{size:{width:60,height:60},attrs:{circle:{fill:"#ffffff",stroke:"#000000",r:30,cx:30,cy:30},text:{"font-size":14,text:"","text-anchor":"middle","ref-x":.5,"ref-y":.5,"y-alignment":"middle",fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><circle/></g><text/></g>'}),Z5=it.define("basic.Ellipse",{size:{width:60,height:40},attrs:{ellipse:{fill:"#ffffff",stroke:"#000000",rx:30,ry:20,cx:30,cy:20},text:{"font-size":14,text:"","text-anchor":"middle","ref-x":.5,"ref-y":.5,"y-alignment":"middle",fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><ellipse/></g><text/></g>'}),W5=it.define("basic.Polygon",{size:{width:60,height:40},attrs:{polygon:{fill:"#ffffff",stroke:"#000000"},text:{"font-size":14,text:"","text-anchor":"middle","ref-x":.5,"ref-dy":20,"y-alignment":"middle",fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><polygon/></g><text/></g>'}),Y5=it.define("basic.Polyline",{size:{width:60,height:40},attrs:{polyline:{fill:"#ffffff",stroke:"#000000"},text:{"font-size":14,text:"","text-anchor":"middle","ref-x":.5,"ref-dy":20,"y-alignment":"middle",fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><polyline/></g><text/></g>'}),$5=it.define("basic.Image",{attrs:{text:{"font-size":14,text:"","text-anchor":"middle","ref-x":.5,"ref-dy":20,"y-alignment":"middle",fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><image/></g><text/></g>'}),aO=it.define("basic.Path",{size:{width:60,height:60},attrs:{path:{fill:"#ffffff",stroke:"#000000"},text:{"font-size":14,text:"","text-anchor":"middle",ref:"path","ref-x":.5,"ref-dy":10,fill:"#000000","font-family":"Arial, helvetica, sans-serif"}}},{markup:'<g class="rotatable"><g class="scalable"><path/></g><text/></g>'}),X5=aO.define("basic.Rhombus",{attrs:{path:{d:"M 30 0 L 60 30 30 60 0 30 z"},text:{"ref-y":.5,"ref-dy":null,"y-alignment":"middle"}}}),rv=cf.test("svgforeignobject"),q5=it.define("basic.TextBlock",{attrs:{rect:{fill:"#ffffff",stroke:"#000000",width:80,height:100},text:{fill:"#000000","font-size":14,"font-family":"Arial, helvetica, sans-serif"},".content":{text:"","ref-x":.5,"ref-y":.5,"y-alignment":"middle","x-alignment":"middle"}},content:""},{markup:['<g class="rotatable">','<g class="scalable"><rect/></g>',rv?'<foreignObject class="fobj"><body xmlns="http://www.w3.org/1999/xhtml"><div class="content"/></body></foreignObject>':'<text class="content"/>',"</g>"].join(""),initialize:function(){this.listenTo(this,"change:size",this.updateSize),this.listenTo(this,"change:content",this.updateContent),this.updateSize(this,this.get("size")),this.updateContent(this,this.get("content")),it.prototype.initialize.apply(this,arguments)},updateSize:function(e,t){this.attr({".fobj":Ae({},t),div:{style:Ae({},t)}})},updateContent:function(e,t){rv?this.attr({".content":{html:nR(t)}}):this.attr({".content":{text:t}})},setForeignObjectSize:function(){this.updateSize.apply(this,arguments)},setDivContent:function(){this.updateContent.apply(this,arguments)}}),J5=qt.extend({presentationAttributes:rv?qt.prototype.presentationAttributes:qt.addPresentationAttributes({content:["CONTENT"],size:["CONTENT"]}),initFlag:["RENDER","CONTENT"],confirmUpdate:function(){var e=qt.prototype.confirmUpdate.apply(this,arguments);return this.hasFlag(e,"CONTENT")&&(this.updateContent(this.model),e=this.removeFlag(e,"CONTENT")),e},update:function(e,t){var n=this.model;if(rv)qt.prototype.update.call(this,n,t);else{var r=Wr(t||n.get("attrs"),".content");qt.prototype.update.call(this,n,r),(!t||Nr(t,".content"))&&this.updateContent(n,t)}},updateContent:function(e,t){var n=Ut({},(t||e.get("attrs"))[".content"]);n=Wr(n,"text");var r=Nm(e.get("content"),e.get("size"),n,{svgDocument:this.paper.svg}),i=qd({},".content",n,"/");i[".content"].text=r,qt.prototype.update.call(this,e,i)}});var fb={};Kt(fb,{BorderedImage:()=>oH,Circle:()=>K5,Cylinder:()=>cH,DoubleLink:()=>pH,Ellipse:()=>eH,EmbeddedImage:()=>sH,HeaderedRectangle:()=>uH,Image:()=>iH,InscribedImage:()=>aH,Link:()=>gH,Path:()=>tH,Polygon:()=>nH,Polyline:()=>rH,Rectangle:()=>Q5,ShadowLink:()=>mH,TextBlock:()=>hH});var Q5=Ot.define("standard.Rectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}]}),K5=Ot.define("standard.Circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"}]}),eH=Ot.define("standard.Ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"body"},{tagName:"text",selector:"label"}]}),tH=Ot.define("standard.Path",{attrs:{body:{refD:"M 0 0 L 10 0 10 10 0 10 Z",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}]}),nH=Ot.define("standard.Polygon",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"}]}),rH=Ot.define("standard.Polyline",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10 0 0",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polyline",selector:"body"},{tagName:"text",selector:"label"}]}),iH=Ot.define("standard.Image",{attrs:{image:{refWidth:"100%",refHeight:"100%"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),oH=Ot.define("standard.BorderedImage",{attrs:{border:{refWidth:"100%",refHeight:"100%",stroke:"#333333",strokeWidth:2},background:{refWidth:-1,refHeight:-1,x:.5,y:.5,fill:"#FFFFFF"},image:{refWidth:-1,refHeight:-1,x:.5,y:.5},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"background",attributes:{stroke:"none"}},{tagName:"image",selector:"image"},{tagName:"rect",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),sH=Ot.define("standard.EmbeddedImage",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#FFFFFF",strokeWidth:2},image:{refWidth:"30%",refHeight:-20,x:10,y:10,preserveAspectRatio:"xMidYMin"},label:{textVerticalAnchor:"top",textAnchor:"left",refX:"30%",refX2:20,refY:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),aH=Ot.define("standard.InscribedImage",{attrs:{border:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",stroke:"#333333",strokeWidth:2},background:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",fill:"#FFFFFF"},image:{refWidth:"68%",refHeight:"68%",refX:"16%",refY:"16%",preserveAspectRatio:"xMidYMid"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"background"},{tagName:"image",selector:"image"},{tagName:"ellipse",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),uH=Ot.define("standard.HeaderedRectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},header:{refWidth:"100%",height:30,strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},headerText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:15,fontSize:16,fill:"#333333"},bodyText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"header"},{tagName:"text",selector:"headerText"},{tagName:"text",selector:"bodyText"}]}),db=10,cH=Ot.define("standard.Cylinder",{attrs:{body:{lateralArea:db,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},top:{refCx:"50%",cy:db,refRx:"50%",ry:db,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"100%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"ellipse",selector:"top"},{tagName:"text",selector:"label"}],topRy:function(e,t){if(e===void 0)return this.attr("body/lateralArea");var n=pn(e),r={lateralArea:e},i=n?{refCy:e,refRy:e,cy:null,ry:null}:{refCy:null,refRy:null,cy:e,ry:e};return this.attr({body:r,top:i},t)}},{attributes:{lateralArea:{set:function(e,t){var n=pn(e);n&&(e=parseFloat(e)/100);var r=t.x,i=t.y,o=t.width,s=t.height,a=o/2,u=n?s*e:e,l=ee.KAPPA,f=l*a,d=l*(n?s*e:e),m=r,I=r+o/2,C=r+o,M=i+u,E=M-u,N=i+s-u,B=i+s,Z=["M",m,M,"L",m,N,"C",r,N+d,I-f,B,I,B,"C",I+f,B,C,N+d,C,N,"L",C,M,"C",C,M-d,I+f,E,I,E,"C",I-f,E,m,M-d,m,M,"Z"];return{d:Z.join(" ")}}}}}),lH={tagName:"foreignObject",selector:"foreignObject",attributes:{overflow:"hidden"},children:[{tagName:"div",namespaceURI:"http://www.w3.org/1999/xhtml",selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]},dH={tagName:"text",selector:"label",attributes:{"text-anchor":"middle"}},fH=cf.test("svgforeignobject")?lH:dH,hH=Ot.define("standard.TextBlock",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#ffffff",strokeWidth:2},foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}}},{markup:[{tagName:"rect",selector:"body"},fH]},{attributes:{text:{set:function(e,t,n,r){if(n instanceof HTMLElement)n.textContent=e;else{var i=r.style||{},o={text:e,width:-5,height:"100%"},s=Ae({textVerticalAnchor:"middle"},i);return ef.textWrap.set.call(this,o,t,n,s),{fill:i.color||null}}},position:function(e,t,n){if(n instanceof SVGElement)return t.center()}}}}),gH=Rt.define("standard.Link",{attrs:{line:{connection:!0,stroke:"#333333",strokeWidth:2,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 z"}},wrapper:{connection:!0,strokeWidth:10,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"wrapper",attributes:{fill:"none",cursor:"pointer",stroke:"transparent","stroke-linecap":"round"}},{tagName:"path",selector:"line",attributes:{fill:"none","pointer-events":"none"}}]}),pH=Rt.define("standard.DoubleLink",{attrs:{line:{connection:!0,stroke:"#DDDDDD",strokeWidth:4,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"#000000",d:"M 10 -3 10 -10 -2 0 10 10 10 3"}},outline:{connection:!0,stroke:"#000000",strokeWidth:6,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"outline",attributes:{fill:"none",cursor:"pointer"}},{tagName:"path",selector:"line",attributes:{fill:"none","pointer-events":"none"}}]}),mH=Rt.define("standard.ShadowLink",{attrs:{line:{connection:!0,stroke:"#FF0000",strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"none",d:"M 0 -10 -10 0 0 10 z"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}},shadow:{connection:!0,refX:3,refY:6,stroke:"#000000",strokeOpacity:.2,strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 0 -10 -10 0 0 10 z",stroke:"none"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}}}},{markup:[{tagName:"path",selector:"shadow",attributes:{fill:"none","pointer-events":"none"}},{tagName:"path",selector:"line",attributes:{fill:"none",cursor:"pointer"}}]});var gb={};Kt(gb,{Atomic:()=>vH,Coupled:()=>yH,Link:()=>IH,Model:()=>hb});var hb=it.define("devs.Model",{inPorts:[],outPorts:[],size:{width:80,height:80},attrs:{".":{magnet:!1},".label":{text:"Model","ref-x":.5,"ref-y":10,"font-size":18,"text-anchor":"middle",fill:"#000"},".body":{"ref-width":"100%","ref-height":"100%",stroke:"#000"}},ports:{groups:{in:{position:{name:"left"},attrs:{".port-label":{fill:"#000"},".port-body":{fill:"#fff",stroke:"#000",r:10,magnet:!0}},label:{position:{name:"left",args:{y:10}}}},out:{position:{name:"right"},attrs:{".port-label":{fill:"#000"},".port-body":{fill:"#fff",stroke:"#000",r:10,magnet:!0}},label:{position:{name:"right",args:{y:10}}}}}}},{markup:'<g class="rotatable"><rect class="body"/><text class="label"/></g>',portMarkup:'<circle class="port-body"/>',portLabelMarkup:'<text class="port-label"/>',initialize:function(){it.prototype.initialize.apply(this,arguments),this.on("change:inPorts change:outPorts",this.updatePortItems,this),this.updatePortItems()},updatePortItems:function(e,t,n){var r=Hr(this.get("inPorts")),i=Yd(Hr(this.get("outPorts")),r),o=this.createPortItems("in",r),s=this.createPortItems("out",i);this.prop("ports/items",o.concat(s),Ae({rewrite:!0},n))},createPortItem:function(e,t){return{id:t,group:e,attrs:{".port-label":{text:t}}}},createPortItems:function(e,t){return Be(t).map(this.createPortItem.bind(this,e))},_addGroupPort:function(e,t,n){var r=this.get(t);return this.set(t,Array.isArray(r)?r.concat(e):[e],n)},addOutPort:function(e,t){return this._addGroupPort(e,"outPorts",t)},addInPort:function(e,t){return this._addGroupPort(e,"inPorts",t)},_removeGroupPort:function(e,t,n){return this.set(t,pc(this.get(t),e),n)},removeOutPort:function(e,t){return this._removeGroupPort(e,"outPorts",t)},removeInPort:function(e,t){return this._removeGroupPort(e,"inPorts",t)},_changeGroup:function(e,t,n){return this.prop("ports/groups/"+e,Ke(t)?t:{},n)},changeInGroup:function(e,t){return this._changeGroup("in",e,t)},changeOutGroup:function(e,t){return this._changeGroup("out",e,t)}}),vH=hb.define("devs.Atomic",{size:{width:80,height:80},attrs:{".label":{text:"Atomic"}}}),yH=hb.define("devs.Coupled",{size:{width:200,height:300},attrs:{".label":{text:"Coupled"}}}),IH=Rt.define("devs.Link",{attrs:{".connection":{"stroke-width":2}}});var vb={};Kt(vb,{And:()=>xH,Gate:()=>iv,Gate11:()=>mb,Gate21:()=>ka,IO:()=>pb,Input:()=>CH,Nand:()=>MH,Nor:()=>EH,Not:()=>bH,Or:()=>DH,Output:()=>AH,Repeater:()=>wH,Wire:()=>NH,Xnor:()=>TH,Xor:()=>SH});var iv=it.define("logic.Gate",{size:{width:80,height:40},attrs:{".":{magnet:!1},".body":{width:100,height:50},circle:{r:7,stroke:"black",fill:"transparent","stroke-width":2}}},{operation:function(){return!0}}),pb=iv.define("logic.IO",{size:{width:60,height:30},attrs:{".body":{fill:"white",stroke:"black","stroke-width":2},".wire":{ref:".body","ref-y":.5,stroke:"black"},text:{fill:"black",ref:".body","ref-x":.5,"ref-y":.5,"y-alignment":"middle","text-anchor":"middle","font-weight":"bold","font-variant":"small-caps","text-transform":"capitalize","font-size":"14px"}}},{markup:'<g class="rotatable"><g class="scalable"><rect class="body"/></g><path class="wire"/><circle/><text/></g>'}),CH=pb.define("logic.Input",{attrs:{".wire":{"ref-dx":0,d:"M 0 0 L 23 0"},circle:{ref:".body","ref-dx":30,"ref-y":.5,magnet:!0,class:"output",port:"out"},text:{text:"input"}}}),AH=pb.define("logic.Output",{attrs:{".wire":{"ref-x":0,d:"M 0 0 L -23 0"},circle:{ref:".body","ref-x":-30,"ref-y":.5,magnet:"passive",class:"input",port:"in"},text:{text:"output"}}}),mb=iv.define("logic.Gate11",{attrs:{".input":{ref:".body","ref-x":-2,"ref-y":.5,magnet:"passive",port:"in"},".output":{ref:".body","ref-dx":2,"ref-y":.5,magnet:!0,port:"out"}}},{markup:'<g class="rotatable"><g class="scalable"><image class="body"/></g><circle class="input"/><circle class="output"/></g>'}),ka=iv.define("logic.Gate21",{attrs:{".input1":{ref:".body","ref-x":-2,"ref-y":.3,magnet:"passive",port:"in1"},".input2":{ref:".body","ref-x":-2,"ref-y":.7,magnet:"passive",port:"in2"},".output":{ref:".body","ref-dx":2,"ref-y":.5,magnet:!0,port:"out"}}},{markup:'<g class="rotatable"><g class="scalable"><image class="body"/></g><circle class="input input1"/><circle class="input input2"/><circle class="output"/></g>'}),wH=mb.define("logic.Repeater",{attrs:{image:{"xlink:href":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgo8c3ZnCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWN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ogICAgICAgZD0iTSA3OSwyNSBBIDQsNCAwIDEgMSA3MSwyNSBBIDQsNCAwIDEgMSA3OSwyNSB6IiAvPgogIDwvZz4KPC9zdmc+Cg=="}}},{operation:function(e,t){return(!e||!t)&&(e||t)}}),NH=Rt.define("logic.Wire",{attrs:{".connection":{"stroke-width":2},".marker-vertex":{r:7}},router:{name:"orthogonal"},connector:{name:"rounded",args:{radius:10}}},{arrowheadMarkup:['<g class="marker-arrowhead-group marker-arrowhead-group-<%= end %>">','<circle class="marker-arrowhead" end="<%= end %>" r="7"/>',"</g>"].join(""),vertexMarkup:['<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">','<circle class="marker-vertex" idx="<%= idx %>" r="10" />','<g class="marker-vertex-remove-group">','<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>','<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">',"<title>Remove vertex.</title>","</path>","</g>","</g>"].join("")});var yb={};Kt(yb,{BishopBlack:()=>jH,BishopWhite:()=>FH,KingBlack:()=>RH,KingWhite:()=>_H,KnightBlack:()=>VH,KnightWhite:()=>BH,PawnBlack:()=>GH,PawnWhite:()=>zH,QueenBlack:()=>PH,QueenWhite:()=>OH,RookBlack:()=>LH,RookWhite:()=>kH});var _H=it.define("chess.KingWhite",{size:{width:42,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"><path d="M 22.5,11.63 L 22.5,6" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> <path d="M 20,8 L 25,8" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> <path d="M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25" style="fill:#ffffff; stroke:#000000; stroke-linecap:butt; stroke-linejoin:miter;" /> <path d="M 11.5,37 C 17,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 19,16 9.5,13 6.5,19.5 C 3.5,25.5 11.5,29.5 11.5,29.5 L 11.5,37 z " style="fill:#ffffff; stroke:#000000;" /> <path d="M 11.5,30 C 17,27 27,27 32.5,30" style="fill:none; stroke:#000000;" /> <path d="M 11.5,33.5 C 17,30.5 27,30.5 32.5,33.5" style="fill:none; stroke:#000000;" /> <path d="M 11.5,37 C 17,34 27,34 32.5,37" style="fill:none; stroke:#000000;" /> </g></g></g>'}),RH=it.define("chess.KingBlack",{size:{width:42,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 22.5,11.63 L 22.5,6" style="fill:none; stroke:#000000; stroke-linejoin:miter;" id="path6570" /> <path d="M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25" style="fill:#000000;fill-opacity:1; stroke-linecap:butt; stroke-linejoin:miter;" /> <path d="M 11.5,37 C 17,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 19,16 9.5,13 6.5,19.5 C 3.5,25.5 11.5,29.5 11.5,29.5 L 11.5,37 z " style="fill:#000000; stroke:#000000;" /> <path d="M 20,8 L 25,8" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> <path d="M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.51,26.6 L 22.5,24.5 C 20,18 9.906,14 6.997,19.85 C 4.5,25.5 11.85,28.85 11.85,28.85" style="fill:none; stroke:#ffffff;" /> <path d="M 11.5,30 C 17,27 27,27 32.5,30 M 11.5,33.5 C 17,30.5 27,30.5 32.5,33.5 M 11.5,37 C 17,34 27,34 32.5,37" style="fill:none; stroke:#ffffff;" /> </g></g></g>'}),OH=it.define("chess.QueenWhite",{size:{width:42,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z" transform="translate(-1,-1)" /> <path d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z" transform="translate(15.5,-5.5)" /> <path d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z" transform="translate(32,-1)" /> <path d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z" transform="translate(7,-4.5)" /> <path d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z" transform="translate(24,-4)" /> <path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38,14 L 31,25 L 31,11 L 25.5,24.5 L 22.5,9.5 L 19.5,24.5 L 14,10.5 L 14,25 L 7,14 L 9,26 z " style="stroke-linecap:butt;" /> <path d="M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 10.5,36 10.5,36 C 9,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z " style="stroke-linecap:butt;" /> <path d="M 11.5,30 C 15,29 30,29 33.5,30" style="fill:none;" /> <path d="M 12,33.5 C 18,32.5 27,32.5 33,33.5" style="fill:none;" /> </g></g></g>'}),PH=it.define("chess.QueenBlack",{size:{width:42,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <g style="fill:#000000; stroke:none;"> <circle cx="6" cy="12" r="2.75" /> <circle cx="14" cy="9" r="2.75" /> <circle cx="22.5" cy="8" r="2.75" /> <circle cx="31" cy="9" r="2.75" /> <circle cx="39" cy="12" r="2.75" /> </g> <path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z" style="stroke-linecap:butt; stroke:#000000;" /> <path d="M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 10.5,36 10.5,36 C 9,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z" style="stroke-linecap:butt;" /> <path d="M 11,38.5 A 35,35 1 0 0 34,38.5" style="fill:none; stroke:#000000; stroke-linecap:butt;" /> <path d="M 11,29 A 35,35 1 0 1 34,29" style="fill:none; stroke:#ffffff;" /> <path d="M 12.5,31.5 L 32.5,31.5" style="fill:none; stroke:#ffffff;" /> <path d="M 11.5,34.5 A 35,35 1 0 0 33.5,34.5" style="fill:none; stroke:#ffffff;" /> <path d="M 10.5,37.5 A 35,35 1 0 0 34.5,37.5" style="fill:none; stroke:#ffffff;" /> </g></g></g>'}),kH=it.define("chess.RookWhite",{size:{width:32,height:34}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z " style="stroke-linecap:butt;" /> <path d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z " style="stroke-linecap:butt;" /> <path d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14" style="stroke-linecap:butt;" /> <path d="M 34,14 L 31,17 L 14,17 L 11,14" /> <path d="M 31,17 L 31,29.5 L 14,29.5 L 14,17" style="stroke-linecap:butt; stroke-linejoin:miter;" /> <path d="M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5" /> <path d="M 11,14 L 34,14" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> </g></g></g>'}),LH=it.define("chess.RookBlack",{size:{width:32,height:34}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z " style="stroke-linecap:butt;" /> <path d="M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z " style="stroke-linecap:butt;" /> <path d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z " style="stroke-linecap:butt;" /> <path d="M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z " style="stroke-linecap:butt;stroke-linejoin:miter;" /> <path d="M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z " style="stroke-linecap:butt;" /> <path d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z " style="stroke-linecap:butt;" /> <path d="M 12,35.5 L 33,35.5 L 33,35.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 13,31.5 L 32,31.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 14,29.5 L 31,29.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 14,16.5 L 31,16.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 11,14 L 34,14" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> </g></g></g>'}),FH=it.define("chess.BishopWhite",{size:{width:38,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <g style="fill:#ffffff; stroke:#000000; stroke-linecap:butt;"> <path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.646,38.99 6.677,38.97 6,38 C 7.354,36.06 9,36 9,36 z" /> <path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z" /> <path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z" /> </g> <path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> </g></g></g>'}),jH=it.define("chess.BishopBlack",{size:{width:38,height:38}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <g style="fill:#000000; stroke:#000000; stroke-linecap:butt;"> <path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.646,38.99 6.677,38.97 6,38 C 7.354,36.06 9,36 9,36 z" /> <path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z" /> <path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z" /> </g> <path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#ffffff; stroke-linejoin:miter;" /> </g></g></g>'}),BH=it.define("chess.KnightWhite",{size:{width:38,height:37}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18" style="fill:#ffffff; stroke:#000000;" /> <path d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10" style="fill:#ffffff; stroke:#000000;" /> <path d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z" style="fill:#000000; stroke:#000000;" /> <path d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z" transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)" style="fill:#000000; stroke:#000000;" /> </g></g></g>'}),VH=it.define("chess.KnightBlack",{size:{width:38,height:37}},{markup:'<g class="rotatable"><g class="scalable"><g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18" style="fill:#000000; stroke:#000000;" /> <path d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10" style="fill:#000000; stroke:#000000;" /> <path d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z" style="fill:#ffffff; stroke:#ffffff;" /> <path d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z" transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)" style="fill:#ffffff; stroke:#ffffff;" /> <path d="M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z " style="fill:#ffffff; stroke:none;" /> </g></g></g>'}),zH=it.define("chess.PawnWhite",{size:{width:28,height:33}},{markup:'<g class="rotatable"><g class="scalable"><path d="M 22,9 C 19.79,9 18,10.79 18,13 C 18,13.89 18.29,14.71 18.78,15.38 C 16.83,16.5 15.5,18.59 15.5,21 C 15.5,23.03 16.44,24.84 17.91,26.03 C 14.91,27.09 10.5,31.58 10.5,39.5 L 33.5,39.5 C 33.5,31.58 29.09,27.09 26.09,26.03 C 27.56,24.84 28.5,23.03 28.5,21 C 28.5,18.59 27.17,16.5 25.22,15.38 C 25.71,14.71 26,13.89 26,13 C 26,10.79 24.21,9 22,9 z " style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" /></g></g>'}),GH=it.define("chess.PawnBlack",{size:{width:28,height:33}},{markup:'<g class="rotatable"><g class="scalable"><path d="M 22,9 C 19.79,9 18,10.79 18,13 C 18,13.89 18.29,14.71 18.78,15.38 C 16.83,16.5 15.5,18.59 15.5,21 C 15.5,23.03 16.44,24.84 17.91,26.03 C 14.91,27.09 10.5,31.58 10.5,39.5 L 33.5,39.5 C 33.5,31.58 29.09,27.09 26.09,26.03 C 27.56,24.84 28.5,23.03 28.5,21 C 28.5,18.59 27.17,16.5 25.22,15.38 C 25.71,14.71 26,13.89 26,13 C 26,10.79 24.21,9 22,9 z " style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" /></g></g>'});var Ib={};Kt(Ib,{Attribute:()=>df,Derived:()=>WH,Entity:()=>uO,ISA:()=>XH,IdentifyingRelationship:()=>HH,Key:()=>YH,Line:()=>qH,Multivalued:()=>ZH,Normal:()=>$H,Relationship:()=>cO,WeakEntity:()=>UH});var uO=Ot.define("erd.Entity",{size:{width:150,height:60},attrs:{".outer":{fill:"#2ECC71",stroke:"#27AE60","stroke-width":2,points:"100,0 100,60 0,60 0,0"},".inner":{fill:"#2ECC71",stroke:"#27AE60","stroke-width":2,points:"95,5 95,55 5,55 5,5",display:"none"},text:{text:"Entity","font-family":"Arial","font-size":14,"ref-x":.5,"ref-y":.5,"y-alignment":"middle","text-anchor":"middle"}}},{markup:'<g class="rotatable"><g class="scalable"><polygon class="outer"/><polygon class="inner"/></g><text/></g>'}),UH=uO.define("erd.WeakEntity",{attrs:{".inner":{display:"auto"},text:{text:"Weak Entity"}}}),cO=Ot.define("erd.Relationship",{size:{width:80,height:80},attrs:{".outer":{fill:"#3498DB",stroke:"#2980B9","stroke-width":2,points:"40,0 80,40 40,80 0,40"},".inner":{fill:"#3498DB",stroke:"#2980B9","stroke-width":2,points:"40,5 75,40 40,75 5,40",display:"none"},text:{text:"Relationship","font-family":"Arial","font-size":12,"ref-x":.5,"ref-y":.5,"y-alignment":"middle","text-anchor":"middle"}}},{markup:'<g class="rotatable"><g class="scalable"><polygon class="outer"/><polygon class="inner"/></g><text/></g>'}),HH=cO.define("erd.IdentifyingRelationship",{attrs:{".inner":{display:"auto"},text:{text:"Identifying"}}}),df=Ot.define("erd.Attribute",{size:{width:100,height:50},attrs:{ellipse:{transform:"translate(50, 25)"},".outer":{stroke:"#D35400","stroke-width":2,cx:0,cy:0,rx:50,ry:25,fill:"#E67E22"},".inner":{stroke:"#D35400","stroke-width":2,cx:0,cy:0,rx:45,ry:20,fill:"#E67E22",display:"none"},text:{"font-family":"Arial","font-size":14,"ref-x":.5,"ref-y":.5,"y-alignment":"middle","text-anchor":"middle"}}},{markup:'<g class="rotatable"><g class="scalable"><ellipse class="outer"/><ellipse class="inner"/></g><text/></g>'}),ZH=df.define("erd.Multivalued",{attrs:{".inner":{display:"block"},text:{text:"multivalued"}}}),WH=df.define("erd.Derived",{attrs:{".outer":{"stroke-dasharray":"3,5"},text:{text:"derived"}}}),YH=df.define("erd.Key",{attrs:{ellipse:{"stroke-width":4},text:{text:"key","font-weight":"800","text-decoration":"underline"}}}),$H=df.define("erd.Normal",{attrs:{text:{text:"Normal"}}}),XH=Ot.define("erd.ISA",{type:"erd.ISA",size:{width:100,height:50},attrs:{polygon:{points:"0,0 50,50 100,0",fill:"#F1C40F",stroke:"#F39C12","stroke-width":2},text:{text:"ISA","font-size":18,"ref-x":.5,"ref-y":.3,"y-alignment":"middle","text-anchor":"middle"}}},{markup:'<g class="rotatable"><g class="scalable"><polygon/></g><text/></g>'}),qH=Rt.define("erd.Line",{},{cardinality:function(e){this.set("labels",[{position:-20,attrs:{text:{dy:-8,text:e}}}])}});var Cb={};Kt(Cb,{Arrow:()=>eZ,EndState:()=>KH,StartState:()=>QH,State:()=>JH});var JH=lf.define("fsa.State",{attrs:{circle:{"stroke-width":3},text:{"font-weight":"800"}}}),QH=Ot.define("fsa.StartState",{size:{width:20,height:20},attrs:{circle:{transform:"translate(10, 10)",r:10,fill:"#000000"}}},{markup:'<g class="rotatable"><g class="scalable"><circle/></g></g>'}),KH=Ot.define("fsa.EndState",{size:{width:20,height:20},attrs:{".outer":{transform:"translate(10, 10)",r:10,fill:"#ffffff",stroke:"#000000"},".inner":{transform:"translate(10, 10)",r:6,fill:"#000000"}}},{markup:'<g class="rotatable"><g class="scalable"><circle class="outer"/><circle class="inner"/></g></g>'}),eZ=Rt.define("fsa.Arrow",{attrs:{".marker-target":{d:"M 10 0 L 0 5 L 10 10 z"}},smooth:!0});var Ab={};Kt(Ab,{Arrow:()=>nZ,Member:()=>tZ});var tZ=Ot.define("org.Member",{size:{width:180,height:70},attrs:{rect:{width:170,height:60},".card":{fill:"#FFFFFF",stroke:"#000000","stroke-width":2,"pointer-events":"visiblePainted",rx:10,ry:10},image:{width:48,height:48,ref:".card","ref-x":10,"ref-y":5},".rank":{"text-decoration":"underline",ref:".card","ref-x":.9,"ref-y":.2,"font-family":"Courier New","font-size":14,"text-anchor":"end"},".name":{"font-weight":"800",ref:".card","ref-x":.9,"ref-y":.6,"font-family":"Courier New","font-size":14,"text-anchor":"end"}}},{markup:'<g class="rotatable"><g class="scalable"><rect class="card"/><image/></g><text class="rank"/><text class="name"/></g>'}),nZ=Rt.define("org.Arrow",{source:{selector:".card"},target:{selector:".card"},attrs:{".connection":{stroke:"#585858","stroke-width":3}},z:-1});var wb={};Kt(wb,{Link:()=>sZ,Place:()=>rZ,PlaceView:()=>iZ,Transition:()=>oZ});var rZ=it.define("pn.Place",{size:{width:50,height:50},attrs:{".root":{r:25,fill:"#ffffff",stroke:"#000000",transform:"translate(25, 25)"},".label":{"text-anchor":"middle","ref-x":.5,"ref-y":-20,ref:".root",fill:"#000000","font-size":12},".tokens > circle":{fill:"#000000",r:5},".tokens.one > circle":{transform:"translate(25, 25)"},".tokens.two > circle:nth-child(1)":{transform:"translate(19, 25)"},".tokens.two > circle:nth-child(2)":{transform:"translate(31, 25)"},".tokens.three > circle:nth-child(1)":{transform:"translate(18, 29)"},".tokens.three > circle:nth-child(2)":{transform:"translate(25, 19)"},".tokens.three > circle:nth-child(3)":{transform:"translate(32, 29)"},".tokens.alot > text":{transform:"translate(25, 18)","text-anchor":"middle",fill:"#000000"}}},{markup:'<g class="rotatable"><g class="scalable"><circle class="root"/><g class="tokens" /></g><text class="label"/></g>'}),iZ=qt.extend({presentationAttributes:qt.addPresentationAttributes({tokens:["TOKENS"]}),initFlag:qt.prototype.initFlag.concat(["TOKENS"]),confirmUpdate:function(...e){let t=qt.prototype.confirmUpdate.call(this,...e);return this.hasFlag(t,"TOKENS")&&(this.renderTokens(),this.update(),t=this.removeFlag(t,"TOKENS")),t},renderTokens:function(){let e=this.vel.findOne(".tokens").empty();["one","two","three","alot"].forEach(function(n){e.removeClass(n)});var t=this.model.get("tokens");if(t)switch(t){case 1:e.addClass("one"),e.append(ee("circle"));break;case 2:e.addClass("two"),e.append([ee("circle"),ee("circle")]);break;case 3:e.addClass("three"),e.append([ee("circle"),ee("circle"),ee("circle")]);break;default:e.addClass("alot"),e.append(ee("text").text(t+""));break}}}),oZ=it.define("pn.Transition",{size:{width:12,height:50},attrs:{rect:{width:12,height:50,fill:"#000000",stroke:"#000000"},".label":{"text-anchor":"middle","ref-x":.5,"ref-y":-20,ref:"rect",fill:"#000000","font-size":12}}},{markup:'<g class="rotatable"><g class="scalable"><rect class="root"/></g></g><text class="label"/>'}),sZ=Rt.define("pn.Link",{attrs:{".marker-target":{d:"M 10 0 L 0 5 L 10 10 z"}}});var xb={};Kt(xb,{Abstract:()=>aZ,AbstractView:()=>uZ,Aggregation:()=>hZ,Association:()=>pZ,Class:()=>bb,ClassView:()=>Db,Composition:()=>gZ,EndState:()=>yZ,Generalization:()=>dZ,Implementation:()=>fZ,Interface:()=>cZ,InterfaceView:()=>lZ,StartState:()=>vZ,State:()=>mZ,Transition:()=>IZ});var bb=it.define("uml.Class",{attrs:{rect:{width:200},".uml-class-name-rect":{stroke:"black","stroke-width":2,fill:"#3498db"},".uml-class-attrs-rect":{stroke:"black","stroke-width":2,fill:"#2980b9"},".uml-class-methods-rect":{stroke:"black","stroke-width":2,fill:"#2980b9"},".uml-class-name-text":{ref:".uml-class-name-rect","ref-y":.5,"ref-x":.5,"text-anchor":"middle","y-alignment":"middle","font-weight":"bold",fill:"black","font-size":12,"font-family":"Times New Roman"},".uml-class-attrs-text":{ref:".uml-class-attrs-rect","ref-y":5,"ref-x":5,fill:"black","font-size":12,"font-family":"Times New Roman"},".uml-class-methods-text":{ref:".uml-class-methods-rect","ref-y":5,"ref-x":5,fill:"black","font-size":12,"font-family":"Times New Roman"}},name:[],attributes:[],methods:[]},{markup:['<g class="rotatable">','<g class="scalable">','<rect class="uml-class-name-rect"/><rect class="uml-class-attrs-rect"/><rect class="uml-class-methods-rect"/>',"</g>",'<text class="uml-class-name-text"/><text class="uml-class-attrs-text"/><text class="uml-class-methods-text"/>',"</g>"].join(""),initialize:function(){this.on("change:name change:attributes change:methods",function(){this.updateRectangles(),this.trigger("uml-update")},this),this.updateRectangles(),it.prototype.initialize.apply(this,arguments)},getClassName:function(){return this.get("name")},updateRectangles:function(){var e=this.get("attrs"),t=[{type:"name",text:this.getClassName()},{type:"attrs",text:this.get("attributes")},{type:"methods",text:this.get("methods")}],n=0;t.forEach(function(r){var i=Array.isArray(r.text)?r.text:[r.text],o=i.length*20+20;e[".uml-class-"+r.type+"-text"].text=i.join(`
23
+ `),e[".uml-class-"+r.type+"-rect"].height=o,e[".uml-class-"+r.type+"-rect"].transform="translate(0,"+n+")",n+=o})}}),Db=qt.extend({initialize:function(){qt.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"uml-update",function(){this.update(),this.resize()})}}),aZ=bb.define("uml.Abstract",{attrs:{".uml-class-name-rect":{fill:"#e74c3c"},".uml-class-attrs-rect":{fill:"#c0392b"},".uml-class-methods-rect":{fill:"#c0392b"}}},{getClassName:function(){return["<<Abstract>>",this.get("name")]}}),uZ=Db,cZ=bb.define("uml.Interface",{attrs:{".uml-class-name-rect":{fill:"#f1c40f"},".uml-class-attrs-rect":{fill:"#f39c12"},".uml-class-methods-rect":{fill:"#f39c12"}}},{getClassName:function(){return["<<Interface>>",this.get("name")]}}),lZ=Db,dZ=Rt.define("uml.Generalization",{attrs:{".marker-target":{d:"M 20 0 L 0 10 L 20 20 z",fill:"white"}}}),fZ=Rt.define("uml.Implementation",{attrs:{".marker-target":{d:"M 20 0 L 0 10 L 20 20 z",fill:"white"},".connection":{"stroke-dasharray":"3,3"}}}),hZ=Rt.define("uml.Aggregation",{attrs:{".marker-target":{d:"M 40 10 L 20 20 L 0 10 L 20 0 z",fill:"white"}}}),gZ=Rt.define("uml.Composition",{attrs:{".marker-target":{d:"M 40 10 L 20 20 L 0 10 L 20 0 z",fill:"black"}}}),pZ=Rt.define("uml.Association"),mZ=it.define("uml.State",{attrs:{".uml-state-body":{width:200,height:200,rx:10,ry:10,fill:"#ecf0f1",stroke:"#bdc3c7","stroke-width":3},".uml-state-separator":{stroke:"#bdc3c7","stroke-width":2},".uml-state-name":{ref:".uml-state-body","ref-x":.5,"ref-y":5,"text-anchor":"middle",fill:"#000000","font-family":"Courier New","font-size":14},".uml-state-events":{ref:".uml-state-separator","ref-x":5,"ref-y":5,fill:"#000000","font-family":"Courier New","font-size":14}},name:"State",events:[]},{markup:['<g class="rotatable">','<g class="scalable">','<rect class="uml-state-body"/>',"</g>",'<path class="uml-state-separator"/>','<text class="uml-state-name"/>','<text class="uml-state-events"/>',"</g>"].join(""),initialize:function(){this.on({"change:name":this.updateName,"change:events":this.updateEvents,"change:size":this.updatePath},this),this.updateName(),this.updateEvents(),this.updatePath(),it.prototype.initialize.apply(this,arguments)},updateName:function(){this.attr(".uml-state-name/text",this.get("name"))},updateEvents:function(){this.attr(".uml-state-events/text",this.get("events").join(`
24
+ `))},updatePath:function(){var e="M 0 20 L "+this.get("size").width+" 20";this.attr(".uml-state-separator/d",e,{silent:!0})}}),vZ=lf.define("uml.StartState",{type:"uml.StartState",attrs:{circle:{fill:"#34495e",stroke:"#2c3e50","stroke-width":2,rx:1}}}),yZ=it.define("uml.EndState",{size:{width:20,height:20},attrs:{"circle.outer":{transform:"translate(10, 10)",r:10,fill:"#ffffff",stroke:"#2c3e50"},"circle.inner":{transform:"translate(10, 10)",r:6,fill:"#34495e"}}},{markup:'<g class="rotatable"><g class="scalable"><circle class="outer"/><circle class="inner"/></g></g>'}),IZ=Rt.define("uml.Transition",{attrs:{".marker-target":{d:"M 10 0 L 0 5 L 10 10 z",fill:"#34495e",stroke:"#2c3e50"},".connection":{stroke:"#2c3e50"}}});var ov=class e{constructor(){}parse(t){let n=t.replace(/\/\/.*|\/\*[\s\S]*?\*\//g,""),r=[],i=[],o=[],s=[],a=/enum\s+(\w+)\s*\{([\s\S]*?)\}/g,u;for(;(u=a.exec(n))!==null;){let C=u[1],M=u[2].split(",").map(E=>E.trim().replace(/['"]/g,"")).filter(E=>E.length>0);o.push({name:C,values:M})}let l=C=>{let M=[],E=/((?:@\w+\s*)*)entity\s+(\w+)\s*\{/g,N;for(;(N=E.exec(C))!==null;){let B=N[1]?.trim()||null,Z=N[2];if(Z==="relationship"||Z==="enum")continue;let $=N.index+N[0].length,te=1,p=$;for(;te>0&&p<C.length;)C[p]==="{"&&te++,C[p]==="}"&&te--,p++;let y=C.substring($,p-1);M.push({name:Z,annotation:B,fieldBlock:y})}return M},f=C=>{let M=[],E=C.split(`
25
+ `).map(B=>B.trim()).filter(B=>B.length>0),N=0;for(;N<E.length;){let B=E[N],Z=B.split(/\s+/).filter(oe=>oe.length>0);if(Z.length<1){N++;continue}let $=Z.filter(oe=>oe.startsWith("@")),te=Z.filter(oe=>!oe.startsWith("@"));if(B.includes("{")){let oe=te[0]||"unknown";if(B.includes("{")){let Pe=B.indexOf("{");oe=B.substring(0,Pe).trim().split(/\s+/).pop()||oe}let fe=1,U="",q=C.substring(C.indexOf(B)+B.indexOf("{")+1),Y=0;for(;fe>0&&Y<q.length;)q[Y]==="{"&&fe++,q[Y]==="}"&&fe--,fe>0&&(U+=q[Y]),Y++;M.push({name:oe,type:"Object",isNested:!0,annotations:$,children:f(U),required:!1,unique:!1});let Q=U.split(`
26
+ `).length;N+=Q+1;continue}if(te.length<2){N++;continue}let p=te[0],y=te[1],S=["string","text","int","long","float","bigdecimal","bool","boolean","datetime","localdate","json","jsonb","uuid","instant"].some(oe=>te[0].toLowerCase().startsWith(oe)),_=o.some(oe=>oe.name.toLowerCase()===te[0].toLowerCase());(S||_)&&(p=te[1],y=te[0]);let j=B.includes("required"),V=B.includes("unique"),W=o.some(oe=>oe.name.toLowerCase()===y.toLowerCase());M.push({name:p,type:y,required:j,unique:V,isEnum:W,annotations:$}),N++}return M},d=l(n);for(let C of d)r.push({name:C.name,annotation:C.annotation,fields:f(C.fieldBlock)});let m=/relationship\s+(\w+)\s*\{([\s\S]*?)\}/g;for(;(u=m.exec(n))!==null;){let C=u[1],E=u[2].split(`
27
+ `).map(N=>N.trim()).filter(N=>N.length>0);for(let N of E){let B=N.split(/\s+to\s+/);if(B.length!==2)continue;let Z=p=>{let y=p.match(/(\w+)\s*\{\s*(\w+)\s*\}/);if(y)return{entity:y[1],field:y[2]};let D=p.match(/^(\w+)/);return D?{entity:D[1],field:null}:null},$=Z(B[0]),te=Z(B[1]);$&&te&&i.push({type:C,from:$,to:te,required:N.includes("required")})}}let I=/open\s+(.*)/g;for(;(u=I.exec(n))!==null;){let M=u[1].trim().split(/,(?![^\(]*\))/).map(E=>E.trim()).filter(E=>E.length>0);for(let E of M){let N=E.match(/^([\w\*]+)(?:\s*\((.*?)\))?$/);if(N){let B=N[1],Z=N[2],$=["read","create","update","delete"];Z&&($=Z.split(/[\s,]+/).map(te=>te.trim().toLowerCase()).filter(te=>te.length>0)),s.push({name:B,actions:$})}}}return{entities:r,relationships:i,enums:o,openEntities:s}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})};var sv=class e{constructor(){}serialize(t){let n="";if(t.enums&&t.enums.length>0)for(let r of t.enums)n+=`enum ${r.name} {
28
+ `,n+=` ${r.values.join(`,
29
+ `)}
30
+ `,n+=`}
31
+
32
+ `;for(let r of t.entities){r.annotation&&(n+=`${r.annotation}
33
+ `),n+=`entity ${r.name} {
34
+ `;let i=(o,s)=>{let a="";for(let u of o)if(u.isNested&&u.children)a+=`${s}${u.name} {
35
+ `,a+=i(u.children,s+" "),a+=`${s}}
36
+ `;else{let l=`${s}${u.name} ${u.type}`;u.required&&(l+=" required"),u.unique&&(l+=" unique"),a+=`${l}
37
+ `}return a};n+=i(r.fields," "),n+=`}
38
+
39
+ `}if(t.relationships.length>0){let r={};for(let i of t.relationships)r[i.type]||(r[i.type]=[]),r[i.type].push(i);for(let[i,o]of Object.entries(r)){n+=`relationship ${i} {
40
+ `;for(let s of o){let a=s.from.field?`${s.from.entity}{${s.from.field}}`:s.from.entity,u=s.to.field?`${s.to.entity}{${s.to.field}}`:s.to.entity,l=` ${a} to ${u}`;s.required&&(l+=" required"),n+=`${l}
41
+ `}n+=`}
42
+
43
+ `}}if(t.openEntities&&t.openEntities.length>0){for(let r of t.openEntities)r.actions&&r.actions.length>0?n+=`open ${r.name}(${r.actions.join(", ")})
44
+ `:n+=`open ${r.name}
45
+ `;n+=`
46
+ `}return n.trim()+`
47
+ `}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ke({token:e,factory:e.\u0275fac,providedIn:"root"})};var bZ=["canvas"];function DZ(e,t){e&1&&(Ne(0,"div",21),Zt(1,"i",22),Ne(2,"p"),yt(3,"Select an entity or relationship on the canvas to edit its properties."),Re()())}function xZ(e,t){if(e&1){let n=Qs();Ne(0,"div",29)(1,"div",30)(2,"input",31),Ni("ngModelChange",function(i){let o=tn(n).$implicit;return eo(o.name,i)||(o.name=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(3);return nn(i.updateGraphFromModel())}),Re(),Ne(3,"input",32),Ni("ngModelChange",function(i){let o=tn(n).$implicit;return eo(o.type,i)||(o.type=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(3);return nn(i.updateGraphFromModel())}),Re(),Ne(4,"button",33),rn("click",function(){let i=tn(n).index,o=fn(3);return nn(o.removeField(i))}),Zt(5,"i",34),Re()(),Ne(6,"div",35)(7,"div",36)(8,"input",37),Ni("ngModelChange",function(i){let o=tn(n).$implicit;return eo(o.required,i)||(o.required=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(3);return nn(i.updateGraphFromModel())}),Re(),Ne(9,"label",38),yt(10,"Required"),Re()(),Ne(11,"div",39)(12,"input",37),Ni("ngModelChange",function(i){let o=tn(n).$implicit;return eo(o.unique,i)||(o.unique=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(3);return nn(i.updateGraphFromModel())}),Re(),Ne(13,"label",38),yt(14,"Unique"),Re()()()()}if(e&2){let n=t.$implicit,r=t.index;An(2),Ti("ngModel",n.name),An(),Ti("ngModel",n.type),An(5),ri("id","req-"+r),Ti("ngModel",n.required),An(),ri("for","req-"+r),An(3),ri("id","uniq-"+r),Ti("ngModel",n.unique),An(),ri("for","uniq-"+r)}}function EZ(e,t){if(e&1){let n=Qs();Ne(0,"div")(1,"div",23)(2,"label",24),yt(3,"Entity Name"),Re(),Ne(4,"input",25),Ni("ngModelChange",function(i){tn(n);let o=fn(2);return eo(o.selectedEntity.name,i)||(o.selectedEntity.name=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(2);return nn(i.updateGraphFromModel())}),Re()(),Ne(5,"div",23)(6,"label",24),yt(7,"Annotations (e.g. @Audited)"),Re(),Ne(8,"input",25),Ni("ngModelChange",function(i){tn(n);let o=fn(2);return eo(o.selectedEntity.annotation,i)||(o.selectedEntity.annotation=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(2);return nn(i.updateGraphFromModel())}),Re()(),Ne(9,"h6",26),yt(10," Fields "),Ne(11,"button",27),rn("click",function(){tn(n);let i=fn(2);return nn(i.addField())}),Zt(12,"i",9),Re()(),yu(13,xZ,15,8,"div",28),Re()}if(e&2){let n=fn(2);An(4),Ti("ngModel",n.selectedEntity.name),An(4),Ti("ngModel",n.selectedEntity.annotation),An(5),ri("ngForOf",n.selectedEntity.fields)}}function MZ(e,t){if(e&1){let n=Qs();Ne(0,"div")(1,"div",23)(2,"label",24),yt(3,"Relationship Type"),Re(),Ne(4,"select",40),Ni("ngModelChange",function(i){tn(n);let o=fn(2);return eo(o.selectedRelationship.type,i)||(o.selectedRelationship.type=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(2);return nn(i.updateGraphFromModel())}),Ne(5,"option",41),yt(6,"OneToMany"),Re(),Ne(7,"option",42),yt(8,"ManyToOne"),Re(),Ne(9,"option",43),yt(10,"OneToOne"),Re(),Ne(11,"option",44),yt(12,"ManyToMany"),Re()()(),Ne(13,"div",45)(14,"div",30)(15,"strong"),yt(16,"From:"),Re(),Ne(17,"span"),yt(18),Re()(),Ne(19,"div",46)(20,"strong"),yt(21,"To:"),Re(),Ne(22,"span"),yt(23),Re()()(),Ne(24,"div",39)(25,"input",47),Ni("ngModelChange",function(i){tn(n);let o=fn(2);return eo(o.selectedRelationship.required,i)||(o.selectedRelationship.required=i),nn(i)}),rn("ngModelChange",function(){tn(n);let i=fn(2);return nn(i.updateGraphFromModel())}),Re(),Ne(26,"label",48),yt(27,"Required"),Re()(),Ne(28,"button",49),rn("click",function(){tn(n);let i=fn(2);return nn(i.removeRelationship())}),Zt(29,"i",34),yt(30," Delete Relationship "),Re()()}if(e&2){let n=fn(2);An(4),Ti("ngModel",n.selectedRelationship.type),An(14),Dl(n.selectedRelationship.from.entity),An(5),Dl(n.selectedRelationship.to.entity),An(2),Ti("ngModel",n.selectedRelationship.required)}}function SZ(e,t){if(e&1){let n=Qs();Ne(0,"div",14)(1,"div",15)(2,"h5",16),yt(3,"Properties"),Re(),Ne(4,"button",17),rn("click",function(){tn(n);let i=fn();return nn(i.closeSidebar())}),Zt(5,"i",18),Re()(),yu(6,DZ,4,0,"div",19)(7,EZ,14,3,"div",20)(8,MZ,31,4,"div",20),Re()}if(e&2){let n=fn();An(6),ri("ngIf",!n.selectedEntity&&!n.selectedRelationship),An(),ri("ngIf",n.selectedEntity),An(),ri("ngIf",n.selectedRelationship)}}var av=class e{constructor(t,n,r){this.parser=t;this.serializer=n;this.zone=r}canvasRef;graph;paper;currentModel={entities:[],relationships:[],enums:[],openEntities:[]};classMap={};linkMap={};selectedEntity=null;selectedRelationship=null;selectedCellView=null;isSidebarOpen=!1;ngOnInit(){this.graph=new so.Graph,this.paper=new so.Paper({el:this.canvasRef.nativeElement,model:this.graph,width:4e3,height:4e3,gridSize:10,drawGrid:!0,background:{color:"#f4f7f6"},defaultLink:new so.Link({router:{name:"manhattan"},connector:{name:"rounded"},attrs:{line:{stroke:"#333",strokeWidth:2,targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 Z"}}}}),validateConnection:function(t,n,r,i,o,s){return t===r?!1:t.model instanceof As.uml.Class&&r.model instanceof As.uml.Class},interactive:{linkMove:!0}}),this.paper.on("cell:pointerdown",t=>{this.zone.run(()=>{this.selectCell(t)})}),this.paper.on("cell:pointerdblclick",t=>{this.zone.run(()=>{this.selectCell(t),this.isSidebarOpen=!0})}),this.paper.on("blank:pointerdown",()=>{this.zone.run(()=>{this.selectedEntity=null,this.selectedRelationship=null,this.selectedCellView=null,this.isSidebarOpen=!1})}),this.graph.on("add",t=>{t instanceof so.Link&&t.on("change:target",()=>{let n=t.get("source").id,r=t.get("target").id;if(n&&r){let i=this.graph.getCell(n),o=this.graph.getCell(r);if(i&&o&&!this.linkMap[t.id]){let s=Array.isArray(i.get("name"))?i.get("name")[0]:i.get("name"),a=Array.isArray(o.get("name"))?o.get("name")[0]:o.get("name"),u={type:"OneToMany",from:{entity:s,field:"id"},to:{entity:a,field:null},required:!1};this.currentModel.relationships.push(u),this.linkMap[t.id]=u,t.labels([{position:.5,attrs:{text:{text:"OneToMany"}}}])}}})})}selectCell(t){if(this.selectedEntity=null,this.selectedRelationship=null,this.selectedCellView=t,t.model instanceof As.uml.Class){let n=t.model.get("name"),r=Array.isArray(n)?n[0]:n;this.selectedEntity=this.currentModel.entities.find(i=>i.name===r)||null}else t.model instanceof so.Link&&(this.selectedRelationship=this.linkMap[t.model.id]||null)}closeSidebar(){this.isSidebarOpen=!1}onFileSelected(t){let n=t.target.files[0];if(n){let r=new FileReader;r.onload=i=>{let o=i.target?.result;this.currentModel=this.parser.parse(o),this.renderModel(this.currentModel)},r.readAsText(n)}}renderModel(t){this.graph.clear(),this.linkMap={};let n=50,r=50;for(let i of t.entities){let o=(f,d="")=>{let m=[];for(let I of f)if(I.isNested&&I.children)m.push(`${d}${I.name} {`),m=m.concat(o(I.children,d+" ")),m.push(`${d}}`);else{let C=`${d}${I.name}: ${I.type}`;I.required&&(C+=" (req)"),I.unique&&(C+=" (uniq)"),m.push(C)}return m},s=o(i.fields),a=!!i.annotation,u=35+(s.length*16+15)+(a?30:0),l=new As.uml.Class({position:{x:n,y:r},size:{width:320,height:u},name:[i.name],attributes:s,methods:a?[i.annotation]:[],attrs:{".":{filter:"drop-shadow(0px 4px 6px rgba(0,0,0,0.1))"},".uml-class-name-rect":{fill:"#5b8bda",stroke:"#5b8bda","stroke-width":1},".uml-class-attrs-rect":{fill:"#1e1e1e",stroke:"#5b8bda","stroke-width":1,magnet:!0},".uml-class-methods-rect":{fill:"#1e1e1e",stroke:"#5b8bda","stroke-width":1,magnet:!0},".uml-class-name-text":{fill:"#ffffff","font-family":"Inter, sans-serif","font-weight":"bold","font-size":14},".uml-class-attrs-text":{fill:"#ffffff","font-size":12,"font-family":"monospace"},".uml-class-methods-text":{fill:"#aaaaaa","font-size":11,"font-family":"Inter, sans-serif","font-style":"italic"}}});this.classMap[i.name]=l,l.addTo(this.graph),n+=250,n>800&&(n=50,r+=200)}for(let i of t.enums){let o=35+(i.values.length*16+15);new As.uml.Class({position:{x:n,y:r},size:{width:320,height:o},name:[`<<enum>> ${i.name}`],attributes:i.values,methods:[],attrs:{".":{filter:"drop-shadow(0px 4px 6px rgba(0,0,0,0.1))"},".uml-class-name-rect":{fill:"#e67e22",stroke:"#d35400","stroke-width":1},".uml-class-attrs-rect":{fill:"#1e1e1e",stroke:"#d35400","stroke-width":1},".uml-class-methods-rect":{display:"none"},".uml-class-name-text":{fill:"#ffffff","font-family":"Inter, sans-serif","font-weight":"bold","font-size":13},".uml-class-attrs-text":{fill:"#ffffff","font-size":12,"font-family":"monospace"}}}).addTo(this.graph),n+=250,n>800&&(n=50,r+=200)}for(let i of t.relationships){let o=this.classMap[i.from.entity],s=this.classMap[i.to.entity];if(o&&s){let a=new so.Link({source:{id:o.id},target:{id:s.id},router:{name:"manhattan"},connector:{name:"rounded"},labels:[{position:.5,attrs:{text:{text:i.type}}}],attrs:{line:{stroke:"#333",strokeWidth:2,targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 Z"}}}});this.linkMap[a.id]=i,a.addTo(this.graph)}}}addEntity(){let t=prompt("Entity Name:");t&&!this.classMap[t]&&(this.currentModel.entities.push({name:t,annotation:null,fields:[]}),this.renderModel(this.currentModel))}addField(){this.selectedEntity&&(this.selectedEntity.fields.push({name:"newField",type:"String",required:!1,unique:!1}),this.updateGraphFromModel())}removeField(t){this.selectedEntity&&(this.selectedEntity.fields.splice(t,1),this.updateGraphFromModel())}removeRelationship(){if(this.selectedRelationship&&this.selectedCellView){let t=this.currentModel.relationships.indexOf(this.selectedRelationship);t>-1&&this.currentModel.relationships.splice(t,1),this.selectedCellView.model.remove(),this.selectedRelationship=null,this.selectedCellView=null}}updateGraphFromModel(){if(this.selectedEntity&&this.selectedCellView){let t=this.selectedCellView.model;t.set("name",[this.selectedEntity.name]);let n=(s,a="")=>{let u=[];for(let l of s)if(l.isNested&&l.children)u.push(`${a}${l.name} {`),u=u.concat(n(l.children,a+" ")),u.push(`${a}}`);else{let f=`${a}${l.name}: ${l.type}`;l.required&&(f+=" (req)"),l.unique&&(f+=" (uniq)"),u.push(f)}return u},r=n(this.selectedEntity.fields),i=!!this.selectedEntity.annotation,o=35+(r.length*16+15)+(i?30:0);t.set("size",{width:320,height:o}),t.set("attributes",r),t.set("methods",i?[this.selectedEntity.annotation]:[])}if(this.selectedRelationship&&this.selectedCellView){let t=this.selectedCellView.model,n=this.selectedRelationship.type;this.selectedRelationship.required&&(n+=" (req)"),t.labels([{position:.5,attrs:{text:{text:n}}}])}}syncGraphToModel(){}exportGDL(){let t=this.serializer.serialize(this.currentModel),n=new Blob([t],{type:"text/plain"}),r=window.URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download="schema.gdl",i.click(),window.URL.revokeObjectURL(r)}static \u0275fac=function(n){return new(n||e)(wt(ov),wt(sv),wt(Yn))};static \u0275cmp=Js({type:e,selectors:[["app-canvas"]],viewQuery:function(n,r){if(n&1&&Qh(bZ,7),n&2){let i;lC(i=dC())&&(r.canvasRef=i.first)}},decls:17,vars:1,consts:[["fileInput",""],["canvas",""],[1,"canvas-workspace","d-flex"],[1,"canvas-main","flex-grow-1",2,"overflow","auto","height","calc(100vh - 60px)"],[1,"toolbar","p-2","bg-light","border-bottom"],["type","file","accept",".gdl",2,"display","none",3,"change"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-upload"],[1,"btn","btn-success","btn-sm","ml-2",3,"click"],[1,"fas","fa-plus"],[1,"btn","btn-info","btn-sm","ml-2",3,"click"],[1,"fas","fa-download"],["id","jointjs-canvas",1,"paper-container"],["class","properties-sidebar bg-white border-left p-3 shadow-sm","style","width: 350px; overflow-y: auto; height: calc(100vh - 60px);",4,"ngIf"],[1,"properties-sidebar","bg-white","border-left","p-3","shadow-sm",2,"width","350px","overflow-y","auto","height","calc(100vh - 60px)"],[1,"d-flex","justify-content-between","align-items-center","mb-4","border-bottom","pb-2"],[1,"mb-0"],[1,"btn","btn-sm","btn-light",3,"click"],[1,"fas","fa-times"],["class","text-muted text-center mt-5",4,"ngIf"],[4,"ngIf"],[1,"text-muted","text-center","mt-5"],[1,"fas","fa-mouse-pointer","fa-2x","mb-2"],[1,"form-group","mb-3"],[1,"font-weight-bold"],["type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"mt-4","border-bottom","pb-2","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-sm","btn-outline-success","py-0","px-1",3,"click"],["class","field-editor bg-light p-2 mb-2 border rounded",4,"ngFor","ngForOf"],[1,"field-editor","bg-light","p-2","mb-2","border","rounded"],[1,"d-flex","justify-content-between","mb-1"],["type","text","placeholder","Name",1,"form-control","form-control-sm","w-50","mr-1",3,"ngModelChange","ngModel"],["type","text","placeholder","Type",1,"form-control","form-control-sm","w-50",3,"ngModelChange","ngModel"],[1,"btn","btn-sm","btn-outline-danger","ml-1","py-0","px-1",3,"click"],[1,"fas","fa-trash"],[1,"d-flex","align-items-center","mt-1",2,"font-size","0.8rem"],[1,"custom-control","custom-checkbox","mr-3"],["type","checkbox",1,"custom-control-input",3,"ngModelChange","id","ngModel"],[1,"custom-control-label",3,"for"],[1,"custom-control","custom-checkbox"],[1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],["value","OneToMany"],["value","ManyToOne"],["value","OneToOne"],["value","ManyToMany"],[1,"bg-light","p-2","border","rounded","mb-3","text-sm"],[1,"d-flex","justify-content-between"],["type","checkbox","id","rel-req",1,"custom-control-input",3,"ngModelChange","ngModel"],["for","rel-req",1,"custom-control-label"],[1,"btn","btn-outline-danger","btn-sm","mt-4","w-100",3,"click"]],template:function(n,r){if(n&1){let i=Qs();Ne(0,"div",2)(1,"div",3)(2,"div",4)(3,"input",5,0),rn("change",function(s){return r.onFileSelected(s)}),Re(),Ne(5,"button",6),rn("click",function(){tn(i);let s=fC(4);return nn(s.click())}),Zt(6,"i",7),yt(7," Upload GDL "),Re(),Ne(8,"button",8),rn("click",function(){return r.addEntity()}),Zt(9,"i",9),yt(10," Add Entity "),Re(),Ne(11,"button",10),rn("click",function(){return r.exportGDL()}),Zt(12,"i",11),yt(13," Export GDL "),Re()(),Zt(14,"div",12,1),Re(),yu(16,SZ,9,3,"div",13),Re()}n&2&&(An(16),ri("ngIf",r.isSidebarOpen))},dependencies:[ug,ag,bC,kT,RT,PT,Wg,d0,$g,ST,h0],encapsulation:2})};var uv=class e{title=ni("go-duck-planner");static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Js({type:e,selectors:[["app-root"]],decls:66,vars:0,consts:[[1,"page-wrapper"],[1,"sidebar-wrapper"],[1,"sidebar-tabs"],["role","tablist","aria-orientation","vertical",1,"nav"],["href","#",1,"logo"],["src","img/logo.png","alt","GO-DUCK Planner",2,"max-width","100%","max-height","40px","margin","10px 0"],["id","home-tab","data-toggle","pill","href","#tab-home","role","tab","aria-controls","tab-home","aria-selected","true",1,"nav-link","active"],[1,"fas","fa-home"],[1,"nav-link-text"],["id","settings-tab","data-toggle","pill","href","#tab-settings","role","tab","aria-controls","tab-settings","aria-selected","false",1,"nav-link"],[1,"fas","fa-cog"],[1,"tab-content"],["id","tab-home","role","tabpanel","aria-labelledby","home-tab",1,"tab-pane","fade","show","active"],[1,"tab-pane-header"],[1,"sidebarMenuScroll"],[1,"sidebar-menu"],["href","#",1,"current-page"],["href","#"],[1,"main-container"],[1,"page-header"],[1,"row","gutters"],[1,"col-xl-8","col-lg-8","col-md-8","col-sm-6","col-9"],[1,"search-container"],["id","toggle-sidebar",1,"toggle-sidebar"],[1,"fas","fa-bars"],[1,"ui","fluid","category","search"],[1,"ui","icon","input"],["type","text","placeholder","Search GDL schemas...",1,"prompt"],[1,"search","icon","fas","fa-search"],[1,"results"],[1,"col-xl-4","col-lg-4","col-md-4","col-sm-6","col-3"],[1,"header-actions"],[1,"dropdown"],["href","#","id","userSettings","data-toggle","dropdown","aria-haspopup","true",1,"user-settings"],[1,"avatar"],["src","img/user.svg","alt","User Avatar"],[1,"status","busy"],["aria-labelledby","userSettings",1,"dropdown-menu","dropdown-menu-end","md"],[1,"header-profile-actions"],[1,"fas","fa-user"],[1,"fas","fa-sign-out-alt"],[1,"content-wrapper-scroll"],[1,"content-wrapper"],[1,"app-footer"]],template:function(n,r){n&1&&(Ne(0,"div",0)(1,"nav",1)(2,"div",2)(3,"div",3)(4,"a",4),Zt(5,"img",5),Re(),Ne(6,"a",6),Zt(7,"i",7),Ne(8,"span",8),yt(9,"Dashboard"),Re()(),Ne(10,"a",9),Zt(11,"i",10),Ne(12,"span",8),yt(13,"Settings"),Re()()(),Ne(14,"div",11)(15,"div",12)(16,"div",13),yt(17," Dashboards "),Re(),Ne(18,"div",14)(19,"div",15)(20,"ul")(21,"li")(22,"a",16),yt(23,"GDL Planner"),Re()(),Ne(24,"li")(25,"a",17),yt(26,"Schema Editor"),Re()(),Ne(27,"li")(28,"a",17),yt(29,"Generators"),Re()()()()()()()()(),Ne(30,"div",18)(31,"div",19)(32,"div",20)(33,"div",21)(34,"div",22)(35,"div",23),Zt(36,"i",24),Re(),Ne(37,"div",25)(38,"div",26),Zt(39,"input",27)(40,"i",28),Re(),Zt(41,"div",29),Re()()(),Ne(42,"div",30)(43,"ul",31)(44,"li",32)(45,"a",33)(46,"span",34),Zt(47,"img",35)(48,"span",36),Re()(),Ne(49,"div",37)(50,"div",38)(51,"a",17),Zt(52,"i",39),yt(53," Profile"),Re(),Ne(54,"a",17),Zt(55,"i",10),yt(56," Settings"),Re(),Ne(57,"a",17),Zt(58,"i",40),yt(59," Logout"),Re()()()()()()()(),Ne(60,"div",41)(61,"div",42),Zt(62,"router-outlet")(63,"app-canvas"),Re(),Ne(64,"div",43),yt(65,"\xA9 GO-DUCK Planner 2026"),Re()()()())},dependencies:[Yl,av],encapsulation:2})};RC(uv,dT).catch(e=>console.error(e));